blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
33742c29a190d1fca5bc4bda18e736358ca72892
4e9c06ff59fe91f0f69cb3dd80a128f466885aea
/src/o/wt.java
df97a38f6178a4bd2ff1fccfef3c5ee0c9ca9ae9
[]
no_license
reverseengineeringer/com.eclipsim.gpsstatus2
5ab9959cc3280d2dc96f2247c1263d14c893fc93
800552a53c11742c6889836a25b688d43ae68c2e
refs/heads/master
2021-01-17T07:26:14.357187
2016-07-21T03:33:07
2016-07-21T03:33:07
63,834,134
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
package o; import com.google.android.gms.ads.internal.client.AdRequestParcel; final class wt implements Runnable { wt(ws paramws, AdRequestParcel paramAdRequestParcel, sm paramsm) {} public final void run() { aGk.ˊ(SR, aGj); } } /* Location: * Qualified Name: o.wt * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
e715e9c1ac2e85a1118121b8a61da73f053bef73
dff3522a00fa7b81f1a5d9e21529f23fc7099ed8
/src/main/java/org/jeecgframework/web/cgform/service/impl/enhance/CgformEnhanceJavaServiceImpl.java
4bb5db9089015f81be1e5a1d2252d62c2a126720
[]
no_license
Time-Boat/gwcx
3fcf93b30c70389492bea06d23437bd9c45ff30a
9eb064526179c3dd057052c41f55eadb675f6b8b
refs/heads/master
2020-12-30T14:12:15.876820
2018-02-17T14:53:05
2018-02-17T14:53:05
91,282,633
1
0
null
null
null
null
UTF-8
Java
false
false
4,132
java
package org.jeecgframework.web.cgform.service.impl.enhance; import java.io.Serializable; import java.util.List; import java.util.UUID; import org.jeecgframework.core.common.service.impl.CommonServiceImpl; import org.jeecgframework.core.util.ApplicationContextUtil; import org.jeecgframework.core.util.StringUtil; import org.jeecgframework.web.cgform.entity.enhance.CgformEnhanceJavaEntity; import org.jeecgframework.web.cgform.service.enhance.CgformEnhanceJavaServiceI; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service("cgformEnhanceJavaService") @Transactional public class CgformEnhanceJavaServiceImpl extends CommonServiceImpl implements CgformEnhanceJavaServiceI { @Override public <T> void delete(T entity) { super.delete(entity); //执行删除操作配置的sql增强 this.doDelSql((CgformEnhanceJavaEntity)entity); } @Override public <T> Serializable save(T entity) { Serializable t = super.save(entity); //执行新增操作配置的sql增强 this.doAddSql((CgformEnhanceJavaEntity)entity); return t; } @Override public <T> void saveOrUpdate(T entity) { super.saveOrUpdate(entity); //执行更新操作配置的sql增强 this.doUpdateSql((CgformEnhanceJavaEntity)entity); } /** * 默认按钮-sql增强-新增操作 * @param * @return */ @Override public boolean doAddSql(CgformEnhanceJavaEntity t){ return true; } /** * 默认按钮-sql增强-更新操作 * @param * @return */ @Override public boolean doUpdateSql(CgformEnhanceJavaEntity t){ return true; } /** * 默认按钮-sql增强-删除操作 * @param * @return */ @Override public boolean doDelSql(CgformEnhanceJavaEntity t){ return true; } /** * 替换sql中的变量 * @param sql * @return */ public String replaceVal(String sql,CgformEnhanceJavaEntity t){ sql = sql.replace("#{id}",String.valueOf(t.getId())); sql = sql.replace("#{cg_java_type}",String.valueOf(t.getCgJavaType())); sql = sql.replace("#{cg_java_value}",String.valueOf(t.getCgJavaValue())); sql = sql.replace("#{form_id}",String.valueOf(t.getFormId())); sql = sql.replace("#{UUID}",UUID.randomUUID().toString()); return sql; } @Override public CgformEnhanceJavaEntity getCgformEnhanceJavaEntityByCodeFormId( String buttonCode, String formId) { StringBuilder hql = new StringBuilder(""); hql.append(" from CgformEnhanceJavaEntity t"); hql.append(" where t.formId='").append(formId).append("'"); hql.append(" and t.buttonCode ='").append(buttonCode).append("'"); List<CgformEnhanceJavaEntity> list = this.findHql(hql.toString()); if(list!=null&&list.size()>0){ return list.get(0); } return null; } @Override public List<CgformEnhanceJavaEntity> checkCgformEnhanceJavaEntity( CgformEnhanceJavaEntity cgformEnhanceJavaEntity) { StringBuilder hql = new StringBuilder(""); hql.append(" from CgformEnhanceJavaEntity t"); hql.append(" where t.formId='").append(cgformEnhanceJavaEntity.getFormId()).append("'"); hql.append(" and t.buttonCode ='").append(cgformEnhanceJavaEntity.getButtonCode()).append("'"); if(cgformEnhanceJavaEntity.getId()!=null){ hql.append(" and t.id !='").append(cgformEnhanceJavaEntity.getId()).append("'"); } List<CgformEnhanceJavaEntity> list = this.findHql(hql.toString()); return list; } @Override public boolean checkClassOrSpringBeanIsExist(CgformEnhanceJavaEntity cgformEnhanceJavaEntity) { String cgJavaType = cgformEnhanceJavaEntity.getCgJavaType(); String cgJavaValue = cgformEnhanceJavaEntity.getCgJavaValue(); if(StringUtil.isNotEmpty(cgJavaValue)){ try { if("class".equals(cgJavaType)){ Class clazz = Class.forName(cgJavaValue); if(clazz==null || clazz.newInstance()==null) return false; } if("spring".equals(cgJavaType)){ Object obj = ApplicationContextUtil.getContext().getBean(cgJavaValue); if(obj==null) return false; } } catch (Exception e) { e.printStackTrace(); return false; } } return true; } }
[ "770164810@qq.com" ]
770164810@qq.com
c2a3594000789a935eb267a4068f82448d68be82
e506171a9f6ba23692a200dac6c1782aac6fc96b
/src/main/java/leetcode/_1001__1050/_1032/Demo01.java
7fc1abeb7e8516504ca48058428c5910e3a9c901
[]
no_license
minatoyukina/java-note
03bfd337c9b871103553dc4c230ae68a98552e83
9cd34686651945df748144a9fd6d7917e2be097f
refs/heads/master
2023-08-18T03:18:26.235678
2023-08-15T06:02:21
2023-08-15T06:02:21
174,096,999
0
0
null
2023-06-14T22:29:27
2019-03-06T07:45:47
Java
UTF-8
Java
false
false
133
java
package leetcode._1001__1050._1032; import org.junit.Test; public class Demo01 { @Test public void test() { } }
[ "1096445518@qq.com" ]
1096445518@qq.com
7ab6041d10bb6b007652ed890d520cba3fb9c4ff
477d147a12bd0418a2124960ed8e14859b04668c
/util/file/src/main/java/net/lizhaoweb/common/file/event/ProgressPublisher.java
6f48b981cf038e375d5a7b12cdb6975e0b9e30aa
[ "Apache-2.0" ]
permissive
JohnLee-Organization/common
90312aa0edee382ba96973e7f99c2743a28833d2
eec94dcd810142346020caca4a33ca30aa4dfd38
refs/heads/devp
2023-07-27T05:01:56.187981
2022-02-08T03:14:57
2022-02-08T03:14:57
98,837,125
0
0
Apache-2.0
2023-07-16T02:49:07
2017-07-31T01:47:33
Java
UTF-8
Java
false
false
2,509
java
/** * Copyright (c) 2019, Stupid Bird and/or its affiliates. All rights reserved. * STUPID BIRD PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * @Project : common * @Package : net.lizhaoweb.common.download.event * @author <a href="http://www.lizhaoweb.net">李召(John.Lee)</a> * @email 404644381@qq.com * @Time : 17:13 */ package net.lizhaoweb.common.file.event; /** * @author <a href="http://www.lizhaoweb.cn">李召(John.Lee)</a> * @version 1.0.0.0.1 * @email 404644381@qq.com * @notes Created on 2019年06月25日<br> * Revision of last commit:$Revision$<br> * Author of last commit:$Author$<br> * Date of last commit:$Date$<br> */ public class ProgressPublisher { public static void publishProgress(final ProgressListener listener, final ProgressEventType eventType) { if (listener == ProgressListener.NOOP || listener == null || eventType == null) { return; } listener.progressChanged(new ProgressEvent(eventType)); } public static void publishSelectProgress(final ProgressListener listener, final ProgressEventType eventType, final long scannedBytes) { if (listener == ProgressListener.NOOP || listener == null || eventType == null) { return; } listener.progressChanged(new ProgressEvent(eventType, scannedBytes)); } public static void publishRequestContentLength(final ProgressListener listener, final long bytes) { publishByteCountEvent(listener, ProgressEventType.REQUEST_CONTENT_LENGTH_EVENT, bytes); } public static void publishRequestBytesTransferred(final ProgressListener listener, final long bytes) { publishByteCountEvent(listener, ProgressEventType.REQUEST_CONTENT_LENGTH_EVENT, bytes); } public static void publishResponseContentLength(final ProgressListener listener, final long bytes) { publishByteCountEvent(listener, ProgressEventType.REQUEST_CONTENT_LENGTH_EVENT, bytes); } public static void publishResponseBytesTransferred(final ProgressListener listener, final long bytes) { publishByteCountEvent(listener, ProgressEventType.REQUEST_CONTENT_LENGTH_EVENT, bytes); } private static void publishByteCountEvent(final ProgressListener listener, final ProgressEventType eventType, final long bytes) { if (listener == ProgressListener.NOOP || listener == null || bytes <= 0) { return; } listener.progressChanged(new ProgressEvent(eventType, bytes)); } }
[ "404644381@qq.com" ]
404644381@qq.com
e59beff4b01cf393cc9f9dd6238dc1dbff824b97
571ce46236afb5d836b713c5f3cc165db5d2ae77
/packages/services/PrizeTelephony/src/com/android/phone/prize/CallRejectContentData.java
1211e0734498cc376f6be1e7ce251cf19c4d669b
[ "Apache-2.0" ]
permissive
sengeiou/prize
d6f56746ba82e0bbdaa47b5bea493ceddb0abd0c
e27911e194c604bf651f7bed0f5f9ce8f7dc8d4d
refs/heads/master
2020-04-28T04:45:42.207852
2018-11-23T13:50:20
2018-11-23T13:50:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,253
java
package com.android.phone.prize; import android.content.UriMatcher; import android.provider.BaseColumns; public class CallRejectContentData { public static final String AUTHORITY = "reject"; public static final String DATABASE_NAME = "reject.db"; public static final int DATABASE_VERSION = 4; public static final String USERS_TABLE_NAME = "list"; public static final class UserTableData implements BaseColumns { public static final String TABLE_NAME = "list"; public static final String CONTENT_TYPE = "vnd.android.cursor.dir/com.android.rejects"; public static final String CONTENT_TYPE_ITME = "vnd.android.cursor.item/com.android.reject"; public static final int REJECTS = 1; public static final int REJECT = 2; public static final String NUMBER = "Number"; public static final String TYPE = "Type"; public static final String CONTACTID = "ContactId"; public static final UriMatcher URIMATCHER; static { URIMATCHER = new UriMatcher(UriMatcher.NO_MATCH); URIMATCHER.addURI(CallRejectContentData.AUTHORITY, "list", REJECTS); URIMATCHER.addURI(CallRejectContentData.AUTHORITY, "list/#", REJECT); } } }
[ "18218724438@163.com" ]
18218724438@163.com
198abb677851216e3c068985d1a88319772ed179
1d6f1faea75e8a1c2d6aa2e208f6e087c54628b7
/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/BindErrorsTag.java
d1520ea59a90573936923596e0642b263e5d897e
[]
no_license
lixw1992/spring4
7acde76816b08582048368fb0e4fc38c23160636
54cbd97957528a7a7af813394bb1adbb802256f8
refs/heads/master
2020-07-02T01:56:42.815034
2019-08-01T03:49:53
2019-08-01T03:49:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,662
java
package org.springframework.web.servlet.tags; import javax.servlet.ServletException; import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; import org.springframework.validation.Errors; /** * JSP tag that evaluates content if there are binding errors * for a certain bean. Exports an "errors" variable of type * {@link org.springframework.validation.Errors} for the given bean. */ @SuppressWarnings("serial") public class BindErrorsTag extends HtmlEscapingAwareTag { public static final String ERRORS_VARIABLE_NAME = "errors"; private String name; private Errors errors; /** * Set the name of the bean that this tag should check. */ public void setName(String name) { this.name = name; } /** * Return the name of the bean that this tag checks. */ public String getName() { return this.name; } @Override protected final int doStartTagInternal() throws ServletException, JspException { this.errors = getRequestContext().getErrors(this.name, isHtmlEscape()); if (this.errors != null && this.errors.hasErrors()) { this.pageContext.setAttribute(ERRORS_VARIABLE_NAME, this.errors, PageContext.REQUEST_SCOPE); return EVAL_BODY_INCLUDE; } else { return SKIP_BODY; } } @Override public int doEndTag() { this.pageContext.removeAttribute(ERRORS_VARIABLE_NAME, PageContext.REQUEST_SCOPE); return EVAL_PAGE; } /** * Retrieve the Errors instance that this tag is currently bound to. * <p>Intended for cooperating nesting tags. */ public final Errors getErrors() { return this.errors; } @Override public void doFinally() { super.doFinally(); this.errors = null; } }
[ "yuexiaoguang@vortexinfo.cn" ]
yuexiaoguang@vortexinfo.cn
5ea12dcb5c57c894257613f920b9495dc3591e7f
761a37d6d23030785a97d7e7a479c85c54b1bc75
/src/mojang/or.java
839216bf184d392a07dea1d4819cc82fa5a77324
[]
no_license
Lyx52/minecraft-1-2-5-decompiled
35ae210920d92dd6087facf90ef32edb70bda1fd
091efe0c238eaec6c7ab626dc2e98da0776837fb
refs/heads/master
2023-04-04T23:04:18.475541
2021-04-02T17:29:45
2021-04-02T17:29:45
354,087,923
0
0
null
null
null
null
UTF-8
Java
false
false
7,030
java
package mojang; import java.util.Random; import org.lwjgl.opengl.GL11; public class or extends fe { public static oq c; private static int i = 0; protected aks d; public or() { super(new aks(0.0F), 0.5F); this.d = (aks)this.a; this.a(this.a); } protected void a(oq var1, float var2, float var3, float var4) { float var5 = (float)var1.a(7, var4)[0]; float var6 = (float)(var1.a(5, var4)[1] - var1.a(10, var4)[1]); GL11.glRotatef(-var5, 0.0F, 1.0F, 0.0F); GL11.glRotatef(var6 * 10.0F, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0.0F, 0.0F, 1.0F); if(var1.bD > 0) { float var7 = ((float)var1.bD + var4 - 1.0F) / 20.0F * 1.6F; var7 = gk.c(var7); if(var7 > 1.0F) { var7 = 1.0F; } GL11.glRotatef(var7 * this.a(var1), 0.0F, 0.0F, 1.0F); } } protected void a(oq var1, float var2, float var3, float var4, float var5, float var6, float var7) { if(var1.ay > 0) { float var8 = (float)var1.ay / 200.0F; GL11.glDepthFunc(515); GL11.glEnable(3008); GL11.glAlphaFunc(516, var8); this.a(var1.Z, "/mojang/mob/enderdragon/shuffle.png"); this.a.a(var1, var2, var3, var4, var5, var6, var7); GL11.glAlphaFunc(516, 0.1F); GL11.glDepthFunc(514); } this.a(var1.Z, var1.v_()); this.a.a(var1, var2, var3, var4, var5, var6, var7); if(var1.bA > 0) { GL11.glDepthFunc(514); GL11.glDisable(3553); GL11.glEnable(3042); GL11.glBlendFunc(770, 771); GL11.glColor4f(1.0F, 0.0F, 0.0F, 0.5F); this.a.a(var1, var2, var3, var4, var5, var6, var7); GL11.glEnable(3553); GL11.glDisable(3042); GL11.glDepthFunc(515); } } public void a(oq var1, double var2, double var4, double var6, float var8, float var9) { c = var1; if(i != 4) { this.a = new aks(0.0F); i = 4; } super.a((acq)var1, var2, var4, var6, var8, var9); if(var1.az != null) { float var10 = (float)var1.az.a + var9; float var11 = gk.a(var10 * 0.2F) / 2.0F + 0.5F; var11 = (var11 * var11 + var11) * 0.2F; float var12 = (float)(var1.az.o - var1.o - (var1.l - var1.o) * (double)(1.0F - var9)); float var13 = (float)((double)var11 + var1.az.p - 1.0D - var1.p - (var1.m - var1.p) * (double)(1.0F - var9)); float var14 = (float)(var1.az.q - var1.q - (var1.n - var1.q) * (double)(1.0F - var9)); float var15 = gk.c(var12 * var12 + var14 * var14); float var16 = gk.c(var12 * var12 + var13 * var13 + var14 * var14); GL11.glPushMatrix(); GL11.glTranslatef((float)var2, (float)var4 + 2.0F, (float)var6); GL11.glRotatef((float)(-Math.atan2((double)var14, (double)var12)) * 180.0F / 3.1415927F - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef((float)(-Math.atan2((double)var15, (double)var13)) * 180.0F / 3.1415927F - 90.0F, 1.0F, 0.0F, 0.0F); adz var17 = adz.a; tf.a(); GL11.glDisable(2884); this.a("/mojang/mob/enderdragon/beam.png"); GL11.glShadeModel(7425); float var18 = 0.0F - ((float)var1.V + var9) * 0.01F; float var19 = gk.c(var12 * var12 + var13 * var13 + var14 * var14) / 32.0F - ((float)var1.V + var9) * 0.01F; var17.a(5); byte var20 = 8; for(int var21 = 0; var21 <= var20; ++var21) { float var22 = gk.a((float)(var21 % var20) * 3.1415927F * 2.0F / (float)var20) * 0.75F; float var23 = gk.b((float)(var21 % var20) * 3.1415927F * 2.0F / (float)var20) * 0.75F; float var24 = (float)(var21 % var20) * 1.0F / (float)var20; var17.c(0); var17.a((double)(var22 * 0.2F), (double)(var23 * 0.2F), 0.0D, (double)var24, (double)var19); var17.c(16777215); var17.a((double)var22, (double)var23, (double)var16, (double)var24, (double)var18); } var17.a(); GL11.glEnable(2884); GL11.glShadeModel(7424); tf.b(); GL11.glPopMatrix(); } } protected void a(oq var1, float var2) { super.b(var1, var2); adz var3 = adz.a; if(var1.ay > 0) { tf.a(); float var4 = ((float)var1.ay + var2) / 200.0F; float var5 = 0.0F; if(var4 > 0.8F) { var5 = (var4 - 0.8F) / 0.2F; } Random var6 = new Random(432L); GL11.glDisable(3553); GL11.glShadeModel(7425); GL11.glEnable(3042); GL11.glBlendFunc(770, 1); GL11.glDisable(3008); GL11.glEnable(2884); GL11.glDepthMask(false); GL11.glPushMatrix(); GL11.glTranslatef(0.0F, -1.0F, -2.0F); for(int var7 = 0; (float)var7 < (var4 + var4 * var4) / 2.0F * 60.0F; ++var7) { GL11.glRotatef(var6.nextFloat() * 360.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(var6.nextFloat() * 360.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(var6.nextFloat() * 360.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(var6.nextFloat() * 360.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(var6.nextFloat() * 360.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(var6.nextFloat() * 360.0F + var4 * 90.0F, 0.0F, 0.0F, 1.0F); var3.a(6); float var8 = var6.nextFloat() * 20.0F + 5.0F + var5 * 10.0F; float var9 = var6.nextFloat() * 2.0F + 1.0F + var5 * 2.0F; var3.a(16777215, (int)(255.0F * (1.0F - var5))); var3.a(0.0D, 0.0D, 0.0D); var3.a(16711935, 0); var3.a(-0.866D * (double)var9, (double)var8, (double)(-0.5F * var9)); var3.a(0.866D * (double)var9, (double)var8, (double)(-0.5F * var9)); var3.a(0.0D, (double)var8, (double)(1.0F * var9)); var3.a(-0.866D * (double)var9, (double)var8, (double)(-0.5F * var9)); var3.a(); } GL11.glPopMatrix(); GL11.glDepthMask(true); GL11.glDisable(2884); GL11.glDisable(3042); GL11.glShadeModel(7424); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glEnable(3553); GL11.glEnable(3008); tf.b(); } } protected int a(oq var1, int var2, float var3) { if(var2 == 1) { GL11.glDepthFunc(515); } if(var2 != 0) { return -1; } else { this.a("/mojang/mob/enderdragon/ender_eyes.png"); float var4 = 1.0F; GL11.glEnable(3042); GL11.glDisable(3008); GL11.glBlendFunc(1, 1); GL11.glDisable(2896); GL11.glDepthFunc(514); char var5 = '\uf0f0'; int var6 = var5 % 65536; int var7 = var5 / 65536; es.a(es.b, (float)var6 / 1.0F, (float)var7 / 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glEnable(2896); GL11.glColor4f(1.0F, 1.0F, 1.0F, var4); return 1; } } }
[ "lyxikars123@gmail.com" ]
lyxikars123@gmail.com
5c096bcc6ef4f09ebad82f18a400ca51ca684fb6
6288a747c20179cd957be33dd087f26dea1edbf2
/contrib-jam/src/main/java/net/mostlyoriginal/api/system/render/LabelRenderSystem.java
1d5dbdea9dac47d792d8837fbb599c0fd458e0df
[ "Apache-2.0", "MIT" ]
permissive
ThaBalla1148/artemis-odb-contrib
7d18cf4cc7d72203c34d9f9a616e06489ad9f5a5
6edce7f69942e8c492c772f0c0dea2bbc7979b46
refs/heads/master
2021-01-18T00:27:17.230348
2016-05-18T09:33:08
2016-05-18T09:33:08
59,083,709
0
0
null
2016-05-18T23:31:32
2016-05-18T05:09:20
Java
UTF-8
Java
false
false
2,595
java
package net.mostlyoriginal.api.system.render; /** * @author Daan van Yperen */ import com.artemis.Aspect; import com.artemis.annotations.Wire; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.GlyphLayout; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import net.mostlyoriginal.api.component.basic.Pos; import net.mostlyoriginal.api.component.graphics.Invisible; import net.mostlyoriginal.api.component.graphics.Renderable; import net.mostlyoriginal.api.component.graphics.Tint; import net.mostlyoriginal.api.component.ui.BitmapFontAsset; import net.mostlyoriginal.api.component.ui.Label; import net.mostlyoriginal.api.plugin.extendedcomponentmapper.M; import net.mostlyoriginal.api.system.camera.CameraSystem; import net.mostlyoriginal.api.system.delegate.DeferredEntityProcessingSystem; import net.mostlyoriginal.api.system.delegate.EntityProcessPrincipal; /** * Basic label renderer. * * @author Daan van Yperen * @see Label */ @Wire public class LabelRenderSystem extends DeferredEntityProcessingSystem { protected M<Pos> mPos; protected M<Label> mLabel; protected M<Tint> mTint; protected M<BitmapFontAsset> mBitmapFontAsset; protected CameraSystem cameraSystem; protected SpriteBatch batch; private GlyphLayout glyphLayout = new GlyphLayout(); public LabelRenderSystem(EntityProcessPrincipal principal) { super(Aspect.all(Pos.class, Label.class, Renderable.class, BitmapFontAsset.class).exclude(Invisible.class), principal); batch = new SpriteBatch(1000); } @Override protected void begin() { batch.setProjectionMatrix(cameraSystem.camera.combined); batch.begin(); batch.setColor(1f, 1f, 1f, 1f); } @Override protected void end() { batch.end(); } @Override protected boolean checkProcessing() { return true; } protected void process(final int e) { final Label label = mLabel.get(e); final Pos pos = mPos.get(e); if (label.text != null) { final BitmapFont font = mBitmapFontAsset.get(e).bitmapFont; batch.setColor(mTint.getSafe(e, Tint.WHITE).color); switch ( label.align ) { case LEFT: font.draw(batch, label.text, pos.xy.x, pos.xy.y); break; case RIGHT: glyphLayout.setText(font,label.text); font.draw(batch, label.text, pos.xy.x - glyphLayout.width, pos.xy.y); break; } } } }
[ "daan@mostlyoriginal.net" ]
daan@mostlyoriginal.net
c26bf9eaf515d76b8755cb0c1c5a54df8bef5fc9
066c3640aa155279b0b259f12f8fd926b8e9e72a
/emms_GXDD/src/com/knight/emms/dao/EquipMaintDao.java
8d873a3a499c028048164cb1849b99840cb52e6c
[]
no_license
zjt0428/emms_GXDD
3eebe850533357e7e43858120cfa58a55d797f7c
9dd7af521efa613c9bba3ce8f7e1c706d8b94a50
refs/heads/master
2020-09-13T18:09:00.499402
2019-11-20T07:56:23
2019-11-20T07:56:23
222,864,042
0
0
null
null
null
null
UTF-8
Java
false
false
696
java
/** *==================================================== * 文件名称: EquipMaintDao.java * 修订记录: * No 日期 作者(操作:具体内容) * 1. 2013-7-14 chenxy(创建:创建文件) *==================================================== * 类描述:(说明未实现或其它不应生成javadoc的内容) */ package com.knight.emms.dao; import com.knight.emms.core.dao.BaseBusinessModelDao; import com.knight.emms.model.EquipMaint; /** * @ClassName: EquipMaintDao * @Description: TODO(这里用一句话描述这个类的作用) * @author chenxy * @date 2013-7-14 下午1:22:02 */ public interface EquipMaintDao extends BaseBusinessModelDao<EquipMaint> { }
[ "3555673863@qq.com" ]
3555673863@qq.com
08ef2c1c5a5c9594d8c601d8fd6a64fd1f38d2d8
ae9efe033a18c3d4a0915bceda7be2b3b00ae571
/jambeth/jambeth-persistence-api/src/main/java/com/koch/ambeth/persistence/api/ICursor.java
ab4b3ade62b92aa41ac1a8eb54731f335d4cba35
[ "Apache-2.0" ]
permissive
Dennis-Koch/ambeth
0902d321ccd15f6dc62ebb5e245e18187b913165
8552b210b8b37d3d8f66bdac2e094bf23c8b5fda
refs/heads/develop
2022-11-10T00:40:00.744551
2017-10-27T05:35:20
2017-10-27T05:35:20
88,013,592
0
4
Apache-2.0
2022-09-22T18:02:18
2017-04-12T05:36:00
Java
UTF-8
Java
false
false
979
java
package com.koch.ambeth.persistence.api; /*- * #%L * jambeth-persistence-api * %% * Copyright (C) 2017 Koch Softwaredevelopment * %% * 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. * #L% */ import com.koch.ambeth.util.IDisposable; public interface ICursor extends IDisposable, Iterable<ICursorItem> { IFieldMetaData[] getFields(); IFieldMetaData getFieldByMemberName(String memberName); int getFieldIndexByMemberName(String memberName); int getFieldIndexByName(String fieldName); }
[ "dennis.koch@bruker.com" ]
dennis.koch@bruker.com
6159d57a773df7f62da8471426ce10d07df07d4c
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/31_xisemele-net.sf.xisemele.impl.ResultImpl-1.0-6/net/sf/xisemele/impl/ResultImpl_ESTest_scaffolding.java
f2a6339053a8a27a243174ec7dca02ff3b04cc1b
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
537
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 19:32:53 GMT 2019 */ package net.sf.xisemele.impl; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class ResultImpl_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
94a78cf2a154227e5222d1386d76b886fa5a5f6f
f0568343ecd32379a6a2d598bda93fa419847584
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201308/ProposalActionError.java
1e4947f35e76fca393d618f2ea3bc94d391e1a7d
[ "Apache-2.0" ]
permissive
frankzwang/googleads-java-lib
bd098b7b61622bd50352ccca815c4de15c45a545
0cf942d2558754589a12b4d9daa5902d7499e43f
refs/heads/master
2021-01-20T23:20:53.380875
2014-07-02T19:14:30
2014-07-02T19:14:30
21,526,492
1
0
null
null
null
null
UTF-8
Java
false
false
1,661
java
package com.google.api.ads.dfp.jaxws.v201308; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * Lists all errors associated with performing actions on {@link Proposal} objects. * * * <p>Java class for ProposalActionError complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ProposalActionError"> * &lt;complexContent> * &lt;extension base="{https://www.google.com/apis/ads/publisher/v201308}ApiError"> * &lt;sequence> * &lt;element name="reason" type="{https://www.google.com/apis/ads/publisher/v201308}ProposalActionError.Reason" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ProposalActionError", propOrder = { "reason" }) public class ProposalActionError extends ApiError { protected ProposalActionErrorReason reason; /** * Gets the value of the reason property. * * @return * possible object is * {@link ProposalActionErrorReason } * */ public ProposalActionErrorReason getReason() { return reason; } /** * Sets the value of the reason property. * * @param value * allowed object is * {@link ProposalActionErrorReason } * */ public void setReason(ProposalActionErrorReason value) { this.reason = value; } }
[ "jradcliff@google.com" ]
jradcliff@google.com
96fcd460a105ddc91559921720571fc0d8febdf5
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/alipay/mobile/beehive/photo/view/CustomImageView.java
0654b5dbbcdd35d2d64c9b45fa4b57cc670fa776
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,329
java
package com.alipay.mobile.beehive.photo.view; import android.content.Context; import android.graphics.PorterDuff.Mode; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View.MeasureSpec; import android.view.ViewConfiguration; import android.widget.ImageView; import com.alipay.mobile.beehive.R; import com.alipay.mobile.beehive.service.PhotoInfo; public class CustomImageView extends ImageView { private float heightPercentage2Width = 0.0f; private a mPendingCheckForTap = null; private b mUnsetPressedState; private String picture; private String video; private final class a implements Runnable { private a() { } /* synthetic */ a(CustomImageView x0, byte b) { this(); } public final void run() { Drawable drawable = CustomImageView.this.getDrawable(); if (drawable != null) { drawable.mutate().setColorFilter(-7829368, Mode.MULTIPLY); } } } private final class b implements Runnable { private b() { } /* synthetic */ b(CustomImageView x0, byte b) { this(); } public final void run() { Drawable drawableUp = CustomImageView.this.getDrawable(); if (drawableUp != null) { drawableUp.mutate().clearColorFilter(); } } } public CustomImageView(Context context, AttributeSet attrs) { super(context, attrs); init(context); } public CustomImageView(Context context) { super(context); init(context); } private void init(Context context) { this.picture = context.getString(R.string.talkback_picture); this.video = context.getString(R.string.talkback_video); setContentDescription(this.picture); } /* access modifiers changed from: protected */ public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); int measuredWidth = MeasureSpec.getSize(widthMeasureSpec); if (Float.compare(this.heightPercentage2Width, 0.0f) > 0) { setMeasuredDimension(measuredWidth, (int) (((float) measuredWidth) * this.heightPercentage2Width)); } } public void setHeightPercentage2Width(float heightPercentage2Width2) { this.heightPercentage2Width = heightPercentage2Width2; } public boolean onTouchEvent(MotionEvent event) { boolean bool = super.onTouchEvent(event); switch (event.getAction()) { case 0: if (this.mPendingCheckForTap == null) { this.mPendingCheckForTap = new a(this, 0); } postDelayed(this.mPendingCheckForTap, (long) ViewConfiguration.getTapTimeout()); break; case 1: case 3: removeTapCallback(); if (this.mUnsetPressedState == null) { this.mUnsetPressedState = new b(this, 0); } if (!isPressed()) { this.mUnsetPressedState.run(); break; } else { Drawable drawable = getDrawable(); if (drawable != null) { drawable.mutate().setColorFilter(-7829368, Mode.MULTIPLY); } postDelayed(this.mUnsetPressedState, (long) ViewConfiguration.getPressedStateDuration()); break; } case 2: removeTapCallback(); break; } return bool; } private void removeTapCallback() { if (this.mPendingCheckForTap != null) { removeCallbacks(this.mPendingCheckForTap); } } public void setCustomTalkback(PhotoInfo photoInfo) { switch (photoInfo.getMediaType()) { case 0: setContentDescription(this.picture); return; case 1: setContentDescription(this.video); return; default: setContentDescription(this.picture); return; } } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
9c19b322038eaed23eff3cae902a609f266c1493
91d407de3bc285b76ba73b1dc6f27f08bc12e44a
/src/core/Cell.java
608a7f7d2bfe66e58efcfaedc597e0385530919e
[ "MIT" ]
permissive
KonradMagiera/Wireworld
6add1a5ef760295bd84d4551f4a8236219b4fc84
8d12b1f76f455a1789b8f68545c3268bbc9936e5
refs/heads/master
2020-03-18T18:10:05.495223
2018-06-03T09:53:17
2018-06-03T09:53:17
135,075,096
0
0
MIT
2018-06-03T09:53:18
2018-05-27T19:23:00
Java
UTF-8
Java
false
false
2,425
java
package core; import userinterface.controllers.GameGrid; public class Cell { private CellType type; private CellType nextType; private int x; private int y; public Cell(int x, int y){ setType(CellType.EMPTY); setCellCoordinate(x, y); } public Cell(GameGrid.Tile tile){ setType(tile.getState()); setCellCoordinate(tile.getX(), tile.getY()); } public Cell(int x, int y, CellType type){ setType(type); setCellCoordinate(x, y); } private void setType(CellType type) throws IllegalStateException { if(type == CellType.EMPTY || type == CellType.CONDUCTOR || type == CellType.HEAD || type == CellType.TAIL) this.type = type; else throw new IllegalStateException("Incorrect cell type."); } public int getX(){ return this.x;} public int getY(){ return this.y;} public CellType getType() { return type; } public CellType getNextType() { return nextType; } public void changeToEmpty(){ this.nextType = CellType.EMPTY; } public void changeToConductor(){ this.nextType = CellType.CONDUCTOR; } public void changeToTail(){ this.nextType = CellType.TAIL; } public void changeToHead(){ this.nextType = CellType.HEAD; } public void changeType(){ this.type = nextType; } public boolean isEmpty(){ if( this.type == CellType.EMPTY ) return true; else return false; } public void setCellCoordinate(int x, int y) throws NegativeArraySizeException{ if( x < 0 || y < 0) throw new NegativeArraySizeException("Cell's coordinates mustn't be negative numbers."); this.x = x; this.y = y; } public int isHead(){ // method returns 1 if true and 0 if false // it's int method not boolean in order to provide more convenient way of calculating neighbours if(type == CellType.HEAD) return 1; else return 0; } @Override public String toString(){ // (x,y)[type] StringBuilder sb = new StringBuilder(""); sb.append("(").append(getX()) .append(",") .append(getY()).append(")[") .append(this.type).append("]"); return sb.toString(); } }
[ "you@example.com" ]
you@example.com
f6093a578b6543b5a73a456554f76556da1483dd
958b13739d7da564749737cb848200da5bd476eb
/src/main/java/com/alipay/api/response/AlipaySocialAntforestAccountTransferResponse.java
b5a833d1acb930d7501fd2b088e0b35639a82562
[ "Apache-2.0" ]
permissive
anywhere/alipay-sdk-java-all
0a181c934ca84654d6d2f25f199bf4215c167bd2
649e6ff0633ebfca93a071ff575bacad4311cdd4
refs/heads/master
2023-02-13T02:09:28.859092
2021-01-14T03:17:27
2021-01-14T03:17:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,483
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.social.antforest.account.transfer response. * * @author auto create * @since 1.0, 2020-09-14 10:57:26 */ public class AlipaySocialAntforestAccountTransferResponse extends AlipayResponse { private static final long serialVersionUID = 1395667193624399215L; /** * 业务完成的时间,即单据的流水号生成时间,业务方可与transfer_id一同存储,后续账账核对的时候可以用于解决跨天问题 */ @ApiField("biz_time") private String bizTime; /** * 转账之后用户现有账户的剩余可用能量 */ @ApiField("current_energy") private Long currentEnergy; /** * 用于表示用户一次转账的相关单据号,可通过该单据进行能量账户的退款操作(逆向转移),可能会需要下游进行存储 */ @ApiField("transfer_id") private String transferId; public void setBizTime(String bizTime) { this.bizTime = bizTime; } public String getBizTime( ) { return this.bizTime; } public void setCurrentEnergy(Long currentEnergy) { this.currentEnergy = currentEnergy; } public Long getCurrentEnergy( ) { return this.currentEnergy; } public void setTransferId(String transferId) { this.transferId = transferId; } public String getTransferId( ) { return this.transferId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
7105a9b2edca97dc0715abb69086f087f90be563
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_f5ca9e820ce984038bad57f4ec206c14ce91c36c/JiraProjectProperty/11_f5ca9e820ce984038bad57f4ec206c14ce91c36c_JiraProjectProperty_s.java
9640031223ee1248f6d2af075f9b7ac8b213e546
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,618
java
package hudson.plugins.jira; import hudson.Util; import hudson.model.AbstractProject; import hudson.model.Job; import hudson.model.JobProperty; import hudson.model.JobPropertyDescriptor; import hudson.util.CopyOnWriteList; import hudson.util.FormFieldValidator; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import javax.servlet.ServletException; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; /** * Associates {@link AbstractProject} with {@link JiraSite}. * * @author Kohsuke Kawaguchi */ public class JiraProjectProperty extends JobProperty<AbstractProject<?,?>> { /** * Used to find {@link JiraSite}. Matches {@link JiraSite#getName()}. * Always non-null (but beware that this value might become stale * if the system config is changed.) */ public final String siteName; /** * @stapler-constructor */ public JiraProjectProperty(String siteName) { if(siteName==null) { // defaults to the first one JiraSite[] sites = DESCRIPTOR.getSites(); if(sites.length>0) siteName = sites[0].getName(); } this.siteName = siteName; } /** * Gets the {@link JiraSite} that this project belongs to. * * @return * null if the configuration becomes out of sync. */ public JiraSite getSite() { JiraSite[] sites = DESCRIPTOR.getSites(); if(siteName==null && sites.length>0) // default return sites[0]; for( JiraSite site : sites ) { if(site.getName().equals(siteName)) return site; } return null; } public DescriptorImpl getDescriptor() { return DESCRIPTOR; } public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl(); public static final class DescriptorImpl extends JobPropertyDescriptor { private final CopyOnWriteList<JiraSite> sites = new CopyOnWriteList<JiraSite>(); public DescriptorImpl() { super(JiraProjectProperty.class); load(); } public boolean isApplicable(Class<? extends Job> jobType) { return AbstractProject.class.isAssignableFrom(jobType); } public String getDisplayName() { return "Associated JIRA"; } public JiraSite[] getSites() { return sites.toArray(new JiraSite[0]); } public JobProperty<?> newInstance(StaplerRequest req) throws FormException { JiraProjectProperty jpp = req.bindParameters(JiraProjectProperty.class, "jira."); if(jpp.siteName==null) jpp = null; // not configured return jpp; } public boolean configure(StaplerRequest req) { sites.replaceBy(req.bindParametersToList(JiraSite.class,"jira.")); save(); return true; } /** * Checks if the JIRA URL is accessible and exists. */ public void doURLCheck(final StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { // this can be used to check existence of any file in any URL, so admin only new FormFieldValidator(req,rsp,true) { protected void check() throws IOException, ServletException { String url = Util.fixEmpty(request.getParameter("value")); if(url==null) { error("JIRA URL is a mandatory field"); return; } try { BufferedReader in = new BufferedReader(new InputStreamReader(new URL(url).openStream(),"UTF-8")); String line; while((line=in.readLine())!=null) { if(line.indexOf("Atlassian JIRA")!=-1) { ok(); // looks like it return; } } error("This is a valid URL but it doesn't look like JIRA"); } catch (IOException e) { // any invalid URL comes here error(e.getMessage()); } } }.process(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9d2bf285948cd2e1ef00b8b4f4ccefdd4721144a
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/defpackage/dwt.java
c988702d055aa90aee82b231c3c9e54b0fec21e5
[ "BSD-3-Clause" ]
permissive
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,316
java
package defpackage; import android.support.annotation.Nullable; import android.text.TextUtils; import com.autonavi.bundle.routecommon.entity.BusPath; import com.autonavi.bundle.routecommon.entity.BusPathSection; import com.autonavi.bundle.routecommon.entity.IBusRouteResult; import com.autonavi.minimap.route.bus.model.Bus; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; /* renamed from: dwt reason: default package */ /* compiled from: AlterRouteDataProcessor */ public final class dwt { public static boolean a(IBusRouteResult iBusRouteResult, dwy dwy) { if (iBusRouteResult.getFocusBusPath() == null || iBusRouteResult.getFromPOI() == null || iBusRouteResult.getFromPOI().getPoint() == null || dwy == null) { return false; } BusPath busPathWithIndex = iBusRouteResult.getBusPathWithIndex(dwy.a); if (busPathWithIndex == null || busPathWithIndex.mPathSections == null || busPathWithIndex.mPathSections.length <= 0 || dwy.b >= busPathWithIndex.mPathSections.length) { return false; } BusPathSection busPathSection = busPathWithIndex.mPathSections[dwy.b]; ArrayList arrayList = new ArrayList(); arrayList.add(busPathSection); if (busPathSection.alter_list != null) { Collections.addAll(arrayList, busPathSection.alter_list); } if (arrayList.size() == 0 || dwy.c >= arrayList.size()) { return false; } BusPathSection busPathSection2 = (BusPathSection) arrayList.get(dwy.c); if (!TextUtils.isEmpty(dwy.d)) { dvy dvy = new dvy(); try { dvy.parser(dwy.d.getBytes()); a(dvy, busPathSection2); } catch (Exception e) { e.printStackTrace(); } } BusPathSection a = a(busPathSection, busPathSection2); if (a == null) { return false; } busPathWithIndex.mPathSections[dwy.b] = a; return true; } private static void a(dvy dvy, BusPathSection busPathSection) { if (dvy.errorCode != 1 || dvy.a == null || busPathSection == null) { dvy.b = null; return; } Bus bus = dvy.a; busPathSection.mXs = bus.coordX; busPathSection.mYs = bus.coordY; for (int i = 0; i < busPathSection.mStations.length; i++) { busPathSection.mStations[i].mX = bus.stationX[i]; busPathSection.mStations[i].mY = bus.stationY[i]; busPathSection.mStations[i].mName = bus.stations[i]; busPathSection.mStations[i].mStationdirection = bus.stationdirection[i]; } busPathSection.mEta = bus.eta; busPathSection.intervalDesc = bus.interval; busPathSection.mRouteColor = bus.color; busPathSection.irregulartime = bus.irregulartime; busPathSection.isNeedRequest = false; if (dvy.b != null) { busPathSection.mBusData = Arrays.copyOf(dvy.b, dvy.b.length); } dvy.b = null; } @Nullable private static BusPathSection a(BusPathSection busPathSection, BusPathSection busPathSection2) { if (busPathSection2 == null || busPathSection == null || TextUtils.equals(busPathSection2.bus_id, busPathSection.bus_id) || busPathSection.alter_list == null) { return null; } int i = 0; while (true) { if (i >= busPathSection.alter_list.length) { busPathSection2 = null; i = -1; break; } else if (TextUtils.equals(busPathSection2.bus_id, busPathSection.alter_list[i].bus_id)) { break; } else { i++; } } if (i == -1) { return null; } busPathSection2.alter_list = busPathSection.alter_list; busPathSection2.walk_path = busPathSection.walk_path; busPathSection2.tripList = busPathSection.tripList; busPathSection2.isRidePath = busPathSection.isRidePath; busPathSection.alter_list = null; busPathSection.walk_path = null; busPathSection.tripList = null; busPathSection2.alter_list[i] = busPathSection; return busPathSection2; } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
bb7da209e21f28f7cd0c1c565c7950006b95cca9
6883c29eb5ecb12a6b34fc0ef13003194859a7bc
/app/src/main/java/com/hjq/demo/ui/activity/BrowserActivity.java
a44c2e89601a8422dd619056687346e50db8ed96
[ "Apache-2.0" ]
permissive
mengbixiusi/AndroidProject
516333c2d3b4e3b74f4ba2c021576858321fbfe1
12cfc897bf519c9342fd3c47182ed8c557b664f5
refs/heads/master
2020-07-22T15:13:41.534541
2020-06-24T14:09:47
2020-06-24T14:09:47
244,272,185
0
0
Apache-2.0
2020-03-02T03:32:56
2020-03-02T03:32:56
null
UTF-8
Java
false
false
4,998
java
package com.hjq.demo.ui.activity; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.view.KeyEvent; import android.view.View; import android.webkit.WebView; import android.widget.ProgressBar; import androidx.annotation.NonNull; import com.hjq.demo.R; import com.hjq.demo.action.StatusAction; import com.hjq.demo.aop.CheckNet; import com.hjq.demo.aop.DebugLog; import com.hjq.demo.aop.SingleClick; import com.hjq.demo.common.MyActivity; import com.hjq.demo.other.IntentKey; import com.hjq.demo.widget.BrowserView; import com.hjq.demo.widget.HintLayout; import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.api.RefreshLayout; import com.scwang.smartrefresh.layout.listener.OnRefreshListener; import butterknife.BindView; /** * author : Android 轮子哥 * github : https://github.com/getActivity/AndroidProject * time : 2018/10/18 * desc : 浏览器界面 */ public final class BrowserActivity extends MyActivity implements StatusAction, OnRefreshListener { @CheckNet @DebugLog public static void start(Context context, String url) { if (url == null || "".equals(url)) { return; } Intent intent = new Intent(context, BrowserActivity.class); intent.putExtra(IntentKey.URL, url); context.startActivity(intent); } @BindView(R.id.hl_browser_hint) HintLayout mHintLayout; @BindView(R.id.pb_browser_progress) ProgressBar mProgressBar; @BindView(R.id.sl_browser_refresh) SmartRefreshLayout mRefreshLayout; @BindView(R.id.wv_browser_view) BrowserView mBrowserView; @Override protected int getLayoutId() { return R.layout.activity_browser; } @Override protected void initView() { // 设置网页刷新监听 mRefreshLayout.setOnRefreshListener(this); } @Override protected void initData() { showLoading(); mBrowserView.setBrowserViewClient(new MyBrowserViewClient()); mBrowserView.setBrowserChromeClient(new MyBrowserChromeClient(mBrowserView)); String url = getString(IntentKey.URL); mBrowserView.loadUrl(url); } @Override public HintLayout getHintLayout() { return mHintLayout; } @Override public void onLeftClick(View v) { finish(); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && mBrowserView.canGoBack()) { // 后退网页并且拦截该事件 mBrowserView.goBack(); return true; } return super.onKeyDown(keyCode, event); } @Override protected void onResume() { mBrowserView.onResume(); super.onResume(); } @Override protected void onPause() { mBrowserView.onPause(); super.onPause(); } @Override protected void onDestroy() { mBrowserView.onDestroy(); super.onDestroy(); } /** * 重新加载当前页 */ @SingleClick @CheckNet private void reload() { mBrowserView.reload(); } /** * {@link OnRefreshListener} */ @Override public void onRefresh(@NonNull RefreshLayout refreshLayout) { mBrowserView.reload(); } private class MyBrowserViewClient extends BrowserView.BrowserViewClient { /** * 网页加载错误时回调,这个方法会在 onPageFinished 之前调用 */ @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // 这里为什么要用延迟呢?因为加载出错之后会先调用 onReceivedError 再调用 onPageFinished post(() -> showError(v -> reload())); } /** * 开始加载网页 */ @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { mProgressBar.setVisibility(View.VISIBLE); } /** * 完成加载网页 */ @Override public void onPageFinished(WebView view, String url) { mProgressBar.setVisibility(View.GONE); mRefreshLayout.finishRefresh(); showComplete(); } } private class MyBrowserChromeClient extends BrowserView.BrowserChromeClient { private MyBrowserChromeClient(BrowserView view) { super(view); } /** * 收到网页标题 */ @Override public void onReceivedTitle(WebView view, String title) { if (title != null) { setTitle(title); } } /** * 收到加载进度变化 */ @Override public void onProgressChanged(WebView view, int newProgress) { mProgressBar.setProgress(newProgress); } } }
[ "jinqun0730@gmail.com" ]
jinqun0730@gmail.com
6449b379294254ccc8320e858d63a61c4d995484
447520f40e82a060368a0802a391697bc00be96f
/apks/comparison_androart/at_spardat_bcrmobile/source/com/google/android/gms/internal/ac.java
24c028672aace3f4750ad3c15d5c339dc038386f
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
2,281
java
package com.google.android.gms.internal; import android.annotation.TargetApi; import android.app.AppOpsManager; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.Build.VERSION; public final class ac { protected final Context a; public ac(Context paramContext) { this.a = paramContext; } public final int a(String paramString) { return this.a.checkCallingOrSelfPermission(paramString); } public final int a(String paramString1, String paramString2) { return this.a.getPackageManager().checkPermission(paramString1, paramString2); } public final ApplicationInfo a(String paramString, int paramInt) { return this.a.getPackageManager().getApplicationInfo(paramString, paramInt); } @TargetApi(19) public final boolean a(int paramInt, String paramString) { boolean bool2 = false; int i; if (Build.VERSION.SDK_INT >= 19) { i = 1; if (i == 0) { break label45; } } for (;;) { label45: try { ((AppOpsManager)this.a.getSystemService("appops")).checkPackage(paramInt, paramString); bool1 = true; return bool1; } catch (SecurityException paramString) {} i = 0; break; String[] arrayOfString = this.a.getPackageManager().getPackagesForUid(paramInt); boolean bool1 = bool2; if (paramString != null) { bool1 = bool2; if (arrayOfString != null) { paramInt = 0; for (;;) { bool1 = bool2; if (paramInt >= arrayOfString.length) { break; } if (paramString.equals(arrayOfString[paramInt])) { return true; } paramInt += 1; } } } } return false; } public final PackageInfo b(String paramString, int paramInt) { return this.a.getPackageManager().getPackageInfo(paramString, paramInt); } public final CharSequence b(String paramString) { return this.a.getPackageManager().getApplicationLabel(this.a.getPackageManager().getApplicationInfo(paramString, 0)); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
79b0bc0b20a72c3963f2643f4a8fc41cd80112f4
39e51b5744320acb77d26bf6e65ec6b75c838233
/web02t/src/main/java/spms/services/FeedServiceImpl.java
e7a5df66b6d6043c7ec4f0cdf117a24974e853c2
[]
no_license
eomjinyoung/Java46
69c3e4cf7338e1f493b8ed5ad4aaa57dcf0b90df
3754baf1158960987bf0b6c076a4536e275bb930
refs/heads/master
2021-01-20T09:42:04.819505
2014-03-05T02:23:58
2014-03-05T02:23:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package spms.services; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import spms.dao.FeedDao; import spms.vo.AttachFile; import spms.vo.Feed; @Service public class FeedServiceImpl implements FeedService{ @Autowired FeedDao feedDao; @Transactional(readOnly=false,propagation=Propagation.REQUIRED) public void addFeed(Feed feed) throws Exception { feedDao.insert(feed); if (feed.getFiles() != null) { for (AttachFile file : feed.getFiles()) { file.setFeedNo(feed.getNo()); feedDao.insertFile(file); } } } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
6757da5b21675aa91e582d43b4c2cedd9f1b4c6e
37cdf8cf498444eaadb5a989a5df663b06a49520
/com/naikara_talk/dao/SmailAccountHistoryTrnDao.java
84529565a70319f36b236362c578db6dac6ae2f0
[]
no_license
sangjiexun/naikaratalk
d1b8f9e000427f3e03294512d3d15f809088eef1
744145606dd260e05126cda7651b595fe8cff309
refs/heads/master
2020-12-14T20:24:32.209184
2014-09-18T23:46:43
2014-09-18T23:46:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,623
java
package com.naikara_talk.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Calendar; import org.apache.log4j.Logger; import com.naikara_talk.dto.SmailAccountHistoryTrnDto; import com.naikara_talk.exception.NaiException; import com.naikara_talk.util.NaikaraTalkConstants; /** * <b>システム名称  :</b>NAIKARA Talkシステム<br> * <b>サブシステム名称:</b>共通部品 DAOクラス<br> * <b>クラス名称   :</b>スクールメール・アカウント変更履歴テーブルデータアクセスクラスクラス<br> * <b>クラス概要   :</b>スクールメール・アカウント変更履歴テーブルの登録を行う<br> * <br> * <b>著作権     :</b>Copyright (C) 2013 NAI, Inc. All rights reserved. * @author TECS * <b>変更履歴    :</b>2013/12/29 TECS 新規作成 */ public class SmailAccountHistoryTrnDao extends AbstractDao { protected Logger log = Logger.getLogger(this.getClass()); // コネクション変数 public Connection conn = null; // コンストラクタ public SmailAccountHistoryTrnDao(Connection con) { this.conn = con; } /** * スクールメール・アカウント変更履歴テーブルのデータ取得<br> * <br> * スクールメール・アカウント変更履歴テーブルの条件に一致する連番の最大値を戻り値で返却する<br> * <br> * @param conditions 検索条件<br> * @param orderConditions 並び順条件<br> * @return int 最大値<br> * @exception NaiException */ public int searchMaxSeq(Timestamp sendDttm) throws NaiException { int rtn = 0; ResultSet res = null; // スクールメール・アカウント変更履歴テーブルの連番の最大値の取得 StringBuffer sb = new StringBuffer(); sb.append(" SELECT "); sb.append(" MAX(SEND_DTTM_SEQ) MAX_SEQ"); // 連番 sb.append(" FROM "); sb.append(" SMAIL_ACCOUNT_HISTORY_TRN "); // スクールメール・アカウント変更履歴テーブル sb.append(" WHERE "); sb.append(" SEND_DTTM = ?"); try { // PreparedStatementの作成 PreparedStatement ps = conn.prepareStatement(sb.toString()); ps.setTimestamp(1, sendDttm); // SQL文の実行 res = ps.executeQuery(); while (res.next()) { rtn = res.getInt("MAX_SEQ"); // 連番の最大値 } // 返却値 return rtn; } catch (SQLException se) { log.info(se); throw new NaiException(se); } finally { try { if (res != null) { res.close(); } } catch (SQLException e) { log.info(e); e.printStackTrace(); throw new NaiException(e); } } } /** * スクールメール・アカウント変更履歴テーブル登録処理<br> * <br> * スクールメール・アカウント変更履歴テーブルの登録を行う<br> * <br> * @param dto 登録データ * @return insertRowCount 登録件数 * @exception NaiException */ public int insert(SmailAccountHistoryTrnDto dto) throws NaiException { Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); int insertRowCount = NaikaraTalkConstants.RETURN_CD_ERR_INS; // 登録データ件数 StringBuffer sb = new StringBuffer(); // データ登録処理 sb.append("insert into "); sb.append(" SMAIL_ACCOUNT_HISTORY_TRN "); sb.append(" ( "); sb.append(" SEND_DTTM "); // 01.送信日時 sb.append(",SEND_DTTM_SEQ "); // 02.連番 sb.append(",MAIL_PATTERN_CD "); // 03.メールパターンコード sb.append(",STUDENT_ID "); // 04.受講者ID sb.append(",RECORD_VER_NO "); // 05.レコードバージョン番号 sb.append(",INSERT_DTTM "); // 06.登録日時 sb.append(",INSERT_CD "); // 07.登録者コード sb.append(",UPDATE_DTTM "); // 08.更新日時 sb.append(",UPDATE_CD "); // 09.更新者コード sb.append(" ) value ( "); sb.append(" ? "); // 01.SEND_DTTM sb.append(",? "); // 02.SEND_DTTM_SEQ sb.append(",? "); // 03.MAIL_PATTERN_CD sb.append(",? "); // 04.STUDENT_ID sb.append(",? "); // 05.RECORD_VER_NO sb.append(",? "); // 06.INSERT_DTTM sb.append(",? "); // 07.INSERT_CD sb.append(",? "); // 08.UPDATE_DTTM sb.append(",? "); // 09.UPDATE_CD sb.append(" ) "); try { PreparedStatement ps = conn.prepareStatement(sb.toString()); ps.setTimestamp(1, dto.getSendDttm()); // 01.送信日時 ps.setInt(2, dto.getSendDttmSeq()); // 02.連番 ps.setString(3, dto.getMailPatternCd()); // 03.メールパターンコード ps.setString(4, dto.getStudentId()); // 04.受講者ID ps.setString(5, String.valueOf(dto.getRecordVerNo())); // 05.レコードバージョン番号 ps.setString(6, String.valueOf(Timestamp.valueOf( sdf.format(cal.getTime())))); // 06.登録日時 ps.setString(7, dto.getInsertCd()); // 07.登録者コード ps.setString(8, String.valueOf(Timestamp.valueOf( sdf.format(cal.getTime())))); // 08.更新日時 ps.setString(9, dto.getUpdateCd()); // 09.更新者コード // 実行 insertRowCount = ps.executeUpdate(); // 返却 return insertRowCount; } catch (SQLException se) { se.printStackTrace(); throw new NaiException(se); } } }
[ "late4@sfc.wide.ad.jp" ]
late4@sfc.wide.ad.jp
c8287538c92448c24623968bd70b8f07c2212225
df134b422960de6fb179f36ca97ab574b0f1d69f
/org/bukkit/craftbukkit/v1_16_R2/block/CraftConduit.java
f164ecfdf7ede61365203f38186bbd4233df4fb6
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
851
java
/* */ package org.bukkit.craftbukkit.v1_16_R2.block; /* */ /* */ import net.minecraft.server.v1_16_R2.TileEntityConduit; /* */ import org.bukkit.Material; /* */ import org.bukkit.block.Block; /* */ import org.bukkit.block.Conduit; /* */ /* */ public class CraftConduit /* */ extends CraftBlockEntityState<TileEntityConduit> implements Conduit { /* */ public CraftConduit(Block block) { /* 11 */ super(block, TileEntityConduit.class); /* */ } /* */ /* */ public CraftConduit(Material material, TileEntityConduit te) { /* 15 */ super(material, te); /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\org\bukkit\craftbukkit\v1_16_R2\block\CraftConduit.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
fba3b52aa349f0c39df5e5d78a80a99636267f52
5d23e7f68eb05a50e6d799189b5b5f7dc3a9624e
/Bid4WinEntity/src/com/bid4win/persistence/entity/locale/html/HtmlPageType.java
ca85926596bf4eb6d3b36c1f40ab74f5774d5d05
[]
no_license
lanaflon-cda2/B4W
37d9f718bb60c1bf20c62e7d0c3e53fbf4a50c95
7ddad31425798cf817c5881dd13de5482431fc7b
refs/heads/master
2021-05-27T05:47:23.132341
2013-10-11T11:51:03
2013-10-11T11:51:03
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
833
java
//package com.bid4win.persistence.entity.locale.html; // //import com.bid4win.commons.persistence.entity.resource.ResourceType; // ///** // * Cette classe défini un type de page HTML<BR> // * <BR> // * @author Emeric Fillâtre // */ //public class HtmlPageType extends ResourceType<HtmlPageType> //{ // /** Determine si un objet dé-sérialisé est compatible avec cette classe. La // * valeur doit être modifiée si une évolution de la classe la rend incompatible // * avec les versions précédentes */ // private static final long serialVersionUID = -4719608238256218803L; // // /** Type HTML */ // public final static HtmlPageType HTML = new HtmlPageType("html"); // // /** // * Constructeur // * @param code Code du type page HTML // */ // private HtmlPageType(String code) // { // super(code); // } //}
[ "emeric.fillatre@gmail.com" ]
emeric.fillatre@gmail.com
f618f738df66fe46e7faf491926a105cce3965e4
43bc71c15ae56de3d99b0404e4f9c6ea95f3fc05
/src/bai_17_io_binary_file_and_serialization/thuc_hanh/copy_cac_file_co_dung_luong_lon/Main.java
ea69c2db97766a56a6dcf854fb8a366772bb06cd
[]
no_license
sontra2611/C0321G1_NguyenDinhSonTra_Module_2
086b2a0f09cf4f66af71edac1e4dffc85f455a6b
5307695c3488933da70ef0da45d5b1b085e63bcd
refs/heads/master
2023-05-10T13:00:27.376323
2021-06-04T08:30:05
2021-06-04T08:30:05
363,975,429
0
0
null
null
null
null
UTF-8
Java
false
false
1,588
java
package bai_17_io_binary_file_and_serialization.thuc_hanh.copy_cac_file_co_dung_luong_lon; import java.io.*; import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.Scanner; public class Main { private static void copyFileUsingJava7Files(File source, File dest) throws IOException { Files.copy(source.toPath(), dest.toPath(), StandardCopyOption.REPLACE_EXISTING); } private static void copyFileUsingStream(File source, File dest) throws IOException { InputStream is = null; OutputStream os = null; try { is = new FileInputStream(source); os = new FileOutputStream(dest); byte[] buffer = new byte[1024]; int length; while ((length = is.read(buffer)) > 0) { os.write(buffer, 0, length); } } finally { is.close(); os.close(); } } public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.printf("Enter source file:"); String sourcePath = in.nextLine(); System.out.printf("Enter destination file:"); String destPath = in.nextLine(); File sourceFile = new File(sourcePath); File destFile = new File(destPath); try { copyFileUsingJava7Files(sourceFile, destFile); System.out.printf("Copy completed"); } catch (IOException ioe) { System.out.printf("Can't copy that file"); System.out.printf(ioe.getMessage()); } } }
[ "sontra9798@gmail.com" ]
sontra9798@gmail.com
6d1d7cd19ddc754255e01c8e161f85d98fb9ee9e
8a4723c8379fb6607e008d2610bce506fcdb3e8b
/src/test/java/redis/clients/collections/RankingStructureDoubleTest.java
71b91f214d8605a66fa07515dcb9d1deac36247f
[ "Apache-2.0" ]
permissive
kedandan/redis-collections
77874a88f78ce77aaab7f2833adb4bdecffdb900
713ba2599aac16b0ff5a0377e44a4ec14cb94c31
refs/heads/master
2021-01-21T20:42:53.107665
2014-07-30T01:30:00
2014-07-30T01:30:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,443
java
package redis.clients.collections; import java.util.List; import junit.framework.Assert; import org.junit.After; import org.junit.Before; import org.junit.Test; import redis.clients.collections.Ranking; import redis.clients.collections.RankingStructure; import redis.clients.collections.ScoresPoint; import redis.clients.collections.builder.RedisStrutureBuilder; import redis.clients.collections.util.RedisConnection; public class RankingStructureDoubleTest { private RankingStructure<Double> laughThings; @Before public void init() { laughThings = RedisStrutureBuilder.ofRanking(RedisConnection.JEDIS).withNameSpace("laughThings").buildDouble(); } @Test public void shouldAddAndRemoveValue() { ScoresPoint<Double> sneeze = laughThings.create("sneeze"); sneeze.increment("Newton", 24.2424242424); sneeze.increment("Erish", 25.9); sneeze.increment("David", 924.786); List<Ranking<Double>> ranking = sneeze.getRanking(); Assert.assertEquals(ranking.get(0).getName(), "David"); Assert.assertEquals(ranking.get(1).getName(), "Erish"); Assert.assertEquals(ranking.get(2).getName(), "Newton"); Assert.assertEquals(ranking.get(0).getPoints(), Double.valueOf(924.786)); Assert.assertEquals(ranking.get(1).getPoints(), Double.valueOf(25.9)); Assert.assertEquals(ranking.get(2).getPoints(), Double.valueOf(24.2424242424)); } @After public void dispose() { laughThings.delete("sneeze"); } }
[ "otaviojava@java.net" ]
otaviojava@java.net
6c4d6143ee8d4eaa1b506f80bb979577c3fa0e6a
019351eb9567fefa8c9c15588899b52edbb68616
/EffectiveJava/src/cn/shyshetxwh/chapter02/Stack.java
e49d39c3ce5aac8c5c333f26f1b7a29ae49f6978
[]
no_license
shyshetxwh/selfstudy
3220bbdee656f659a8890053d12e7a792bc67ad6
9b536e83243214a9ea37ff46a48b72d5d242ef2b
refs/heads/master
2023-04-02T09:52:44.067355
2021-04-02T13:33:46
2021-04-02T13:33:46
352,621,879
0
0
null
null
null
null
UTF-8
Java
false
false
863
java
package cn.shyshetxwh.chapter02; import java.util.Arrays; import java.util.EmptyStackException; /** * FileName: Stack * Author: admin+shyshetxwh * Date: 2021/03/13 22:27 * <p> * 消除过期的对象引用 */ public class Stack { private Object[] elements; private int size; private static final int DEFAULT_CAPACITY = 16; public Stack() { elements = new Object[DEFAULT_CAPACITY]; } public void push(Object e) { ensureCapacity(); elements[size++] = e; } public Object pop() { if (size == 0) throw new EmptyStackException(); Object result = elements[--size]; elements[size] = null; return result; } private void ensureCapacity() { if (elements.length == size) elements = Arrays.copyOf(elements, 2 * size + 1); } }
[ "shyshetxwh@163.com" ]
shyshetxwh@163.com
b07130d91aeca8f12be3f038d911449b126f2c7d
fa6adf9788caec2e2594c8b0de25237d93a0bf6d
/ly-upload/src/main/java/com/leyou/upload/config/FastClientImporter.java
de543668b47b7da03df5a652be94b3a22bf0b57d
[]
no_license
Yirito/leyou
ab8ddf0efee0280fb7f8799e7a268cb59dd8a00f
a4602db73607230afee4f60a1b497c96d9afdbe2
refs/heads/master
2022-12-10T22:22:14.047402
2019-06-05T08:00:40
2019-06-05T08:00:40
182,956,430
1
1
null
2022-11-16T11:47:38
2019-04-23T07:14:12
Java
UTF-8
Java
false
false
629
java
package com.leyou.upload.config; import com.github.tobato.fastdfs.FdfsClientConfig; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.EnableMBeanExport; import org.springframework.context.annotation.Import; import org.springframework.jmx.support.RegistrationPolicy; /** * 配置FastDFS 分布式文件操作 * 用来分布式存储下载文件的,原理和eureka差不多 */ @Configuration @Import(FdfsClientConfig.class) //解决jmx重复注册bean的问题 @EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING) public class FastClientImporter { }
[ "tony@gmail.com" ]
tony@gmail.com
4cbd19bbe5b1f469593176bdd5147fabd4f7e240
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_1004005.java
6f39e05bc49dc4c7e096bc985d4599222e3791c1
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
412
java
@Override public void login(){ String email=mActivityLoginBinding.etEmail.getText().toString(); String password=mActivityLoginBinding.etPassword.getText().toString(); if (mLoginViewModel.isEmailAndPasswordValid(email,password)) { hideKeyboard(); mLoginViewModel.login(email,password); } else { Toast.makeText(this,getString(R.string.invalid_email_password),Toast.LENGTH_SHORT).show(); } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
73d27285c244e1357acc8c38872fd5d04d0a5c9f
3f02fa49cd95a8762348a90ef53b765bef19a7d0
/main/java/invisiblearmor/INV.java
e2c396557ccf5802e11a0c9937631d32147d66be
[]
no_license
DonBruce64/InvisibilityArmor
da479fa9c35335a949066ea1558f733d8b31418c
40a56969ba9e644c4e098b8adf2d11b49145ed4f
refs/heads/master
2021-07-09T08:19:58.566347
2016-08-24T15:33:46
2016-08-24T15:33:46
106,199,547
0
0
null
null
null
null
UTF-8
Java
false
false
4,198
java
package invisiblearmor; import net.minecraft.client.renderer.entity.RenderPlayer; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraftforge.client.event.DrawBlockHighlightEvent; import net.minecraftforge.client.event.RenderPlayerEvent; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.ModMetadata; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = INV.MODID, name = INV.MODNAME, version = INV.MODVER) public class INV { public static final String MODID="inv"; public static final String MODNAME="Invisible Armor"; public static final String MODVER="3.0.0"; private static final INV instance = new INV(); private static ItemStack[] armorItems = new ItemStack[4]; private static boolean headOveridden; @EventHandler public void PreInit(FMLPreInitializationEvent event){ this.initModMetadata(event); } @EventHandler public void Init(FMLInitializationEvent event){ MinecraftForge.EVENT_BUS.register(instance); for(byte i=0; i<4; ++i){ GameRegistry.registerItem(new InvisibleArmor(i), "InvisibleArmor" + i); } } private void initModMetadata(FMLPreInitializationEvent event){ ModMetadata meta = event.getModMetadata(); meta.name = "Invisible Armor"; meta.description = "Armor that makes you invisible."; meta.authorList.clear(); meta.authorList.add("don_bruce"); meta.modId = this.MODID; meta.version = this.MODVER; meta.autogenerated = false; } @SubscribeEvent public void on(DrawBlockHighlightEvent event){ event.setCanceled(true); } @SubscribeEvent public void on(RenderPlayerEvent.Pre event){ headOveridden = event.renderer.modelBipedMain.bipedHead.isHidden; ItemStack[] armorInv = event.entityPlayer.inventory.armorInventory; for(byte i=0; i<4; ++i){ armorItems[i] = null; if(armorInv[i] != null){ if(armorInv[i].getItem() instanceof InvisibleArmor){ armorItems[i] = armorInv[i]; armorInv[i] = null; } }else{ setBodyPartVisibility(event.renderer, i, false); } } } @SubscribeEvent public void on(RenderPlayerEvent.Post event){ for(byte i=0; i<4; ++i){ if(armorItems[i] != null){ event.entityPlayer.inventory.armorInventory[i] = armorItems[i]; setBodyPartVisibility(event.renderer, i, true); } } } public static class InvisibleArmor extends ItemArmor{ public InvisibleArmor(int type){ super(ArmorMaterial.CLOTH, 0, type); switch(type){ case(0):this.iconString = "chainmail_helmet"; break; case(1):this.iconString = "chainmail_chestplate"; break; case(2):this.iconString = "chainmail_leggings"; break; case(3):this.iconString = "chainmail_boots"; break; } switch(type){ case(0):this.setUnlocalizedName("InvisibleArmor_Head"); break; case(1):this.setUnlocalizedName("InvisibleArmor_Body"); break; case(2):this.setUnlocalizedName("InvisibleArmor_Legs"); break; case(3):this.setUnlocalizedName("InvisibleArmor_Arms"); break; } this.setCreativeTab(CreativeTabs.tabCombat); } } private static void setBodyPartVisibility(RenderPlayer renderer, int armorType, boolean visibility){ if(armorType == 3){ if(!headOveridden){ renderer.modelBipedMain.bipedHead.isHidden = visibility; renderer.modelBipedMain.bipedEars.isHidden = visibility; renderer.modelBipedMain.bipedHeadwear.isHidden = visibility; } }else if(armorType == 2){ renderer.modelBipedMain.bipedBody.isHidden = visibility; renderer.modelBipedMain.bipedCloak.isHidden = visibility; }else if(armorType == 1){ renderer.modelBipedMain.bipedLeftLeg.isHidden = visibility; renderer.modelBipedMain.bipedRightLeg.isHidden = visibility; }else if(armorType == 0){ renderer.modelBipedMain.bipedLeftArm.isHidden = visibility; renderer.modelBipedMain.bipedRightArm.isHidden = visibility; } } }
[ "rapscallion827@gmail.com" ]
rapscallion827@gmail.com
8c5cf16ad25d03c898a51fa5bb332c665d92eb4d
ef5cb2e4c74d2dd21ca270040fa69ec8557c675e
/Multidimensional Arrays/Exercise/P10RadioactiveMutantVampireBunnies.java
afcf4722edef570d130992daf226774b1bad651d
[]
no_license
nanko89/JavaAdvance
df7529bf16c1943d8903f6f829fbeef73375c8d2
f081763525f527022a07f63157d93ac6e320fd97
refs/heads/main
2023-08-20T15:24:32.671686
2021-10-23T11:45:57
2021-10-23T11:45:57
404,287,075
1
0
null
null
null
null
UTF-8
Java
false
false
4,739
java
package Exercise; import java.util.ArrayDeque; import java.util.Scanner; public class P10RadioactiveMutantVampireBunnies { public static boolean isPlayerDead = false; public static int[] playerPosition = new int[2]; public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int rows = scanner.nextInt(); int cols = scanner.nextInt(); scanner.nextLine(); ArrayDeque<Integer> bunnyPosition = new ArrayDeque<>(); char[][] matrix = new char[rows][cols]; for (int row = 0; row < rows; row++) { String[] arr = scanner.nextLine().split(""); for (int col = 0; col < cols; col++) { matrix[row][col] = arr[col].charAt(0); if (matrix[row][col] == 'B') { bunnyPosition.offer(row); bunnyPosition.offer(col); } if (matrix[row][col] == 'P') { playerPosition[0] = row; playerPosition[1] = col; matrix[row][col] = '.'; } } } String move = scanner.nextLine(); int counter = -1 ; while (++counter < move.length() && !isPlayerDead) { int playerRow = playerPosition[0]; int playerCol = playerPosition[1]; char currentMove = move.charAt(counter); switch (currentMove) { case 'U': playerRow = playerRow - 1; break; case 'D': playerRow = playerRow + 1; break; case 'L': playerCol = playerCol - 1; break; case 'R': playerCol = playerCol + 1; break; } if (!isValid(playerRow, playerCol, matrix)) { break; } playerPosition[0] = playerRow; playerPosition[1] = playerCol; if (!isFree(playerCol, playerRow, matrix)) { isPlayerDead = true; break; } moveBunnys(matrix, bunnyPosition); if (matrix[playerRow][playerCol] == 'B'){ printMatrix(matrix); System.out.print("dead: "); System.out.println(playerPosition[0] + " " + playerPosition[1]); return; } } moveBunnys(matrix, bunnyPosition); printMatrix(matrix); if (isPlayerDead) { System.out.print("dead: "); } else { System.out.print("won: "); } System.out.println(playerPosition[0] + " " + playerPosition[1]); } private static void printMatrix(char[][] matrix) { for (int row = 0; row < matrix.length; row++) { for (int col = 0; col < matrix[row].length; col++) { char symbol = matrix[row][col]; System.out.print(symbol); } System.out.println(); } } private static void moveBunnys(char[][] matrix, ArrayDeque<Integer> bunnyPosition) { int length = bunnyPosition.size() / 2; for (int i = 0; i < length; i++) { int row = bunnyPosition.poll(); int col = bunnyPosition.poll(); if (isValid(row, col + 1 ,matrix) && haveBunny(row, col + 1, matrix)) { matrix[row][col + 1] = 'B'; bunnyPosition.offer(row); bunnyPosition.offer(col + 1); } if (isValid(row, col - 1, matrix) && haveBunny(row, col - 1, matrix)) { matrix[row][col - 1] = 'B'; bunnyPosition.offer(row); bunnyPosition.offer(col - 1); } if (isValid( row + 1,col, matrix) && haveBunny(row + 1, col, matrix)) { matrix[row + 1][col] = 'B'; bunnyPosition.offer(row + 1); bunnyPosition.offer(col); } if (isValid(row - 1,col, matrix) && haveBunny(row - 1, col, matrix)) { matrix[row -1][col] = 'B'; bunnyPosition.offer(row - 1); bunnyPosition.offer(col); } } } private static boolean isFree(int playerCol, int playerRow, char[][] matrix) { return matrix[playerRow][playerCol] == '.'; } private static boolean isValid(int row, int col, char[][] matrix) { return row >= 0 && row < matrix.length && col >= 0 && col < matrix[row].length; } private static boolean haveBunny(int row, int col, char[][] matrix) { return matrix[row][col] != 'B'; } }
[ "natali.v.angelova@gmail.com" ]
natali.v.angelova@gmail.com
1b7b3180328cbaaf5e64fca44974a256c91187e4
ef7c7ba931880de23afa4e25f3717cfe4084bd0f
/src/main/java/com/kenny/travel/repository/ConsumeRepository.java
f2f9806c4a7ec472d525528bc2eca81d7e65045a
[]
no_license
ShawnShiFan/GraduationTravel
1ccf364ebcdce6ffc6de701908ee599253b360f6
11d49d1820c91e1856f24c15fb072c0467c0690e
refs/heads/master
2022-04-20T23:07:58.599182
2020-04-26T15:02:03
2020-04-26T15:02:03
259,659,535
1
0
null
2020-04-28T14:24:35
2020-04-28T14:24:34
null
UTF-8
Java
false
false
321
java
package com.kenny.travel.repository; import com.kenny.travel.entity.Article; import com.kenny.travel.entity.Consume; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface ConsumeRepository extends JpaRepository<Consume,Integer> { }
[ "574337030@qq.com" ]
574337030@qq.com
32b962aeec268b8b7b1fc2660bb7acdc7f026813
f4e15ee34808877459d81fd601d6be03bdfb4a9d
/org/fourthline/cling/model/message/header/EventSequenceHeader.java
969327cae49c9fcc63d1b576517967dceff496c3
[]
no_license
Lianite/wurm-server-reference
369081debfa72f44eafc6a080002c4a3970f8385
e4dd8701e4af13901268cf9a9fa206fcb5196ff0
refs/heads/master
2023-07-22T16:06:23.426163
2020-04-07T23:15:35
2020-04-07T23:15:35
253,933,452
0
0
null
null
null
null
UTF-8
Java
false
false
958
java
// // Decompiled by Procyon v0.5.30 // package org.fourthline.cling.model.message.header; import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; public class EventSequenceHeader extends UpnpHeader<UnsignedIntegerFourBytes> { public EventSequenceHeader() { } public EventSequenceHeader(final long value) { this.setValue(new UnsignedIntegerFourBytes(value)); } @Override public void setString(String s) throws InvalidHeaderException { if (!"0".equals(s)) { while (s.startsWith("0")) { s = s.substring(1); } } try { this.setValue(new UnsignedIntegerFourBytes(s)); } catch (NumberFormatException ex) { throw new InvalidHeaderException("Invalid event sequence, " + ex.getMessage()); } } @Override public String getString() { return this.getValue().toString(); } }
[ "jdraco6@gmail.com" ]
jdraco6@gmail.com
e6b8a5560ddfb595080c300223ba6ea93b1c4ac7
0beafcac3ae08ca9ceb7422574e56ee99520d0cb
/app/src/main/java/com/yunqi/cardreader/ui/adapter/MyListAdapter.java
e830d72bb5dbe5fee4763fb49131cbbd0f627657
[]
no_license
ghcui/IDCardReader
d12bc1bc0bc9f22799176b498cbfca5c507d0014
baa5d78faf3638056e560996dc02836e82cded09
refs/heads/master
2021-07-06T02:55:54.279610
2021-04-28T09:25:38
2021-04-28T09:25:38
91,062,998
1
0
null
null
null
null
UTF-8
Java
false
false
1,956
java
package com.yunqi.cardreader.ui.adapter; import android.content.Context; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.yunqi.cardreader.R; import com.yunqi.cardreader.model.bean.Module; import java.io.IOException; import java.io.InputStream; import java.util.List; /** * * * @author RXXU */ public class MyListAdapter extends BaseAdapter { /** * 转化器 */ private LayoutInflater layoutInflater; /** * 数据源 */ private String[] arrayStr; /** * 上下文 */ private Context context; /** * Application */ public MyListAdapter(Context context,String[] arrayStr) { this.context = context; layoutInflater = LayoutInflater.from(context); this.arrayStr = arrayStr; } @Override public int getCount() { return arrayStr.length; } @Override public String getItem(int position) { return arrayStr[position]; } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder = null; if (convertView == null) { holder = new ViewHolder(); convertView = layoutInflater.inflate(R.layout.item_spinner, null); holder.text = (TextView) convertView.findViewById(R.id.text); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } String item=arrayStr[position]; holder.text.setText(item); return convertView; } class ViewHolder { TextView text;// } }
[ "376982054@qq.com" ]
376982054@qq.com
34534daf060e5bd5dd34352ab7feee4a49ea7e17
018df327711cbf5ccc645fd747d358e393a20ca6
/eclipse/tests/it-xsp-jakartaee/src/test/java/it/org/openntf/xsp/jakartaee/nsf/microprofile/TestOpenAPI.java
46618ea4261bac6f851db2cba654981f6749f67d
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "MPL-1.1", "BSD-3-Clause", "LGPL-2.1-only", "EPL-2.0", "MIT-0", "MIT", "EPL-1.0" ]
permissive
OpenNTF/org.openntf.xsp.jakartaee
1dd25fc3d635d7fea7c7b29fd2ccc075b6856cd0
20d461e171433e79a11e603934d0c196b1a2f19a
refs/heads/develop
2023-09-05T08:53:36.684976
2023-08-24T13:16:38
2023-08-24T13:16:38
135,860,219
18
4
Apache-2.0
2023-09-13T18:50:49
2018-06-02T23:53:31
Java
UTF-8
Java
false
false
4,489
java
/** * Copyright (c) 2018-2023 Contributors to the XPages Jakarta EE Support Project * * 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 it.org.openntf.xsp.jakartaee.nsf.microprofile; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import java.io.StringReader; import jakarta.json.Json; import jakarta.json.JsonArray; import jakarta.json.JsonObject; import jakarta.ws.rs.client.Client; import jakarta.ws.rs.client.WebTarget; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import it.org.openntf.xsp.jakartaee.AbstractWebClientTest; import it.org.openntf.xsp.jakartaee.TestDatabase; import it.org.openntf.xsp.jakartaee.docker.DominoContainer; @SuppressWarnings("nls") public class TestOpenAPI extends AbstractWebClientTest { @ParameterizedTest @ValueSource(strings = { "openapi", "openapi.yaml" }) public void testOpenAPIYaml(String path) { Client client = getAnonymousClient(); WebTarget target = client.target(getRestUrl(null, TestDatabase.MAIN) + "/" + path); Response response = target.request().get(); String yaml = response.readEntity(String.class); assertTrue(yaml.startsWith("---\nopenapi: 3.0"), () -> yaml); assertTrue(yaml.contains(" /adminrole:")); } @ParameterizedTest @ValueSource(strings = { "openapi", "openapi.json" }) public void testOpenAPIJson(String path) { Client client = getAnonymousClient(); WebTarget target = client.target(getRestUrl(null, TestDatabase.MAIN) + "/" + path); Response response = target.request() .accept(MediaType.APPLICATION_JSON_TYPE) .get(); String json = response.readEntity(String.class); JsonObject obj = Json.createReader(new StringReader(json)).readObject(); // Check for a known resource JsonObject paths = obj.getJsonObject("paths"); assertTrue(paths.containsKey("/adminrole")); JsonObject info = obj.getJsonObject("info"); assertEquals("XPages JEE Example", info.getString("title")); // Check for the presence of a version from $TemplateBuild String mavenVersion = DominoContainer.getMavenVersion(); if(mavenVersion.endsWith("-SNAPSHOT")) { mavenVersion = mavenVersion.substring(0, mavenVersion.length()-"-SNAPSHOT".length()); } if(!info.containsKey("version")) { fail("Encountered unexpected JSON: " + json); } String version = info.getString("version"); assertTrue(version.startsWith(mavenVersion), "Expected version '" + version + "' to start with '" + mavenVersion + "'"); JsonArray servers = obj.getJsonArray("servers"); JsonObject server0 = servers.getJsonObject(0); assertEquals(getRestUrl(null, TestDatabase.MAIN), server0.getString("url")); } @ParameterizedTest @ValueSource(strings = { "openapi", "openapi.json" }) public void testOpenAPIBundleDb(String path) { Client client = getAnonymousClient(); WebTarget target = client.target(getRestUrl(null, TestDatabase.BUNDLE) + "/" + path); Response response = target.request() .accept(MediaType.APPLICATION_JSON_TYPE) .get(); String json = response.readEntity(String.class); JsonObject obj = Json.createReader(new StringReader(json)).readObject(); // Check for the presence overridden versions JsonObject info = obj.getJsonObject("info"); try { assertEquals("OpenAPI Overridden Title", info.getString("title")); assertEquals("3.1.1.override", info.getString("version")); JsonObject license = info.getJsonObject("license"); assertEquals("http://some.license/url", license.getString("url")); JsonArray servers = obj.getJsonArray("servers"); JsonObject server0 = servers.getJsonObject(0); assertEquals("http://override.server/path", server0.getString("url")); } catch(NullPointerException e) { fail("Encountered NPE with JSON " + json, e); } } }
[ "jesse@secondfoundation.org" ]
jesse@secondfoundation.org
b52076cfdc0ea94492da601e6d76e140a68fa216
365267d7941f76c97fac8af31a788d8c0fb2d384
/src/main/java/net/minecraft/world/gen/layer/GenLayerBiomeEdge.java
6c4ba57f77786cbb8c5d5f9c0bbff25f7ace9f04
[ "MIT" ]
permissive
potomy/client
26d8c31657485f216639efd13b2fdda67570d9b5
c01d23eb05ed83abb4fee00f9bf603b6bc3e2e27
refs/heads/master
2021-06-21T16:02:26.920860
2017-08-02T02:03:49
2017-08-02T02:03:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,647
java
package net.minecraft.world.gen.layer; import net.minecraft.world.biome.BiomeGenBase; public class GenLayerBiomeEdge extends GenLayer { public GenLayerBiomeEdge(long p_i45475_1_, GenLayer p_i45475_3_) { super(p_i45475_1_); this.parent = p_i45475_3_; } /** * Returns a list of integer values generated by this layer. These may be interpreted as temperatures, rainfall * amounts, or biomeList[] indices based on the particular GenLayer subclass. */ public int[] getInts(int p_75904_1_, int p_75904_2_, int p_75904_3_, int p_75904_4_) { int[] var5 = this.parent.getInts(p_75904_1_ - 1, p_75904_2_ - 1, p_75904_3_ + 2, p_75904_4_ + 2); int[] var6 = IntCache.getIntCache(p_75904_3_ * p_75904_4_); for (int var7 = 0; var7 < p_75904_4_; ++var7) { for (int var8 = 0; var8 < p_75904_3_; ++var8) { this.initChunkSeed((long)(var8 + p_75904_1_), (long)(var7 + p_75904_2_)); int var9 = var5[var8 + 1 + (var7 + 1) * (p_75904_3_ + 2)]; if (!this.func_151636_a(var5, var6, var8, var7, p_75904_3_, var9, BiomeGenBase.extremeHills.biomeID, BiomeGenBase.extremeHillsEdge.biomeID) && !this.func_151635_b(var5, var6, var8, var7, p_75904_3_, var9, BiomeGenBase.field_150607_aa.biomeID, BiomeGenBase.field_150589_Z.biomeID) && !this.func_151635_b(var5, var6, var8, var7, p_75904_3_, var9, BiomeGenBase.field_150608_ab.biomeID, BiomeGenBase.field_150589_Z.biomeID) && !this.func_151635_b(var5, var6, var8, var7, p_75904_3_, var9, BiomeGenBase.field_150578_U.biomeID, BiomeGenBase.taiga.biomeID)) { int var10; int var11; int var12; int var13; if (var9 == BiomeGenBase.desert.biomeID) { var10 = var5[var8 + 1 + (var7 + 1 - 1) * (p_75904_3_ + 2)]; var11 = var5[var8 + 1 + 1 + (var7 + 1) * (p_75904_3_ + 2)]; var12 = var5[var8 + 1 - 1 + (var7 + 1) * (p_75904_3_ + 2)]; var13 = var5[var8 + 1 + (var7 + 1 + 1) * (p_75904_3_ + 2)]; if (var10 != BiomeGenBase.icePlains.biomeID && var11 != BiomeGenBase.icePlains.biomeID && var12 != BiomeGenBase.icePlains.biomeID && var13 != BiomeGenBase.icePlains.biomeID) { var6[var8 + var7 * p_75904_3_] = var9; } else { var6[var8 + var7 * p_75904_3_] = BiomeGenBase.field_150580_W.biomeID; } } else if (var9 == BiomeGenBase.swampland.biomeID) { var10 = var5[var8 + 1 + (var7 + 1 - 1) * (p_75904_3_ + 2)]; var11 = var5[var8 + 1 + 1 + (var7 + 1) * (p_75904_3_ + 2)]; var12 = var5[var8 + 1 - 1 + (var7 + 1) * (p_75904_3_ + 2)]; var13 = var5[var8 + 1 + (var7 + 1 + 1) * (p_75904_3_ + 2)]; if (var10 != BiomeGenBase.desert.biomeID && var11 != BiomeGenBase.desert.biomeID && var12 != BiomeGenBase.desert.biomeID && var13 != BiomeGenBase.desert.biomeID && var10 != BiomeGenBase.field_150584_S.biomeID && var11 != BiomeGenBase.field_150584_S.biomeID && var12 != BiomeGenBase.field_150584_S.biomeID && var13 != BiomeGenBase.field_150584_S.biomeID && var10 != BiomeGenBase.icePlains.biomeID && var11 != BiomeGenBase.icePlains.biomeID && var12 != BiomeGenBase.icePlains.biomeID && var13 != BiomeGenBase.icePlains.biomeID) { if (var10 != BiomeGenBase.jungle.biomeID && var13 != BiomeGenBase.jungle.biomeID && var11 != BiomeGenBase.jungle.biomeID && var12 != BiomeGenBase.jungle.biomeID) { var6[var8 + var7 * p_75904_3_] = var9; } else { var6[var8 + var7 * p_75904_3_] = BiomeGenBase.field_150574_L.biomeID; } } else { var6[var8 + var7 * p_75904_3_] = BiomeGenBase.plains.biomeID; } } else { var6[var8 + var7 * p_75904_3_] = var9; } } } } return var6; } private boolean func_151636_a(int[] p_151636_1_, int[] p_151636_2_, int p_151636_3_, int p_151636_4_, int p_151636_5_, int p_151636_6_, int p_151636_7_, int p_151636_8_) { if (!func_151616_a(p_151636_6_, p_151636_7_)) { return false; } else { int var9 = p_151636_1_[p_151636_3_ + 1 + (p_151636_4_ + 1 - 1) * (p_151636_5_ + 2)]; int var10 = p_151636_1_[p_151636_3_ + 1 + 1 + (p_151636_4_ + 1) * (p_151636_5_ + 2)]; int var11 = p_151636_1_[p_151636_3_ + 1 - 1 + (p_151636_4_ + 1) * (p_151636_5_ + 2)]; int var12 = p_151636_1_[p_151636_3_ + 1 + (p_151636_4_ + 1 + 1) * (p_151636_5_ + 2)]; if (this.func_151634_b(var9, p_151636_7_) && this.func_151634_b(var10, p_151636_7_) && this.func_151634_b(var11, p_151636_7_) && this.func_151634_b(var12, p_151636_7_)) { p_151636_2_[p_151636_3_ + p_151636_4_ * p_151636_5_] = p_151636_6_; } else { p_151636_2_[p_151636_3_ + p_151636_4_ * p_151636_5_] = p_151636_8_; } return true; } } private boolean func_151635_b(int[] p_151635_1_, int[] p_151635_2_, int p_151635_3_, int p_151635_4_, int p_151635_5_, int p_151635_6_, int p_151635_7_, int p_151635_8_) { if (p_151635_6_ != p_151635_7_) { return false; } else { int var9 = p_151635_1_[p_151635_3_ + 1 + (p_151635_4_ + 1 - 1) * (p_151635_5_ + 2)]; int var10 = p_151635_1_[p_151635_3_ + 1 + 1 + (p_151635_4_ + 1) * (p_151635_5_ + 2)]; int var11 = p_151635_1_[p_151635_3_ + 1 - 1 + (p_151635_4_ + 1) * (p_151635_5_ + 2)]; int var12 = p_151635_1_[p_151635_3_ + 1 + (p_151635_4_ + 1 + 1) * (p_151635_5_ + 2)]; if (func_151616_a(var9, p_151635_7_) && func_151616_a(var10, p_151635_7_) && func_151616_a(var11, p_151635_7_) && func_151616_a(var12, p_151635_7_)) { p_151635_2_[p_151635_3_ + p_151635_4_ * p_151635_5_] = p_151635_6_; } else { p_151635_2_[p_151635_3_ + p_151635_4_ * p_151635_5_] = p_151635_8_; } return true; } } private boolean func_151634_b(int p_151634_1_, int p_151634_2_) { if (func_151616_a(p_151634_1_, p_151634_2_)) { return true; } else if (BiomeGenBase.func_150568_d(p_151634_1_) != null && BiomeGenBase.func_150568_d(p_151634_2_) != null) { BiomeGenBase.TempCategory var3 = BiomeGenBase.func_150568_d(p_151634_1_).func_150561_m(); BiomeGenBase.TempCategory var4 = BiomeGenBase.func_150568_d(p_151634_2_).func_150561_m(); return var3 == var4 || var3 == BiomeGenBase.TempCategory.MEDIUM || var4 == BiomeGenBase.TempCategory.MEDIUM; } else { return false; } } }
[ "dav.nico@orange.fr" ]
dav.nico@orange.fr
d3d8760e47db717100e56b9345727b9a580458cc
ba9d7ccf7ae54031fd1956436554c30dc5ee19a9
/src/main/java/com/uabc/dario/cimagenda20/Calendario.java
3f495307864c13a1ac8bb6823b6675c6499dd9a0
[]
no_license
DinoraLoren/Cimagenda2.3
8eefc00259b1bb7f9c690206fb25a9d58faf0189
dc71c5bcd50687c30b5233eee88aecb403d42cbd
refs/heads/master
2021-08-14T09:53:07.874423
2017-11-15T09:03:13
2017-11-15T09:03:13
110,809,714
0
0
null
null
null
null
UTF-8
Java
false
false
3,348
java
package com.uabc.dario.cimagenda20; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.view.View; import android.support.design.widget.NavigationView; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; public class Calendario extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_calendario); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); drawer.setDrawerListener(toggle); toggle.syncState(); NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); navigationView.setNavigationItemSelectedListener(this); } @Override public void onBackPressed() { DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); if (drawer.isDrawerOpen(GravityCompat.START)) { drawer.closeDrawer(GravityCompat.START); } else { super.onBackPressed(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.home, menu); return true; } @SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { // Handle navigation view item clicks here. int id = item.getItemId(); switch(id){ case R.id.nav_home: Intent h= new Intent(Calendario.this,Home.class); startActivity(h); break; case R.id.nav_agenda: Intent a= new Intent(Calendario.this,Agenda.class); startActivity(a); break; case R.id.nav_horario: Intent i= new Intent(Calendario.this,Horario.class); startActivity(i); break; case R.id.nav_calendario: Intent j= new Intent(Calendario.this,Calendario.class); startActivity(j); break; case R.id.nav_materias: Intent k= new Intent(Calendario.this,Materias.class); startActivity(k); break; case R.id.nav_usuario: Intent l= new Intent(Calendario.this,Usuario.class); startActivity(l); break; } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; } }
[ "you@example.com" ]
you@example.com
ed4c7d069fca1b5e7f8169ab74f64043275b15b6
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipseswt_cluster/54626/src_1.java
f48f46ea5126f2c2fc400bb783b9cc4e03acdf39
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,961
java
package org.eclipse.swt.examples.javaviewer; /* * Copyright (c) 2000, 2002 IBM Corp. All rights reserved. * This file is made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html */ import org.eclipse.swt.*; import org.eclipse.swt.custom.*; import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import java.util.*; import java.io.*; import java.text.*; /** */ public class JavaViewer { Shell shell; StyledText text; JavaLineStyler lineStyler = new JavaLineStyler(); FileDialog fileDialog; static ResourceBundle resources = ResourceBundle.getBundle("examples_javaviewer"); Menu createFileMenu() { Menu bar = shell.getMenuBar (); Menu menu = new Menu (bar); MenuItem item; // Open item = new MenuItem (menu, SWT.CASCADE); item.setText (resources.getString("Open_menuitem")); item.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { openFile(); } }); // Close item = new MenuItem (menu, SWT.PUSH); item.setText (resources.getString("Close_menuitem")); item.addSelectionListener (new SelectionAdapter () { public void widgetSelected (SelectionEvent e) { menuFileExit (); } }); return menu; } void createMenuBar () { Menu bar = new Menu (shell, SWT.BAR); shell.setMenuBar (bar); MenuItem fileItem = new MenuItem (bar, SWT.CASCADE); fileItem.setText (resources.getString("File_menuitem")); fileItem.setMenu (createFileMenu ()); } void createShell (Display display) { shell = new Shell (display); shell.setText (resources.getString("Window_title")); GridLayout layout = new GridLayout(); layout.numColumns = 1; shell.setSize(500, 400); shell.setLayout(layout); shell.addShellListener (new ShellAdapter () { public void shellClosed (ShellEvent e) { lineStyler.disposeColors(); text.removeLineStyleListener(lineStyler); } }); } void createStyledText() { text = new StyledText (shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); GridData spec = new GridData(); spec.horizontalAlignment = GridData.FILL; spec.grabExcessHorizontalSpace = true; spec.verticalAlignment = GridData.FILL; spec.grabExcessVerticalSpace = true; text.setLayoutData(spec); text.addLineStyleListener(lineStyler); text.setEditable(false); Color bg = Display.getDefault().getSystemColor(SWT.COLOR_GRAY); text.setBackground(bg); } void displayError(String msg) { MessageBox box = new MessageBox(shell, SWT.ICON_ERROR); box.setMessage(msg); box.open(); } public static void main (String [] args) { Display display = new Display(); JavaViewer example = new JavaViewer (); Shell shell = example.open (display); while (!shell.isDisposed ()) if (!display.readAndDispatch ()) display.sleep (); display.dispose (); } public Shell open (Display display) { createShell (display); createMenuBar (); createStyledText (); shell.open (); return shell; } void openFile() { final String textString; if (fileDialog == null) { fileDialog = new FileDialog(shell, SWT.OPEN); } fileDialog.setFilterExtensions(new String[] {"*.java", "*.*"}); fileDialog.open(); String name = fileDialog.getFileName(); if ((name == null) || (name.length() == 0)) return; File file = new File(fileDialog.getFilterPath(), name); if (!file.exists()) { String message = MessageFormat.format(resources.getString("Err_file_no_exist"), new String[] {file.getName()}); displayError(message); return; } try { FileInputStream stream= new FileInputStream(file.getPath()); try { Reader in = new BufferedReader(new InputStreamReader(stream)); char[] readBuffer= new char[2048]; StringBuffer buffer= new StringBuffer((int) file.length()); int n; while ((n = in.read(readBuffer)) > 0) { buffer.append(readBuffer, 0, n); } textString = buffer.toString(); stream.close(); } catch (IOException e) { // Err_file_io String message = MessageFormat.format(resources.getString("Err_file_io"), new String[] {file.getName()}); displayError(message); return; } } catch (FileNotFoundException e) { String message = MessageFormat.format(resources.getString("Err_not_found"), new String[] {file.getName()}); displayError(message); return; } // Guard against superfluous mouse move events -- defer action until later Display display = text.getDisplay(); display.asyncExec(new Runnable() { public void run() { text.setText(textString); } }); // parse the block comments up front since block comments can go across // lines - inefficient way of doing this lineStyler.parseBlockComments(textString); } void menuFileExit () { shell.close (); } }
[ "375833274@qq.com" ]
375833274@qq.com
0af5bfb1b4e50b760704ff865787c0d9e9f36a1e
ce0fbc90d050b16642a73fcbdb5710251639b55c
/src/lezione02/esercizi/NumeroPrimoScomposto.java
0812d9e43bf9077ea4c7646d872ea52724defa8e
[]
no_license
alfonsodomenici/TssJavaBase
73920534b8385bfc6334830be1c600fdaf6194cf
741d5a7c4a907cf7ebed4fa7fba62346b3fe6b77
refs/heads/master
2020-12-24T10:24:42.214475
2017-01-09T15:33:58
2017-01-09T15:33:58
73,090,956
0
0
null
null
null
null
UTF-8
Java
false
false
1,137
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 lezione02.esercizi; import java.util.Scanner; /** * Legge un numero in input e stampa se è un numero primo oppure no * * @author tss */ public class NumeroPrimoScomposto { public static void main(String[] args) { String risultato; //Crea oggetto scanner per leggere input Scanner s = new Scanner(System.in); System.out.print("Inserisci il numero: "); //Leggo il numero in input int numero = s.nextInt(); if (numero <= 1) { System.out.println("Non è un numero primo"); System.exit(0); } int divisore = 1; boolean primo = true; while (divisore <= numero && primo) { primo = (numero % divisore != 0) || divisore == 1 || divisore == numero; divisore += 1; } risultato = primo ? "Il numero è primo" : "Il numero non è primo"; System.out.println(risultato); } }
[ "tss@debian-tss24" ]
tss@debian-tss24
11dd45bf67a2aaa490ef0f381ed4519b5dff1408
d528fe4f3aa3a7eca7c5ba4e0aee43421e60857f
/src/xgxt/pjpy/hzy/PjpyHzzyActionForm.java
26431222f4a5f6eaf0fe123d1c1f0c369fbc0a76
[]
no_license
gxlioper/xajd
81bd19a7c4b9f2d1a41a23295497b6de0dae4169
b7d4237acf7d6ffeca1c4a5a6717594ca55f1673
refs/heads/master
2022-03-06T15:49:34.004924
2019-11-19T07:43:25
2019-11-19T07:43:25
null
0
0
null
null
null
null
GB18030
Java
false
false
3,841
java
package xgxt.pjpy.hzy; import xgxt.pjpy.commonutils.CommonForm; /** * <p>Title: 学生工作管理系统</p> * <p>Description: 杭州职院评奖评优ActionForm</p> * <p>Copyright: Copyright (c) 2008</p> * <p>Company: zfsoft</p> * <p>Author: 李涛</p> * <p>Version: 1.0</p> * <p>Time: 2008-08-19</p> */ public class PjpyHzzyActionForm extends CommonForm { /** * 自动生成的版本ID */ private static final long serialVersionUID = 1L; private String xydykpf;//学院德育考评分 private String gydykpf;//公寓德育考评分 private String zcj;//智成绩 private String tcj;//体成绩 private String gzxxcx;//工作学习创新 private String zhszcpzf;//综合素质测评总分 private String zhszcpcjpm;//综合素质测评成绩排名 private String bz;//备注 private String jxjdm; private String pjcj; private String zhpfmc; private String cjmc; private String sjhm; private String drzw; private String sqly; private String jfqk; private String zzmm; private String mz; private String jtdz; private String zysj; private String rychdm; private String[] checkVal; private String qm; public String getQm() { return qm; } public void setQm(String qm) { this.qm = qm; } public String[] getCheckVal() { return checkVal; } public void setCheckVal(String[] checkVal) { this.checkVal = checkVal; } public String getJtdz() { return jtdz; } public void setJtdz(String jtdz) { this.jtdz = jtdz; } public String getMz() { return mz; } public void setMz(String mz) { this.mz = mz; } public String getZysj() { return zysj; } public void setZysj(String zysj) { this.zysj = zysj; } public String getZzmm() { return zzmm; } public void setZzmm(String zzmm) { this.zzmm = zzmm; } public String getBz() { return bz; } public void setBz(String bz) { this.bz = bz; } public String getGydykpf() { return gydykpf; } public void setGydykpf(String gydykpf) { this.gydykpf = gydykpf; } public String getGzxxcx() { return gzxxcx; } public void setGzxxcx(String gzxxcx) { this.gzxxcx = gzxxcx; } public String getTcj() { return tcj; } public void setTcj(String tcj) { this.tcj = tcj; } public String getXydykpf() { return xydykpf; } public void setXydykpf(String xydykpf) { this.xydykpf = xydykpf; } public String getZcj() { return zcj; } public void setZcj(String zcj) { this.zcj = zcj; } public String getZhszcpcjpm() { return zhszcpcjpm; } public void setZhszcpcjpm(String zhszcpcjpm) { this.zhszcpcjpm = zhszcpcjpm; } public String getZhszcpzf() { return zhszcpzf; } public void setZhszcpzf(String zhszcpzf) { this.zhszcpzf = zhszcpzf; } public String getCjmc() { return cjmc; } public void setCjmc(String cjmc) { this.cjmc = cjmc; } public String getDrzw() { return drzw; } public void setDrzw(String drzw) { this.drzw = drzw; } public String getJfqk() { return jfqk; } public void setJfqk(String jfqk) { this.jfqk = jfqk; } public String getJxjdm() { return jxjdm; } public void setJxjdm(String jxjdm) { this.jxjdm = jxjdm; } public String getPjcj() { return pjcj; } public void setPjcj(String pjcj) { this.pjcj = pjcj; } public String getSjhm() { return sjhm; } public void setSjhm(String sjhm) { this.sjhm = sjhm; } public String getSqly() { return sqly; } public void setSqly(String sqly) { this.sqly = sqly; } public String getZhpfmc() { return zhpfmc; } public void setZhpfmc(String zhpfmc) { this.zhpfmc = zhpfmc; } public String getRychdm() { return rychdm; } public void setRychdm(String rychdm) { this.rychdm = rychdm; } }
[ "1398796456@qq.com" ]
1398796456@qq.com
6bb9ed9f672e2a234d741648ce37b8d571b4842a
47de0e5aadf0cb0fea2267f0f88831f7dbbfd6d3
/src/main/java/com/github/perscholas/service/StudentCourseService.java
b7d22ff9b045fc61fd6f5869f765847119fb7e17
[]
no_license
KevinW831205/sba-week8
6037eb73b23d99d0a702926db28ab542edfe3e25
2b06ef4530912ed600b3b3e829eed9b589c05bf0
refs/heads/master
2021-01-06T18:23:16.785245
2020-02-19T19:27:55
2020-02-19T19:27:55
241,438,025
0
0
null
2020-02-18T18:35:58
2020-02-18T18:35:57
null
UTF-8
Java
false
false
1,369
java
package com.github.perscholas.service; import com.github.perscholas.DatabaseConnection; import com.github.perscholas.dao.StudentCourseDao; import com.github.perscholas.model.Course; import com.github.perscholas.model.CourseInterface; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; public class StudentCourseService implements StudentCourseDao { private final DatabaseConnection dbc; public StudentCourseService(DatabaseConnection dbc) { this.dbc = dbc; } public StudentCourseService() { this(DatabaseConnection.MYSQL); } @Override public List<CourseInterface> getStudentCourse(String studentEmail) { ResultSet result = dbc.executeQuery("SELECT * FROM studentcourse WHERE studentcourse.email = '"+studentEmail+"'"); List<CourseInterface> courseList = new ArrayList<>(); try { while (result.next()) { Integer id = result.getInt("id"); String name = result.getString("name"); String instructor = result.getString("instructor"); CourseInterface course = new Course(id, name, instructor); courseList.add(course); } } catch (SQLException se) { throw new Error(se); } return courseList; } }
[ "bird831205@hotmail.com" ]
bird831205@hotmail.com
883d1eda49e88d52f2ef139fe843d7ee82e5e975
d85028f6a7c72c6e6daa1dd9c855d4720fc8b655
/com/google/common/collect/ForwardingImmutableCollection.java
aa3c6bc0653e9c59644160ec8a5d54b50f3a298b
[]
no_license
RavenLeaks/Aegis-src-cfr
85fb34c2b9437adf1631b103f555baca6353e5d5
9815c07b0468cbba8d1efbfe7643351b36665115
refs/heads/master
2022-10-13T02:09:08.049217
2020-06-09T15:31:27
2020-06-09T15:31:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
273
java
/* * Decompiled with CFR <Could not determine version>. */ package com.google.common.collect; import com.google.common.annotations.GwtCompatible; @GwtCompatible(emulated=true) class ForwardingImmutableCollection { private ForwardingImmutableCollection() { } }
[ "emlin2021@gmail.com" ]
emlin2021@gmail.com
aaa29515033ba5cd43596d3d91e0e8d227a500e1
f51d7e7e17f50921cf19c6fe09c0aecfdd11ccec
/12 EXERCISE INTERFACES AND ABSTRACTION/p05_03_BorderControl/impl/AbstractIdentable.java
566a27bf5795c0dc745144610de6fa276e559280
[ "MIT" ]
permissive
TsvetanNikolov123/Java---OOP-Basics
a39b83199d07e4a51e67b664d5216662e45f3fe6
5ac6360d283c1d7abf2b04df4eca560654a6ad18
refs/heads/master
2020-03-19T22:30:09.158937
2019-09-13T21:02:24
2019-09-13T21:02:24
136,972,231
0
0
null
null
null
null
UTF-8
Java
false
false
327
java
package p05_03_BorderControl.impl; import p05_03_BorderControl.contracts.Identable; public abstract class AbstractIdentable implements Identable { private final String id; public AbstractIdentable(String id) { this.id = id; } @Override public String getId() { return this.id; } }
[ "tsdman1985@gmail.com" ]
tsdman1985@gmail.com
2412649e04a615a383040a94d8b1b90da85ffecc
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_5d8cdbeb3490b521fc08e852aac24da5bc73ef8f/ServiceTypeGoal/5_5d8cdbeb3490b521fc08e852aac24da5bc73ef8f_ServiceTypeGoal_s.java
e00a730f6229fcd5ac4f351ad515fdc16aad2601
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,218
java
/******************************************************************************* * This file is part of the Symfony eclipse plugin. * * (c) Dawid Pakuła <zulus@w3des.net> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. ******************************************************************************/ package com.dubture.symfony.core.goals; import org.eclipse.dltk.ti.IContext; import org.eclipse.dltk.ti.goals.AbstractGoal; public class ServiceTypeGoal extends AbstractGoal{ private final String serviceId; public ServiceTypeGoal(IContext context, String serviceId) { super(context); assert serviceId != null; this.serviceId = serviceId; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!super.equals(obj)) { return false; } else if (this.getClass() != obj.getClass()) { return false; } return serviceId.equals(((ServiceTypeGoal) obj).getServiceId()); } @Override public int hashCode() { return 41 * super.hashCode() + serviceId.hashCode(); } public String getServiceId() { return serviceId; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7229191eda71d3aba236cf50bce3e92ac862cd78
395a5ff4a9da2cbb9735bf6a0ae3163388bb5e48
/src/main/java/com/ringcentral/definitions/ProvisioningPagingInfo.java
7bba8be50127cc26e78776f78b09b7160e4775db
[]
no_license
tylerlong/ringcentral-kotlin
d51b04d798ef03b3390ec0cc661870f90eb30c4a
9f958259f782ef10b349cbf560317e6d888415d6
refs/heads/master
2023-01-11T16:34:46.344148
2019-06-01T03:36:29
2019-06-01T03:36:29
189,321,965
3
0
null
2023-01-03T23:13:31
2019-05-30T01:09:45
Java
UTF-8
Java
false
false
1,917
java
package com.ringcentral.definitions; public class ProvisioningPagingInfo { /** * The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) */ public Long page; /** * Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied */ public Long perPage; /** * The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty */ public Long pageStart; /** * The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty */ public Long pageEnd; /** * The total number of pages in a dataset. May be omitted for some resources due to performance reasons */ public Long totalPages; /** * The total number of elements in a dataset. May be omitted for some resource due to performance reasons */ public Long totalElements; public ProvisioningPagingInfo page(Long page) { this.page = page; return this; } public ProvisioningPagingInfo perPage(Long perPage) { this.perPage = perPage; return this; } public ProvisioningPagingInfo pageStart(Long pageStart) { this.pageStart = pageStart; return this; } public ProvisioningPagingInfo pageEnd(Long pageEnd) { this.pageEnd = pageEnd; return this; } public ProvisioningPagingInfo totalPages(Long totalPages) { this.totalPages = totalPages; return this; } public ProvisioningPagingInfo totalElements(Long totalElements) { this.totalElements = totalElements; return this; } }
[ "tyler4long@gmail.com" ]
tyler4long@gmail.com
04232e3111e690f884deb30366c83a3d46900c6d
f515f98ca40ce65a60e324b2860949d9fff668dd
/Source Code/javasource/toy/DiamondPatternToy.java
499a8ef45265cad5002da059935abc52df96308a
[]
no_license
Deyreudolf00/OOP
35e2228e49692088d72e8b974c24b4e714d9c970
62842082c8a344f072bbfd84e3484a6df3f0bb25
refs/heads/master
2016-08-13T00:44:44.326739
2016-02-27T04:11:21
2016-02-27T04:11:21
50,080,804
0
0
null
null
null
null
UTF-8
Java
false
false
1,046
java
/* * DiamondPattern.java * * Created on May 25, 2003, 6:58 AM */ package toy; /** * * @author Bambang Hariyanto,Ir.MT */ public class DiamondPatternToy { private int number = 0; /** Creates a new instance of DiamondPattern */ public DiamondPatternToy(int number) { this.number = number; } static void test(){ DiamondPatternToy t = new DiamondPatternToy(9); t.printDiamond(); } public static void main (String[] args){ test(); } void printDiamond(){ for (int i=0;i<number/2+1;i++){ // Segitiga atas for(int j=0;j<(number/2-i);j++) System.out.print(" "); for(int j=0;j<2*i+1;j++) System.out.print("*"); System.out.println(); } // Segitiga bawah for (int i=number/2-1;i>=0;i--){ for(int j=0;j<(number/2-i);j++) System.out.print(" "); for(int j=0;j<2*i+1;j++) System.out.print("*"); System.out.println(); } } }
[ "renggarenji@gmail.com" ]
renggarenji@gmail.com
d18f185d5928aa9cf8e948f8062f8f9d6d0fe47f
524f7bba8e6f7283b278a469466e538c7f63701e
/贝王-App源码/MStore安卓/mdwmall/src/main/java/com/qianseit/westore/activity/community/Community1Fragment.java
d900716aedce1e4ab485ae35d9b9662d7b8bd03f
[]
no_license
xiongdaxionger/BSLIFE
e63e3582f6eec8c95636be39839c5f29b69b36ee
198a8c15ad32de493404022b9e00b0fe7202de08
refs/heads/master
2020-05-16T10:00:49.652335
2019-04-24T08:56:29
2019-04-24T08:56:29
182,962,206
0
0
null
null
null
null
UTF-8
Java
false
false
7,410
java
package com.qianseit.westore.activity.community; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.GridView; import android.widget.ImageView; import android.widget.TextView; import com.beiwangfx.R; import com.qianseit.westore.Run; import com.qianseit.westore.activity.AgentActivity; import com.qianseit.westore.adapter.QianseitAdapter; import com.qianseit.westore.base.BaseListFragment; import com.qianseit.westore.httpinterface.article.ArticleAddPraiseDiscoverInterface; import com.qianseit.westore.ui.XPullDownListView; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; public class Community1Fragment extends BaseListFragment<JSONObject> { final int REQUEST_DETAIL = 0x01; GridView mGridView; List<JSONObject> mNodeJsonObjects = new ArrayList<JSONObject>(); JSONObject mCurJsonObject = null; QianseitAdapter mNodeAdapter = new QianseitAdapter<JSONObject>(mNodeJsonObjects) { @Override public View getView(int arg0, View arg1, ViewGroup arg2) { // TODO Auto-generated method stub if (arg1 == null) { arg1 = View.inflate(mActivity, R.layout.item_comm_home_grid, null); arg1.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { // TODO Auto-generated method stub JSONObject nItem = (JSONObject) arg0.getTag(); Bundle nBundle = new Bundle(); nBundle.putString(Run.EXTRA_CLASS_ID, nItem.optString("node_id")); nBundle.putString(Run.EXTRA_TITLE, nItem.optString("node_name")); startActivity(AgentActivity.FRAGMENT_COMMUNITY_NOTE_LIST, nBundle); } }); } JSONObject nItem = getItem(arg0); arg1.setTag(nItem); displaySquareImage((ImageView) arg1.findViewById(R.id.gridview_icon), nItem.optString("image")); ((TextView) arg1.findViewById(R.id.gridview_title)).setText(nItem.optString("node_name")); return arg1; } }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mActionBar.setTitle("故事"); } @Override protected View getItemView(JSONObject responseJson, View convertView, ViewGroup parent) { // TODO Auto-generated method stub if (convertView == null) { convertView = View.inflate(mActivity, R.layout.item_community, null); convertView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub mCurJsonObject = (JSONObject) v.getTag(); Bundle nBundle = new Bundle(); nBundle.putString(Run.EXTRA_ARTICLE_ID, mCurJsonObject.optString("article_id")); nBundle.putString(Run.EXTRA_DATA, mCurJsonObject.optString("s_url")); startActivityForResult(AgentActivity.FRAGMENT_COMMUNITY_COMMENT, nBundle, REQUEST_DETAIL); } }); convertView.findViewById(R.id.comment).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub mCurJsonObject = (JSONObject) v.getTag(); Bundle nBundle = new Bundle(); nBundle.putString(Run.EXTRA_ARTICLE_ID, mCurJsonObject.optString("article_id")); nBundle.putString(Run.EXTRA_DATA, mCurJsonObject.optString("s_url")); startActivityForResult(AgentActivity.FRAGMENT_COMMUNITY_COMMENT, nBundle, REQUEST_DETAIL); } }); convertView.findViewById(R.id.praise).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub final JSONObject nJsonObject = (JSONObject) v.getTag(); new ArticleAddPraiseDiscoverInterface(Community1Fragment.this, nJsonObject.optString("article_id")) { @Override public void SuccCallBack(JSONObject responseJson) { // TODO Auto-generated method stub try { int nPraise = nJsonObject.optInt("praise_nums", 0); if (nJsonObject.optBoolean("ifpraise")) { nJsonObject.put("ifpraise", false); nJsonObject.put("praise_nums", nPraise - 1); } else { nJsonObject.put("ifpraise", true); nJsonObject.put("praise_nums", nPraise + 1); } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } mAdapter.notifyDataSetChanged(); } }.RunRequest(); } }); } ImageView img=(ImageView) convertView.findViewById(R.id.image); displayRectangleImage(img, responseJson.optString("s_url")); ((TextView) convertView.findViewById(R.id.title)).setText(responseJson.optString("title")); ((TextView) convertView.findViewById(R.id.brief)).setText(responseJson.optString("brief")); convertView.findViewById(R.id.praise).setSelected(responseJson.optBoolean("ifpraise")); ((TextView) convertView.findViewById(R.id.comment)).setText(responseJson.optString("discuss_nums")); ((TextView) convertView.findViewById(R.id.praise)).setText(responseJson.optString("praise_nums")); convertView.setTag(responseJson); convertView.findViewById(R.id.praise).setTag(responseJson); convertView.findViewById(R.id.comment).setTag(responseJson); return convertView; } @Override protected List<JSONObject> fetchDatas(JSONObject responseJson) { // TODO Auto-generated method stub List<JSONObject> nJsonObjects = new ArrayList<JSONObject>(); JSONArray nArray = responseJson.optJSONArray("nodes"); if (nArray != null && nArray.length() > 0) { mNodeJsonObjects.clear(); for (int i = 0; i < nArray.length(); i++) { mNodeJsonObjects.add(nArray.optJSONObject(i)); } mNodeAdapter.notifyDataSetChanged(); } nArray = responseJson.optJSONArray("articles"); if (nArray == null || nArray.length() <= 0) { return nJsonObjects; } for (int i = 0; i < nArray.length(); i++) { nJsonObjects.add(nArray.optJSONObject(i)); } return nJsonObjects; } @Override protected String requestInterfaceName() { // TODO Auto-generated method stub return "content.article.story_index"; } @Override protected void addHeader(XPullDownListView listView) { // TODO Auto-generated method stub View nView = View.inflate(mActivity, R.layout.header_community, null); mGridView = (GridView) nView.findViewById(R.id.nodes); mGridView.setAdapter(mNodeAdapter); listView.addHeaderView(nView); PageEnable(false); mListView.setPullRefreshEnable(true); AutoLoad(false); } @Override public void onResume() { // TODO Auto-generated method stub super.onResume(); onRefresh(); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub if (resultCode != Activity.RESULT_OK) { return; } if (requestCode == REQUEST_DETAIL) { try { JSONObject nJsonObject = new JSONObject(data.getStringExtra(Run.EXTRA_DATA)); mCurJsonObject.put("praise_nums", nJsonObject.opt("praise_nums")); mCurJsonObject.put("discuss_nums", nJsonObject.opt("discuss_nums")); mCurJsonObject.put("ifpraise", nJsonObject.opt("ifpraise")); mAdapter.notifyDataSetChanged(); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } return; } super.onActivityResult(requestCode, resultCode, data); } }
[ "xiongerxiongda@gmail.com" ]
xiongerxiongda@gmail.com
aee016514faef06ac0447a99b0d47c60ef48d599
8782051a18d608de4c0c64229153f1636b60c528
/jps/model-impl/src/org/jetbrains/jps/model/module/impl/JpsModuleImpl.java
5fcbfa581d95839bb1f35ba1b0046606f6706077
[ "Apache-2.0" ]
permissive
DavyLin/intellij-community
1401c4b79fae36bbcfd6fa540496c29edfd80c83
713829cd75a25e2f8fa43439771dd3a7feb1df9d
refs/heads/master
2020-12-25T05:16:52.553204
2012-06-27T23:02:15
2012-06-27T23:03:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,049
java
package org.jetbrains.jps.model.module.impl; import org.jetbrains.annotations.NotNull; import org.jetbrains.jps.model.JpsElementCollection; import org.jetbrains.jps.model.JpsElementKind; import org.jetbrains.jps.model.JpsElementProperties; import org.jetbrains.jps.model.JpsUrlList; import org.jetbrains.jps.model.impl.*; import org.jetbrains.jps.model.library.JpsLibrary; import org.jetbrains.jps.model.library.JpsLibraryCollection; import org.jetbrains.jps.model.library.JpsLibraryType; import org.jetbrains.jps.model.library.impl.JpsLibraryCollectionImpl; import org.jetbrains.jps.model.library.impl.JpsLibraryKind; import org.jetbrains.jps.model.module.*; import java.util.List; /** * @author nik */ public class JpsModuleImpl extends JpsNamedCompositeElementBase<JpsModuleImpl, JpsProjectImpl> implements JpsModule { private static final JpsTypedDataKind<JpsModuleType<?>> TYPED_DATA_KIND = new JpsTypedDataKind<JpsModuleType<?>>(); private static final JpsUrlListKind CONTENT_ROOTS_KIND = new JpsUrlListKind("content roots"); private static final JpsUrlListKind EXCLUDED_ROOTS_KIND = new JpsUrlListKind("excluded roots"); public static final JpsElementKind<JpsDependenciesListImpl> DEPENDENCIES_LIST_KIND = new JpsElementKindBase<JpsDependenciesListImpl>("dependencies"); private final JpsLibraryCollection myLibraryCollection; public JpsModuleImpl(JpsModuleType type, @NotNull String name) { super(name); myContainer.setChild(TYPED_DATA_KIND, new JpsTypedDataImpl<JpsModuleType<?>>(type)); myContainer.setChild(CONTENT_ROOTS_KIND); myContainer.setChild(EXCLUDED_ROOTS_KIND); myContainer.setChild(DEPENDENCIES_LIST_KIND, new JpsDependenciesListImpl()); myLibraryCollection = new JpsLibraryCollectionImpl(myContainer.setChild(JpsLibraryKind.LIBRARIES_COLLECTION_KIND)); myContainer.setChild(JpsModuleSourceRootKind.ROOT_COLLECTION_KIND); myContainer.setChild(JpsSdkReferencesTableImpl.KIND, new JpsSdkReferencesTableImpl()); } private JpsModuleImpl(JpsModuleImpl original) { super(original); myLibraryCollection = new JpsLibraryCollectionImpl(myContainer.getChild(JpsLibraryKind.LIBRARIES_COLLECTION_KIND)); } @NotNull @Override public JpsModuleImpl createCopy() { return new JpsModuleImpl(this); } @NotNull @Override public JpsUrlList getContentRootsList() { return myContainer.getChild(CONTENT_ROOTS_KIND); } @NotNull public JpsUrlList getExcludeRootsList() { return myContainer.getChild(EXCLUDED_ROOTS_KIND); } @NotNull @Override public List<JpsModuleSourceRoot> getSourceRoots() { return myContainer.getChild(JpsModuleSourceRootKind.ROOT_COLLECTION_KIND).getElements(); } @NotNull @Override public <P extends JpsElementProperties> JpsModuleSourceRoot addSourceRoot(@NotNull JpsModuleSourceRootType<P> rootType, @NotNull String url) { return addSourceRoot(rootType, url, rootType.createDefaultProperties()); } @NotNull @Override public <P extends JpsElementProperties> JpsModuleSourceRoot addSourceRoot(@NotNull JpsModuleSourceRootType<P> rootType, @NotNull String url, @NotNull P properties) { final JpsModuleSourceRootImpl root = new JpsModuleSourceRootImpl(url, rootType); myContainer.getChild(JpsModuleSourceRootKind.ROOT_COLLECTION_KIND).addChild(root); root.setProperties(rootType, properties); return root; } @Override public void removeSourceRoot(@NotNull JpsModuleSourceRootType rootType, @NotNull String url) { final JpsElementCollectionImpl<JpsModuleSourceRoot> roots = myContainer.getChild(JpsModuleSourceRootKind.ROOT_COLLECTION_KIND); for (JpsModuleSourceRoot root : roots.getElements()) { if (root.getRootType().equals(rootType) && root.getUrl().equals(url)) { roots.removeChild(root); break; } } } @NotNull @Override public JpsDependenciesList getDependenciesList() { return myContainer.getChild(DEPENDENCIES_LIST_KIND); } @Override @NotNull public JpsSdkReferencesTable getSdkReferencesTable() { return myContainer.getChild(JpsSdkReferencesTableImpl.KIND); } @Override public void delete() { //noinspection unchecked ((JpsElementCollection<JpsModule>)myParent).removeChild(this); } @NotNull @Override public JpsModuleReference createReference() { return new JpsModuleReferenceImpl(getName()); } @NotNull @Override public JpsLibrary addModuleLibrary(@NotNull JpsLibraryType<?> type, @NotNull String name) { return myLibraryCollection.addLibrary(type, name); } @Override public void addModuleLibrary(final @NotNull JpsLibrary library) { myLibraryCollection.addLibrary(library); } @NotNull @Override public JpsLibraryCollection getLibraryCollection() { return myLibraryCollection; } }
[ "Nikolay.Chashnikov@jetbrains.com" ]
Nikolay.Chashnikov@jetbrains.com
dba3f6b4671b2c4280caf526805847ea032b6ecc
eb5af3e0f13a059749b179c988c4c2f5815feb0f
/cloud/auth/src/main/java/com/woniu/auth/mbg/mapper/UserinfoMapper.java
55a40580c47b6fee08fc90762a0bfa57afc8248b
[]
no_license
xiakai007/wokniuxcode
ae686753da5ec3dd607b0246ec45fb11cf6b8968
d9918fb349bc982f0ee9d3ea3bf7537e11d062a2
refs/heads/master
2023-04-13T02:54:15.675440
2021-05-02T05:09:47
2021-05-02T05:09:47
363,570,147
0
0
null
null
null
null
UTF-8
Java
false
false
3,130
java
package com.woniu.auth.mbg.mapper; import com.woniu.auth.mbg.model.Userinfo; import com.woniu.auth.mbg.model.UserinfoExample; import java.util.List; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; public interface UserinfoMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:36 CST 2021 */ long countByExample(UserinfoExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:36 CST 2021 */ int deleteByExample(UserinfoExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:36 CST 2021 */ int deleteByPrimaryKey(Integer uid); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:36 CST 2021 */ int insert(Userinfo record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:37 CST 2021 */ int insertSelective(Userinfo record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:37 CST 2021 */ List<Userinfo> selectByExample(UserinfoExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:37 CST 2021 */ Userinfo selectByPrimaryKey(Integer uid); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:37 CST 2021 */ int updateByExampleSelective(@Param("record") Userinfo record, @Param("example") UserinfoExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:37 CST 2021 */ int updateByExample(@Param("record") Userinfo record, @Param("example") UserinfoExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:37 CST 2021 */ int updateByPrimaryKeySelective(Userinfo record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table userinfo * * @mbg.generated Sun Jan 17 11:42:37 CST 2021 */ int updateByPrimaryKey(Userinfo record); Userinfo selectUserinfoLogin(@Param("username") String username,@Param("password")String password); }
[ "980385778@qq.com" ]
980385778@qq.com
743000782e21a0dc7ef2e50014255e372a42124b
318c60538b09b1d95f2c3770c42913461bf95004
/app/src/main/java/com/easemob/chatuidemo/parse/UserProfileManager.java
d9097f72c99742de6ccf91b5c7086fb1eb120dcb
[]
no_license
zsj6102/lilian
dc49cbf4529f3652453f3745dfa2070dc0557e7c
172982b191a673cd6af6c40a3407bfdd5f9211f3
refs/heads/master
2021-04-09T11:14:35.876502
2018-03-16T06:37:44
2018-03-16T06:37:44
125,473,936
0
0
null
null
null
null
UTF-8
Java
false
false
5,853
java
package com.easemob.chatuidemo.parse; import android.content.Context; import android.util.Log; import com.easemob.EMValueCallBack; import com.easemob.chat.EMChat; import com.easemob.chat.EMChatManager; import com.easemob.chatuidemo.DemoHelper.DataSyncListener; import com.easemob.chatuidemo.ui.ChatActivity; import com.easemob.chatuidemo.utils.PreferenceManager; import com.easemob.easeui.domain.EaseUser; import org.soshow.beautyedu.activity.user.PersonInfoActivity; import org.soshow.beautyedu.application.MyApplication; import org.soshow.beautyedu.utils.SPUtils; import java.util.ArrayList; import java.util.List; public class UserProfileManager { /** * application context */ protected Context appContext = null; /** * init flag: test if the sdk has been inited before, we don't need to init * again */ private boolean sdkInited = false; /** * HuanXin sync contact nick and avatar listener */ private List<DataSyncListener> syncContactInfosListeners; private boolean isSyncingContactInfosWithServer = false; private EaseUser currentUser; public UserProfileManager() { } public synchronized boolean init(Context context) { if (sdkInited) { return true; } appContext = context; ParseManager.getInstance().onInit(context); syncContactInfosListeners = new ArrayList<DataSyncListener>(); sdkInited = true; return true; } public void addSyncContactInfoListener(DataSyncListener listener) { if (listener == null) { return; } if (!syncContactInfosListeners.contains(listener)) { syncContactInfosListeners.add(listener); } } public void removeSyncContactInfoListener(DataSyncListener listener) { if (listener == null) { return; } if (syncContactInfosListeners.contains(listener)) { syncContactInfosListeners.remove(listener); } } public void asyncFetchContactInfosFromServer(List<String> usernames, final EMValueCallBack<List<EaseUser>> callback) { if (isSyncingContactInfosWithServer) { return; } isSyncingContactInfosWithServer = true; ParseManager.getInstance().getContactInfos(usernames, new EMValueCallBack<List<EaseUser>>() { @Override public void onSuccess(List<EaseUser> value) { isSyncingContactInfosWithServer = false; // in case that logout already before server returns,we should // return immediately if (!EMChat.getInstance().isLoggedIn()) { return; } if (callback != null) { callback.onSuccess(value); } } @Override public void onError(int error, String errorMsg) { isSyncingContactInfosWithServer = false; if (callback != null) { callback.onError(error, errorMsg); } } }); } public void notifyContactInfosSyncListener(boolean success) { for (DataSyncListener listener : syncContactInfosListeners) { listener.onSyncComplete(success); } } public boolean isSyncingContactInfoWithServer() { return isSyncingContactInfosWithServer; } public synchronized void reset() { isSyncingContactInfosWithServer = false; currentUser = null; PreferenceManager.getInstance().removeCurrentUserInfo(); } public synchronized EaseUser getCurrentUserInfo() { if (currentUser == null) { String username = EMChatManager.getInstance().getCurrentUser(); currentUser = new EaseUser(username); String nick = getCurrentUserNick(); currentUser.setNick((nick != null) ? nick : username); currentUser.setAvatar((String)SPUtils.get(MyApplication.applicationContext,"headUrl","")); } if(PersonInfoActivity.isChangeOver){ currentUser.setAvatar((String)SPUtils.get(MyApplication.applicationContext,"headUrl","")); } return currentUser; } public boolean updateCurrentUserNickName(final String nickname) { boolean isSuccess = ParseManager.getInstance().updateParseNickName(nickname); if (isSuccess) { setCurrentUserNick(nickname); } return isSuccess; } public String uploadUserAvatar(byte[] data) { String avatarUrl = ParseManager.getInstance().uploadParseAvatar(data); if (avatarUrl != null) { setCurrentUserAvatar(avatarUrl); } return avatarUrl; } public void asyncGetCurrentUserInfo() { ParseManager.getInstance().asyncGetCurrentUserInfo(new EMValueCallBack<EaseUser>() { @Override public void onSuccess(final EaseUser value) { if(value != null){ setCurrentUserNick(value.getNick()); setCurrentUserAvatar(value.getAvatar()); new Thread(new Runnable() { @Override public void run() { // 更新当前用户的nickname 此方法的作用是在ios离线推送时能够显示用户nick boolean updatenick = EMChatManager.getInstance().updateCurrentUserNick( value.getNick(), true); if (!updatenick) { Log.e("user", "update current user nick fail"); } } }).start(); } } @Override public void onError(int error, String errorMsg) { } }); } public void asyncGetUserInfo(final String username,final EMValueCallBack<EaseUser> callback){ ParseManager.getInstance().asyncGetUserInfo(username, callback); } private void setCurrentUserNick(String nickname) { getCurrentUserInfo().setNick(nickname); PreferenceManager.getInstance().setCurrentUserNick(nickname); } public void setCurrentUserAvatar(String avatar) { getCurrentUserInfo().setAvatar(avatar); PreferenceManager.getInstance().setCurrentUserAvatar(avatar); } private String getCurrentUserNick() { return PreferenceManager.getInstance().getCurrentUserNick(); } private String getCurrentUserAvatar() { return PreferenceManager.getInstance().getCurrentUserAvatar(); } }
[ "610257110@qq.com" ]
610257110@qq.com
c8c65c05dca3d270687fc7c489fe62db8cf42144
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Cli-37/org.apache.commons.cli.DefaultParser/BBC-F0-opt-90/tests/5/org/apache/commons/cli/DefaultParser_ESTest_scaffolding.java
9ba8de699cdbfb347c60b1b3de8755a51fe28e9c
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
4,497
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Oct 13 13:43:03 GMT 2021 */ package org.apache.commons.cli; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class DefaultParser_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.cli.DefaultParser"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DefaultParser_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.cli.UnrecognizedOptionException", "org.apache.commons.cli.CommandLineParser", "org.apache.commons.cli.Options", "org.apache.commons.cli.Option$Builder", "org.apache.commons.cli.MissingOptionException", "org.apache.commons.cli.DefaultParser", "org.apache.commons.cli.AmbiguousOptionException", "org.apache.commons.cli.Option$1", "org.apache.commons.cli.AlreadySelectedException", "org.apache.commons.cli.ParseException", "org.apache.commons.cli.OptionValidator", "org.apache.commons.cli.OptionGroup", "org.apache.commons.cli.CommandLine", "org.apache.commons.cli.Option", "org.apache.commons.cli.MissingArgumentException", "org.apache.commons.cli.Util" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DefaultParser_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.cli.DefaultParser", "org.apache.commons.cli.Options", "org.apache.commons.cli.CommandLine", "org.apache.commons.cli.Option", "org.apache.commons.cli.OptionValidator", "org.apache.commons.cli.Util", "org.apache.commons.cli.ParseException", "org.apache.commons.cli.MissingOptionException", "org.apache.commons.cli.OptionGroup", "org.apache.commons.cli.UnrecognizedOptionException", "org.apache.commons.cli.Option$Builder", "org.apache.commons.cli.MissingArgumentException", "org.apache.commons.cli.AmbiguousOptionException" ); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
aa8437cc467ab7c598cd855238c5bce10a41be32
948988825700426256460221d2ecb5f673933447
/blog/src/main/java/org/jhipster/org/domain/User.java
13533b91c7073cbd114f75e71bf54bccbea9a3c1
[]
no_license
daniels75/jhipster
55273ff9b24cd5e9e02830e0c55e416d3cb01e08
5979805c37aa102296044bc35624cfeca28e4872
refs/heads/master
2021-08-16T04:12:43.909029
2020-01-23T19:05:01
2020-01-23T19:05:01
217,149,996
0
0
null
null
null
null
UTF-8
Java
false
false
5,584
java
package org.jhipster.org.domain; import org.jhipster.org.config.Constants; import com.fasterxml.jackson.annotation.JsonIgnore; import org.apache.commons.lang3.StringUtils; import org.hibernate.annotations.BatchSize; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; import javax.validation.constraints.Email; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; import java.io.Serializable; import java.time.Instant; import java.util.HashSet; import java.util.Locale; import java.util.Set; /** * A user. */ @Entity @Table(name = "jhi_user") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public class User extends AbstractAuditingEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") @SequenceGenerator(name = "sequenceGenerator") private Long id; @NotNull @Pattern(regexp = Constants.LOGIN_REGEX) @Size(min = 1, max = 50) @Column(length = 50, unique = true, nullable = false) private String login; @JsonIgnore @NotNull @Size(min = 60, max = 60) @Column(name = "password_hash", length = 60, nullable = false) private String password; @Size(max = 50) @Column(name = "first_name", length = 50) private String firstName; @Size(max = 50) @Column(name = "last_name", length = 50) private String lastName; @Email @Size(min = 5, max = 254) @Column(length = 254, unique = true) private String email; @NotNull @Column(nullable = false) private boolean activated = false; @Size(min = 2, max = 10) @Column(name = "lang_key", length = 10) private String langKey; @Size(max = 256) @Column(name = "image_url", length = 256) private String imageUrl; @Size(max = 20) @Column(name = "activation_key", length = 20) @JsonIgnore private String activationKey; @Size(max = 20) @Column(name = "reset_key", length = 20) @JsonIgnore private String resetKey; @Column(name = "reset_date") private Instant resetDate = null; @JsonIgnore @ManyToMany @JoinTable( name = "jhi_user_authority", joinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "authority_name", referencedColumnName = "name")}) @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) @BatchSize(size = 20) private Set<Authority> authorities = new HashSet<>(); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getLogin() { return login; } // Lowercase the login before saving it in database public void setLogin(String login) { this.login = StringUtils.lowerCase(login, Locale.ENGLISH); } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public boolean getActivated() { return activated; } public void setActivated(boolean activated) { this.activated = activated; } public String getActivationKey() { return activationKey; } public void setActivationKey(String activationKey) { this.activationKey = activationKey; } public String getResetKey() { return resetKey; } public void setResetKey(String resetKey) { this.resetKey = resetKey; } public Instant getResetDate() { return resetDate; } public void setResetDate(Instant resetDate) { this.resetDate = resetDate; } public String getLangKey() { return langKey; } public void setLangKey(String langKey) { this.langKey = langKey; } public Set<Authority> getAuthorities() { return authorities; } public void setAuthorities(Set<Authority> authorities) { this.authorities = authorities; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof User)) { return false; } return id != null && id.equals(((User) o).id); } @Override public int hashCode() { return 31; } @Override public String toString() { return "User{" + "login='" + login + '\'' + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", email='" + email + '\'' + ", imageUrl='" + imageUrl + '\'' + ", activated='" + activated + '\'' + ", langKey='" + langKey + '\'' + ", activationKey='" + activationKey + '\'' + "}"; } }
[ "daniel.sadowski75@gmail.com" ]
daniel.sadowski75@gmail.com
5ce0283b1aace92ecaaee36fe716b6c1f0b03ce8
b998bd5c02adcb8884be26699c73d153ec9ab069
/src/main/java/com/concur/basesource/support/spring/StorageManagerFactory.java
8d9623fcf93b445358a4fa14d1469048a3f76b01
[]
no_license
Jakegogo/basesource
ea1926f4a91c7dea4dbd513d83cb2abaec46ffd5
539863bd4f34c20dfe4fa0630b7256af28dfec20
refs/heads/master
2022-12-08T14:50:28.454257
2018-07-30T12:57:30
2018-07-30T12:57:30
134,071,486
0
0
null
null
null
null
UTF-8
Java
false
false
2,468
java
package com.concur.basesource.support.spring; import com.concur.basesource.storage.ResourceDefinition; import com.concur.basesource.storage.StorageManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.FactoryBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import javax.annotation.PostConstruct; import java.util.List; import java.util.Map; /** * 资源管理器工厂 * * @author jake */ public class StorageManagerFactory implements FactoryBean<StorageManager>, ApplicationContextAware { private static final Logger logger = LoggerFactory.getLogger(StorageManagerFactory.class); /** * 资源定义列表 */ private List<ResourceDefinition> definitions; /** * 文件映射列表 */ private Map<String, Class<?>> resourceMap; /** * * 资源文件路径 */ private String resourcePath; public void setDefinitions(List<ResourceDefinition> definitions) { this.definitions = definitions; } public void setResourceMap(Map<String, Class<?>> resourceMap) { this.resourceMap = resourceMap; } public void setResourcePath(String resourcePath) { this.resourcePath = resourcePath; } private StorageManager storageManager; @PostConstruct protected void initialize() { storageManager = this.applicationContext.getAutowireCapableBeanFactory().createBean(StorageManager.class); storageManager.setResourceMap(resourceMap); storageManager.startListeningPath(resourcePath); for (ResourceDefinition definition : definitions) { storageManager.initialize(definition); logger.warn("基础数据" + definition.getClz().getName() + "初始化完成"); } } @Override public StorageManager getObject() throws Exception { return storageManager; } // 实现接口的方法 @Override public Class<StorageManager> getObjectType() { return StorageManager.class; } @Override public boolean isSingleton() { return true; } private ApplicationContext applicationContext; @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; } }
[ "335923591@qq.com" ]
335923591@qq.com
0b20a8552e536c0fba53bd64d20d8c3d246428bf
6a52dad41efd4f8e46c1189feaaeb50d18ff241c
/test/org/sagebionetworks/bridge/services/email/ParticipantRosterProviderTest.java
293a1c755fc2e16e8ea6c1fabcf2372374ac4d7e
[]
no_license
ICTatRTI/BridgePF
5d180fc81b8a9363e5330a69fcefe5b8f1b8285e
b1f7aa06ded326ae91ec99ed205cd8eea9be4b79
refs/heads/develop
2021-01-24T21:30:07.822654
2015-10-09T22:59:48
2015-10-09T22:59:48
38,717,620
0
0
null
2015-07-07T22:12:24
2015-07-07T22:12:24
null
UTF-8
Java
false
false
4,863
java
package org.sagebionetworks.bridge.services.email; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import org.junit.Before; import org.junit.Test; import org.sagebionetworks.bridge.TestUtils; import org.sagebionetworks.bridge.dao.ParticipantOption.SharingScope; import org.sagebionetworks.bridge.models.accounts.UserProfile; import org.sagebionetworks.bridge.models.studies.Study; import org.sagebionetworks.bridge.models.studies.StudyParticipant; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.newrelic.agent.deps.com.google.common.base.Joiner; public class ParticipantRosterProviderTest { private Study study; @Before public void setUp() throws Exception { study = TestUtils.getValidStudy(ParticipantRosterProviderTest.class); study.setUserProfileAttributes(Sets.newHashSet("phone", "recontact")); } @Test public void participantsCorrectlyDescribedInText() { StudyParticipant participant = new StudyParticipant(); participant.setFirstName("First"); participant.setLastName("Last"); participant.setEmail("test@test.com"); participant.put("phone", "(123) 456-7890"); participant.setNotifyByEmail(Boolean.FALSE); participant.put("recontact", "true"); List<StudyParticipant> participants = Lists.newArrayList(participant); ParticipantRosterProvider provider = new ParticipantRosterProvider(study, participants); assertEquals("There is 1 user enrolled in this study. Please see the attached TSV file.\n", provider.createInlineParticipantRoster()); StudyParticipant numberTwo = new StudyParticipant(); numberTwo.setEmail("test2@test.com"); participants.add(numberTwo); assertTrue(provider.createInlineParticipantRoster().contains( "There are 2 users enrolled in this study. Please see the attached TSV file.\n")); participants.clear(); assertTrue(provider.createInlineParticipantRoster().contains( "There are no users enrolled in this study.\n")); } @Test public void participantsCorrectlyDescribedInCSV() { StudyParticipant participant = new StudyParticipant(); participant.setFirstName("First"); participant.setLastName("Last"); participant.setEmail("test@test.com"); participant.put("phone", "(123)\t456-7890"); // Tab snuck into this string should be converted to a space participant.setNotifyByEmail(Boolean.FALSE); participant.put("recontact", "false"); participant.put(UserProfile.SHARING_SCOPE_FIELD, SharingScope.NO_SHARING.name()); List<StudyParticipant> participants = Lists.newArrayList(participant); String headerString = row("Email", "First Name", "Last Name", "Sharing Scope", "Email Notifications", "Phone", "Recontact"); ParticipantRosterProvider provider = new ParticipantRosterProvider(study, participants); String output = headerString + row("test@test.com", "First", "Last", "Not Sharing", "false", "(123) 456-7890", "false"); assertEquals("1", output, provider.createParticipantTSV()); participant.setLastName(null); output = headerString + row("test@test.com","First","","Not Sharing","false","(123) 456-7890","false"); assertEquals("2", output, provider.createParticipantTSV()); participant.setFirstName(null); participant.setLastName("Last"); output = headerString + row("test@test.com","","Last","Not Sharing","false","(123) 456-7890","false"); assertEquals("3", output, provider.createParticipantTSV()); participant.remove("phone"); output = headerString + row("test@test.com","","Last","Not Sharing","false","","false"); assertEquals("4", output, provider.createParticipantTSV()); participant.remove(UserProfile.SHARING_SCOPE_FIELD); output = headerString + row("test@test.com","","Last","","false","","false"); assertEquals("5", output, provider.createParticipantTSV()); StudyParticipant numberTwo = new StudyParticipant(); numberTwo.setEmail("test2@test.com"); // This is pretty broken, but you should still get output. participants.add(numberTwo); output = headerString + row("test@test.com","","Last","","false","","false") + row("test2@test.com","","","","","",""); assertEquals("6", output, provider.createParticipantTSV()); participants.clear(); assertEquals(headerString, provider.createParticipantTSV()); } private String row(String... fields) { return Joiner.on("\t").join(fields) + "\n"; } }
[ "alx.dark@sagebase.org" ]
alx.dark@sagebase.org
33fb9bbb0c4bfffb9c98f7c1fd97594a5633a943
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/budejie/sources/android/support/v4/view/ActionProvider.java
22a5614aea54419a11e846e9e739c274716d00ef
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
2,440
java
package android.support.v4.view; import android.content.Context; import android.util.Log; import android.view.MenuItem; import android.view.SubMenu; import android.view.View; public abstract class ActionProvider { private static final String TAG = "ActionProvider(support)"; private final Context mContext; private SubUiVisibilityListener mSubUiVisibilityListener; private VisibilityListener mVisibilityListener; public interface SubUiVisibilityListener { void onSubUiVisibilityChanged(boolean z); } public interface VisibilityListener { void onActionProviderVisibilityChanged(boolean z); } public abstract View onCreateActionView(); public ActionProvider(Context context) { this.mContext = context; } public Context getContext() { return this.mContext; } public View onCreateActionView(MenuItem menuItem) { return onCreateActionView(); } public boolean overridesItemVisibility() { return false; } public boolean isVisible() { return true; } public void refreshVisibility() { if (this.mVisibilityListener != null && overridesItemVisibility()) { this.mVisibilityListener.onActionProviderVisibilityChanged(isVisible()); } } public boolean onPerformDefaultAction() { return false; } public boolean hasSubMenu() { return false; } public void onPrepareSubMenu(SubMenu subMenu) { } public void subUiVisibilityChanged(boolean z) { if (this.mSubUiVisibilityListener != null) { this.mSubUiVisibilityListener.onSubUiVisibilityChanged(z); } } public void setSubUiVisibilityListener(SubUiVisibilityListener subUiVisibilityListener) { this.mSubUiVisibilityListener = subUiVisibilityListener; } public void setVisibilityListener(VisibilityListener visibilityListener) { if (!(this.mVisibilityListener == null || visibilityListener == null)) { Log.w(TAG, "setVisibilityListener: Setting a new ActionProvider.VisibilityListener when one is already set. Are you reusing this " + getClass().getSimpleName() + " instance while it is still in use somewhere else?"); } this.mVisibilityListener = visibilityListener; } public void reset() { this.mVisibilityListener = null; this.mSubUiVisibilityListener = null; } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
4cbc21c71e04cb63a45e3d60bcfe110c062dad12
f6c8c56969ea1be7dab4a99e1a3d5be6a9af697d
/L2JHellasC/.svn/pristine/2f/2f4e43b864d2fd57a767bb29fec13c9b1e8426a8.svn-base
f7956ab18a3a08be1e90f5912190115d2a9adb2a
[]
no_license
AwakeNz/L2jHellas
25302349704c603122b6e49649d3fff3e83af899
d006d9be7312d926d4ffde4fed8d45d9728ebf0a
refs/heads/master
2021-06-21T15:09:51.344214
2017-08-16T15:39:58
2017-08-16T15:39:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,613
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jhellas.gameserver.model.actor.instance; import java.util.concurrent.ScheduledFuture; import com.l2jhellas.gameserver.ThreadPoolManager; import com.l2jhellas.gameserver.model.L2Object; import com.l2jhellas.gameserver.model.L2Skill; import com.l2jhellas.gameserver.model.actor.L2Character; import com.l2jhellas.gameserver.model.actor.L2Npc; import com.l2jhellas.gameserver.network.serverpackets.MagicSkillUse; import com.l2jhellas.gameserver.skills.SkillTable; import com.l2jhellas.gameserver.templates.L2NpcTemplate; import com.l2jhellas.util.Rnd; /** * @author Drunkard Zabb0x * Lets drink2code! */ public class L2XmassTreeInstance extends L2Npc { private final ScheduledFuture<?> _aiTask; class XmassAI implements Runnable { private final L2XmassTreeInstance _caster; protected XmassAI(L2XmassTreeInstance caster) { _caster = caster; } @Override public void run() { for (L2PcInstance player : getKnownList().getKnownPlayers().values()) { int i = Rnd.nextInt(3); handleCast(player, (4262 + i)); } } private boolean handleCast(L2PcInstance player, int skillId) { L2Skill skill = SkillTable.getInstance().getInfo(skillId, 1); if (player.getFirstEffect(skill) == null) { setTarget(player); doCast(skill); MagicSkillUse msu = new MagicSkillUse(_caster, player, skill.getId(), 1, skill.getHitTime(), 0); broadcastPacket(msu); return true; } return false; } } public L2XmassTreeInstance(int objectId, L2NpcTemplate template) { super(objectId, template); _aiTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new XmassAI(this), 3000, 3000); } @Override public void deleteMe() { if (_aiTask != null) _aiTask.cancel(true); super.deleteMe(); } @Override public int getDistanceToWatchObject(L2Object object) { return 900; } @Override public boolean isAutoAttackable(L2Character attacker) { return false; } }
[ "=" ]
=
6649a7e2ec65bc3147fa028a59fb607581b10048
4a7cb14aa934df8f362cf96770e3e724657938d8
/MFES/ATS/Project/structuring/projectsPOO_1920/48/Gupo41_POO2020/TrazAqui/src/Model/Exceptions/EncomendaNaoTransportadaException.java
559abdf10d3ff0cd33a44b917ce36058813d89c4
[]
no_license
pCosta99/Masters
7091a5186f581a7d73fd91a3eb31880fa82bff19
f835220de45a3330ac7a8b627e5e4bf0d01d9f1f
refs/heads/master
2023-08-11T01:01:53.554782
2021-09-22T07:51:51
2021-09-22T07:51:51
334,012,667
1
1
null
null
null
null
UTF-8
Java
false
false
353
java
package Model.Exceptions; public class EncomendaNaoTransportadaException extends Exception{ /** * Construtor vazio */ public EncomendaNaoTransportadaException(){ super(); } /** * Construtor parametrizado */ public EncomendaNaoTransportadaException (String s){ super(s); } }
[ "costapedro.a1999@gmail.com" ]
costapedro.a1999@gmail.com
d5563833702279d33bc72bdbb6623101bba9cce7
0deebd569c48a17c04c1fd952ea7de6044e1f877
/studyjava/src/practice016_ex/Test07.java
1c5944383fff1e71cc8c474618a04e0d4e70468c
[]
no_license
neem693/workspace
7e28e7a0f9f649c3bbfc141fe906956b76953aa5
14b93c231fb3daf95adcf678e75793cdb135fead
refs/heads/master
2022-05-02T21:37:38.589387
2022-03-17T17:00:45
2022-03-17T17:00:45
125,331,638
0
0
null
2018-09-02T06:56:43
2018-03-15T07:55:48
HTML
UTF-8
Java
false
false
305
java
package practice016_ex; public class Test07 { public static void main(String[] args) { // TODO Auto-generated method stub char [] str1 = {'h','e','l','l','o', ' ', 'w', 'o','r','l','d'}; String str2 =""; str2 = str2.copyValueOf(str1); System.out.println("Returend String: " + str2); } }
[ "neem693@gmail.com" ]
neem693@gmail.com
3e5ab818ff6b8159a535ef9a7f153b26eae07e1d
40768c7a7ce209f86a1ae3326c7e1e4831a989b5
/microservices-project1/spring-demo-test/src/main/java/com/springinaction/chapter_02/soundsystem/main/XmlTest.java
53b32da6602c5bfc16ae4e3f4de3b2ba2d52d818
[]
no_license
huangxuesong2018/arclncode
62b011d516f0070a83294563b009a9512a57b0f2
6fa53434433c61754b611f5afdee854d57eacace
refs/heads/master
2022-12-22T01:39:59.724402
2019-08-26T07:02:39
2019-08-26T07:02:39
152,358,991
0
0
null
2022-12-16T04:27:16
2018-10-10T03:40:32
Java
UTF-8
Java
false
false
823
java
package com.springinaction.chapter_02.soundsystem.main; import com.springinaction.chapter_02.soundsystem.bean.BlankDisc; import com.springinaction.chapter_02.soundsystem.bean.CompactDisc; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * @author HXS * @copyright * @since 2019-02-20 */ @RunWith(SpringJUnit4ClassRunner.class) //@ContextConfiguration(locations="/PropertyRefTest-context.xml") @ContextConfiguration(locations={"classpath:PropertyRefTest-context.xml"}) public class XmlTest { @Autowired private BlankDisc compactDisc; @Test public void t(){ compactDisc.play(); } }
[ "106410277@qq.com" ]
106410277@qq.com
e3b4a523f34658af91ddd5f6e6484739fa69e22c
ad360e42333c93e97e312c6b8acc682efaf82b78
/zalyplatform-storage/src/test/java/com/akaxin/platform/storage/test/TestJedisPool.java
2734d2982af23769f68ab5e9ae57e63702081046
[]
no_license
anlei586/akaxin-platform
5b9049422a789fb5b800436e0960a8c5d474be43
0f519efbcf35101729e4e57889c634fc53d51a1b
refs/heads/master
2020-06-12T20:45:17.758228
2018-11-16T08:28:54
2018-11-16T08:28:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
package com.akaxin.platform.storage.test; import com.akaxin.platform.storage.impl.redis.client.RedisPoolManager; import redis.clients.jedis.Jedis; public class TestJedisPool { public static void main(String[] args) { Jedis jedis = null; try { jedis = RedisPoolManager.getJedis(); String result = jedis.set("redisPoolTest", "100"); System.out.println(result); } catch (Exception e) { RedisPoolManager.returnBrokenResource(jedis); e.printStackTrace(); } finally { RedisPoolManager.returnResource(jedis); } } }
[ "an.guoyue254@gmail.com" ]
an.guoyue254@gmail.com
89fd44f4a1ceef2289a8e6791fa2c2eeea74d4a9
fa55027e10c36977b4a50946d663e15f8fe0faf7
/src/org/wshuai/leetcode/TeemoAttacking.java
a64295ab276cb9553906fd4a4ce3f667489b0f7f
[]
no_license
relentlesscoder/Leetcode
773a207c15ea72f6027eade8565377f11a856672
6b3ecd82d01739f6adb1caf86a770fcff0d6a54b
refs/heads/master
2021-07-05T13:35:37.312910
2020-06-21T12:48:54
2020-06-21T12:48:54
40,448,524
0
0
null
null
null
null
UTF-8
Java
false
false
566
java
package org.wshuai.leetcode; /** * Created by Wei on 03/05/2017. * #0495 https://leetcode.com/problems/teemo-attacking/ */ public class TeemoAttacking { // time O(n) public int findPoisonedDuration(int[] timeSeries, int duration) { if(timeSeries == null || timeSeries.length == 0){ return 0; } int res = duration, lastEnd = timeSeries[0] + duration; for(int i = 1; i < timeSeries.length; i++){ res += duration; if(timeSeries[i] < lastEnd){ res -= lastEnd - timeSeries[i]; } lastEnd = timeSeries[i] + duration; } return res; } }
[ "relentless.code@gmail.com" ]
relentless.code@gmail.com
401743bbf5ba81f9d2d177e93d7b8b2f17fe9441
d9b0e2c5fdcb142814b8e68c733a3a0bdca5f6ac
/src/main/java/org/shadowfax/test/web/rest/errors/BadRequestAlertException.java
9049a721a2ec453132aa5dfcbbdbeade8488399a
[]
no_license
sumithnpillai/jhipsterSampleApplication
39e51d3873c66af967dfb68c62124623b754a054
85a08370c6629ebf84104d1d9f71254b596cb228
refs/heads/master
2021-05-05T22:47:09.827062
2018-01-04T10:47:09
2018-01-04T10:47:09
116,248,586
0
0
null
null
null
null
UTF-8
Java
false
false
1,267
java
package org.shadowfax.test.web.rest.errors; import org.zalando.problem.AbstractThrowableProblem; import org.zalando.problem.Status; import java.net.URI; import java.util.HashMap; import java.util.Map; public class BadRequestAlertException extends AbstractThrowableProblem { private final String entityName; private final String errorKey; public BadRequestAlertException(String defaultMessage, String entityName, String errorKey) { this(ErrorConstants.DEFAULT_TYPE, defaultMessage, entityName, errorKey); } public BadRequestAlertException(URI type, String defaultMessage, String entityName, String errorKey) { super(type, defaultMessage, Status.BAD_REQUEST, null, null, null, getAlertParameters(entityName, errorKey)); this.entityName = entityName; this.errorKey = errorKey; } public String getEntityName() { return entityName; } public String getErrorKey() { return errorKey; } private static Map<String, Object> getAlertParameters(String entityName, String errorKey) { Map<String, Object> parameters = new HashMap<>(); parameters.put("message", "error." + errorKey); parameters.put("params", entityName); return parameters; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
b091ed0328b7147edaf2384a96113d9c9079710b
1761febbafa64f33d47a164f59de8bebb5cfbf09
/phoneProfilesPlus/src/main/java/sk/henrichg/phoneprofilesplus/BootUpReceiver.java
8ea5de32b7dbc545abe6fa5e19a3ba643fdb8e85
[ "Apache-2.0" ]
permissive
michix10/PhoneProfilesPlus
e6a349982277b186e51e85ef293d90e809dd50b6
494ad679178c3d22267938261597c974abc19d2d
refs/heads/master
2020-04-10T00:30:14.108692
2018-12-06T13:07:00
2018-12-06T13:07:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,590
java
package sk.henrichg.phoneprofilesplus; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Handler; import android.os.PowerManager; public class BootUpReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { PPApplication.logE("##### BootUpReceiver.onReceive", "xxx"); CallsCounter.logCounter(context, "BootUpReceiver.onReceive", "BootUpReceiver_onReceive"); if (intent == null) return; String action = intent.getAction(); if ((action != null) && (action.equals(Intent.ACTION_BOOT_COMPLETED) || action.equals("android.intent.action.QUICKBOOT_POWERON") || action.equals("com.htc.intent.action.QUICKBOOT_POWERON"))) { PPApplication.logE("@@@ BootUpReceiver.onReceive", "#### -- start"); PPApplication.setBlockProfileEventActions(true); PPApplication.logE("BootUpReceiver.onReceive", "applicationStartOnBoot=" + ApplicationPreferences.applicationStartOnBoot(context)); PPApplication.logE("BootUpReceiver.onReceive", "applicationStartEvents=" + ApplicationPreferences.applicationStartEvents(context)); PPApplication.logE("BootUpReceiver.onReceive", "globalEventsRunning="+Event.getGlobalEventsRunning(context)); //PPApplication.setApplicationStarted(context, false); final Context appContext = context.getApplicationContext(); PPApplication.startHandlerThread("BootUpReceiver.onReceive2"); final Handler handler2 = new Handler(PPApplication.handlerThread.getLooper()); handler2.post(new Runnable() { @Override public void run() { PowerManager powerManager = (PowerManager) appContext.getSystemService(Context.POWER_SERVICE); PowerManager.WakeLock wakeLock = null; if (powerManager != null) { wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, PPApplication.PACKAGE_NAME+":BootUpReceiver.onReceive.2"); wakeLock.acquire(10 * 60 * 1000); } if (ApplicationPreferences.applicationStartOnBoot(appContext)) { PPApplication.logE("BootUpReceiver.onReceive", "PhoneProfilesService.getInstance()=" + PhoneProfilesService.getInstance()); // start service PPApplication.setApplicationStarted(appContext, true); Intent serviceIntent = new Intent(appContext, PhoneProfilesService.class); serviceIntent.putExtra(PhoneProfilesService.EXTRA_ONLY_START, true); serviceIntent.putExtra(PhoneProfilesService.EXTRA_INITIALIZE_START, true); serviceIntent.putExtra(PhoneProfilesService.EXTRA_START_ON_BOOT, true); PPApplication.startPPService(appContext, serviceIntent); } else { PPApplication.exitApp(appContext, null, null, false, true); } if ((wakeLock != null) && wakeLock.isHeld()) { try { wakeLock.release(); } catch (Exception ignored) {} } } }); //PPApplication.logE("@@@ BootUpReceiver.onReceive", "#### -- end"); } } }
[ "henrich.gron@chello.sk" ]
henrich.gron@chello.sk
2f7c7be88595cd6904614067bd5008c7368a4e44
964bdaaf951dce333406fe601fe37d8c6e47f42f
/ch10-test2/scope/OverloadedConst2.java
0894c9d42cb083534246c361083cf33036ebdddf
[]
no_license
Mijaco/Java-SE8-OCA-Exam-1Z0-808
0641449d3e7ef5a17fa80fce942ae30bd920ea3a
dc7a178e1f8f5869cbb573e8267dbd7b1789ab4a
refs/heads/master
2020-04-01T18:53:15.539053
2018-07-07T17:21:57
2018-07-07T17:21:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
177
java
package scope; class OverloadedConst2 { public static void main(String[] asas) { OverloadedConstructor c = new OverloadedConstructor(); Car cc = new Car(); } }
[ "mercurylink@gmail.com" ]
mercurylink@gmail.com
9210db509ed4558181f4d64a0445bc72c1ac6d88
d3f39726b5dd057ea314d3f2da509e9be6ccc2da
/src/main/java/com/wytianxiatuan/wytianxia/util/BannerImageLoader.java
79f0232740803a4d4303bc1aca8a5f7da0dd6ce0
[]
no_license
huochaifanfan/wangying
f8cfe5fd84753ceddfc6163bd5205af3864edd86
b0c93665ee54e1fc301c9ceb4e5cc005b618924a
refs/heads/master
2020-04-06T17:04:31.491493
2018-11-15T03:18:59
2018-11-15T03:19:00
157,645,596
0
0
null
null
null
null
UTF-8
Java
false
false
610
java
package com.wytianxiatuan.wytianxia.util; import android.content.Context; import android.widget.ImageView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.wytianxiatuan.wytianxia.R; import com.wytianxiatuan.wytianxia.overrideview.banner.loader.ImageLoader; /** * Created by liuju on 2018/1/20. */ public class BannerImageLoader extends ImageLoader { @Override public void displayImage(Context context, Object path, ImageView imageView) { Glide.with(context).load(path).diskCacheStrategy(DiskCacheStrategy.ALL).into(imageView); } }
[ "you@example.com" ]
you@example.com
f4c7f8743e2db440c2b03f33aa2f2fd2ac1ab69b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_1db9751f5bdd235dec4d093bdad32dc2fc346b6d/TimerTest/12_1db9751f5bdd235dec4d093bdad32dc2fc346b6d_TimerTest_s.java
fa72f6154f97fbf9625b1802194f815c5b0ad42d
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,814
java
/* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat, Inc., and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.cdi.tck.test.util; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; import org.jboss.cdi.tck.util.Timer; import org.jboss.cdi.tck.util.Timer.ResolutionLogic; import org.jboss.cdi.tck.util.Timer.StopCondition; import org.testng.annotations.Test; import org.testng.internal.thread.ThreadTimeoutException; public class TimerTest { @Test(timeOut = 1000l, expectedExceptions = { ThreadTimeoutException.class }) public void testNoCondition() throws InterruptedException { new Timer().setDelay(2000l).start(); } @Test(timeOut = 1000l) public void testSingleCondition() throws InterruptedException { Timer timer = new Timer().setDelay(5000l).addStopCondition(new StopCondition() { @Override public boolean isSatisfied() { return true; } }).start(); assertTrue(timer.isStopConditionsSatisfiedBeforeTimeout()); } @Test(timeOut = 1000l) public void testMultipleConditionDisjunction() throws InterruptedException { Timer timer = new Timer().setDelay(5000l).addStopCondition(new StopCondition() { @Override public boolean isSatisfied() { return true; } }).addStopCondition(new StopCondition() { @Override public boolean isSatisfied() { return false; } }).start(); assertTrue(timer.isStopConditionsSatisfiedBeforeTimeout()); } @Test(timeOut = 1000l, expectedExceptions = { ThreadTimeoutException.class }) public void testMultipleConditionConjunction() throws InterruptedException { new Timer().setDelay(5000l).setResolutionLogic(ResolutionLogic.CONJUNCTION).addStopCondition(new StopCondition() { @Override public boolean isSatisfied() { return true; } }).addStopCondition(new StopCondition() { @Override public boolean isSatisfied() { return false; } }).start(); } @Test(timeOut = 7000l) public void testReuse() throws InterruptedException { // Will be stopped immediately Timer timer = new Timer().setDelay(5000l).addStopCondition(new StopCondition() { @Override public boolean isSatisfied() { return true; } }).start(); assertTrue(timer.isStopConditionsSatisfiedBeforeTimeout()); // Will be stopped after timeout (5s) exceeds timer.addStopCondition(new StopCondition() { @Override public boolean isSatisfied() { return false; } }, true).start(); assertFalse(timer.isStopConditionsSatisfiedBeforeTimeout()); timer.reset(); // And finally one more second timer.start(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e7fa3e18798f6b0f88e8a03961074098415e8308
296c411aecf0b8d1e0fc5ad0f87f28c6b5ca5189
/src/test/java/com/zslin/MyTest.java
c6c7dd4721bfcb7803f8d7b4de22099f934d18c2
[]
no_license
zsl131/ztw
25115e70881cc95544f92f86d0fe704cc3565ad6
795135f1ceba19c233c271b56813fa97af8db298
refs/heads/master
2021-01-13T04:19:50.650361
2017-01-08T09:22:06
2017-01-08T09:22:06
77,433,868
0
0
null
null
null
null
UTF-8
Java
false
false
765
java
package com.zslin; import com.zslin.basic.model.User; import com.zslin.basic.service.IUserService; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; /** * Created by 钟述林 393156105@qq.com on 2016/12/27 17:21. */ @SpringBootTest @RunWith(SpringRunner.class) @ActiveProfiles("zsl") public class MyTest { @Autowired private IUserService userService; @Test public void testList() { User user = userService.findByUsername("admin"); System.out.println(user.getNickname()); } }
[ "398986099@qq.com" ]
398986099@qq.com
302e05f78c0d4d318c0cbc3bf998d38043a619fe
404a189c16767191ffb172572d36eca7db5571fb
/structs/build/xml/java/gov/georgia/dhr/dfcs/sacwis/structs/input/ROWCFAD08SIG07.java
7d93efca73d14783dcca6bfecb512f9164fbede2
[]
no_license
tayduivn/training
648a8e9e91194156fb4ffb631749e6d4bf2d0590
95078fb2c7e21bf2bba31e2bbd5e404ac428da2f
refs/heads/master
2021-06-13T16:20:41.293097
2017-05-08T21:37:59
2017-05-08T21:37:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,062
java
/* * This class was automatically generated with * <a href="http://www.castor.org">Castor 1.0.5</a>, using an XML * Schema. * $Id$ */ package gov.georgia.dhr.dfcs.sacwis.structs.input; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; /** * Class ROWCFAD08SIG07. * * @version $Revision$ $Date$ */ @SuppressWarnings("serial") public class ROWCFAD08SIG07 extends gov.georgia.dhr.dfcs.sacwis.core.xml.XmlValueBean implements java.io.Serializable { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * Field _szCdHmApplcntCbx */ private java.lang.String _szCdHmApplcntCbx; /** * Field _szCdHmApplcntCbxType */ private java.lang.String _szCdHmApplcntCbxType; /** * Field _szCdSysDataActionOutcome */ private java.lang.String _szCdSysDataActionOutcome; /** * Field _tsLastUpdate */ private java.util.Date _tsLastUpdate; //----------------/ //- Constructors -/ //----------------/ public ROWCFAD08SIG07() { super(); } //-- gov.georgia.dhr.dfcs.sacwis.structs.input.ROWCFAD08SIG07() //-----------/ //- Methods -/ //-----------/ /** * Returns the value of field 'szCdHmApplcntCbx'. * * @return the value of field 'SzCdHmApplcntCbx'. */ public java.lang.String getSzCdHmApplcntCbx() { return this._szCdHmApplcntCbx; } //-- java.lang.String getSzCdHmApplcntCbx() /** * Returns the value of field 'szCdHmApplcntCbxType'. * * @return the value of field 'SzCdHmApplcntCbxType'. */ public java.lang.String getSzCdHmApplcntCbxType() { return this._szCdHmApplcntCbxType; } //-- java.lang.String getSzCdHmApplcntCbxType() /** * Returns the value of field 'szCdSysDataActionOutcome'. * * @return the value of field 'SzCdSysDataActionOutcome'. */ public java.lang.String getSzCdSysDataActionOutcome() { return this._szCdSysDataActionOutcome; } //-- java.lang.String getSzCdSysDataActionOutcome() /** * Returns the value of field 'tsLastUpdate'. * * @return the value of field 'TsLastUpdate'. */ public java.util.Date getTsLastUpdate() { return this._tsLastUpdate; } //-- java.util.Date getTsLastUpdate() /** * Method isValid * * * * @return true if this object is valid according to the schema */ public boolean isValid() { try { validate(); } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; } //-- boolean isValid() /** * * * @param out * @throws org.exolab.castor.xml.MarshalException if object is * null or if any SAXException is thrown during marshaling * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema */ public void marshal(java.io.Writer out) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); } //-- void marshal(java.io.Writer) /** * * * @param handler * @throws java.io.IOException if an IOException occurs during * marshaling * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema * @throws org.exolab.castor.xml.MarshalException if object is * null or if any SAXException is thrown during marshaling */ public void marshal(org.xml.sax.ContentHandler handler) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, handler); } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'szCdHmApplcntCbx'. * * @param szCdHmApplcntCbx the value of field 'szCdHmApplcntCbx' */ public void setSzCdHmApplcntCbx(java.lang.String szCdHmApplcntCbx) { this._szCdHmApplcntCbx = szCdHmApplcntCbx; } //-- void setSzCdHmApplcntCbx(java.lang.String) /** * Sets the value of field 'szCdHmApplcntCbxType'. * * @param szCdHmApplcntCbxType the value of field * 'szCdHmApplcntCbxType'. */ public void setSzCdHmApplcntCbxType(java.lang.String szCdHmApplcntCbxType) { this._szCdHmApplcntCbxType = szCdHmApplcntCbxType; } //-- void setSzCdHmApplcntCbxType(java.lang.String) /** * Sets the value of field 'szCdSysDataActionOutcome'. * * @param szCdSysDataActionOutcome the value of field * 'szCdSysDataActionOutcome'. */ public void setSzCdSysDataActionOutcome(java.lang.String szCdSysDataActionOutcome) { this._szCdSysDataActionOutcome = szCdSysDataActionOutcome; } //-- void setSzCdSysDataActionOutcome(java.lang.String) /** * Sets the value of field 'tsLastUpdate'. * * @param tsLastUpdate the value of field 'tsLastUpdate'. */ public void setTsLastUpdate(java.util.Date tsLastUpdate) { this._tsLastUpdate = tsLastUpdate; } //-- void setTsLastUpdate(java.util.Date) /** * Method unmarshal * * * * @param reader * @throws org.exolab.castor.xml.MarshalException if object is * null or if any SAXException is thrown during marshaling * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema * @return the unmarshaled * gov.georgia.dhr.dfcs.sacwis.structs.input.ROWCFAD08SIG07 */ public static gov.georgia.dhr.dfcs.sacwis.structs.input.ROWCFAD08SIG07 unmarshal(java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (gov.georgia.dhr.dfcs.sacwis.structs.input.ROWCFAD08SIG07) Unmarshaller.unmarshal(gov.georgia.dhr.dfcs.sacwis.structs.input.ROWCFAD08SIG07.class, reader); } //-- gov.georgia.dhr.dfcs.sacwis.structs.input.ROWCFAD08SIG07 unmarshal(java.io.Reader) /** * * * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema */ public void validate() throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); } //-- void validate() }
[ "lgeddam@gmail.com" ]
lgeddam@gmail.com
53a6ec275676c01854d4462465e9a962a2209c33
8c91cdd028ff9b33f321d6a591b01b2bc58daaa1
/src/main/java/com/mon3goo/conduminium/security/SecurityUtils.java
e4463598df3cab9cbcff753cf4261a89a7dd5982
[]
no_license
mon3goo/conduminium-management-application
af04e6d7a97c760db6b9b8ec04a4eec879c14995
e3cba49eb8dc9fabc3085eb4d7907180b1d6c8d7
refs/heads/main
2023-03-14T00:55:34.737214
2021-03-04T11:16:35
2021-03-04T11:16:35
344,447,768
0
0
null
null
null
null
UTF-8
Java
false
false
2,586
java
package com.mon3goo.conduminium.security; import java.util.Optional; import java.util.stream.Stream; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; /** * Utility class for Spring Security. */ public final class SecurityUtils { private SecurityUtils() {} /** * Get the login of the current user. * * @return the login of the current user. */ public static Optional<String> getCurrentUserLogin() { SecurityContext securityContext = SecurityContextHolder.getContext(); return Optional.ofNullable(extractPrincipal(securityContext.getAuthentication())); } private static String extractPrincipal(Authentication authentication) { if (authentication == null) { return null; } else if (authentication.getPrincipal() instanceof UserDetails) { UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal(); return springSecurityUser.getUsername(); } else if (authentication.getPrincipal() instanceof String) { return (String) authentication.getPrincipal(); } return null; } /** * Check if a user is authenticated. * * @return true if the user is authenticated, false otherwise. */ public static boolean isAuthenticated() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); return authentication != null && getAuthorities(authentication).noneMatch(AuthoritiesConstants.ANONYMOUS::equals); } /** * If the current user has a specific authority (security role). * <p> * The name of this method comes from the {@code isUserInRole()} method in the Servlet API. * * @param authority the authority to check. * @return true if the current user has the authority, false otherwise. */ public static boolean isCurrentUserInRole(String authority) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); return authentication != null && getAuthorities(authentication).anyMatch(authority::equals); } private static Stream<String> getAuthorities(Authentication authentication) { return authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
7a097dbef59aa95b7bc20e9d3d28c843b4ec51f7
dc4abe5cbc40f830725f9a723169e2cc80b0a9d6
/src/main/java/com/sgai/property/depot/entity/WarehouseOut.java
827dc4831765b690829f9ab49fb09d1a6a500a4c
[]
no_license
ppliuzf/sgai-training-property
0d49cd4f3556da07277fe45972027ad4b0b85cb9
0ce7bdf33ff9c66f254faec70ea7eef9917ecc67
refs/heads/master
2020-05-27T16:25:57.961955
2019-06-03T01:12:51
2019-06-03T01:12:51
188,697,303
0
1
null
null
null
null
UTF-8
Java
false
false
3,827
java
package com.sgai.property.depot.entity; import java.util.Date; import io.swagger.annotations.ApiModelProperty; import com.sgai.common.persistence.BoEntity; public class WarehouseOut extends BoEntity<WarehouseOut>{ @ApiModelProperty(value = "仓库名称") private String whName; //仓库名称 @ApiModelProperty(value = "仓库类型 1:实仓,2:虚仓") private Long whType; //仓库类型 1:实仓,2:虚仓 @ApiModelProperty(value = "用料申请单id") private String matApplyId; //用料申请单id @ApiModelProperty(value = "出库人id") private String outEmpId; //出库人id @ApiModelProperty(value = "仓库id") private String whId; //仓库id @ApiModelProperty(value = "调拨单id") private String allotId; //调拨单id @ApiModelProperty(value = "用料申请单名称") private String matApplyName; //用料申请单名称 @ApiModelProperty(value = "出库类型?1:调拨出库;2:用料出库;3:借出出库;4:直接出库;5:销售出库") private Long whOutType; //出库类型?1:调拨出库;2:用料出库;3:借出出库;4:直接出库;5:销售出库 @ApiModelProperty(value = "出库单号") private String whOutNo; //出库单号 @ApiModelProperty(value = "出库时间") private Date outDatetime; //出库时间 @ApiModelProperty(value = "出库人名称") private String outEmpName; //出库人名称 @ApiModelProperty(value = "出库状态?1:未出库;2:部分出库;3:全部出库") private Long whStat; //出库状态?1:未出库;2:部分出库;3:全部出库 @ApiModelProperty(value = "调拨单名称") private String allotName; //调拨单名称 public String getWhName(){ return whName; } public void setWhName(String whName){ this.whName = whName; } public Long getWhType(){ return whType; } public void setWhType(Long whType){ this.whType = whType; } public String getMatApplyId(){ return matApplyId; } public void setMatApplyId(String matApplyId){ this.matApplyId = matApplyId; } public String getOutEmpId() { return outEmpId; } public void setOutEmpId(String outEmpId) { this.outEmpId = outEmpId; } public String getWhId(){ return whId; } public void setWhId(String whId){ this.whId = whId; } public String getAllotId(){ return allotId; } public void setAllotId(String allotId){ this.allotId = allotId; } public String getMatApplyName(){ return matApplyName; } public void setMatApplyName(String matApplyName){ this.matApplyName = matApplyName; } public Long getWhOutType(){ return whOutType; } public void setWhOutType(Long whOutType){ this.whOutType = whOutType; } public String getWhOutNo(){ return whOutNo; } public void setWhOutNo(String whOutNo){ this.whOutNo = whOutNo; } public Date getOutDatetime(){ return outDatetime; } public void setOutDatetime(Date outDatetime){ this.outDatetime = outDatetime; } public String getOutEmpName(){ return outEmpName; } public void setOutEmpName(String outEmpName){ this.outEmpName = outEmpName; } public Long getWhStat(){ return whStat; } public void setWhStat(Long whStat){ this.whStat = whStat; } public String getAllotName(){ return allotName; } public void setAllotName(String allotName){ this.allotName = allotName; } }
[ "ppliuzf@sina.com" ]
ppliuzf@sina.com
669a55bdff98eeb508c3502a1d8c78ba87867007
b49081b8d8d5258d6d45ae4405fc12c40240d497
/haitao-api/src/main/java/com/thinvent/basicpf/zhhd/handler/IDictionaryItemHandler.java
ffeb5a2357e9c5ffef78f059bd5b947aaf60feb2
[]
no_license
keercers/haitao
33ef403e799c50c83bb9162e103d3e619e506a02
7fd47aa750563765ee1886f571be8f3dea3996b5
refs/heads/master
2020-03-21T12:35:06.752138
2018-06-27T10:07:36
2018-06-27T10:07:36
138,560,732
0
0
null
null
null
null
UTF-8
Java
false
false
954
java
package com.thinvent.basicpf.zhhd.handler; import java.util.List; import com.alibaba.fastjson.JSONObject; import com.thinvent.library.exception.ThinventBaseException; import com.thinvent.zhhd.common.vo.DictionaryItemVO; public interface IDictionaryItemHandler { public JSONObject getAllDictionaryItemByDictGroupId(int pageIndex, int pageSize, String dictGroupId) throws ThinventBaseException; public void saveSysDictionaryItem(DictionaryItemVO sysDictionaryItemVO) throws ThinventBaseException; public void updateSysDictionaryItem(DictionaryItemVO sysDictionaryItemVO) throws ThinventBaseException; public DictionaryItemVO findSysDictionaryItemById(String sysDictionaryItemId) throws ThinventBaseException; public List<DictionaryItemVO> findAllEnabledDictItemsByDictGroupId(String dictGroupId) throws ThinventBaseException; public List<DictionaryItemVO> findAllDictItemsByDictGroupId(String dictGroupId) throws ThinventBaseException; }
[ "keercers@lookout.com" ]
keercers@lookout.com
8570a265695cae4cd3da19adff3f8bea4ce07bc6
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/dts-20190901/src/main/java/com/aliyun/dts20190901/models/DescribeEndpointSwitchStatusResponse.java
b287a75fe25e1cc620c629ca526616ccc7b6fe25
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,497
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.dts20190901.models; import com.aliyun.tea.*; public class DescribeEndpointSwitchStatusResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public DescribeEndpointSwitchStatusResponseBody body; public static DescribeEndpointSwitchStatusResponse build(java.util.Map<String, ?> map) throws Exception { DescribeEndpointSwitchStatusResponse self = new DescribeEndpointSwitchStatusResponse(); return TeaModel.build(map, self); } public DescribeEndpointSwitchStatusResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public DescribeEndpointSwitchStatusResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public DescribeEndpointSwitchStatusResponse setBody(DescribeEndpointSwitchStatusResponseBody body) { this.body = body; return this; } public DescribeEndpointSwitchStatusResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
65f55568768cc82244a7a3945077fb14c2b4bc5b
cf219bb05ec1e56b8f5c21bab61ed9bc29900ccc
/src/test/java/it.algos.vaadflow/EAColorTest.java
7fd275d089318246a514cb5d21b1952f4c215a04
[]
no_license
OttoKaaij/vaadflow
f068d441c52f1a15452dd1fbea53b19c4c43d624
72734ebe772ea8575d6ec32136a8083444d6f71f
refs/heads/master
2020-05-29T13:34:47.438143
2019-05-24T09:28:07
2019-05-24T09:28:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,029
java
package it.algos.vaadflow; import it.algos.vaadflow.enumeration.EAColor; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; import org.mockito.MockitoAnnotations; import java.util.ArrayList; import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; /** * Project vaadflow * Created by Algos * User: gac * Date: Thu, 16-May-2019 * Time: 22:07 */ @TestInstance(TestInstance.Lifecycle.PER_CLASS) @DisplayName("Test per una Enumeration di colori") public class EAColorTest extends ATest { @BeforeAll public void setUp() { MockitoAnnotations.initMocks(this); previstoIntero = 16; }// end of method @Test @DisplayName("Estraggo un arrayList di EAColor") public void getColors() { Object lista = EAColor.getColors(); assertNotNull(lista); assertEquals(lista.getClass(), ArrayList.class); ottenutoIntero = ((ArrayList) lista).size(); assertEquals(previstoIntero, ottenutoIntero); }// end of single test @Test @DisplayName("Elenco la Enumeration EAColor") public void showEnumeration() { List<EAColor> lista = EAColor.getColors(); assertNotNull(lista); System.out.println("Nomi"); for (EAColor color : lista) { System.out.println(color.getTag()); }// end of for cycle System.out.println(""); System.out.println("Esadecimale"); for (EAColor color : lista) { System.out.println(color.getEsadecimale()); }// end of for cycle System.out.println(""); System.out.println("Nomi + esadecimale"); for (EAColor color : lista) { System.out.println(color.getTag() + ": " + color.getEsadecimale()); }// end of for cycle System.out.println(""); }// end of single test }// end of class
[ "gac@algos.it" ]
gac@algos.it
4557dfbdc87ac14ee78ae26985ed3c821b7ad5dc
13cbb329807224bd736ff0ac38fd731eb6739389
/javax/swing/text/ElementIterator.java
8f9da5f774a3025c966a6e723c5620c3528ecf27
[]
no_license
ZhipingLi/rt-source
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
refs/heads/master
2023-07-14T15:00:33.100256
2021-09-01T04:49:04
2021-09-01T04:49:04
401,933,858
0
0
null
null
null
null
UTF-8
Java
false
false
4,776
java
package javax.swing.text; import java.util.Enumeration; import java.util.Stack; public class ElementIterator implements Cloneable { private Element root; private Stack<StackItem> elementStack = null; public ElementIterator(Document paramDocument) { this.root = paramDocument.getDefaultRootElement(); } public ElementIterator(Element paramElement) { this.root = paramElement; } public Object clone() { try { ElementIterator elementIterator = new ElementIterator(this.root); if (this.elementStack != null) { elementIterator.elementStack = new Stack(); for (byte b = 0; b < this.elementStack.size(); b++) { StackItem stackItem1 = (StackItem)this.elementStack.elementAt(b); StackItem stackItem2 = (StackItem)stackItem1.clone(); elementIterator.elementStack.push(stackItem2); } } return elementIterator; } catch (CloneNotSupportedException cloneNotSupportedException) { throw new InternalError(cloneNotSupportedException); } } public Element first() { if (this.root == null) return null; this.elementStack = new Stack(); if (this.root.getElementCount() != 0) this.elementStack.push(new StackItem(this.root, null)); return this.root; } public int depth() { return (this.elementStack == null) ? 0 : this.elementStack.size(); } public Element current() { if (this.elementStack == null) return first(); if (!this.elementStack.empty()) { StackItem stackItem; Element element = stackItem.getElement(); int i = stackItem.getIndex(); return (i == -1) ? element : element.getElement(i); } return null; } public Element next() { if (this.elementStack == null) return first(); if (this.elementStack.isEmpty()) return null; StackItem stackItem; Element element = stackItem.getElement(); int i = stackItem.getIndex(); if (i + 1 < element.getElementCount()) { Element element1 = element.getElement(i + 1); if (element1.isLeaf()) { stackItem.incrementIndex(); } else { this.elementStack.push(new StackItem(element1, null)); } return element1; } this.elementStack.pop(); if (!this.elementStack.isEmpty()) { StackItem stackItem1; stackItem1.incrementIndex(); return next(); } return null; } public Element previous() { int i; if (this.elementStack == null || (i = this.elementStack.size()) == 0) return null; StackItem stackItem; Element element = stackItem.getElement(); int j = stackItem.getIndex(); if (j > 0) return getDeepestLeaf(element.getElement(--j)); if (j == 0) return element; if (j == -1) { if (i == 1) return null; StackItem stackItem1 = (StackItem)this.elementStack.pop(); stackItem = (StackItem)this.elementStack.peek(); this.elementStack.push(stackItem1); element = stackItem.getElement(); j = stackItem.getIndex(); return (j == -1) ? element : getDeepestLeaf(element.getElement(j)); } return null; } private Element getDeepestLeaf(Element paramElement) { if (paramElement.isLeaf()) return paramElement; int i = paramElement.getElementCount(); return (i == 0) ? paramElement : getDeepestLeaf(paramElement.getElement(i - 1)); } private void dumpTree() { Element element; while ((element = next()) != null) { System.out.println("elem: " + element.getName()); AttributeSet attributeSet = element.getAttributes(); String str = ""; Enumeration enumeration = attributeSet.getAttributeNames(); while (enumeration.hasMoreElements()) { Object object1 = enumeration.nextElement(); Object object2 = attributeSet.getAttribute(object1); if (object2 instanceof AttributeSet) { str = str + object1 + "=**AttributeSet** "; continue; } str = str + object1 + "=" + object2 + " "; } System.out.println("attributes: " + str); } } private class StackItem implements Cloneable { Element item; int childIndex; private StackItem(Element param1Element) { this.item = param1Element; this.childIndex = -1; } private void incrementIndex() { this.childIndex++; } private Element getElement() { return this.item; } private int getIndex() { return this.childIndex; } protected Object clone() { return super.clone(); } } } /* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\javax\swing\text\ElementIterator.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.0.7 */
[ "michael__lee@yeah.net" ]
michael__lee@yeah.net
de70d2cbe7739f549f7fb36a9f09233c04f1fe93
c8664fc194971e6e39ba8674b20d88ccfa7663b1
/com/tencent/mm/plugin/appbrand/jsapi/l/g.java
80e5b848b0aa34f0f92998ddeb9ad666b00eb16c
[]
no_license
raochuan/wexin1120
b926bc8d4143c4b523ed43e265cd20ef0c89ad40
1eaa71e1e3e7c9f9b9f96db8de56db3dfc4fb4d3
refs/heads/master
2020-05-17T23:57:00.000696
2017-11-03T02:33:27
2017-11-03T02:33:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
816
java
package com.tencent.mm.plugin.appbrand.jsapi.l; import com.tencent.gmtrace.GMTrace; import com.tencent.mm.plugin.appbrand.jsapi.base.b; import org.json.JSONObject; public final class g extends b { public static final int CTRL_INDEX = 299; public static final String NAME = "removeHTMLWebView"; public g() { GMTrace.i(19753762553856L, 147177); GMTrace.o(19753762553856L, 147177); } protected final int i(JSONObject paramJSONObject) { GMTrace.i(19753896771584L, 147178); int i = paramJSONObject.getInt("htmlId"); GMTrace.o(19753896771584L, 147178); return i; } } /* Location: /Users/xianghongyan/decompile/dex2jar/classes2-dex2jar.jar!/com/tencent/mm/plugin/appbrand/jsapi/l/g.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "15223790237@139.com" ]
15223790237@139.com
3ee84db399148728c6756ed59711c140149aac3a
7e78adcea1601955621da5d15f2dcb6631a1d13e
/javademo/src/main/java/collector/ISendApi.java
110f3b07b06c77b5435143f194066b3c6843645b
[]
no_license
zacscoding/java_example
fe0a8628fe274e6d150a606941d1e869650796b3
482c54f516edeb2d9dee436ce00ba33b3f1c038c
refs/heads/master
2021-05-14T12:34:34.541865
2019-11-28T15:38:41
2019-11-28T15:38:41
116,410,667
1
2
null
2020-03-04T22:14:20
2018-01-05T17:36:30
Java
UTF-8
Java
false
false
279
java
package collector; import java.util.List; /** * Rest API interface * * @author zacconding * @Date 2018-02-11 * @GitHub : https://github.com/zacscoding */ public interface ISendApi { public void sendData(String data); public void sendDatas(List<String> data); }
[ "zaccoding725@gmail.com" ]
zaccoding725@gmail.com
f6803ad620f3a901820fb4ee2f5f21d14d458603
995f73d30450a6dce6bc7145d89344b4ad6e0622
/DVC-AN20_EMUI10.1.1/src/main/java/com/huawei/softnet/connect/ServiceDesc.java
b5ea1e06b8148abb83bac63aa57c782151e79668
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,084
java
package com.huawei.softnet.connect; import android.os.Parcel; import android.os.Parcelable; public class ServiceDesc implements Parcelable { public static final Parcelable.Creator<ServiceDesc> CREATOR = new Parcelable.Creator<ServiceDesc>() { /* class com.huawei.softnet.connect.ServiceDesc.AnonymousClass1 */ @Override // android.os.Parcelable.Creator public ServiceDesc createFromParcel(Parcel in) { return new ServiceDesc(in); } @Override // android.os.Parcelable.Creator public ServiceDesc[] newArray(int size) { return new ServiceDesc[size]; } }; private static final int PARCEL_FLAG = 0; private byte[] mServiceData; private String mServiceId; private String mServiceName; protected ServiceDesc(Parcel in) { this.mServiceId = in.readString(); this.mServiceName = in.readString(); this.mServiceData = in.createByteArray(); } private ServiceDesc() { } public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.mServiceId); dest.writeString(this.mServiceName); dest.writeByteArray(this.mServiceData); } public int describeContents() { return 0; } public String getServiceId() { return this.mServiceId; } public String getServiceName() { return this.mServiceName; } public byte[] getServiceData() { return this.mServiceData; } public static class Builder { ServiceDesc info = new ServiceDesc(); public Builder serviceId(String serviceId) { this.info.mServiceId = serviceId; return this; } public Builder serviceName(String serviceName) { this.info.mServiceName = serviceName; return this; } public Builder serviceData(byte[] serviceData) { this.info.mServiceData = serviceData; return this; } public ServiceDesc build() { return this.info; } } }
[ "dstmath@163.com" ]
dstmath@163.com
f1d30092565ffd503d715d93a5b2dc8e46483375
10186b7d128e5e61f6baf491e0947db76b0dadbc
/org/apache/bcel/util/ClassLoader.java
98e36bfcec5e4b29b1460b4a80148cb51b9f3cbf
[ "SMLNJ", "Apache-1.1", "Apache-2.0", "BSD-2-Clause" ]
permissive
MewX/contendo-viewer-v1.6.3
7aa1021e8290378315a480ede6640fd1ef5fdfd7
69fba3cea4f9a43e48f43148774cfa61b388e7de
refs/heads/main
2022-07-30T04:51:40.637912
2021-03-28T05:06:26
2021-03-28T05:06:26
351,630,911
2
0
Apache-2.0
2021-10-12T22:24:53
2021-03-26T01:53:24
Java
UTF-8
Java
false
false
5,294
java
/* */ package org.apache.bcel.util; /* */ /* */ import java.io.ByteArrayInputStream; /* */ import java.util.Hashtable; /* */ import org.apache.bcel.Repository; /* */ import org.apache.bcel.classfile.ClassParser; /* */ import org.apache.bcel.classfile.ConstantClass; /* */ import org.apache.bcel.classfile.ConstantPool; /* */ import org.apache.bcel.classfile.ConstantUtf8; /* */ import org.apache.bcel.classfile.JavaClass; /* */ import org.apache.bcel.classfile.Utility; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class ClassLoader /* */ extends java.lang.ClassLoader /* */ { /* 88 */ private Hashtable classes = new Hashtable(); /* 89 */ private String[] ignored_packages = new String[] { "java.", "javax.", "sun." }; /* */ /* */ /* */ /* */ /* */ public ClassLoader() {} /* */ /* */ /* */ /* */ /* */ public ClassLoader(String[] ignored_packages) { /* 100 */ String[] new_p = new String[ignored_packages.length + this.ignored_packages.length]; /* */ /* 102 */ System.arraycopy(this.ignored_packages, 0, new_p, 0, this.ignored_packages.length); /* 103 */ System.arraycopy(ignored_packages, 0, new_p, this.ignored_packages.length, ignored_packages.length); /* */ /* */ /* 106 */ this.ignored_packages = new_p; /* */ } /* */ /* */ /* */ /* */ protected Class loadClass(String class_name, boolean resolve) throws ClassNotFoundException { /* 112 */ Class cl = null; /* */ /* */ /* */ /* 116 */ if ((cl = (Class)this.classes.get(class_name)) == null) { /* */ /* */ /* */ /* 120 */ for (int i = 0; i < this.ignored_packages.length; i++) { /* 121 */ if (class_name.startsWith(this.ignored_packages[i])) { /* 122 */ cl = Class.forName(class_name); /* */ /* */ break; /* */ } /* */ } /* 127 */ if (cl == null) { /* 128 */ JavaClass clazz = null; /* */ /* */ /* */ /* 132 */ if (class_name.indexOf("$$BCEL$$") >= 0) { /* 133 */ clazz = createClass(class_name); /* */ } /* 135 */ else if ((clazz = Repository.lookupClass(class_name)) != null) { /* 136 */ clazz = modifyClass(clazz); /* */ } else { /* 138 */ throw new ClassNotFoundException(class_name); /* */ } /* */ /* 141 */ if (clazz != null) { /* 142 */ byte[] bytes = clazz.getBytes(); /* 143 */ cl = defineClass(class_name, bytes, 0, bytes.length); /* */ } else { /* 145 */ cl = Class.forName(class_name); /* */ } /* */ } /* 148 */ if (resolve) { /* 149 */ resolveClass(cl); /* */ } /* */ } /* 152 */ this.classes.put(class_name, cl); /* */ /* 154 */ return cl; /* */ } /* */ /* */ /* */ /* */ /* */ protected JavaClass modifyClass(JavaClass clazz) { /* 161 */ return clazz; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ protected JavaClass createClass(String class_name) { /* 179 */ int index = class_name.indexOf("$$BCEL$$"); /* 180 */ String real_name = class_name.substring(index + 8); /* */ /* 182 */ JavaClass clazz = null; /* */ try { /* 184 */ byte[] bytes = Utility.decode(real_name, true); /* 185 */ ClassParser parser = new ClassParser(new ByteArrayInputStream(bytes), "foo"); /* */ /* 187 */ clazz = parser.parse(); /* */ } catch (Throwable e) { /* 189 */ e.printStackTrace(); /* 190 */ return null; /* */ } /* */ /* */ /* 194 */ ConstantPool cp = clazz.getConstantPool(); /* */ /* 196 */ ConstantClass cl = (ConstantClass)cp.getConstant(clazz.getClassNameIndex(), (byte)7); /* */ /* 198 */ ConstantUtf8 name = (ConstantUtf8)cp.getConstant(cl.getNameIndex(), (byte)1); /* */ /* 200 */ name.setBytes(class_name.replace('.', '/')); /* */ /* 202 */ return clazz; /* */ } /* */ } /* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/bcel/util/ClassLoader.class * Java compiler version: 1 (45.3) * JD-Core Version: 1.1.3 */
[ "xiayuanzhong+gpg2020@gmail.com" ]
xiayuanzhong+gpg2020@gmail.com
3487da0fb3282d73368df74d91f0351a53effb9a
e9893cc1fb82826b1019984e25572de2a382fcab
/wangzhe-beans/src/main/java/com/uc/wangzhe/pojo/CurDiscuss.java
e995279f39088678187af3326a721aab7815f1d4
[]
no_license
402034990/TestMaven
0fd69b2a3551a8857074326a6c5904b7a9b06e9a
4ba210de470226b55356cea1c5ae6ca28fb57d74
refs/heads/master
2021-08-08T15:18:49.916414
2017-11-10T16:15:09
2017-11-10T16:15:09
110,065,791
0
1
null
2017-11-10T16:15:09
2017-11-09T04:05:58
Java
UTF-8
Java
false
false
1,143
java
package com.uc.wangzhe.pojo; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; /** * CurDiscuss entity. @author MyEclipse Persistence Tools */ @Entity @Table(name = "cur_discuss", catalog = "db") public class CurDiscuss implements java.io.Serializable { // Fields private Integer id; private CurCourse curCourse; // Constructors /** default constructor */ public CurDiscuss() { } /** full constructor */ public CurDiscuss(CurCourse curCourse) { this.curCourse = curCourse; } // Property accessors @Id @GeneratedValue @Column(name = "id", unique = true, nullable = false) public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "cur_id") public CurCourse getCurCourse() { return this.curCourse; } public void setCurCourse(CurCourse curCourse) { this.curCourse = curCourse; } }
[ "402034990@qq.com" ]
402034990@qq.com
91c7cc46d90a2ec71721f890ab0fa98060b8d4f5
a8e47979b45aa428a32e16ddc4ee2578ec969dfe
/base/config/src/test/java/org/artifactory/version/converter/v143/RemoteChecksumPolicyConverterTest.java
e3d7cbeb4b9f9a7ac361fea76759e9442bcc5f72
[]
no_license
nuance-sspni/artifactory-oss
da505cac1984da131a61473813ee2c7c04d8d488
af3fcf09e27cac836762e9957ad85bdaeec6e7f8
refs/heads/master
2021-07-22T20:04:08.718321
2017-11-02T20:49:33
2017-11-02T20:49:33
109,313,757
0
1
null
null
null
null
UTF-8
Java
false
false
2,336
java
/* * * Artifactory is a binaries repository manager. * Copyright (C) 2016 JFrog Ltd. * * Artifactory is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Artifactory is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Artifactory. If not, see <http://www.gnu.org/licenses/>. * */ package org.artifactory.version.converter.v143; import org.artifactory.convert.XmlConverterTest; import org.jdom2.Document; import org.jdom2.Element; import org.jdom2.Namespace; import org.testng.annotations.Test; import java.util.List; import static org.testng.Assert.*; /** * Tests the {@link RemoteChecksumPolicyConverter}. * * @author Yossi Shaul */ @Test public class RemoteChecksumPolicyConverterTest extends XmlConverterTest { public void convertConfigWithNoChecksumPolicyTags() throws Exception { // just call the convert, nothing is expected to get changed convertXml("/config/install/config.1.4.2.xml", new RemoteChecksumPolicyConverter()); } public void convertConfigWithChecksumPolicyTags() throws Exception { // just call the convert, nothing is expected to get changed Document doc = convertXml("/config/test/config.1.4.2_with_checksum_policy.xml", new RemoteChecksumPolicyConverter()); Element root = doc.getRootElement(); Namespace ns = root.getNamespace(); List repositories = root.getChild("remoteRepositories", ns).getChildren(); Element repoWithPolicy = (Element) repositories.get(0); assertNull(repoWithPolicy.getChild("checksumPolicyType", ns), "checksumPolicyType element should not exist"); Element policyTypeElement = repoWithPolicy.getChild("remoteRepoChecksumPolicyType", ns); assertNotNull(policyTypeElement, "Renamed tag not found"); assertEquals(policyTypeElement.getText(), "generate-if-absent"); } }
[ "tuan-anh.nguyen@nuance.com" ]
tuan-anh.nguyen@nuance.com
1a04173fbce023f3c48a699aac1d305db32ec264
d072cdf8b1d1c3987e8591641f1e2a1fe22a7114
/leetcode/src/keyboardrow/Solution.java
56759fd7a177dfe7a33b1aefa33d359fea166524
[]
no_license
Lysenko96/SimpleExamples
a9f4ff972dfca11974556e1b1e471d3faab88c64
1caaae6854780edfe058afe5a531ffa2629b5c98
refs/heads/master
2023-09-01T00:17:10.403681
2023-08-31T14:52:59
2023-08-31T14:52:59
249,872,187
0
0
null
null
null
null
UTF-8
Java
false
false
1,848
java
package keyboardrow; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Locale; public class Solution { public static void main(String[] args) { System.out.println(Arrays.toString(new Solution().findWords(new String[]{"Hello", "Alaska", "Dad", "Peace"}))); } public String[] findWords(String[] words) { String[] first = "qwertyuiop".split(""); List<String> firstL = Arrays.asList(first); String[] second = "asdfghjkl".split(""); List<String> secondL = Arrays.asList(second); String[] third = "zxcvbnm".split(""); List<String> thirdL = Arrays.asList(third); List<String> result = new ArrayList<>(); for(String word : words){ String[] letters = word.split(""); List<String> strings = Arrays.stream(letters).map(String::toLowerCase).toList(); int fL = 0; int sL = 0; int tL = 0; for(String letter : strings) { if(firstL.contains(letter)) fL++; else if(secondL.contains(letter)) sL++; else if(thirdL.contains(letter)) tL++; } // System.out.println(fL); // System.out.println(sL); // System.out.println(tL); // System.out.println(letters.length); if (letters.length == fL) result.add(word); else if (letters.length == sL) result.add(word); else if (letters.length == tL) result.add(word); // System.out.println(result); } String[] arr = new String[result.size()]; for(int i = 0; i < result.size(); i++) arr[i] = result.get(i); return arr; } }
[ "anton.lys96@gmail.com" ]
anton.lys96@gmail.com
273fd1e40828577e563728e97d246851196fc7ae
021360bb2fb5a055d61d60fa92bc2c544d686f79
/gwslistviewanimations/src/main/java/com/grottworkshop/gwslistviewanimations/itemmanipulation/dragdrop/TouchViewDraggableManager.java
472dc51743fa9dad8a619b912a4c03f6f518ca85
[]
no_license
fredgrott/GWSMyDroidDemos
17332c0c49a947a055dff921d58a055dbf4feeb9
62d1163292331c1bce80cffbef2c0c7519fa5c13
refs/heads/master
2021-05-30T09:07:15.958341
2015-09-24T15:06:40
2015-09-24T15:06:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,595
java
/* * Copyright 2014 Niek Haarman * Modifications Copyright (C) Fred Grott(GrottWorkShop) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.grottworkshop.gwslistviewanimations.itemmanipulation.dragdrop; import android.support.annotation.IdRes; import android.support.annotation.NonNull; import android.view.View; /** * Created by fgrott on 9/2/2015. */ public class TouchViewDraggableManager implements DraggableManager { @IdRes private final int mTouchViewResId; public TouchViewDraggableManager(@IdRes final int touchViewResId) { mTouchViewResId = touchViewResId; } @Override public boolean isDraggable(@NonNull final View view, final int position, final float x, final float y) { View touchView = view.findViewById(mTouchViewResId); if (touchView != null) { boolean xHit = touchView.getLeft() <= x && touchView.getRight() >= x; boolean yHit = touchView.getTop() <= y && touchView.getBottom() >= y; return xHit && yHit; } else { return false; } } }
[ "fred.grott@gmail.com" ]
fred.grott@gmail.com
52a7c5c71f5fc3484b50fd0ac3fce91e4b519ffb
8928948e50dc234754c89309fa66a0e0922518b8
/app/src/main/java/com/jack/reader/ui/presenter/SubjectFragmentPresenter.java
6d3295b9416195ab909efd5d198a337478375243
[ "Apache-2.0" ]
permissive
xxxxxxxxxxj/FanYueReader-master
ce37c5595022b627c86b2063c700bd83a9c594cb
4b6a020d1578db0403f438e14421613fa8feff93
refs/heads/master
2020-05-16T16:48:33.294600
2019-05-05T03:12:34
2019-05-05T03:12:34
183,174,142
0
0
null
null
null
null
UTF-8
Java
false
false
2,994
java
/** * Copyright 2016 JustWayward Team * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.jack.reader.ui.presenter; import com.jack.reader.api.BookApi; import com.jack.reader.base.RxPresenter; import com.jack.reader.bean.BookLists; import com.jack.reader.ui.contract.SubjectFragmentContract; import com.jack.reader.utils.LogUtils; import com.jack.reader.utils.RxUtil; import com.jack.reader.utils.StringUtils; import com.jack.reader.utils.ToastUtils; import javax.inject.Inject; import rx.Observable; import rx.Observer; import rx.Subscription; import rx.android.schedulers.AndroidSchedulers; /** * @author yuyh. * @date 2016/8/31. */ public class SubjectFragmentPresenter extends RxPresenter<SubjectFragmentContract.View> implements SubjectFragmentContract.Presenter<SubjectFragmentContract.View> { private BookApi bookApi; @Inject public SubjectFragmentPresenter(BookApi bookApi) { this.bookApi = bookApi; } @Override public void getBookLists(String duration, String sort, final int start, int limit, String tag, String gender) { String key = StringUtils.creatAcacheKey("book-lists", duration, sort, start + "", limit + "", tag, gender); Observable<BookLists> fromNetWork = bookApi.getBookLists(duration, sort, start + "", limit + "", tag, gender) .compose(RxUtil.<BookLists>rxCacheListHelper(key)); //依次检查disk、network Subscription rxSubscription = Observable.concat(RxUtil.rxCreateDiskObservable(key, BookLists.class), fromNetWork) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Observer<BookLists>() { @Override public void onCompleted() { mView.complete(); } @Override public void onError(Throwable e) { LogUtils.e("getBookLists:" + e.toString()); mView.showError(); } @Override public void onNext(BookLists tags) { mView.showBookList(tags.bookLists, start == 0 ? true : false); if (tags.bookLists == null || tags.bookLists.size() <= 0) { ToastUtils.showSingleToast("暂无相关书单"); } } }); addSubscrebe(rxSubscription); } }
[ "xvjun@haotang365.com.cn" ]
xvjun@haotang365.com.cn
131edcdb144b906b2dd442165db08012cbba2d9c
d7c6a4789b9f1b23b204c09b2b913826a8985959
/BM_src/WayofTime/alchemicalWizardry/common/renderer/block/RenderSpellEnhancementBlock.java
ae2b9f2c24a68ad9fa278315343de603f053f4a4
[ "CC-BY-4.0" ]
permissive
nalimleinad/BloodMagic
741de135c28d4f8a2fc9618fffe0521c9695102b
78f3f069632501d0814cf87dbfa0f141c6e19965
refs/heads/master
2021-01-21T07:53:18.481660
2014-10-17T17:52:36
2014-10-17T17:52:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,385
java
package WayofTime.alchemicalWizardry.common.renderer.block; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; import cpw.mods.fml.client.FMLClientHandler; public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer { private ModelSpellEnhancementBlock modelSpellEnhancementBlock = new ModelSpellEnhancementBlock(); @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof TESpellEnhancementBlock) { TESpellEnhancementBlock tileSpellBlock = (TESpellEnhancementBlock) tileEntity; GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_CULL_FACE); /** * Render the ghost item inside of the Altar, slowly spinning */ GL11.glPushMatrix(); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellEnhancementPower1.png"); int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); String resource = tileSpellBlock.getResourceLocationForMeta(meta); test = new ResourceLocation(resource); FMLClientHandler.instance().getClient().renderEngine.bindTexture(test); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); //GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F); //A reference to your Model file. Again, very important. this.modelSpellEnhancementBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection()); //Tell it to stop rendering for both the PushMatrix's GL11.glPopMatrix(); GL11.glPopMatrix(); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_LIGHTING); } } }
[ "wtime@live.ca" ]
wtime@live.ca
11762467bc185dbe999ad619fbc15bdcebf6a5ca
8dab0aa919849ad281a45343b8fc0a75af0c40e3
/app/src/main/java/ikon/ikon/Model/Counter_Response.java
fe44f2e90f4f210725d092ddca14d460161d00c5
[]
no_license
AhmedMansour9/Jake
38e5aec5eb277aa20b64e4f514c6be1450aef44a
3e29b8c1955498a8e783aaaeec08c2343e3adf37
refs/heads/master
2020-04-14T06:04:54.051963
2019-03-04T13:25:28
2019-03-04T13:25:28
163,676,963
0
0
null
null
null
null
UTF-8
Java
false
false
816
java
package ikon.ikon.Model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; /** * Created by Ahmed on 03/01/2019. */ public class Counter_Response { @SerializedName("data") @Expose private Counter data; @SerializedName("status") @Expose private Boolean status; @SerializedName("error") @Expose private String error; public Counter getData() { return data; } public void setData(Counter data) { this.data = data; } public Boolean getStatus() { return status; } public void setStatus(Boolean status) { this.status = status; } public String getError() { return error; } public void setError(String error) { this.error = error; } }
[ "37387373+AhmedMansour9@users.noreply.github.com" ]
37387373+AhmedMansour9@users.noreply.github.com
4bce8035a07b32270fc05746f7c4b4259f4f3a92
6b8bcd288111e4ffefcd0f42ae3d14f8404ccc65
/Part7LeetCode/src/main/java/C01_线性表/单链表/T2_两数相加/Solution.java
711bbbe1a2d34138264de29881649ccad6f5415b
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-mulanpsl-1.0-en", "MulanPSL-1.0" ]
permissive
luqian2017/algorithms
943c1365022e307ca2770d121cf8662ba6959e22
e83a17ecf1a7cfea77c5b4ecddc92eb9f1fc329c
refs/heads/master
2020-12-29T22:56:49.445532
2020-02-05T14:57:16
2020-02-05T14:57:16
238,765,020
1
0
NOASSERTION
2020-02-06T19:15:35
2020-02-06T19:15:35
null
UTF-8
Java
false
false
1,495
java
/*********************************************************** * @Description : 2.两数相加 * * @author : 梁山广(Liang Shan Guang) * @date : 2020/1/29 20:59 * @email : liangshanguang2@gmail.com ***********************************************************/ package C01_线性表.单链表.T2_两数相加; import C01_线性表.单链表.ListNode; import java.math.BigDecimal; class Solution { private String add2Sum(String s1, String s2) { BigDecimal b1 = new BigDecimal(s1); BigDecimal b2 = new BigDecimal(s2); return b1.add(b2).toString(); } /** * 两个数相加,要考虑大数相加的情况,所以数字都以字符串的形式来存储 */ public ListNode addTwoNumbers(ListNode l1, ListNode l2) { // 用字符串来存储两个数 StringBuilder num1 = new StringBuilder(); StringBuilder num2 = new StringBuilder(); while (l1 != null) { num1.append(l1.val); l1 = l1.next; } while (l2 != null) { num2.append(l2.val); l2 = l2.next; } String sum = add2Sum(num1.reverse().toString(), num2.reverse().toString()); ListNode dummyHead = new ListNode(0); ListNode cur = dummyHead; for (int i = sum.length() - 1; i >= 0; i--) { cur.next = new ListNode(Integer.parseInt(sum.charAt(i) + "")); cur = cur.next; } return dummyHead.next; } }
[ "1648266192@qq.com" ]
1648266192@qq.com
5062cacddfa22162ae569e4ca70b74cff5cac3b7
0c691ec8a2642c11f1883de399f9be059e25fead
/src/me/daddychurchill/CityWorld/Context/Astral/AstralForestContext.java
35d20efc0f72f82e08e641a595c72c394a88e233
[]
no_license
fuzzybot/CityWorld
e3c8aaacfdf39c7358679325804e2931008b726a
07ef1e3e05924385d92844f9cde1afaebdccbae0
refs/heads/master
2020-12-26T02:40:30.950293
2014-11-02T17:52:14
2014-11-02T17:52:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,969
java
package me.daddychurchill.CityWorld.Context.Astral; import org.bukkit.Material; import me.daddychurchill.CityWorld.WorldGenerator; import me.daddychurchill.CityWorld.Plats.PlatLot; import me.daddychurchill.CityWorld.Plats.Astral.AstralForestCanopyLot; import me.daddychurchill.CityWorld.Plats.Astral.AstralForestFernLot; import me.daddychurchill.CityWorld.Plats.Astral.AstralForestHedgeLot; import me.daddychurchill.CityWorld.Support.HeightInfo; import me.daddychurchill.CityWorld.Support.Odds; import me.daddychurchill.CityWorld.Support.PlatMap; import me.daddychurchill.CityWorld.Support.SupportChunk; public class AstralForestContext extends AstralDataContext { public enum ForestStyle { FERN, HEDGE, CANOPY, FRACTAL }; private ForestStyle style; public AstralForestContext(WorldGenerator generator, ForestStyle style) { super(generator); this.style = style; } @Override public void populateMap(WorldGenerator generator, PlatMap platmap) { //TODO, This doesn't handle schematics quite right yet // let the user add their stuff first, then plug any remaining holes with our stuff //mapsSchematics.populate(generator, platmap); // where it all begins int originX = platmap.originX; int originZ = platmap.originZ; HeightInfo heights; Odds odds = platmap.getOddsGenerator(); // is this natural or buildable? for (int x = 0; x < PlatMap.Width; x++) { for (int z = 0; z < PlatMap.Width; z++) { PlatLot current = platmap.getLot(x, z); if (current == null) { // what is the world location of the lot? int blockX = (originX + x) * SupportChunk.chunksBlockWidth; int blockZ = (originZ + z) * SupportChunk.chunksBlockWidth; // get the height info for this chunk heights = HeightInfo.getHeightsFaster(generator, blockX, blockZ); if (!heights.anyEmpties && heights.averageHeight < generator.seaLevel) current = generateForestLot(platmap, odds, originX + x, originZ + z, getPopulationOdds(x, z)); // did current get defined? if (current != null) platmap.setLot(x, z, current); } } } } private PlatLot generateForestLot(PlatMap platmap, Odds odds, int chunkX, int chunkZ, double populationChance) { switch (style) { case FERN: return new AstralForestFernLot(platmap, chunkX, chunkZ, populationChance); case HEDGE: return new AstralForestHedgeLot(platmap, chunkX, chunkZ, populationChance); case CANOPY: default: return new AstralForestCanopyLot(platmap, chunkX, chunkZ, populationChance); } } @Override public void validateMap(WorldGenerator generator, PlatMap platmap) { // TODO Auto-generated method stub } @Override public Material getMapRepresentation() { switch (style) { case FERN: return Material.LEAVES; case HEDGE: return Material.LEAVES_2; case CANOPY: default: return Material.LOG; } } }
[ "eddie@virtualchurchill.com" ]
eddie@virtualchurchill.com
2dbfd6967b861c1932cb27643b952e558dc051b1
f5b90d10db8841381dc23ab65502dca43135295e
/One/day08/src/com/test/exec/Cat.java
a7b75a24d9b01017336dcadee19a0284d726798c
[ "LicenseRef-scancode-mulanpsl-2.0-en", "MulanPSL-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
fsjhut/shangMaStudy
f8edf1f6d55478615d6bd8b1a4add211de98ba36
c0abad4a87e2000dd13225ffdc7e95293625fb55
refs/heads/master
2023-07-17T09:15:31.931156
2021-09-01T02:18:18
2021-09-01T02:18:18
364,105,148
2
0
null
null
null
null
UTF-8
Java
false
false
441
java
package com.test.exec; /** * @className: Cat * @description: * @author SunHang * @createTime 2021/3/24 16:02 */ public class Cat extends Pet { private String Coat; public Cat(String name, char gender, int exp, int grade, String coat) { super(name, gender, exp, grade); Coat = coat; } public Cat() { } public void fly(){ System.out.println(this.getName()+"正在飞行---"); } }
[ "1067224906@qq.com" ]
1067224906@qq.com
594fccbbb5d93da0ff5d2f1d4e70568c8f9bcbd3
3bc15fa92f9a7336e855a32f8b16173dd916713c
/mobile-api/src/main/java/com/shangpin/wireless/api/service/impl/WeXinPlatform.java
543a2f3232ddfa3d3aea223ae6f2d37e81cd4f96
[]
no_license
cenbow/2016_sp_mobile
36018bea8154b9deaf9d15dbf1b4e2ec90eb1191
5edb6203a5cf4352db7c051f3fd1ef12ccada32c
refs/heads/master
2020-04-06T04:44:14.075549
2016-06-15T05:19:25
2016-06-15T05:19:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,109
java
package com.shangpin.wireless.api.service.impl; import org.springframework.stereotype.Service; import com.shangpin.cache.Cacheable; import com.shangpin.wireless.api.dao.AutoReplyDao; import com.shangpin.wireless.api.domain.AutoReply; import com.shangpin.wireless.api.domain.Keywords; import com.shangpin.wireless.api.util.HqlHelper; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Spring AOP在同一个类里自身方法相互调用时执行this是本地方法,不会被aop代理增强 * 增加此类,暂时救急 */ @Service public class WeXinPlatform { private final Log log = LogFactory.getLog(WeXinPlatform.class); @Resource(name = AutoReplyDao.DAO_NAME) private AutoReplyDao autoReplyDao; /** * 缓存查询规则数据 * @return * @throws Exception */ @Cacheable(key="weChatAutoReply",expire=300) public Map<String, Map<String, AutoReply>> findAll() throws Exception { HqlHelper hqlHelper = new HqlHelper(AutoReply.class, "a"); hqlHelper.addWhereCondition("a.status = 1", null); List<AutoReply> autoReplyList = autoReplyDao.getListByCondition(hqlHelper, "mysql"); log.debug("查询匹配规则autoReplyList="+autoReplyList); Map<String, Map<String, AutoReply>> map = new HashMap<>(); Map<String, AutoReply> allMap = new HashMap<>(); Map<String, AutoReply> haveMap = new HashMap<>(); map.put("allMap",allMap); map.put("haveMap",haveMap); for (AutoReply autoReply : autoReplyList) { List<Keywords> keywordsList = autoReply.getKeywordsList(); for (Keywords keyword : keywordsList) { //精确匹配 allMap.put(keyword.getKeyword(), autoReply); //包含匹配 if("1".equals(keyword.getMode())){ haveMap.put(keyword.getKeyword(), autoReply); } } } return map; } }
[ "fengwenyu@shangpin.com" ]
fengwenyu@shangpin.com
5e405bda72ac83cd6b764b6b502d71fb9ca2d7ee
14dd6497e1e259f026d67814b76510c06391fca7
/common/src/main/java/com/gentics/mesh/auth/AuthenticationResult.java
ff5aebf31da81b27c6c2c32be6467a6b2e8acf5c
[ "Apache-2.0" ]
permissive
Jotschi/mesh
fbb629a067ab82e4a71c817d8e947eeaede8f7a5
a98fa3a9b978c3f54d6450b5f01223d3afbeb241
refs/heads/master
2021-06-18T16:10:00.044451
2020-11-20T13:07:55
2020-11-20T13:07:55
321,716,402
0
0
Apache-2.0
2020-12-15T15:55:50
2020-12-15T15:55:49
null
UTF-8
Java
false
false
544
java
package com.gentics.mesh.auth; import io.vertx.ext.auth.User; public class AuthenticationResult { private User user; private boolean usingAPIKey = false; public AuthenticationResult(User user) { this.user = user; } public User getUser() { return user; } /** * Retrieve a flag which indicates whether a API key/token was used to authenticate the user. * * @return */ public boolean isUsingAPIKey() { return usingAPIKey; } public void setUsingAPIKey(boolean usingAPIKey) { this.usingAPIKey = usingAPIKey; } }
[ "j.schueth@gentics.com" ]
j.schueth@gentics.com
b05a8875543af5920b0ca618e8f1df3bc1d06741
caa4f0ce10797c3b78680b958e2e9277d01c82ce
/src/com/shlg/chuang/sigle/Burrito.java
154fda3f21c1e61a65f77532530c40c6f30889b9
[]
no_license
liushuiwushuang/codeThink
00812e221713a7f2bb9e54722834190986fac7ae
3285f374abfba339692c8e74dbcb87d0c5a70ef7
refs/heads/master
2021-01-19T04:15:17.251027
2017-05-05T10:13:31
2017-05-05T10:13:31
62,606,501
0
0
null
null
null
null
UTF-8
Java
false
false
735
java
package com.shlg.chuang.sigle; public class Burrito { Spiciness degree; public Burrito ( Spiciness degree) { this.degree = degree; } public void describe () { System.out.print("This burrito is "); switch(degree) { case NOT: System.out.println("not spicy at all."); break; case MILD: case MEDIUM: System.out.println("a little hot."); break; case HOT: case FLAMING: default: System.out.println("maybe too hot."); } } public static void main(String[] args) { Burrito plain = new Burrito(Spiciness.NOT); Burrito greenChile = new Burrito(Spiciness.MEDIUM); Burrito jalapeno = new Burrito(Spiciness.HOT); plain.describe(); greenChile.describe(); jalapeno.describe(); } }
[ "1303637389@qq.com" ]
1303637389@qq.com
a09f829416e0a9910fa955e38a2b6c550474a0de
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_ab0308b11399dc27de596f86fc1e98bdc49bf9d4/RestTask/2_ab0308b11399dc27de596f86fc1e98bdc49bf9d4_RestTask_t.java
f3774f5f3ea1e21c82a5a3936f141a9d9bc146c6
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,657
java
package com.uservoice.uservoicesdk.rest; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; import oauth.signpost.OAuthConsumer; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.StatusLine; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils; import org.json.JSONException; import org.json.JSONObject; import android.net.Uri; import android.os.AsyncTask; import com.uservoice.uservoicesdk.Session; import com.uservoice.uservoicesdk.UserVoice; import com.uservoice.uservoicesdk.model.AccessToken; public class RestTask extends AsyncTask<String, String, RestResult> { private String urlPath; private RestMethod method; private List<BasicNameValuePair> params; private RestTaskCallback callback; private HttpUriRequest request; public RestTask(RestMethod method, String urlPath, Map<String, String> params, RestTaskCallback callback) { this(method, urlPath, params == null ? null : paramsToList(params), callback); } public RestTask(RestMethod method, String urlPath, List<BasicNameValuePair> params, RestTaskCallback callback) { this.method = method; this.urlPath = urlPath; this.callback = callback; this.params = params; } @Override protected RestResult doInBackground(String... args) { try { request = createRequest(); if (isCancelled()) throw new InterruptedException(); OAuthConsumer consumer = Session.getInstance().getOAuthConsumer(); AccessToken accessToken = Session.getInstance().getAccessToken(); if (accessToken != null) { consumer.setTokenWithSecret(accessToken.getKey(), accessToken.getSecret()); } consumer.sign(request); request.setHeader("Accept-Language", Locale.getDefault().getLanguage()); request.setHeader("API-Client", String.format("uservoice-android-%s", UserVoice.getVersion())); HttpClient client = new DefaultHttpClient(); if (isCancelled()) throw new InterruptedException(); // TODO it would be nice to find a way to abort the request on cancellation HttpResponse response = client.execute(request); if (isCancelled()) throw new InterruptedException(); HttpEntity responseEntity = response.getEntity(); StatusLine responseStatus = response.getStatusLine(); int statusCode = responseStatus != null ? responseStatus.getStatusCode() : 0; String body = responseEntity != null ? EntityUtils.toString(responseEntity) : null; if (isCancelled()) throw new InterruptedException(); return new RestResult(statusCode, new JSONObject(body)); } catch (Exception e) { return new RestResult(e); } } private HttpUriRequest createRequest() throws URISyntaxException, UnsupportedEncodingException { String host = Session.getInstance().getConfig().getSite(); Uri.Builder uriBuilder = new Uri.Builder(); uriBuilder.scheme(host.contains(".us.com") ? "http" : "https"); uriBuilder.encodedAuthority(host); uriBuilder.path(urlPath); if (method == RestMethod.GET) return requestWithQueryString(new HttpGet(), uriBuilder); else if (method == RestMethod.DELETE) return requestWithQueryString(new HttpDelete(), uriBuilder); else if (method == RestMethod.POST) return requestWithEntity(new HttpPost(), uriBuilder); else if (method == RestMethod.PUT) return requestWithEntity(new HttpPut(), uriBuilder); else throw new IllegalArgumentException("Method must be one of [GET, POST, PUT, DELETE], but was " + method); } @Override protected void onPostExecute(RestResult result) { if (result.isError()) { callback.onError(result); } else { try { callback.onComplete(result.getObject()); } catch (JSONException e) { callback.onError(new RestResult(e, result.getStatusCode(), result.getObject())); } } super.onPostExecute(result); } private HttpUriRequest requestWithQueryString(HttpRequestBase request, Uri.Builder uriBuilder) throws URISyntaxException { if (params != null) { for (BasicNameValuePair param : params) { uriBuilder.appendQueryParameter(param.getName(), param.getValue()); } } request.setURI(new URI(uriBuilder.build().toString())); return request; } private HttpUriRequest requestWithEntity(HttpEntityEnclosingRequestBase request, Uri.Builder uriBuilder) throws UnsupportedEncodingException, URISyntaxException { if (params != null) { request.setEntity(new UrlEncodedFormEntity(params)); } request.setURI(new URI(uriBuilder.build().toString())); return request; } public static List<BasicNameValuePair> paramsToList(Map<String, String> params) { ArrayList<BasicNameValuePair> formList = new ArrayList<BasicNameValuePair>(params.size()); for (String key : params.keySet()) { String value = params.get(key); if (value != null) formList.add(new BasicNameValuePair(key, value)); } return formList; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2fc481ba8df8329b7ab32bd9d97e87945a5a6ae3
d2697b2dc2ada2a5db3d3b763f00648be682a3c5
/bookexchangeUpdated(1)_source_from_JADX/sources/com/google/firebase/database/core/utilities/PushIdGenerator.java
0993db087d6dbe4e834cdde4e693306b9a560f49
[]
no_license
cseadnan16/Uncomplete-project--Android-
3639b51512c23bfe5baf97d0328a4939133bab15
3b7036115db7ae1f141678282cc892ed1bc5f56e
refs/heads/main
2023-03-06T20:25:28.244479
2021-02-21T07:35:29
2021-02-21T07:35:29
340,841,260
0
0
null
null
null
null
UTF-8
Java
false
false
1,814
java
package com.google.firebase.database.core.utilities; import java.util.Random; /* compiled from: com.google.firebase:firebase-database@@19.2.1 */ public class PushIdGenerator { static final /* synthetic */ boolean $assertionsDisabled = false; private static final String PUSH_CHARS = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"; private static long lastPushTime = 0; private static final int[] lastRandChars = new int[12]; private static final Random randGen = new Random(); public static synchronized String generatePushChildName(long now) { String sb; synchronized (PushIdGenerator.class) { boolean duplicateTime = now == lastPushTime; lastPushTime = now; char[] timeStampChars = new char[8]; StringBuilder result = new StringBuilder(20); for (int i = 7; i >= 0; i--) { timeStampChars[i] = PUSH_CHARS.charAt((int) (now % 64)); now /= 64; } result.append(timeStampChars); if (!duplicateTime) { for (int i2 = 0; i2 < 12; i2++) { lastRandChars[i2] = randGen.nextInt(64); } } else { incrementArray(); } for (int i3 = 0; i3 < 12; i3++) { result.append(PUSH_CHARS.charAt(lastRandChars[i3])); } sb = result.toString(); } return sb; } private static void incrementArray() { int i = 11; while (i >= 0) { int[] iArr = lastRandChars; if (iArr[i] != 63) { iArr[i] = iArr[i] + 1; return; } else { iArr[i] = 0; i--; } } } }
[ "adnanan.cse2016@gmail.com" ]
adnanan.cse2016@gmail.com
691ebde8f108f8e42b3dd4049ce3d489c4112c75
a0c153d1b91a2b2dec0646dcdb430060f91cafbd
/app/src/main/java/com/example/baiKiemTra/ui/DoanhthuFragment.java
1bb44693faf2ba8883ad6a24d57a5559e38c4d17
[]
no_license
chiuthuy/kiemtrabai1
ab7ffceb2deae08ce3f1d3834054460d5ab86b5f
645607e0c7256a2c7449a9ee605c8291d313333d
refs/heads/master
2021-04-23T21:33:09.370144
2020-03-25T15:05:48
2020-03-25T15:05:48
250,010,421
0
0
null
null
null
null
UTF-8
Java
false
false
698
java
package com.example.baiKiemTra.ui; import android.os.Bundle; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.example.baiKiemTra.R; /** * A simple {@link Fragment} subclass. */ public class DoanhthuFragment extends Fragment { public DoanhthuFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_doanhthu, container, false); } }
[ "=" ]
=
c781abfb197fe32225780452e4de0751f5d2a76f
cffa7380eb8aa4d76b2e443921e7b9cf916b0405
/app/src/main/java/com/hqmy/market/bean/MyOrderAddressDetailDto.java
3cbfbce828d39d1c7a534f2cda863df163f69c58
[]
no_license
Meikostar/HqMarkt
6f5d4007d074a06d04e1750fb2d5ac967e38c250
d1009c661231c2518f9936dbebff1fdc9becb4bd
refs/heads/master
2020-07-13T13:28:21.929005
2020-01-14T09:48:41
2020-01-14T09:48:41
205,092,593
0
0
null
null
null
null
UTF-8
Java
false
false
2,562
java
package com.hqmy.market.bean; import java.io.Serializable; public class MyOrderAddressDetailDto implements Serializable { String id; String lat; String lng; String area; String name; String label; String other; String detail; String mobile; String area_id; String details; String created_at; String is_default; String updated_at; String postal_code; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getLat() { return lat; } public void setLat(String lat) { this.lat = lat; } public String getLng() { return lng; } public void setLng(String lng) { this.lng = lng; } public String getArea() { return area; } public void setArea(String area) { this.area = area; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLabel() { return label; } public void setLabel(String label) { this.label = label; } public String getOther() { return other; } public void setOther(String other) { this.other = other; } public String getDetail() { return detail; } public void setDetail(String detail) { this.detail = detail; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getArea_id() { return area_id; } public void setArea_id(String area_id) { this.area_id = area_id; } public String getDetails() { return details; } public void setDetails(String details) { this.details = details; } public String getCreated_at() { return created_at; } public void setCreated_at(String created_at) { this.created_at = created_at; } public String getIs_default() { return is_default; } public void setIs_default(String is_default) { this.is_default = is_default; } public String getUpdated_at() { return updated_at; } public void setUpdated_at(String updated_at) { this.updated_at = updated_at; } public String getPostal_code() { return postal_code; } public void setPostal_code(String postal_code) { this.postal_code = postal_code; } }
[ "18166036747@163.com" ]
18166036747@163.com
31625721c8e39328bccf1b8c14c44960f57818b8
5e6c07b2c367ef2e1398bcc31dd9b2779f08a1b5
/src/main/java/speedytools/clientside/UndoManagerClient.java
34628d05ea7a3f90651225d3d1505478052e4a28
[]
no_license
TheGreyGhost/SpeedyTools
725d04559627a2e521ebd11f329678b49ef3a58e
280d20cbb28ccbe7d9f92e598eb8ffea2b231f27
refs/heads/master
2021-06-01T16:00:07.098248
2015-04-16T13:51:20
2015-04-16T13:51:20
12,785,454
8
6
null
2020-02-23T18:50:06
2013-09-12T14:13:40
Java
UTF-8
Java
false
false
983
java
package speedytools.clientside; import net.minecraft.util.Vec3; import java.util.Deque; import java.util.LinkedList; /** * User: The Grey Ghost * Date: 18/04/2014 */ public class UndoManagerClient { UndoManagerClient(int i_MAX_UNDO_COUNT) { MAXIMUM_UNDO_COUNT = i_MAX_UNDO_COUNT; } public void performUndo(Vec3 playerPosition) { UndoCallback undoCallback = undoHistory.peekLast(); if (undoCallback != null) { boolean undoPerformed = undoCallback.performUndo(playerPosition); if (undoPerformed) undoHistory.removeLast(); } } public void addUndoableAction(UndoCallback undoCallback) { undoHistory.addLast(undoCallback); if (undoHistory.size() > MAXIMUM_UNDO_COUNT) undoHistory.removeFirst(); } public static interface UndoCallback { public boolean performUndo(Vec3 playerPosition); } private final int MAXIMUM_UNDO_COUNT; protected static Deque<UndoCallback> undoHistory = new LinkedList<UndoCallback>(); }
[ "spamblackhole88@yahoo.com.au" ]
spamblackhole88@yahoo.com.au
c675ff1729b2773afa0565c0070d10ff2b77be9a
d8c5f1d5f5b7d222834d233db26d8b03e37bdfa3
/clients/hydra/java/src/test/java/sh/ory/hydra/model/HealthNotReadyStatusTest.java
bd1f317f7fc34e5d2cc8db45844c49136f4ce44f
[ "Apache-2.0" ]
permissive
kolotaev/sdk
31a9585720c3649b8830cf054fc7e404abe8e588
0dda1becd70be8d7b9d678321ebe780c1ba00485
refs/heads/master
2023-07-09T21:36:44.459798
2021-08-17T09:05:22
2021-08-17T09:05:22
397,220,777
0
0
null
null
null
null
UTF-8
Java
false
false
1,314
java
/* * ORY Hydra * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. * * The version of the OpenAPI document: v1.10.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package sh.ory.hydra.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for HealthNotReadyStatus */ public class HealthNotReadyStatusTest { private final HealthNotReadyStatus model = new HealthNotReadyStatus(); /** * Model tests for HealthNotReadyStatus */ @Test public void testHealthNotReadyStatus() { // TODO: test HealthNotReadyStatus } /** * Test the property 'errors' */ @Test public void errorsTest() { // TODO: test errors } }
[ "3372410+aeneasr@users.noreply.github.com" ]
3372410+aeneasr@users.noreply.github.com
127b04f91e5946a47bf33098ef702ddc72cc97f0
f875538ce04cb2286eca61da0b89f0ffcfe16d76
/leetcode_question/java/tbd/838.push-dominoes.java
55262b01f19f88c34e89852c6510ab471922cafb
[]
no_license
cicidi/leetcode-WIP
caa8856932bbffe336e6f87bf37b5a2b1541e052
f2137a57fc11b26441f642511139110cbb120951
refs/heads/master
2021-06-27T04:54:36.815927
2020-10-23T19:27:52
2020-10-23T19:27:52
174,902,990
0
0
null
null
null
null
UTF-8
Java
false
false
1,677
java
/* * @lc app=leetcode id=838 lang=java * * [838] Push Dominoes * * https://leetcode.com/problems/push-dominoes/description/ * * algorithms * Medium (45.27%) * Total Accepted: 15.6K * Total Submissions: 33.8K * Testcase Example: '".L.R...LR..L.."' * * There are N dominoes in a line, and we place each domino vertically * upright. * * In the beginning, we simultaneously push some of the dominoes either to the * left or to the right. * * * * After each second, each domino that is falling to the left pushes the * adjacent domino on the left. * * Similarly, the dominoes falling to the right push their adjacent dominoes * standing on the right. * * When a vertical domino has dominoes falling on it from both sides, it stays * still due to the balance of the forces. * * For the purposes of this question, we will consider that a falling domino * expends no additional force to a falling or already fallen domino. * * Given a string "S" representing the initial state. S[i] = 'L', if the i-th * domino has been pushed to the left; S[i] = 'R', if the i-th domino has been * pushed to the right; S[i] = '.', if the i-th domino has not been pushed. * * Return a string representing the final state.  * * Example 1: * * * Input: ".L.R...LR..L.." * Output: "LL.RR.LLRRLL.." * * * Example 2: * * * Input: "RR.L" * Output: "RR.L" * Explanation: The first domino expends no additional force on the second * domino. * * * Note: * * * 0 <= N <= 10^5 * String dominoes contains only 'L', 'R' and '.' * * */ class Solution { public String pushDominoes(String dominoes) { } }
[ "cicidi@gmail.com" ]
cicidi@gmail.com
91308a6bedc411bffaec1bddcf23bab85baa0758
d83a07cd552e5c88b22190f440f9f46f46e0b68f
/AndroidBase/src/main/java/com/zds/base/code/datamatrix/decoder/Version.java
c8de119e75ebaa3d2cf77948f7e702fd2cf43f73
[]
no_license
JohnA66/aite_android
59f01c37e634212a2af7ea620008ffaa8e5ec0e9
63de406478592c193ce7bf5eaa4a22af359b5cae
refs/heads/master
2023-04-20T22:34:58.354225
2021-05-08T02:36:52
2021-05-08T02:36:52
359,397,225
0
1
null
null
null
null
UTF-8
Java
false
false
7,637
java
/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.zds.base.code.datamatrix.decoder; import com.zds.base.code.FormatException; /** * The Version object encapsulates attributes about a particular * size Data Matrix Code. * * @author bbrown@google.com (Brian Brown) */ public final class Version { private static final Version[] VERSIONS = buildVersions(); private final int versionNumber; private final int symbolSizeRows; private final int symbolSizeColumns; private final int dataRegionSizeRows; private final int dataRegionSizeColumns; private final ECBlocks ecBlocks; private final int totalCodewords; private Version(int versionNumber, int symbolSizeRows, int symbolSizeColumns, int dataRegionSizeRows, int dataRegionSizeColumns, ECBlocks ecBlocks) { this.versionNumber = versionNumber; this.symbolSizeRows = symbolSizeRows; this.symbolSizeColumns = symbolSizeColumns; this.dataRegionSizeRows = dataRegionSizeRows; this.dataRegionSizeColumns = dataRegionSizeColumns; this.ecBlocks = ecBlocks; // Calculate the total number of codewords int total = 0; int ecCodewords = ecBlocks.getECCodewords(); ECB[] ecbArray = ecBlocks.getECBlocks(); for (ECB ecBlock : ecbArray) { total += ecBlock.getCount() * (ecBlock.getDataCodewords() + ecCodewords); } this.totalCodewords = total; } public int getVersionNumber() { return versionNumber; } public int getSymbolSizeRows() { return symbolSizeRows; } public int getSymbolSizeColumns() { return symbolSizeColumns; } public int getDataRegionSizeRows() { return dataRegionSizeRows; } public int getDataRegionSizeColumns() { return dataRegionSizeColumns; } public int getTotalCodewords() { return totalCodewords; } ECBlocks getECBlocks() { return ecBlocks; } /** * <p>Deduces version information from Data Matrix dimensions.</p> * * @param numRows Number of rows in modules * @param numColumns Number of columns in modules * @return Version for a Data Matrix Code of those dimensions * @throws FormatException if dimensions do correspond to a valid Data Matrix size */ public static Version getVersionForDimensions(int numRows, int numColumns) throws FormatException { if ((numRows & 0x01) != 0 || (numColumns & 0x01) != 0) { throw FormatException.getFormatInstance(); } for (Version version : VERSIONS) { if (version.symbolSizeRows == numRows && version.symbolSizeColumns == numColumns) { return version; } } throw FormatException.getFormatInstance(); } /** * <p>Encapsulates a set of error-correction blocks in one symbol version. Most versions will * use blocks of differing sizes within one version, so, this encapsulates the parameters for * each set of blocks. It also holds the number of error-correction codewords per block since it * will be the same across all blocks within one version.</p> */ static final class ECBlocks { private final int ecCodewords; private final ECB[] ecBlocks; private ECBlocks(int ecCodewords, ECB ecBlocks) { this.ecCodewords = ecCodewords; this.ecBlocks = new ECB[] { ecBlocks }; } private ECBlocks(int ecCodewords, ECB ecBlocks1, ECB ecBlocks2) { this.ecCodewords = ecCodewords; this.ecBlocks = new ECB[] { ecBlocks1, ecBlocks2 }; } int getECCodewords() { return ecCodewords; } ECB[] getECBlocks() { return ecBlocks; } } /** * <p>Encapsulates the parameters for one error-correction block in one symbol version. * This includes the number of data codewords, and the number of times a block with these * parameters is used consecutively in the Data Matrix code version's format.</p> */ static final class ECB { private final int count; private final int dataCodewords; private ECB(int count, int dataCodewords) { this.count = count; this.dataCodewords = dataCodewords; } int getCount() { return count; } int getDataCodewords() { return dataCodewords; } } @Override public String toString() { return String.valueOf(versionNumber); } /** * See ISO 16022:2006 5.5.1 Table 7 */ private static Version[] buildVersions() { return new Version[]{ new Version(1, 10, 10, 8, 8, new ECBlocks(5, new ECB(1, 3))), new Version(2, 12, 12, 10, 10, new ECBlocks(7, new ECB(1, 5))), new Version(3, 14, 14, 12, 12, new ECBlocks(10, new ECB(1, 8))), new Version(4, 16, 16, 14, 14, new ECBlocks(12, new ECB(1, 12))), new Version(5, 18, 18, 16, 16, new ECBlocks(14, new ECB(1, 18))), new Version(6, 20, 20, 18, 18, new ECBlocks(18, new ECB(1, 22))), new Version(7, 22, 22, 20, 20, new ECBlocks(20, new ECB(1, 30))), new Version(8, 24, 24, 22, 22, new ECBlocks(24, new ECB(1, 36))), new Version(9, 26, 26, 24, 24, new ECBlocks(28, new ECB(1, 44))), new Version(10, 32, 32, 14, 14, new ECBlocks(36, new ECB(1, 62))), new Version(11, 36, 36, 16, 16, new ECBlocks(42, new ECB(1, 86))), new Version(12, 40, 40, 18, 18, new ECBlocks(48, new ECB(1, 114))), new Version(13, 44, 44, 20, 20, new ECBlocks(56, new ECB(1, 144))), new Version(14, 48, 48, 22, 22, new ECBlocks(68, new ECB(1, 174))), new Version(15, 52, 52, 24, 24, new ECBlocks(42, new ECB(2, 102))), new Version(16, 64, 64, 14, 14, new ECBlocks(56, new ECB(2, 140))), new Version(17, 72, 72, 16, 16, new ECBlocks(36, new ECB(4, 92))), new Version(18, 80, 80, 18, 18, new ECBlocks(48, new ECB(4, 114))), new Version(19, 88, 88, 20, 20, new ECBlocks(56, new ECB(4, 144))), new Version(20, 96, 96, 22, 22, new ECBlocks(68, new ECB(4, 174))), new Version(21, 104, 104, 24, 24, new ECBlocks(56, new ECB(6, 136))), new Version(22, 120, 120, 18, 18, new ECBlocks(68, new ECB(6, 175))), new Version(23, 132, 132, 20, 20, new ECBlocks(62, new ECB(8, 163))), new Version(24, 144, 144, 22, 22, new ECBlocks(62, new ECB(8, 156), new ECB(2, 155))), new Version(25, 8, 18, 6, 16, new ECBlocks(7, new ECB(1, 5))), new Version(26, 8, 32, 6, 14, new ECBlocks(11, new ECB(1, 10))), new Version(27, 12, 26, 10, 24, new ECBlocks(14, new ECB(1, 16))), new Version(28, 12, 36, 10, 16, new ECBlocks(18, new ECB(1, 22))), new Version(29, 16, 36, 14, 16, new ECBlocks(24, new ECB(1, 32))), new Version(30, 16, 48, 14, 22, new ECBlocks(28, new ECB(1, 49))) }; } }
[ "846823334@qq.com" ]
846823334@qq.com
363c46dd8f8edbba69f74c83d908b18578877d80
c9e706eb685b1e9e368456d9f9677a7b63a9056d
/src/main/java/tree/sampler/rollout/RolloutPolicy_Window.java
e6b1c6cb5efcad2a753c21f6c82c12cf5300628e
[]
no_license
mws262/qwop-controls
e568920e634de10b887fdb468cd9e5aefba410bf
c9a17f8697a069d4ae761bd5ba09e798bf5c7615
refs/heads/master
2022-10-13T18:38:44.168837
2020-07-01T21:23:01
2020-07-01T21:23:01
153,288,826
0
0
null
2022-10-04T23:47:19
2018-10-16T13:20:30
PureBasic
UTF-8
Java
false
false
4,012
java
package tree.sampler.rollout; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.primitives.Floats; import game.IGameInternal; import game.action.Action; import game.action.ActionQueue; import game.action.Command; import game.state.IState; import org.jetbrains.annotations.NotNull; import tree.node.NodeGameExplorableBase; import java.util.ArrayList; import java.util.List; /** * This is a meta-rollout policy. It does multiple other rollouts and aggregates the results. * * For now, this is either a best or worst out of three. Intuition says worst of three should be more robust, but so * far, best of three has been better. Perhaps because overinflated scores tend to be explored by UCB and toned down, * whereas underestimated scores might never be touched again. * * @author matt */ public class RolloutPolicy_Window<C extends Command<?>, S extends IState> implements IRolloutPolicy<C, S> { @JsonProperty private final IRolloutPolicy<C, S> individualRollout; private ActionQueue<C> actionQueue = new ActionQueue<>(); private final List<Action<C>> actionSequence = new ArrayList<>(); // Reused local list. public enum Criteria { WORST, BEST, AVERAGE, } public Criteria selectionCriteria = Criteria.BEST; public RolloutPolicy_Window(@JsonProperty("individualRollout") IRolloutPolicy<C, S> individualRollout) { this.individualRollout = individualRollout; } @Override public float rollout(@NotNull NodeGameExplorableBase<?, C, S> startNode, IGameInternal<C, S> game) { // Need to do a rollout for the actual node we landed on. Action<C> middleAction = startNode.getAction(); float scoreMid = individualRollout.rollout(startNode, game); // Pick valid actions above and below -- TODO generalize this to larger windows also. List<Action<C>> windowActions = new ArrayList<>(); windowActions.add(new Action<>(middleAction.getTimestepsTotal() + 1, middleAction.peek())); if (middleAction.getTimestepsTotal() > 1) { windowActions.add(new Action<>(middleAction.getTimestepsTotal() - 1, middleAction.peek())); } float[] windowScores = new float[windowActions.size()]; for (int i = 0; i < windowActions.size(); i++) { actionQueue.clearAll(); if (startNode.getTreeDepth() > 1) { startNode.getParent().getSequence(actionSequence); actionQueue.addSequence(actionSequence); } actionQueue.addAction(windowActions.get(i)); game.resetGame(); while (!actionQueue.isEmpty()) { game.step(actionQueue.pollCommand()); } NodeGameExplorableBase<?, C, S> windowNode = startNode.getParent().addBackwardsLinkedChild(windowActions.get(i), game.getCurrentState()); windowScores[i] = individualRollout.rollout(windowNode, game); } switch(selectionCriteria) { case WORST: return Float.min(scoreMid, Floats.min(windowScores)); case BEST: return Float.max(scoreMid, Floats.max(windowScores)); case AVERAGE: float sum = 0; for (float score : windowScores) { sum += score; } sum += scoreMid; return sum / (float)(windowScores.length + 1); default: throw new IllegalArgumentException("Unknown selection criteria specified: " + selectionCriteria.name()); } } @JsonIgnore @Override public IRolloutPolicy<C, S> getCopy() { return new RolloutPolicy_Window<>(individualRollout.getCopy()); } public IRolloutPolicy<C, S> getIndividualRollout() { return individualRollout; } @Override public void close() { individualRollout.close(); } }
[ "mws262@cornell.edu" ]
mws262@cornell.edu
550b3539a70a14fd5d9259da9923a5b25f263294
d1e0a76ea237b86e8a60291930e098a4edc5617d
/src/main/java/org/spongepowered/asm/mixin/injection/selectors/ITargetSelectorByName.java
c1c9d80307fd2f7673825b40a53caaaa137555fc
[ "MIT" ]
permissive
krolik-exe/Mixin
128e2e5234f1b75e15d71ff132a32a773211207f
20499423530ac4f9147df8ba8d2a908b26ad8373
refs/heads/main
2023-04-14T01:46:48.279104
2021-02-12T18:33:10
2021-02-12T18:33:10
356,397,436
0
0
MIT
2021-04-09T21:02:38
2021-04-09T21:02:37
null
UTF-8
Java
false
false
3,465
java
/* * This file is part of Mixin, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.spongepowered.asm.mixin.injection.selectors; /** * A target selector which selects elements directly by name. */ public interface ITargetSelectorByName extends ITargetSelector { /** * Get the member owner, can be null */ public abstract String getOwner(); /** * Get the member name, can be null */ public abstract String getName(); /** * Get the member descriptor, can be null */ public abstract String getDesc(); /** * Get whether this reference is fully qualified * * @return true if all components of this reference are non-null */ public abstract boolean isFullyQualified(); /** * Get whether this target selector is definitely a field, the output of * this method is undefined if {@link #isFullyQualified} returns false. * * @return true if this is definitely a field */ public abstract boolean isField(); /** * Get whether this member represents a constructor * * @return true if member name is <tt>&lt;init&gt;</tt> */ public abstract boolean isConstructor(); /** * Get whether this selector represents a class initialiser * * @return true if member name is <tt>&lt;clinit&gt;</tt> */ public abstract boolean isClassInitialiser(); /** * Get whether this selector represents a constructor or class initialiser * * @return true if member name is <tt>&lt;init&gt;</tt> or * <tt>&lt;clinit&gt;</tt> */ public abstract boolean isInitialiser(); /** * Get a representation of this selector as a complete descriptor */ public abstract String toDescriptor(); /** * Test whether this selector matches the supplied values. Null values are * ignored. * @param owner Owner to compare with, null to skip * @param name Name to compare with, null to skip * @param desc Signature to compare with, null to skip * @return true if all non-null values in this reference match non-null * arguments supplied to this method */ public abstract MatchResult matches(String owner, String name, String desc); }
[ "adam@eq2.co.uk" ]
adam@eq2.co.uk