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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bf9d5bd2d5eecf286651b37cacbc34c1770648ed
|
148100c6a5ac58980e43aeb0ef41b00d76dfb5b3
|
/sources/com/j256/ormlite/field/types/SerializableType.java
|
744c3eeef4850efa19bf7bf6f5451622a838fd1e
|
[] |
no_license
|
niravrathod/car_details
|
f979de0b857f93efe079cd8d7567f2134755802d
|
398897c050436f13b7160050f375ec1f4e05cdf8
|
refs/heads/master
| 2020-04-13T16:36:29.854057
| 2018-12-27T19:03:46
| 2018-12-27T19:03:46
| 163,325,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,758
|
java
|
package com.j256.ormlite.field.types;
import com.j256.ormlite.field.FieldType;
import com.j256.ormlite.field.SqlType;
import com.j256.ormlite.support.DatabaseResults;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.sql.SQLException;
public class SerializableType extends BaseDataType {
private static final SerializableType singleTon = new SerializableType();
public boolean isAppropriateId() {
return false;
}
public boolean isArgumentHolderRequired() {
return true;
}
public boolean isComparable() {
return false;
}
public boolean isStreamType() {
return true;
}
public static SerializableType getSingleton() {
return singleTon;
}
private SerializableType() {
super(SqlType.SERIALIZABLE, new Class[0]);
}
protected SerializableType(SqlType sqlType, Class<?>[] clsArr) {
super(sqlType, clsArr);
}
public Object parseDefaultString(FieldType fieldType, String str) {
throw new SQLException("Default values for serializable types are not supported");
}
public Object resultToSqlArg(FieldType fieldType, DatabaseResults databaseResults, int i) {
return databaseResults.getBytes(i);
}
public java.lang.Object sqlArgToJava(com.j256.ormlite.field.FieldType r4, java.lang.Object r5, int r6) {
/* JADX: method processing error */
/*
Error: java.lang.NullPointerException
at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)
at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)
at jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)
at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)
at jadx.core.ProcessClass.process(ProcessClass.java:34)
at jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)
at jadx.core.ProcessClass.process(ProcessClass.java:39)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
at jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)
*/
/*
r3 = this;
r5 = (byte[]) r5;
r4 = 0;
r6 = new java.io.ObjectInputStream; Catch:{ Exception -> 0x0020 }
r0 = new java.io.ByteArrayInputStream; Catch:{ Exception -> 0x0020 }
r0.<init>(r5); Catch:{ Exception -> 0x0020 }
r6.<init>(r0); Catch:{ Exception -> 0x0020 }
r4 = r6.readObject(); Catch:{ Exception -> 0x0019, all -> 0x0015 }
r6.close(); Catch:{ IOException -> 0x0014 }
L_0x0014:
return r4;
L_0x0015:
r4 = move-exception;
r5 = r4;
r4 = r6;
goto L_0x0049;
L_0x0019:
r4 = move-exception;
r2 = r6;
r6 = r4;
r4 = r2;
goto L_0x0021;
L_0x001e:
r5 = move-exception;
goto L_0x0049;
L_0x0020:
r6 = move-exception;
L_0x0021:
r0 = new java.lang.StringBuilder; Catch:{ all -> 0x001e }
r0.<init>(); Catch:{ all -> 0x001e }
r1 = "Could not read serialized object from byte array: "; Catch:{ all -> 0x001e }
r0.append(r1); Catch:{ all -> 0x001e }
r1 = java.util.Arrays.toString(r5); Catch:{ all -> 0x001e }
r0.append(r1); Catch:{ all -> 0x001e }
r1 = "(len "; Catch:{ all -> 0x001e }
r0.append(r1); Catch:{ all -> 0x001e }
r5 = r5.length; Catch:{ all -> 0x001e }
r0.append(r5); Catch:{ all -> 0x001e }
r5 = ")"; Catch:{ all -> 0x001e }
r0.append(r5); Catch:{ all -> 0x001e }
r5 = r0.toString(); Catch:{ all -> 0x001e }
r5 = com.j256.ormlite.misc.SqlExceptionUtil.create(r5, r6); Catch:{ all -> 0x001e }
throw r5; Catch:{ all -> 0x001e }
L_0x0049:
if (r4 == 0) goto L_0x004e;
L_0x004b:
r4.close(); Catch:{ IOException -> 0x004e }
L_0x004e:
throw r5;
*/
throw new UnsupportedOperationException("Method not decompiled: com.j256.ormlite.field.types.SerializableType.sqlArgToJava(com.j256.ormlite.field.FieldType, java.lang.Object, int):java.lang.Object");
}
public java.lang.Object javaToSqlArg(com.j256.ormlite.field.FieldType r4, java.lang.Object r5) {
/* JADX: method processing error */
/*
Error: java.lang.NullPointerException
at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)
at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)
at jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)
at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)
at jadx.core.ProcessClass.process(ProcessClass.java:34)
at jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)
at jadx.core.ProcessClass.process(ProcessClass.java:39)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
at jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)
*/
/*
r3 = this;
r4 = 0;
r0 = new java.io.ByteArrayOutputStream; Catch:{ Exception -> 0x001e }
r0.<init>(); Catch:{ Exception -> 0x001e }
r1 = new java.io.ObjectOutputStream; Catch:{ Exception -> 0x001e }
r1.<init>(r0); Catch:{ Exception -> 0x001e }
r1.writeObject(r5); Catch:{ Exception -> 0x0019, all -> 0x0016 }
r1.close(); Catch:{ Exception -> 0x0019, all -> 0x0016 }
r0 = r0.toByteArray(); Catch:{ Exception -> 0x001e }
return r0;
L_0x0016:
r5 = move-exception;
r4 = r1;
goto L_0x0035;
L_0x0019:
r0 = move-exception;
r4 = r1;
goto L_0x001f;
L_0x001c:
r5 = move-exception;
goto L_0x0035;
L_0x001e:
r0 = move-exception;
L_0x001f:
r1 = new java.lang.StringBuilder; Catch:{ all -> 0x001c }
r1.<init>(); Catch:{ all -> 0x001c }
r2 = "Could not write serialized object to byte array: "; Catch:{ all -> 0x001c }
r1.append(r2); Catch:{ all -> 0x001c }
r1.append(r5); Catch:{ all -> 0x001c }
r5 = r1.toString(); Catch:{ all -> 0x001c }
r5 = com.j256.ormlite.misc.SqlExceptionUtil.create(r5, r0); Catch:{ all -> 0x001c }
throw r5; Catch:{ all -> 0x001c }
L_0x0035:
if (r4 == 0) goto L_0x003a;
L_0x0037:
r4.close(); Catch:{ IOException -> 0x003a }
L_0x003a:
throw r5;
*/
throw new UnsupportedOperationException("Method not decompiled: com.j256.ormlite.field.types.SerializableType.javaToSqlArg(com.j256.ormlite.field.FieldType, java.lang.Object):java.lang.Object");
}
public boolean isValidForField(Field field) {
return Serializable.class.isAssignableFrom(field.getType());
}
public Object resultStringToJava(FieldType fieldType, String str, int i) {
throw new SQLException("Serializable type cannot be converted from string to Java");
}
public Class<?> getPrimaryClass() {
return Serializable.class;
}
}
|
[
"niravrathod473@gmail.com"
] |
niravrathod473@gmail.com
|
5e7f6a215282e6be617889f98e5e3fa189d6adbc
|
fa444cda81bf78a21b634718d1b30f078b7087e1
|
/src/main/java/com/learn/patterns/freemanAndFreeman/headfirst/combining/factory/DuckCall.java
|
7319af101f348fc0d9f98e4db454990f143c5e3a
|
[] |
no_license
|
dmitrybilyk/interviews
|
8fb4356a77ef63d74db613295bbbb296e3e652b7
|
f48d00bd348bab871304578c0c6c423c24db175e
|
refs/heads/master
| 2022-12-22T08:11:35.366586
| 2022-04-29T17:36:20
| 2022-04-29T17:36:20
| 23,141,851
| 4
| 0
| null | 2022-12-16T03:39:20
| 2014-08-20T08:42:27
|
Java
|
UTF-8
|
Java
| false
| false
| 235
|
java
|
package com.learn.patterns.freemanAndFreeman.headfirst.combining.factory;
public class DuckCall implements Quackable {
public void quack() {
System.out.println("Kwak");
}
public String toString() {
return "Duck Call";
}
}
|
[
"dmitry.bilyk@symmetrics.de"
] |
dmitry.bilyk@symmetrics.de
|
36f1da545679b58ace9a0094ce1d6fb6dad62cac
|
483d588e1d73b9d1aee68c1ca7a7aa4255121d16
|
/plugins/org.integratedmodelling.thinklab.core/src/org/integratedmodelling/thinklab/application/ApplicationDescriptor.java
|
23c00d8a18a60e3ee1d61394919ad9b39e4252de
|
[] |
no_license
|
fvilla/thinklab
|
cc4d10a9e9472512bdb7650970aa1ebc51dc9b53
|
d6881a1c142a9f71a7cdf6715fd6ef73304768f0
|
refs/heads/master
| 2020-05-17T07:05:12.729595
| 2011-04-20T09:18:54
| 2011-04-20T09:18:54
| 1,614,458
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,674
|
java
|
package org.integratedmodelling.thinklab.application;
import java.net.URL;
import java.util.ArrayList;
import org.integratedmodelling.thinklab.exception.ThinklabIOException;
import org.integratedmodelling.thinklab.owlapi.Session;
import org.integratedmodelling.thinklab.plugin.ThinklabPlugin;
import org.integratedmodelling.utils.JPFUtils;
import org.java.plugin.Plugin;
import org.java.plugin.registry.Extension;
public class ApplicationDescriptor {
Plugin registeringPlugin;
String id;
String description;
String taskClass;
String code;
ArrayList<URL> scripts = new ArrayList<URL>();
String language;
String sessionClass;
public ApplicationDescriptor(Plugin plugin, Extension ext) throws ThinklabIOException {
this.registeringPlugin = plugin;
this.id = ext.getParameter("id").valueAsString();
this.description = JPFUtils.getParameter(ext, "description");
this.taskClass = JPFUtils.getParameter(ext, "main-task-class");
this.sessionClass = JPFUtils.getParameter(ext,
"session-class", Session.class.getCanonicalName());
Extension.Parameter aext = ext.getParameter("declaration");
if (aext != null) {
this.code = JPFUtils.getParameter(aext, "code");
String[] ss = JPFUtils.getParameters(aext, "script");
if (ss != null) {
for (String s: ss) {
URL url = ((ThinklabPlugin)plugin).getResourceURL(s);
if (url == null) {
throw new ThinklabIOException("application script " + s + " not found in classpath");
}
this.scripts.add(url);
}
}
this.language = JPFUtils.getParameter(aext, "language");
}
}
}
|
[
"fvilla@ca20354d-2f28-0410-8711-9259e250f5a2"
] |
fvilla@ca20354d-2f28-0410-8711-9259e250f5a2
|
80d5e78ca6038745c2ee76670085543e890f23b5
|
21e092f59107e5cceaca12442bc2e90835473c8b
|
/bacore/src/main/java/com/basoft/core/ware/wechat/domain/WebAccessToken.java
|
18fdc83748e2b7cba8e5a1846ade976e08f87d9a
|
[] |
no_license
|
kim50012/smart-menu-endpoint
|
55095ac22dd1af0851c04837190b7b6652d884a0
|
d45246f341f315f8810429b3a4ec1d80cb894d7f
|
refs/heads/master
| 2023-06-17T02:52:01.135480
| 2021-07-15T15:05:19
| 2021-07-15T15:05:19
| 381,788,497
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,021
|
java
|
package com.basoft.core.ware.wechat.domain;
/**
* 网页授权access_token
*/
public class WebAccessToken extends WeixinReturn {
/**
* 网页授权接口调用凭证,注意:此access_token与基础支持的access_token不同
*/
private String access_token;
/**
* access_token接口调用凭证超时时间,单位(秒)
*/
private int expires_in;
/**
* 用户刷新access_token
*/
private String refresh_token;
/**
* 用户唯一标识,请注意,在未关注公众号时,用户访问公众号的网页,也会产生一个用户和公众号唯一的OpenID
*/
private String openid;
/**
* 用户授权的作用域,使用逗号(,)分隔
*/
private String scope;
/**
* 只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段
*/
private String unionid;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public int getExpires_in() {
return expires_in;
}
public void setExpires_in(int expires_in) {
this.expires_in = expires_in;
}
public String getRefresh_token() {
return refresh_token;
}
public void setRefresh_token(String refresh_token) {
this.refresh_token = refresh_token;
}
public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid;
}
public String getScope() {
return scope;
}
public void setScope(String scope) {
this.scope = scope;
}
public String getUnionid() {
return unionid;
}
public void setUnionid(String unionid) {
this.unionid = unionid;
}
public WebAccessToken() {
super();
}
public WebAccessToken(int errcode, String errmsg) {
super(errcode, errmsg);
}
@Override
public String toString() {
return "WebAccessToken [access_token=" + access_token + ", expires_in=" + expires_in + ", refresh_token="
+ refresh_token + ", openid=" + openid + ", scope=" + scope + ", unionid=" + unionid + "]";
}
}
|
[
"kim50012@naver.com"
] |
kim50012@naver.com
|
d0f1bf3d0b3887d5a76aa6cb9bf3cde48aab1fd0
|
0cd8a92890a94c640ea2bb09565e133d52f2f091
|
/jsqlbox/src/test/java/test/examples/orm/entities/TreeNode.java
|
f3bc99d0c8f2dcdd046bba93d1bb4185e994e9fa
|
[
"Apache-2.0"
] |
permissive
|
TestBrother/jSqlBox
|
c169ea4e865a58c27932b2674542fe7a082a3efe
|
3192975ece3d186907c0cedfde3bb8c2809ea45e
|
refs/heads/master
| 2020-03-29T01:44:56.561055
| 2017-05-13T00:06:55
| 2017-05-13T00:06:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,089
|
java
|
package test.examples.orm.entities;
import java.util.Set;
import com.github.drinkjava2.jsqlbox.EntityBase;
public class TreeNode extends EntityBase {
public static final String CREATE_SQL = "create table treetest ( "//
+ "id varchar(32), "//
+ "comments varchar(55), "//
+ "pid varchar(32), "//
+ "line integer, "//
+ "level integer, "//
+ "tempno integer, "//
+ "temporder integer "//
+ ") ";
String id;
String comments;
String pid;
Integer line;
Integer level;
Integer tempno;
Integer temporder;
TreeNode parent;
Set<TreeNode> childs;
{
this.box().configTable("treetest");
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getComments() {
return comments;
}
public void setComments(String comments) {
this.comments = comments;
}
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
public Integer getLine() {
return line;
}
public void setLine(Integer line) {
this.line = line;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getTempno() {
return tempno;
}
public void setTempno(Integer tempno) {
this.tempno = tempno;
}
public Integer getTemporder() {
return temporder;
}
public void setTemporder(Integer temporder) {
this.temporder = temporder;
}
public TreeNode getParent() {
return parent;
}
public void setParent(TreeNode parent) {
this.parent = parent;
}
public Set<TreeNode> getChilds() {
return childs;
}
public void setChilds(Set<TreeNode> childs) {
this.childs = childs;
}
public String ID() {
return box().getColumnName("id");
}
public String PID() {
return box().getColumnName("pid");
}
public String LINE() {
return box().getColumnName("line");
}
public String LEVEL() {
return box().getColumnName("level");
}
public String PARENT() {
return box().getColumnName("parent");
}
public String CHILDS() {
return box().getColumnName("childs");
}
}
|
[
"yong9981@gmail.com"
] |
yong9981@gmail.com
|
8fe3f5b1813bf09607889bc79677e8a15af2db27
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/22/22_7421a31b8b8300294f09a15a83aaddf9a4a97cf3/AggressionDesire/22_7421a31b8b8300294f09a15a83aaddf9a4a97cf3_AggressionDesire_t.java
|
1b41cfb33e58925bd2a9e01d44a92e55ff99b8b8
|
[] |
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,182
|
java
|
/*
* This file is part of aion-unique <aion-unique.org>.
*
* aion-unique is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* aion-unique is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with aion-unique. If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.ai.desires.impl;
import java.util.Collections;
import com.aionemu.gameserver.ai.AI;
import com.aionemu.gameserver.ai.desires.AbstractDesire;
import com.aionemu.gameserver.ai.events.Event;
import com.aionemu.gameserver.ai.state.AIState;
import com.aionemu.gameserver.controllers.attack.AttackResult;
import com.aionemu.gameserver.controllers.attack.AttackStatus;
import com.aionemu.gameserver.model.gameobjects.Npc;
import com.aionemu.gameserver.model.gameobjects.VisibleObject;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.network.aion.serverpackets.SM_ATTACK;
import com.aionemu.gameserver.utils.MathUtil;
import com.aionemu.gameserver.utils.PacketSendUtility;
import com.aionemu.gameserver.utils.ThreadPoolManager;
/**
* @author KKnD
*/
public final class AggressionDesire extends AbstractDesire
{
protected Npc npc;
public AggressionDesire(Npc npc, int desirePower)
{
super(desirePower);
this.npc = npc;
}
@Override
public boolean handleDesire(AI<?> ai)
{
if (npc == null) return false;
for(VisibleObject visibleObject : npc.getKnownList())
{
if (visibleObject == null)
continue;
if (visibleObject instanceof Player)
{
final Player player = (Player) visibleObject;
if(!player.getLifeStats().isAlreadyDead() && MathUtil.isInRange(npc, player, npc.getAggroRange())
&& (Math.abs(player.getZ() - npc.getZ()) < 30))
{
if(!npc.isAggressiveTo(player.getCommonData().getRace()))
continue;
npc.getAi().setAiState(AIState.NONE);// TODO
// ToDO proper aggro emotion on aggro range enter
PacketSendUtility.broadcastPacket(npc, new SM_ATTACK(npc.getObjectId(), player.getObjectId(), 0,
633, 0, Collections.singletonList(new AttackResult(0, AttackStatus.NORMALHIT))));
ThreadPoolManager.getInstance().schedule(new Runnable(){
@Override
public void run()
{
npc.getAggroList().addDamageHate(player, 0, 0);
npc.getAi().handleEvent(Event.ATTACKED);
}
}, 1000);
break;
}
}
}
return true;
}
@Override
public int getExecutionInterval()
{
return 2;
}
@Override
public void onClear()
{
// TODO Auto-generated method stub
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
fc72adb6c852bc3c4310445b4f3d331f03d90571
|
dd5862618cb3de4c6e8df160fca73b9cdd1c5dab
|
/src/main/java/basic_java_thread/thread_pool/my_thread_pool/Task.java
|
7d7e3e7ba6a4c40c47728eba27c26a1314593dec
|
[] |
no_license
|
YifengGuo/Multi-Thread
|
5d2d205fbc4b9335927f9c9ca12873bbcd9b14f7
|
f3310d2de421ece58a955b51e118fed6dd351655
|
refs/heads/master
| 2021-06-09T18:35:07.395422
| 2019-10-15T07:29:20
| 2019-10-15T07:29:20
| 134,930,888
| 0
| 0
| null | 2021-03-31T21:39:15
| 2018-05-26T05:02:19
|
Java
|
UTF-8
|
Java
| false
| false
| 613
|
java
|
package basic_java_thread.thread_pool.my_thread_pool;
/**
* Created by guoyifeng on 7/24/18
*/
public class Task implements Runnable {
private int taskId;
public Task(int taskId) {
this.taskId = taskId;
}
@Override
public void run() {
System.out.println("Start executing task number " + taskId);
try {
// Simulating processing time
// Perform tasks
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("End executing task number" + taskId);
}
}
|
[
"gyf940517@gmail.com"
] |
gyf940517@gmail.com
|
c6b5fcb161d5397f5be95ccceca55506b5883be6
|
7569f9a68ea0ad651b39086ee549119de6d8af36
|
/cocoon-2.1.9/src/blocks/python/mocks/org/python/util/PythonInterpreter.java
|
f831f3a4af1f2175bf3cab248af480ecba253ad5
|
[
"Apache-2.0"
] |
permissive
|
tpso-src/cocoon
|
844357890f8565c4e7852d2459668ab875c3be39
|
f590cca695fd9930fbb98d86ae5f40afe399c6c2
|
refs/heads/master
| 2021-01-10T02:45:37.533684
| 2015-07-29T18:47:11
| 2015-07-29T18:47:11
| 44,549,791
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,431
|
java
|
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* 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.python.util;
import java.util.Properties;
import org.python.core.PyObject;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id: PythonInterpreter.java 30932 2004-07-29 17:35:38Z vgritsenko $
*/
public class PythonInterpreter {
public static void initialize(Properties preProperties,
Properties postProperties,
String[] argv) {
throw new NoSuchMethodError("This is a mock object");
}
public void set(String string, Object obj) {
throw new NoSuchMethodError("This is a mock object");
}
public void exec(PyObject code) {
throw new NoSuchMethodError("This is a mock object");
}
}
|
[
"ms@tpso.com"
] |
ms@tpso.com
|
fcbf0835dec383c9f5918af34cdb16d850946ca2
|
2f3c04382a66dbf222c8587edd67a5df4bc80422
|
/src/com/softproideas/app/admin/users/model/UserDetailsDTO.java
|
857dd41f219a8e8333eafcd4039dcdc0fbc55655
|
[] |
no_license
|
arnoldbendaa/cppro
|
d3ab6181cc51baad2b80876c65e11e92c569f0cc
|
f55958b85a74ad685f1360ae33c881b50d6e5814
|
refs/heads/master
| 2020-03-23T04:18:00.265742
| 2018-09-11T08:15:28
| 2018-09-11T08:15:28
| 141,074,966
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,844
|
java
|
/*******************************************************************************
* Copyright ©2015. IT Services Jacek Kurasiewicz, Warsaw, Poland. All Rights
* Reserved.
*
* Republication, redistribution, granting a license to other parties, using,
* copying, modifying this software and its documentation is prohibited without the
* prior written consent of IT Services Jacek Kurasiewicz.
* Contact The Office of IT Services Jacek Kurasiewicz, ul. Koszykowa 60/62 lok.
* 43, 00-673 Warszawa, jk@softpro.pl, +48 512-25-67-67, for commercial licensing
* opportunities.
*
* IN NO EVENT SHALL IT SERVICES JACEK KURASIEWICZ BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST
* PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
* IT SERVICES JACEK KURASIEWICZ HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* IT SERVICES JACEK KURASIEWICZ SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY,
* PROVIDED HEREUNDER IS PROVIDED "AS IS". IT SERVICES JACEK KURASIEWICZ HAS NO
* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
* MODIFICATIONS.
*******************************************************************************/
package com.softproideas.app.admin.users.model;
import java.util.List;
import com.softproideas.app.admin.profiles.model.ProfileDTO;
import com.softproideas.app.core.flatform.model.FlatFormExtendedCoreDTO;
import com.softproideas.app.core.roles.model.RoleCoreDTO;
import com.softproideas.app.core.users.model.UserCoreDTO;
import com.softproideas.common.models.FormDeploymentDataDTO;
import com.softproideas.commons.model.tree.NodeStaticDTO;
public class UserDetailsDTO extends UserCoreDTO {
private String emailAddress;
private List<RoleCoreDTO> roles;
private String logonAlias;
private String password;
private boolean isPasswordNeverExpires;
private String externalSystemUserName;
private List<UserSecurityNodeDTO> userSecurityAssignments;
private boolean isUserReadOnly;
private boolean isNewFeaturesEnabled;
private boolean areButtonsVisible;
private boolean roadMapAvailable;
private List<NodeStaticDTO> userAdminApp;
private List<RoleCoreDTO> hiddenRoles;
private List<FlatFormExtendedCoreDTO> xmlForm;
private List<FlatFormExtendedCoreDTO> availableXmlForm;
private String confirmPassword;
private boolean isShowBudgetActivity;
private boolean isNewView;
private List<ProfileDTO> mobileProfiles;
private List<FormDeploymentDataDTO> profilesToSave;
public List<NodeStaticDTO> getUserAdminApp() {
return userAdminApp;
}
public void setUserAdminApp(List<NodeStaticDTO> userAdminApp) {
this.userAdminApp = userAdminApp;
}
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
public List<RoleCoreDTO> getRoles() {
return roles;
}
public void setRoles(List<RoleCoreDTO> roles) {
this.roles = roles;
}
public String getLogonAlias() {
return logonAlias;
}
public void setLogonAlias(String logonAlias) {
this.logonAlias = logonAlias;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public boolean isPasswordNeverExpires() {
return isPasswordNeverExpires;
}
public void setPasswordNeverExpires(boolean isPasswordNeverExpires) {
this.isPasswordNeverExpires = isPasswordNeverExpires;
}
public String getExternalSystemUserName() {
return externalSystemUserName;
}
public void setExternalSystemUserName(String externalSystemUserName) {
this.externalSystemUserName = externalSystemUserName;
}
public List<UserSecurityNodeDTO> getUserSecurityAssignments() {
return userSecurityAssignments;
}
public void setUserSecurityAssignments(List<UserSecurityNodeDTO> userSecurityAssignments) {
this.userSecurityAssignments = userSecurityAssignments;
}
public boolean isUserReadOnly() {
return isUserReadOnly;
}
public void setUserReadOnly(boolean isUserReadOnly) {
this.isUserReadOnly = isUserReadOnly;
}
public boolean isNewFeaturesEnabled() {
return isNewFeaturesEnabled;
}
public void setNewFeaturesEnabled(boolean isNewFeaturesEnabled) {
this.isNewFeaturesEnabled = isNewFeaturesEnabled;
}
public boolean isAreButtonsVisible() {
return areButtonsVisible;
}
public void setAreButtonsVisible(boolean areButtonsVisible) {
this.areButtonsVisible = areButtonsVisible;
}
public List<RoleCoreDTO> getHiddenRoles() {
return hiddenRoles;
}
public void setHiddenRoles(List<RoleCoreDTO> hiddenRoles) {
this.hiddenRoles = hiddenRoles;
}
public List<FlatFormExtendedCoreDTO> getXmlForm() {
return xmlForm;
}
public void setXmlForm(List<FlatFormExtendedCoreDTO> xmlForm) {
this.xmlForm = xmlForm;
}
public List<FlatFormExtendedCoreDTO> getAvailableXmlForm() {
return availableXmlForm;
}
public void setAvailableXmlForm(List<FlatFormExtendedCoreDTO> availableXmlForm) {
this.availableXmlForm = availableXmlForm;
}
public String getConfirmPassword() {
return confirmPassword;
}
public void setConfirmPassword(String confirmPassword) {
this.confirmPassword = confirmPassword;
}
public boolean isShowBudgetActivity() {
return isShowBudgetActivity;
}
public void setShowBudgetActivity(boolean isShowBudgetActivity) {
this.isShowBudgetActivity = isShowBudgetActivity;
}
public boolean isNewView() {
return isNewView;
}
public void setNewView(boolean isNewView) {
this.isNewView = isNewView;
}
public boolean getRoadMapAvailable() {
return roadMapAvailable;
}
public void setRoadMapAvailable(boolean roadmapAvailable) {
this.roadMapAvailable = roadmapAvailable;
}
public List<ProfileDTO> getMobileProfiles() {
return mobileProfiles;
}
public void setMobileProfiles(List<ProfileDTO> mobileProfiles) {
this.mobileProfiles = mobileProfiles;
}
public List<FormDeploymentDataDTO> getProfilesToSave() {
return profilesToSave;
}
public void setProfilesToSave(List<FormDeploymentDataDTO> profilesToSave) {
this.profilesToSave = profilesToSave;
}
}
|
[
"arnoldbendaa@gmail.com"
] |
arnoldbendaa@gmail.com
|
1ae582cca610c34e104f82e2e0e833c1955294c3
|
5f18ffbbd6e3b5c03ff181b438b86ed48538eece
|
/app/src/main/java/com/codingfeel/sm/MyApplication.java
|
01621e6a00167b42dfac3ad59913985ad8b5d076
|
[] |
no_license
|
heboot/boom_sm
|
935daf27c84c7f15539753d6bf58827ea07e9aab
|
471890c05875f54ba27a5e53575cc762575302ee
|
refs/heads/master
| 2021-01-13T03:36:15.984501
| 2017-01-16T15:30:42
| 2017-01-16T15:30:42
| 77,319,979
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,192
|
java
|
package com.codingfeel.sm;
import android.app.Application;
import android.util.Log;
import com.codingfeel.sm.enums.ShareType;
import com.codingfeel.sm.model.PostTagModel;
import com.codingfeel.sm.utils.MiscUtils;
import com.tencent.bugly.crashreport.CrashReport;
//import com.tencent.bugly.crashreport.CrashReport;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.util.List;
/**
* Created by Heboot on 16/6/25.
*/
public class MyApplication extends Application {
private static MyApplication myApplication;
/**
* app版本号
*/
private String version;
/**
* token更新的时间戳
*/
private long uploadTokenUpdateTime;
/**
* 七牛的上传token
*/
private String uploadToken;
/**
* 个推的clientId
*/
private String getuiCID;
/**
* 发帖时候的类型
*/
private List<PostTagModel> postTagModelList;
/**
* 七牛的解析路径
*/
private String qiniuPrefix;
/**
* 分享类型
*/
private ShareType shareType;
@Override
public void onCreate() {
super.onCreate();
// Thread.currentThread().setUncaughtExceptionHandler(new
// MyThreadCatch());
CrashReport.initCrashReport(getApplicationContext(), BuildConfig.BUGLY_APPID, false);
myApplication = this;
version = MiscUtils.getAppVersion(this);
}
public static MyApplication getInstance() {
return myApplication;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public long getUploadTokenUpdateTime() {
return uploadTokenUpdateTime;
}
public void setUploadTokenUpdateTime(long uploadTokenUpdateTime) {
this.uploadTokenUpdateTime = uploadTokenUpdateTime;
}
public String getUploadToken() {
return uploadToken;
}
public void setUploadToken(String uploadToken) {
this.uploadToken = uploadToken;
}
private class MyThreadCatch implements Thread.UncaughtExceptionHandler {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
Writer w = new StringWriter();
PrintWriter pw = new PrintWriter(w);
ex.printStackTrace(pw);
pw.close();
Log.e("myex", w.toString());
}
}
public String getGetuiCID() {
return getuiCID;
}
public void setGetuiCID(String getuiCID) {
this.getuiCID = getuiCID;
}
public List<PostTagModel> getPostTagModelList() {
return postTagModelList;
}
public void setPostTagModelList(List<PostTagModel> postTagModelList) {
this.postTagModelList = postTagModelList;
}
public String getQiniuPrefix() {
return qiniuPrefix;
}
public void setQiniuPrefix(String qiniuPrefix) {
this.qiniuPrefix = qiniuPrefix;
}
public ShareType getShareType() {
return shareType;
}
public void setShareType(ShareType shareType) {
this.shareType = shareType;
}
}
|
[
"heboot@126.com"
] |
heboot@126.com
|
cc45ec043c59e98124b30858c0ed8611f8760b75
|
6a649709010f35916b58ad639eb24dc9d7452344
|
/AL-Game/src/com/aionemu/gameserver/skillengine/change/Change.java
|
5427e35ed6efd4ff8503f7d62ab473d5b108b899
|
[] |
no_license
|
soulxj/aion-cn
|
807860611e746d8d4c456a769a36d3274405fd7e
|
8a0a53cf8f99233cbee82f341f2b5c33be0364fa
|
refs/heads/master
| 2016-09-11T01:12:19.660692
| 2014-08-11T14:59:38
| 2014-08-11T14:59:38
| 41,342,802
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,848
|
java
|
/*
* This file is part of aion-unique <aion-unique.com>.
*
* aion-unique is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* aion-unique is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with aion-unique. If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.skillengine.change;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.aionemu.gameserver.model.stats.container.StatEnum;
import com.aionemu.gameserver.skillengine.condition.Conditions;
/**
* @author ATracer
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Change")
public class Change {
@XmlAttribute(required = true)
private StatEnum stat;
@XmlAttribute(required = true)
private Func func;
@XmlAttribute(required = true)
private int value;
@XmlAttribute
private int delta;
@XmlElement(name = "conditions")
private Conditions conditions;
public final StatEnum getStat() {
return stat;
}
public final Func getFunc() {
return func;
}
public final int getValue() {
return value;
}
public final int getDelta() {
return delta;
}
public final Conditions getConditions() {
return conditions;
}
}
|
[
"feidebugao@gmail.com"
] |
feidebugao@gmail.com
|
ed3374c85795e878aee6bdee8b6aee1664092c19
|
6831a854ade3b85888b29298270b2371ba2221f1
|
/api/b2b-systemCenter/src/main/java/com/jdy/b2b/api/vo/user/MobileLoginResultQueryVo.java
|
689c31b3a2cc4785d858d1852d4f927f0135307e
|
[] |
no_license
|
meiwulang/spring-boot-distributed
|
709787c98c47059dfea36130f09b864970101246
|
428a3152e260299e09bfe7657290af3384a2f8b7
|
refs/heads/master
| 2020-03-18T05:40:31.678087
| 2018-05-28T08:57:30
| 2018-05-28T08:57:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 690
|
java
|
package com.jdy.b2b.api.vo.user;
import com.jdy.b2b.api.common.BaseVO;
/**
* Created by yangcheng on 2017/9/22.
*/
public class MobileLoginResultQueryVo extends BaseVO{
private String uname;
private String mobile;
private Integer flag;//1:用户名 2:手机号
public String getUname() {
return uname;
}
public void setUname(String uname) {
this.uname = uname;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public Integer getFlag() {
return flag;
}
public void setFlag(Integer flag) {
this.flag = flag;
}
}
|
[
"418180062@qq.com"
] |
418180062@qq.com
|
79eee694fdc21a4d3600bca97155df54194cfd87
|
962a6192bbbadcd1a314026406670d8e87db83f5
|
/talkTV30/src/main/java/com/sumavision/talktv2/http/json/ChaseProgramRequest.java
|
82500be7fbad288457341b2e93ab26a30de82664
|
[] |
no_license
|
sharpayzara/TalkTV3.0_Studio_yy
|
1aa09c1b5ba697514535a507fd017faf1db81b06
|
801afa091aa41835873f466655872190745a9d93
|
refs/heads/master
| 2021-01-19T16:04:12.195817
| 2017-04-13T21:00:19
| 2017-04-13T21:00:19
| 88,245,487
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 905
|
java
|
package com.sumavision.talktv2.http.json;
import org.json.JSONException;
import org.json.JSONObject;
import com.sumavision.talktv2.bean.JSONMessageType;
import com.sumavision.talktv2.bean.UserNow;
import com.sumavision.talktv2.utils.Constants;
public class ChaseProgramRequest extends BaseJsonRequest {
private int id;
public ChaseProgramRequest(int id) {
super();
this.id = id;
}
@Override
public JSONObject make() {
JSONObject holder = new JSONObject();
try {
holder.put("method", Constants.chaseAdd);
holder.put("version", JSONMessageType.APP_VERSION);
holder.put("client", JSONMessageType.SOURCE);
holder.put("userId", UserNow.current().userID);
holder.put("programId", id);
holder.put("sessionId", UserNow.current().sessionID);
holder.put("jsession", UserNow.current().jsession);
} catch (JSONException e) {
e.printStackTrace();
}
return holder;
}
}
|
[
"864064269@qq.com"
] |
864064269@qq.com
|
f99d8cc740aa4c42cc38beabda5754223b7c91c8
|
65e03eecd6416c2693bcdc91f2d0a46d9a0c4716
|
/hello_java14/src/main/Example3.java
|
68b12bb2986a20b83a4d7c3843fb4cc8a7023899
|
[] |
no_license
|
lspil/youtubechannel
|
51e23c70f58953d8d834c7846d1ed3ff88211008
|
91aa9432a7366d457a8fe14b5cae6fe102b893aa
|
refs/heads/master
| 2023-08-31T14:06:07.497714
| 2023-08-20T07:33:11
| 2023-08-20T07:33:11
| 184,881,541
| 187
| 239
| null | 2023-07-04T13:55:46
| 2019-05-04T10:34:22
|
Java
|
UTF-8
|
Java
| false
| false
| 223
|
java
|
package main;
public class Example3 {
public static void main(String[] args) {
String s1 = """
:)
:(
:|
""";
System.out.println(s1);
}
}
|
[
"laurentiu.spilca@endava.com"
] |
laurentiu.spilca@endava.com
|
ffb8189b8ec1342504f761f298ff9b5f5ff772ed
|
f39aedcfe8188885e90a11e9d474e50b5b535b81
|
/fathomcloud-compute/src/main/java/io/fathom/cloud/compute/scheduler/AttachFloatingIpOperation.java
|
08a109a40921613041d5bfe300927ea429d071b1
|
[
"Apache-2.0"
] |
permissive
|
Nick-Xu/cloud
|
9a8c5b9bd819b68c1c526fec7766d248bd4beff3
|
3fea1d295eb121f8579ea3461553dfc4836da57d
|
refs/heads/master
| 2021-05-01T03:17:04.723808
| 2013-12-10T17:01:36
| 2013-12-10T17:01:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,337
|
java
|
package io.fathom.cloud.compute.scheduler;
import io.fathom.cloud.CloudException;
import io.fathom.cloud.compute.networks.VirtualIp;
import io.fathom.cloud.compute.services.ComputeServices;
import io.fathom.cloud.compute.services.IpPools;
import io.fathom.cloud.protobuf.CloudModel.InstanceData;
import io.fathom.cloud.server.model.Project;
import java.io.IOException;
import javax.inject.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class AttachFloatingIpOperation extends SchedulerOperation {
private static final Logger log = LoggerFactory.getLogger(AttachFloatingIpOperation.class);
@Inject
InstanceScheduler scheduler;
@Inject
ComputeServices computeServices;
@Inject
IpPools ipPools;
public Project project;
String ip;
long instanceId;
public void init(Project project, InstanceData instance, VirtualIp vip) {
this.project = project;
this.instanceId = instance.getId();
this.ip = vip.getData().getIp();
}
@Override
public boolean run() throws CloudException, IOException {
VirtualIp vip = ipPools.findVirtualIp(project, ip);
if (vip == null) {
log.warn("Virtual IP not found, giving up: {}", ip);
throw new IllegalStateException();
}
if (!vip.getData().hasInstanceId()) {
log.warn("Virtual IP not attached to machine, giving up: {}", ip);
throw new IllegalStateException();
}
if (vip.getData().getInstanceId() != instanceId) {
log.warn("Virtual IP not attached to same machine, giving up: {}", ip);
throw new IllegalStateException();
}
InstanceData instance = computeServices.findInstance(project.getId(), instanceId);
if (instance == null) {
log.warn("Instance not found, giving up: {}", instanceId);
throw new IllegalStateException();
}
SchedulerHost host = scheduler.findHost(instance.getHostId());
if (host == null) {
throw new IllegalStateException();
}
try (ConfigurationOperation config = host.startConfiguration()) {
config.attachVip(instance, vip);
config.applyChanges();
}
// TODO: Mark vip as attached??
return true;
}
}
|
[
"justin@fathomdb.com"
] |
justin@fathomdb.com
|
c23a9f1ac54857857c00b086298eea54ff5afdf3
|
13cdd0ddb1e5ed977ea9fabe8e1ac0b917b3bf5d
|
/src/main/java/com/anl/user/service/UserPlanChangeHistoryService.java
|
f45f5969fbc150d20fa289d7129d2e0421c9c732
|
[] |
no_license
|
kpdtd/card_service
|
30bfd5d00d2cb55c6b12fa75d137878cfe39d212
|
e596f59459d4e9f839a9daaa7c57d79fef4e7547
|
refs/heads/master
| 2020-03-22T23:45:07.195325
| 2018-09-26T09:18:37
| 2018-09-26T09:18:37
| 140,826,810
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 277
|
java
|
package com.anl.user.service;
import com.anl.user.persistence.po.UserPlanChangeHistory;
/**
* 类名: UserPlanChangeHistoryService
* 创建日期:
* 功能描述:
*/
public interface UserPlanChangeHistoryService extends BaseService<UserPlanChangeHistory> {
}
|
[
"yqyanghn@126.com"
] |
yqyanghn@126.com
|
39c642081f984b5e76fbc23b63c25358a8ba8f34
|
28adcde875c60b752ede090d4675b36cd7db98db
|
/src/net/wit/controller/weex/member/CouponCodeController.java
|
add3ce4ea8f8d2abf193255b6a786c65c02adc7e
|
[] |
no_license
|
rzico/mp-java
|
95f1dc0acd889d455fd23cd32c3b11842b51754d
|
980afd1a264b2f24fcbac508b116cd4dab4aa4a5
|
refs/heads/master
| 2021-09-27T13:49:31.257550
| 2018-05-10T10:53:47
| 2018-05-10T10:53:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,164
|
java
|
package net.wit.controller.weex.member;
import net.wit.Message;
import net.wit.controller.admin.BaseController;
import net.wit.controller.model.CouponCodeModel;
import net.wit.entity.Admin;
import net.wit.entity.CouponCode;
import net.wit.entity.Enterprise;
import net.wit.entity.Member;
import net.wit.plat.weixin.pojo.Ticket;
import net.wit.plat.weixin.util.WeiXinUtils;
import net.wit.plat.weixin.util.WeixinApi;
import net.wit.service.*;
import net.wit.util.Sha1Util;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
/**
* @ClassName: CouponCodeController
* @author 降魔战队
* @date 2017-9-14 19:42:9
*/
@Controller("weexMemberCouponCodeController")
@RequestMapping("/weex/member/couponCode")
public class CouponCodeController extends BaseController {
@Resource(name = "memberServiceImpl")
private MemberService memberService;
@Resource(name = "redisServiceImpl")
private RedisService redisService;
@Resource(name = "rsaServiceImpl")
private RSAService rsaService;
@Resource(name = "smssendServiceImpl")
private SmssendService smssendService;
@Resource(name = "areaServiceImpl")
private AreaService areaService;
@Resource(name = "articleServiceImpl")
private ArticleService articleService;
@Resource(name = "messageServiceImpl")
private MessageService messageService;
@Resource(name = "couponCodeServiceImpl")
private CouponCodeService couponCodeService;
@Resource(name = "shopServiceImpl")
private ShopService shopService;
@Resource(name = "adminServiceImpl")
private AdminService adminService;
/**
* 核销优惠券
*/
@RequestMapping(value = "/use")
@ResponseBody
public Message use(String code,HttpServletRequest request){
Member member = memberService.getCurrent();
if (member==null) {
return Message.error(Message.SESSION_INVAILD);
}
CouponCode couponCode = couponCodeService.findByCode(code);
if (couponCode==null) {
return Message.error("无效卡号");
}
if (couponCode.getIsUsed()) {
return Message.error("已经使用了");
}
Admin admin = adminService.findByMember(member);
if (admin==null) {
return Message.error("没有绑定门店");
}
Enterprise enterprise = admin.getEnterprise();
if (enterprise.getMember().equals(couponCode.getCoupon().getDistributor())) {
return Message.error("不是本店优惠券");
}
couponCode.setUsedDate(new Date());
if (couponCode.getStock()>0) {
couponCode.setStock(couponCode.getStock()-1L);
}
if (couponCode.getStock()==0) {
couponCode.setIsUsed(true);
}
couponCodeService.update(couponCode);
return Message.success("核销成功");
}
}
|
[
"zhangsr@tiaohuo.com"
] |
zhangsr@tiaohuo.com
|
1067e125555a1ee951a3be508d6da0b2e032789a
|
db824b5305c81e53e2df99b733c68baaeaf727cb
|
/dd_adv_op/src/main/java/com/kkgame/feeop/data/bean/DataVO.java
|
ccde9bcb91b07aecdd45d4c986b2a45da4a77c18
|
[] |
no_license
|
luotianwen/pgy
|
bd86d8c52ad7632d482017d55293c167d32e39fa
|
b90cf94deea005f55300fa19bedff766ce9fcbef
|
refs/heads/master
| 2021-01-23T23:13:53.332427
| 2017-09-09T14:41:06
| 2017-09-09T14:41:06
| 102,959,923
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,694
|
java
|
package com.kkgame.feeop.data.bean;
public class DataVO {
private int yearMonth;
private String statDate;
private int adId;
private int projectId;
private int pluginId;
private int type;
private int level;
private String channelId;
private int country;
private String sdkType;
private String sdkVersion;
private int adType;
private int userCount;
private int activeCount;
private int showCount;
private int showTimes;
private int clickCount;
private int clickTimes;
private int downloadCount;
private int downloadTimes;
private int downsuccCount;
private int downsuccTimes;
private int installCount;
private int installTimes;
private int installCustomerCount;
private int installCustomerTimes;
private int sendTimes;
private int sendCount;
private int receiveCount;
private int receiveTimes;
private int pushSendTimes;
private int realCount;
private double income;
private double linkIncome;
private double thirdIncome;
private double price;
private int inputTotal;
private double cpm;
private double silenceCpm;
private int sdkId;
public double getSilenceCpm() {
return silenceCpm;
}
public void setSilenceCpm(double silenceCpm) {
this.silenceCpm = silenceCpm;
}
public double getCpm() {
return cpm;
}
public void setCpm(double cpm) {
this.cpm = cpm;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public int getInputTotal() {
return inputTotal;
}
public void setInputTotal(int inputTotal) {
this.inputTotal = inputTotal;
}
public double getThirdIncome() {
return thirdIncome;
}
public void setThirdIncome(double thirdIncome) {
this.thirdIncome = thirdIncome;
}
public int getRealCount() {
return realCount;
}
public void setRealCount(int realCount) {
this.realCount = realCount;
}
private String table;
public String getTable() {
return table;
}
public void setTable(String table) {
this.table = table;
}
public String getStatDate() {
return statDate;
}
public void setStatDate(String statDate) {
this.statDate = statDate;
}
public int getAdId() {
return adId;
}
public void setAdId(int adId) {
this.adId = adId;
}
public int getProjectId() {
return projectId;
}
public void setProjectId(int projectId) {
this.projectId = projectId;
}
public int getShowCount() {
return showCount;
}
public void setShowCount(int showCount) {
this.showCount = showCount;
}
public int getShowTimes() {
return showTimes;
}
public void setShowTimes(int showTimes) {
this.showTimes = showTimes;
}
public int getClickCount() {
return clickCount;
}
public void setClickCount(int clickCount) {
this.clickCount = clickCount;
}
public int getClickTimes() {
return clickTimes;
}
public void setClickTimes(int clickTimes) {
this.clickTimes = clickTimes;
}
public int getDownloadCount() {
return downloadCount;
}
public void setDownloadCount(int downloadCount) {
this.downloadCount = downloadCount;
}
public int getDownloadTimes() {
return downloadTimes;
}
public void setDownloadTimes(int downloadTimes) {
this.downloadTimes = downloadTimes;
}
public int getDownsuccCount() {
return downsuccCount;
}
public void setDownsuccCount(int downsuccCount) {
this.downsuccCount = downsuccCount;
}
public int getDownsuccTimes() {
return downsuccTimes;
}
public void setDownsuccTimes(int downsuccTimes) {
this.downsuccTimes = downsuccTimes;
}
public int getInstallCount() {
return installCount;
}
public void setInstallCount(int installCount) {
this.installCount = installCount;
}
public int getInstallTimes() {
return installTimes;
}
public void setInstallTimes(int installTimes) {
this.installTimes = installTimes;
}
public int getInstallCustomerCount() {
return installCustomerCount;
}
public void setInstallCustomerCount(int installCustomerCount) {
this.installCustomerCount = installCustomerCount;
}
public int getInstallCustomerTimes() {
return installCustomerTimes;
}
public void setInstallCustomerTimes(int installCustomerTimes) {
this.installCustomerTimes = installCustomerTimes;
}
public String getChannelId() {
return channelId;
}
public void setChannelId(String channelId) {
this.channelId = channelId;
}
public String getSdkType() {
return sdkType;
}
public void setSdkType(String sdkType) {
this.sdkType = sdkType;
}
public String getSdkVersion() {
return sdkVersion;
}
public void setSdkVersion(String sdkVersion) {
this.sdkVersion = sdkVersion;
}
public int getSendCount() {
return sendCount;
}
public void setSendCount(int sendCount) {
this.sendCount = sendCount;
}
public int getReceiveCount() {
return receiveCount;
}
public void setReceiveCount(int receiveCount) {
this.receiveCount = receiveCount;
}
public int getSendTimes() {
return sendTimes;
}
public void setSendTimes(int sendTimes) {
this.sendTimes = sendTimes;
}
public int getReceiveTimes() {
return receiveTimes;
}
public void setReceiveTimes(int receiveTimes) {
this.receiveTimes = receiveTimes;
}
public int getAdType() {
return adType;
}
public void setAdType(int adType) {
this.adType = adType;
}
public int getPluginId() {
return pluginId;
}
public void setPluginId(int pluginId) {
this.pluginId = pluginId;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getYearMonth() {
return yearMonth;
}
public void setYearMonth(int yearMonth) {
this.yearMonth = yearMonth;
}
public int getPushSendTimes() {
return pushSendTimes;
}
public void setPushSendTimes(int pushSendTimes) {
this.pushSendTimes = pushSendTimes;
}
public int getCountry() {
return country;
}
public void setCountry(int country) {
this.country = country;
}
public int getUserCount() {
return userCount;
}
public void setUserCount(int userCount) {
this.userCount = userCount;
}
public int getActiveCount() {
return activeCount;
}
public void setActiveCount(int activeCount) {
this.activeCount = activeCount;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public double getIncome() {
return income;
}
public void setIncome(double income) {
this.income = income;
}
public double getLinkIncome() {
return linkIncome;
}
public void setLinkIncome(double linkIncome) {
this.linkIncome = linkIncome;
}
public int getSdkId() {
return sdkId;
}
public void setSdkId(int sdkId) {
this.sdkId = sdkId;
}
}
|
[
"tw l"
] |
tw l
|
5ba736602343e7cf580585f49cd5117e2efff318
|
500153a2882682b7e3830f7acaa48dc5298695d0
|
/libs/braille-utils/braille-utils.impl/src/com_braillo/Braillo600Embosser.java
|
fd7584381f9be0ccefd7e739d403cc8a9db91420
|
[] |
no_license
|
sbsdev/pipeline
|
02f45ac401f8ebf31813ec3c53c30fc7df4a455d
|
74585cdd982f182309203f4553b1c9d43ff3fa4c
|
refs/heads/sbs
| 2023-09-01T08:49:45.707124
| 2019-05-15T10:29:40
| 2019-05-15T10:30:34
| 65,476,558
| 0
| 0
| null | 2022-10-06T09:48:48
| 2016-08-11T14:36:08
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,415
|
java
|
package com_braillo;
import org.daisy.braille.api.factory.FactoryProperties;
import org.daisy.braille.api.paper.PageFormat;
import org.daisy.braille.api.paper.Paper;
import org.daisy.braille.api.table.TableCatalogService;
/**
* Provides an Embosser for Braillo 600. This printer
* is based on the Braillo 400S with the same well-proven technology.
*
* @author alra
*
*/
public class Braillo600Embosser extends AbstractBraillo200Embosser {
/**
*
*/
private static final long serialVersionUID = 1849647807065499461L;
/**
*
* @param service
* @param props
*/
public Braillo600Embosser(TableCatalogService service, FactoryProperties props) {
super(service, props);
}
@Override
public boolean supportsPageFormat(PageFormat pageFormat) {
return pageFormat.getPageFormatType() == PageFormat.Type.TRACTOR
&& pageFormat.asTractorPaperFormat().getLengthAcrossFeed().asMillimeter() >= 140
&& pageFormat.asTractorPaperFormat().getLengthAcrossFeed().asMillimeter() <= 330
&& pageFormat.asTractorPaperFormat().getLengthAlongFeed().asInches() >= 4
&& pageFormat.asTractorPaperFormat().getLengthAlongFeed().asInches() <= 14;
}
@Override
public boolean supportsPaper(Paper paper) {
return paper.getType() == Paper.Type.ROLL
&& paper.asRollPaper().getLengthAcrossFeed().asMillimeter() >= 140
&& paper.asRollPaper().getLengthAcrossFeed().asMillimeter() <= 330;
}
}
|
[
"bertfrees@gmail.com"
] |
bertfrees@gmail.com
|
2bfd59005a694c5339d5a91190bcb71768817f89
|
32cd2626b1e869a8d4433b9eb084cc4665cf938a
|
/src/com/javarush/test/level19/lesson10/home06/Solution.java
|
f8d9df6d7803252b7020efa95547e3ea7fd55174
|
[] |
no_license
|
AndreyB12/JavaRushHomeWork
|
b41f0d21258cf488f879dfd4b0e00b60495d8ec3
|
a5857a1c01063bfb9a50e073006be9e5a7ff00bf
|
refs/heads/master
| 2021-01-23T13:09:06.967421
| 2017-01-27T08:22:31
| 2017-01-27T08:22:31
| 58,111,229
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,633
|
java
|
package com.javarush.test.level19.lesson10.home06;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* Замена чисел
1. В статическом блоке инициализировать словарь map парами [число-слово] от 0 до 12 включительно
Например, 0 - "ноль", 1 - "один", 2 - "два"
2. Считать с консоли имя файла
3. Заменить все числа на слова используя словарь map
4. Результат вывести на экран
5. Закрыть потоки. Не использовать try-with-resources
Пример данных:
Это стоит 1 бакс, а вот это - 12 .
Переменная имеет имя file1.
110 - это число.
Пример вывода:
Это стоит один бакс, а вот это - двенадцать .
Переменная имеет имя file1.
110 - это число.
*/
public class Solution
{
public static Map<Integer, String> map = new HashMap<Integer, String>();
static
{
map.put(0, "ноль");
map.put(1, "один");
map.put(2, "два");
map.put(3, "три");
map.put(4, "четыре");
map.put(5, "пять");
map.put(6, "шесть");
map.put(7, "семь");
map.put(8, "восемь");
map.put(9, "девять");
map.put(10, "десять");
map.put(11, "одиннадцать");
map.put(12, "двенадцать");
}
public static void main(String[] args) throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
BufferedReader fr = new BufferedReader(new FileReader(reader.readLine()));
reader.close();
String line;
Pattern p = Pattern.compile("(^|\\p{Space}|\\p{Punct})([1-9]+[0-9]*)($|\\p{Space}|\\p{Punct})");
while (fr.ready())
{
line = fr.readLine();
StringBuffer sb = new StringBuffer();
Matcher m = p.matcher(line);
int dg;
while (m.find())
{
dg = Integer.valueOf(m.group(2));
if (dg <= 12) m.appendReplacement(sb, m.group(1) + map.get(dg) + m.group(3));
}
m.appendTail(sb);
System.out.println(sb.toString());
}
fr.close();
}
}
|
[
"andrey.butko@gmail.com"
] |
andrey.butko@gmail.com
|
929cec97fb032f68e18a1dc5f1bec2a051bc9ea6
|
fdd4cc6f8b5a473c0081af5302cb19c34433a0cf
|
/src/modules/agrega/TaggingWeb/src/main/java/es/pode/tagging/presentacion/modificarTag/ModificarTagControllerImpl.java
|
6c50f7d02acd15f888b781ba6bed4feddfb48e7e
|
[] |
no_license
|
nwlg/Colony
|
0170b0990c1f592500d4869ec8583a1c6eccb786
|
07c908706991fc0979e4b6c41d30812d861776fb
|
refs/heads/master
| 2021-01-22T05:24:40.082349
| 2010-12-23T14:49:00
| 2010-12-23T14:49:00
| null | 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 4,548
|
java
|
/* Agrega es una federación de repositorios de objetos digitales educativos formada por todas las Comunidades Autónomas propiedad de Red.es. Este código ha sido desarrollado por la Entidad Pública Empresarial red.es adscrita al Ministerio de Industria,Turismo y Comercio a través de la Secretaría de Estado de Telecomunicaciones y para la Sociedad de la Información, dentro del Programa Internet en el Aula, que se encuadra dentro de las actuaciones previstas en el Plan Avanza (Plan 2006-2010 para el desarrollo de la Sociedad de la Información y de Convergencia con Europa y entre Comunidades Autónomas y Ciudades Autónomas) y ha sido cofinanciado con fondos FEDER del Programa Operativo FEDER 2000-2006 “Sociedad de la Información”
This program is free software: you can redistribute it and/or modify it under the terms of the European Union Public Licence (EUPL v.1.0). 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 European Union Public Licence (EUPL v.1.0). You should have received a copy of the EUPL licence along with this program. If not, see http://ec.europa.eu/idabc/en/document/7330.
*/
// license-header java merge-point
package es.pode.tagging.presentacion.modificarTag;
import java.util.Locale;
import org.apache.commons.validator.ValidatorException;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.MessageResources;
import es.pode.soporte.constantes.ConstantesAgrega;
import es.pode.soporte.seguridad.ldap.LdapUserDetailsUtils;
import es.pode.tagging.presentacion.TaggingSession;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @see es.pode.tagging.presentacion.modificarTag.ModificarTagController
*/
public class ModificarTagControllerImpl extends ModificarTagController
{
protected static Logger logger = Logger.getLogger(ModificarTagControllerImpl.class);
/**
* @see es.pode.tagging.presentacion.modificarTag.ModificarTagController#modificarTag(org.apache.struts.action.ActionMapping, es.pode.tagging.presentacion.modificarTag.ModificarTagForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
public final void modificarTag(ActionMapping mapping, es.pode.tagging.presentacion.modificarTag.ModificarTagForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
{
TaggingSession taggingSession = this.getTaggingSession(request);
if(taggingSession!=null){
String usuario = taggingSession.getUsuario();
String newTag = form.getNewTag();
String oldTag = form.getTag();
if(usuario ==null){
//Comprobamos si seguimos autenticados si seguimos autenticados
//recuperamos el usuario de ldap y lo metemos en sesion
logger.debug("OBTENIENDO USUARIO: " +usuario);
try{
usuario = LdapUserDetailsUtils.getUsuario();
logger.debug("USUARIO CONOCIDO: " + usuario);
}
catch(Exception ad){
logger.debug("USUARIO ANONIMO");
}
taggingSession.setUsuario(usuario);
//*************************************************************
}
//El nuevo valor del tag no puede ser vacio
if (newTag !=null && !newTag.trim().equals(""))
this.getSrvTaggingServer().modificarTagDeUsuario(oldTag, newTag, usuario);
else
throw new ValidatorException("{tagging.modificarTag.exception}");
}
}
/**
* @see es.pode.tagging.presentacion.modificarTag.ModificarTagController#selectAction(org.apache.struts.action.ActionMapping, es.pode.tagging.presentacion.modificarTag.SelectActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
public final java.lang.String selectAction(ActionMapping mapping, es.pode.tagging.presentacion.modificarTag.SelectActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
{
String result = null;
MessageResources resources = MessageResources.getMessageResources("application-resources");
String action = form.getAccion();
if(resources.getMessage((Locale)request.getSession().getAttribute(ConstantesAgrega.DEFAULT_LOCALE),"comun.aceptar").equals(action)) {
result = "Aceptar";
} else {
result = "Cancelar";
}
return result;
}
}
|
[
"build@zeno.siriusit.co.uk"
] |
build@zeno.siriusit.co.uk
|
769e79b68f92d20f4f4e07979a2c470f5f1163de
|
05659b3848809b1f32c11bb3baeaa6931e0a4366
|
/xolova/blued00r/divinerpg/client/gui/GuiDemonFurnace.java
|
025ef6c301768a656b16f4957a6ba754f6aaca0b
|
[] |
no_license
|
KenBeanNet/Divine
|
808b77daf447e4cbf725bf6d828423953dee6fbe
|
969dcb92a0c57773134416249d4117dd934125fc
|
refs/heads/master
| 2020-05-24T14:41:12.496669
| 2013-04-10T19:38:15
| 2013-04-10T19:38:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,107
|
java
|
package xolova.blued00r.divinerpg.client.gui;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
import xolova.blued00r.divinerpg.containers.ContainerDemonFurnace;
import xolova.blued00r.divinerpg.entities.tileentities.TileEntityDemonFurnace;
@SideOnly(Side.CLIENT)
public class GuiDemonFurnace extends GuiContainer
{
private TileEntityDemonFurnace furnaceInventory;
public GuiDemonFurnace(InventoryPlayer var1, TileEntityDemonFurnace var2)
{
super(new ContainerDemonFurnace(var1, var2));
this.furnaceInventory = var2;
}
/**
* Draw the foreground layer for the GuiContainer (everything in front of the items)
*/
protected void drawGuiContainerForegroundLayer(int var1, int var2)
{
this.fontRenderer.drawString("Demon Furnace", 50, 6, 4210752);
this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
/**
* Draw the background layer for the GuiContainer (everything behind the items)
*/
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3)
{
int var4 = this.mc.renderEngine.getTexture("/gui/demonfurnace.png");
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.renderEngine.bindTexture(var4);
int var5 = (this.width - this.xSize) / 2;
int var6 = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
int var7;
if (this.furnaceInventory.isBurning())
{
var7 = this.furnaceInventory.getBurnTimeRemainingScaled(12);
this.drawTexturedModalRect(var5 + 56, var6 + 36 + 12 - var7, 176, 12 - var7, 14, var7 + 2);
}
var7 = this.furnaceInventory.getCookProgressScaled(24);
this.drawTexturedModalRect(var5 + 79, var6 + 34, 176, 14, var7 + 1, 16);
}
}
|
[
"Ken@ThisIsTheEnd.com"
] |
Ken@ThisIsTheEnd.com
|
37aad8ab640707ff8595ebfb16a6d9c4976ec6c5
|
46ef04782c58b3ed1d5565f8ac0007732cddacde
|
/uml/uml.ui/src/org/modelio/uml/ui/dg/bpmn/BpmnLaneSetContainerDG.java
|
71284c6c5b2f3891bab41f7ebadab7af7d7509ea
|
[] |
no_license
|
daravi/modelio
|
844917412abc21e567ff1e9dd8b50250515d6f4b
|
1787c8a836f7e708a5734d8bb5b8a4f1a6008691
|
refs/heads/master
| 2020-05-26T17:14:03.996764
| 2019-05-23T21:30:10
| 2019-05-23T21:30:45
| 188,309,762
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,243
|
java
|
/*
* Copyright 2013-2018 Modeliosoft
*
* This file is part of Modelio.
*
* Modelio 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.
*
* Modelio 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 Modelio. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.modelio.uml.ui.dg.bpmn;
import java.util.Collection;
import java.util.List;
import com.modeliosoft.modelio.javadesigner.annotations.objid;
import org.modelio.api.modelio.diagram.IDiagramNode;
import org.modelio.diagram.api.dg.DGFactory;
import org.modelio.diagram.api.services.DiagramHandle;
import org.modelio.diagram.api.services.DiagramNode;
import org.modelio.diagram.editor.bpmn.elements.bpmnlanesetcontainer.GmBpmnLaneSetContainer;
import org.modelio.diagram.elements.core.node.GmNodeModel;
/**
* This class represents the DiagramGraphic of a 'BpmnLaneSetContainer' element.
*/
@objid ("d25c3953-0b1e-4c28-aee7-1fd543317583")
public class BpmnLaneSetContainerDG extends DiagramNode {
/**
* @param diagramHandle The diagram manipulation class.
* @param node The gm node represented by this class.
*/
@objid ("50e1b068-c136-4b9b-9a20-5ec9d725a643")
public BpmnLaneSetContainerDG(DiagramHandle diagramHandle, GmNodeModel node) {
super(diagramHandle, node);
}
@objid ("a1eef93c-cceb-4c2b-a9f8-9561f257130d")
@Override
public List<IDiagramNode> getNodes() {
return DGFactory.getInstance().getDiagramNodes(this.diagramHandle, ((GmBpmnLaneSetContainer) this.gmNode).getVisibleChildren());
}
@objid ("3144f144-033b-4de3-b690-ca2d906f3bf8")
@Override
public Collection<IDiagramNode> getNodes(Role role) {
if (role == Role.INNER) {
return getNodes();
} else {
return null;
}
}
}
|
[
"puya@motionmetrics.com"
] |
puya@motionmetrics.com
|
02d949c07689b716b91b15b0dd04b4f5c448500f
|
6253283b67c01a0d7395e38aeeea65e06f62504b
|
/decompile/app/SystemUI/src/main/java/org/apache/commons/jexl2/introspection/JexlPropertyGet.java
|
605a07121614f29683fbcd50e62bc4649f3235ce
|
[] |
no_license
|
sufadi/decompile-hw
|
2e0457a0a7ade103908a6a41757923a791248215
|
4c3efd95f3e997b44dd4ceec506de6164192eca3
|
refs/heads/master
| 2023-03-15T15:56:03.968086
| 2017-11-08T03:29:10
| 2017-11-08T03:29:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 246
|
java
|
package org.apache.commons.jexl2.introspection;
public interface JexlPropertyGet {
Object invoke(Object obj) throws Exception;
boolean isCacheable();
boolean tryFailed(Object obj);
Object tryInvoke(Object obj, Object obj2);
}
|
[
"liming@droi.com"
] |
liming@droi.com
|
83067b8b3e2a1411b385600579fc75556ae7ab1a
|
66e2f35b7b56865552616cf400e3a8f5928d12a2
|
/src/main/java/com/alipay/api/domain/HuanxuTradeOrderRefundModel.java
|
0e352ae6f73837151a99524205352e5efcf24cd8
|
[
"Apache-2.0"
] |
permissive
|
xiafaqi/alipay-sdk-java-all
|
18dc797400847c7ae9901566e910527f5495e497
|
606cdb8014faa3e9125de7f50cbb81b2db6ee6cc
|
refs/heads/master
| 2022-11-25T08:43:11.997961
| 2020-07-23T02:58:22
| 2020-07-23T02:58:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,323
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 焕旭科技聚合支付资金退款接口
*
* @author auto create
* @since 1.0, 2020-07-23 10:20:29
*/
public class HuanxuTradeOrderRefundModel extends AlipayObject {
private static final long serialVersionUID = 3469354521925722592L;
/**
* 用户身份识别值。根据type和issuer传入对应格式的值:若type为USER_ID,issuer为ALIPAY,则identity为2088开头的16位纯数字。若type为USER_ID,issuer为MERCHANT,则identity根据商户定义的格式传入。若type为BAR_CODE,issuer为ALIPAY,则identity为25~30开头的长度为16~24位数字的支付宝付款码(实际字符串长度以及规则可能会进行调整与优化,以开发者获取的付款码长度为准)
*/
@ApiField("identity")
private String identity;
/**
* 用户id的发行主体。 ALIPAY:支付宝,MERCHANT:商户。 目前issuer为MERCHANT时,type仅支持USER_ID。注:issuer为MERCHANT时,请确保商户会员体系与支付宝会员体系已打通,若需打通请联系支付宝小二或接口owner进行咨询
*/
@ApiField("issuer")
private String issuer;
/**
* 支付的收款方信息,如果涉及多收款方需传入该信息
*/
@ApiField("payee")
private UserIdentity payee;
/**
* 支付id,支付宝针对每一笔支付请求生成的唯一支付凭证
*/
@ApiField("payment_id")
private String paymentId;
/**
* 退款金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000]
*/
@ApiField("refund_amount")
private String refundAmount;
/**
* 退款请求号,对应一笔业务订单下的一次退款请求,不同退款请求需保证请求号唯一
*/
@ApiField("refund_request_no")
private String refundRequestNo;
/**
* 退款说明
*/
@ApiField("remark")
private String remark;
/**
* 用户识别ID的类型。 USRE_ID:用户id(支付宝或其他发行主体方中的用户id),BAR_CODE:付款码
*/
@ApiField("type")
private String type;
public String getIdentity() {
return this.identity;
}
public void setIdentity(String identity) {
this.identity = identity;
}
public String getIssuer() {
return this.issuer;
}
public void setIssuer(String issuer) {
this.issuer = issuer;
}
public UserIdentity getPayee() {
return this.payee;
}
public void setPayee(UserIdentity payee) {
this.payee = payee;
}
public String getPaymentId() {
return this.paymentId;
}
public void setPaymentId(String paymentId) {
this.paymentId = paymentId;
}
public String getRefundAmount() {
return this.refundAmount;
}
public void setRefundAmount(String refundAmount) {
this.refundAmount = refundAmount;
}
public String getRefundRequestNo() {
return this.refundRequestNo;
}
public void setRefundRequestNo(String refundRequestNo) {
this.refundRequestNo = refundRequestNo;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
d8b4fc69d68c03e41e8a67d08f3fa81bc499968f
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/eclipsejdt_cluster/3759/src_0.java
|
58f47ea5dc167444492d497610fd607e7a54eeda
|
[] |
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
| 2,778
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.internal.core.search.indexing;
import java.io.IOException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.internal.compiler.util.Util;
import org.eclipse.jdt.internal.core.index.IIndex;
import org.eclipse.jdt.internal.core.index.impl.IFileDocument;
class AddCompilationUnitToIndex extends IndexRequest {
IFile resource;
IndexManager manager;
IPath indexedContainer;
char[] contents;
public AddCompilationUnitToIndex(
IFile resource,
IndexManager manager,
IPath indexedContainer) {
this.resource = resource;
this.manager = manager;
this.indexedContainer = indexedContainer;
}
public boolean belongsTo(String jobFamily) {
return jobFamily.equals(this.indexedContainer.segment(0));
}
public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE;
try {
IIndex index = manager.getIndex(this.indexedContainer);
/* ensure no concurrent write access to index */
if (index == null)
return COMPLETE;
ReadWriteMonitor monitor = manager.getMonitorFor(index);
if (monitor == null)
return COMPLETE; // index got deleted since acquired
try {
monitor.enterWrite(); // ask permission to write
char[] contents = this.getContents();
if (contents == null)
return FAILED;
index.add(new IFileDocument(resource, contents), new SourceIndexer());
} finally {
monitor.exitWrite(); // free write lock
}
} catch (IOException e) {
return FAILED;
}
return COMPLETE;
}
private char[] getContents() {
if (this.contents == null)
this.initializeContents();
return contents;
}
public void initializeContents() {
try {
IPath location = resource.getLocation();
if (location != null) {
this.contents =
org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(
location.toFile(), null);
}
} catch (IOException e) {
}
}
public String toString() {
return "indexing " + resource.getFullPath(); //$NON-NLS-1$
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
03c70ee178b7ec16385c12505a840e7089da5a94
|
73953608d778745c19d93f3334ef0e38b3628338
|
/src/main/java/javassist/bytecode/DeprecatedAttribute.java
|
efd043e937632094be30272368a4157d14439aa4
|
[] |
no_license
|
N3wb13GG/N3wb13-s-Core
|
4ccb002f95aee24f10fcd0c183fd7dbcc467e2d3
|
c58e54eca2f8d08448ea02962be32eceab9b90a3
|
refs/heads/master
| 2020-03-07T18:36:40.031910
| 2018-08-06T04:20:50
| 2018-08-06T04:20:50
| 127,645,526
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,737
|
java
|
/*
* Javassist, a Java-bytecode translator toolkit.
* Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. Alternatively, the contents of this file may be used under
* the terms of the GNU Lesser General Public License Version 2.1 or later,
* or the Apache License Version 2.0.
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*/
package javassist.bytecode;
import java.io.DataInputStream;
import java.io.IOException;
import java.util.Map;
/**
* <code>Deprecated_attribute</code>.
*/
public class DeprecatedAttribute extends AttributeInfo
{
/**
* The name of this attribute <code>"Deprecated"</code>.
*/
public static final String tag = "Deprecated";
DeprecatedAttribute(ConstPool cp, int n, DataInputStream in)
throws IOException
{
super(cp, n, in);
}
/**
* Constructs a Deprecated attribute.
*
* @param cp a constant pool table.
*/
public DeprecatedAttribute(ConstPool cp)
{
super(cp, tag, new byte[0]);
}
/**
* Makes a copy.
*
* @param newCp the constant pool table used by the new copy.
* @param classnames should be null.
*/
public AttributeInfo copy(ConstPool newCp, Map classnames)
{
return new DeprecatedAttribute(newCp);
}
}
|
[
"takayugg.0807@gmail.com"
] |
takayugg.0807@gmail.com
|
dffa3c993faf04e91c708fdc7aeb0a282a359775
|
e463036bded7c86cfef24dbda9a37d582b197c29
|
/sample/mulfloat_JRT.java
|
0c427a52ace61af9cba3bed13c0480e170db6a14
|
[] |
no_license
|
Himatsubu/JRThrash
|
f05d446ec4e4d5f717aca63b9bca8db2237177d9
|
1f11080a86f3ac9a11a463b2237af87e60d66db3
|
refs/heads/master
| 2020-04-15T13:36:39.096625
| 2017-02-21T06:30:47
| 2017-02-21T06:30:47
| 59,081,414
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 216
|
java
|
package net.njlab.sample;
public class multfloat_JRT{
public float run(float input_a){
//input_a=1.2f;
float input_b=1.3f;
float result;
//input_a=input_a+input_b;
return result = input_a*input_b;
}
}
|
[
"keitaro.871@gmail.com"
] |
keitaro.871@gmail.com
|
e569ad70f45559dba8ebb31e7adb9095ebaea66d
|
bcb31f0ab64f7fb2309fc419030a04abdde27c0c
|
/dnd/Test.java
|
39d130516cc681f0e07b93f0e41283ddbb8641f9
|
[] |
no_license
|
seadoherty/JavaBeginning
|
5c585d1f6efcdd9200d2f67d6fa644c30e9a12e3
|
e31c5e524c85c568b78094be8097383af174d63f
|
refs/heads/main
| 2023-01-28T00:23:23.287293
| 2020-12-03T04:08:14
| 2020-12-03T04:08:14
| 317,345,570
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 570
|
java
|
package dnd;
public class Test {
public static void main(String[] args) {
Wizard wiz = new Wizard();
Ninja nin = new Ninja();
Samurai sam = new Samurai();
Samurai sami = new Samurai();
sam.attack(nin);
wiz.attack(nin);
sam.attack(wiz);
wiz.heal(nin);
wiz.fireball(sam);
nin.steal(wiz);
nin.runAway();
sam.deathBlow(wiz);
sam.meditate();
int samuraiCount = Samurai.howMany();
System.out.println(wiz.getHealth());
System.out.println(nin.getHealth());
System.out.println(sam.getHealth());
System.out.println(samuraiCount);
}
}
|
[
"admin@example.com"
] |
admin@example.com
|
50f5b723173e87cbf7674e710735b042abad2b56
|
e9daa0db6cc19af2d1fd54b06ae76898fa396a38
|
/app/src/main/java/com/ycwl/servebixin/cn/ui/message/mvp/bean/BannerBean.java
|
89aaacf11baad38374ebd2cb37625b4e2ca03127
|
[] |
no_license
|
ljx123456/BixinServer
|
aed91b96e55490dd6e332249a3c48dc2047104e6
|
1cee6c397ea2c83f9dcbd4feaac136af1035cfc8
|
refs/heads/master
| 2021-05-18T12:27:47.214421
| 2020-03-30T08:17:00
| 2020-03-30T08:17:00
| 251,241,970
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,494
|
java
|
package com.ycwl.servebixin.cn.ui.message.mvp.bean;
import java.util.List;
public class BannerBean {
/**
* code : 0
* message : 请求成功.
* data : [{"image":"http://pic.bixinyule.com/service/banner/service_banner_01.png","name":"比心召集令","description":"","url":"http://service.bixinyule.com/service/banner/call_up"},{"image":"http://pic.bixinyule.com/service/banner/service_banner_02.png","name":"好礼在比心,单单送现金","description":"","url":"http://service.bixinyule.com/service/banner/gift"},{"image":"http://pic.bixinyule.com/service/banner/service_banner_03.png","name":"比心福利季,奖励送不停","description":"","url":"http://service.bixinyule.com/service/banner/reward"},{"image":"http://pic.bixinyule.com/service/banner/service_banner_04.png","name":"推荐有礼,等你来取","description":"","url":"http://service.bixinyule.com/service/banner/recommend"}]
*/
private int code;
private String message;
private List<DataBean> data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public List<DataBean> getData() {
return data;
}
public void setData(List<DataBean> data) {
this.data = data;
}
public static class DataBean {
/**
* image : http://pic.bixinyule.com/service/banner/service_banner_01.png
* name : 比心召集令
* description :
* url : http://service.bixinyule.com/service/banner/call_up
*/
private String image;
private String name;
private String description;
private String url;
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}
}
|
[
"911015964@qq.com"
] |
911015964@qq.com
|
859f251001f11cc5711d1d59ac2db619beef25ff
|
32f38cd53372ba374c6dab6cc27af78f0a1b0190
|
/app/src/main/java/defpackage/ddk.java
|
6bc352bec13a710a1f139c152a1b223955cd0758
|
[
"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
| 454
|
java
|
package defpackage;
/* renamed from: ddk reason: default package */
/* compiled from: ShareFactory */
public final class ddk {
private static volatile dcc a;
@Deprecated
public static synchronized dcc a() {
dcc dcc;
synchronized (ddk.class) {
try {
if (a == null) {
a = new ddm();
}
dcc = a;
}
}
return dcc;
}
}
|
[
"hubert.yang@nf-3.com"
] |
hubert.yang@nf-3.com
|
98d5d22f5f1429c2015f202e1e68ae25115570b7
|
0e43672493feb0fc40c3d4b54342eecd1e109a1b
|
/app/src/main/java/com/xb/busmore/moudle/unionpay/unionutil/http/HttpResponseListener.java
|
fca3bf821f551df2e957eb443f895e7504999586
|
[] |
no_license
|
haofighter/BusMore
|
35e941ed765175e4b7979e948c7905b013bb3598
|
1b153e30e78df16ed412380360d09ed26657fc4a
|
refs/heads/master
| 2020-03-30T06:10:27.756881
| 2018-10-10T10:11:18
| 2018-10-10T10:11:18
| 150,843,102
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,560
|
java
|
package com.xb.busmore.moudle.unionpay.unionutil.http;
import com.yanzhenjie.nohttp.Logger;
import com.yanzhenjie.nohttp.rest.OnResponseListener;
import com.yanzhenjie.nohttp.rest.Request;
import com.yanzhenjie.nohttp.rest.Response;
public class HttpResponseListener<T> implements OnResponseListener<T> {
private Request<T> request;
private HttpListener<T> httpListener;
/**
* @param request 请求对象
* @param callback 回调对象
*/
public HttpResponseListener(final Request<T> request, HttpListener<T> callback) {
this.httpListener = callback;
this.httpListener = callback;
}
public void onFinish(int arg0) {
Logger.d("完成");
}
public void onStart(int arg0) {
Logger.i("开始");
}
// 成功回调
public void onSucceed(int what, Response<T> response) {
int responseCode = response.getHeaders().getResponseCode();
System.out.println("responseCode:" + responseCode + "");
if (responseCode > 400) {
if (responseCode == 405) {
Logger.d("服务器暂不支持该类型!");
httpListener.fail(what, "服务器暂不支持该类型");
}
}
if (httpListener != null) {
httpListener.success(what, response);
}
}
@Override
public void onFailed(int what, Response<T> response) {
Logger.i("失败");
if (httpListener != null)
httpListener.fail(what, response.getException().getMessage());
}
}
|
[
"274595569@qq.com"
] |
274595569@qq.com
|
343a9738b4c102725f767c291aed68232eeece58
|
da9bfd2d883aa134897b5680403545d1f097991c
|
/easyreport-web/src/main/java/com/easytoolsoft/easyreport/web/spring/aop/CustomOpLogAspect.java
|
ae9d77c7fe5e49ff22df5edd3da1f5d18721e62e
|
[
"Apache-2.0"
] |
permissive
|
xianrendzw/EasyReport
|
3d18b4ccd0026b2ec9475993b110565b2f950e18
|
b89cc231d469de91450ad9a2412c25b249333267
|
refs/heads/master
| 2023-03-16T03:58:45.761628
| 2023-03-12T14:21:03
| 2023-03-12T14:21:03
| 24,318,090
| 1,803
| 845
|
Apache-2.0
| 2020-02-07T03:58:04
| 2014-09-22T07:07:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,711
|
java
|
package com.easytoolsoft.easyreport.web.spring.aop;
import java.util.Date;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import com.easytoolsoft.easyreport.membership.domain.Event;
import com.easytoolsoft.easyreport.membership.domain.User;
import com.easytoolsoft.easyreport.membership.service.EventService;
import com.easytoolsoft.easyreport.support.aop.OpLogAspect;
import com.easytoolsoft.easyreport.support.consts.UserAuthConsts;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
/**
* @author Tom Deng
* @date 2017-03-25
**/
@Slf4j
@Aspect
@Component
public class CustomOpLogAspect extends OpLogAspect {
@Resource
private EventService eventService;
@Override
protected void logEvent(final EventParameter eventParameter) {
final HttpServletRequest req =
((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
final User user = (User)req.getAttribute(UserAuthConsts.CURRENT_USER);
if (user != null) {
final Event event = Event.builder()
.source(eventParameter.getSource())
.account(user.getAccount())
.userId(user.getId())
.message(eventParameter.toString())
.level(eventParameter.getLevel())
.url(req.getRequestURL().toString())
.gmtCreated(new Date())
.build();
this.eventService.add(event);
}
}
}
|
[
"14068728@qq.com"
] |
14068728@qq.com
|
10642131e64eb1b7c51ff5394ea1278ce43a318c
|
f5d5b368c1ae220b59cfb26bc26526b494c54d0e
|
/BikramRadio_all/src/com/example/swipeuiforupclose/StationListFragment.java
|
2653c59d4c2ce3477d0319cb91d324683ae99562
|
[] |
no_license
|
kishordgupta/2012_bkup
|
3778c26082697b1cf223e27822d8efe90b35fc76
|
53ef4014fb3e11158c3f9242cb1f829e02e3ef69
|
refs/heads/master
| 2021-01-10T08:25:57.122415
| 2020-10-16T12:06:52
| 2020-10-16T12:06:52
| 47,512,520
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,468
|
java
|
package com.example.swipeuiforupclose;
import java.util.ArrayList;
import player.DBHelper;
import radioklub.sekhontech.com.adapter.HistoryListAdapter;
import radioklub.sekhontech.com.adapter.StationListAdapter;
import radioklub.sekhontech.com.entity.Station;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
public class StationListFragment extends Fragment {
//Constant
private static final String TAG = "StationListFragment";
//Member variables
private HistoryListAdapter mAdapter;
private ArrayList<Station> mStations;
private OnItemClickListener mListener = new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
//TODO Refactor
Station station = mAdapter.getItem(position);
MainActivity activity = (MainActivity) getActivity();
activity.setStation(station);
activity.justStop();
activity.justPlay();
ViewPager pager2 = (ViewPager) activity.findViewById(R.id.pager);
pager2.setCurrentItem(1);
}
};
//View member variables
private ListView mListView;
/* Lifecycle functions
* (non-Javadoc)
* @see android.support.v4.app.Fragment#onCreate(android.os.Bundle)
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (mStations == null)
mStations = new ArrayList<Station>();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_stations, null);
MainActivity.mStations.clear();
MainActivity.mStations.addAll(DBHelper.getfavouriteset());
//ListView init
mListView = (ListView) view.findViewById(R.id.lv_stations);
mAdapter = new HistoryListAdapter(getActivity(), R.layout.view_station_row, MainActivity.mStations);
mListView.setAdapter(mAdapter);
mListView.setOnItemClickListener(mListener);
return view;
}
/* Public property access function
*
*/
public void setStations(ArrayList<Station> stations) {
mStations = stations;
if (mAdapter != null) {
mAdapter.clear();
mAdapter.addAll(mStations);
mAdapter.notifyDataSetChanged();
}
}
}
|
[
"kdgupta87@gmail.com"
] |
kdgupta87@gmail.com
|
5063f6281a68714bdc2370e6df34b5e4709205bd
|
b8f8e1623cbb85a67a4031a28d0ae0fd86bfdeab
|
/Kombit.Samples.CH.WebsiteDemo/src/java/dk/itst/oiosaml/error/Layer.java
|
5929e208c436bfc39a52e1dceb950600f480f358
|
[
"MIT"
] |
permissive
|
Safewhere/kombit-web-java
|
a373d486dea9c7e9bbe9f38d0dc7072da79b47c6
|
41e551938af67f8c763faa8682535523aab9455e
|
refs/heads/master
| 2020-12-24T05:21:52.570004
| 2016-08-08T17:00:37
| 2016-08-08T17:00:37
| 36,714,139
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,336
|
java
|
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The Original Code is OIOSAML Java Service Provider.
*
* The Initial Developer of the Original Code is Trifork A/S. Portions
* created by Trifork A/S are Copyright (C) 2008 Danish National IT
* and Telecom Agency (http://www.itst.dk). All Rights Reserved.
*
* Contributor(s):
* Joakim Recht <jre@trifork.com>
* Rolf Njor Jensen <rolf@trifork.com>
*
*/
package dk.itst.oiosaml.error;
/**
* Feasible layers to use when throwing unrecoverable exceptions
* @author lsteinth
*/
public class Layer {
public static final String VERSION = "$Id: Layer.java 2829 2008-05-13 12:11:31Z jre $";
public static final Layer CLIENT = new Layer("CLIENT");
public static final Layer BUSINESS = new Layer("BUSINESS");
public static final Layer DATAACCESS = new Layer("RESOURCE");
public static final Layer UNDEFINED = new Layer("UNDEFINED");
private String value;
/**
* Create a new layer
* @param value The value of the layer
*/
private Layer(String value) {
this.value = value;
}
/**
*
* @return The value of the layer
*/
public String getValue() {
return value;
}
/**
* {@inheritDoc Object#toString()}
*/
public String toString() {
return value;
}
/**
* @see Object#equals(Object)
*/
public boolean equals(Layer layer) {
return value.equals(layer.value);
}
/**
* {@inheritDoc Object#hashCode()}
*/
public int hashCode() {
return getValue().hashCode();
}
/**
* {@inheritDoc Object#equals(Object)}
*/
public boolean equals(Object obj) {
if(!(obj instanceof Layer)) {
return false;
} else {
return ((getValue() != null) && (getValue().equals(((Layer)obj).getValue())));
}
}
}
|
[
"lxp@globeteam.com"
] |
lxp@globeteam.com
|
e4430b8ca331b1fcc3821792e2f798ca21ea202a
|
0d183f64948b847e5fc04bc5d14745b2cbeb3afa
|
/JTree/aparse/smali2javaold/ParserContext.java
|
4fe4607cab3cc8805397a4ee4c98f0f3e4816922
|
[] |
no_license
|
zhangweihust/JTree
|
75c509a9bec9053564ca44a6e7f2dd785012b3f8
|
a6ce3c585cdab2d4d603018d7ec856f5c9391596
|
refs/heads/master
| 2016-09-06T15:42:19.271640
| 2016-02-05T03:59:08
| 2016-02-05T03:59:08
| 12,106,870
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,559
|
java
|
/* -----------------------------------------------------------------------------
* ParserContext.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.3
* Produced : Tue Apr 29 14:07:23 CST 2014
*
* -----------------------------------------------------------------------------
*/
package com.zhangwei.parser;
import java.util.Stack;
public class ParserContext
{
public final String text;
public int index;
private Stack<Integer> startStack = new Stack<Integer>();
private Stack<String> callStack = new Stack<String>();
private Stack<String> errorStack = new Stack<String>();
private int level = 0;
private int errorIndex = 0;
private final boolean traceOn;
public ParserContext(String text, boolean traceOn)
{
this.text = text;
this.traceOn = traceOn;
index = 0;
}
public void push(String rulename)
{
push(rulename, "");
}
public void push(String rulename, String trace)
{
callStack.push(rulename);
startStack.push(new Integer(index));
if (traceOn)
{
System.out.println("-> " + ++level + ": " + rulename + "(" + (trace != null ? trace : "") + ")");
System.out.println(index + ": " + text.substring(index, index + 10 > text.length() ? text.length() : index + 10).replaceAll("[\\x00-\\x1F]", " "));
}
}
public void pop(String function, boolean result)
{
Integer start = startStack.pop();
callStack.pop();
if (traceOn)
{
System.out.println(
"<- " + level-- +
": " + function +
"(" + (result ? "true" : "false") +
",s=" + start +
",l=" + (index - start) +
",e=" + errorIndex + ")");
}
if (!result)
{
if (index > errorIndex)
{
errorIndex = index;
errorStack = new Stack<String>();
errorStack.addAll(callStack);
}
else if (index == errorIndex && errorStack.isEmpty())
{
errorStack = new Stack<String>();
errorStack.addAll(callStack);
}
}
else
{
if (index > errorIndex) errorIndex = 0;
}
}
public Stack<String> getErrorStack()
{
return errorStack;
}
public int getErrorIndex()
{
return errorIndex;
}
}
/* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
|
[
"zhangweihust@gmail.com"
] |
zhangweihust@gmail.com
|
1f12bf9ed1b058d65f88f776992466444d4ce228
|
809ecd7d8941d555c4fbe0b387f45be1fdd713a5
|
/movie/src/main/java/guo/App.java
|
1ca75f1bbc90956f7778679b43813349969e2e9d
|
[] |
no_license
|
jiance520/guo
|
c9c7e26ee95538f2a0d1e98595ca7b931b75063a
|
a96b063f8a5beb56faf2569b414ea9a8f714591c
|
refs/heads/master
| 2021-11-10T19:56:50.044355
| 2021-11-09T15:05:25
| 2021-11-09T15:05:25
| 189,838,947
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 635
|
java
|
package guo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
//springboot自带tomcat插件,所以启动springboot,只需要在启动类上加注解@SpringBootApplication。
@SpringBootApplication
//@MapperScan(basePackages = "com.dao")//重点,实列化Bean,只有扫描了dao,才能实例化mapper调用mapper.xml里面的方法!也可以在application.xml配置扫描。eclipse中用,加在idea中会有警告,
public class App {
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}
}
|
[
"jiance520@163.com"
] |
jiance520@163.com
|
d49e105d537876b2466f1db701c40e5c86dabb81
|
71e7162d2491abcea99e08418e939c7b3e3fd6fb
|
/sz0099-parent/sz0099-course-domain/src/main/java/dml/sz0099/course/app/persist/entity/category/package-info.java
|
51eef3642e66cdc650cd182af293c376996eab35
|
[] |
no_license
|
snowflake3721/sz0099
|
1b7127daf9aba559425f9fb4ac580892c7cb74f9
|
0d6252db85f54aa7f1ccbc4fbf86ebe98898ce1b
|
refs/heads/master
| 2020-04-29T07:46:17.756488
| 2019-03-16T11:47:33
| 2019-03-16T11:47:33
| 175,964,689
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 461
|
java
|
/**
* Jit8j framework support by bruce yang
* contact email: 275060435@qq.com
*/
/**
* <pre>
* @formatter:off
*
* description: 功能说明
* @author bruce yang at 2018-10-01 18:46:19
*
* ----------------------------------------------------------------------------------------
* Requirement Author Date Function
* init bruceyang 2018-10-01 basic init
*
* @formatter:on
* </pre>
*/
package dml.sz0099.course.app.persist.entity.category;
|
[
"1839604586@qq.com"
] |
1839604586@qq.com
|
f595e1c3aa3110b559dcf4b73adf40eaaee92cbc
|
add1d65912b52683ea36dd8c180a1146b1509554
|
/src/test/java/com/springboot/demo/BlockingQueueTest.java
|
6e38d5887a1d2b3db1b3897b85fbac275d8b5953
|
[] |
no_license
|
lixing888/springBootDemo
|
2031affe267eb54a1089ae422149bf0b04771ec4
|
1f1ea895941e22b285f4ed8351ebd3533f06ee5d
|
refs/heads/master
| 2022-12-05T15:28:49.568788
| 2021-08-20T14:23:09
| 2021-08-20T14:23:09
| 166,974,097
| 2
| 1
| null | 2022-11-16T11:34:43
| 2019-01-22T10:23:51
|
Java
|
UTF-8
|
Java
| false
| false
| 3,662
|
java
|
package com.springboot.demo;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Scanner;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
public class BlockingQueueTest {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Enter base directory (e.g. /usr/local/jdk5.0/src): ");
String directory = in.nextLine();
System.out.print("Enter keyword (e.g. volatile): ");
String keyword = in.nextLine();
final int FILE_QUEUE_SIZE = 10;// 阻塞队列大小
final int SEARCH_THREADS = 100;// 关键字搜索线程个数
// 基于ArrayBlockingQueue的阻塞队列
BlockingQueue<File> queue = new ArrayBlockingQueue<File>(
FILE_QUEUE_SIZE);
//只启动一个线程来搜索目录
FileEnumerationTask enumerator = new FileEnumerationTask(queue,
new File(directory));
new Thread(enumerator).start();
//启动100个线程用来在文件中搜索指定的关键字
for (int i = 1; i <= SEARCH_THREADS; i++)
new Thread(new SearchTask(queue, keyword)).start();
}
}
class FileEnumerationTask implements Runnable {
//哑元文件对象,放在阻塞队列最后,用来标示文件已被遍历完
public static File DUMMY = new File("");
private BlockingQueue<File> queue;
private File startingDirectory;
public FileEnumerationTask(BlockingQueue<File> queue, File startingDirectory) {
this.queue = queue;
this.startingDirectory = startingDirectory;
}
public void run() {
try {
enumerate(startingDirectory);
queue.put(DUMMY);//执行到这里说明指定的目录下文件已被遍历完
} catch (InterruptedException e) {
}
}
// 将指定目录下的所有文件以File对象的形式放入阻塞队列中
public void enumerate(File directory) throws InterruptedException {
File[] files = directory.listFiles();
for (File file : files) {
if (file.isDirectory())
enumerate(file);
else
//将元素放入队尾,如果队列满,则阻塞
queue.put(file);
}
}
}
class SearchTask implements Runnable {
private BlockingQueue<File> queue;
private String keyword;
public SearchTask(BlockingQueue<File> queue, String keyword) {
this.queue = queue;
this.keyword = keyword;
}
public void run() {
try {
boolean done = false;
while (!done) {
//取出队首元素,如果队列为空,则阻塞
File file = queue.take();
if (file == FileEnumerationTask.DUMMY) {
//取出来后重新放入,好让其他线程读到它时也很快的结束
queue.put(file);
done = true;
} else
search(file);
}
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
}
}
public void search(File file) throws IOException {
Scanner in = new Scanner(new FileInputStream(file));
int lineNumber = 0;
while (in.hasNextLine()) {
lineNumber++;
String line = in.nextLine();
if (line.contains(keyword))
System.out.printf("%s:%d:%s%n", file.getPath(), lineNumber,
line);
}
in.close();
}
}
|
[
"85210279@qq.com"
] |
85210279@qq.com
|
b3abda6437173df91acdd16a124866b89801e4fe
|
2c42ff8e677790139f972934d0604ed9baf61930
|
/JavaIdea/java_practise/src/com/sia/java/practise/jdbc_prac/util/ClassDao2.java
|
939e48c049ced1eb98044c9e40289d3eaf97d5f2
|
[] |
no_license
|
DukeTiny/education
|
ee845c0e5b0d171337c6f52052e054379e1ddc1b
|
8ec8aaec07897ca93d16b08a7ef431beb680eaf3
|
refs/heads/master
| 2022-12-25T03:46:06.741009
| 2019-10-15T17:11:04
| 2019-10-15T17:11:04
| 215,351,747
| 0
| 0
| null | 2022-12-16T09:59:04
| 2019-10-15T16:56:27
|
TSQL
|
UTF-8
|
Java
| false
| false
| 4,282
|
java
|
package com.sia.java.practise.jdbc_prac.util;
import com.sia.java.practise.jdbc_prac.Dao.IClassDao;
import com.sia.java.practise.jdbc_prac.bean.ClassInfo;
import java.sql.*;
import java.util.ArrayList;
public class ClassDao2 implements IClassDao {
Connection con;
PreparedStatement state;
ResultSet rs;
ClassInfo ci;
@Override
public void add( ClassInfo ci ) {
try {
con = ClassDaoUtil.getCon();
this.ci = ci;
String sql = "INSERT INTO class VALUES(?,?,?)";
state = con.prepareStatement(sql);
state.setInt(1,ci.getCid());
state.setString(2,ci.getCname());
state.setInt(3,ci.getCnum());
state.executeUpdate();
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
} finally {
try {
ClassDaoUtil.closeAll(state,null,con);
} catch (SQLException e) {
e.printStackTrace();
}
}
}
@Override
public void del( int c ) {
try {
con = ClassDaoUtil.getCon();
String sql = "DELETE FROM class WHERE cid=?";
state = con.prepareStatement(sql);
state.setInt(1,c);
state.executeUpdate();
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
} finally {
try {
ClassDaoUtil.closeAll(state,null,con);
} catch (SQLException e) {
e.printStackTrace();
}
}
}
@Override
public void change( ClassInfo ci ) {
try {
con = ClassDaoUtil.getCon();
this.ci = ci;
String sql = "UPDATE class SET cname=?,cnum=? WHERE cid=?";
state = con.prepareStatement(sql);
state.setString(1,ci.getCname());
state.setInt(2,ci.getCnum());
state.setInt(3,ci.getCid());
state.executeUpdate();
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
} finally {
try {
ClassDaoUtil.closeAll(state,null,con);
} catch (SQLException e) {
e.printStackTrace();
}
}
}
@Override
public ClassInfo getSingle(int cid) {
ClassInfo cInfo=null;
try {
con = ClassDaoUtil.getCon();
String sql = "SELECT * FROM class WHERE cid=?";
state = con.prepareStatement(sql);
state.setInt(1,cid);
rs = state.executeQuery();
if ( rs.next() ){
cInfo = new ClassInfo();
cInfo.setCid( Integer.parseInt( rs.getString(1) ) );
cInfo.setCname( rs.getString( 2 ));
cInfo.setCnum( Integer.parseInt( rs.getString(3) ) );
}
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
} finally {
try {
ClassDaoUtil.closeAll(state,rs,con);
} catch (SQLException e) {
e.printStackTrace();
}
}
return cInfo;
}
@Override
public ArrayList<ClassInfo> getAll() {
ArrayList<ClassInfo> al = new ArrayList<>();
try {
con = ClassDaoUtil.getCon();
String sql = "SELECT * FROM class";
state = con.prepareStatement(sql);
rs = state.executeQuery();
while ( rs.next() ){
ClassInfo cInfo= new ClassInfo();
cInfo.setCid( Integer.parseInt( rs.getString(1) ) );
cInfo.setCname( rs.getString( 2 ));
cInfo.setCnum( Integer.parseInt( rs.getString(3) ) );
al.add(cInfo);
}
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
} finally {
try {
ClassDaoUtil.closeAll(state,rs,con);
} catch (SQLException e) {
e.printStackTrace();
}
}
return al;
}
}
|
[
"329087464@qq.com"
] |
329087464@qq.com
|
653a74c4d92b10478d1bda7e8a6d877b16f9bebc
|
34c8b01849d7265c73bcc696e7f0c11312c7f84d
|
/src/java/org/apache/commons/jelly/tags/Resources.java
|
7ff8c2d04317a23e61c5dbd8f411c184fb11827d
|
[
"Apache-2.0"
] |
permissive
|
pwntester/jelly
|
03ddb422005970ddfc86f0e1cc7c5b5a84f7e431
|
cb7966734f339619e5ee8e57b08009acbf5e1d10
|
refs/heads/master
| 2021-01-16T11:55:47.916026
| 2017-11-27T20:21:47
| 2017-11-27T20:21:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,115
|
java
|
/*
* Copyright 2002,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.jelly.tags;
import java.util.*;
import java.text.*;
/**
* <p>Provides locale-neutral access to string resources. Only the
* documentation and code are in English. :-)
*
* <p>The major goal, aside from globalization, is convenience.
* Access to resources with no parameters is made in the form:</p>
* <pre>
* Resources.getMessage(MESSAGE_NAME);
* </pre>
*
* <p>Access to resources with one parameter works like</p>
* <pre>
* Resources.getMessage(MESSAGE_NAME, arg1);
* </pre>
*
* <p>... and so on.</p>
*
* @author Shawn Bayern
*/
public class Resources {
//*********************************************************************
// Static data
/** The location of our resources. */
private static final String RESOURCE_LOCATION
= "org.apache.commons.jelly.tags.Resources";
/** Our class-wide ResourceBundle. */
private static ResourceBundle rb =
ResourceBundle.getBundle(RESOURCE_LOCATION);
//*********************************************************************
// Public static methods
/** Retrieves a message with no arguments. */
public static String getMessage(String name)
throws MissingResourceException {
return rb.getString(name);
}
/** Retrieves a message with arbitrarily many arguments. */
public static String getMessage(String name, Object[] a)
throws MissingResourceException {
String res = rb.getString(name);
return MessageFormat.format(res, a);
}
/** Retrieves a message with one argument. */
public static String getMessage(String name, Object a1)
throws MissingResourceException {
return getMessage(name, new Object[] { a1 });
}
/** Retrieves a message with two arguments. */
public static String getMessage(String name, Object a1, Object a2)
throws MissingResourceException {
return getMessage(name, new Object[] { a1, a2 });
}
/** Retrieves a message with three arguments. */
public static String getMessage(String name,
Object a1,
Object a2,
Object a3)
throws MissingResourceException {
return getMessage(name, new Object[] { a1, a2, a3 });
}
/** Retrieves a message with four arguments. */
public static String getMessage(String name,
Object a1,
Object a2,
Object a3,
Object a4)
throws MissingResourceException {
return getMessage(name, new Object[] { a1, a2, a3, a4 });
}
/** Retrieves a message with five arguments. */
public static String getMessage(String name,
Object a1,
Object a2,
Object a3,
Object a4,
Object a5)
throws MissingResourceException {
return getMessage(name, new Object[] { a1, a2, a3, a4, a5 });
}
/** Retrieves a message with six arguments. */
public static String getMessage(String name,
Object a1,
Object a2,
Object a3,
Object a4,
Object a5,
Object a6)
throws MissingResourceException {
return getMessage(name, new Object[] { a1, a2, a3, a4, a5, a6 });
}
}
|
[
"kk@kohsuke.org"
] |
kk@kohsuke.org
|
56bfa00beced72e4a6ab4518c84628cbc77fd75f
|
d71e879b3517cf4fccde29f7bf82cff69856cfcd
|
/ExtractedJars/RT_News_com.rt.mobile.english/javafiles/com/facebook/stetho/inspector/protocol/module/Runtime$RemoteObject.java
|
b246e2aa2ec1fbac1cbf0a6f47459897aa72ec66
|
[
"MIT"
] |
permissive
|
Andreas237/AndroidPolicyAutomation
|
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
|
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
|
refs/heads/master
| 2020-04-10T02:14:08.789751
| 2019-05-16T19:29:11
| 2019-05-16T19:29:11
| 160,739,088
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 772
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.facebook.stetho.inspector.protocol.module;
// Referenced classes of package com.facebook.stetho.inspector.protocol.module:
// Runtime
private static class Runtime$RemoteObject
{
public Runtime.ObjectType type;
public String value;
private Runtime$RemoteObject()
{
// 0 0:aload_0
// 1 1:invokespecial #18 <Method void Object()>
// 2 4:return
}
Runtime$RemoteObject(Runtime._cls1 _pcls1)
{
this();
// 0 0:aload_0
// 1 1:invokespecial #21 <Method void Runtime$RemoteObject()>
// 2 4:return
}
}
|
[
"silenta237@gmail.com"
] |
silenta237@gmail.com
|
04baeaa46a0ca693c23ee51f6380933280a0d20d
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/elasticsearch/2015/4/WatcherShieldModule.java
|
07208726ad9ee158b33780805a9718676ecfa5a6
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 2,771
|
java
|
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
package org.elasticsearch.watcher.shield;
import org.elasticsearch.common.inject.AbstractModule;
import org.elasticsearch.common.inject.Module;
import org.elasticsearch.common.inject.PreProcessModule;
import org.elasticsearch.common.inject.util.Providers;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.shield.authz.AuthorizationModule;
import org.elasticsearch.shield.authz.Privilege;
/**
*
*/
public class WatcherShieldModule extends AbstractModule implements PreProcessModule {
private final ESLogger logger;
private final boolean enabled;
private final WatcherUserHolder userHolder;
public WatcherShieldModule(Settings settings) {
this.logger = Loggers.getLogger(WatcherShieldModule.class, settings);
this.enabled = ShieldIntegration.enabled(settings);
if (enabled) {
userHolder = new WatcherUserHolder();
registerClusterPrivilege("manage_watcher", "cluster:admin/watcher/*", "cluster:monitor/watcher/*");
registerClusterPrivilege("monitor_watcher", "cluster:monitor/watcher/*");
} else {
userHolder = null;
}
}
void registerClusterPrivilege(String name, String... patterns) {
try {
Privilege.Cluster.addCustom(name, patterns);
} catch (Exception se) {
logger.warn("could not register cluster privilege [{}]", name);
// we need to prevent bubbling the shield exception here for the tests. In the tests
// we create multiple nodes in the same jvm and since the custom cluster is a static binding
// multiple nodes will try to add the same privileges multiple times.
}
}
@Override
public void processModule(Module module) {
if (enabled && module instanceof AuthorizationModule) {
((AuthorizationModule) module).registerReservedRole(userHolder.role);
}
}
@Override
protected void configure() {
bind(ShieldIntegration.class).asEagerSingleton();
bind(WatcherUserHolder.class).toProvider(Providers.of(userHolder));
if (enabled) {
bind(WatcherSettingsFilter.Shield.class).asEagerSingleton();
bind(WatcherSettingsFilter.class).to(WatcherSettingsFilter.Shield.class);
} else {
bind(WatcherSettingsFilter.class).toInstance(WatcherSettingsFilter.Noop.INSTANCE);
}
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
5665fb18f5544f44f56ab1f0515f44dd47cf3613
|
adacddb9c29cb66a7f44d4a89dfd208f56c59e94
|
/BTPrinterDemo(android)/BTPrinterDemo/src/com/jinoux/android/BTPrinterDemo/DeviceListActivity.java
|
fba6c259bd32099dd203b28c4a7c4ffe43592ed5
|
[] |
no_license
|
dengyanshu/android_ws
|
2f367cff12988e0f85a4113de7456bb0b5600b07
|
f952db8c990dd6a8e4b4e5ac1b3258f80c8390e7
|
refs/heads/master
| 2020-03-19T15:54:16.114912
| 2018-11-10T01:08:00
| 2018-11-10T01:08:00
| 136,691,114
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,957
|
java
|
/*
* Copyright (C) 2009 The Android Open Source 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 com.jinoux.android.BTPrinterDemo;
import java.util.Set;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;
/**
* This Activity appears as a dialog. It lists any paired devices and
* devices detected in the area after discovery. When a device is chosen
* by the user, the MAC address of the device is sent back to the parent
* Activity in the result Intent.
*/
public class DeviceListActivity extends Activity {
// Debugging
private static final String TAG = "DeviceListActivity";
private static final boolean D = true;
// Return Intent extra
public static String EXTRA_DEVICE_ADDRESS = "device_address";
// Member fields
private BluetoothAdapter mBtAdapter;
private ArrayAdapter<String> mPairedDevicesArrayAdapter;
private ArrayAdapter<String> mNewDevicesArrayAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Setup the window
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.device_list);
// Set result CANCELED incase the user backs out
setResult(Activity.RESULT_CANCELED);
// Initialize the button to perform device discovery
Button scanButton = (Button) findViewById(R.id.button_scan);
scanButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
doDiscovery();
v.setVisibility(View.GONE);
}
});
// Initialize array adapters. One for already paired devices and
// one for newly discovered devices
mPairedDevicesArrayAdapter = new ArrayAdapter<String>(this, R.layout.device_name);
mNewDevicesArrayAdapter = new ArrayAdapter<String>(this, R.layout.device_name);
// Find and set up the ListView for paired devices
ListView pairedListView = (ListView) findViewById(R.id.paired_devices);
pairedListView.setAdapter(mPairedDevicesArrayAdapter);
pairedListView.setOnItemClickListener(mDeviceClickListener);
// Find and set up the ListView for newly discovered devices
ListView newDevicesListView = (ListView) findViewById(R.id.new_devices);
newDevicesListView.setAdapter(mNewDevicesArrayAdapter);
newDevicesListView.setOnItemClickListener(mDeviceClickListener);
// Register for broadcasts when a device is discovered
IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);
this.registerReceiver(mReceiver, filter);
// Register for broadcasts when discovery has finished
filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
this.registerReceiver(mReceiver, filter);
// Get the local Bluetooth adapter
mBtAdapter = BluetoothAdapter.getDefaultAdapter();
// Get a set of currently paired devices
Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices();
// If there are paired devices, add each one to the ArrayAdapter
if (pairedDevices.size() > 0) {
findViewById(R.id.title_paired_devices).setVisibility(View.VISIBLE);
for (BluetoothDevice device : pairedDevices) {
mPairedDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress());
}
} else {
String noDevices = getResources().getText(R.string.none_paired).toString();
mPairedDevicesArrayAdapter.add(noDevices);
}
}
@Override
protected void onDestroy() {
super.onDestroy();
// Make sure we're not doing discovery anymore
if (mBtAdapter != null) {
mBtAdapter.cancelDiscovery();
}
// Unregister broadcast listeners
this.unregisterReceiver(mReceiver);
}
/**
* Start device discover with the BluetoothAdapter
*/
private void doDiscovery() {
if (D) Log.d(TAG, "doDiscovery()");
// Indicate scanning in the title
setProgressBarIndeterminateVisibility(true);
setTitle(R.string.scanning);
// Turn on sub-title for new devices
findViewById(R.id.title_new_devices).setVisibility(View.VISIBLE);
// If we're already discovering, stop it
if (mBtAdapter.isDiscovering()) {
mBtAdapter.cancelDiscovery();
}
// Request discover from BluetoothAdapter
mBtAdapter.startDiscovery();
}
// The on-click listener for all devices in the ListViews
private OnItemClickListener mDeviceClickListener = new OnItemClickListener() {
public void onItemClick(AdapterView<?> av, View v, int arg2, long arg3) {
// Cancel discovery because it's costly and we're about to connect
mBtAdapter.cancelDiscovery();
// Get the device MAC address, which is the last 17 chars in the View
String info = ((TextView) v).getText().toString();
String address = info.substring(info.length() - 17);
// Create the result Intent and include the MAC address
Intent intent = new Intent();
intent.putExtra(EXTRA_DEVICE_ADDRESS, address);
// Set result and finish this Activity
setResult(Activity.RESULT_OK, intent);
finish();
}
};
// The BroadcastReceiver that listens for discovered devices and
// changes the title when discovery is finished
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
// When discovery finds a device
if (BluetoothDevice.ACTION_FOUND.equals(action)) {
// Get the BluetoothDevice object from the Intent
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
// If it's already paired, skip it, because it's been listed already
if (device.getBondState() != BluetoothDevice.BOND_BONDED) {
mNewDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress());
}
// When discovery is finished, change the Activity title
} else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
setProgressBarIndeterminateVisibility(false);
setTitle(R.string.select_device);
if (mNewDevicesArrayAdapter.getCount() == 0) {
String noDevices = getResources().getText(R.string.none_found).toString();
mNewDevicesArrayAdapter.add(noDevices);
}
}
}
};
}
|
[
"344630476@qq.com"
] |
344630476@qq.com
|
c27edc417aeb603388aabd2a3a2cd8385a410211
|
feab921bb9d3cd09580223f26f804d77306c9ae8
|
/app/src/main/java/com/ixhuiyunproject/huiyun/ixconfig/net/jsonMod/Start_InfraredResult_10.java
|
eff8dca925101a65c94558b206869dad90d7739f
|
[] |
no_license
|
gyymz1993/IXHuiyunProject
|
5c2609795530dac990bddd489d8c7e73145e5a7a
|
33965542c2c93b130c0ad151a516c41258c81ee1
|
refs/heads/master
| 2021-01-12T02:20:50.259463
| 2017-01-10T06:21:03
| 2017-01-10T06:21:03
| 78,504,130
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,401
|
java
|
package com.ixhuiyunproject.huiyun.ixconfig.net.jsonMod;
import com.ixhuiyunproject.huiyun.ixconfig.FinalValue;
import com.ixhuiyunproject.huiyun.ixconfig.bean.BaseJsonObj;
import com.ixhuiyunproject.huiyun.ixconfig.bean.RedRay;
import com.ixhuiyunproject.huiyun.ixconfig.bean.BaseJsonObj.MyJsonObj1;
import java.util.Map;
/**
* @Description: 通知主机开启红外学习
*/
public class Start_InfraredResult_10 extends BaseJsonModule<RedRay> {
private static final int CODE_START = 10;
private RedRay rayCode;
@Override
public void handleCMDdata(BaseJsonObj baseJsonObj) {
try {
if (FinalValue.OBJ_PHONE.equals(baseJsonObj.obj)
&& CODE_START == baseJsonObj.code) {
if (baseJsonObj.result != 1) {
notifyListeners(false, null);
return;
}
if (baseJsonObj instanceof MyJsonObj1) {
MyJsonObj1 myJsonObj = (MyJsonObj1) baseJsonObj;
Map<String, String> map = myJsonObj.getData();
rayCode = new RedRay();
rayCode.setBtn_code(Integer.valueOf(map.get("btn_code")));
rayCode.setPageType(Integer.valueOf(map.get("pageType")));
rayCode.setR_name(map.get("r_name"));
notifyListeners(true, rayCode);
}
}
} catch (Exception e) {
e.printStackTrace();
notifyListeners(false, null);
}
}
@SuppressWarnings("unchecked")
@Override
public RedRay getData() {
if (rayCode != null)
return rayCode;
return null;
}
}
|
[
"gyymz1993@126.com"
] |
gyymz1993@126.com
|
20cc498a75270b2e472d3ccf8e9953a83f4825b3
|
9bf14b4d2eac89c403109c15a5d48127a81ef8a9
|
/src/minecraft/net/minecraft/client/renderer/chunk/CompiledChunk.java
|
09be529be2e9172a88fe0e371c3789b552661ebe
|
[
"MIT"
] |
permissive
|
mchimsak/VodkaSrc
|
e6d7e968b645566b3eeb1c0995c8d65afc983d1e
|
8f0cf23bac81c6bdf784228616f54afa84d03757
|
refs/heads/master
| 2020-05-01T08:48:11.781283
| 2018-11-20T05:46:18
| 2018-11-20T05:46:18
| 177,386,099
| 1
| 0
|
MIT
| 2019-03-24T07:59:07
| 2019-03-24T07:59:06
| null |
UTF-8
|
Java
| false
| false
| 2,428
|
java
|
package net.minecraft.client.renderer.chunk;
import com.google.common.collect.Lists;
import java.util.List;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumWorldBlockLayer;
public class CompiledChunk
{
public static final CompiledChunk DUMMY = new CompiledChunk()
{
protected void setLayerUsed(EnumWorldBlockLayer layer)
{
throw new UnsupportedOperationException();
}
public void setLayerStarted(EnumWorldBlockLayer layer)
{
throw new UnsupportedOperationException();
}
public boolean isVisible(EnumFacing facing, EnumFacing facing2)
{
return false;
}
};
private final boolean[] layersUsed = new boolean[EnumWorldBlockLayer.values().length];
private final boolean[] layersStarted = new boolean[EnumWorldBlockLayer.values().length];
private boolean empty = true;
private final List<TileEntity> tileEntities = Lists.<TileEntity>newArrayList();
private SetVisibility setVisibility = new SetVisibility();
private WorldRenderer.State state;
public boolean isEmpty()
{
return this.empty;
}
protected void setLayerUsed(EnumWorldBlockLayer layer)
{
this.empty = false;
this.layersUsed[layer.ordinal()] = true;
}
public boolean isLayerEmpty(EnumWorldBlockLayer layer)
{
return !this.layersUsed[layer.ordinal()];
}
public void setLayerStarted(EnumWorldBlockLayer layer)
{
this.layersStarted[layer.ordinal()] = true;
}
public boolean isLayerStarted(EnumWorldBlockLayer layer)
{
return this.layersStarted[layer.ordinal()];
}
public List<TileEntity> getTileEntities()
{
return this.tileEntities;
}
public void addTileEntity(TileEntity tileEntityIn)
{
this.tileEntities.add(tileEntityIn);
}
public boolean isVisible(EnumFacing facing, EnumFacing facing2)
{
return this.setVisibility.isVisible(facing, facing2);
}
public void setVisibility(SetVisibility visibility)
{
this.setVisibility = visibility;
}
public WorldRenderer.State getState()
{
return this.state;
}
public void setState(WorldRenderer.State stateIn)
{
this.state = stateIn;
}
}
|
[
"wyy-666"
] |
wyy-666
|
1bba4a9bb3208d4e984f23b156ea9efbd1f06e55
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2015/8/MetadataCollectorTest.java
|
db5fa510c047779caf737cd0abe85baf2df2be35
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 5,517
|
java
|
/*
* Copyright (c) 2002-2015 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 org.neo4j.kernel.impl.store.kvstore;
import org.junit.Test;
import static org.junit.Assert.assertArrayEquals;
public class MetadataCollectorTest
{
private final BigEndianByteArrayBuffer key = new BigEndianByteArrayBuffer( new byte[4] );
private final BigEndianByteArrayBuffer value = new BigEndianByteArrayBuffer( new byte[4] );
@Test
public void shouldComputePageCatalogue() throws Exception
{
// given
StubCollector collector = new StubCollector( 4 );
collector.visit( key, value );
collector.visit( key, value );
// when
key.putInt( 0, 24 );
collector.visit( key, value );
key.putInt( 0, 62 );
collector.visit( key, value );
key.putInt( 0, 78 );
collector.visit( key, value );
key.putInt( 0, 84 );
collector.visit( key, value );
key.putInt( 0, 96 );
collector.visit( key, value );
// then
assertArrayEquals( new byte[]{/*first:*/0, 0, 0, 24,
/* last:*/0, 0, 0, 62,
/*first:*/0, 0, 0, 78,
/* last:*/0, 0, 0, 96,
}, collector.pageCatalogue() );
}
@Test
public void shouldComputePageCatalogueOverThreePages() throws Exception
{
// given
StubCollector collector = new StubCollector( 4 );
collector.visit( key, value );
collector.visit( key, value );
// when
key.putInt( 0, 24 );
collector.visit( key, value );
key.putInt( 0, 62 );
collector.visit( key, value );
key.putInt( 0, 78 );
collector.visit( key, value );
key.putInt( 0, 84 );
collector.visit( key, value );
key.putInt( 0, 96 );
collector.visit( key, value );
key.putInt( 0, 128 );
collector.visit( key, value );
key.putInt( 0, 133 );
collector.visit( key, value );
// then
assertArrayEquals( new byte[]{/*first:*/0, 0, 0, 24,
/* last:*/0, 0, 0, 62,
/*first:*/0, 0, 0, 78,
/* last:*/0, 0, 0, (byte)128,
/*first:*/0, 0, 0, (byte)133,
/* last:*/0, 0, 0, (byte)133,
}, collector.pageCatalogue() );
}
@Test
public void shouldComputePageCatalogueWhenHeaderCoversEntireFirstPage() throws Exception
{
// given
StubCollector collector = new StubCollector( 4, "a", "b", "c" );
value.putInt( 0, -1 );
collector.visit( key, value );
collector.visit( key, value );
collector.visit( key, value );
collector.visit( key, value );
// when
key.putInt( 0, 16 );
collector.visit( key, value );
key.putInt( 0, 32 );
collector.visit( key, value );
// then
assertArrayEquals( new byte[]{/*first:*/0, 0, 0, 16,
/* last:*/0, 0, 0, 32,
}, collector.pageCatalogue() );
}
@Test
public void shouldComputePageCatalogueWhenHeaderExceedsFirstPage() throws Exception
{
// given
StubCollector collector = new StubCollector( 4, "a", "b", "c", "d" );
value.putInt( 0, -1 );
collector.visit( key, value );
collector.visit( key, value );
collector.visit( key, value );
collector.visit( key, value );
collector.visit( key, value );
// when
key.putInt( 0, 16 );
collector.visit( key, value );
key.putInt( 0, 32 );
collector.visit( key, value );
// then
assertArrayEquals( new byte[]{/*first:*/0, 0, 0, 16,
/* last:*/0, 0, 0, 32,
}, collector.pageCatalogue() );
}
@Test
public void shouldComputeCatalogueWhenSingleDataEntryInPage() throws Exception
{
// given
StubCollector collector = new StubCollector( 4, "a", "b" );
value.putInt( 0, -1 );
collector.visit( key, value );
collector.visit( key, value );
collector.visit( key, value );
// when
key.putInt( 0, 16 );
collector.visit( key, value );
key.putInt( 0, 32 );
collector.visit( key, value );
// then
assertArrayEquals( new byte[]{/*first:*/0, 0, 0, 16,
/* last:*/0, 0, 0, 16,
/*first:*/0, 0, 0, 32,
/* last:*/0, 0, 0, 32,
}, collector.pageCatalogue() );
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
08a2d5033460a008df483b98d726af39017af189
|
daab099e44da619b97a7a6009e9dee0d507930f3
|
/rt/sun/security/provider/certpath/CertId.java
|
177fa7c8b9140f07de753facd1cadaea3e1835ef
|
[] |
no_license
|
xknower/source-code-jdk-8u211
|
01c233d4f498d6a61af9b4c34dc26bb0963d6ce1
|
208b3b26625f62ff0d1ff6ee7c2b7ee91f6c9063
|
refs/heads/master
| 2022-12-28T17:08:25.751594
| 2020-10-09T03:24:14
| 2020-10-09T03:24:14
| 278,289,426
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,488
|
java
|
/* */ package sun.security.provider.certpath;
/* */
/* */ import java.io.IOException;
/* */ import java.math.BigInteger;
/* */ import java.security.MessageDigest;
/* */ import java.security.NoSuchAlgorithmException;
/* */ import java.security.PublicKey;
/* */ import java.security.cert.X509Certificate;
/* */ import java.util.Arrays;
/* */ import javax.security.auth.x500.X500Principal;
/* */ import sun.misc.HexDumpEncoder;
/* */ import sun.security.util.DerInputStream;
/* */ import sun.security.util.DerOutputStream;
/* */ import sun.security.util.DerValue;
/* */ import sun.security.x509.AlgorithmId;
/* */ import sun.security.x509.SerialNumber;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class CertId
/* */ {
/* */ private static final boolean debug = false;
/* 61 */ private static final AlgorithmId SHA1_ALGID = new AlgorithmId(AlgorithmId.SHA_oid);
/* */
/* */ private final AlgorithmId hashAlgId;
/* */ private final byte[] issuerNameHash;
/* */ private final byte[] issuerKeyHash;
/* */ private final SerialNumber certSerialNumber;
/* 67 */ private int myhash = -1;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public CertId(X509Certificate paramX509Certificate, SerialNumber paramSerialNumber) throws IOException {
/* 75 */ this(paramX509Certificate.getSubjectX500Principal(), paramX509Certificate
/* 76 */ .getPublicKey(), paramSerialNumber);
/* */ }
/* */
/* */
/* */
/* */
/* */ public CertId(X500Principal paramX500Principal, PublicKey paramPublicKey, SerialNumber paramSerialNumber) throws IOException {
/* 83 */ MessageDigest messageDigest = null;
/* */ try {
/* 85 */ messageDigest = MessageDigest.getInstance("SHA1");
/* 86 */ } catch (NoSuchAlgorithmException noSuchAlgorithmException) {
/* 87 */ throw new IOException("Unable to create CertId", noSuchAlgorithmException);
/* */ }
/* 89 */ this.hashAlgId = SHA1_ALGID;
/* 90 */ messageDigest.update(paramX500Principal.getEncoded());
/* 91 */ this.issuerNameHash = messageDigest.digest();
/* */
/* */
/* 94 */ byte[] arrayOfByte1 = paramPublicKey.getEncoded();
/* 95 */ DerValue derValue = new DerValue(arrayOfByte1);
/* 96 */ DerValue[] arrayOfDerValue = new DerValue[2];
/* 97 */ arrayOfDerValue[0] = derValue.data.getDerValue();
/* 98 */ arrayOfDerValue[1] = derValue.data.getDerValue();
/* 99 */ byte[] arrayOfByte2 = arrayOfDerValue[1].getBitString();
/* 100 */ messageDigest.update(arrayOfByte2);
/* 101 */ this.issuerKeyHash = messageDigest.digest();
/* 102 */ this.certSerialNumber = paramSerialNumber;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public CertId(DerInputStream paramDerInputStream) throws IOException {
/* 119 */ this.hashAlgId = AlgorithmId.parse(paramDerInputStream.getDerValue());
/* 120 */ this.issuerNameHash = paramDerInputStream.getOctetString();
/* 121 */ this.issuerKeyHash = paramDerInputStream.getOctetString();
/* 122 */ this.certSerialNumber = new SerialNumber(paramDerInputStream);
/* */ }
/* */
/* */
/* */
/* */
/* */ public AlgorithmId getHashAlgorithm() {
/* 129 */ return this.hashAlgId;
/* */ }
/* */
/* */
/* */
/* */
/* */ public byte[] getIssuerNameHash() {
/* 136 */ return this.issuerNameHash;
/* */ }
/* */
/* */
/* */
/* */
/* */ public byte[] getIssuerKeyHash() {
/* 143 */ return this.issuerKeyHash;
/* */ }
/* */
/* */
/* */
/* */
/* */ public BigInteger getSerialNumber() {
/* 150 */ return this.certSerialNumber.getNumber();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void encode(DerOutputStream paramDerOutputStream) throws IOException {
/* 159 */ DerOutputStream derOutputStream = new DerOutputStream();
/* 160 */ this.hashAlgId.encode(derOutputStream);
/* 161 */ derOutputStream.putOctetString(this.issuerNameHash);
/* 162 */ derOutputStream.putOctetString(this.issuerKeyHash);
/* 163 */ this.certSerialNumber.encode(derOutputStream);
/* 164 */ paramDerOutputStream.write((byte)48, derOutputStream);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int hashCode() {
/* 179 */ if (this.myhash == -1) {
/* 180 */ this.myhash = this.hashAlgId.hashCode(); byte b;
/* 181 */ for (b = 0; b < this.issuerNameHash.length; b++) {
/* 182 */ this.myhash += this.issuerNameHash[b] * b;
/* */ }
/* 184 */ for (b = 0; b < this.issuerKeyHash.length; b++) {
/* 185 */ this.myhash += this.issuerKeyHash[b] * b;
/* */ }
/* 187 */ this.myhash += this.certSerialNumber.getNumber().hashCode();
/* */ }
/* 189 */ return this.myhash;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public boolean equals(Object paramObject) {
/* 202 */ if (this == paramObject) {
/* 203 */ return true;
/* */ }
/* 205 */ if (paramObject == null || !(paramObject instanceof CertId)) {
/* 206 */ return false;
/* */ }
/* */
/* 209 */ CertId certId = (CertId)paramObject;
/* 210 */ if (this.hashAlgId.equals(certId.getHashAlgorithm()) &&
/* 211 */ Arrays.equals(this.issuerNameHash, certId.getIssuerNameHash()) &&
/* 212 */ Arrays.equals(this.issuerKeyHash, certId.getIssuerKeyHash()) && this.certSerialNumber
/* 213 */ .getNumber().equals(certId.getSerialNumber())) {
/* 214 */ return true;
/* */ }
/* 216 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public String toString() {
/* 224 */ StringBuilder stringBuilder = new StringBuilder();
/* 225 */ stringBuilder.append("CertId \n");
/* 226 */ stringBuilder.append("Algorithm: " + this.hashAlgId.toString() + "\n");
/* 227 */ stringBuilder.append("issuerNameHash \n");
/* 228 */ HexDumpEncoder hexDumpEncoder = new HexDumpEncoder();
/* 229 */ stringBuilder.append(hexDumpEncoder.encode(this.issuerNameHash));
/* 230 */ stringBuilder.append("\nissuerKeyHash: \n");
/* 231 */ stringBuilder.append(hexDumpEncoder.encode(this.issuerKeyHash));
/* 232 */ stringBuilder.append("\n" + this.certSerialNumber.toString());
/* 233 */ return stringBuilder.toString();
/* */ }
/* */ }
/* Location: D:\tools\env\Java\jdk1.8.0_211\rt.jar!\sun\security\provider\certpath\CertId.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"xknower@126.com"
] |
xknower@126.com
|
db3e0c3516bf2d0a0700cdd75a728535cace47b2
|
0d20570b272a8647bdef6658978852fb91966f2e
|
/tobytv/src/main/java/cc/before30/review/Ob.java
|
cc785d30f33c2cf88830b760b4ddff05df9fa87c
|
[] |
no_license
|
before30/research-java8
|
03dad102cba05a3cc44a105473ad742617eb91b7
|
cfb5e72f78b51b8cc7aa44b04d20c3819fa50202
|
refs/heads/master
| 2020-07-31T01:11:43.802472
| 2017-06-11T16:16:13
| 2017-06-11T16:16:13
| 73,612,857
| 3
| 1
| null | 2017-03-22T04:31:48
| 2016-11-13T11:57:17
|
Java
|
UTF-8
|
Java
| false
| false
| 1,358
|
java
|
package cc.before30.review;
import java.util.Iterator;
import java.util.Observable;
import java.util.Observer;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
/**
* User: before30
* Date: 2016. 11. 29.
* Time: 오후 12:29
*/
public class Ob {
// Duality
// Observer Pattern
// Reactive Streams - 표준
// Iterable <---> Observable
public static void main(String[] args) {
Iterable<Integer> iterable = () ->
new Iterator<Integer>() {
int i = 0;
final static int MAX = 10;
@Override public boolean hasNext() {
return i < MAX;
}
@Override public Integer next() {
return ++i;
}
};
for (Integer i : iterable) {
System.out.println(i);
}
for (Iterator<Integer> it = iterable.iterator(); it.hasNext();) {
System.out.println(it.next());
}
///////
// subscriber
// observer
Observer observer = new Observer() {
@Override public void update(Observable o, Object arg) {
System.out.println(arg);
}
};
IntObservable intObservable = new IntObservable();
intObservable.addObserver(observer);
intObservable.run();
}
// subject
// publisher
static class IntObservable extends Observable implements Runnable {
@Override public void run() {
for (int i=1; i<=10; i++) {
setChanged();
notifyObservers(i);
}
}
}
}
|
[
"before30@gmail.com"
] |
before30@gmail.com
|
4afd28bc8c87861e15590063bbd176c7a652effd
|
d85028f6a7c72c6e6daa1dd9c855d4720fc8b655
|
/io/netty/channel/socket/oio/DefaultOioServerSocketChannelConfig.java
|
fba66cea5fb041d52b6d3e29f8e4a1f4f4bb849b
|
[] |
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
| 5,937
|
java
|
/*
* Decompiled with CFR <Could not determine version>.
*/
package io.netty.channel.socket.oio;
import io.netty.buffer.ByteBufAllocator;
import io.netty.channel.Channel;
import io.netty.channel.ChannelConfig;
import io.netty.channel.ChannelException;
import io.netty.channel.ChannelOption;
import io.netty.channel.MessageSizeEstimator;
import io.netty.channel.PreferHeapByteBufAllocator;
import io.netty.channel.RecvByteBufAllocator;
import io.netty.channel.WriteBufferWaterMark;
import io.netty.channel.socket.DefaultServerSocketChannelConfig;
import io.netty.channel.socket.ServerSocketChannel;
import io.netty.channel.socket.ServerSocketChannelConfig;
import io.netty.channel.socket.oio.OioServerSocketChannel;
import io.netty.channel.socket.oio.OioServerSocketChannelConfig;
import java.io.IOException;
import java.net.ServerSocket;
import java.util.Map;
@Deprecated
public class DefaultOioServerSocketChannelConfig
extends DefaultServerSocketChannelConfig
implements OioServerSocketChannelConfig {
@Deprecated
public DefaultOioServerSocketChannelConfig(ServerSocketChannel channel, ServerSocket javaSocket) {
super((ServerSocketChannel)channel, (ServerSocket)javaSocket);
this.setAllocator((ByteBufAllocator)new PreferHeapByteBufAllocator((ByteBufAllocator)this.getAllocator()));
}
DefaultOioServerSocketChannelConfig(OioServerSocketChannel channel, ServerSocket javaSocket) {
super((ServerSocketChannel)channel, (ServerSocket)javaSocket);
this.setAllocator((ByteBufAllocator)new PreferHeapByteBufAllocator((ByteBufAllocator)this.getAllocator()));
}
@Override
public Map<ChannelOption<?>, Object> getOptions() {
return this.getOptions(super.getOptions(), ChannelOption.SO_TIMEOUT);
}
@Override
public <T> T getOption(ChannelOption<T> option) {
if (option != ChannelOption.SO_TIMEOUT) return (T)super.getOption(option);
return (T)Integer.valueOf((int)this.getSoTimeout());
}
@Override
public <T> boolean setOption(ChannelOption<T> option, T value) {
this.validate(option, value);
if (option != ChannelOption.SO_TIMEOUT) return super.setOption(option, value);
this.setSoTimeout((int)((Integer)value).intValue());
return true;
}
@Override
public OioServerSocketChannelConfig setSoTimeout(int timeout) {
try {
this.javaSocket.setSoTimeout((int)timeout);
return this;
}
catch (IOException e) {
throw new ChannelException((Throwable)e);
}
}
@Override
public int getSoTimeout() {
try {
return this.javaSocket.getSoTimeout();
}
catch (IOException e) {
throw new ChannelException((Throwable)e);
}
}
@Override
public OioServerSocketChannelConfig setBacklog(int backlog) {
super.setBacklog((int)backlog);
return this;
}
@Override
public OioServerSocketChannelConfig setReuseAddress(boolean reuseAddress) {
super.setReuseAddress((boolean)reuseAddress);
return this;
}
@Override
public OioServerSocketChannelConfig setReceiveBufferSize(int receiveBufferSize) {
super.setReceiveBufferSize((int)receiveBufferSize);
return this;
}
@Override
public OioServerSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth) {
super.setPerformancePreferences((int)connectionTime, (int)latency, (int)bandwidth);
return this;
}
@Override
public OioServerSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis) {
super.setConnectTimeoutMillis((int)connectTimeoutMillis);
return this;
}
@Deprecated
@Override
public OioServerSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead) {
super.setMaxMessagesPerRead((int)maxMessagesPerRead);
return this;
}
@Override
public OioServerSocketChannelConfig setWriteSpinCount(int writeSpinCount) {
super.setWriteSpinCount((int)writeSpinCount);
return this;
}
@Override
public OioServerSocketChannelConfig setAllocator(ByteBufAllocator allocator) {
super.setAllocator((ByteBufAllocator)allocator);
return this;
}
@Override
public OioServerSocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator) {
super.setRecvByteBufAllocator((RecvByteBufAllocator)allocator);
return this;
}
@Override
public OioServerSocketChannelConfig setAutoRead(boolean autoRead) {
super.setAutoRead((boolean)autoRead);
return this;
}
@Override
protected void autoReadCleared() {
if (!(this.channel instanceof OioServerSocketChannel)) return;
((OioServerSocketChannel)this.channel).clearReadPending0();
}
@Override
public OioServerSocketChannelConfig setAutoClose(boolean autoClose) {
super.setAutoClose((boolean)autoClose);
return this;
}
@Override
public OioServerSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark) {
super.setWriteBufferHighWaterMark((int)writeBufferHighWaterMark);
return this;
}
@Override
public OioServerSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark) {
super.setWriteBufferLowWaterMark((int)writeBufferLowWaterMark);
return this;
}
@Override
public OioServerSocketChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark) {
super.setWriteBufferWaterMark((WriteBufferWaterMark)writeBufferWaterMark);
return this;
}
@Override
public OioServerSocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator) {
super.setMessageSizeEstimator((MessageSizeEstimator)estimator);
return this;
}
}
|
[
"emlin2021@gmail.com"
] |
emlin2021@gmail.com
|
a000d873275a4261a8e614b2085f526ce6e71643
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Cli-31/org.apache.commons.cli.OptionBuilder/BBC-F0-opt-50/tests/6/org/apache/commons/cli/OptionBuilder_ESTest_scaffolding.java
|
341b24abdd0166c8981c9cf9e070c8ae0aef0e20
|
[
"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
| 3,373
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Oct 13 15:36:02 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 OptionBuilder_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.OptionBuilder";
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(OptionBuilder_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.cli.OptionBuilder",
"org.apache.commons.cli.OptionValidator",
"org.apache.commons.cli.Option"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(OptionBuilder_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.cli.OptionBuilder",
"org.apache.commons.cli.Option",
"org.apache.commons.cli.OptionValidator"
);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
4abe60475163e68c4820b16baa71bb13ce9a6160
|
3c178b1dbb44237afe8d435336a265a73f4d66ea
|
/com/android/dumprendertree/FsUtils.java
|
85e0422014f0bff9a8b143d603fb0daf565ddff6
|
[] |
no_license
|
AndroidSDKSources/android-sdk-sources-for-api-level-5
|
b7806884853389ff288b3adbdaf28f14893549a0
|
baef9e37c1298f278f4fc212b9910810bf262a0b
|
refs/heads/master
| 2021-01-15T15:05:15.383833
| 2015-06-13T15:27:01
| 2015-06-13T15:27:01
| 37,376,449
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,434
|
java
|
/*
* Copyright (C) 2009 The Android Open Source 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 com.android.dumprendertree;
import com.android.dumprendertree.forwarder.ForwardService;
import android.util.Log;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
public class FsUtils {
private static final String LOGTAG = "FsUtils";
static final String HTTP_TESTS_PREFIX = "/sdcard/android/layout_tests/http/tests/";
static final String HTTPS_TESTS_PREFIX = "/sdcard/android/layout_tests/http/tests/ssl/";
static final String HTTP_LOCAL_TESTS_PREFIX = "/sdcard/android/layout_tests/http/tests/local/";
static final String HTTP_MEDIA_TESTS_PREFIX = "/sdcard/android/layout_tests/http/tests/media/";
static final String HTTP_WML_TESTS_PREFIX = "/sdcard/android/layout_tests/http/tests/wml/";
private FsUtils() {
//no creation of instances
}
public static void findLayoutTestsRecursively(BufferedOutputStream bos,
String dir) throws IOException {
Log.v(LOGTAG, "Searching tests under " + dir);
File d = new File(dir);
if (!d.isDirectory()) {
throw new AssertionError("A directory expected, but got " + dir);
}
String[] files = d.list();
for (int i = 0; i < files.length; i++) {
String s = dir + "/" + files[i];
if (FileFilter.ignoreTest(s)) {
Log.v(LOGTAG, " Ignoring: " + s);
continue;
}
if (s.toLowerCase().endsWith(".html")
|| s.toLowerCase().endsWith(".xml")) {
bos.write(s.getBytes());
bos.write('\n');
continue;
}
File f = new File(s);
if (f.isDirectory()) {
findLayoutTestsRecursively(bos, s);
continue;
}
Log.v(LOGTAG, "Skipping " + s);
}
}
public static void updateTestStatus(String statusFile, String s) {
try {
BufferedOutputStream bos = new BufferedOutputStream(
new FileOutputStream(statusFile));
bos.write(s.getBytes());
bos.close();
} catch (Exception e) {
Log.e(LOGTAG, "Cannot update file " + statusFile);
}
}
public static String readTestStatus(String statusFile) {
// read out the test name it stopped last time.
String status = null;
File testStatusFile = new File(statusFile);
if(testStatusFile.exists()) {
try {
BufferedReader inReader = new BufferedReader(
new FileReader(testStatusFile));
status = inReader.readLine();
inReader.close();
} catch (IOException e) {
Log.e(LOGTAG, "Error reading test status.", e);
}
}
return status;
}
public static String getTestUrl(String path) {
String url = null;
if (!path.startsWith(HTTP_TESTS_PREFIX)) {
url = "file://" + path;
} else {
ForwardService.getForwardService().startForwardService();
if (path.startsWith(HTTPS_TESTS_PREFIX)) {
// still cut the URL after "http/tests/"
url = "https://127.0.0.1:8443/" + path.substring(HTTP_TESTS_PREFIX.length());
} else if (!path.startsWith(HTTP_LOCAL_TESTS_PREFIX)
&& !path.startsWith(HTTP_MEDIA_TESTS_PREFIX)
&& !path.startsWith(HTTP_WML_TESTS_PREFIX)) {
url = "http://127.0.0.1:8000/" + path.substring(HTTP_TESTS_PREFIX.length());
} else {
url = "file://" + path;
}
}
return url;
}
}
|
[
"root@ifeegoo.com"
] |
root@ifeegoo.com
|
6cbef8e6a2adfdba12e6d55f5bcc18488bf421f2
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas_ReducedClassCount/applicationModule/src/test/java/applicationModulepackageJava4/Foo839Test.java
|
f4bc25941a4273bf9e86038187fa9315ec884d4a
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 741
|
java
|
package applicationModulepackageJava4;
import org.junit.Test;
public class Foo839Test {
@Test
public void testFoo0() {
new Foo839().foo0();
}
@Test
public void testFoo1() {
new Foo839().foo1();
}
@Test
public void testFoo2() {
new Foo839().foo2();
}
@Test
public void testFoo3() {
new Foo839().foo3();
}
@Test
public void testFoo4() {
new Foo839().foo4();
}
@Test
public void testFoo5() {
new Foo839().foo5();
}
@Test
public void testFoo6() {
new Foo839().foo6();
}
@Test
public void testFoo7() {
new Foo839().foo7();
}
@Test
public void testFoo8() {
new Foo839().foo8();
}
@Test
public void testFoo9() {
new Foo839().foo9();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
f4604e84a58d3a0d72c377299759c8d6d0513e4c
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/boot/svg/a/a/abk.java
|
7c480da223ee4516f2cb4f14267f887f229d96f1
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,275
|
java
|
package com.tencent.mm.boot.svg.a.a;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.WeChatSVGRenderC2Java;
import com.tencent.mm.svg.c;
import com.tencent.smtt.sdk.WebView;
public final class abk extends c {
private final int height = 72;
private final int width = 72;
public final int a(int i, Object... objArr) {
switch (i) {
case 0:
return 72;
case 1:
return 72;
case 2:
Canvas canvas = (Canvas) objArr[0];
Looper looper = (Looper) objArr[1];
c.h(looper);
c.g(looper);
Paint k = c.k(looper);
k.setFlags(385);
k.setStyle(Style.FILL);
Paint k2 = c.k(looper);
k2.setFlags(385);
k2.setStyle(Style.STROKE);
k.setColor(WebView.NIGHT_MODE_COLOR);
k2.setStrokeWidth(1.0f);
k2.setStrokeCap(Cap.BUTT);
k2.setStrokeJoin(Join.MITER);
k2.setStrokeMiter(4.0f);
k2.setPathEffect(null);
c.a(k2, looper).setStrokeWidth(1.0f);
k = c.a(k, looper);
k.setColor(WebView.NIGHT_MODE_COLOR);
canvas.save();
Paint a = c.a(k, looper);
Path l = c.l(looper);
l.moveTo(36.0f, 66.0f);
l.cubicTo(19.431458f, 66.0f, 6.0f, 52.568542f, 6.0f, 36.0f);
l.cubicTo(6.0f, 19.431458f, 19.431458f, 6.0f, 36.0f, 6.0f);
l.cubicTo(52.568542f, 6.0f, 66.0f, 19.431458f, 66.0f, 36.0f);
l.cubicTo(66.0f, 52.568542f, 52.568542f, 66.0f, 36.0f, 66.0f);
l.close();
l.moveTo(36.0f, 62.4f);
l.cubicTo(50.58032f, 62.4f, 62.4f, 50.58032f, 62.4f, 36.0f);
l.cubicTo(62.4f, 21.419683f, 50.58032f, 9.6f, 36.0f, 9.6f);
l.cubicTo(21.419683f, 9.6f, 9.6f, 21.419683f, 9.6f, 36.0f);
l.cubicTo(9.6f, 50.58032f, 21.419683f, 62.4f, 36.0f, 62.4f);
l.close();
l.moveTo(34.02246f, 19.293457f);
l.lineTo(37.97754f, 19.293457f);
l.lineTo(37.713867f, 40.475098f);
l.lineTo(34.286133f, 40.475098f);
l.lineTo(34.02246f, 19.293457f);
l.close();
l.moveTo(36.0f, 51.219727f);
l.cubicTo(34.59375f, 51.219727f, 33.495117f, 50.121094f, 33.495117f, 48.714844f);
l.cubicTo(33.495117f, 47.28662f, 34.59375f, 46.20996f, 36.0f, 46.20996f);
l.cubicTo(37.428223f, 46.20996f, 38.504883f, 47.28662f, 38.504883f, 48.714844f);
l.cubicTo(38.504883f, 50.121094f, 37.428223f, 51.219727f, 36.0f, 51.219727f);
l.close();
WeChatSVGRenderC2Java.setFillType(l, 1);
canvas.drawPath(l, a);
canvas.restore();
c.j(looper);
break;
}
return 0;
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
eb8fdba3de0cc7db34e0eec717febca92526b479
|
ea03c0eff8dbdceaab3fc1c3c9e843fadf3018a2
|
/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java
|
51da1d4f41382768ff40335cdbee9e48a7b30fa9
|
[
"Apache-2.0"
] |
permissive
|
cranelab/axis1_3
|
28544dbcf3bf0c9bf59a59441ad8ef21143f70f0
|
1754374507dee9d1502478c454abc1d13bcf15b9
|
refs/heads/master
| 2022-12-28T05:17:18.894411
| 2020-04-22T17:50:05
| 2020-04-22T17:50:05
| 257,970,632
| 0
| 0
|
Apache-2.0
| 2020-10-13T21:25:37
| 2020-04-22T17:21:46
|
Java
|
UTF-8
|
Java
| false
| false
| 8,120
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.axis2.transport.http;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMOutputFormat;
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.transport.MessageFormatter;
import org.apache.axis2.transport.http.util.ComplexPart;
import org.apache.axis2.transport.http.util.URLTemplatingUtil;
import org.apache.commons.httpclient.methods.multipart.Part;
import org.apache.commons.httpclient.methods.multipart.StringPart;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
/**
* Formates the request message as multipart/form-data. An example of this serialization is shown
* below which was extracted from the Web Services Description Language (WSDL) Version 2.0 Part 2: Adjuncts
* <p/>
* The following instance data of an input message:
* <p/>
* <data>
* <town>
* <name>Fréjus</name>
* <country>France</country>
* </town>
* <date>@@@@-@@-@@</date>
* </data>
* <p/>
* with the following operation element
* <p/>
* <operation ref='t:data'
* whttp:location='temperature'
* whttp:method='POST'
* whttp:inputSerialization='multipart/form-data'/>
* <p/>
* will serialize the message as follow:
* <p/>
* Content-Type: multipart/form-data; boundary=AaB03x
* Content-Length: xxx
* <p/>
* --AaB03x
* Content-Disposition: form-data; name="town"
* Content-Type: application/xml
* <p/>
* <town>
* <name>Fréjus</name>
* <country>France</country>
* </town>
* --AaB03x
* Content-Disposition: form-data; name="date"
* Content-Type: text/plain; charset=utf-8
*
* @@@@-@@-@@ --AaB03x--
*/
public class MultipartFormDataFormatter implements MessageFormatter {
/**
* @return a byte array of the message formatted according to the given
* message format.
*/
public byte[] getBytes(MessageContext messageContext, OMOutputFormat format) throws AxisFault {
OMElement omElement = messageContext.getEnvelope().getBody().getFirstElement();
Part[] parts = createMultipatFormDataRequest(omElement);
if (parts.length > 0) {
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
try {
// This is accessing a class of Commons-FlieUpload
Part.sendParts(bytesOut, parts, format.getMimeBoundary().getBytes());
} catch (IOException e) {
throw AxisFault.makeFault(e);
}
return bytesOut.toByteArray();
}
return new byte[0]; //To change body of implemented methods use File | Settings | File Templates.
}
/**
* To support deffered writing transports as in http chunking.. Axis2 was
* doing this for some time..
* <p/>
* Preserve flag can be used to preserve the envelope for later use. This is
* usefull when implementing authentication machnisms like NTLM.
*
* @param outputStream
* @param preserve :
* do not consume the OM when this is set..
*/
public void writeTo(MessageContext messageContext, OMOutputFormat format,
OutputStream outputStream, boolean preserve) throws AxisFault {
try {
byte[] b = getBytes(messageContext, format);
if (b != null && b.length > 0) {
outputStream.write(b);
} else {
outputStream.flush();
}
} catch (IOException e) {
throw new AxisFault("An error occured while writing the request");
}
}
/**
* Different message formats can set their own content types
* Eg: JSONFormatter can set the content type as application/json
*
* @param messageContext
* @param format
* @param soapAction
*/
public String getContentType(MessageContext messageContext, OMOutputFormat format,
String soapAction) {
String contentType = HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA;
String encoding = format.getCharSetEncoding();
if (encoding != null) {
contentType += "; charset=" + encoding;
}
contentType = contentType + "; " + "boundary=" + format.getMimeBoundary();
return contentType;
}
/**
* Some message formats may want to alter the target url.
*
* @return the target URL
*/
public URL getTargetAddress(MessageContext messageContext, OMOutputFormat format, URL targetURL)
throws AxisFault {
// Check whether there is a template in the URL, if so we have to replace then with data
// values and create a new target URL.
targetURL = URLTemplatingUtil.getTemplatedURL(targetURL, messageContext, false);
return targetURL;
}
/**
* @return this only if you want set a transport header for SOAP Action
*/
public String formatSOAPAction(MessageContext messageContext, OMOutputFormat format,
String soapAction) {
return soapAction;
}
/**
* @param dataOut
* @return
*/
private Part[] createMultipatFormDataRequest(OMElement dataOut) {
ArrayList parts = new ArrayList();
if (dataOut != null) {
Iterator iter1 = dataOut.getChildElements();
OMFactory omFactory = OMAbstractFactory.getOMFactory();
while (iter1.hasNext()) {
OMElement ele = (OMElement) iter1.next();
Iterator iter2 = ele.getChildElements();
// check whether the element is a complex type
if (iter2.hasNext()) {
OMElement omElement =
omFactory.createOMElement(ele.getQName().getLocalPart(), null);
omElement.addChild(
processComplexType(omElement, ele.getChildElements(), omFactory));
parts.add(new ComplexPart(ele.getQName().getLocalPart(), omElement.toString()));
} else {
parts.add(new StringPart(ele.getQName().getLocalPart(), ele.getText()));
}
}
}
Part[] partsArray = new Part[parts.size()];
return (Part[]) parts.toArray(partsArray);
}
/**
* @param parent
* @param iter
* @param omFactory
* @return
*/
private OMElement processComplexType(OMElement parent, Iterator iter, OMFactory omFactory) {
OMElement omElement = null;
while (iter.hasNext()) {
OMElement ele = (OMElement) iter.next();
omElement = omFactory.createOMElement(ele.getQName().getLocalPart(), null);
Iterator iter2 = ele.getChildElements();
if (iter2.hasNext()) {
parent.addChild(processComplexType(omElement, ele.getChildElements(), omFactory));
} else {
omElement = omFactory.createOMElement(ele.getQName().getLocalPart(), null);
omElement.setText(ele.getText());
parent.addChild(omElement);
}
}
return omElement;
}
}
|
[
"45187319+cranelab@users.noreply.github.com"
] |
45187319+cranelab@users.noreply.github.com
|
078dced31242a047a0b43459857ba0e572917d61
|
12b17568e3b89820018ac1d2366c55d662355ccf
|
/original/kanzi/src/main/java/kanzi/ColorModelType.java
|
9bf1c7bd3233c413177b452888868086c74501eb
|
[] |
no_license
|
miguelvelezmj25/performance-mapper-evaluation
|
0b086d60767250b9df7d89dfa70336b2e884af49
|
e8f42e1f9006826a79e65edae30d9aa906eb8a30
|
refs/heads/master
| 2023-08-18T04:36:38.878803
| 2021-10-20T13:47:54
| 2021-10-20T13:47:54
| 91,713,239
| 0
| 0
| null | 2021-01-15T15:33:51
| 2017-05-18T16:05:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,340
|
java
|
/*
Copyright 2011-2017 Frederic Langlet
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 kanzi;
public enum ColorModelType {
RGB(1), YUV444(2), YUV422(3), YUV420(4), YUV411(5), XYZ(6), LAB(7), GREY(8);
private final byte value;
private ColorModelType(int value) {
this.value = (byte) value;
}
@Override
public String toString() {
switch (this.value) {
case 2:
return "YUV_444";
case 3:
return "YUV_422";
case 4:
return "YUV_420";
case 5:
return "YUV_411";
case 6:
return "XYZ";
case 7:
return "LAB";
case 8:
return "GREY";
default:
return "RGB";
}
}
}
|
[
"miguelvelez@mijecu25.com"
] |
miguelvelez@mijecu25.com
|
61cdd42158d6b2f91c664512509463d6bd93f49a
|
d57ba57a9f3cc03c9f253646c400c43cc9bf7fef
|
/ch04/src/Ex4_006.java
|
689f75cc4a245cbc8014ba95c721f7f6b948cc9a
|
[] |
no_license
|
kimhalyn/Java_Home
|
5fdc00960f4d5df5d84caa8a3c1b6b844a4b2984
|
74120c30686109beab0552ddae0b91aa1551a11b
|
refs/heads/master
| 2023-06-12T22:30:41.672179
| 2021-07-05T17:39:04
| 2021-07-05T17:39:04
| 383,201,656
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,454
|
java
|
import java.util.Scanner;
/*
* 날짜: 2021/05/06
* 내용: 자바의 정석_조건문(switch문)
* 이름: 김하린
* switch문: 처리해야 하는 경우의 수가 많을 때 유용
* 제약조건이 존재함 - 조건식 결과는 정수 또는 문자열
* - case문의 값은 상수, 문자, 문자열 가능 (변수, 실수 불가)
* - case 중복 불가
* */
public class Ex4_006 {
public static void main(String[] args) {
System.out.printf("현재 월을 입력하세요.>");
Scanner scanner = new Scanner(System.in);
int month = scanner.nextInt();
switch (month) {
case 3:
case 4:
case 5:
System.out.println("현재 계절은 봄입니다.");
break;
case 6:
case 7:
case 8:
System.out.println("현재 계절은 여름입니다.");
break;
case 9:
case 10:
case 11:
System.out.println("현재 계절은 가을입니다.");
break;
default:
// case 12: case 1: case 2:
System.out.println("현재 계절은 겨울입니다.");
}
// switch문을 if문으로 작성
if (month == 3 || month == 4 || month == 5) {
System.out.println("현재는 봄입니다.");
} else if (month == 6 || month == 7 || month == 8) {
System.out.println("현재는 여름입니다.");
} else if (month == 9 || month == 10 || month == 11) {
System.out.println("현재는 가을입니다.");
} else {
System.out.println("현재는 겨울입니다.");
}
}
}
|
[
"reedweed@naver.com"
] |
reedweed@naver.com
|
644c8250eb62aa7ffdb616b53cbf8fd04efddfc6
|
39bef83f3a903f49344b907870feb10a3302e6e4
|
/Android Studio Projects/bf.io.openshop/src/com/google/gson/internal/ConstructorConstructor$2.java
|
446fe063aaa5d6c3ac20a8e409efcc953473202a
|
[] |
no_license
|
Killaker/Android
|
456acf38bc79030aff7610f5b7f5c1334a49f334
|
52a1a709a80778ec11b42dfe9dc1a4e755593812
|
refs/heads/master
| 2021-08-19T06:20:26.551947
| 2017-11-24T22:27:19
| 2017-11-24T22:27:19
| 111,960,738
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 381
|
java
|
package com.google.gson.internal;
import com.google.gson.*;
import java.lang.reflect.*;
class ConstructorConstructor$2 implements ObjectConstructor<T> {
final /* synthetic */ InstanceCreator val$rawTypeCreator;
final /* synthetic */ Type val$type;
@Override
public T construct() {
return this.val$rawTypeCreator.createInstance(this.val$type);
}
}
|
[
"ema1986ct@gmail.com"
] |
ema1986ct@gmail.com
|
7dfc098625b854203cfe17dda20d5978d39876c4
|
dc670f3e59a56627322276ae3f7e0be5b301ef42
|
/src/main/java/timesheet/TimeSheetItem.java
|
07d01cd778da88882ae3aa44933d1c979fc5694c
|
[] |
no_license
|
BirkasTivadar/training-solutions
|
d3241a1d33cbb7388366a59ec654d8cf809a9855
|
36c7a47c634e93b80b2440d99a18f90359085fa1
|
refs/heads/master
| 2023-04-30T03:00:06.395524
| 2021-05-16T09:15:48
| 2021-05-16T09:15:48
| 308,813,466
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,093
|
java
|
package timesheet;
import java.time.Duration;
import java.time.LocalDateTime;
import java.time.Month;
public class TimeSheetItem {
private Employee employee;
private Project project;
private LocalDateTime beginDate;
private LocalDateTime endDate;
public TimeSheetItem(Employee employee, Project project, LocalDateTime beginDate, LocalDateTime endDate) {
if (!beginDate.toLocalDate().equals(endDate.toLocalDate()) || beginDate.isAfter(endDate)) {
throw new IllegalArgumentException("Wrong begin or end date.");
}
this.employee = employee;
this.project = project;
this.beginDate = beginDate;
this.endDate = endDate;
}
public Employee getEmployee() {
return employee;
}
public Project getProject() {
return project;
}
public LocalDateTime getBeginDate() {
return beginDate;
}
public LocalDateTime getEndDate() {
return endDate;
}
public long hoursBetweenDates() {
return Duration.between(beginDate, endDate).toHours();
}
}
|
[
"birkastivadar@gmail.com"
] |
birkastivadar@gmail.com
|
1282e0b0ed9a8d25354c94afeafb379830182d16
|
228826bd500f2dfe3ee3864df411729c25d977e1
|
/spring-cloud-example/spring-cloud1/microservice-simple-consumer-movie/src/test/java/com/zhang/cloud/microservicesimpleconsumermovie/MicroserviceSimpleConsumerMovieApplicationTests.java
|
4ab57a69ef6f15afadb6d0c3a1d369b280c6eaf1
|
[] |
no_license
|
jack-zdl/spring-cloud
|
af77c688b9b71569465239d48337fa18e8767a40
|
802a1ed0ef397123181ab183b35f729ed170354e
|
refs/heads/master
| 2021-01-20T09:36:49.819289
| 2018-06-28T00:51:26
| 2018-06-28T00:51:26
| 90,262,017
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 389
|
java
|
package com.zhang.cloud.microservicesimpleconsumermovie;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class MicroserviceSimpleConsumerMovieApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"zhangdelei000@gmail.com"
] |
zhangdelei000@gmail.com
|
990c6df9f50d9dcf3a39d7977f6c037fabe4399e
|
6271d8401bb2d1574b7a2916e4f4e633e1470414
|
/examples/server/src/main/java/com/github/skjolber/nfc/external/StartServiceActivity.java
|
b1917e7e58ef1bffbc60ec3bccb93b9db74d0504
|
[
"Apache-2.0"
] |
permissive
|
skjolber/external-nfc-api
|
2321d127cf6641ec224322422d9e5a4d905aa8de
|
ade02a1c84470d5f3a9199d6d096e50c14d66d40
|
refs/heads/master
| 2022-03-05T12:56:58.194768
| 2022-02-16T16:49:48
| 2022-02-16T16:49:48
| 19,796,127
| 170
| 47
|
Apache-2.0
| 2020-08-02T22:54:17
| 2014-05-14T21:02:03
|
Java
|
UTF-8
|
Java
| false
| false
| 1,420
|
java
|
package com.github.skjolber.nfc.external;
import com.github.skjolber.nfc.service.BackgroundUsbService;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class StartServiceActivity extends Activity {
/**
* Called when the activity is first created.
*/
private String TAG = StartServiceActivity.class.getName();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(this, BackgroundUsbService.class);
intent.fillIn(getIntent(), 0); // TODO: Find better way to get extras for `UsbManager.getAccessory()` use?
startService(intent);
/*
Intent intent = new Intent();
intent.setClassName(BackgroundUsbService.class.getPackage().getName(), BackgroundUsbService.class.getName());
intent.fillIn(getIntent(), 0); // TODO: Find better way to get extras for `UsbManager.getAccessory()` use?
startService(intent);
*/
// See:
//
// <http://permalink.gmane.org/gmane.comp.handhelds.android.devel/154481> &
// <http://stackoverflow.com/questions/5567312/android-how-to-execute-main-fucntionality-of-project-only-by-clicking-on-the-ic/5567514#5567514>
//
// for combination of `Theme.NoDisplay` and `finish()` in `onCreate()`/`onResume()`.
//
finish();
}
}
|
[
"thomas.skjolberg@gmail.com"
] |
thomas.skjolberg@gmail.com
|
84e7e3511657591dbb3a80c7d6e554fd934600ee
|
096e862f59cf0d2acf0ce05578f913a148cc653d
|
/code/apps/ContactsCommon/src/com/android/contacts/common/list/ContactListFilterView.java
|
31c35d56dcb6f5b458d10c19b0ae8d7f46b7d420
|
[] |
no_license
|
Phenix-Collection/Android-6.0-packages
|
e2ba7f7950c5df258c86032f8fbdff42d2dfc26a
|
ac1a67c36f90013ac1de82309f84bd215d5fdca9
|
refs/heads/master
| 2021-10-10T20:52:24.087442
| 2017-05-27T05:52:42
| 2017-05-27T05:52:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,135
|
java
|
/*
* Copyright (C) 2012 The Android Open Source 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 com.android.contacts.common.list;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.TextView;
import com.android.contacts.common.R;
import com.android.contacts.common.model.AccountTypeManager;
import com.android.contacts.common.model.account.AccountType;
import com.sprd.android.config.OptConfig;
/**
* SPRD:
* @{
*/
import com.sprd.contacts.common.model.account.PhoneAccountType;
/**
* @}
*/
/**
* Contact list filter parameters.
*/
public class ContactListFilterView extends LinearLayout {
private static final String TAG = ContactListFilterView.class.getSimpleName();
private ImageView mIcon;
private TextView mAccountType;
private TextView mAccountUserName;
private RadioButton mRadioButton;
private ContactListFilter mFilter;
private boolean mSingleAccount;
public ContactListFilterView(Context context) {
super(context);
}
public ContactListFilterView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public void setContactListFilter(ContactListFilter filter) {
mFilter = filter;
}
public ContactListFilter getContactListFilter() {
return mFilter;
}
public void setSingleAccount(boolean flag) {
this.mSingleAccount = flag;
}
@Override
public void setActivated(boolean activated) {
super.setActivated(activated);
if (mRadioButton != null) {
mRadioButton.setChecked(activated);
} else {
// We're guarding against null-pointer exceptions,
// but otherwise this code is not expected to work
// properly if the button hasn't been initialized.
Log.wtf(TAG, "radio-button cannot be activated because it is null");
}
}
public void bindView(AccountTypeManager accountTypes) {
if (mAccountType == null) {
mIcon = (ImageView) findViewById(R.id.icon);
mAccountType = (TextView) findViewById(R.id.accountType);
mAccountUserName = (TextView) findViewById(R.id.accountUserName);
mRadioButton = (RadioButton) findViewById(R.id.radioButton);
mRadioButton.setChecked(isActivated());
}
if (mFilter == null) {
mAccountType.setText(R.string.contactsList);
return;
}
mAccountUserName.setVisibility(View.GONE);
switch (mFilter.filterType) {
case ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS: {
bindView(0, R.string.list_filter_all_accounts);
break;
}
case ContactListFilter.FILTER_TYPE_STARRED: {
bindView(R.drawable.ic_menu_star_holo_light, R.string.list_filter_all_starred);
break;
}
case ContactListFilter.FILTER_TYPE_CUSTOM: {
bindView(R.drawable.ic_menu_settings_holo_light, R.string.list_filter_customize);
break;
}
case ContactListFilter.FILTER_TYPE_WITH_PHONE_NUMBERS_ONLY: {
bindView(0, R.string.list_filter_phones);
break;
}
case ContactListFilter.FILTER_TYPE_SINGLE_CONTACT: {
bindView(0, R.string.list_filter_single);
break;
}
case ContactListFilter.FILTER_TYPE_ACCOUNT: {
mAccountUserName.setVisibility(View.VISIBLE);
mIcon.setVisibility(View.VISIBLE);
if (mFilter.icon != null) {
mIcon.setImageDrawable(mFilter.icon);
} else {
mIcon.setImageResource(R.drawable.unknown_source);
}
final AccountType accountType =
accountTypes.getAccountType(mFilter.accountType, mFilter.dataSet);
/*
* SPRD:Bug445978 DUT Shows Chinese character in Phone option in 'Contacts to display'.
*
* Original Android code:
mAccountUserName.setText(mFilter.accountName);
*
* @{
*/
if (PhoneAccountType.ACCOUNT_TYPE.equals(mFilter.accountType)) {
mAccountUserName.setText(getContext().getString(R.string.label_phone));
} else {
/*wangxing 20160628 modify for rename sim1 sim2 start @{ */
String s = mFilter.accountName;
s = s.replace("SIM1","Master Sim");
s = s.replace("SIM2","Slave Sim");
if(OptConfig.SUNVOV_CUSTOM_C7301_XLL_FWVGA){
mAccountUserName.setText(s);
}else{
mAccountUserName.setText(mFilter.accountName);
}
/*wangxing 20160628 modify for rename sim1 sim2 end @} */
}
/*
* @}
*/
mAccountType.setText(accountType.getDisplayLabel(getContext()));
break;
}
}
}
private void bindView(int iconResource, int textResource) {
if (iconResource != 0) {
mIcon.setVisibility(View.VISIBLE);
mIcon.setImageResource(iconResource);
} else {
mIcon.setVisibility(View.GONE);
}
mAccountType.setText(textResource);
}
}
|
[
"wangjicong6403660@126.com"
] |
wangjicong6403660@126.com
|
44c4688cd67d65ccd72629f6ad470912a36883ad
|
51bcd5f81f8ed19edd137866183fbdfb2abfa3c8
|
/src/main/java/com/era/easyretail/premium/IPremium.java
|
3e49750912e39f094fac9472c492fd9875d9b887
|
[] |
no_license
|
davidtadeovargas/era_easyretail
|
60edeb7c30468e596662e127c396a3d93948426b
|
2e19a1859c115bfa6574b2133e6a62ec9ed92d3e
|
refs/heads/master
| 2023-01-27T23:34:31.676476
| 2020-11-24T04:42:46
| 2020-11-24T04:42:46
| 245,110,215
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 309
|
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 com.era.easyretail.premium;
/**
*
* @author PC
*/
public interface IPremium {
public void validate();
}
|
[
"coritocorito@hotmail.com"
] |
coritocorito@hotmail.com
|
ae3c0dded975238b67db31963a40b595c2f0e148
|
c0b5c5431ec6905793ff762e39894ace49c422b5
|
/ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/ocsp/OCSPResp.java
|
a151f6a1de4486f9634879c6cef4e0a9b4f38f99
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
dzcoin/DzCoinClient
|
05bcb5d59bcfc7aa4d284ca518c99fa84b05e4bd
|
c5ecf6e76f39863d70d73260b75e23a91e984b75
|
refs/heads/master
| 2021-01-20T20:39:05.850228
| 2016-08-14T17:11:00
| 2016-08-14T17:11:00
| 65,677,585
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,984
|
java
|
package org.ripple.bouncycastle.ocsp;
import java.io.ioexception;
import java.io.inputstream;
import org.ripple.bouncycastle.asn1.asn1inputstream;
import org.ripple.bouncycastle.asn1.asn1primitive;
import org.ripple.bouncycastle.asn1.ocsp.basicocspresponse;
import org.ripple.bouncycastle.asn1.ocsp.ocspobjectidentifiers;
import org.ripple.bouncycastle.asn1.ocsp.ocspresponse;
import org.ripple.bouncycastle.asn1.ocsp.responsebytes;
/**
* @deprecated use classes in org.bouncycastle.cert.ocsp.
*/
public class ocspresp
{
private ocspresponse resp;
/**
* @deprecated use classes in org.bouncycastle.cert.ocsp.
*/
public ocspresp(
ocspresponse resp)
{
this.resp = resp;
}
/**
* @deprecated use classes in org.bouncycastle.cert.ocsp.
*/
public ocspresp(
byte[] resp)
throws ioexception
{
this(new asn1inputstream(resp));
}
/**
* @deprecated use classes in org.bouncycastle.cert.ocsp.
*/
public ocspresp(
inputstream in)
throws ioexception
{
this(new asn1inputstream(in));
}
private ocspresp(
asn1inputstream ain)
throws ioexception
{
try
{
this.resp = ocspresponse.getinstance(ain.readobject());
}
catch (illegalargumentexception e)
{
throw new ioexception("malformed response: " + e.getmessage());
}
catch (classcastexception e)
{
throw new ioexception("malformed response: " + e.getmessage());
}
}
public int getstatus()
{
return this.resp.getresponsestatus().getvalue().intvalue();
}
public object getresponseobject()
throws ocspexception
{
responsebytes rb = this.resp.getresponsebytes();
if (rb == null)
{
return null;
}
if (rb.getresponsetype().equals(ocspobjectidentifiers.id_pkix_ocsp_basic))
{
try
{
asn1primitive obj = asn1primitive.frombytearray(rb.getresponse().getoctets());
return new basicocspresp(basicocspresponse.getinstance(obj));
}
catch (exception e)
{
throw new ocspexception("problem decoding object: " + e, e);
}
}
return rb.getresponse();
}
/**
* return the asn.1 encoded representation of this object.
*/
public byte[] getencoded()
throws ioexception
{
return resp.getencoded();
}
public boolean equals(object o)
{
if (o == this)
{
return true;
}
if (!(o instanceof ocspresp))
{
return false;
}
ocspresp r = (ocspresp)o;
return resp.equals(r.resp);
}
public int hashcode()
{
return resp.hashcode();
}
}
|
[
"dzgrouphelp@foxmail.com"
] |
dzgrouphelp@foxmail.com
|
3b7faf576d78b902bcea0f9d2ffccd890cec5e71
|
7f9bcc3b689b8517ab01b01d74d7117f53ddd73a
|
/Pagination_Using_Spring/src/main/java/com/deepanshu/EmpDao.java
|
7bec878f7e8eca0225c9c6be61394fa610ec2db1
|
[] |
no_license
|
Deepanshuchauhan123/CRUD_Operations
|
4f6dc37b30ffa64a029b1bea299388e187b0550c
|
c808eb5f8150e85b6c1fe512bbe374b45007ba97
|
refs/heads/master
| 2023-02-04T03:11:56.114849
| 2020-12-24T11:40:44
| 2020-12-24T11:40:44
| 290,413,353
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 821
|
java
|
package com.deepanshu;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
public class EmpDao {
JdbcTemplate template;
public void setTemplate(JdbcTemplate template)
{
this.template=template;
}
public List<Emp> getEmployeeByPage(int pageid,int total)
{
String sql="select * from emp99 limit "+(pageid-1)+","+total;
return template.query(sql, new RowMapper<Emp>() {
public Emp mapRow(ResultSet rs, int row) throws SQLException {
Emp e=new Emp();
e.setId(rs.getInt(1));
e.setName(rs.getString(2));
e.setSalary(rs.getInt(3));
return e;
}
});
}
}
|
[
"deepanshuchauhan7287@gmail.com"
] |
deepanshuchauhan7287@gmail.com
|
b8db9a9bc9b94dc8cbe8fac2cc074b8fb486de71
|
6602ebf7ad0049bd8816aa3d4d7beb170084f505
|
/mybot-master/src/main/java/com/boot/lea/mybot/enums/GenderEnum.java
|
93f9557fd07a95a6fb2e429b975c063c6f67d83a
|
[] |
no_license
|
tgy616/framework
|
7115880fa6a42206806237f2c5a15ad035e870c9
|
ebe7a0c3453e05b6def806c8ce423e661f2cdad7
|
refs/heads/master
| 2022-12-21T22:44:09.670187
| 2020-10-24T06:08:49
| 2020-10-24T06:08:49
| 198,574,960
| 0
| 1
| null | 2022-12-16T15:17:05
| 2019-07-24T06:44:41
|
CSS
|
UTF-8
|
Java
| false
| false
| 498
|
java
|
package com.boot.lea.mybot.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author LiJing
* @ClassName: GenderEnum
* @Description: 性别枚举
* @date 2019/5/21 16:48
*/
@Getter
@AllArgsConstructor
public enum GenderEnum {
/**
* 预约人 性别:0 未知保密, 1 先生 2 女士
*/
GENDER_SECRECY(0, "未知|保密"),
GENDER_MALE(1, "先生,男性"),
GENDER_FEMALE(2, "女士,女性"),;
private Integer code;
private String msg;
}
|
[
"418982690@qq.com"
] |
418982690@qq.com
|
a331553d81b0c2a059034caf473e8c698228a2b5
|
5272ea9b2c0679a5ba5ef4b7cabcf75a30634ee2
|
/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageMethodArgumentResolver.java
|
86cb58cf4098049c17746e3aea1e06573aad7094
|
[
"Apache-2.0"
] |
permissive
|
whvixd/spring4-note
|
ad3fa3a79fc0a23b8f6bc5e27770b3eaa09c0593
|
1f37db9f25bdadb09f417ce84f6266921c308dee
|
refs/heads/master
| 2022-12-30T16:36:20.729963
| 2020-10-21T03:47:10
| 2020-10-21T03:47:10
| 269,893,579
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,739
|
java
|
/*
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.messaging.handler.annotation.support;
import java.lang.reflect.Type;
import org.springframework.core.MethodParameter;
import org.springframework.core.ResolvableType;
import org.springframework.messaging.Message;
import org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver;
import org.springframework.util.ClassUtils;
/**
* A {@link HandlerMethodArgumentResolver} for {@link Message} parameters.
* Validates that the generic type of the payload matches with the message value.
*
* @author Rossen Stoyanchev
* @author Stephane Nicoll
* @since 4.0
*/
public class MessageMethodArgumentResolver implements HandlerMethodArgumentResolver {
@Override
public boolean supportsParameter(MethodParameter parameter) {
return Message.class.isAssignableFrom(parameter.getParameterType());
}
@Override
public Object resolveArgument(MethodParameter parameter, Message<?> message) throws Exception {
Class<?> paramType = parameter.getParameterType();
if (!paramType.isAssignableFrom(message.getClass())) {
throw new MethodArgumentTypeMismatchException(message, parameter,
"The actual message type [" + ClassUtils.getQualifiedName(message.getClass()) + "] " +
"does not match the expected type [" + ClassUtils.getQualifiedName(paramType) + "]");
}
Class<?> expectedPayloadType = getPayloadType(parameter);
Object payload = message.getPayload();
if (payload != null && expectedPayloadType != null && !expectedPayloadType.isInstance(payload)) {
throw new MethodArgumentTypeMismatchException(message, parameter,
"The expected Message<?> payload type [" + ClassUtils.getQualifiedName(expectedPayloadType) +
"] does not match the actual payload type [" + ClassUtils.getQualifiedName(payload.getClass()) + "]");
}
return message;
}
private Class<?> getPayloadType(MethodParameter parameter) {
Type genericParamType = parameter.getGenericParameterType();
ResolvableType resolvableType = ResolvableType.forType(genericParamType).as(Message.class);
return resolvableType.getGeneric(0).resolve(Object.class);
}
}
|
[
"wangzhx@fxiaoke.com"
] |
wangzhx@fxiaoke.com
|
139249a6ff224023a5747835ec8d8ca9ce3bcbcf
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava0/Foo368Test.java
|
5e67ac746e0e80502ba79f05a0a4686ef77bc203
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 741
|
java
|
package applicationModulepackageJava0;
import org.junit.Test;
public class Foo368Test {
@Test
public void testFoo0() {
new Foo368().foo0();
}
@Test
public void testFoo1() {
new Foo368().foo1();
}
@Test
public void testFoo2() {
new Foo368().foo2();
}
@Test
public void testFoo3() {
new Foo368().foo3();
}
@Test
public void testFoo4() {
new Foo368().foo4();
}
@Test
public void testFoo5() {
new Foo368().foo5();
}
@Test
public void testFoo6() {
new Foo368().foo6();
}
@Test
public void testFoo7() {
new Foo368().foo7();
}
@Test
public void testFoo8() {
new Foo368().foo8();
}
@Test
public void testFoo9() {
new Foo368().foo9();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
c4c280fe39a8bb2068d92292effd88e0cf4f7421
|
e977c424543422f49a25695665eb85bfc0700784
|
/benchmark/bugsjar/jackrabbit-oak/2b5d3afb/buggy-version/oak-core/src/main/java/org/apache/jackrabbit/oak/query/fulltext/FullTextTerm.java
|
2d33a2964c2c34f9cb234ad57ddaac6bde30fe3c
|
[] |
no_license
|
amir9979/pattern-detector-experiment
|
17fcb8934cef379fb96002450d11fac62e002dd3
|
db67691e536e1550245e76d7d1c8dced181df496
|
refs/heads/master
| 2022-02-18T10:24:32.235975
| 2019-09-13T15:42:55
| 2019-09-13T15:42:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,642
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.jackrabbit.oak.query.fulltext;
/**
* A fulltext term, or a "not" term.
*/
public class FullTextTerm extends FullTextExpression {
private final boolean not;
private final String propertyName;
private final String text;
private final String filteredText;
private final String boost;
private final LikePattern like;
public FullTextTerm(String propertyName, FullTextTerm copy) {
this.propertyName = propertyName;
this.not = copy.not;
this.text = copy.text;
this.filteredText = copy.filteredText;
this.boost = copy.boost;
this.like = copy.like;
}
public FullTextTerm(String propertyName, String text, boolean not, boolean escaped, String boost) {
this.propertyName = propertyName;
this.text = text;
this.not = not;
this.boost = boost;
// for testFulltextIntercapSQL
// filter special characters such as '
// to make tests pass, for example the
// FulltextQueryTest.testFulltextExcludeSQL,
// which searches for:
// "text ''fox jumps'' -other"
// (please note the two single quotes instead of
// double quotes before for and after jumps)
boolean pattern = false;
if (escaped) {
filteredText = text;
} else {
StringBuilder buff = new StringBuilder();
for (int i = 0; i < text.length(); i++) {
char c = text.charAt(i);
if (c == '*') {
buff.append('%');
pattern = true;
} else if (c == '?') {
buff.append('_');
pattern = true;
} else if (c == '_') {
buff.append("\\_");
pattern = true;
} else if (Character.isLetterOrDigit(c) || " +-:&".indexOf(c) >= 0) {
buff.append(c);
}
}
this.filteredText = buff.toString().toLowerCase();
}
if (pattern) {
like = new LikePattern("%" + filteredText + "%");
} else {
like = null;
}
}
@Override
public boolean evaluate(String value) {
// toLowerCase for testFulltextIntercapSQL
value = value.toLowerCase();
if (like != null) {
return like.matches(value);
}
if (not) {
return value.indexOf(filteredText) < 0;
}
return value.indexOf(filteredText) >= 0;
}
@Override
public
FullTextExpression simplify() {
return this;
}
@Override
public String toString() {
StringBuilder buff = new StringBuilder();
if (not) {
buff.append('-');
}
if (propertyName != null && !"*".equals(propertyName)) {
buff.append(propertyName).append(':');
}
buff.append('\"');
for (int i = 0; i < text.length(); i++) {
char c = text.charAt(i);
if (c == '\\') {
buff.append(c);
} else if (c == '\"') {
buff.append('\\');
}
buff.append(c);
}
buff.append('\"');
if (boost != null) {
buff.append('^').append(boost);
}
return buff.toString();
}
public String getPropertyName() {
return propertyName;
}
public String getBoost() {
return boost;
}
public boolean isNot() {
return not;
}
public String getText() {
return text;
}
@Override
public int getPrecedence() {
return PRECEDENCE_TERM;
}
@Override
public boolean accept(FullTextVisitor v) {
return v.visit(this);
}
}
|
[
"durieuxthomas@hotmail.com"
] |
durieuxthomas@hotmail.com
|
b155d3ca305c967a235c6185f578afe2c61dba97
|
d71e879b3517cf4fccde29f7bf82cff69856cfcd
|
/ExtractedJars/iRobot_com.irobot.home/javafiles/com/google/android/gms/internal/measurement/zzuo$zzc.java
|
40a9001ef1f41cc735f6574ab4b9d788c5756ef3
|
[
"MIT"
] |
permissive
|
Andreas237/AndroidPolicyAutomation
|
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
|
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
|
refs/heads/master
| 2020-04-10T02:14:08.789751
| 2019-05-16T19:29:11
| 2019-05-16T19:29:11
| 160,739,088
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 730
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.google.android.gms.internal.measurement;
// Referenced classes of package com.google.android.gms.internal.measurement:
// zzuo, zzvx, zzuf
public static abstract class zzuo$zzc extends zzuo
implements zzvx
{
protected zzuf zzbyl;
public zzuo$zzc()
{
// 0 0:aload_0
// 1 1:invokespecial #15 <Method void zzuo()>
zzbyl = zzuf.zzvw();
// 2 4:aload_0
// 3 5:invokestatic #21 <Method zzuf zzuf.zzvw()>
// 4 8:putfield #23 <Field zzuf zzbyl>
// 5 11:return
}
}
|
[
"silenta237@gmail.com"
] |
silenta237@gmail.com
|
50f9ee08a8b44761408a413cd3f058e871927935
|
ca957060b411c88be41dfbf5dffa1fea2744f4a5
|
/src/org/sosy_lab/cpachecker/util/predicates/smt/FunctionFormulaManagerView.java
|
f2f90be8263dc7861c4d1f14b2c0936684258590
|
[
"Apache-2.0"
] |
permissive
|
45258E9F/IntPTI
|
62f705f539038f9457c818d515c81bf4621d7c85
|
e5dda55aafa2da3d977a9a62ad0857746dae3fe1
|
refs/heads/master
| 2020-12-30T14:34:30.174963
| 2018-06-01T07:32:07
| 2018-06-01T07:32:07
| 91,068,091
| 4
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,109
|
java
|
/*
* IntPTI: integer error fixing by proper-type inference
* Copyright (c) 2017.
*
* Open-source component:
*
* CPAchecker
* Copyright (C) 2007-2014 Dirk Beyer
*
* Guava: Google Core Libraries for Java
* Copyright (C) 2010-2006 Google
*
*
*/
package org.sosy_lab.cpachecker.util.predicates.smt;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.FluentIterable.from;
import com.google.common.base.Function;
import org.sosy_lab.solver.api.Formula;
import org.sosy_lab.solver.api.FormulaType;
import org.sosy_lab.solver.api.FunctionDeclaration;
import org.sosy_lab.solver.api.FunctionDeclarationKind;
import org.sosy_lab.solver.api.UFManager;
import java.util.Arrays;
import java.util.List;
public class FunctionFormulaManagerView extends BaseManagerView implements UFManager {
private final UFManager manager;
FunctionFormulaManagerView(
FormulaWrappingHandler pWrappingHandler,
UFManager pManager) {
super(pWrappingHandler);
this.manager = pManager;
}
private static class ReplaceUninterpretedFunctionDeclaration<T extends Formula> implements
FunctionDeclaration<T> {
private final FunctionDeclaration<?> wrapped;
private final FormulaType<T> returnType;
private final List<FormulaType<?>> argumentTypes;
ReplaceUninterpretedFunctionDeclaration(
FunctionDeclaration<?> wrapped,
FormulaType<T> pReturnType,
List<FormulaType<?>> pArgumentTypes) {
this.wrapped = checkNotNull(wrapped);
returnType = pReturnType;
argumentTypes = pArgumentTypes;
}
@Override
public int hashCode() {
return 17 + wrapped.hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ReplaceUninterpretedFunctionDeclaration)) {
return false;
}
ReplaceUninterpretedFunctionDeclaration<?> other =
(ReplaceUninterpretedFunctionDeclaration<?>) obj;
return wrapped.equals(other.wrapped);
}
@Override
public FunctionDeclarationKind getKind() {
return FunctionDeclarationKind.UF;
}
@Override
public String getName() {
return wrapped.getName();
}
@Override
public FormulaType<T> getType() {
return returnType;
}
@Override
public List<FormulaType<?>> getArgumentTypes() {
return argumentTypes;
}
@Override
public String toString() {
return String.format("ReplacementUF(%s :: %s --> %s)",
wrapped, argumentTypes, returnType);
}
}
@Override
public <T extends Formula> FunctionDeclaration<T> declareUF(
String pName, FormulaType<T> pReturnType, List<FormulaType<?>> pArgs) {
List<FormulaType<?>> newArgs = unwrapType(pArgs);
FormulaType<?> ret = unwrapType(pReturnType);
FunctionDeclaration<?> func = manager.declareUF(pName, ret, newArgs);
return new ReplaceUninterpretedFunctionDeclaration<>(func, pReturnType, pArgs);
}
@Override
public <T extends Formula> FunctionDeclaration<T> declareUF(
String pName, FormulaType<T> pReturnType, FormulaType<?>... pArgs) {
return declareUF(pName, pReturnType, Arrays.asList(pArgs));
}
public <T extends Formula> T declareAndCallUninterpretedFunction(
String pName, int idx, FormulaType<T> pReturnType, List<Formula> pArgs) {
String name = FormulaManagerView.makeName(pName, idx);
return declareAndCallUF(name, pReturnType, pArgs);
}
public <T extends Formula> T declareAndCallUninterpretedFunction(
String pName, int pIdx, FormulaType<T> pReturnType, Formula... pArgs) {
return declareAndCallUninterpretedFunction(pName, pIdx, pReturnType, Arrays.asList(pArgs));
}
@Override
public <T extends Formula> T declareAndCallUF(
String name, FormulaType<T> pReturnType, List<Formula> pArgs) {
List<FormulaType<?>> argTypes = from(pArgs).
transform(
new Function<Formula, FormulaType<?>>() {
@Override
public FormulaType<?> apply(Formula pArg0) {
return getFormulaType(pArg0);
}
}).toList();
FunctionDeclaration<T> func = declareUF(name, pReturnType, argTypes);
return callUF(func, pArgs);
}
public <T extends Formula> T declareAndCallUF(
String pName, FormulaType<T> pReturnType, Formula... pArgs) {
return declareAndCallUF(pName, pReturnType, Arrays.asList(pArgs));
}
@Override
public <T extends Formula> T callUF(
FunctionDeclaration<T> pFuncType, List<? extends Formula> pArgs) {
ReplaceUninterpretedFunctionDeclaration<T> rep =
(ReplaceUninterpretedFunctionDeclaration<T>) pFuncType;
Formula f = manager.callUF(rep.wrapped, unwrap(pArgs));
return wrap(pFuncType.getType(), f);
}
@Override
public <T extends Formula> T callUF(
FunctionDeclaration<T> pFuncType, Formula... pArgs) {
return callUF(pFuncType, Arrays.asList(pArgs));
}
}
|
[
"chengxi09@gmail.com"
] |
chengxi09@gmail.com
|
ecf7900c020361b8b36abd1ddb40818727cedfa8
|
c3445da9eff3501684f1e22dd8709d01ff414a15
|
/LIS/sinosoft-parents/lis-business/src/main/java_schema/com/sinosoft/lis/vschema/LoBonusRiskRemSet.java
|
41e3e1f658a77c8eea0aa10d5d3181c1800317ad
|
[] |
no_license
|
zhanght86/HSBC20171018
|
954403d25d24854dd426fa9224dfb578567ac212
|
c1095c58c0bdfa9d79668db9be4a250dd3f418c5
|
refs/heads/master
| 2021-05-07T03:30:31.905582
| 2017-11-08T08:54:46
| 2017-11-08T08:54:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,471
|
java
|
/**
* Copyright (c) 2002 sinosoft Co. Ltd.
* All right reserved.
*/
package com.sinosoft.lis.vschema;
import org.apache.log4j.Logger;
import com.sinosoft.lis.schema.LoBonusRiskRemSchema;
import com.sinosoft.utility.*;
/*
* <p>ClassName: LoBonusRiskRemSet </p>
* <p>Description: LoBonusRiskRemSchemaSet类文件 </p>
* <p>Copyright: Copyright (c) 2007</p>
* <p>Company: sinosoft </p>
* @Database: 分红管理
*/
public class LoBonusRiskRemSet extends SchemaSet
{
private static Logger logger = Logger.getLogger(LoBonusRiskRemSet.class);
// @Method
public boolean add(LoBonusRiskRemSchema aSchema)
{
return super.add(aSchema);
}
public boolean add(LoBonusRiskRemSet aSet)
{
return super.add(aSet);
}
public boolean remove(LoBonusRiskRemSchema aSchema)
{
return super.remove(aSchema);
}
public LoBonusRiskRemSchema get(int index)
{
LoBonusRiskRemSchema tSchema = (LoBonusRiskRemSchema)super.getObj(index);
return tSchema;
}
public boolean set(int index, LoBonusRiskRemSchema aSchema)
{
return super.set(index,aSchema);
}
public boolean set(LoBonusRiskRemSet aSet)
{
return super.set(aSet);
}
/**
* 数据打包,按 XML 格式打包,顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLoBonusRiskRem描述/A>表字段
* @return: String 返回打包后字符串
**/
public String encode()
{
StringBuffer strReturn = new StringBuffer("");
int n = this.size();
for (int i = 1; i <= n; i++)
{
LoBonusRiskRemSchema aSchema = this.get(i);
strReturn.append(aSchema.encode());
if( i != n ) strReturn.append(SysConst.RECORDSPLITER);
}
return strReturn.toString();
}
/**
* 数据解包
* @param: str String 打包后字符串
* @return: boolean
**/
public boolean decode( String str )
{
int nBeginPos = 0;
int nEndPos = str.indexOf('^');
this.clear();
while( nEndPos != -1 )
{
LoBonusRiskRemSchema aSchema = new LoBonusRiskRemSchema();
if(aSchema.decode(str.substring(nBeginPos, nEndPos)))
{
this.add(aSchema);
nBeginPos = nEndPos + 1;
nEndPos = str.indexOf('^', nEndPos + 1);
}
else
{
// @@错误处理
this.mErrors.copyAllErrors( aSchema.mErrors );
return false;
}
}
LoBonusRiskRemSchema tSchema = new LoBonusRiskRemSchema();
if(tSchema.decode(str.substring(nBeginPos)))
{
this.add(tSchema);
return true;
}
else
{
// @@错误处理
this.mErrors.copyAllErrors( tSchema.mErrors );
return false;
}
}
}
|
[
"dingzansh@sinosoft.com.cn"
] |
dingzansh@sinosoft.com.cn
|
0365bc20ea5c3b1054847a153bea50c3fa3bb491
|
d7a815b9ce15e5f5e8290b112bc5bfef80a8eba7
|
/redisson/src/main/java/org/redisson/api/RRingBufferReactive.java
|
e2575f22239e000f23a288ce2b36b0a04bcd0cdb
|
[
"LicenseRef-scancode-dco-1.1",
"Apache-2.0"
] |
permissive
|
fugithubs/redisson
|
9f397dfafb5f8c10733b20dd5771b8b728ace4f3
|
0d3579a2a822b5a8a460b7c8b0c79ee72e728944
|
refs/heads/master
| 2020-11-25T19:26:54.567343
| 2019-12-18T08:39:12
| 2019-12-18T08:39:12
| 228,811,293
| 1
| 0
|
Apache-2.0
| 2019-12-18T10:03:27
| 2019-12-18T10:03:26
| null |
UTF-8
|
Java
| false
| false
| 1,637
|
java
|
/**
* Copyright (c) 2013-2019 Nikita Koksharov
*
* 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.redisson.api;
import reactor.core.publisher.Mono;
/**
* RingBuffer based queue evicts elements from the head if queue capacity became full.
* <p>
* The head element removed if new element added and queue is full.
* <p>
* Must be initialized with capacity size {@link #trySetCapacity(int)} before usage.
*
* @author Nikita Koksharov
*
* @param <V> value type
*/
public interface RRingBufferReactive<V> extends RQueueReactive<V> {
/**
* Sets queue capacity only if it is not set before.
*
* @param capacity - queue capacity
* @return <code>true</code> if capacity set successfully
* <code>false</code> if capacity already set
*/
Mono<Boolean> trySetCapacity(int capacity);
/**
* Returns remaining capacity of this queue
*
* @return remaining capacity
*/
Mono<Integer> remainingCapacity();
/**
* Returns capacity of this queue
*
* @return queue capacity
*/
Mono<Integer> capacity();
}
|
[
"nkoksharov@redisson.pro"
] |
nkoksharov@redisson.pro
|
47ac233e302e159d46ea0f048e080c448c89fa0d
|
9371ae6ec24ad4b9914a43e64befb915d71e34f2
|
/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/android/media/audiofx/Visualizer.java
|
6ebd1f08ed897728c4903ff920098f9e75cb41d9
|
[] |
no_license
|
kanaida/LG-Esteem-Homeless-Kernel
|
9fac4c52993798eaf3021d9abb72a5e697464398
|
a5780f82bef7631fdb43b079e6f9ea6dbd187ac7
|
refs/heads/master
| 2020-06-09T06:14:50.214296
| 2012-02-24T04:23:01
| 2012-02-24T04:23:01
| 3,532,548
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,167
|
java
|
package android.media.audiofx;
public class Visualizer
{
public static interface OnDataCaptureListener
{
public abstract void onWaveFormDataCapture(android.media.audiofx.Visualizer visualizer, byte[] waveform, int samplingRate);
public abstract void onFftDataCapture(android.media.audiofx.Visualizer visualizer, byte[] fft, int samplingRate);
}
public Visualizer(int audioSession) throws java.lang.UnsupportedOperationException, java.lang.RuntimeException { throw new RuntimeException("Stub!"); }
public void release() { throw new RuntimeException("Stub!"); }
protected void finalize() { throw new RuntimeException("Stub!"); }
public int setEnabled(boolean enabled) throws java.lang.IllegalStateException { throw new RuntimeException("Stub!"); }
public boolean getEnabled() { throw new RuntimeException("Stub!"); }
public static native int[] getCaptureSizeRange();
public static native int getMaxCaptureRate();
public int setCaptureSize(int size) throws java.lang.IllegalStateException { throw new RuntimeException("Stub!"); }
public int getCaptureSize() throws java.lang.IllegalStateException { throw new RuntimeException("Stub!"); }
public int getSamplingRate() throws java.lang.IllegalStateException { throw new RuntimeException("Stub!"); }
public int getWaveForm(byte[] waveform) throws java.lang.IllegalStateException { throw new RuntimeException("Stub!"); }
public int getFft(byte[] fft) throws java.lang.IllegalStateException { throw new RuntimeException("Stub!"); }
public int setDataCaptureListener(android.media.audiofx.Visualizer.OnDataCaptureListener listener, int rate, boolean waveform, boolean fft) { throw new RuntimeException("Stub!"); }
public static final int STATE_UNINITIALIZED = 0;
public static final int STATE_INITIALIZED = 1;
public static final int STATE_ENABLED = 2;
public static final int SUCCESS = 0;
public static final int ERROR = -1;
public static final int ALREADY_EXISTS = -2;
public static final int ERROR_NO_INIT = -3;
public static final int ERROR_BAD_VALUE = -4;
public static final int ERROR_INVALID_OPERATION = -5;
public static final int ERROR_NO_MEMORY = -6;
public static final int ERROR_DEAD_OBJECT = -7;
}
|
[
"kanaida.bat@gmail.com"
] |
kanaida.bat@gmail.com
|
d5c810c86f09b568a2d42b39dda0a3a61a00374b
|
ef8a143893beaaa90f9287133880e90ea7d2aaaa
|
/Perestroika-Problem/src/main/java/cz/cuni/mff/perestroika/perestroika_problem_5_3_0_3_0_3_8/Goal.java
|
e41f59945ef7afed06f1a14a6d65c060a16e1d76
|
[
"MIT"
] |
permissive
|
martinpilat/jPDDL
|
fb976ae66b248eaa021b8662f300829ef9bdb198
|
c5e8389cccc9707b387de41298ae51983908a3f6
|
refs/heads/master
| 2021-06-13T18:41:14.994546
| 2021-03-26T15:55:23
| 2021-03-26T15:55:23
| 155,592,082
| 0
| 0
|
MIT
| 2018-10-31T16:46:57
| 2018-10-31T16:46:57
| null |
UTF-8
|
Java
| false
| false
| 3,106
|
java
|
package cz.cuni.mff.perestroika.perestroika_problem_5_3_0_3_0_3_8;
import cz.cuni.mff.jpddl.PDDLGoal;
import cz.cuni.mff.jpddl.PDDLState;
import cz.cuni.mff.perestroika.domain.State;
public class Goal extends PDDLGoal {
@Override
public String toPDDL() {
return "(:goal (and (alive)\n"
+ " (taken r1)\n"
+ " (taken r2)\n"
+ " (taken r3)\n"
+ " (taken r4)\n"
+ " (taken r5)\n"
+ " (taken r6)\n"
+ " )\n"
+ ")";
}
/**
* Whether the goal has been achieved in 'state'.
*
* GOAL
*
* :goal (and (alive r1)
* (taken r1)
* (taken r2)
* (taken r3)
* (taken r4)
* )
*
* @param state
* @return
*/
public boolean isAchieved(State state) {
return state.p_Alive.isSet()
&& state.p_Taken.isSet(E_Resources.r1)
&& state.p_Taken.isSet(E_Resources.r2)
&& state.p_Taken.isSet(E_Resources.r3)
&& state.p_Taken.isSet(E_Resources.r4)
&& state.p_Taken.isSet(E_Resources.r5)
&& state.p_Taken.isSet(E_Resources.r6);
}
public boolean isAchievedAll(State... states) {
for (State state : states) {
if (!isAchieved(state)) return false;
}
return true;
}
public boolean isAchievedUnion(State... states) {
boolean achieved;
achieved = false;
for (State state : states) {
if (achieved = state.p_Alive.isSet()) break;
}
if (!achieved) return false;
achieved = false;
for (State state : states) {
if (achieved = state.p_Taken.isSet(E_Resources.r1)) break;
}
if (!achieved) return false;
achieved = false;
for (State state : states) {
if (achieved = state.p_Taken.isSet(E_Resources.r2)) break;
}
if (!achieved) return false;
achieved = false;
for (State state : states) {
if (achieved = state.p_Taken.isSet(E_Resources.r3)) break;
}
if (!achieved) return false;
achieved = false;
for (State state : states) {
if (achieved = state.p_Taken.isSet(E_Resources.r4)) break;
}
if (!achieved) return false;
achieved = false;
for (State state : states) {
if (achieved = state.p_Taken.isSet(E_Resources.r5)) break;
}
if (!achieved) return false;
achieved = false;
for (State state : states) {
if (achieved = state.p_Taken.isSet(E_Resources.r6)) break;
}
if (!achieved) return false;
return true;
}
public boolean isAchievedAny(State... states) {
for (State state : states) {
if (isAchieved(state)) return true;
}
return false;
}
// ========================
// PDDLGoal Generic Methods
// ========================
@Override
public boolean isAchieved(PDDLState state) {
return isAchieved((State)state);
}
@Override
public boolean isAchievedAll(PDDLState... states) {
return isAchievedAll((State[])states);
}
@Override
public boolean isAchievedUnion(PDDLState... states) {
return isAchievedUnion((State[])states);
}
@Override
public boolean isAchievedAny(PDDLState... states) {
return isAchievedAny((State[])states);
}
}
|
[
"martin.pilat@gmail.com"
] |
martin.pilat@gmail.com
|
c30bec24bcece3332118f771daddb8e92f865eb5
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/17/17_57a5ab40e3a6cfeba8cddb708097b4ebf2c0b7ed/Import/17_57a5ab40e3a6cfeba8cddb708097b4ebf2c0b7ed_Import_s.java
|
8bb7ce32429de350e055a9f967447a05b5f15804
|
[] |
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
| 289
|
java
|
package net.sf.beezle.jasmin.scss;
import net.sf.beezle.sushi.util.Strings;
public class Import {
private final String[] mediaList;
public Import(String mediaListHead, String[] mediaListTail) {
this.mediaList = Strings.cons(mediaListHead, mediaListTail);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
2b4af12856b9205edc2b457b2571db520ddf8b6e
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-418-1-25-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/doc/DefaultDocumentAccessBridge_ESTest_scaffolding.java
|
450ea00946e087154e099ef92b332e62daddf418
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 449
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Apr 08 05:18:42 UTC 2020
*/
package com.xpn.xwiki.doc;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class DefaultDocumentAccessBridge_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
2ba938f714a52b2e13f8db64c193f3bde8bb18d8
|
6fb2e562e0d451de37e99efc398282cbf9aae3d5
|
/src/util/HttpUtil.java
|
ff1dd6cd16f4e15bbbe5ddd0637f6ebcee546503
|
[] |
no_license
|
zhangpengchengN1/BaseSSM
|
a9f0ccf8805a1e72744c96f215010ca53687fdf1
|
867c9961226da8f591d153626f0243d85145b173
|
refs/heads/master
| 2020-05-01T02:48:45.668580
| 2019-03-22T09:04:40
| 2019-03-22T09:04:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,080
|
java
|
package util;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.URI;
import java.net.URLEncoder;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.log4j.Logger;
/**
* Http tools for: http get http post with encode stream userAgent
*
*
*/
public class HttpUtil {
private static Logger log = Logger.getLogger("Http");
private final static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36";
private final static String DEFAULT_ENCODE = "utf-8";
public static String encode(String str) throws Exception {
return URLEncoder.encode(str, "utf-8").replaceAll("\\+", "%20");
}
public static String get(String url, Map<?, ?> data) throws Exception {
url = url + "?";
StringBuilder ddd = new StringBuilder();
for (Object key : data.keySet()) {
String str = data.get(key) == null ? "null" : data.get(key).toString();
ddd.append(key).append("=").append(encode(str)).append("&");
}
if(ddd.length() > 0){
ddd.setLength(ddd.length() - 1);
}
// ddd = encode(ddd);
// ddd = URLEncoder.encode(ddd);
url = url + ddd.toString();
return get(url, "utf-8");
}
public static String get(String url) throws Exception {
return get(url, "utf-8");
}
public static String post(String url, List<?> listBean) throws Exception {
return post(url, listBean, "utf-8", null);
}
public static String post(String url, Map<?, ?> bean) throws Exception {
return post(url, bean, "utf-8", null);
}
public static String post(String url, String data) throws Exception {
return post(url, data, "utf-8", null);
}
public static String post(String url, Map<?, ?> bean, String encode, String userAgent) throws Exception {
return post(url, JsonUtil.makeJson(bean), encode, userAgent);
}
public static String post(String url, List<?> bean, String encode, String userAgent) throws Exception {
return post(url, JsonUtil.makeJson(bean), encode, userAgent);
}
/**
* 解析httpResponse的数据体
*/
private static String getResponseData(HttpResponse response, String charset) throws Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream();
InputStream is = null;
try {
is = response.getEntity().getContent();
IOUtils.copy(is, out);
return new String(out.toByteArray(), charset);
} finally {
IOUtils.closeQuietly(out);
IOUtils.closeQuietly(is);
}
}
/**
* 创建新的浏览器端httpClient
*/
private static HttpClient makeHttpClient(){
//创造HttpClient浏览器端
BasicHttpParams httpParameters = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpParameters, 10000);// 连接超时
HttpConnectionParams.setSoTimeout(httpParameters, 300000);//
HttpClient client = new DefaultHttpClient(httpParameters);
client.getParams().setIntParameter("http.socket.timeout", 15000);
return client;
}
/**
* httpClient连接池
*/
private static Map<String, HttpClient> mapClient;
static{
mapClient = new HashMap<String, HttpClient>();
}
/**
* 获取一个浏览器端httpClient 单例 或者 连接池控制
*
* @param name null or '' 则每次返回一个新浏览器 否则缓存返回历史的同名浏览器
*/
public static HttpClient getClient(String name){
HttpClient client = null;
if(name == null || name.length() == 0){
client = makeHttpClient();
}else if(mapClient.containsKey(name)){
client = (HttpClient) mapClient.get(name);
}else{
client = makeHttpClient();
mapClient.put(name, client); //加入缓存
}
return client;
}
/**
* 获取新的浏览器httpClient
* @return
*/
public static HttpClient getClient(){
return getClient("");
}
public static String post(String url, String data, String encode, String userAgent) throws Exception {
//默认header 编码处理
userAgent = userAgent == null || userAgent.length() == 0 ? DEFAULT_USER_AGENT : userAgent;
encode = encode == null || encode.length() == 0 ? DEFAULT_ENCODE : encode;
log.info(Arrays.toString(new String[] { "dopost", url, data, encode, userAgent }));
HttpClient client = getClient();
//创造post请求 参数
HttpPost httpPost = new HttpPost(new URI(url));
httpPost.setEntity(new StringEntity(data, encode));
httpPost.setHeader("User-Agent", userAgent);
httpPost.setHeader("Keep-Alive", "15000");
HttpResponse response = null;
try{
response = client.execute(httpPost);
}catch(Exception e){
log.info("post error " + e.toString());
throw e;
}
String res = "";
try{
res = getResponseData(response, encode);
}catch(Exception e){
log.info("parse error " + e.toString());
throw e;
}
return res;
}
public static String get(String url, String encode) throws Exception {
//默认header 编码处理
encode = encode == null || encode.length() == 0 ? DEFAULT_ENCODE : encode;
log.info(Arrays.toString(new String[] { "doget", url, encode }));
HttpClient client = getClient();
HttpGet httpGet = new HttpGet(new URI(url));
HttpResponse response = null;
try{
response = client.execute(httpGet);
}catch(Exception e){
log.info("get error " + e.toString());
throw e;
}
String res = "";
try{
res = getResponseData(response, encode);
}catch(Exception e){
log.info("parse error " + e.toString());
throw e;
}
return res;
}
}
|
[
"1424234500@qq.com"
] |
1424234500@qq.com
|
e602137a2f3ae4d4f11d75e80575b58c87e95fc4
|
5e93b90a0b7c3cee3570de82aec07559576eed13
|
/mixin/src/mixin/PrimaryPrefix.java
|
d52aa9ad4d113fb9db4f031939d84986da1af610
|
[] |
no_license
|
priangulo/BttFTestProjects
|
a6f37c83b52273f8b5f3d7cbb7116c85a0fd4ef2
|
cc2294d24f9b0fed46110b868bd3a8f6c8794475
|
refs/heads/master
| 2021-03-27T10:30:10.316285
| 2017-10-25T21:39:55
| 2017-10-25T21:39:55
| 64,432,711
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 179
|
java
|
// Automatically generated code. Edit at your own risk!
// Generated by bali2jak v2002.09.03.
package mixin;
abstract public class PrimaryPrefix extends PrimaryExpression {
}
|
[
"priangulo@gmail.com"
] |
priangulo@gmail.com
|
4703f1b392bc104bed7e4c3f1550c848d123c76f
|
2b7026fa6178133184178eb58be93404f7926f27
|
/Project/health_parent/jasperReportsDemo/src/test/java/com/itheima/test/JasperReportsTest.java
|
dcad03b23fc790823f8ef9974e478f923f87717d
|
[] |
no_license
|
wjphappy90/AllCode
|
0ec0a90072f862a79e1ba5e4e8a46b7df092c74f
|
4ea6a784e6b15caf77a9574480983dbcd579269c
|
refs/heads/master
| 2022-12-09T11:34:39.246740
| 2020-09-22T09:10:38
| 2020-09-22T09:10:38
| 285,675,327
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,406
|
java
|
package com.itheima.test;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import org.junit.Test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class JasperReportsTest {
@Test
public void test1() throws Exception{
String jrxmlPath =
"D:\\itcastProject\\health_parent\\jasperReportsDemo\\src\\main\\resources\\demo.jrxml";
String jasperPath =
"D:\\itcastProject\\health_parent\\jasperReportsDemo\\src\\main\\resources\\demo.jasper";
//编译模板
JasperCompileManager.compileReportToFile(jrxmlPath,jasperPath);
//构造数据
Map paramters = new HashMap();
paramters.put("reportDate","2019-10-10");
paramters.put("company","itcast");
List<Map> list = new ArrayList();
Map map1 = new HashMap();
map1.put("name","xiaoming");
map1.put("address","beijing");
map1.put("email","xiaoming@itcast.cn");
Map map2 = new HashMap();
map2.put("name","xiaoli");
map2.put("address","nanjing");
map2.put("email","xiaoli@itcast.cn");
list.add(map1);
list.add(map2);
//填充数据
JasperPrint jasperPrint =
JasperFillManager.fillReport(jasperPath,
paramters,
new JRBeanCollectionDataSource(list));
//输出文件
String pdfPath = "D:\\test.pdf";
JasperExportManager.exportReportToPdfFile(jasperPrint,pdfPath);
}
//基于jdbc数据源方式填充数据
@Test
public void test2() throws Exception{
Class.forName("com.mysql.jdbc.Driver");
Connection connection =
DriverManager.getConnection("jdbc:mysql://localhost:3306/health",
"root",
"root");
String jrxmlPath = "D:\\itcastProject\\health_parent\\jasperReportsDemo\\src\\main\\resources\\demo1.jrxml";
String jasperPath = "D:\\itcastProject\\health_parent\\jasperReportsDemo\\src\\main\\resources\\demo1.jasper";
//模板编译,编译为后缀为jasper的二进制文件
JasperCompileManager.compileReportToFile(jrxmlPath,jasperPath);
//为模板文件准备数据,用于最终的PDF文件数据填充
Map map = new HashMap();
map.put("company","传智播客");
//填充数据
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperPath,map,connection);
//输出文件
String pdfPath = "D:\\test.pdf";
JasperExportManager.exportReportToPdfFile(jasperPrint,pdfPath);
}
//基于Javabean数据源方式填充数据
@Test
public void test3() throws Exception{
String jrxmlPath = "D:\\itcastProject\\health_parent\\jasperReportsDemo\\src\\main\\resources\\demo2.jrxml";
String jasperPath = "D:\\itcastProject\\health_parent\\jasperReportsDemo\\src\\main\\resources\\demo2.jasper";
//模板编译,编译为后缀为jasper的二进制文件
JasperCompileManager.compileReportToFile(jrxmlPath,jasperPath);
//为模板文件准备数据,用于最终的PDF文件数据填充
Map map = new HashMap();
map.put("company","传智播客");
//Javabean数据源填充,用于填充列表数据
List<Map> list = new ArrayList();
Map map1 = new HashMap();
map1.put("name","入职体检套餐");
map1.put("code","RZTJ");
map1.put("age","18-60");
map1.put("sex","男");
Map map2 = new HashMap();
map2.put("name","阳光爸妈老年健康体检");
map2.put("code","YGBM");
map2.put("age","55-60");
map2.put("sex","女");
list.add(map1);
list.add(map2);
//填充数据
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperPath,map,new JRBeanCollectionDataSource(list));
//输出文件
String pdfPath = "D:\\test.pdf";
JasperExportManager.exportReportToPdfFile(jasperPrint,pdfPath);
}
}
|
[
"981146457@qq.com"
] |
981146457@qq.com
|
f3118045fbf8529bc8cb78e282ec36570916f8f2
|
a121f2f258f592d255197dc74ef4f14d7b5e9d12
|
/src/test/java/com/dempseywood/TimeZoneTest.java
|
1b0abb92eca77e5539bf81c7ac24ea8de0ca01f7
|
[] |
no_license
|
LIUTaichen/DempseyWood-Web
|
1d5d2968e476808c9cda5ed1e7621dc4d3c4a346
|
5d3614ae095d95723a5dfbd799e70f437a90ae5f
|
refs/heads/master
| 2021-01-01T20:50:39.142311
| 2018-02-07T20:32:44
| 2018-02-07T20:32:44
| 98,945,906
| 0
| 0
| null | 2018-01-17T00:11:48
| 2017-08-01T01:32:56
|
Java
|
UTF-8
|
Java
| false
| false
| 1,115
|
java
|
package com.dempseywood;
import org.apache.poi.ss.usermodel.DateUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
@RunWith(MockitoJUnitRunner.class)
public class TimeZoneTest {
@Test
public void timeZone(){
Date date = new Date();
System.out.println(date);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone("NZ"));
System.out.println(sdf.format(date));
Calendar cal = Calendar.getInstance();
cal.setTime(date);
System.out.println(cal.getTime());
cal.setTimeZone(TimeZone.getTimeZone("NZ"));
//cal.
System.out.println(cal.get(Calendar.HOUR_OF_DAY));
cal.set(Calendar.HOUR_OF_DAY, 0);
System.out.println(cal.getTime());
cal.add(Calendar.HOUR_OF_DAY, -24);
System.out.println(cal.getTime());
System.out.println(DateUtil.getExcelDate(date));
}
}
|
[
"liu_taichen@hotmail.com"
] |
liu_taichen@hotmail.com
|
c7e769f46cb2366e0d9e5b0bf15cacb9956f1e69
|
51ca49bb5cfc5220d8af834756d3962450205067
|
/src/org/waveprotocol/box/server/rpc/ProtoCallback.java
|
819b592cbb95c70d7536a66f5bd1445405d3d8ef
|
[
"Apache-2.0"
] |
permissive
|
vega113/WaveInCloud
|
c08f2e33503511e9754888ad63b2a674f348300b
|
7a240021b931b240c33dca0b8443152fb82e0487
|
refs/heads/master
| 2021-01-01T17:47:13.719444
| 2011-11-15T18:00:21
| 2011-11-15T18:00:21
| 1,935,818
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 975
|
java
|
/**
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.waveprotocol.box.server.rpc;
import com.google.protobuf.Message;
import com.google.protobuf.UnknownFieldSet;
public interface ProtoCallback {
public void message(int sequenceNo, Message message);
public void unknown(int sequenceNo, String messageType, UnknownFieldSet message);
public void unknown(int sequenceNo, String messageType, String message);
}
|
[
"vega113@gmail.com"
] |
vega113@gmail.com
|
0cc30b7b402c7164a5d4f45fe2cbd8d34653570c
|
261c8cd3def964018c78dd243367e3243cbc3348
|
/src/main/java/br/com/wikinova/jhipster/security/jwt/TokenProvider.java
|
58f9ba96ddd22a84834ee9a13b2cb11e4cc4878b
|
[] |
no_license
|
leoayres/jhipsterSampleApplication
|
a76efedf9d39e50eaa7a339b92149a86031fa9f0
|
f9d89fa271b8f880ad1b35f3dbf080477261a8d0
|
refs/heads/master
| 2020-03-09T20:44:02.028205
| 2018-04-10T20:39:12
| 2018-04-10T20:39:12
| 128,992,177
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,049
|
java
|
package br.com.wikinova.jhipster.security.jwt;
import io.github.jhipster.config.JHipsterProperties;
import java.util.*;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.stereotype.Component;
import io.jsonwebtoken.*;
@Component
public class TokenProvider {
private final Logger log = LoggerFactory.getLogger(TokenProvider.class);
private static final String AUTHORITIES_KEY = "auth";
private String secretKey;
private long tokenValidityInMilliseconds;
private long tokenValidityInMillisecondsForRememberMe;
private final JHipsterProperties jHipsterProperties;
public TokenProvider(JHipsterProperties jHipsterProperties) {
this.jHipsterProperties = jHipsterProperties;
}
@PostConstruct
public void init() {
this.secretKey =
jHipsterProperties.getSecurity().getAuthentication().getJwt().getSecret();
this.tokenValidityInMilliseconds =
1000 * jHipsterProperties.getSecurity().getAuthentication().getJwt().getTokenValidityInSeconds();
this.tokenValidityInMillisecondsForRememberMe =
1000 * jHipsterProperties.getSecurity().getAuthentication().getJwt().getTokenValidityInSecondsForRememberMe();
}
public String createToken(Authentication authentication, boolean rememberMe) {
String authorities = authentication.getAuthorities().stream()
.map(GrantedAuthority::getAuthority)
.collect(Collectors.joining(","));
long now = (new Date()).getTime();
Date validity;
if (rememberMe) {
validity = new Date(now + this.tokenValidityInMillisecondsForRememberMe);
} else {
validity = new Date(now + this.tokenValidityInMilliseconds);
}
return Jwts.builder()
.setSubject(authentication.getName())
.claim(AUTHORITIES_KEY, authorities)
.signWith(SignatureAlgorithm.HS512, secretKey)
.setExpiration(validity)
.compact();
}
public Authentication getAuthentication(String token) {
Claims claims = Jwts.parser()
.setSigningKey(secretKey)
.parseClaimsJws(token)
.getBody();
Collection<? extends GrantedAuthority> authorities =
Arrays.stream(claims.get(AUTHORITIES_KEY).toString().split(","))
.map(SimpleGrantedAuthority::new)
.collect(Collectors.toList());
User principal = new User(claims.getSubject(), "", authorities);
return new UsernamePasswordAuthenticationToken(principal, token, authorities);
}
public boolean validateToken(String authToken) {
try {
Jwts.parser().setSigningKey(secretKey).parseClaimsJws(authToken);
return true;
} catch (SignatureException e) {
log.info("Invalid JWT signature.");
log.trace("Invalid JWT signature trace: {}", e);
} catch (MalformedJwtException e) {
log.info("Invalid JWT token.");
log.trace("Invalid JWT token trace: {}", e);
} catch (ExpiredJwtException e) {
log.info("Expired JWT token.");
log.trace("Expired JWT token trace: {}", e);
} catch (UnsupportedJwtException e) {
log.info("Unsupported JWT token.");
log.trace("Unsupported JWT token trace: {}", e);
} catch (IllegalArgumentException e) {
log.info("JWT token compact of handler are invalid.");
log.trace("JWT token compact of handler are invalid trace: {}", e);
}
return false;
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
cd68b6ad25dc0ab7f4b03fc69b5e70984c6e9f74
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/34/34_1e0d211d97251986760e8e7b798bff8711729b89/DeviceServiceImpl/34_1e0d211d97251986760e8e7b798bff8711729b89_DeviceServiceImpl_t.java
|
ec552df3edd1405cf34e9be2c7f5ea342be2e024
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,292
|
java
|
/**
* Copyright 2012 Alex Jones
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
* @author unclealex72
*
*/
package uk.co.unclealex.music.devices;
import java.nio.file.Paths;
import javax.inject.Inject;
import uk.co.unclealex.music.configuration.Directories;
import uk.co.unclealex.music.configuration.User;
import uk.co.unclealex.music.files.FileLocation;
/**
* The default implementation of {@link DeviceService}.
*
* @author alex
*
*/
public class DeviceServiceImpl implements DeviceService {
/**
* The {@link Directories} object used to find where the base device directory
* is.
*/
private final Directories directories;
/**
* Instantiates a new device service impl.
*
* @param directories
* the directories
*/
@Inject
public DeviceServiceImpl(Directories directories) {
super();
this.directories = directories;
}
/**
* {@inheritDoc}
*/
@Override
public FileLocation getLinkLocation(User owner, FileLocation encodedLocation) {
return new FileLocation(getDirectories().getDevicesPath(), Paths.get(owner.getName()).resolve(
encodedLocation.getRelativePath()), true);
}
/**
* Gets the {@link Directories} object used to find where the base device
* directory is.
*
* @return the {@link Directories} object used to find where the base device
* directory is
*/
public Directories getDirectories() {
return directories;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
db975401b5e3c6c6ab7c218e476be4fd8da92852
|
ce996d943e3fe61721c679346f34469736276fcd
|
/java-jc/src/main/java/com/xhc/javabased/java_jj/code_11/demo04/BSTCP/TCPServer.java
|
faee89bc403312a2ac7ee594a158cece736ff520
|
[] |
no_license
|
xuhongchang2008/javadome
|
c43117584f1bb9450b335a0ba9999c0bc193bc9e
|
3436f971ef14041a4b4d6160c5f6ef61648a9437
|
refs/heads/master
| 2023-03-02T03:44:10.181467
| 2021-02-02T05:23:01
| 2021-02-02T05:23:01
| 325,902,715
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,338
|
java
|
package com.xhc.javabased.java_jj.code_11.demo04.BSTCP;
import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
/*
创建BS版本TCP服务器
*/
public class TCPServer {
public static void main(String[] args) throws IOException {
//创建一个服务器ServerSocket,和系统要指定的端口号
ServerSocket server = new ServerSocket(8080);
//使用accept方法获取到请求的客户端对象(浏览器)
Socket socket = server.accept();
//使用Socket对象中的方法getInputStream,获取到网络字节输入流InputStream对象
InputStream is = socket.getInputStream();
//使用网络字节输入流InputStream对象中的方法read读取客户端的请求信息
/*byte[] bytes = new byte[1024];
int len = 0;
while((len = is.read(bytes))!=-1){
System.out.println(new String(bytes,0,len));
}*/
//把is网络字节输入流对象,转换为字符缓冲输入流
BufferedReader br = new BufferedReader(new InputStreamReader(is));
//把客户端请求信息的第一行读取出来 GET /11_Net/web/index.html HTTP/1.1
String line = br.readLine();
//把读取的信息进行切割,只要中间部分 /11_Net/web/index.html
String[] arr = line.split(" ");
//把路径前边的/去掉,进行截取 11_Net/web/index.html
String htmlpath = arr[1].substring(1);
//创建一个本地字节输入流,构造方法中绑定要读取的html路径
FileInputStream fis = new FileInputStream(htmlpath);
//使用Socket中的方法getOutputStream获取网络字节输出流OutputStream对象
OutputStream os = socket.getOutputStream();
// 写入HTTP协议响应头,固定写法
os.write("HTTP/1.1 200 OK\r\n".getBytes());
os.write("Content-Type:text/html\r\n".getBytes());
// 必须要写入空行,否则浏览器不解析
os.write("\r\n".getBytes());
//一读一写复制文件,把服务读取的html文件回写到客户端
int len = 0;
byte[] bytes = new byte[1024];
while((len = fis.read(bytes))!=-1){
os.write(bytes,0,len);
}
//释放资源
fis.close();
socket.close();
server.close();
}
}
|
[
"8355853+xhc2008@user.noreply.gitee.com"
] |
8355853+xhc2008@user.noreply.gitee.com
|
eaf4555d6bb78b27b913548c8aecc687f698c4ef
|
7744b38ac4c00bed926137a30014fd92d7fc9214
|
/desktop/src/main/java/com/summer/view/charting/highlight/BarHighlighter.java
|
190566cf9f1f34c5c486a339205e6ced6cd6c1de
|
[] |
no_license
|
canvaser/App
|
173b53638231d165e98316262d654ad246cb5af6
|
c8956766c16677bda1ae42691d958de155a2d0e3
|
refs/heads/master
| 2021-01-22T08:47:42.713548
| 2017-04-19T03:59:44
| 2017-04-19T03:59:44
| 81,914,207
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,479
|
java
|
package com.summer.view.charting.highlight;
import com.summer.view.charting.data.BarData;
import com.summer.view.charting.data.BarEntry;
import com.summer.view.charting.data.BarLineScatterCandleBubbleData;
import com.summer.view.charting.interfaces.dataprovider.BarDataProvider;
import com.summer.view.charting.interfaces.datasets.IBarDataSet;
import com.summer.view.charting.utils.MPPointD;
/**
* Created by Philipp Jahoda on 22/07/15.
*/
public class BarHighlighter extends ChartHighlighter<BarDataProvider> {
public BarHighlighter(BarDataProvider chart) {
super(chart);
}
@Override
public Highlight getHighlight(float x, float y) {
Highlight high = super.getHighlight(x, y);
if (high == null) {
return null;
}
MPPointD pos = getValsForTouch(x, y);
BarData barData = mChart.getBarData();
IBarDataSet set = barData.getDataSetByIndex(high.getDataSetIndex());
if (set.isStacked()) {
return getStackedHighlight(high,
set,
(float) pos.x,
(float) pos.y);
}
MPPointD.recycleInstance(pos);
return high;
}
/**
* This method creates the Highlight object that also indicates which value of a stacked BarEntry has been
* selected.
*
* @param high the Highlight to work with looking for stacked values
* @param set
* @param xVal
* @param yVal
* @return
*/
public Highlight getStackedHighlight(Highlight high, IBarDataSet set, float xVal, float yVal) {
BarEntry entry = set.getEntryForXValue(xVal, yVal);
if (entry == null)
return null;
// not stacked
if (entry.getYVals() == null) {
return high;
} else {
Range[] ranges = entry.getRanges();
if (ranges.length > 0) {
int stackIndex = getClosestStackIndex(ranges, yVal);
MPPointD pixels = mChart.getTransformer(set.getAxisDependency()).getPixelForValues(high.getX(), ranges[stackIndex].to);
Highlight stackedHigh = new Highlight(
entry.getX(),
entry.getY(),
(float) pixels.x,
(float) pixels.y,
high.getDataSetIndex(),
stackIndex,
high.getAxis()
);
MPPointD.recycleInstance(pixels);
return stackedHigh;
}
}
return null;
}
/**
* Returns the index of the closest value inside the values array / ranges (stacked barchart) to the value
* given as
* a parameter.
*
* @param ranges
* @param value
* @return
*/
protected int getClosestStackIndex(Range[] ranges, float value) {
if (ranges == null || ranges.length == 0)
return 0;
int stackIndex = 0;
for (Range range : ranges) {
if (range.contains(value))
return stackIndex;
else
stackIndex++;
}
int length = Math.max(ranges.length - 1, 0);
return (value > ranges[length].to) ? length : 0;
}
// /**
// * Splits up the stack-values of the given bar-entry into Range objects.
// *
// * @param entry
// * @return
// */
// protected Range[] getRanges(BarEntry entry) {
//
// float[] values = entry.getYVals();
//
// if (values == null || values.length == 0)
// return new Range[0];
//
// Range[] ranges = new Range[values.length];
//
// float negRemain = -entry.getNegativeSum();
// float posRemain = 0f;
//
// for (int i = 0; i < ranges.length; i++) {
//
// float value = values[i];
//
// if (value < 0) {
// ranges[i] = new Range(negRemain, negRemain + Math.abs(value));
// negRemain += Math.abs(value);
// } else {
// ranges[i] = new Range(posRemain, posRemain + value);
// posRemain += value;
// }
// }
//
// return ranges;
// }
@Override
protected float getDistance(float x1, float y1, float x2, float y2) {
return Math.abs(x1 - x2);
}
@Override
protected BarLineScatterCandleBubbleData getData() {
return mChart.getBarData();
}
}
|
[
"18721607438@163.com"
] |
18721607438@163.com
|
7176c8dac381cfe23aa04eb053fa53c599dfa2b2
|
0bcd6ea1e53a0713bcddfc575c417bd74bbd7178
|
/src/org/dzhou/leetcode/OneEditDistance.java
|
492cd6bb4b2c34343dfe8c86d24cd36ed87fe133
|
[] |
no_license
|
zhou-dong/leetcode
|
6bef3e79bb26e1e458833771589e091b977f434c
|
9824d6f4fef34f27ec47b280b633b8d221603fa6
|
refs/heads/master
| 2020-09-21T05:01:08.942409
| 2017-03-29T04:05:46
| 2017-03-29T04:05:46
| 67,207,431
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,291
|
java
|
package org.dzhou.leetcode;
/**
* 161. One Edit Distance
*
* Given two strings S and T, determine if they are both one edit distance
* apart.
*
* @author zhoudong
*
*/
public class OneEditDistance {
public boolean isOneEditDistance(String s, String t) {
if (s == null || t == null)
return false;
if (s.length() == t.length())
return isOneEditReplace(s, t);
else if (s.length() + 1 == t.length())
return isOneInsert(s, t);
else if (s.length() - 1 == t.length())
return isOneInsert(t, s);
return false;
}
private boolean isOneInsert(String s1, String s2) {
int index1 = 0, index2 = 0;
while (index1 < s1.length() || index2 < s2.length()) {
if (index1 == s1.length()) {
index2++;
continue;
}
if (index2 == s2.length()) {
index1++;
continue;
}
if (s1.charAt(index1) != s2.charAt(index2)) {
if (index1 != index2)
return false;
index2++;
} else {
index1++;
index2++;
}
}
return index1 != index2;
}
private boolean isOneEditReplace(String s1, String s2) {
if (s1.length() != s2.length())
return false;
boolean flag = false;
for (int i = 0; i < s1.length(); i++) {
if (s1.charAt(i) != s2.charAt(i)) {
if (flag)
return false;
flag = true;
}
}
return flag;
}
}
|
[
"82224165@qq.com"
] |
82224165@qq.com
|
7d095f04c30c08796a6a53cad9563dc6a24962c5
|
c583e42f22064bc5f3814b3d3c5f8bc62ee47a75
|
/src/main/java/com/woime/iboss/core/hibernate/ReadOnlyTransactionManager.java
|
b1a7991397029ad373f15100c99d381e6af56d8d
|
[] |
no_license
|
vipsql/iboss
|
c42ab22f553b71cb56431f1e507e25434b238ede
|
9329b9a9f29d1289ffc047b44baa184f6e3636ab
|
refs/heads/master
| 2020-03-07T17:21:39.373944
| 2017-04-03T04:19:57
| 2017-04-03T04:19:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,130
|
java
|
package com.woime.iboss.core.hibernate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionException;
import org.springframework.transaction.TransactionStatus;
/**
* 考虑到TransactionManager中也可能因为业务进行手工回滚的情况 这种情况下不应该抛出异常
*
* 如果出现局部异常导致整体事务失败的情况,可以打开
* org.springframework.transaction.interceptor.TransactionInterceptor的trace日志
* 就可以看到具体是因为什么异常导致的事务回滚
*
* 日志格式如下 "Completing transaction for [" + txInfo.getJoinpointIdentification() +
* "] after exception: " + ex);
*/
public class ReadOnlyTransactionManager implements PlatformTransactionManager
{
/** logger. */
private static Logger logger = LoggerFactory.getLogger(ReadOnlyTransactionManager.class);
private PlatformTransactionManager platformTransactionManager;
private boolean readOnly;
public TransactionStatus getTransaction(TransactionDefinition definition) throws TransactionException
{
if (readOnly)
{
TransactionDefinition readOnlyTransactionDefinition = new ReadOnlyTransactionDefinition(definition);
return platformTransactionManager.getTransaction(readOnlyTransactionDefinition);
}
else
{
return platformTransactionManager.getTransaction(definition);
}
}
public void commit(TransactionStatus status) throws TransactionException
{
platformTransactionManager.commit(status);
}
public void rollback(TransactionStatus status) throws TransactionException
{
logger.info("transaction rollback at : {}", status);
platformTransactionManager.rollback(status);
}
public void setPlatformTransactionManager(PlatformTransactionManager platformTransactionManager)
{
this.platformTransactionManager = platformTransactionManager;
}
public void setReadOnly(boolean readOnly)
{
this.readOnly = readOnly;
}
public boolean isReadOnly()
{
return readOnly;
}
}
|
[
"Administrator@192.168.148.1"
] |
Administrator@192.168.148.1
|
4eb4584e1382b9bdfdb27731ffe8d9adbd2ca964
|
d8bf1ab80a9c2e73fa5b11d0fab5ad7ae0f74ebd
|
/app/src/main/java/com/zhketech/sip/app/project/client/activity/LoginActivity.java
|
951511fc247c358b592c109847ad5d7e69288168
|
[] |
no_license
|
wpfsean/App
|
5e66e6ae92ebf2b95b70afb8142d7118c9fbad2a
|
602238026921afaa5c6949c46880c84b177621be
|
refs/heads/master
| 2020-03-18T13:29:25.242828
| 2018-06-19T02:39:10
| 2018-06-19T02:39:10
| 134,786,665
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,829
|
java
|
package com.zhketech.sip.app.project.client.activity;
import android.content.Context;
import android.content.Intent;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Checkable;
import android.widget.EditText;
import android.widget.Toast;
import com.zhketech.sip.app.project.client.R;
import com.zhketech.sip.app.project.client.beans.LoginBean;
import com.zhketech.sip.app.project.client.utils.LoginThread;
import com.zhketech.sip.app.project.client.utils.Logutils;
import com.zhketech.sip.app.project.client.utils.SharedPreferencesUtils;
import com.zhketech.sip.app.project.client.utils.ToastUtils;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class LoginActivity extends AppCompatActivity {
@BindView(R.id.edit_username_layout)
EditText username;
@BindView(R.id.edit_userpass_layout)
EditText userpass;
@BindView(R.id.remember_pass_layout)
Checkable remeemberPass;
@BindView(R.id.auto_login_layout)
Checkable autoLogin;
boolean isRemember;
boolean isAuto;
Context context;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
ActionBar actionBar = this.getSupportActionBar();
if (actionBar != null) actionBar.hide();
setContentView(R.layout.activity_login);
ButterKnife.bind(this);
context = this;
//取出上次成功登陆的用户名和密码
String logined_name = (String) SharedPreferencesUtils.getObject(context,"username","");
String logined_pass = (String) SharedPreferencesUtils.getObject(context,"userpass","");
//输入框显示用户名和密码
username.setText(logined_name);
userpass.setText(logined_pass);
//判断是否是自动 登录,如果是自动登录就直接跳转到主页面
boolean isAutoLogin = (boolean) SharedPreferencesUtils.getObject(context,"auto",false);
if (isAutoLogin == true){
Intent intent = new Intent();
intent.setClass(LoginActivity.this,Main.class);
context.startActivity(intent);
}
}
@OnClick(R.id.userlogin_button_layout)
public void login(View viwe) {
//判断是否选中记住密码和自动登录的复选框
isRemember = remeemberPass.isChecked();
isAuto = autoLogin.isChecked();
Logutils.i("..\n" + isRemember + "\n" + isAuto);
//获取用户名和密码
final String name = username.getText().toString().trim();
final String pass = userpass.getText().toString().trim();
//判断是否为空
if ((!TextUtils.isEmpty(name)) && (!TextUtils.isEmpty(pass))) {
//new新建的实体类
LoginBean loginBean = new LoginBean();
loginBean.setUsername(name);
loginBean.setPass(pass);
loginBean.setIp("19.0.0.79");
//登录
LoginThread loginThread = new LoginThread(LoginActivity.this, loginBean, new LoginThread.IsLoginListern() {
@Override
public void loginStatus(String status) {
String result = status;
if (!TextUtils.isEmpty(result)) {
if (result.equals("success")) {//成功
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(LoginActivity.this, "登录成功", Toast.LENGTH_LONG).show();
}
});
//如果复选了就存储相关的信息
if (isRemember == true){
SharedPreferencesUtils.putObject(context,"username",name);
SharedPreferencesUtils.putObject(context,"userpass",pass);
}
if (isAuto){
SharedPreferencesUtils.putObject(context,"auto",true);
}
try {
Thread.sleep(2 * 1000);
Intent intent = new Intent();
intent.setClass(LoginActivity.this, Main.class);
startActivity(intent);
} catch (InterruptedException e) {
Logutils.e("Login error");
}
} else {//失败
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(LoginActivity.this, "登录失败", Toast.LENGTH_LONG).show();
}
});
}
}
}
});
loginThread.start();
} else {
runOnUiThread(new Runnable() {
@Override
public void run() {
ToastUtils.showShort("Null");
}
});
}
}
@Override
protected void onPause() {
super.onPause();
LoginActivity.this.finish();
}
}
|
[
"wpfsean@126.com"
] |
wpfsean@126.com
|
29f56f5e6ba80067b9460b718aab28448092afbf
|
82ada8f2b9753c7d97d720b396c6bda044fdf988
|
/base-framework/src/main/java/com/lnr/android/base/framework/data/provider/SimpleDataProvider.java
|
d0ca70fb281a6c434250293904867a98770e17c7
|
[] |
no_license
|
xyyou123/dingtai-base-framework
|
f0dc377647b92df15c0d3f66942c5582eaefe506
|
c983c4d9c4e8456c5dec9681ee347f0f2cfb484c
|
refs/heads/master
| 2022-04-23T16:03:40.978218
| 2020-04-19T19:43:42
| 2020-04-19T19:44:12
| 257,085,196
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 603
|
java
|
package com.lnr.android.base.framework.data.provider;
import java.util.HashMap;
import io.reactivex.Observable;
/**
* author:lnr
* date:2018/9/30
*/
public class SimpleDataProvider implements IDataProvider {
@Override
public HashMap<String, Object> get(HashMap<String, Object> params) {
return params;
}
@Override
public Observable<Object> getAsync(HashMap<String, Object> params) {
return null;
}
@Override
public void put(HashMap<String, Object> params) {
}
@Override
public void delete(HashMap<String, Object> params) {
}
}
|
[
"zndx0502050105@163.com"
] |
zndx0502050105@163.com
|
6771ce24bf6bd19a3f177a63da406737c23b4ae7
|
5e19c3b375680ec4267db1ad4c43c8b53ac00b99
|
/app/src/main/java/vn/com/vsc/ptpm/VNPT_DMS/presenter/glab/GlabDanhSachTrangThaiDonHangImpl.java
|
68d7d4ae0a8e6777e2f28fbefee67e049db10802
|
[] |
no_license
|
minhdn7/dms
|
b478214c2c6dc1c5438232830d8e873d80fa2907
|
8fde79c7adef24997d186a0cb4354169a4552cf5
|
refs/heads/master
| 2020-03-17T13:50:08.844025
| 2018-05-16T10:21:35
| 2018-05-16T10:21:35
| 133,646,559
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,104
|
java
|
package vn.com.vsc.ptpm.VNPT_DMS.presenter.glab;
import vn.com.vsc.ptpm.VNPT_DMS.model.dao.glab.UserGlabDao;
import vn.com.vsc.ptpm.VNPT_DMS.model.service.IFinishedListener;
import vn.com.vsc.ptpm.VNPT_DMS.view.viewevent.glab.IGlabDanhSachDonDatHangView;
import vn.com.vsc.ptpm.VNPT_DMS.view.viewevent.glab.IGlabDanhSachTrangThaiDonHangView;
/**
* Created by MinhDN on 20/11/2017.
*/
public class GlabDanhSachTrangThaiDonHangImpl implements IGlabDanhSachTrangThaiDonHangPresenter, IFinishedListener {
public IGlabDanhSachTrangThaiDonHangView view;
public UserGlabDao dao;
public GlabDanhSachTrangThaiDonHangImpl(IGlabDanhSachTrangThaiDonHangView view) {
this.view = view;
this.dao = new UserGlabDao();
}
@Override
public void onSuccess(Object object) {
view.onGlabDanhSachTrangThaiDonHangSuccess(object);
}
@Override
public void onError(Object object) {
view.onGlabDanhSachTrangThaiDonHangError(object);
}
@Override
public void getDanhSachTrangThaiDonHang() {
dao.getDanhSachTrangThaiDonHang(this);
}
}
|
[
"minhdn231@gmail.com"
] |
minhdn231@gmail.com
|
50380b4f90301bfcafab0c757570228ebdaef04c
|
00cb6f98d9796ca777afc9d26cb557b6f5fe3cda
|
/mygo/mygo-alipay/src/main/java/com/alipay/api/domain/AlipayEbppProdmodeSignQueryModel.java
|
da24a76f18b6dde22d65a373d625eeacd4ef74cb
|
[] |
no_license
|
caizhongao/mygo
|
e79a493948443e6bb17a4390d0b31033cd98d377
|
08a36fe0aced49fc46f4541af415d6e86d77d9c9
|
refs/heads/master
| 2020-09-06T12:45:37.350935
| 2017-06-26T05:51:50
| 2017-06-26T05:51:50
| 94,418,912
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 836
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 查询签约信息接口
*
* @author auto create
* @since 1.0, 2016-12-27 10:52:19
*/
public class AlipayEbppProdmodeSignQueryModel extends AlipayObject {
private static final long serialVersionUID = 7335568833882758282L;
/**
* 出账/销账机构支付宝账号
*/
@ApiField("logon_id")
private String logonId;
/**
* 产品编号
*/
@ApiField("prod_code")
private String prodCode;
public String getLogonId() {
return this.logonId;
}
public void setLogonId(String logonId) {
this.logonId = logonId;
}
public String getProdCode() {
return this.prodCode;
}
public void setProdCode(String prodCode) {
this.prodCode = prodCode;
}
}
|
[
"mufeng@juanpi.com"
] |
mufeng@juanpi.com
|
d53ff0316d2b5df2a4bfd4b0e4e6d446819764ae
|
5cefafafa516d374fd600caa54956a1de7e4ce7d
|
/oasis/web/ePolicy/PM/src/dti/pm/policymgr/mailingmgr/dao/ProductMailingDAO.java
|
ce3bd731a505c3a638dd01d4b666e390bc366e1d
|
[] |
no_license
|
TrellixVulnTeam/demo_L223
|
18c641c1d842c5c6a47e949595b5f507daa4aa55
|
87c9ece01ebdd918343ff0c119e9c462ad069a81
|
refs/heads/master
| 2023-03-16T00:32:08.023444
| 2019-04-08T15:46:48
| 2019-04-08T15:46:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 981
|
java
|
package dti.pm.policymgr.mailingmgr.dao;
import dti.oasis.recordset.Record;
import dti.oasis.recordset.RecordLoadProcessor;
import dti.oasis.recordset.RecordSet;
/**
* An interface that provides DAO operation for product mailing.
* <p/>
* <p>(C) 2003 Delphi Technology, inc. (dti)</p>
* Date: Sep 25, 2013
*
* @author awu
*/
/*
*
* Revision Date Revised By Description
* ---------------------------------------------------
* ---------------------------------------------------
*/
public interface ProductMailingDAO {
/**
* This method used to save product mailing data.
*
* @param inputRecordSet
* @return
*/
public int saveProductMailingInfo(RecordSet inputRecordSet);
/**
* This method used to load all product mailing.
*
* @param inputRecord
* @return
*/
public RecordSet loadAllProductMailing(Record inputRecord, RecordLoadProcessor loadProcessor);
}
|
[
"athidevwork@gmail.com"
] |
athidevwork@gmail.com
|
d1d1cc8b2726dd633ccdcb5cdf1461488d900f0c
|
4cc6fb1fde80a1730b660ba5ec13ad5f3228ea5c
|
/java-lihongjie/thinking-in-java-4-code/src/main/java/enumerated/EnumSets.java
|
10d551c1cc949d7e8c59cd2e93f0f2b7b4f4a7ec
|
[
"MIT"
] |
permissive
|
lihongjie/tutorials
|
c598425b085549f5f7a29b1c7bf0c86ae9823c94
|
c729ae0eac90564e6366bc4907dcb8a536519956
|
refs/heads/master
| 2023-08-19T05:03:23.754199
| 2023-08-11T08:25:29
| 2023-08-11T08:25:29
| 124,048,964
| 0
| 0
|
MIT
| 2018-04-01T06:26:19
| 2018-03-06T08:51:04
|
Java
|
UTF-8
|
Java
| false
| false
| 1,000
|
java
|
//: enumerated/EnumSets.java
// Operations on EnumSets
package enumerated;
import java.util.*;
import static enumerated.AlarmPoints.*;
import static net.mindview.util.Print.*;
public class EnumSets {
public static void main(String[] args) {
EnumSet<AlarmPoints> points =
EnumSet.noneOf(AlarmPoints.class); // Empty set
points.add(BATHROOM);
print(points);
points.addAll(EnumSet.of(STAIR1, STAIR2, KITCHEN));
print(points);
points = EnumSet.allOf(AlarmPoints.class);
points.removeAll(EnumSet.of(STAIR1, STAIR2, KITCHEN));
print(points);
points.removeAll(EnumSet.range(OFFICE1, OFFICE4));
print(points);
points = EnumSet.complementOf(points);
print(points);
}
} /* Output:
[BATHROOM]
[STAIR1, STAIR2, BATHROOM, KITCHEN]
[LOBBY, OFFICE1, OFFICE2, OFFICE3, OFFICE4, BATHROOM, UTILITY]
[LOBBY, BATHROOM, UTILITY]
[STAIR1, STAIR2, OFFICE1, OFFICE2, OFFICE3, OFFICE4, KITCHEN]
*///:~
|
[
"you@example.com"
] |
you@example.com
|
c2be10768418fe5f4482a0fdb9f8a4cdfc8c4e6c
|
1df3fe64674cee847d552ee70cec148152e733c2
|
/.history/src/test/java/IO/GraphFileReaderSpec_20200524154754.java
|
19958763cb7b76165a8643841358f83c9deb2907
|
[] |
no_license
|
z-cchang/MyAlgorithms
|
a8aea56cefb2a899c7baa31c80c1a07ae2ab1935
|
88df167c461967bc7edf1e05896406791a46d3f0
|
refs/heads/master
| 2022-10-06T10:12:46.878855
| 2020-06-08T04:34:50
| 2020-06-08T04:34:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,447
|
java
|
package IO;
import Algorithms.Graph.Network.Edge;
import Algorithms.Graph.Network.EdgeHasSet;
import Algorithms.Graph.Utils.HNodeList;
import Algorithms.Graph.Network.AdjList;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.regex.Pattern;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.*;
@DisplayName("SIFFileReader is")
class GraphFileReaderSpec {
@DisplayName("able to use pattern to split. ")
@Test
// The first character cannot be space.-> test whether each element for it's length > 0
void PatternTest() {
String test = "TMA STD BBQ";
String test2 = " TMA STD BBQ";
Pattern splitter = Pattern.compile("\\s+");
String[] tokens = splitter.split(test);
String[] tokens_2 = splitter.split(test2);
ArrayList<String> tokens_3 = new ArrayList<>();
for (String str:tokens_2
) {
if(str.length()!=0){
tokens_3.add(str);
}
}
assertEquals(Arrays.toString(new String[]{"TMA", "STD", "BBQ"}), Arrays.toString(tokens));
assertNotEquals(Arrays.toString(new String[]{"TMA", "STD", "BBQ"}), Arrays.toString(tokens_2));
assertEquals(Arrays.toString(new String[]{"TMA", "STD", "BBQ"}), tokens_3.toString());
}
@DisplayName("able to read a graph to EdgeList from the specific well-formatting file. ")
@Test
void ReadTest(){
try {
GraphFileReader reader = new GraphFileReader();
EdgeHasSet graph = reader.readToEL("src/test/java/resources/IOTest/simpleGraph_1.txt");
// the EdgeList graph is not a self-update graph (automatic replace edges with higher values)
assertThat(graph).contains(new Edge("A","B",0.2),new Edge("A","C",0.6),new Edge("A","C",0.3),
new Edge("A","D",0.4),new Edge("C","B",0.7));
} catch (IOException e) {
e.printStackTrace();
}
try {
GraphFileReader reader = new GraphFileReader();
EdgeHasSet graph = reader.readToEL("src/test/java/resources/IOTest/wrongForTest_1.txt");
} catch (IOException e) {
assertEquals("The file input format is not correct. Plus: some name-value pairs are incorrect!", e.getMessage());
}
}
@DisplayName("able to read a graph to ArrayList from the specific well-formatting file. ")
@Test
void ReadToArrayListTest(){
try {
// homoGeneMap is a self-update graph
GraphFileReader reader = new GraphFileReader();
AdjList graph = reader.readToAdjL("src/test/java/resources/IOTest/simpleGraph_1.txt");
HNodeList forTestA = new HNodeList("A");
HNodeList forTestB = new HNodeList("C");
forTestA.add("B",0.2);
forTestA.add("C",0.3);
forTestA.add("D",0.4);
forTestB.add("A",0.6);
forTestB.add("B",0.7);
assertThat(graph).contains(forTestA,forTestB);
} catch (IOException e) {
e.printStackTrace();
}
}
@DisplayName("able to read a medium-level graph")
@Test
void ReadMediumGraph() throws IOException {
GraphFileReader reader = new GraphFileReader();
AdjList graph = reader.readToAdjL("src/test/java/resources/IOTest/mediumGraph.txt");
assertEquals(0.986,graph.getValByName("RPS9A","RPS9"));
assertEquals(0.756,graph.getValByName("YRF1-4","EIF4A3"));
}
@DisplayName("able to get a HashSet.")
@Test
void getHashSet() throws IOException {
GraphFileReader reader = new GraphFileReader();
AdjList graph = reader.readToAdjL("src/test/java/resources/IOTest/mediumGraph.txt");
HashSet<String> graph1 = reader.getHeadSet();
}
@DisplayName("TSV test")
@Test
void readTSV() throws IOException {
GraphFileReader reader = new GraphFileReader();
AdjList graph = reader.readToAdjL("C:\\Users\\Haotian Bai\\Desktop\\cov19\\A1.tsv");
}
// ---------------------------
// below are some base test class utility methods to validate if the outcome is consistent with your expectation.
void assertNodeNumber(int expected, int original, String message){
}
}
|
[
"43661768+164140757@users.noreply.github.com"
] |
43661768+164140757@users.noreply.github.com
|
05407aaf8317c9b3d6d1513e6c04ea2305272471
|
37ea443fc21d0d974b720cfe49b9e2a092cb441b
|
/study01/study/OOP/MemberCall.java
|
ad2d8fc77c7021554c2f5e5b444eb8dcca930eda
|
[] |
no_license
|
jinioh88/Java
|
ffb80efbef2c7436d565d9a292dd339c4e01f822
|
56109b3970b2315371cce88001ac5fbf4b624d8b
|
refs/heads/master
| 2020-03-06T23:31:39.138781
| 2018-11-09T08:37:35
| 2018-11-09T08:37:35
| 127,133,969
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 448
|
java
|
package OOP;
class MemberCall {
int iv = 10;
static int cv = 20;
int iv2 = cv;
// static int cv2 = iv; // 클래스 변수는 인스턴 수 변수 대입 못한다.
static int cv2 = new MemberCall().iv; // 객체를 생성해 사용해야 한다.
static void staticMethod(){
System.out.println(cv);
// System.out.println(iv); // 인스턴스 변수를 상요 못한다 클래스 메서드는...
}
}
|
[
"jinioh88@gmail.com"
] |
jinioh88@gmail.com
|
5a2227c5db1efdf13dbdbb7c20e2aa83d7e9eae9
|
c721494bf259c22066624c19aecc8a1477675d5e
|
/src/main/java/br/com/anteros/validation/api/constraints/NotNull.java
|
759970425679547570df0fb886e4bdae9122e39c
|
[] |
no_license
|
anterostecnologia/anterosbeanvalidationapi
|
b08b1470b01808a333a6c4a1131941c460b7e114
|
a384bad6fd478009e09dedb796d14a530d0374cd
|
refs/heads/master
| 2021-07-13T05:20:29.136680
| 2021-03-26T18:51:41
| 2021-03-26T18:51:41
| 56,148,305
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,045
|
java
|
// $Id: NotNull.java 17620 2009-10-04 19:19:28Z hardy.ferentschik $
/*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat, Inc. and/or its affiliates, 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 br.com.anteros.validation.api.constraints;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;
import br.com.anteros.validation.api.Constraint;
import br.com.anteros.validation.api.Payload;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.ElementType.PARAMETER;
/**
* The annotated element must not be <code>null</code>.
* Accepts any type.
*
* @author Emmanuel Bernard
*/
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = {})
public @interface NotNull {
String message() default "{javax.validation.constraints.NotNull.message}";
Class<?>[] groups() default { };
Class<? extends Payload>[] payload() default {};
/**
* Defines several <code>@NotNull</code> annotations on the same element
* @see br.com.anteros.validation.api.constraints.NotNull
*
* @author Emmanuel Bernard
*/
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
@Retention(RUNTIME)
@Documented
@interface List {
NotNull[] value();
}
}
|
[
"edsonmartins2005@gmail.com"
] |
edsonmartins2005@gmail.com
|
35bdd8721beb3faac7e7d97087e383355d9f5f32
|
e9268d6365906bb365d6aef0ed3de43f02c0c8b6
|
/src/main/java/com/jsoniter/extra/PreciseFloatSupport.java
|
8352b39b12f92f3c97120c1b9e41ffe218a54451
|
[
"MIT"
] |
permissive
|
json-iterator/java
|
1dd42e9e12895242c32a3604acd5cc1733c0ac1c
|
6925cf4c19d313504b416f58a349a36bf563e0e1
|
refs/heads/master
| 2023-08-15T00:44:48.147189
| 2022-01-23T16:18:42
| 2022-01-23T16:18:42
| 75,621,695
| 1,693
| 683
|
MIT
| 2023-07-13T01:29:56
| 2016-12-05T12:15:21
|
Java
|
UTF-8
|
Java
| false
| false
| 2,081
|
java
|
package com.jsoniter.extra;
import com.jsoniter.spi.JsonException;
import com.jsoniter.any.Any;
import com.jsoniter.output.JsonStream;
import com.jsoniter.spi.Encoder;
import com.jsoniter.spi.JsoniterSpi;
import java.io.IOException;
/**
* default float/double encoding will keep 6 decimal places
* enable precise encoding will use JDK toString to be precise
*/
public class PreciseFloatSupport {
private static boolean enabled;
public static synchronized void enable() {
if (enabled) {
throw new JsonException("PreciseFloatSupport.enable can only be called once");
}
enabled = true;
JsoniterSpi.registerTypeEncoder(Double.class, new Encoder.ReflectionEncoder() {
@Override
public void encode(Object obj, JsonStream stream) throws IOException {
stream.writeRaw(obj.toString());
}
@Override
public Any wrap(Object obj) {
Double number = (Double) obj;
return Any.wrap(number.doubleValue());
}
});
JsoniterSpi.registerTypeEncoder(double.class, new Encoder.DoubleEncoder() {
@Override
public void encodeDouble(double obj, JsonStream stream) throws IOException {
stream.writeRaw(Double.toString(obj));
}
});
JsoniterSpi.registerTypeEncoder(Float.class, new Encoder.ReflectionEncoder() {
@Override
public void encode(Object obj, JsonStream stream) throws IOException {
stream.writeRaw(obj.toString());
}
@Override
public Any wrap(Object obj) {
Float number = (Float) obj;
return Any.wrap(number.floatValue());
}
});
JsoniterSpi.registerTypeEncoder(float.class, new Encoder.FloatEncoder() {
@Override
public void encodeFloat(float obj, JsonStream stream) throws IOException {
stream.writeRaw(Float.toString(obj));
}
});
}
}
|
[
"taowen@gmail.com"
] |
taowen@gmail.com
|
820d385b9634cdd78f5f97166d58d9fac8bf9a69
|
f47ff185ac78bda4107fbebc1e8a633e0e92dcf1
|
/java/enginetest/tk/nukeduck/cargame/model/Model.java
|
ee7b76881088c787ec71f165257b68b339df8657
|
[
"Unlicense"
] |
permissive
|
mccreery/sandbox
|
bca6b6eb74d1e0dd61f864237aeb50626068d411
|
10afacd0058190fac121dcfecc4a6b4b32058adf
|
refs/heads/master
| 2023-08-28T05:04:17.459689
| 2023-07-25T20:43:44
| 2023-08-09T19:52:54
| 108,036,675
| 1
| 1
|
Unlicense
| 2023-08-09T19:52:55
| 2017-10-23T20:38:15
|
C
|
UTF-8
|
Java
| false
| false
| 2,791
|
java
|
package tk.nukeduck.cargame.model;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL15.*;
import java.nio.FloatBuffer;
import org.lwjgl.BufferUtils;
import org.lwjgl.util.vector.Vector3f;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
public class Model {
public static final Model testCube = ObjectLoader.loadModel("src/cube.mdl").setTexture("src/main.png");
private int[][] faces;
public int renderer;
public Image texture;
public float scale = 1.0F;
public Model(int[][] faces) {
this.faces = faces;
this.updateVBO();
}
public Model setScale(float scale) {
this.scale = scale;
return this;
}
public Model setTexture(String texture) {
try {
this.texture = new Image(texture);
} catch (SlickException e) {
e.printStackTrace();
}
return this;
}
public int vertic;
public void updateVBO() {
FloatBuffer vertexData = BufferUtils.createFloatBuffer(faces.length * 15); // vertex = 3, texture = 2
vertic = faces.length;
System.out.println("Faces:" + faces.length);
for (int[] face : faces) {
vertexData.put(new float[] {
face[0], face[1], face[2], (float) face[3] / 8F, (float) face[4] / 8F, // Vertex 1
face[5], face[6], face[7], (float) face[8] / 8F, (float) face[9] / 8F, // Vertex 2
face[10], face[11], face[12], (float) face[13] / 8F, (float) face[14] / 8F // Vertex 3
});
}
vertexData.flip();
this.renderer = glGenBuffers();
glBindBuffer(GL_ARRAY_BUFFER, this.renderer);
glBufferData(GL_ARRAY_BUFFER, vertexData, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
public void render(Vector3f position, float rotation, float rotationY) {
glPushMatrix(); {
this.texture.bind();
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
glTranslatef(position.x, position.y, position.z);
glRotatef(rotation, 0, 1, 0);
glRotatef(rotationY, 0, 0, 1);
glScalef(scale, scale, scale);
/*glBegin(GL_TRIANGLES);
glVertex3f(0.0F, 0.0F, 0.0F);
glVertex3f(0.0F, 1.0F, 0.0F);
glVertex3f(0.0F, 0.0F, 1.0F);
glEnd();*/
glBindBuffer(GL_ARRAY_BUFFER, this.renderer);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glVertexPointer(3, GL_FLOAT, 20, 0);
glTexCoordPointer(2, GL_FLOAT, 20, 12);
glDrawArrays(GL_TRIANGLES, 0, vertic * 3);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindTexture(GL_TEXTURE_2D, 0);
}
glPopMatrix();
}
}
|
[
"4602020+mccreery@users.noreply.github.com"
] |
4602020+mccreery@users.noreply.github.com
|
66150c39d06b38b62bb9161ffa2e55e6bd6c2b86
|
8f5d3d144cf98de0b0c535526eb65db0702d4ffc
|
/main/java/dqr/blocks/mobFigure/tileEntity/DqmTileEntityFigureDesupisaro1.java
|
b046964ceeb99cd760c04ce38692a9306ed271d7
|
[] |
no_license
|
azelDqm/MC1.7.10_DQRmod
|
54c0790b80c11a8ae591f17d233adc95f1b7e41a
|
bfec0e17fcade9d4616ac29b5abcbb12aa562d2a
|
refs/heads/master
| 2020-04-16T02:26:44.596119
| 2020-04-06T08:58:47
| 2020-04-06T08:58:47
| 57,311,023
| 6
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 632
|
java
|
package dqr.blocks.mobFigure.tileEntity;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
public class DqmTileEntityFigureDesupisaro1 extends TileEntity
{
public Block getBlockType()
{
if (this.blockType == null)
{
this.blockType = this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord);
}
return this.blockType;
}
/**
* Returns block data at the location of this entity (client-only).
*/
public int getBlockMetadata()
{
return this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
}
}
|
[
"azel.dqm@gmail.com"
] |
azel.dqm@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.