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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acfdf02ce92106a8aa5945a76409c727bae50a1c
|
c503c822725e5752935bd942ec702470585c821d
|
/src/com/jasper/designer/actions/FirstPageAction.java
|
9931cf9f5a59e1ae3fc1d78d3f8e968a8c296b68
|
[] |
no_license
|
3356317015/traffic
|
73d17d8ec8d02c86d78a36c959c34cf708bf2d80
|
2bf2d7182fb202e2dc3ed28d818365c9a1bbf05e
|
refs/heads/master
| 2020-03-28T03:23:59.790720
| 2018-09-06T14:00:41
| 2018-09-06T14:00:41
| 147,642,313
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,211
|
java
|
/*
* SWTJasperViewer - Free SWT/JFace report viewer for JasperReports.
* Copyright (C) 2004 Peter Severin (peter_p_s@users.sourceforge.net)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
package com.jasper.designer.actions;
import org.eclipse.jface.resource.ImageDescriptor;
import com.jasper.designer.IReportViewer;
/**
* First page action.
*
* @author Peter Severin (peter_p_s@users.sourceforge.net)
*/
public class FirstPageAction extends AbstractReportViewerAction {
private static final ImageDescriptor ICON =
ImageDescriptor.createFromFile(FirstPageAction.class, "images/first.gif"); //$NON-NLS-1$
private static final ImageDescriptor DISABLED_ICON =
ImageDescriptor.createFromFile(FirstPageAction.class, "images/firstd.gif"); //$NON-NLS-1$
/**
* @see AbstractReportViewerAction#AbstractReportViewerAction(IReportViewer)
*/
public FirstPageAction(IReportViewer viewer) {
super(viewer);
setText(Messages.getString("FirstPageAction.label")); //$NON-NLS-1$
setToolTipText(Messages.getString("FirstPageAction.tooltip")); //$NON-NLS-1$
setImageDescriptor(ICON);
setDisabledImageDescriptor(DISABLED_ICON);
}
/**
* @see com.jasper.designer.actions.AbstractReportViewerAction#runBusy()
*/
protected void runBusy() {
getReportViewer().gotoFirstPage();
}
/**
* @see com.jasper.designer.actions.AbstractReportViewerAction#calculateEnabled()
*/
protected boolean calculateEnabled() {
return getReportViewer().canGotoFirstPage();
}
}
|
[
"3356317015@qq.com"
] |
3356317015@qq.com
|
6792b5eb0d4e6cf973ebc5c44bde6739e3328d50
|
55aca439e180a9bcf0a36f60320013979905d1e5
|
/efreight-sc/src/main/java/com/efreight/sc/service/LcInboundService.java
|
ada71b64744e64bfcc9d9eb4b2491b6ad9dc1b0b
|
[] |
no_license
|
zhoudy-github/efreight-cloud
|
1a8f791f350a37c1f2828985ebc20287199a8027
|
fc669facfdc909b51779a88575ab4351e275bd25
|
refs/heads/master
| 2023-03-18T07:24:18.001404
| 2021-03-23T06:55:54
| 2021-03-23T06:55:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 513
|
java
|
package com.efreight.sc.service;
import com.efreight.sc.entity.LcInbound;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* LC 陆运订单: 操作出重表 服务类
* </p>
*
* @author xiaobo
* @since 2020-07-28
*/
public interface LcInboundService extends IService<LcInbound> {
List<LcInbound> view(Integer orderId);
void insert(LcInbound lcInbound);
void modify(LcInbound lcInbound);
void delete(Integer inboundId,String rowUuid);
}
|
[
"yeliang_sun@163.com"
] |
yeliang_sun@163.com
|
a060eee6f1ab34ead7336543e3c945c725245b21
|
84e41905d2bf955eaae2a82d80eb8f77a59c5f63
|
/thinkwin-yunmeeting-service-auth-parent/thinkwin-yunmeeting-api-auth/src/main/java/com/thinkwin/auth/service/OrganizationService.java
|
32532b77a3f0b659535d8441bc065c5679c275d6
|
[] |
no_license
|
moyu3390/wang
|
ac91803f34e04e55dd5f7d883f779ba736e96aa1
|
207c75752590bf6b3d7d58aedd9e6b3ccc9424d4
|
refs/heads/master
| 2022-01-14T22:36:19.096206
| 2018-08-10T09:50:07
| 2018-08-10T09:50:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,214
|
java
|
package com.thinkwin.auth.service;
import com.github.pagehelper.PageInfo;
import com.thinkwin.common.model.BasePageEntity;
import com.thinkwin.common.model.db.SysOrganization;
import java.util.List;
/**
* User: yinchunlei
* Date: 2017/6/8.
* Company: thinkwin
*/
public interface OrganizationService {
/**
*
* 添加新的组织机构功能
* @param sysOrganization
* @return
*/
public boolean saveOrganization(SysOrganization sysOrganization);
/**
*
* 添加新的组织机构功能(导入使用)
* @return
*/
public boolean saveOrganizationNew(SysOrganization sysOrg);
/**
* 添加新的组织机构并返回新组织机构的主键id
* @param sysOrganization
* @return
*/
public String saveOrganizationReturnString(SysOrganization sysOrganization);
/**
* 根据组织机构id删除相关组织机构信息
* @param organizationId
* @return
*/
public int deleteOrganizationById(String organizationId);
/**
* 修改组织机构信息功能
* @param sysOrganization
* @return
*/
public boolean updateOrganization(SysOrganization sysOrganization);
/**
* 根据组织机构主键id获取相关信息
* @param organiztionId
* @return
*/
public SysOrganization selectOrganiztionById(String organiztionId);
/**
* 根据组织机构名称查询组织机构信息
* @param organiztionName
* @return
*/
public List<SysOrganization> selectOrganiztionByName(String organiztionName);
/**
* 根据部门名称和父id查询组织机构信息
* @return
*/
public List<SysOrganization> selectOrganiztionByNameAndParentId(String deparNamee,String parentId);
/**
* 根据父id获取所有的同级下的组织机构
* @param parentId
* @return
*/
public List<String> selectOrganiztionByParentId(String parentId);
/**
*查询所有组织机构信息
*/
public List<SysOrganization> selectOrganiztions(String parentId);
/**
*查询所有组织机构信息
*/
public List<SysOrganization> selectOrganiztions();
/**
* 查询所有组织机构信息(带分页)
* @param pageEntity
* @return
*/
public PageInfo selectOrganiztionsByPage(BasePageEntity pageEntity);
/**
* 组织机构移动功能
* @param parentId
* @param moveOrgIds
* @return
*/
public Integer organiztionMove(String parentId,List<String> moveOrgIds);
/**
* 组织机构移动功能
* @param parentId
* @param moveType
* @return
*/
public Integer organiztionMove(String parentId,String moveOrgId,String moveType);
/**
* 根据orgaId 查询SysOrganization及其子节点信息
* @param orgaId
* @return
*/
public SysOrganization findOrgaAndChildOrgaByOrgaId(String orgaId);
/**
* 查询orgaId有多少子节点
* @param orgaId
* @return
*/
public Integer getChildrenCount(String orgaId);
/**
* 获取所有组织机构数量功能
* @return
*/
public Integer getOrganizationNum();
}
|
[
"173030685@qq.com"
] |
173030685@qq.com
|
e3484f3d7b523cb61b1620b0de756c410a2b834b
|
13f6652c77abd41d4bc944887e4b94d8dff40dde
|
/archstudio/src/archstudio/comp/archon/ArchonOutputListener.java
|
e12e5d57a2980b32c8c7fbb5a7c1874b5a681287
|
[] |
no_license
|
isr-uci-edu/ArchStudio3
|
5bed3be243981d944577787f3a47c7a94c8adbd3
|
b8aeb7286ea00d4b6c6a229c83b0ee0d1c9b2960
|
refs/heads/master
| 2021-01-10T21:01:43.330204
| 2014-05-31T16:15:53
| 2014-05-31T16:15:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 330
|
java
|
package archstudio.comp.archon;
public interface ArchonOutputListener{
public void archonLine(String interpreterID, String line);
public void archonStdoutLine(String interpreterID, String line);
public void archonStderrLine(String interpreterID, String line);
public void archonEchoLine(String interpreterID, String line);
}
|
[
"sahendrickson@gmail.com"
] |
sahendrickson@gmail.com
|
a694244202dd6e154f27e2dd4716c0b7954f5b51
|
36d7ac13d205b9a5b8c3308a27c4605a1cd7ee56
|
/others/AndEnginePhysicsBox2DExtension-GLES2-AnchorCenter/src/com/badlogic/gdx/physics/box2d/Contact.java
|
f35625a22f7128937814fea7954f1ee1be49298b
|
[] |
no_license
|
renanlr/billyadventures
|
92103d6208f2e80644fca38c2c8a4ad6f2b5a7ce
|
f35384d6355dbbdbc5708b370731d1be1e652f39
|
refs/heads/master
| 2021-01-20T03:39:09.059791
| 2014-12-09T05:03:33
| 2014-12-09T05:03:33
| 23,578,058
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,011
|
java
|
/*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* 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.badlogic.gdx.physics.box2d;
import com.badlogic.gdx.math.Vector2;
/**
* The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if
* filtered). Therefore a contact object may exist that has no contact points.
* @author mzechner
*
*/
public class Contact {
/** the address **/
protected long addr;
/** the world **/
protected World world;
/** the world manifold **/
protected final WorldManifold worldManifold = new WorldManifold();
protected Contact (World world, long addr) {
this.addr = addr;
this.world = world;
}
/**
* Get the world manifold.
*/
private final float[] tmp = new float[6];
public WorldManifold getWorldManifold () {
int numContactPoints = jniGetWorldManifold(addr, tmp);
worldManifold.numContactPoints = numContactPoints;
worldManifold.normal.set(tmp[0], tmp[1]);
for (int i = 0; i < numContactPoints; i++) {
Vector2 point = worldManifold.points[i];
point.x = tmp[2 + i * 2];
point.y = tmp[2 + i * 2 + 1];
}
return worldManifold;
}
private native int jniGetWorldManifold (long addr, float[] manifold);
public boolean isTouching () {
return jniIsTouching(addr);
}
private native boolean jniIsTouching (long addr);
/**
* Enable/disable this contact. This can be used inside the pre-solve contact listener. The contact is only disabled for the
* current time step (or sub-step in continuous collisions).
*/
public void setEnabled (boolean flag) {
jniSetEnabled(addr, flag);
}
private native void jniSetEnabled (long addr, boolean flag);
/**
* Has this contact been disabled?
*/
public boolean isEnabled () {
return jniIsEnabled(addr);
}
private native boolean jniIsEnabled (long addr);
/**
* Get the first fixture in this contact.
*/
public Fixture getFixtureA () {
return world.fixtures.get(jniGetFixtureA(addr));
}
private native long jniGetFixtureA (long addr);
/**
* Get the second fixture in this contact.
*/
public Fixture getFixtureB () {
return world.fixtures.get(jniGetFixtureB(addr));
}
private native long jniGetFixtureB (long addr);
}
|
[
"renan.lobato.rheinboldt@gmail.com"
] |
renan.lobato.rheinboldt@gmail.com
|
c5920a97f521a7412003851ea963878956e62281
|
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
|
/src_procyon/y/f/i/Q_1.java
|
0df16f20fe08232a3dce9945bbd509c20aeba00a
|
[] |
no_license
|
fjh658/bindiff
|
c98c9c24b0d904be852182ecbf4f81926ce67fb4
|
2a31859b4638404cdc915d7ed6be19937d762743
|
refs/heads/master
| 2021-01-20T06:43:12.134977
| 2016-06-29T17:09:03
| 2016-06-29T17:09:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,860
|
java
|
package y.f.i;
import y.f.*;
import y.d.*;
import y.c.*;
class Q extends R
{
private m a;
private d b;
private boolean c;
private int d;
private final boolean e;
private final boolean f;
public Q(final byte b, final m a, final d b2, final boolean c, final int d, final boolean e, final boolean f) {
super(b, a.c().a());
this.a = a;
this.b = b2;
this.c = c;
this.d = d;
this.e = e;
this.f = f;
}
public m a() {
return this.a;
}
private boolean l() {
return this.g() > 0;
}
public boolean b() {
final D m = ((X)this.e().a()).m(this.b);
if (this.l()) {
return ((t)m.b(this.g() - 1).c()).a() <= ((t)m.b(this.g()).c()).a();
}
return !this.m() || this.c();
}
private boolean m() {
return this.g() < ((X)this.e().a()).m(this.b).size() - 2;
}
public boolean c() {
final D m = ((X)this.e().a()).m(this.b);
if (this.m()) {
return ((t)m.b(this.g() + 1).c()).a() > ((t)m.b(this.g() + 2).c()).a();
}
return !this.l() || this.b();
}
public boolean d() {
return !this.l() || !this.m() || (this.l() && this.m() && this.b() != this.c());
}
public d e() {
return this.b;
}
public boolean f() {
return this.c;
}
public int g() {
return this.d;
}
public String toString() {
return "Edge: " + this.b.c() + " -> " + this.b.d() + ", " + (this.f() ? "locked" : "unlocked") + " segment " + this.g() + ", " + this.a.toString();
}
public boolean h() {
return this.e;
}
public boolean i() {
return this.f;
}
static d a(final Q q) {
return q.b;
}
}
|
[
"manouchehri@riseup.net"
] |
manouchehri@riseup.net
|
f5cc1dc5ae2c0a4007e22b519d33f17f7b8628cd
|
ff37047b626a260db4c77e649706f4f0d7cb62fc
|
/rabbitmq-api/rabbitmq-demo01/src/main/java/org/zhouhy/rabbitmq/RabbitApp.java
|
fcf1c0177c9cb0238cdbf347af7511e21e7f7bce
|
[] |
no_license
|
fengandzhy/rabbitmq-demos
|
9fc0263b229e91af9392bd7250a7efc94e95b184
|
a6ad0b944b1fdccc04a51582b12ed3b3595adcc4
|
refs/heads/master
| 2023-01-12T19:30:52.259901
| 2020-11-10T17:05:04
| 2020-11-10T17:05:04
| 293,737,603
| 0
| 0
| null | 2023-09-11T09:19:25
| 2020-09-08T07:42:47
|
Java
|
UTF-8
|
Java
| false
| false
| 305
|
java
|
package org.zhouhy.rabbitmq;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class RabbitApp {
public static void main(String[] args) {
SpringApplication.run(RabbitApp.class,args);
}
}
|
[
"fengandzhy@gmail.com"
] |
fengandzhy@gmail.com
|
ebfe960ff9688115c9a4963abe58ee0dc81e19c2
|
94228df04c8d71ef72d0278ed049e9eac43566bc
|
/modules/materialsummary/materialsummary-api/src/main/java/com/bjike/goddess/materialsummary/api/WarrantyStateWeekSumAPI.java
|
20fb8ecfe7aafed5ea2cfea79303c416b69ec7b4
|
[] |
no_license
|
yang65700/goddess-java
|
b1c99ac4626c29651250969d58d346b7a13eb9ad
|
3f982a3688ee7c97d8916d9cb776151b5af8f04f
|
refs/heads/master
| 2021-04-12T11:10:39.345659
| 2017-09-12T02:32:51
| 2017-09-12T02:32:51
| 126,562,737
| 0
| 0
| null | 2018-03-24T03:33:53
| 2018-03-24T03:33:53
| null |
UTF-8
|
Java
| false
| false
| 2,114
|
java
|
package com.bjike.goddess.materialsummary.api;
import com.bjike.goddess.common.api.exception.SerException;
import com.bjike.goddess.materialsummary.bo.WarrantyStateWeekSumBO;
import com.bjike.goddess.materialsummary.dto.WarrantyStateWeekSumDTO;
import com.bjike.goddess.materialsummary.to.WarrantyStateWeekSumTO;
import java.util.List;
/**
* 保修状态周汇总业务接口
*
* @Author: [ sunfengtao ]
* @Date: [ 2017-05-22 02:50 ]
* @Description: [ 保修状态周汇总业务接口 ]
* @Version: [ v1.0.0 ]
* @Copy: [ com.bjike ]
*/
public interface WarrantyStateWeekSumAPI {
/**
* 根据id查询保修状态周汇总
*
* @param id 保修状态周汇总唯一标识
* @return class WarrantyStateWeekSumBO
* @throws SerException
*/
WarrantyStateWeekSumBO findById(String id) throws SerException;
/**
* 计算总条数
*
* @param dto 保修状态周汇总dto
* @throws SerException
*/
Long count(WarrantyStateWeekSumDTO dto) throws SerException;
/**
* 分页查询保修状态周汇总
*
* @param dto 保修状态周汇总dto
* @return class WarrantyStateWeekSumBO
* @throws SerException
*/
List<WarrantyStateWeekSumBO> list(WarrantyStateWeekSumDTO dto) throws SerException;
/**
* 保存保修状态周汇总
*
* @param to 保修状态周汇总to
* @return class WarrantyStateWeekSumBO
* @throws SerException
*/
WarrantyStateWeekSumBO save(WarrantyStateWeekSumTO to) throws SerException;
/**
* 根据id删除保修状态周汇总
*
* @param id 保修状态周汇总唯一标识
* @throws SerException
*/
void remove(String id) throws SerException;
/**
* 更新保修状态周汇总
*
* @param to 保修状态周汇总to
* @throws SerException
*/
void update(WarrantyStateWeekSumTO to) throws SerException;
/**
* 汇总
*
* @return class WarrantyStateWeekSumBO
* @throws SerException
*/
List<WarrantyStateWeekSumBO> summary() throws SerException;
}
|
[
"sunfengtao_aj@163.com"
] |
sunfengtao_aj@163.com
|
0c60036d686c2d0643c18f849dff3ba53b2e35b3
|
4468800dd72174adada7c612b4343b9be4898a6d
|
/java01/src/step12/ex2/A.java
|
74074d1c0eb6cefc522e5a62e4524308c236a180
|
[] |
no_license
|
sharryhong/java93-hs
|
be793ea5d1e692c62939b001eba9d7a314f42be1
|
ec73dbe0669d26073ec0fd7e7db99548c466cee9
|
refs/heads/master
| 2021-01-23T04:34:06.551942
| 2017-06-23T09:13:33
| 2017-06-23T09:13:33
| 86,209,572
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 329
|
java
|
/* final : 메서드 선언에 final을 붙인다.
* => 서브 클래스에서 재정의할 수 없다.
* => 서브 클래스에서 재정의하지 말아야 할 메서드에 대해 final을 붙인다.
* => 보안상 재정의를 막기 위한 목적 */
package step12.ex2;
public class A {
public final void m() {}
}
|
[
"kshopzoa15@gmail.com"
] |
kshopzoa15@gmail.com
|
5209f40e7a6fc2a6eacb3de7dff013c0619ffbc7
|
3b91ed788572b6d5ac4db1bee814a74560603578
|
/com/tencent/mm/plugin/appbrand/game/c/d$b.java
|
bbc29a6baa33d31950e5d93da82745b26c1255c1
|
[] |
no_license
|
linsir6/WeChat_java
|
a1deee3035b555fb35a423f367eb5e3e58a17cb0
|
32e52b88c012051100315af6751111bfb6697a29
|
refs/heads/master
| 2020-05-31T05:40:17.161282
| 2018-08-28T02:07:02
| 2018-08-28T02:07:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 384
|
java
|
package com.tencent.mm.plugin.appbrand.game.c;
import com.tencent.mm.plugin.appbrand.game.c.d.c;
class d$b implements Runnable {
private c fBo;
private c fBr;
private d$b() {
}
/* synthetic */ d$b(byte b) {
this();
}
public final void run() {
if (this.fBo != null && this.fBr != null) {
this.fBr.j(this);
}
}
}
|
[
"707194831@qq.com"
] |
707194831@qq.com
|
5e70dc6a585a1c03589364c1b6e2c3e69f706371
|
e835b0d2ce3a7260f039f4d1adca4d1891d721b0
|
/ShoppingHall-master/app/src/main/java/com/gionee/client/business/statistic/util/Utils.java
|
c296ba9978aadcd1c26e90fa88a07ddfc513723a
|
[] |
no_license
|
heshicaihao/GN_Gou
|
134e36718e7b44766200afaaf93d1cddf3e37965
|
cc39c0fb859f6df1ed9453f40063d34f9c0161cc
|
refs/heads/master
| 2022-04-10T03:04:04.234546
| 2020-03-29T08:57:40
| 2020-03-29T08:57:40
| 116,622,031
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,020
|
java
|
//Gionee <wangyy><2013-12-09> modify for CR00956169 begin
package com.gionee.client.business.statistic.util;
import java.io.Closeable;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.json.JSONObject;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.os.Build;
import android.os.SystemProperties;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import com.gionee.appupgrade.common.utils.GNDecodeUtils;
import com.gionee.client.business.statistic.business.Constants;
import com.gionee.client.business.util.LogUtils;
public class Utils {
// private static final String TAG = "Utils";
private static String sImei = Constants.DefaultSDKConfig.DEFAULT_IMEI;
private static final long ONE_DAY_MILLISECONDS = 1000 * 60 * 60 * 24;
public static boolean isDateToday(long time) {
long now = System.currentTimeMillis();
long t1 = time / ONE_DAY_MILLISECONDS;
long t2 = now / ONE_DAY_MILLISECONDS;
return t1 == t2;
}
/**
* 判断对象是否非空
*
* @param object
* @return true:空 false:非空
*/
public static boolean isNull(Object object) {
if (object == null) {
return true;
}
return false;
}
/**
* 判断对象是否非空
*
* @param object
* @return true:非空 false:空
*/
public static boolean isNotNull(Object object) {
return !isNull(object);
}
public static boolean isStringNull(CharSequence str) {
return TextUtils.isEmpty(str);
}
public static boolean isStringNotNull(CharSequence str) {
return !TextUtils.isEmpty(str);
}
/**
* 获取错误的信息
*
* @param arg1
* @return
*/
public static String getErrorInfo(Throwable arg1) {
PrintWriter pw = null;
Writer writer = null;
try {
writer = new StringWriter();
pw = new PrintWriter(writer);
arg1.printStackTrace(pw);
pw.flush();
String error = writer.toString();
return error;
} finally {
closeIOStream(pw);
closeIOStream(writer);
}
}
/**
* 获取手机的版本信息
*
* @return
*/
public static String getVersionInfo(Context context) {
try {
PackageManager pm = context.getPackageManager();
PackageInfo info = pm.getPackageInfo(context.getPackageName(), 0);
return "App version: " + info.versionName + " ";
} catch (Exception e) {
e.printStackTrace();
return "Unkown version: ";
}
}
/**
* 关闭io流
*
* @param closeable
*/
public static void closeIOStream(Closeable... closeable) {
if (isNull(closeable)) {
return;
}
for (Closeable ca : closeable) {
try {
if (Utils.isNull(ca)) {
continue;
}
ca.close();
ca = null;
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* 关闭游标
*
* @param cursor
*/
public static void closeCursor(Cursor... cursor) {
if (Utils.isNull(cursor)) {
return;
}
for (Cursor cr : cursor) {
try {
if (Utils.isNull(cr)) {
continue;
}
cr.close();
cr = null;
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* save imei
*
* @return
* @hide
*/
public static void setImei(Context context) {
TelephonyManager telephonyManager = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
if (telephonyManager == null) {
return;
}
String imei = telephonyManager.getDeviceId();
if (Utils.isStringNull(imei)) {
return;
}
sImei = imei;
}
public static String getImei() {
if (Utils.isStringNotNull(sImei)) {
return sImei;
}
return Constants.DefaultSDKConfig.DEFAULT_IMEI;
}
public static String getUaString(String imei) {
try {
@SuppressWarnings("rawtypes")
Class productConfigurationClass = Class.forName("com.amigo.utils.ProductConfiguration");
@SuppressWarnings("unchecked")
Method method = productConfigurationClass.getMethod("getUAString", String.class);
return (String) method.invoke(productConfigurationClass, imei);
} catch (Exception e) {
e.printStackTrace();
}
String brand = SystemProperties.get("ro.product.brand", "GiONEE");
String model = SystemProperties.get("ro.product.model", "Phone");
String extModel = SystemProperties.get("ro.gn.extmodel", "Phone");
String ver = getGioneeRomVersion();
String language = Locale.getDefault().getLanguage();
String country = Locale.getDefault().getCountry().toLowerCase(Locale.CHINESE);
String decodeImei = GNDecodeUtils.get(imei);
String uaString = "Mozilla/5.0 (Linux; U; Android " + Build.VERSION.RELEASE + "; " + language + "-"
+ country + ";" + brand + "-" + model + "/" + extModel
+ " Build/IMM76D) AppleWebKit534.30(KHTML,like Gecko)Version/4.0 Mobile Safari/534.30 Id/"
+ decodeImei + " RV/" + ver;
LogUtils.logd("uaString", "uaString=" + uaString);
return uaString;
}
public static int getFirstNumIndex(String string) {
String regex = "\\d";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(string);
int index = 0;
if (matcher.find() && !"".equals(matcher.group())) {
index = matcher.start();
}
return index;
}
public static String getGioneeRomVersion() {
String gioneeRomPropString = SystemProperties.get("ro.gn.gnromvernumber", "");
int index = getFirstNumIndex(gioneeRomPropString);
return gioneeRomPropString.substring(index);
}
public static String subStringIfNeeded(final String string, int needLength) {
if (Utils.isStringNull(string)) {
return "";
}
String result = "";
if (string.length() > needLength) {
result = string.substring(0, needLength);
} else {
result = string;
}
return result;
}
public static String getProperStringFromMap(final Map<String, Object> map) {
Map<String, String> resultMap = new HashMap<String, String>();
int needStringLength = Constants.DefaultSDKConfig.CFG_DEFAULT_MAX_STRING_LENGTH;
Set<String> keySet = map.keySet();
int i = 0;
for (String key : keySet) {
if (i == Constants.DefaultSDKConfig.CFG_DEFAULT_MAX_MAP_SIZE) {
break;
}
String rightKey = Utils.subStringIfNeeded(key, needStringLength);
// String rightValue = Utils.subStringIfNeeded(map.get(key).toString(), needStringLength);
String rightValue = map.get(key).toString();
resultMap.put(rightKey, rightValue);
i++;
}
return new JSONObject(resultMap).toString();
}
public static long changeMillisecondToSecond(long millisecond) {
return millisecond / 1000;
}
}
//Gionee <wangyy><2013-12-09> modify for CR00956169 end
|
[
"heshicaihao@163.com"
] |
heshicaihao@163.com
|
e560ece72318c9ad3d6dea921304d3c6a106a3a1
|
96f8d42c474f8dd42ecc6811b6e555363f168d3e
|
/budejie/sources/com/budejie/www/activity/SelectorContactsFormWebActivity$a$a.java
|
877eafa53a55bc13d2ee32e32615d5d9509f7392
|
[] |
no_license
|
aheadlcx/analyzeApk
|
050b261595cecc85790558a02d79739a789ae3a3
|
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
|
refs/heads/master
| 2020-03-10T10:24:49.773318
| 2018-04-13T09:44:45
| 2018-04-13T09:44:45
| 129,332,351
| 6
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 399
|
java
|
package com.budejie.www.activity;
import android.widget.TextView;
import com.androidex.widget.asyncimage.AsyncImageView;
import com.budejie.www.activity.SelectorContactsFormWebActivity.a;
public class SelectorContactsFormWebActivity$a$a {
TextView a;
AsyncImageView b;
final /* synthetic */ a c;
public SelectorContactsFormWebActivity$a$a(a aVar) {
this.c = aVar;
}
}
|
[
"aheadlcxzhang@gmail.com"
] |
aheadlcxzhang@gmail.com
|
8c060f952cdaf4641d3ce53a3b1bb0c06ee98d24
|
32bd505bfed24ad0ae0f88b9c754a608cc1da8a6
|
/grafikon-save/src/main/java/net/parostroj/timetable/model/save/version02/LSSerializerImpl2.java
|
6691f828e012d15dfee058586828f155663c5c8d
|
[] |
no_license
|
ranou712/grafikon
|
95741773bd55f93f88cf9434e47cfcb5b2627712
|
d2c86a8c7d547459ada470b59f70338958c1cb6d
|
refs/heads/master
| 2020-04-25T20:44:34.359331
| 2015-03-17T15:09:38
| 2015-03-17T15:09:38
| 33,311,917
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,371
|
java
|
package net.parostroj.timetable.model.save.version02;
import java.io.Reader;
import java.io.Writer;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import net.parostroj.timetable.model.TrainDiagram;
import net.parostroj.timetable.model.ls.LSException;
import net.parostroj.timetable.model.save.LSSerializer;
import net.parostroj.timetable.model.save.LSTrainTypeList;
import net.parostroj.timetable.model.save.NoCloseAllowedReader;
/**
* Implementation of LSSerializer for version 2.0.
*
* @author jub
*/
public class LSSerializerImpl2 extends LSSerializer {
private static JAXBContext context_i;
private Marshaller marshaller;
private Unmarshaller unmarshaller;
private synchronized static JAXBContext getContext() throws JAXBException {
if (context_i == null)
context_i = JAXBContext.newInstance(new Class[]{LSTrainDiagram.class});
return context_i;
}
public LSSerializerImpl2() throws LSException {
try {
JAXBContext context = getContext();
marshaller = context.createMarshaller();
unmarshaller = context.createUnmarshaller();
} catch (JAXBException e) {
throw new LSException("Cannot initialize JAXB context.", e);
}
}
@Override
public TrainDiagram load(Reader reader, LSTrainTypeList trainTypeList) throws LSException {
try {
LSTrainDiagram lsDiagram = (LSTrainDiagram) unmarshaller.unmarshal(new NoCloseAllowedReader(reader));
LSVisitorBuilder builderVisitor = new LSVisitorBuilder(trainTypeList);
lsDiagram.visit(builderVisitor);
return builderVisitor.getTrainDiagram();
} catch (JAXBException e) {
throw new LSException("Cannot load train diagram.", e);
}
}
@Override
public void save(Writer writer, TrainDiagram diagram, LSTrainTypeList trainTypeList) throws LSException {
try {
LSTransformationData data = new LSTransformationData(trainTypeList);
LSTrainDiagram lsDiagram = new LSTrainDiagram(diagram, data);
marshaller.marshal(lsDiagram, writer);
} catch (JAXBException e) {
throw new LSException("Cannot save train diagram.", e);
}
}
}
|
[
"jub@parostroj.net"
] |
jub@parostroj.net
|
85eda7bd1379a78ac3b4fd6718c725b08b2b67ce
|
7a2c91813117a8d949571521510895ee53daad49
|
/src/main/java/com/alipay/api/response/AlipayOpenServicemarketOrderQueryResponse.java
|
d09a742619021500b50353f21cd145966bf6aff7
|
[
"Apache-2.0"
] |
permissive
|
dut3062796s/alipay-sdk-java-all
|
eb5afb5b570fb0deb40d8c960b85a01d13506568
|
559180f4c370f7fcfef67a1c559768d11475c745
|
refs/heads/master
| 2020-07-03T21:00:06.124387
| 2019-06-23T01:13:43
| 2019-06-23T01:13:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,171
|
java
|
package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.OrderItem;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.open.servicemarket.order.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayOpenServicemarketOrderQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 1625343762169491573L;
/**
* 订购服务商品ID
*/
@ApiField("commodity_id")
private String commodityId;
/**
* 当前查询页(本接口支持最多查询100条记录)
*/
@ApiField("current_page")
private Long currentPage;
/**
* 订单明细列表
*/
@ApiListField("order_items")
@ApiField("order_item")
private List<OrderItem> orderItems;
/**
* 用于区分同一个服务的不同版本
*/
@ApiField("specifications")
private String specifications;
/**
* MERCHANT_ORDED(待服务商接单)
*/
@ApiField("status")
private String status;
/**
* 总记录数
*/
@ApiField("total_size")
private Long totalSize;
public void setCommodityId(String commodityId) {
this.commodityId = commodityId;
}
public String getCommodityId( ) {
return this.commodityId;
}
public void setCurrentPage(Long currentPage) {
this.currentPage = currentPage;
}
public Long getCurrentPage( ) {
return this.currentPage;
}
public void setOrderItems(List<OrderItem> orderItems) {
this.orderItems = orderItems;
}
public List<OrderItem> getOrderItems( ) {
return this.orderItems;
}
public void setSpecifications(String specifications) {
this.specifications = specifications;
}
public String getSpecifications( ) {
return this.specifications;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus( ) {
return this.status;
}
public void setTotalSize(Long totalSize) {
this.totalSize = totalSize;
}
public Long getTotalSize( ) {
return this.totalSize;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
1c2f1b6798e4fc15bfa2c607a988c78e51526b1e
|
1df91e0b06c9232e45fd0a417c622c57fdc7454e
|
/test/org/traccar/protocol/SuntechProtocolDecoderTest.java
|
54cc77d6c236c91f8af334b49ff00024d2868b60
|
[
"Apache-2.0"
] |
permissive
|
defconcepts/traccar
|
886a2b4157aea1dcd821dbf0565153bb137d7254
|
d4685d72f8183dedfccbca9756a00948ad8d6aa8
|
refs/heads/master
| 2020-12-14T08:53:33.463382
| 2015-11-03T10:26:48
| 2015-11-03T10:26:48
| 45,493,002
| 2
| 0
| null | 2015-11-03T20:17:46
| 2015-11-03T20:17:46
| null |
UTF-8
|
Java
| false
| false
| 2,649
|
java
|
package org.traccar.protocol;
import org.junit.Test;
import org.traccar.ProtocolDecoderTest;
public class SuntechProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
SuntechProtocolDecoder decoder = new SuntechProtocolDecoder(new SuntechProtocol());
verifyNothing(decoder, text( "SA200ALV;317652"));
verifyPosition(decoder, text(
"ST910;Alert;123456;410;20141018;18:30:12;+37.478774;+126.889690;000.000;000.00;0;4.0;1;6002"));
verifyPosition(decoder, text(
"ST910;Alert;123456;410;20141018;18:30:12;+37.478774;+126.889690;000.000;000.00;0;4.0;1;6002;02;0;0310000100;450;01;-282;70;255;3;0"));
verifyPosition(decoder, text(
"SA200STT;317652;042;20120718;15:37:12;16d41;-15.618755;-056.083241;000.024;000.00;8;1;41548;12.17;100000;2;1979"));
verifyPosition(decoder, text(
"SA200STT;317652;042;20120721;19:04:30;16d41;-15.618743;-056.083221;000.001;000.00;12;1;41557;12.21;000000;1;3125"));
verifyPosition(decoder, text(
"SA200STT;317652;042;20120722;00:24:23;4f310;-15.618767;-056.083214;000.011;000.00;11;1;41557;12.21;000000;1;3205"));
verifyPosition(decoder, text(
"SA200STT;315198;042;20120808;20:37:34;3fac25;-15.618731;-056.083216;000.007;000.00;12;1;48;0.00;000000;1;0127"));
verifyPosition(decoder, text(
"SA200STT;315198;042;20120809;13:43:34;4f310;-15.618709;-056.083223;000.025;000.00;8;1;49;12.10;100000;2;0231"));
verifyPosition(decoder, text(
"SA200EMG;317652;042;20120718;15:35:41;16d41;-15.618740;-056.083252;000.034;000.00;8;1;41548;12.17;110000;1"));
verifyPosition(decoder, text(
"SA200ALT;317652;042;20120829;14:25:58;16d41;-15.618770;-056.083242;000.029;000.00;0;0;2404240;0.00;000000;10"));
verifyPosition(decoder, text(
"SA200STT;430070;133;20130615;22:22:32;151347;+02.860514;-060.653351;000.003;000.00;12;1;0;12.39;000000;1;0208"));
verifyPosition(decoder, text(
"ST910;Location;344506;017;20130727;14:10:00;-25.398714;-049.296818;000.187;000.00;1;4.32;1;1;0001"));
verifyPosition(decoder, text(
"ST300STT;205027329;03;374;20150108;17:54:42;177b38;-23.566052;-046.477588;000.000;000.00;0;0;0;12.11;000000;1;0312"));
verifyPosition(decoder, text(
"ST910;Emergency;205283272;500;20150716;19:12:01;-23.659019;-046.695403;000.602;000.00;0;4.2;1;1;02;10820;2fdb090736;724;05;0;2311;255;0;100"));
}
}
|
[
"anton.tananaev@gmail.com"
] |
anton.tananaev@gmail.com
|
93b15cb5334116bd54d881094a42ca2283821acb
|
e5871ece699da23892937e263068df1378f0a4cd
|
/Hibernate-Projects/03-09. LECTURES/src/main/java/_9_Hibernate_Code_First/Lab_Shampoo_company/entities/ingredients/ChemicalIngredient.java
|
6a52272b31d0b47efe7831eb26494d96a43ae50e
|
[
"MIT"
] |
permissive
|
DenislavVelichkov/Java-DBS-Module-June-2019
|
a047d5f534378b1682410c86595fd40466638cdc
|
643422bf41d99af1e0bbd3898fa5adfba8b2c36c
|
refs/heads/master
| 2022-12-22T12:08:47.625449
| 2020-02-10T09:21:15
| 2020-02-10T09:21:15
| 204,847,760
| 0
| 0
|
MIT
| 2022-12-16T05:03:18
| 2019-08-28T04:26:36
|
Java
|
UTF-8
|
Java
| false
| false
| 220
|
java
|
package Hibernate_Code_First_9.Lab_Shampoo_company.entities.ingredients;
public interface ChemicalIngredient extends Ingredient {
void setChemicalFormula(String chemicalFormula);
String getChemicalFormula();
}
|
[
"denislav.velichkov@gmail.com"
] |
denislav.velichkov@gmail.com
|
29ed3209c9544eb2cd55ef75f187d08a1517cb09
|
798e3563930a7f5098a790d86cba09a53a9030bd
|
/src/com/uas/erp/ac/service/common/PartnersRecordService.java
|
36778a1a62567a5ec0f80d8ab0b35cc458296b5f
|
[] |
no_license
|
dreamvalley/6.0.0
|
c5cabed6f34cab783df16de9ff6ddfc118b7c4fe
|
12ed81bf7a46a649711bcf654bf9bcafe70054c2
|
refs/heads/master
| 2022-02-17T02:31:57.439726
| 2018-07-25T02:52:27
| 2018-07-25T02:52:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,048
|
java
|
package com.uas.erp.ac.service.common;
import java.util.Map;
import org.springframework.ui.ModelMap;
public interface PartnersRecordService {
/**
* 通过营业执照号查询过滤后的信息
*
* @param businessCode
* @return
* @throws Exception
*/
public Map<String, Object> getAllPartnersInfosByBusinessCode(String keyword, Integer start, Integer pageNumber,
Integer pageSize, Integer statusCode) throws Exception;
/**
* 分页获取企业列表
*
* @param keyword
* @param start
* @param pageNumber
* @param pageSize
* @return
* @throws Exception
*/
public Map<String, Object> getUserSpaceDetails(String keyword, Integer start, Integer pageNumber, Integer pageSize)
throws Exception;
public Map<String, Object> invite(String formStore) throws Exception;
public Map<String, Object> getNewPartners(String keyword, Integer start,
Integer page, Integer limit, Integer statusCode) throws Exception;
public Map<String, Object> sync();
public Map<String, Object> addprevendor(String info);
}
|
[
"812669424@qq.com"
] |
812669424@qq.com
|
6c2c498ccd44b2e2f6960ddf1e2a1e3cd1b2b8d7
|
86c67c5c91a09c6c14e71f8c9495193a2811bef8
|
/web/com/hys/qiantai/struts/action/LiveListInterfaceAction.java
|
e26a7971b61e1da063846c4ca4bbbf1ae55b89fd
|
[
"Apache-2.0"
] |
permissive
|
1224500506/NCME-Web
|
41bbd533e1ac040714ac9fd15d25d2c822aacb77
|
3e7a90891185272570165e3fdc40e14830295903
|
refs/heads/master
| 2021-05-11T22:02:20.208605
| 2018-01-15T02:33:59
| 2018-01-15T02:33:59
| 117,483,652
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,131
|
java
|
package com.hys.qiantai.struts.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.displaytag.properties.SortOrderEnum;
import com.hys.exam.model.CV;
import com.hys.exam.service.local.CVManage;
import com.hys.exam.utils.PageUtil;
import com.hys.exam.utils.Pager;
import com.hys.framework.web.action.BaseAction;
public class LiveListInterfaceAction extends BaseAction {
@Override
protected String actionExecute(ActionMapping arg0, ActionForm arg1,
HttpServletRequest request, HttpServletResponse arg3) throws Exception {
Pager<CV> pl = new Pager<CV>();
String xueke = "直播入口";
int currentPage = PageUtil.getPageIndex2(request);
pl.setPageOffset(currentPage);
pl.setSortDirection(SortOrderEnum.DESCENDING);
pl.setUrl("liveListInterface.do");
pl.setQueryString(request);
request.setAttribute("xueke", xueke);
request.setAttribute("pager", pl);
return "listIn";
}
}
|
[
"weeho@DESKTOP-71D9DPN"
] |
weeho@DESKTOP-71D9DPN
|
48a624547cc674ae472c9fe63c0bbec78c94c049
|
3e3648a2085467c2d44742e42b08a5209be2201b
|
/src/main/java/com/triplived/dao/common/ListContainer.java
|
d984045794f4c24d61346d0ca1a54cc29fc144e9
|
[] |
no_license
|
amigujarathi/Triplived1
|
a9e05e418754399b76c67108e29d83708f951513
|
12efe5b5aab962494fb898821810d66d0b43aed6
|
refs/heads/master
| 2021-01-01T15:52:30.002961
| 2017-07-19T13:23:04
| 2017-07-19T13:23:04
| 97,718,409
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 411
|
java
|
package com.triplived.dao.common;
import java.util.List;
public class ListContainer<T> {
List<T> entityList;
int totalCount;
public List<T> getEntityList() {
return entityList;
}
public void setEntityList(List<T> entityList) {
this.entityList = entityList;
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
}
|
[
"support@pharmerz.com"
] |
support@pharmerz.com
|
bd1a3dc2495c962d672f665fdd28b5e0ac689b42
|
cae8c523b132e2b91cb8b3cd44e997dd4a1bca8d
|
/src/main/java/com/jungle/ZiJieTiaoDong/StringChallenge01/简化路径.java
|
a50fb586052496396dabd6849a8c2ef370930c15
|
[] |
no_license
|
junglegodlion/JianZhiOffer
|
5d9d2298cf86c25b5653d94d8ba94d77f18f2b01
|
8e54670f61dacc5a7b320136f40632dd3c978f7b
|
refs/heads/master
| 2022-09-12T03:30:36.037508
| 2020-06-02T11:23:34
| 2020-06-02T11:23:34
| 268,781,199
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,017
|
java
|
package com.jungle.ZiJieTiaoDong.StringChallenge01;
import java.util.Stack;
public class 简化路径 {
public String simplifyPath(String path) {
String[] s = path.split("/");
Stack<String> stack = new Stack<>();
for (int i = 0; i < s.length; i++) {
if (!stack.isEmpty() && s[i].equals(".."))
stack.pop();
else if (!s[i].equals("") && !s[i].equals(".") && !s[i].equals(".."))
stack.push(s[i]);
}
if (stack.isEmpty())
return "/";
StringBuffer res = new StringBuffer();
for (int i = 0; i < stack.size(); i++) {
res.append("/" + stack.get(i));
}
return res.toString();
}
// 作者:StackOverflow-
// 链接:https://leetcode-cn.com/problems/simplify-path/solution/java-yi-dong-yi-jie-xiao-lu-gao-by-spirit-9-18/
// 来源:力扣(LeetCode)
// 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
}
|
[
"1037044430@qq.com"
] |
1037044430@qq.com
|
64aa6d7298248f894f0a4175e6cf9f7e82c0b8a1
|
3ed6ef9ac5e0704d2418fad0cfb44e3097792539
|
/chapter09/src/main/java/com/blogspot/toomuchcoding/book/chapter9/InjectingWithSpringockito/TaxConfiguration.java
|
456d4d06fba6b17f970a868f74766b0dc6e71b6a
|
[
"Apache-2.0"
] |
permissive
|
a5535772/mockito-cookbook
|
6655967798eb90e283e2738acc6cee63ec173a1a
|
54350c74741d26d8750990b33631ba75f3b751c9
|
refs/heads/master
| 2020-03-18T11:54:54.597899
| 2018-05-25T03:28:58
| 2018-05-25T03:28:58
| 134,697,791
| 0
| 0
|
Apache-2.0
| 2018-05-24T10:11:34
| 2018-05-24T10:11:34
| null |
UTF-8
|
Java
| false
| false
| 448
|
java
|
package com.blogspot.toomuchcoding.book.chapter9.InjectingWithSpringockito;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
class TaxConfiguration {
@Bean
public TaxService taxService() {
return new TaxService();
}
@Bean
public TaxTransferer taxTransferer(TaxService taxService) {
return new TaxTransferer(taxService);
}
}
|
[
"marcin@grzejszczak.pl"
] |
marcin@grzejszczak.pl
|
6449526eb9885d0fa0dcff8185aa54556a563ceb
|
9623f83defac3911b4780bc408634c078da73387
|
/powercraft_146/src/minecraft/net/minecraft/entity/ai/EntityAIOcelotSit.java
|
ff937151f73d25314d58ea3ad467ce46158a3687
|
[] |
no_license
|
BlearStudio/powercraft-legacy
|
42b839393223494748e8b5d05acdaf59f18bd6c6
|
014e9d4d71bd99823cf63d4fbdb65c1b83fde1f8
|
refs/heads/master
| 2021-01-21T21:18:55.774908
| 2015-04-06T20:45:25
| 2015-04-06T20:45:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,314
|
java
|
package net.minecraft.entity.ai;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBed;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.tileentity.TileEntityChest;
import net.minecraft.world.World;
public class EntityAIOcelotSit extends EntityAIBase
{
private final EntityOcelot theOcelot;
private final float field_75404_b;
/** Tracks for how long the task has been executing */
private int currentTick = 0;
private int field_75402_d = 0;
/** For how long the Ocelot should be sitting */
private int maxSittingTicks = 0;
/** X Coordinate of a nearby sitable block */
private int sitableBlockX = 0;
/** Y Coordinate of a nearby sitable block */
private int sitableBlockY = 0;
/** Z Coordinate of a nearby sitable block */
private int sitableBlockZ = 0;
public EntityAIOcelotSit(EntityOcelot par1EntityOcelot, float par2)
{
this.theOcelot = par1EntityOcelot;
this.field_75404_b = par2;
this.setMutexBits(5);
}
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute()
{
return this.theOcelot.isTamed() && !this.theOcelot.isSitting() && this.theOcelot.getRNG().nextDouble() <= 0.006500000134110451D && this.getNearbySitableBlockDistance();
}
/**
* Returns whether an in-progress EntityAIBase should continue executing
*/
public boolean continueExecuting()
{
return this.currentTick <= this.maxSittingTicks && this.field_75402_d <= 60 && this.isSittableBlock(this.theOcelot.worldObj, this.sitableBlockX, this.sitableBlockY, this.sitableBlockZ);
}
/**
* Execute a one shot task or start executing a continuous task
*/
public void startExecuting()
{
this.theOcelot.getNavigator().tryMoveToXYZ((double)((float)this.sitableBlockX) + 0.5D, (double)(this.sitableBlockY + 1), (double)((float)this.sitableBlockZ) + 0.5D, this.field_75404_b);
this.currentTick = 0;
this.field_75402_d = 0;
this.maxSittingTicks = this.theOcelot.getRNG().nextInt(this.theOcelot.getRNG().nextInt(1200) + 1200) + 1200;
this.theOcelot.func_70907_r().setSitting(false);
}
/**
* Resets the task
*/
public void resetTask()
{
this.theOcelot.setSitting(false);
}
/**
* Updates the task
*/
public void updateTask()
{
++this.currentTick;
this.theOcelot.func_70907_r().setSitting(false);
if (this.theOcelot.getDistanceSq((double)this.sitableBlockX, (double)(this.sitableBlockY + 1), (double)this.sitableBlockZ) > 1.0D)
{
this.theOcelot.setSitting(false);
this.theOcelot.getNavigator().tryMoveToXYZ((double)((float)this.sitableBlockX) + 0.5D, (double)(this.sitableBlockY + 1), (double)((float)this.sitableBlockZ) + 0.5D, this.field_75404_b);
++this.field_75402_d;
}
else if (!this.theOcelot.isSitting())
{
this.theOcelot.setSitting(true);
}
else
{
--this.field_75402_d;
}
}
/**
* Searches for a block to sit on within a 8 block range, returns 0 if none found
*/
protected boolean getNearbySitableBlockDistance()
{
int var1 = (int)this.theOcelot.posY;
double var2 = 2.147483647E9D;
for (int var4 = (int)this.theOcelot.posX - 8; (double)var4 < this.theOcelot.posX + 8.0D; ++var4)
{
for (int var5 = (int)this.theOcelot.posZ - 8; (double)var5 < this.theOcelot.posZ + 8.0D; ++var5)
{
if (this.isSittableBlock(this.theOcelot.worldObj, var4, var1, var5) && this.theOcelot.worldObj.isAirBlock(var4, var1 + 1, var5))
{
double var6 = this.theOcelot.getDistanceSq((double)var4, (double)var1, (double)var5);
if (var6 < var2)
{
this.sitableBlockX = var4;
this.sitableBlockY = var1;
this.sitableBlockZ = var5;
var2 = var6;
}
}
}
}
return var2 < 2.147483647E9D;
}
/**
* Determines wheter the Ocelot wants to sit on the block at given coordinate
*/
protected boolean isSittableBlock(World par1World, int par2, int par3, int par4)
{
int var5 = par1World.getBlockId(par2, par3, par4);
int var6 = par1World.getBlockMetadata(par2, par3, par4);
if (var5 == Block.chest.blockID)
{
TileEntityChest var7 = (TileEntityChest)par1World.getBlockTileEntity(par2, par3, par4);
if (var7.numUsingPlayers < 1)
{
return true;
}
}
else
{
if (var5 == Block.stoneOvenActive.blockID)
{
return true;
}
if (var5 == Block.bed.blockID && !BlockBed.isBlockHeadOfBed(var6))
{
return true;
}
}
return false;
}
}
|
[
"nils.h.emmerich@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c"
] |
nils.h.emmerich@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c
|
1f8db62b7d083696ab7c3273f0359d61b8a2631d
|
9b9f99a14207929c4820932e225daae5200e1cd7
|
/18-Dialogos/app/src/main/java/com/example/profesormanana/a18_dialogos/MainActivity.java
|
89453d8fcc2392210e3c43a331c4dbc63d65f452
|
[] |
no_license
|
SkawMaster/AndroidTelefonicaPUEJunio2017
|
e3d95a9e8dfe1cc8f822ad4a77bacc8f10a85c7e
|
f81f04c49f2c863bc2eaee651156f78bf1b890eb
|
refs/heads/master
| 2021-06-19T05:42:35.900284
| 2017-06-22T12:35:53
| 2017-06-22T12:35:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,126
|
java
|
package com.example.profesormanana.a18_dialogos;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.DatePicker;
import android.widget.TextView;
import android.widget.Toast;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
public class MainActivity extends AppCompatActivity implements View.OnClickListener, MiInterface {
private TextView botonBasico;
private String[] datos = new String[]{"Rojo", "Verde", "Azul"};
private TextView botonSeleccion;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
botonBasico = (TextView) findViewById(R.id.btBasico);
botonSeleccion = (TextView) findViewById(R.id.btSeleccion);
botonBasico.setOnClickListener(this);
findViewById(R.id.btPersonalizado).setOnClickListener(this);
botonSeleccion.setOnClickListener(this);
findViewById(R.id.btFecha).setOnClickListener(this);
findViewById(R.id.btProgreso).setOnClickListener(this);
findViewById(R.id.btTiempo).setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.btBasico:
AlertDialogFragment alertDialogFragment = new AlertDialogFragment();
alertDialogFragment.setNegativeListener(new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//Toast.makeText(MainActivity.this, "Se pulso el NO", Toast.LENGTH_SHORT).show();
botonBasico.setText("No");
}
});
alertDialogFragment.setPositiveListener(new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//Toast.makeText(MainActivity.this, "Se pulso el Si", Toast.LENGTH_SHORT).show();
botonBasico.setText("Si");
}
});
alertDialogFragment.show(getSupportFragmentManager(), "AlertDialog");
break;
case R.id.btPersonalizado:
PersonalizadoDialogFragment personalizadoDialogFragment = new PersonalizadoDialogFragment();
personalizadoDialogFragment.show(getSupportFragmentManager(),"PersonalizadoDialog");
break;
case R.id.btSeleccion:
SeleccionDialogFragment seleccionDialogFragment = new SeleccionDialogFragment();
seleccionDialogFragment.setDatos(datos);
seleccionDialogFragment.setMultiChoiceListener(new DialogInterface.OnMultiChoiceClickListener() {
@Override
public void onClick(DialogInterface dialog, int which, boolean isChecked) {
//Toast.makeText(MainActivity.this, "Se ha seleccionado: " + datos[which], Toast.LENGTH_SHORT).show();
botonSeleccion.setText(datos[which]);
}
});
seleccionDialogFragment.show(getSupportFragmentManager(), "SeleccionDialog");
break;
case R.id.btFecha:
Calendar calendar = Calendar.getInstance();
DatePickerDialog datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
Toast.makeText(MainActivity.this,year + "/" + monthOfYear + "/" + dayOfMonth, Toast.LENGTH_LONG).show();
}
}, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
datePickerDialog.show();
break;
case R.id.btProgreso:
ProgressDialog progressDialog = new ProgressDialog(this);
progressDialog.setMax(100);
progressDialog.setProgress(0);
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progressDialog.show();
for (int i = 0; i < 100; i = i + 10 ){
progressDialog.setProgress(i);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
break;
case R.id.btTiempo:
break;
}
}
@Override
public void establecerResultadoPersonalizado(String dato){
botonSeleccion.setText(dato);
}
}
|
[
"victorherrerocazurro@gmail.com"
] |
victorherrerocazurro@gmail.com
|
228e814d3736d8dc9e4a1d63b7a041192969825b
|
40f6fee9651790cfc909f51349c7bd96011f7c77
|
/day26/src/com/io/am/Ex07.java
|
1111b09506e365e8e5c68f2f3062cf48fa469d3f
|
[] |
no_license
|
nowdoitgo/2016java
|
849eb38f66f6679459bcf43fa07a43ae73f2e3fc
|
3f5669696921931bb714cd7c504de249c27d5ad0
|
refs/heads/master
| 2021-06-10T04:46:00.293578
| 2017-01-02T05:48:36
| 2017-01-02T05:48:36
| null | 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 611
|
java
|
package com.io.am;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class Ex07 {
public static void main(String[] args) {
String dir ="../../public/temp";
File file = new File(dir,"abc.bin");
char[] buf = "헬로우".toCharArray();
// char[] buf = new char[5];
// buf[0]='안';
// buf[1]='녕';
// buf[2]='하';
// buf[3]='세';
// buf[4]='요';
FileWriter fw= null;
try {
fw = new FileWriter(file);
fw.write(buf);
fw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
[
"hb.6class@gmail.com"
] |
hb.6class@gmail.com
|
7a0a5db8029b8673010f6a0ea21990dfd7a0aa9b
|
4c19b724f95682ed21a82ab09b05556b5beea63c
|
/XMSYGame/java2/network/qiniu/src/main/java/com/xmsy/network/qiniu/QiniuConstant.java
|
899f41dbecb1c9b5b27d6696496ed81d42902ea1
|
[] |
no_license
|
angel-like/angel
|
a66f8fda992fba01b81c128dd52b97c67f1ef027
|
3f7d79a61dc44a9c4547a60ab8648bc390c0f01e
|
refs/heads/master
| 2023-03-11T03:14:49.059036
| 2022-11-17T11:35:37
| 2022-11-17T11:35:37
| 222,582,930
| 3
| 5
| null | 2023-02-22T05:29:45
| 2019-11-19T01:41:25
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 699
|
java
|
package com.xmsy.network.qiniu;
/**
* .常量定义
*
* @author chenjisi
* @since 2017年8月15日
*/
public class QiniuConstant {
public static final String QINIU = "qiniu"; // 七牛
public static final String BUCKET_PULIC = "zxyy-webhome";// 公有空间
public static final String BUCKET_PRIVATE = "private-zxyy";// 私有空间
public static final String ACCESS_KEY1 = "access-key1";// 密钥1
public static final String SECRET_KEY1 = "secret-key1";// 密钥1
public static final String ACCESS_KEY2 = "access-key2";// 密钥2
public static final String SECRET_KEY2 = "secret-key2";// 密钥2
public static final String PRIVATE_DOMAIN = "private-domain";// 私有空间域名
}
|
[
"163@qq.com"
] |
163@qq.com
|
92582726c67e7a6e7d5950d11767746b968b9293
|
1161d0000dc1993be896ff0efed6b3bf165020ef
|
/km-common/src/main/java/com/xiaojukeji/know/streaming/km/common/bean/entity/search/SearchSort.java
|
7707a7285c1a171e87e87e58edffd193fd32fd88
|
[
"AGPL-3.0-only"
] |
permissive
|
zJiaJun/kafka-manager
|
33345b5d56768ae8b6b1a46dd8e7924788595ff1
|
db044caf8bb0e5ac5ef6cc457bad1b7e174fbb65
|
refs/heads/master
| 2023-05-10T20:54:57.187103
| 2023-04-26T08:54:26
| 2023-04-26T14:50:16
| 278,667,612
| 0
| 0
|
Apache-2.0
| 2020-07-10T15:21:07
| 2020-07-10T15:21:06
| null |
UTF-8
|
Java
| false
| false
| 797
|
java
|
package com.xiaojukeji.know.streaming.km.common.bean.entity.search;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import static com.xiaojukeji.know.streaming.km.common.constant.ESConstant.TIME_STAMP;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SearchSort extends SearchQuery{
public static final SearchSort DEFAULT = new SearchSort(TIME_STAMP, true);
private boolean desc;
public SearchSort(String fieldName, boolean desc){
super(fieldName);
this.desc = desc;
}
public SearchSort(String fieldName, boolean desc, boolean metric){
super(fieldName);
this.desc = desc;
this.metric = metric;
}
@Override
public boolean valid(){
return validSuper();
}
}
|
[
"zengqiao@didiglobal.com"
] |
zengqiao@didiglobal.com
|
f9dd1d74323bf6ef2159272a4d33c4c079d6bb6e
|
be16632b9c4bf9a4f72239779ba9510511b309db
|
/Current/Product/Production/Packages/FitNesse/Install/Product/FitNesse/Dev/fitnesse-plugins/src/com/targetprocess/integration/task/ArrayOfPriorityDTO.java
|
4731316d6e834dcfcbef167fe87428d1f1800d09
|
[] |
no_license
|
vardars/ci-factory
|
7430c2afb577937fb598b5af3709990e674e7d05
|
b83498949f48948d36dc488310cf280dbd98ecb7
|
refs/heads/master
| 2020-12-25T19:26:17.750522
| 2015-07-10T10:58:10
| 2015-07-10T10:58:10
| 38,868,165
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,032
|
java
|
package com.targetprocess.integration.task;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ArrayOfPriorityDTO complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ArrayOfPriorityDTO">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="PriorityDTO" type="{http://targetprocess.com}PriorityDTO" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ArrayOfPriorityDTO", propOrder = {
"priorityDTO"
})
public class ArrayOfPriorityDTO {
@XmlElement(name = "PriorityDTO", required = true, nillable = true)
protected List<PriorityDTO> priorityDTO;
/**
* Gets the value of the priorityDTO property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the priorityDTO property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getPriorityDTO().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link PriorityDTO }
*
*
*/
public List<PriorityDTO> getPriorityDTO() {
if (priorityDTO == null) {
priorityDTO = new ArrayList<PriorityDTO>();
}
return this.priorityDTO;
}
}
|
[
"cifactory@571f4c53-cd24-0410-92e9-33dde47f2f63"
] |
cifactory@571f4c53-cd24-0410-92e9-33dde47f2f63
|
48f2e9bea6b6611070d8fb54cd4df2cba6bbb1fa
|
d7c5121237c705b5847e374974b39f47fae13e10
|
/airspan.netspan/src/main/java/Netspan/NBI_17_0/Backhaul/IbBaseStates.java
|
7f2dba17b3b5cec46aa3eb7af654b0dda4f0988e
|
[] |
no_license
|
AirspanNetworks/SWITModules
|
8ae768e0b864fa57dcb17168d015f6585d4455aa
|
7089a4b6456621a3abd601cc4592d4b52a948b57
|
refs/heads/master
| 2022-11-24T11:20:29.041478
| 2020-08-09T07:20:03
| 2020-08-09T07:20:03
| 184,545,627
| 1
| 0
| null | 2022-11-16T12:35:12
| 2019-05-02T08:21:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,247
|
java
|
package Netspan.NBI_17_0.Backhaul;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for IbBaseStates.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="IbBaseStates">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="InService"/>
* <enumeration value="OutOfService"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "IbBaseStates")
@XmlEnum
public enum IbBaseStates {
@XmlEnumValue("InService")
IN_SERVICE("InService"),
@XmlEnumValue("OutOfService")
OUT_OF_SERVICE("OutOfService");
private final String value;
IbBaseStates(String v) {
value = v;
}
public String value() {
return value;
}
public static IbBaseStates fromValue(String v) {
for (IbBaseStates c: IbBaseStates.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"dshalom@airspan.com"
] |
dshalom@airspan.com
|
0d0eebf678cd50a1368b073a5d14229872ee5430
|
a1d2d2eb0357a7beac631fe574d3fe7c7f301983
|
/src/StringDemo.java
|
8a0b69e0bec9f176bf0de18d645f97ac89f5601c
|
[] |
no_license
|
PavanDhumwad/Core-Java
|
1e7ac30be8f4db91d1a5be0b9ce7de8fbb458b8a
|
02b54728df6eae01f1eaedc7eed8d9153177a2aa
|
refs/heads/master
| 2020-09-08T00:02:04.350891
| 2020-05-03T12:39:57
| 2020-05-03T12:39:57
| 220,951,052
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,601
|
java
|
import java.util.Scanner;
public class StringDemo {
public static void main(String[] args) {
String s1 = "ABC";
String s2 = new String("ABCd");
System.out.println(s1.equals(s2) );
/*Scanner s=new Scanner(System.in);
System.out.println("Enter:");
StringBuffer b=new StringBuffer(s.next());
System.out.println("Information entered:"+b);
System.out.println("Capacity of StringBuffer is "+b.capacity());
System.out.println("Reverse format of string entered is "+b.reverse());
String c=new String(b);
System.out.println(c);
System.out.println("Upper case format of Reversed string entered is "+c.toUpperCase());
c=c.toUpperCase();
System.out.println(c);
b=new StringBuffer(c);
System.out.println("Enter:");
StringBuffer d=new StringBuffer(s.next());
b=b.append(d);
d=b;
System.out.println("String after appending the Upper case formated of Reversed string is "+d);
System.out.println(d.length());
char result[]=new char[d.length()];
char temp;
int k,i;
for(i=0;i<(d.length());i++){
result[i]=d.charAt(i);
System.out.print(result[i]);
}
for(i=0;i<(d.length()-1);i++)
{
for(k=i+1;k<d.length();k++)
{
if(result[i]>result[k])
{
temp=result[i];
result[i]=result[k];
result[k]=temp;
}
}
}
System.out.println("\n\n\nAfter sorting:");
for(i=0;i<(d.length());i++)
System.out.print(result[i]); */
}
}
|
[
"abc@abc.com"
] |
abc@abc.com
|
d627649d2b12a2f84eb5150c464fb2d8192ceec1
|
2bcb287f17e89a9a959ed634235c4cfff0a486a1
|
/_/8280_10/All-05192010/AccessServices-MoonlightWeb/src/PayMeLibrary/CcPayResponse.java
|
bf57bf0567c8df6e004b6aea43d04847784e476c
|
[
"Apache-2.0"
] |
permissive
|
paullewallencom/ibm-websphere-978-1-8471-9828-0
|
5f26c77cd34bf17dc6bde31f190d381dd6869cf5
|
0b68bee44f28105ca8d5573afe94b8474dee273e
|
refs/heads/main
| 2023-02-06T19:15:45.550795
| 2021-01-01T00:23:13
| 2021-01-01T00:23:13
| 319,491,742
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,039
|
java
|
/**
* CcPayResponse.java
*
* This file was auto-generated from WSDL
* by the IBM Web services WSDL2Java emitter.
* cf230904.14 v13009114817
*/
package PayMeLibrary;
public class CcPayResponse {
private java.lang.String confirmationId;
private PayMeLibrary.Rejection rejection;
private PayMeLibrary.CcPayRequest origRequest;
public CcPayResponse() {
}
public java.lang.String getConfirmationId() {
return confirmationId;
}
public void setConfirmationId(java.lang.String confirmationId) {
this.confirmationId = confirmationId;
}
public PayMeLibrary.Rejection getRejection() {
return rejection;
}
public void setRejection(PayMeLibrary.Rejection rejection) {
this.rejection = rejection;
}
public PayMeLibrary.CcPayRequest getOrigRequest() {
return origRequest;
}
public void setOrigRequest(PayMeLibrary.CcPayRequest origRequest) {
this.origRequest = origRequest;
}
}
|
[
"paullewallencom@users.noreply.github.com"
] |
paullewallencom@users.noreply.github.com
|
999be0d64a82099775fd44f957cd0a6f787b5dfd
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_05f171f308e8e2cdbff9681e004f57f01edcc998/ConnectionInfoBoxTest/9_05f171f308e8e2cdbff9681e004f57f01edcc998_ConnectionInfoBoxTest_t.java
|
50ef039fb1ac5a32fc4b62fdfc92582f773fb9d3
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,366
|
java
|
package client.testing;
/**
* All testing for the ConnectionInfoBox will be done manually. The tests
* will check that the ConnectionInfoBox is formatted and functioning properly.
* The ConnectionInfoBox should be formatted as follows:
*
* --------------------
* | IPLabel |
* --------------------
* | portLabel |
* --------------------
* | submitButton |
* --------------------
*
* We will check for the following things:
* - Overall Layout:
* - IPLabel, PortLabel, and submitButton are laid out as shown above
* - Window is not resizable
* - IPLabel:
* - Contains a JTextField with initial value "192.30.35.221"
* - JTextField is editable
* - Has left-aligned title "Input IP Address of Server Host"
* - portLabel:
* - Contains a JTextField with initial values "4567"
* - JTextField is editable
* - Has left-aligned title "Input Port Number"
* - submitButton:
* - Contains a JButton with label "Start Chat Client!"
* - Clicking button closes the window and opens a ChatClient with specified
* port number and IP address
*
* @category no_didit
*/
public class ConnectionInfoBoxTest {
public void test() {} //empty test to pass didit
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
69594eabae545473123a71d863e3dc748fbfb6be
|
34d20b7852724e58d48fbe6685cf47c83e6016b5
|
/springboot-simple2-mq/springboot-simple2-rabbitmq/src/main/java/com/iee/rabbitmq/controller.java
|
834b78102e78eb79312710e1dbc78ff7a6450b05
|
[] |
no_license
|
oneii/springboot-simple2
|
af7cd9e4a8363ec7989d496392b731f7ae0bd2a2
|
1c8a85e0e64ce21c5b8b06e43a98c117918d25f5
|
refs/heads/master
| 2020-06-02T10:31:57.901022
| 2019-06-05T07:09:57
| 2019-06-05T07:09:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 627
|
java
|
package com.iee.rabbitmq;
import com.alibaba.fastjson.JSON;
import com.iee.common.entity.User;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import java.io.Serializable;
/**
* @ClassName controller
* @Description TODO
* @Author longxiaonan@163.com
* @Date 2018/9/10 0010 21:00
*/
public class controller implements Serializable {
@Autowired
private AmqpTemplate rabbitTemplate;
public void send(User user, String s) {
String content = JSON.toJSONString(user);
this.rabbitTemplate.convertAndSend("stone", content);
}
}
|
[
"longxiaonan@163.com"
] |
longxiaonan@163.com
|
e43451514716fbe73215aac52dfed5ff7859b4a2
|
2bc2eadc9b0f70d6d1286ef474902466988a880f
|
/tags/mule-2.2.1/modules/management/src/test/java/org/mule/management/config/ManagementNamespaceHandlerTestCase.java
|
b561ac90d10f1aae8fa1fbad00a7f5cb1b8657d7
|
[] |
no_license
|
OrgSmells/codehaus-mule-git
|
085434a4b7781a5def2b9b4e37396081eaeba394
|
f8584627c7acb13efdf3276396015439ea6a0721
|
refs/heads/master
| 2022-12-24T07:33:30.190368
| 2020-02-27T19:10:29
| 2020-02-27T19:10:29
| 243,593,543
| 0
| 0
| null | 2022-12-15T23:30:00
| 2020-02-27T18:56:48
| null |
UTF-8
|
Java
| false
| false
| 5,027
|
java
|
/*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.management.config;
import org.mule.agent.EndpointNotificationLoggerAgent;
import org.mule.agent.Log4jNotificationLoggerAgent;
import org.mule.api.agent.Agent;
import org.mule.api.registry.Registry;
import org.mule.module.management.agent.JmxAgent;
import org.mule.module.management.agent.JmxServerNotificationAgent;
import org.mule.module.management.agent.Log4jAgent;
import org.mule.module.management.agent.Mx4jAgent;
import org.mule.module.management.agent.YourKitProfilerAgent;
import org.mule.module.management.support.AutoDiscoveryJmxSupportFactory;
import org.mule.module.management.support.JmxSupport;
import org.mule.module.management.support.JmxSupportFactory;
import org.mule.tck.FunctionalTestCase;
import org.mule.tck.testmodels.mule.TestAgent;
import java.util.Collection;
import java.util.Iterator;
public class ManagementNamespaceHandlerTestCase extends FunctionalTestCase
{
private static final int CHAINSAW_PORT = 8080;
protected JmxSupportFactory jmxSupportFactory = AutoDiscoveryJmxSupportFactory.getInstance();
protected JmxSupport jmxSupport = jmxSupportFactory.getJmxSupport();
protected String getConfigResources()
{
return "management-namespace-config.xml";
}
public void testSimpleJmxAgentConfig() throws Exception
{
Agent agent = muleContext.getRegistry().lookupAgent("jmx-server");
assertNotNull(agent);
assertEquals(JmxAgent.class, agent.getClass());
JmxAgent jmxAgent = (JmxAgent) agent;
assertEquals(true, jmxAgent.isCreateServer());
assertEquals(true, jmxAgent.isLocateServer());
assertEquals(true, jmxAgent.isEnableStatistics());
agent = muleContext.getRegistry().lookupAgent("jmx-log4j");
assertNotNull(agent);
assertEquals(Log4jAgent.class, agent.getClass());
agent = muleContext.getRegistry().lookupAgent("jmx-mx4j-adaptor");
assertNotNull(agent);
assertEquals(Mx4jAgent.class, agent.getClass());
Mx4jAgent mx4jAgent = (Mx4jAgent) agent;
assertEquals(mx4jAgent.getJmxAdaptorUrl(), "http://127.0.0.1:8000");
agent = muleContext.getRegistry().lookupAgent("jmx-notifications");
assertNotNull(agent);
assertEquals(JmxServerNotificationAgent.class, agent.getClass());
agent = muleContext.getRegistry().lookupAgent("log4j-notifications");
assertNotNull(agent);
assertEquals(Log4jNotificationLoggerAgent.class, agent.getClass());
agent = muleContext.getRegistry().lookupAgent("chainsaw-notifications");
assertNotNull(agent);
assertEquals(Log4jNotificationLoggerAgent.class, agent.getClass());
Log4jNotificationLoggerAgent lnlAgent = (Log4jNotificationLoggerAgent) agent;
assertEquals(lnlAgent.getChainsawPort(), CHAINSAW_PORT);
assertEquals(lnlAgent.getChainsawHost(), "127.0.0.1");
agent = muleContext.getRegistry().lookupAgent("publish-notifications");
assertNotNull(agent);
assertEquals(EndpointNotificationLoggerAgent.class, agent.getClass());
EndpointNotificationLoggerAgent enlAgent = (EndpointNotificationLoggerAgent) agent;
assertEquals(enlAgent.getEndpointAddress(), "test://test");
agent = muleContext.getRegistry().lookupAgent("test-custom-agent");
assertNotNull(agent);
assertEquals(TestAgent.class, agent.getClass());
assertEquals("woggle", ((TestAgent) agent).getFrobbit());
// needs profiler installed
// agent = muleContext.getRegistry().lookupAgent("yourkit-profiler");
// assertNotNull(agent);
// assertEquals(YourKitProfilerAgent.class, agent.getClass());
}
public void testAgentsOrder() throws Exception
{
Registry registry = muleContext.getRegistry();
assertNotNull(registry);
Collection agents = registry.lookupObjects(Agent.class);
assertEquals(agents.size(), 8);
Iterator iter = agents.iterator();
assertTrue(iter.next() instanceof JmxAgent);
assertTrue(iter.next() instanceof Log4jAgent);
assertTrue(iter.next() instanceof Mx4jAgent);
assertTrue(iter.next() instanceof TestAgent);
assertTrue(iter.next() instanceof JmxServerNotificationAgent);
Log4jNotificationLoggerAgent log4jAgent = (Log4jNotificationLoggerAgent) iter.next();
assertEquals(log4jAgent.getName(), "log4j-notifications");
log4jAgent = (Log4jNotificationLoggerAgent) iter.next();
assertEquals(log4jAgent.getName(), "chainsaw-notifications");
assertTrue(iter.next() instanceof EndpointNotificationLoggerAgent);
}
}
|
[
"dfeist@bf997673-6b11-0410-b953-e057580c5b09"
] |
dfeist@bf997673-6b11-0410-b953-e057580c5b09
|
fcfe3f8c54e47d657781929871b1deb1a7032367
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_bfe21f2cc80e39a278aae8b5a24813e02a7b11cf/ITMillDesktopLaunch/5_bfe21f2cc80e39a278aae8b5a24813e02a7b11cf_ITMillDesktopLaunch_s.java
|
db80ecbd20a21c1a1f70972f34501d8b202b0183
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,758
|
java
|
package com.itmill.toolkit.launcher;
import java.awt.FlowLayout;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
/**
* This class starts servlet container and opens a simple control dialog.
*
*/
public class ITMillDesktopLaunch {
public static void main(String[] args) {
Map serverArgs = ITMillStandardLaunch.parseArguments(args);
boolean deployed = false;
try {
// Default deployment: embedded.war
deployed = deployEmbeddedWarfile(serverArgs);
} catch (IOException e1) {
e1.printStackTrace();
deployed = false;
}
// Check if deployment was succesful
if (!deployed && !serverArgs.containsKey("webroot")) {
// Default deployment failed, try other means
if (new File("WebContent").exists()) {
// Using WebContent directory as webroot
serverArgs.put("webroot", "WebContent");
} else {
System.err.print("Failed to deploy Toolkit application. "
+ "Please add --webroot parameter. Exiting.");
return;
}
}
// Start the Winstone servlet container
String url = ITMillStandardLaunch.runServer(serverArgs);
// Open browser into application URL
if (url != null) {
BrowserLauncher.openBrowser(url);
}
// Open control dialog
if (url != null) {
openServerControlDialog(url);
}
}
/**
* Open a control dialog for embedded server.
*
* @param applicationUrl
* Application URL
*/
private static void openServerControlDialog(final String applicationUrl) {
// Main frame
final String title = "Desktop Server";
final JFrame frame = new JFrame(title);
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
// Create link label and listen mouse click
final JLabel link = new JLabel("<html>"
+ "<center>Desktop Server is running at: <br>" + "<a href=\""
+ applicationUrl + "\">" + applicationUrl
+ "</a><br>Close this window to shutdown the server.</center>"
+ "</html>");
link.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
BrowserLauncher.openBrowser(applicationUrl);
}
});
// Create a panel and add components to it.
final JPanel contentPane = new JPanel(new FlowLayout());
frame.setContentPane(contentPane);
contentPane.add(link);
// Close confirmation
final JLabel question = new JLabel(
"This will stop the server. Are you sure?");
final JButton okButton = new JButton("OK");
final JButton cancelButton = new JButton("Cancel");
// List for close verify buttons
ActionListener buttonListener = new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (e.getSource() == okButton) {
System.exit(0);
} else {
Rectangle bounds = frame.getBounds();
frame.setTitle(title);
contentPane.removeAll();
contentPane.add(link);
contentPane.setBounds(bounds);
frame.setBounds(bounds);
frame.setVisible(true);
frame.repaint();
}
}
};
okButton.addActionListener(buttonListener);
cancelButton.addActionListener(buttonListener);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
Rectangle bounds = frame.getBounds();
frame.setTitle("Confirm close");
contentPane.removeAll();
contentPane.add(question);
contentPane.add(okButton);
contentPane.add(cancelButton);
frame.setBounds(bounds);
frame.setVisible(true);
frame.repaint();
}
});
// Position the window nicely
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit()
.getScreenSize();
int w = 270;
int h = 95;
int margin = 20;
frame.setBounds(new Rectangle(screenSize.width - w - margin,
screenSize.height - h - margin * 2, w, h));
frame.toFront();
frame.setVisible(true);
}
/**
* Deploy file named "embedded.war" from classpath (inside jar file).
*
* @param args
* @return
* @throws IOException
*/
protected static boolean deployEmbeddedWarfile(Map args) throws IOException {
String embeddedWarfileName = "/embedded.war";
InputStream embeddedWarfile = ITMillDesktopLaunch.class
.getResourceAsStream(embeddedWarfileName);
if (embeddedWarfile != null) {
File tempWarfile = File.createTempFile("embedded", ".war")
.getAbsoluteFile();
tempWarfile.getParentFile().mkdirs();
tempWarfile.deleteOnExit();
String embeddedWebroot = "winstoneEmbeddedWAR";
File tempWebroot = new File(tempWarfile.getParentFile(),
embeddedWebroot);
tempWebroot.mkdirs();
OutputStream out = new FileOutputStream(tempWarfile, true);
int read = 0;
byte buffer[] = new byte[2048];
while ((read = embeddedWarfile.read(buffer)) != -1) {
out.write(buffer, 0, read);
}
out.close();
embeddedWarfile.close();
args.put("warfile", tempWarfile.getAbsolutePath());
args.put("webroot", tempWebroot.getAbsolutePath());
args.remove("webappsDir");
args.remove("hostsDir");
return true;
}
return false;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
38b8987de241b52c5c10818ca01b60c055beebc0
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/protocal/protobuf/he.java
|
d39a3a7d0386078dd93435ecabfbbd1487dd2e04
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,403
|
java
|
package com.tencent.mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
public final class he extends com.tencent.mm.bt.a
{
public String title;
public String url;
public final int op(int paramInt, Object[] paramArrayOfObject)
{
int i = 0;
AppMethodBeat.i(56712);
if (paramInt == 0)
{
paramArrayOfObject = (e.a.a.c.a)paramArrayOfObject[0];
if (this.title != null)
paramArrayOfObject.e(1, this.title);
if (this.url != null)
paramArrayOfObject.e(2, this.url);
AppMethodBeat.o(56712);
paramInt = i;
return paramInt;
}
if (paramInt == 1)
if (this.title == null)
break label294;
label294: for (paramInt = e.a.a.b.b.a.f(1, this.title) + 0; ; paramInt = 0)
{
i = paramInt;
if (this.url != null)
i = paramInt + e.a.a.b.b.a.f(2, this.url);
AppMethodBeat.o(56712);
paramInt = i;
break;
if (paramInt == 2)
{
paramArrayOfObject = new e.a.a.a.a((byte[])paramArrayOfObject[0], unknownTagHandler);
for (paramInt = com.tencent.mm.bt.a.getNextFieldNumber(paramArrayOfObject); paramInt > 0; paramInt = com.tencent.mm.bt.a.getNextFieldNumber(paramArrayOfObject))
if (!super.populateBuilderWithField(paramArrayOfObject, this, paramInt))
paramArrayOfObject.ems();
AppMethodBeat.o(56712);
paramInt = i;
break;
}
if (paramInt == 3)
{
e.a.a.a.a locala = (e.a.a.a.a)paramArrayOfObject[0];
he localhe = (he)paramArrayOfObject[1];
switch (((Integer)paramArrayOfObject[2]).intValue())
{
default:
AppMethodBeat.o(56712);
paramInt = -1;
break;
case 1:
localhe.title = locala.BTU.readString();
AppMethodBeat.o(56712);
paramInt = i;
break;
case 2:
localhe.url = locala.BTU.readString();
AppMethodBeat.o(56712);
paramInt = i;
break;
}
}
AppMethodBeat.o(56712);
paramInt = -1;
break;
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes4-dex2jar.jar
* Qualified Name: com.tencent.mm.protocal.protobuf.he
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
eff74c94639a18f53faf10c1d074594d68be3fa0
|
08cf7f04cfee9ec89793cface61464db1543b2b4
|
/game-battle/src/main/java/com/ldsg/battle/handle/KuangTuHandle.java
|
9fa00880d06b86ceb0b61b44f27c23c2178f65a2
|
[] |
no_license
|
hongwu666/trunk
|
56f8daa72a11d777a794f9891726c9ba303d3902
|
4e7409624af6baa57362c5044285e25653209fab
|
refs/heads/master
| 2021-05-28T22:29:12.929361
| 2015-06-12T08:22:38
| 2015-06-12T08:22:38
| 37,310,152
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,200
|
java
|
package com.ldsg.battle.handle;
import org.apache.log4j.Logger;
import com.ldsg.battle.Context;
import com.ldsg.battle.bo.Buff;
import com.ldsg.battle.bo.Effect;
import com.ldsg.battle.constant.AttrConstant;
import com.ldsg.battle.engine.BaseHandle;
import com.ldsg.battle.helper.BuffHelper;
import com.ldsg.battle.role.Hero;
public class KuangTuHandle extends BaseHandle {
private static Logger logger = Logger.getLogger(KuangTuHandle.class);
public Buff create(Effect effect, Hero hero, Hero target, Context context, int critValue) {
Buff buff = BuffHelper.Effect2Buff(effect);
return buff;
}
public void handle(Hero hero, Buff buff, Context context) {
}
public void handleRemove(Hero hero, Buff buff) {
}
@Override
public double getBuffAddRatio(Context context, Hero hero, Buff buff, String attribute) {
if (!AttrConstant.PHYSICS_ATTACK.equals(attribute)) {
return 0;
}
if (!hero.isAttack()) {
return 0;
}
double paramH = buff.getEffect().getParam("h", 0);
double maxLife = hero.getTotalAttribute(context, AttrConstant.MAX_LIFE);
double life = hero.getTotalAttribute(context, AttrConstant.LIFE);
return (maxLife - life) / maxLife * paramH;
}
}
|
[
"sndy@hyx.com"
] |
sndy@hyx.com
|
b56e4097ef23609af0ff758078bacab5052efd39
|
ac556af24495ff4faa589fd747f72f5b3c71a3e8
|
/src/us/kbase/auth2/lib/exceptions/UnauthorizedException.java
|
5607153143777d86a7e92f32b8fab275678b79c3
|
[
"MIT"
] |
permissive
|
kkellerlbl/auth2
|
5097d3ee385f1c58d899aa631083352d4e68476a
|
d0805339c549a3fc4de689047742a2b524e93d1a
|
refs/heads/master
| 2020-06-13T08:20:07.671238
| 2018-05-15T20:54:30
| 2018-05-15T20:54:30
| 75,434,248
| 0
| 0
|
MIT
| 2018-12-22T21:59:32
| 2016-12-02T21:58:50
|
Java
|
UTF-8
|
Java
| false
| false
| 592
|
java
|
package us.kbase.auth2.lib.exceptions;
/** Base class of all exceptions caused by an authorization failure.
* @author gaprice@lbl.gov
*/
@SuppressWarnings("serial")
public class UnauthorizedException extends AuthException {
public UnauthorizedException() {
super(ErrorType.UNAUTHORIZED, null);
}
public UnauthorizedException(final String message) {
super(ErrorType.UNAUTHORIZED, message);
}
public UnauthorizedException(final ErrorType err) {
super(err, null);
}
public UnauthorizedException(final ErrorType err, final String message) {
super(err, message);
}
}
|
[
"gaprice@lbl.gov"
] |
gaprice@lbl.gov
|
ef5ae0405016c02b4de7763f12512156fdae3eda
|
91f7dc07b2c0d07cf02ecee54b8548d42fe2f720
|
/sources/external/scy-com-ext/ext-service/src/com/ext/portlet/cart/model/DiplomeModel.java
|
aca0de6d72550caa83ebf6251a0b8b82dafd943d
|
[] |
no_license
|
yattias/scy
|
8996a485de7dfef22ac9ae69005cfb12be91dbc3
|
e80421c7457e5ba27874abeef06668196ed8125a
|
refs/heads/master
| 2021-01-10T01:15:04.267584
| 2013-04-03T09:32:50
| 2013-04-03T09:32:50
| 36,696,984
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,464
|
java
|
package com.ext.portlet.cart.model;
import com.liferay.portal.model.BaseModel;
import java.util.Date;
/**
* <a href="DiplomeModel.java.html"><b><i>View Source</i></b></a>
*
* <p>
* ServiceBuilder generated this class. Modifications in this class will be
* overwritten the next time is generated.
* </p>
*
* <p>
* This interface is a model that represents the xxx_diplome table in the
* database.
* </p>
*
* @author Brian Wing Shun Chan
* @see Diplome
* @see com.ext.portlet.cart.model.impl.DiplomeImpl
* @see com.ext.portlet.cart.model.impl.DiplomeModelImpl
* @generated
*/
public interface DiplomeModel extends BaseModel<Diplome> {
public String getPrimaryKey();
public void setPrimaryKey(String pk);
public String getDiplomeId();
public void setDiplomeId(String diplomeId);
public String getCvId();
public void setCvId(String cvId);
public Date getCreateDate();
public void setCreateDate(Date createDate);
public Date getModifiedDate();
public void setModifiedDate(Date modifiedDate);
public String getIntitule();
public void setIntitule(String intitule);
public String getEtablissement();
public void setEtablissement(String etablissement);
public String getAnneeDebut();
public void setAnneeDebut(String anneeDebut);
public String getAnneeFin();
public void setAnneeFin(String anneeFin);
public Diplome toEscapedModel();
}
|
[
"mueller.daniel.1981@b2e416e9-8f50-0410-b9aa-47b31ee1ff64"
] |
mueller.daniel.1981@b2e416e9-8f50-0410-b9aa-47b31ee1ff64
|
87528288921687011f546cdf32ddd153e553df14
|
6ef4869c6bc2ce2e77b422242e347819f6a5f665
|
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/telecom/Logging/_$$Lambda$EventManager$weOtitr8e1cZeiy1aDSqzNoKaY8.java
|
489b7dcdfda06b672909ce28258bcb4d6993f573
|
[] |
no_license
|
hacking-android/frameworks
|
40e40396bb2edacccabf8a920fa5722b021fb060
|
943f0b4d46f72532a419fb6171e40d1c93984c8e
|
refs/heads/master
| 2020-07-03T19:32:28.876703
| 2019-08-13T03:31:06
| 2019-08-13T03:31:06
| 202,017,534
| 2
| 0
| null | 2019-08-13T03:33:19
| 2019-08-12T22:19:30
|
Java
|
UTF-8
|
Java
| false
| false
| 998
|
java
|
/*
* Decompiled with CFR 0.145.
*
* Could not load the following classes:
* android.telecom.Logging.-$
* android.telecom.Logging.-$$Lambda
* android.telecom.Logging.-$$Lambda$EventManager
* android.telecom.Logging.-$$Lambda$EventManager$weOtitr8e1cZeiy1aDSqzNoKaY8
*/
package android.telecom.Logging;
import android.telecom.Logging.-$;
import android.telecom.Logging.EventManager;
import android.util.Pair;
import java.util.function.ToLongFunction;
public final class _$$Lambda$EventManager$weOtitr8e1cZeiy1aDSqzNoKaY8
implements ToLongFunction {
public static final /* synthetic */ -$.Lambda.EventManager.weOtitr8e1cZeiy1aDSqzNoKaY8 INSTANCE;
static /* synthetic */ {
INSTANCE = new _$$Lambda$EventManager$weOtitr8e1cZeiy1aDSqzNoKaY8();
}
private /* synthetic */ _$$Lambda$EventManager$weOtitr8e1cZeiy1aDSqzNoKaY8() {
}
public final long applyAsLong(Object object) {
return EventManager.lambda$dumpEventsTimeline$0((Pair)object);
}
}
|
[
"me@paulo.costa.nom.br"
] |
me@paulo.costa.nom.br
|
c227e523f8a231bff8a5f0a02afe3516fa9b42c5
|
5449946b360c1385875f509f5a1c3490e69f4272
|
/AfSelector/src/main/java/cn/appoa/afselector/view/range/ConnectingLine.java
|
52dfde86546318fb44502cf4d244f0a3969f5cfa
|
[] |
no_license
|
lijiazhen1201/AfDemoX
|
884ac269503fb920544d1b32ad1bf0c4c7e3fe90
|
2120613a6868139d1876a250a36617bed08e65c0
|
refs/heads/master
| 2020-12-06T00:03:05.897916
| 2020-08-26T01:32:03
| 2020-08-26T01:32:03
| 232,282,935
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,254
|
java
|
package cn.appoa.afselector.view.range;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.TypedValue;
public class ConnectingLine {
private final Paint mPaint;
private final float mConnectingLineWeight;
private final float mY;
public ConnectingLine(Context ctx, float y, float connectingLineWeight, int connectingLineColor) {
final Resources res = ctx.getResources();
mConnectingLineWeight = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
connectingLineWeight,
res.getDisplayMetrics());
// 初始化paint 设置参数
mPaint = new Paint();
mPaint.setColor(connectingLineColor);
mPaint.setStrokeWidth(mConnectingLineWeight);
mPaint.setAntiAlias(true);
mY = y;
}
/**
* Draw the connecting line between the two thumbs.
*
* @param canvas the Canvas to draw to
* @param leftThumb the left thumb
* @param rightThumb the right thumb
*/
void draw(Canvas canvas, Thumb leftThumb, Thumb rightThumb) {
canvas.drawLine(leftThumb.getX(), mY, rightThumb.getX(), mY, mPaint);
}
}
|
[
"949393653@qq.com"
] |
949393653@qq.com
|
acbe5c2dd3a14d2b6b0fd721a30a0623a737e753
|
e01d97e525547587e93cad3cf230563bd55af11b
|
/src/main/java/babyframework/annotation/Aspect.java
|
bfa26ade4fdf9e7bf36b1b50453e4f3bb9850a6e
|
[] |
no_license
|
Fish-Fan/BabyFramework
|
a20d145949d1a6b9e86de715793f95981073c280
|
3ccd7a71425795c54ea2b4c1e39c0f792d6c1ad3
|
refs/heads/master
| 2021-05-09T11:25:31.533198
| 2018-02-23T06:46:42
| 2018-02-23T06:46:42
| 118,889,415
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 229
|
java
|
package babyframework.annotation;
import java.lang.annotation.*;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Aspect {
/**
* 注解
*/
Class<? extends Annotation> value();
}
|
[
"fanyank@126.com"
] |
fanyank@126.com
|
34bbdd480f0a0916f0ca1eb8a41808c496f068c1
|
1330c922863a489fc7efacfe712f5fbc801ddd4c
|
/App/src/com/sien/cporg/utils/response/DepartmentResponse.java
|
ff4290ced1a9a9df3c6a7a0cc41d0e7b1cf51f39
|
[] |
no_license
|
eity0323/CPOrg
|
4745294eb73e955e4dff2f7d5066c06d08d27314
|
69407e85c357deee4fbb8fd6887e1d9479a14f4e
|
refs/heads/master
| 2021-05-04T11:24:47.941822
| 2016-10-24T09:03:31
| 2016-10-24T09:03:31
| 47,666,502
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 503
|
java
|
package com.sien.cporg.utils.response;
import java.util.List;
import com.sien.cporg.model.beans.Department;
/**
* 组织架构部门数据请求返回类
*
* @author sien
*
*/
public class DepartmentResponse extends BaseResponse {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 6616932432232786764L;
private List<Department> data;
public List<Department> getData() {
return data;
}
public void setData(List<Department> data) {
this.data = data;
}
}
|
[
"312726446@qq.com"
] |
312726446@qq.com
|
07bc2085f6f3e83bf3f32b0c9bf3163d8105e564
|
175d61ce108f0e029260ea91145328e377f6dc80
|
/common/src/main/java/org/red5/server/api/so/ISharedObjectSecurity.java
|
8b1d12547dd04dad362118d45fb0b253a270bbe8
|
[
"Apache-2.0"
] |
permissive
|
Red5/red5-server
|
e4e126046cdb3757ae2d3a9a7761e3a3a8610e10
|
3ff4e67da6bc2445dd4e372131f9cd3d20a225a1
|
refs/heads/master
| 2023-08-28T00:36:30.077773
| 2023-07-07T20:20:42
| 2023-07-07T20:20:42
| 14,514,767
| 3,445
| 1,105
|
Apache-2.0
| 2023-09-06T03:04:11
| 2013-11-19T05:04:10
|
Java
|
UTF-8
|
Java
| false
| false
| 2,608
|
java
|
/*
* RED5 Open Source Media Server - https://github.com/Red5/ Copyright 2006-2016 by respective authors (see below). All rights reserved. Licensed under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
* required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
package org.red5.server.api.so;
import java.util.List;
import org.red5.server.api.scope.IScope;
/**
* Interface for handlers that control access to shared objects.
*
* @author The Red5 Project
* @author Joachim Bauch (jojo@struktur.de)
*/
public interface ISharedObjectSecurity {
/**
* Check if the a shared object may be created in the given scope.
*
* @param scope
* scope
* @param name
* name
* @param persistent
* is persistent
* @return is creation allowed
*/
public boolean isCreationAllowed(IScope scope, String name, boolean persistent);
/**
* Check if a connection to the given existing shared object is allowed.
*
* @param so
* shared ojbect
* @return is connection alowed
*/
public boolean isConnectionAllowed(ISharedObject so);
/**
* Check if a modification is allowed on the given shared object.
*
* @param so
* shared object
* @param key
* key
* @param value
* value
* @return true if given key is modifiable; false otherwise
*/
public boolean isWriteAllowed(ISharedObject so, String key, Object value);
/**
* Check if the deletion of a property is allowed on the given shared object.
*
* @param so
* shared object
* @param key
* key
* @return true if delete allowed; false otherwise
*/
public boolean isDeleteAllowed(ISharedObject so, String key);
/**
* Check if sending a message to the shared object is allowed.
*
* @param so
* shared object
* @param message
* message
* @param arguments
* arguments
* @return true if allowed
*/
public boolean isSendAllowed(ISharedObject so, String message, List<?> arguments);
}
|
[
"mondain@gmail.com"
] |
mondain@gmail.com
|
64fa55bdb6da8f7bef90af420aa21df3bcbd7d15
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/plugin/appbrand/page/AppBrandActionHeaderLayout.java
|
d2dc017935a65a623c2314fcfcab67fc7f9ad715
|
[] |
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
| 5,208
|
java
|
package com.tencent.p177mm.plugin.appbrand.page;
import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.HorizontalScrollView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.p177mm.C25738R;
import com.tencent.p177mm.modelappbrand.p873a.C32804a;
import com.tencent.p177mm.modelappbrand.p873a.C37926b;
import com.tencent.p177mm.modelappbrand.p873a.C42201f;
/* renamed from: com.tencent.mm.plugin.appbrand.page.AppBrandActionHeaderLayout */
public class AppBrandActionHeaderLayout extends LinearLayout {
private LinearLayout iqp;
private HorizontalScrollView iqq;
private AppBrandActionSingleHeaderView iqr;
private AppBrandActionMultipleHeaderView iqs;
private AppBrandActionMultipleHeaderView iqt;
private AppBrandActionMultipleHeaderView iqu;
private AppBrandActionMultipleHeaderView iqv;
private TextView iqw;
private int iqx = 1;
private int iqy = 2;
private String mAppId;
private Context mContext;
public AppBrandActionHeaderLayout(Context context) {
super(context);
AppMethodBeat.m2504i(132328);
m30414cA(context);
AppMethodBeat.m2505o(132328);
}
public AppBrandActionHeaderLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
AppMethodBeat.m2504i(132329);
m30414cA(context);
AppMethodBeat.m2505o(132329);
}
@TargetApi(11)
public AppBrandActionHeaderLayout(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
AppMethodBeat.m2504i(132330);
m30414cA(context);
AppMethodBeat.m2505o(132330);
}
/* renamed from: cA */
private void m30414cA(Context context) {
AppMethodBeat.m2504i(132331);
this.mContext = context;
((LayoutInflater) this.mContext.getSystemService("layout_inflater")).inflate(2130968758, this);
this.iqp = (LinearLayout) findViewById(2131821462);
this.iqq = (HorizontalScrollView) findViewById(2131821464);
this.iqr = (AppBrandActionSingleHeaderView) findViewById(2131821463);
this.iqs = (AppBrandActionMultipleHeaderView) findViewById(2131821466);
this.iqt = (AppBrandActionMultipleHeaderView) findViewById(2131821467);
this.iqu = (AppBrandActionMultipleHeaderView) findViewById(2131821468);
this.iqv = (AppBrandActionMultipleHeaderView) findViewById(2131821469);
this.iqw = (TextView) findViewById(2131821470);
this.iqs.setVisibility(8);
this.iqt.setVisibility(8);
this.iqu.setVisibility(8);
this.iqv.setVisibility(8);
this.iqw.setVisibility(8);
AppMethodBeat.m2505o(132331);
}
/* renamed from: cI */
public final void mo34821cI(String str, String str2) {
AppMethodBeat.m2504i(132332);
aIY();
this.iqr.setImageDrawable(C32804a.abQ());
C37926b.abR().mo60683a(this.iqr.getImageView(), str, null, C42201f.fqH);
this.iqr.setTextViewText(str2);
AppMethodBeat.m2505o(132332);
}
private void aIY() {
AppMethodBeat.m2504i(132333);
this.iqp.setVisibility(0);
this.iqq.setVisibility(8);
AppMethodBeat.m2505o(132333);
}
public void setActionHeaderStyle(boolean z) {
AppMethodBeat.m2504i(132334);
if (z) {
this.iqr.setTextViewTextColor(this.mContext.getResources().getColor(C25738R.color.a6a));
this.iqs.setTextViewTextColor(this.mContext.getResources().getColor(C25738R.color.a6a));
this.iqt.setTextViewTextColor(this.mContext.getResources().getColor(C25738R.color.a6a));
this.iqu.setTextViewTextColor(this.mContext.getResources().getColor(C25738R.color.a6a));
this.iqv.setTextViewTextColor(this.mContext.getResources().getColor(C25738R.color.a6a));
this.iqw.setTextColor(this.mContext.getResources().getColor(C25738R.color.a6a));
AppMethodBeat.m2505o(132334);
return;
}
this.iqr.setTextViewTextColor(this.mContext.getResources().getColor(C25738R.color.f11791he));
this.iqs.setTextViewTextColor(this.mContext.getResources().getColor(C25738R.color.f11791he));
this.iqt.setTextViewTextColor(this.mContext.getResources().getColor(C25738R.color.f11791he));
this.iqu.setTextViewTextColor(this.mContext.getResources().getColor(C25738R.color.f11791he));
this.iqv.setTextViewTextColor(this.mContext.getResources().getColor(C25738R.color.f11791he));
this.iqw.setTextColor(this.mContext.getResources().getColor(C25738R.color.f11791he));
AppMethodBeat.m2505o(132334);
}
public void setAppId(String str) {
this.mAppId = str;
}
public void setStatusDescription(CharSequence charSequence) {
AppMethodBeat.m2504i(132335);
this.iqw.setText(charSequence);
this.iqw.setVisibility(0);
this.iqp.setVisibility(8);
this.iqq.setVisibility(8);
AppMethodBeat.m2505o(132335);
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
af3532b99b13ecc5872d2a0e51e248be36c93f9e
|
c332d5f3a5f5c4c9759f3f01647f54b06f19cca0
|
/digi/app/src/main/java/com/solodroid/thestreamapp/adapters/AdapterFavorite.java
|
f075a3c7d5eb864473a775d0d31ae17e7ecc9961
|
[] |
no_license
|
saqibyounis/thesrreatm
|
e48855df01bfea826bf2e386fbffebeabdddcbcf
|
fd94bb066251cdba053730c0f6b0dbbc72cbe900
|
refs/heads/master
| 2020-06-04T17:36:46.431094
| 2019-06-16T10:52:41
| 2019-06-16T10:52:41
| 192,127,359
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,237
|
java
|
package com.solodroid.thestreamapp.adapters;
import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.solodroid.thestreamapp.Config;
import com.solodroid.thestreamapp.R;
import com.solodroid.thestreamapp.activities.ActivityDetailChannel;
import com.solodroid.thestreamapp.models.Channel;
import com.solodroid.thestreamapp.utils.Constant;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
import java.util.List;
public class AdapterFavorite extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private final int VIEW_ITEM = 1;
private final int VIEW_PROG = 0;
private List<Channel> items = new ArrayList<>();
private boolean loading;
private OnLoadMoreListener onLoadMoreListener;
private Context context;
private OnItemClickListener mOnItemClickListener;
public interface OnItemClickListener {
void onItemClick(View view, Channel obj, int position);
}
public void setOnItemClickListener(final OnItemClickListener mItemClickListener) {
this.mOnItemClickListener = mItemClickListener;
}
// Provide a suitable constructor (depends on the kind of dataset)
public AdapterFavorite(Context context, RecyclerView view, List<Channel> items) {
this.items = items;
this.context = context;
lastItemViewDetector(view);
}
public class OriginalViewHolder extends RecyclerView.ViewHolder {
// each data item is just a string in this case
public TextView channel_name;
public TextView channel_category;
public ImageView channel_image;
public LinearLayout lyt_parent;
public OriginalViewHolder(View v) {
super(v);
channel_name = (TextView) v.findViewById(R.id.channel_name);
channel_category = (TextView) v.findViewById(R.id.channel_category);
channel_image = (ImageView) v.findViewById(R.id.channel_image);
lyt_parent = (LinearLayout) v.findViewById(R.id.lyt_parent);
}
}
public static class ProgressViewHolder extends RecyclerView.ViewHolder {
public ProgressBar progressBar;
public ProgressViewHolder(View v) {
super(v);
progressBar = (ProgressBar) v.findViewById(R.id.loadMore);
}
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
RecyclerView.ViewHolder vh;
if (viewType == VIEW_ITEM) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.lsv_item_post, parent, false);
vh = new OriginalViewHolder(v);
} else {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_loading, parent, false);
vh = new ProgressViewHolder(v);
}
return vh;
}
// Replace the contents of a view (invoked by the layout manager)
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
if (holder instanceof OriginalViewHolder) {
final Channel p = items.get(position);
OriginalViewHolder vItem = (OriginalViewHolder) holder;
vItem.channel_name.setText(p.channel_name);
vItem.channel_category.setText(p.category_name);
Picasso.with(context)
.load(Config.ADMIN_PANEL_URL + "/upload/" + p.channel_image)
.placeholder(R.drawable.ic_thumbnail)
.into(vItem.channel_image);
vItem.lyt_parent.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
final Channel obj = items.get(position);
Intent intent = new Intent(context, ActivityDetailChannel.class);
intent.putExtra(Constant.KEY_CHANNEL_CATEGORY, obj.category_name);
intent.putExtra(Constant.KEY_CHANNEL_ID, obj.channel_id);
intent.putExtra(Constant.KEY_CHANNEL_NAME, obj.channel_name);
intent.putExtra(Constant.KEY_CHANNEL_IMAGE, obj.channel_image);
intent.putExtra(Constant.KEY_CHANNEL_URL, obj.channel_url);
intent.putExtra(Constant.KEY_CHANNEL_DESCRIPTION, obj.channel_description);
context.startActivity(intent);
}
});
} else {
((ProgressViewHolder) holder).progressBar.setIndeterminate(true);
}
}
// Return the size of your dataset (invoked by the layout manager)
@Override
public int getItemCount() {
return items.size();
}
@Override
public int getItemViewType(int position) {
return this.items.get(position) != null ? VIEW_ITEM : VIEW_PROG;
}
public void insertData(List<Channel> items) {
setLoaded();
int positionStart = getItemCount();
int itemCount = items.size();
this.items.addAll(items);
notifyItemRangeInserted(positionStart, itemCount);
}
public void setLoaded() {
loading = false;
for (int i = 0; i < getItemCount(); i++) {
if (items.get(i) == null) {
items.remove(i);
notifyItemRemoved(i);
}
}
}
public void setLoading() {
if (getItemCount() != 0) {
this.items.add(null);
notifyItemInserted(getItemCount() - 1);
loading = true;
}
}
public void resetListData() {
this.items = new ArrayList<>();
notifyDataSetChanged();
}
public void setOnLoadMoreListener(OnLoadMoreListener onLoadMoreListener) {
this.onLoadMoreListener = onLoadMoreListener;
}
private void lastItemViewDetector(RecyclerView recyclerView) {
if (recyclerView.getLayoutManager() instanceof LinearLayoutManager) {
final LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
int lastPos = layoutManager.findLastVisibleItemPosition();
if (!loading && lastPos == getItemCount() - 1 && onLoadMoreListener != null) {
if (onLoadMoreListener != null) {
int current_page = getItemCount() / Config.LOAD_MORE;
onLoadMoreListener.onLoadMore(current_page);
}
loading = true;
}
}
});
}
}
public interface OnLoadMoreListener {
void onLoadMore(int current_page);
}
}
|
[
"younissaqib@gmail.com"
] |
younissaqib@gmail.com
|
e680d56bdb184c2b280b33f85b23e60720e2e05b
|
5e45e80fd570e5acbf8ef8faaad337debf0e229a
|
/src/org/ironrhino/core/remoting/impl/ZooKeeperServiceRegistry.java
|
630b2f9458b1c7714d3846501effeef36af2051c
|
[] |
no_license
|
hwtl/ironrhino
|
fd3b1dd51c7580068e6f093ada65d47c848d036f
|
c50d265277f4761d5244f7a9f3f529a4ab39fc28
|
refs/heads/master
| 2020-12-25T08:50:13.051845
| 2015-03-17T08:53:48
| 2015-03-17T08:53:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,988
|
java
|
package org.ironrhino.core.remoting.impl;
import static org.ironrhino.core.metadata.Profiles.CLUSTER;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import org.apache.curator.framework.CuratorFramework;
import org.apache.zookeeper.CreateMode;
import org.ironrhino.core.event.InstanceLifecycleEvent;
import org.ironrhino.core.event.InstanceShutdownEvent;
import org.ironrhino.core.remoting.ExportServicesEvent;
import org.ironrhino.core.spring.configuration.ResourcePresentConditional;
import org.ironrhino.core.util.JsonUtils;
import org.ironrhino.core.zookeeper.WatchedEventListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
@Component("serviceRegistry")
@Profile(CLUSTER)
@ResourcePresentConditional(value = "resources/spring/applicationContext-remoting.xml", negated = true)
public class ZooKeeperServiceRegistry extends AbstractServiceRegistry implements
WatchedEventListener {
public static final String DEFAULT_ZOOKEEPER_PATH = "/remoting";
@Autowired
private CuratorFramework curatorFramework;
@Value("${serviceRegistry.zooKeeperPath:" + DEFAULT_ZOOKEEPER_PATH + "}")
private String zooKeeperPath = DEFAULT_ZOOKEEPER_PATH;
private Map<String, String> discoveredServices = new HashMap<String, String>();
private boolean ready;
private String servicesParentPath;
private String hostsParentPath;
@Override
public void prepare() {
servicesParentPath = zooKeeperPath + "/services";
hostsParentPath = zooKeeperPath + "/hosts";
}
@Override
public void onReady() {
writeDiscoveredServices();
ready = true;
}
@Override
protected void lookup(String serviceName) {
String path = new StringBuilder(servicesParentPath).append("/")
.append(serviceName).toString();
try {
List<String> children = curatorFramework.getChildren().watched()
.forPath(path);
if (children != null && children.size() > 0)
importServices.put(serviceName, children);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
@Override
public void doRegister(String serviceName, String host) {
String path = new StringBuilder().append(servicesParentPath)
.append("/").append(serviceName).append("/").append(host)
.toString();
try {
curatorFramework.create().creatingParentsIfNeeded()
.withMode(CreateMode.EPHEMERAL).forPath(path);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
@Override
protected void onDiscover(String serviceName, String host) {
super.onDiscover(serviceName, host);
discoveredServices.put(serviceName, host);
if (ready)
writeDiscoveredServices();
}
protected void writeDiscoveredServices() {
if (discoveredServices.size() == 0)
return;
String path = new StringBuilder().append(hostsParentPath).append("/")
.append(host).toString();
byte[] data = JsonUtils.toJson(discoveredServices).getBytes();
try {
curatorFramework.create().creatingParentsIfNeeded()
.withMode(CreateMode.EPHEMERAL).inBackground()
.forPath(path, data);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
@Override
public Collection<String> getAllServices() {
try {
List<String> list = curatorFramework.getChildren().forPath(
servicesParentPath);
List<String> services = new ArrayList<String>(list.size());
services.addAll(list);
Collections.sort(services);
return services;
} catch (Exception e) {
log.error(e.getMessage(), e);
return Collections.emptyList();
}
}
@Override
public Collection<String> getHostsForService(String service) {
try {
List<String> list = curatorFramework
.getChildren()
.watched()
.forPath(
new StringBuilder().append(servicesParentPath)
.append("/").append(service).toString());
List<String> hosts = new ArrayList<String>(list.size());
hosts.addAll(list);
Collections.sort(hosts);
return hosts;
} catch (Exception e) {
log.error(e.getMessage(), e);
return Collections.emptyList();
}
}
@Override
public Map<String, String> getDiscoveredServices(String host) {
if (host.indexOf(':') < 0)
host += ":" + DEFAULT_PORT;
try {
String path = new StringBuilder().append(hostsParentPath)
.append("/").append(host).toString();
byte[] data = curatorFramework.getData().forPath(path);
String sdata = new String(data);
Map<String, String> map = JsonUtils.fromJson(sdata,
JsonUtils.STRING_MAP_TYPE);
Map<String, String> services = new TreeMap<String, String>();
services.putAll(map);
return services;
} catch (Exception e) {
log.error(e.getMessage(), e);
return Collections.emptyMap();
}
}
@Override
public boolean supports(String path) {
if (path != null && path.startsWith(servicesParentPath)) {
String serviceName = path
.substring(servicesParentPath.length() + 1);
return importServices.containsKey(serviceName);
}
return false;
}
@Override
public void onNodeChildrenChanged(String path, List<String> children) {
String serviceName = path.substring(servicesParentPath.length() + 1);
importServices.put(serviceName, children);
}
@Override
public void onNodeCreated(String path, byte[] data) {
}
@Override
public void onNodeDeleted(String path) {
}
@Override
public void onNodeDataChanged(String path, byte[] data) {
}
@Override
protected boolean handle(InstanceLifecycleEvent event) {
return event instanceof ExportServicesEvent
|| event instanceof InstanceShutdownEvent;
// zookeeper has onNodeChildrenChanged
}
}
|
[
"zhouyanming@gmail.com"
] |
zhouyanming@gmail.com
|
9576e74b32da85bcee8114210e7182832fd85b65
|
40dd2c2ba934bcbc611b366cf57762dcb14c48e3
|
/RI_Stack/jvm/security/gnu-crypto/source/gnu/crypto/sasl/ConfidentialityException.java
|
6e7a8cd3cf01581293e1415b0355e650207b4c16
|
[] |
no_license
|
amirna2/OCAP-RI
|
afe0d924dcf057020111406b1d29aa2b3a796e10
|
254f0a8ebaf5b4f09f4a7c8f4961e9596c49ccb7
|
refs/heads/master
| 2020-03-10T03:22:34.355822
| 2018-04-11T23:08:49
| 2018-04-11T23:08:49
| 129,163,048
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,199
|
java
|
package gnu.crypto.sasl;
// ----------------------------------------------------------------------------
// $Id: ConfidentialityException.java,v 1.2 2005/10/06 04:24:17 rsdio Exp $
//
// Copyright (C) 2003, Free Software Foundation, Inc.
//
// This file is part of GNU Crypto.
//
// GNU Crypto is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// GNU Crypto 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; see the file COPYING. If not, write to the
//
// Free Software Foundation Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301
// USA
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give
// you permission to link this library with independent modules to
// produce an executable, regardless of the license terms of these
// independent modules, and to copy and distribute the resulting
// executable under terms of your choice, provided that you also meet,
// for each linked independent module, the terms and conditions of the
// license of that module. An independent module is a module which is
// not derived from or based on this library. If you modify this
// library, you may extend this exception to your version of the
// library, but you are not obligated to do so. If you do not wish to
// do so, delete this exception statement from your version.
// ----------------------------------------------------------------------------
import javax.security.sasl.SaslException;
/**
* Used by mechanisms that offer a security services layer, this checked
* exception is thrown to indicate that a violation has occured during the
* processing of a <i>confidentiality</i> protection filter.
*
* @version $Revision: 33112 $
*/
public class ConfidentialityException extends SaslException {
/**
* Constructs a new instance of <code>ConfidentialityException</code> with no
* detail message.
*/
public ConfidentialityException() {
super();
}
/**
* Constructs a new instance of <code>ConfidentialityException</code> with
* the specified detail message.
*
* @param s the detail message.
*/
public ConfidentialityException(String s) {
super(s);
}
/**
* Constructs a new instance of <code>ConfidentialityException</code> with a
* detailed message and a root exception.
*
* @param s possibly null additional detail about the exception.
* @param x a possibly null root exception that caused this one.
*/
public ConfidentialityException(String s, Throwable x) {
super(s, x);
}
}
|
[
"amir.nathoo@ubnt.com"
] |
amir.nathoo@ubnt.com
|
9c99e4d4e9533299f0b6200ca82adad7d05981ff
|
efceccd784003d47d022c48338d836fe39f9136c
|
/thinking-in-java/src/main/java/chapter18/io/MappedIO.java
|
72fc8b9904c93205cbce329dcd15f5e239aa7622
|
[] |
no_license
|
jackode/most-java
|
2be3f3a43c7b5f993c2d2eb5137ff1cf04134b2f
|
b4c4117a75a1829f076771b0a9e86ed4b3baf06f
|
refs/heads/master
| 2021-01-10T10:27:36.638351
| 2015-09-23T15:10:09
| 2015-09-23T15:10:09
| 43,008,509
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,330
|
java
|
package chapter18.io;//: io/MappedIO.java
import java.nio.*;
import java.nio.channels.*;
import java.io.*;
public class MappedIO {
private static int numOfInts = 4000000;
private static int numOfUbuffInts = 200000;
private abstract static class Tester {
private String name;
public Tester(String name) { this.name = name; }
public void runTest() {
System.out.print(name + ": ");
try {
long start = System.nanoTime();
test();
double duration = System.nanoTime() - start;
System.out.format("%.2f\n", duration/1.0e9);
} catch(IOException e) {
throw new RuntimeException(e);
}
}
public abstract void test() throws IOException;
}
private static Tester[] tests = {
new Tester("Stream Write") {
public void test() throws IOException {
DataOutputStream dos = new DataOutputStream(
new BufferedOutputStream(
new FileOutputStream(new File("temp.tmp"))));
for(int i = 0; i < numOfInts; i++)
dos.writeInt(i);
dos.close();
}
},
new Tester("Mapped Write") {
public void test() throws IOException {
FileChannel fc =
new RandomAccessFile("temp.tmp", "rw")
.getChannel();
IntBuffer ib = fc.map(
FileChannel.MapMode.READ_WRITE, 0, fc.size())
.asIntBuffer();
for(int i = 0; i < numOfInts; i++)
ib.put(i);
fc.close();
}
},
new Tester("Stream Read") {
public void test() throws IOException {
DataInputStream dis = new DataInputStream(
new BufferedInputStream(
new FileInputStream("temp.tmp")));
for(int i = 0; i < numOfInts; i++)
dis.readInt();
dis.close();
}
},
new Tester("Mapped Read") {
public void test() throws IOException {
FileChannel fc = new FileInputStream(
new File("temp.tmp")).getChannel();
IntBuffer ib = fc.map(
FileChannel.MapMode.READ_ONLY, 0, fc.size())
.asIntBuffer();
while(ib.hasRemaining())
ib.get();
fc.close();
}
},
new Tester("Stream Read/Write") {
public void test() throws IOException {
RandomAccessFile raf = new RandomAccessFile(
new File("temp.tmp"), "rw");
raf.writeInt(1);
for(int i = 0; i < numOfUbuffInts; i++) {
raf.seek(raf.length() - 4);
raf.writeInt(raf.readInt());
}
raf.close();
}
},
new Tester("Mapped Read/Write") {
public void test() throws IOException {
FileChannel fc = new RandomAccessFile(
new File("temp.tmp"), "rw").getChannel();
IntBuffer ib = fc.map(
FileChannel.MapMode.READ_WRITE, 0, fc.size())
.asIntBuffer();
ib.put(0);
for(int i = 1; i < numOfUbuffInts; i++)
ib.put(ib.get(i - 1));
fc.close();
}
}
};
public static void main(String[] args) {
for(Tester test : tests)
test.runTest();
}
} /* Output: (90% match)
Stream Write: 0.56
Mapped Write: 0.12
Stream Read: 0.80
Mapped Read: 0.07
Stream Read/Write: 5.32
Mapped Read/Write: 0.02
*///:~
|
[
"jiankliu@ebay.com"
] |
jiankliu@ebay.com
|
00f1d1c297d4c899a495635b919585895ca68972
|
3a5d912ef969c3874ab5f9f5af74ff99b8b25000
|
/src/test/java/org/skife/vmware/MoreMatchers.java
|
22a255a4d91251363a04f25bf7b414dd826013c4
|
[
"Apache-2.0"
] |
permissive
|
brianm/vmrun-java-wrapper
|
66aa596f2f9720a5b41dd55c99f56c50ee91748a
|
c1ece15d8ad1439f8d39bd6a261448e8b40920a7
|
refs/heads/master
| 2023-08-31T06:57:08.375548
| 2012-04-06T15:47:14
| 2012-04-06T15:47:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,618
|
java
|
package org.skife.vmware;
import com.google.common.base.Charsets;
import com.google.common.base.Throwables;
import com.google.common.io.Files;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
public class MoreMatchers
{
public static Matcher<File> fileExists()
{
return new BaseMatcher<File>()
{
@Override
public boolean matches(Object item)
{
File file = (File) item;
return file.exists();
}
@Override
public void describeTo(Description description)
{
description.appendText("does not exist");
}
};
}
public static Matcher<File> fileContentsEqual(final String body)
{
return new BaseMatcher<File>()
{
private String error = "File contents do not match";
@Override
public boolean matches(Object item)
{
File f = (File) item;
try {
String contents = Files.toString(f, Charsets.UTF_8);
return body.equals(contents);
}
catch (IOException e) {
error = e.getMessage();
return false;
}
}
@Override
public void describeTo(Description description)
{
description.appendText(error);
}
};
}
}
|
[
"brianm@skife.org"
] |
brianm@skife.org
|
9089b16a4d5bf719d29930623dfa1510af1bfcb5
|
29a0cb653b276a9494d607c625584b935c3e5e34
|
/projects-parent/archetypes-parent/apptbook-web-archetype/src/main/resources/archetype-resources/src/main/java/Project4.java
|
174731e2030a1fda40ccd613905c4cf8a493069b
|
[
"Apache-2.0"
] |
permissive
|
persistentlobster/PortlandStateJava
|
e9e4e1bd8a142be82a863ecbd8c3de091998addf
|
2d9b80a8de60d64a4064333cee15ad0f1afdce77
|
refs/heads/master
| 2020-06-19T17:02:28.184013
| 2019-07-13T23:19:16
| 2019-07-13T23:19:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,718
|
java
|
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};
import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Map;
/**
* The main class that parses the command line and communicates with the
* Appointment Book server using REST.
*/
public class Project4 {
public static final String MISSING_ARGS = "Missing command line arguments";
public static void main(String... args) {
String hostName = null;
String portString = null;
String word = null;
String definition = null;
for (String arg : args) {
if (hostName == null) {
hostName = arg;
} else if ( portString == null) {
portString = arg;
} else if (word == null) {
word = arg;
} else if (definition == null) {
definition = arg;
} else {
usage("Extraneous command line argument: " + arg);
}
}
if (hostName == null) {
usage( MISSING_ARGS );
} else if ( portString == null) {
usage( "Missing port" );
}
int port;
try {
port = Integer.parseInt( portString );
} catch (NumberFormatException ex) {
usage("Port ${symbol_escape}"" + portString + "${symbol_escape}" must be an integer");
return;
}
AppointmentBookRestClient client = new AppointmentBookRestClient(hostName, port);
String message;
try {
if (word == null) {
// Print all word/definition pairs
Map<String, String> dictionary = client.getAllDictionaryEntries();
StringWriter sw = new StringWriter();
Messages.formatDictionaryEntries(new PrintWriter(sw, true), dictionary);
message = sw.toString();
} else if (definition == null) {
// Print all dictionary entries
message = Messages.formatDictionaryEntry(word, client.getDefinition(word));
} else {
// Post the word/definition pair
client.addDictionaryEntry(word, definition);
message = Messages.definedWordAs(word, definition);
}
} catch ( IOException ex ) {
error("While contacting server: " + ex);
return;
}
System.out.println(message);
System.exit(0);
}
private static void error( String message )
{
PrintStream err = System.err;
err.println("** " + message);
System.exit(1);
}
/**
* Prints usage information for this program and exits
* @param message An error message to print
*/
private static void usage( String message )
{
PrintStream err = System.err;
err.println("** " + message);
err.println();
err.println("usage: java Project4 host port [word] [definition]");
err.println(" host Host of web server");
err.println(" port Port of web server");
err.println(" word Word in dictionary");
err.println(" definition Definition of word");
err.println();
err.println("This simple program posts words and their definitions");
err.println("to the server.");
err.println("If no definition is specified, then the word's definition");
err.println("is printed.");
err.println("If no word is specified, all dictionary entries are printed");
err.println();
System.exit(1);
}
}
|
[
"david.m.whitlock@gmail.com"
] |
david.m.whitlock@gmail.com
|
86c8e014632ab4fb75294359d2032ea5b3125877
|
6392035b0421990479baf09a3bc4ca6bcc431e6e
|
/projects/hazelcast-69dd55c9/curr/hazelcast/src/test/java/com/hazelcast/util/collection/IntHashSetTest.java
|
150f026ef16c8f9a398c4b37d8b7a86bc1254805
|
[] |
no_license
|
ameyaKetkar/RMinerEvaluationTools
|
4975130072bf1d4940f9aeb6583eba07d5fedd0a
|
6102a69d1b78ae44c59d71168fc7569ac1ccb768
|
refs/heads/master
| 2020-09-26T00:18:38.389310
| 2020-05-28T17:34:39
| 2020-05-28T17:34:39
| 226,119,387
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,017
|
java
|
/*
* Copyright 2015 Real Logic Ltd.
*
* 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.hazelcast.util.collection;
import com.hazelcast.test.HazelcastSerialClassRunner;
import com.hazelcast.test.annotation.QuickTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import java.util.Iterator;
import static org.hamcrest.Matchers.contains;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
@RunWith(HazelcastSerialClassRunner.class)
@Category(QuickTest.class)
public class IntHashSetTest {
private final IntHashSet obj = new IntHashSet(100, -1);
@Test public void initiallyContainsNoElements() throws Exception {
for (int i = 0; i < 10000; i++) {
assertFalse(obj.contains(i));
}
}
@Test public void initiallyContainsNoBoxedElements() {
for (int i = 0; i < 10000; i++) {
assertFalse(obj.contains(Integer.valueOf(i)));
}
}
@Test public void containsAddedBoxedElement() {
assertTrue(obj.add(1));
assertTrue(obj.contains(1));
}
@Test public void addingAnElementTwiceDoesNothing() {
assertTrue(obj.add(1));
assertFalse(obj.add(1));
}
@Test public void containsAddedBoxedElements() {
assertTrue(obj.add(1));
assertTrue(obj.add(Integer.valueOf(2)));
assertTrue(obj.contains(Integer.valueOf(1)));
assertTrue(obj.contains(2));
}
@Test public void removingAnElementFromAnEmptyListDoesNothing() {
assertFalse(obj.remove(0));
}
@Test public void removingAPresentElementRemovesIt() {
assertTrue(obj.add(1));
assertTrue(obj.remove(1));
assertFalse(obj.contains(1));
}
@Test public void sizeIsInitiallyZero() {
assertEquals(0, obj.size());
}
@Test public void sizeIncrementsWithNumberOfAddedElements() {
obj.add(1);
obj.add(2);
assertEquals(2, obj.size());
}
@Test public void sizeContainsNumberOfNewElements() {
obj.add(1);
obj.add(1);
assertEquals(1, obj.size());
}
@Test public void iteratorsListElements() {
obj.add(1);
obj.add(2);
assertIteratorHasElements();
}
@Test public void iteratorsStartFromTheBeginningEveryTime() {
iteratorsListElements();
assertIteratorHasElements();
}
@Test public void clearRemovesAllElementsOfTheSet() {
obj.add(1);
obj.add(2);
obj.clear();
assertEquals(0, obj.size());
assertFalse(obj.contains(1));
assertFalse(obj.contains(2));
}
@Test public void differenceReturnsNullIfBothSetsEqual() {
obj.add(1);
obj.add(2);
final IntHashSet other = new IntHashSet(100, -1);
other.add(1);
other.add(2);
assertNull(obj.difference(other));
}
@Test public void differenceReturnsSetDifference() {
obj.add(1);
obj.add(2);
final IntHashSet other = new IntHashSet(100, -1);
other.add(1);
final IntHashSet diff = obj.difference(other);
assertEquals(1, diff.size());
assertTrue(diff.contains(2));
}
@Test public void copiesOtherIntHashSet() {
obj.add(1);
obj.add(2);
final IntHashSet other = new IntHashSet(100, -1);
other.copy(obj);
assertThat(other, contains(1, 2));
}
@Test public void twoEmptySetsAreEqual() {
final IntHashSet other = new IntHashSet(100, -1);
assertEquals(obj, other);
}
@Test public void equalityRequiresTheSameMissingValue() {
final IntHashSet other = new IntHashSet(100, 1);
assertNotEquals(obj, other);
}
@Test public void setsWithTheSameValuesAreEqual() {
final IntHashSet other = new IntHashSet(100, -1);
obj.add(1);
obj.add(1001);
other.add(1);
other.add(1001);
assertEquals(obj, other);
}
@Test public void setsWithTheDifferentSizesAreNotEqual() {
final IntHashSet other = new IntHashSet(100, -1);
obj.add(1);
obj.add(1001);
other.add(1001);
assertNotEquals(obj, other);
}
@Test public void setsWithTheDifferentValuesAreNotEqual() {
final IntHashSet other = new IntHashSet(100, -1);
obj.add(1);
obj.add(1001);
other.add(2);
other.add(1001);
assertNotEquals(obj, other);
}
@Test public void twoEmptySetsHaveTheSameHashcode() {
final IntHashSet other = new IntHashSet(100, -1);
assertEquals(obj.hashCode(), other.hashCode());
}
@Test public void setsWithTheSameValuesHaveTheSameHashcode() {
final IntHashSet other = new IntHashSet(100, -1);
obj.add(1);
obj.add(1001);
other.add(1);
other.add(1001);
assertEquals(obj.hashCode(), other.hashCode());
}
private void assertIteratorHasElements() {
final Iterator<Integer> iter = obj.iterator();
assertTrue(iter.hasNext());
assertEquals(Integer.valueOf(1), iter.next());
assertTrue(iter.hasNext());
assertEquals(Integer.valueOf(2), iter.next());
assertFalse(iter.hasNext());
}
}
|
[
"ask1604@gmail.com"
] |
ask1604@gmail.com
|
2b8976d9124a9a77b3d84e9bf3e4befe5aa29ede
|
337cb92559eff5f2055d304b464a6289f64c20eb
|
/core/cas-server-core-audit-api/src/main/java/org/apereo/cas/audit/spi/principal/ChainingAuditPrincipalIdProvider.java
|
97f065b798641c5d329fa4c260013ac4016c5666
|
[
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
quibeLee/cas
|
a2b845ae390919e00a9d3ef07e2cb1c7b3889711
|
49eb3617c9a870e65faa1f3d04384000adfb9a6f
|
refs/heads/master
| 2022-12-25T18:31:39.013523
| 2020-09-25T17:02:06
| 2020-09-25T17:02:06
| 299,008,041
| 1
| 0
|
Apache-2.0
| 2020-09-27T10:33:58
| 2020-09-27T10:33:57
| null |
UTF-8
|
Java
| false
| false
| 1,617
|
java
|
package org.apereo.cas.audit.spi.principal;
import org.apereo.cas.audit.AuditPrincipalIdProvider;
import org.apereo.cas.authentication.Authentication;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.val;
import java.util.List;
/**
* This is {@link ChainingAuditPrincipalIdProvider}.
*
* @author Misagh Moayyed
* @since 5.3.0
*/
@Getter
@RequiredArgsConstructor
public class ChainingAuditPrincipalIdProvider implements AuditPrincipalIdProvider {
private final List<AuditPrincipalIdProvider> providers;
/**
* Add provider.
*
* @param provider the provider
*/
public void addProvider(final AuditPrincipalIdProvider provider) {
providers.add(provider);
}
/**
* Add providers.
*
* @param provider the provider
*/
public void addProviders(final List<AuditPrincipalIdProvider> provider) {
providers.addAll(provider);
}
@Override
public String getPrincipalIdFrom(final Authentication authentication, final Object resultValue, final Exception exception) {
val result = providers.stream()
.filter(p -> p.supports(authentication, resultValue, exception))
.findFirst()
.orElseGet(DefaultAuditPrincipalIdProvider::new);
return result.getPrincipalIdFrom(authentication, resultValue, exception);
}
@Override
public boolean supports(final Authentication authentication, final Object resultValue, final Exception exception) {
return true;
}
@Override
public int getOrder() {
return Integer.MAX_VALUE;
}
}
|
[
"mm1844@gmail.com"
] |
mm1844@gmail.com
|
6022bac5ae05a40cc740fd41bd05a76aed84f673
|
f4762a908e49f7aaa177378c2ebdf7b985180e2b
|
/sources/com/google/appinventor/components/runtime/util/RuntimeErrorAlert.java
|
1722c7e81f0b5e357e940baf24842b294be2b443
|
[
"MIT"
] |
permissive
|
PixalTeam/receiver_android
|
76f5b0a7a8c54d83e49ad5921f640842547a171f
|
d4aa75f9021a66262a9a267edd5bc25509677248
|
refs/heads/master
| 2020-12-03T08:49:57.484377
| 2020-01-01T20:38:04
| 2020-01-01T20:38:04
| 231,260,295
| 0
| 0
|
MIT
| 2020-11-15T12:46:40
| 2020-01-01T20:25:18
|
Java
|
UTF-8
|
Java
| false
| false
| 1,103
|
java
|
package com.google.appinventor.components.runtime.util;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.util.Log;
public final class RuntimeErrorAlert {
public static void alert(final Object context, String message, String title, String buttonText) {
Log.i("RuntimeErrorAlert", "in alert");
AlertDialog alertDialog = new Builder((Context) context).create();
alertDialog.setTitle(title);
alertDialog.setMessage(message);
alertDialog.setButton(buttonText, new OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
((Activity) context).finish();
}
});
if (message == null) {
Log.e(RuntimeErrorAlert.class.getName(), "No error message available");
} else {
Log.e(RuntimeErrorAlert.class.getName(), message);
}
alertDialog.show();
}
}
|
[
"34947108+Gumbraise@users.noreply.github.com"
] |
34947108+Gumbraise@users.noreply.github.com
|
341924dde17fcd85868d4c223efedae4fa1afe49
|
631afd8bb77a19ac0f0604c41176d11f63e90c7d
|
/kie-wb-common-stunner-backend/src/main/java/org/kie/workbench/common/stunner/backend/registry/impl/SyncDiagramListRegistry.java
|
1c985bfd7d327ba79aab67d349e2111506b99297
|
[] |
no_license
|
tsurdilo/wirez
|
86aaf88fcf412cfa1b03a9cfa8e81503b52439bc
|
fd8963cdd0dd6ec916b051dc5759f23bd6fe2074
|
refs/heads/master
| 2020-12-29T03:07:36.637532
| 2016-10-04T01:44:36
| 2016-10-04T02:29:18
| 68,604,988
| 0
| 0
| null | 2016-09-19T12:46:45
| 2016-09-19T12:46:45
| null |
UTF-8
|
Java
| false
| false
| 476
|
java
|
package org.kie.workbench.common.stunner.backend.registry.impl;
import org.kie.workbench.common.stunner.core.diagram.Diagram;
import org.kie.workbench.common.stunner.core.registry.impl.AbstractDiagramListRegistry;
import java.util.ArrayList;
import java.util.Collections;
class SyncDiagramListRegistry<D extends Diagram> extends AbstractDiagramListRegistry<D> {
SyncDiagramListRegistry() {
super(Collections.synchronizedList(new ArrayList<D>()));
}
}
|
[
"roger600@gmail.com"
] |
roger600@gmail.com
|
88d129232dee994969f3051b3b664978b8717a8f
|
947edc58e161933b70d595242d4663a6d0e68623
|
/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/AtgroupService.java
|
5050097ddba1b07e6d81f83f23a641be771b0bfb
|
[] |
no_license
|
jieke360/pig6
|
5a5de28b0e4785ff8872e7259fc46d1f5286d4d9
|
8413feed8339fab804b11af8d3fbab406eb80b68
|
refs/heads/master
| 2023-02-04T12:39:34.279157
| 2020-12-31T03:57:43
| 2020-12-31T03:57:43
| 325,705,631
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,392
|
java
|
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.admin.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.pigx.admin.entity.Atgroup;
/**
* 轮班组管理
*
* @author GXS
* @date 2020-05-25 10:52:51
*/
public interface AtgroupService extends IService<Atgroup> {
/**
* 查询列表记录,包含考勤时间合并显示
* @param page
* @param atgroup
* @return
*/
public IPage getAtgroupList(Page page, Atgroup atgroup);
}
|
[
"qdgaoxiao@163.com"
] |
qdgaoxiao@163.com
|
2d235be5f3506f8ec410cb43e0bacccbf2826361
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/aiccs-20191015/src/main/java/com/aliyun/aiccs20191015/models/RemoveSkillGroupRequest.java
|
78618ad1188817db3bfcf1bfa4a5c3a4f7faa9dd
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,231
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.aiccs20191015.models;
import com.aliyun.tea.*;
public class RemoveSkillGroupRequest extends TeaModel {
@NameInMap("InstanceId")
public String instanceId;
@NameInMap("SkillGroupId")
public String skillGroupId;
@NameInMap("ClientToken")
public String clientToken;
public static RemoveSkillGroupRequest build(java.util.Map<String, ?> map) throws Exception {
RemoveSkillGroupRequest self = new RemoveSkillGroupRequest();
return TeaModel.build(map, self);
}
public RemoveSkillGroupRequest setInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
public String getInstanceId() {
return this.instanceId;
}
public RemoveSkillGroupRequest setSkillGroupId(String skillGroupId) {
this.skillGroupId = skillGroupId;
return this;
}
public String getSkillGroupId() {
return this.skillGroupId;
}
public RemoveSkillGroupRequest setClientToken(String clientToken) {
this.clientToken = clientToken;
return this;
}
public String getClientToken() {
return this.clientToken;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
f4f8863ac4515e77da02623cc422e6b2fd7a743e
|
9113e825106c3f756bc982493fa634309d32ff23
|
/src/com/cabletech/analysis/dao/RealTimeOnlineDAO.java
|
86f27c0e12733e6a69baff7cad057087221d0e3b
|
[] |
no_license
|
liveqmock/hljnewweb
|
204cea81c12d4051e29d9dd237b16e58422a5f73
|
a895281c9ee72cf6992aac298bbd4eb8b283a9db
|
refs/heads/master
| 2020-05-29T11:38:35.424256
| 2012-09-18T07:54:15
| 2012-09-18T07:54:15
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,636
|
java
|
package com.cabletech.analysis.dao;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import com.cabletech.commons.hb.QueryUtil;
/**
* RealTimeOnlineDAO.java
*/
public class RealTimeOnlineDAO {
private QueryUtil query;
private Logger logger = Logger.getLogger("RealTimeOnlineDAO");
/**
* 通过QueryUtil类查询在线人数,返回的list中包含交叉时间、sim卡号
*
* @param sql String sql语句
* @return List 返回list结果
*/
public List queryOnlineNum(String sql) {
List result = new ArrayList();
try {
query = new QueryUtil();
result = query.queryBeans(sql);
return result;
} catch (Exception e) {
logger.info("query 对象初始化失败:" + e);
e.printStackTrace();
return null;
}
}
// /**
// * 查询在线人员(每个sim卡号)当前的工作状态 返回结果中包括时间段,该时刻的状态
// *
// * @param sql
// * @return Map
// */
// public Map queryPatrolOnline(String sql) {
// return null;
// }
/**
* 根据传入的sql查询出短信数目。
*
* @param sql String sql语句
* @return int 返回短信数量。
*/
public int queryNoteNum(String sql) {
int num = 0;
try {
query = new QueryUtil();
ResultSet rs = query.executeQuery(sql);
while (rs.next()) {
num = rs.getInt("num");
}
return num;
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return num;
} catch (Exception e) {
logger.info("query 对象初始化失败:" + e);
return num;
}
}
}
|
[
"253479240@qq.com"
] |
253479240@qq.com
|
d5c0b972c41782d479fe293cbd0701364ea92f61
|
08506438512693067b840247fa2c9a501765f39d
|
/Product/Production/Common/CONNECTCoreLib/src/test/java/gov/hhs/fha/nhinc/patientcorrelation/nhinc/parsers/helpers/CSHelperTest.java
|
e8644e65056a0d68f1ebfd922c132f071ada435a
|
[] |
no_license
|
AurionProject/Aurion
|
2f577514de39e91e1453c64caa3184471de891fa
|
b99e87e6394ecdde8a4197b755774062bf9ef890
|
refs/heads/master
| 2020-12-24T07:42:11.956869
| 2017-09-27T22:08:31
| 2017-09-27T22:08:31
| 49,459,710
| 1
| 0
| null | 2017-03-07T23:24:56
| 2016-01-11T22:55:12
|
Java
|
UTF-8
|
Java
| false
| false
| 472
|
java
|
/**
*
*/
package gov.hhs.fha.nhinc.patientcorrelation.nhinc.parsers.helpers;
import static org.junit.Assert.assertEquals;
import org.hl7.v3.CS;
import org.junit.Test;
/**
* @author achidambaram
*
*/
public class CSHelperTest {
@Test
public void testBuildCS() {
CSHelper cs = new CSHelper();
CS csCode = new CS();
String code = "CONNECT";
csCode = cs.buildCS(code);
assertEquals(csCode.getCode(),code);
}
}
|
[
"neilkwebb@hotmail.com"
] |
neilkwebb@hotmail.com
|
c92a2ce52d25cfe749276fcc5ba0541f45338046
|
cabb1be82ece5b6bfe1df3b368182d2aad61360e
|
/rx/internal/util/unsafe/SpscArrayQueueColdField.java
|
57b836bc7b182dfb29dd54c29186495885e82f55
|
[] |
no_license
|
sooraj2102/nagarro_hack_app
|
4f1d7c488c1acf7439081b1c379db044d4f9966b
|
3c7de860e75018fea2572ae06b3bdd2f7bf8b907
|
refs/heads/master
| 2021-07-01T12:56:33.829341
| 2020-10-01T09:56:23
| 2020-10-01T09:56:23
| 148,969,210
| 0
| 3
| null | 2020-10-01T09:56:24
| 2018-09-16T06:18:35
|
Java
|
UTF-8
|
Java
| false
| false
| 632
|
java
|
package rx.internal.util.unsafe;
abstract class SpscArrayQueueColdField<E> extends ConcurrentCircularArrayQueue<E>
{
private static final Integer MAX_LOOK_AHEAD_STEP = Integer.getInteger("jctools.spsc.max.lookahead.step", 4096);
protected final int lookAheadStep;
public SpscArrayQueueColdField(int paramInt)
{
super(paramInt);
this.lookAheadStep = Math.min(paramInt / 4, MAX_LOOK_AHEAD_STEP.intValue());
}
}
/* Location: /home/satyam/AndroidStudioProjects/app/dex2jar-0.0.9.15/classes-dex2jar.jar
* Qualified Name: rx.internal.util.unsafe.SpscArrayQueueColdField
* JD-Core Version: 0.6.0
*/
|
[
"srjshingari@gmail.com"
] |
srjshingari@gmail.com
|
c62eade41cd70023f1b5d0ec8a5db3aac9c4d76a
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Jetty/Jetty1380.java
|
6f7bd270382154d9bc956657e73149617f29a137
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 372
|
java
|
@Override
public String getPathInfo(String path)
{
// Path Info only valid for PREFIX_GLOB types
if (group == PathSpecGroup.PREFIX_GLOB)
{
if (path.length() == (specLength - 2))
{
return null;
}
return path.substring(specLength - 2);
}
return null;
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
0906fddbbbad055ce1e88e15d5cc959d2877a603
|
5fda29cf88e8bc0b6e269ae5caa3b06d89b0498e
|
/rcp.manticora/src/rcp/manticora/model/ReservaTour.java
|
41bc233a37776f1599fbf826f7f0bef0572012c8
|
[] |
no_license
|
alfonso74/aep
|
b62402715ea611b7b5ad5816464edadce4860e5a
|
60f6b7a2457031d5f83d465a232a7bca4b72d7ba
|
refs/heads/master
| 2021-01-01T05:50:16.014220
| 2015-03-21T06:11:52
| 2015-03-21T06:11:52
| 32,057,123
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,321
|
java
|
package rcp.manticora.model;
import java.util.Date;
import rcp.manticora.services.FechaUtil;
public class ReservaTour extends ReservaAdapter {
// private Long idReserva = -1L; // implementado en ReservaAdapter
private Integer idHoja;
private Integer idDisponibilidad;
private Integer idCapitan;
private Integer cantidad;
private String estado;
private String dspEstado;
private String comentario;
private String tipoReserva = "Tour";
// private HojaServicio hoja; // implementado en ReservaAdapter
// private LineaActividad actividad; // ya no aplica
private DisponibilidadTour disponibilidad;
public ReservaTour() {
}
// **************************** métodos especiales ***************************
public String getTituloDocumento() {
return "Reserva " + getIdReserva();
}
@Override
public String toString() {
String texto = "ReservaTour (id-Hoja): " + getIdReserva() + "-" + getHoja().getIdHoja();
return texto;
}
/**
* Permite obtener la fecha para la que se está reservando el tour
* @return Fecha de reserva (tipo Date)
*/
public Date getFecha() {
return disponibilidad.getFecha();
}
public String getFechaDspReserva() {
String fechaResTxt = FechaUtil.toString(getFecha(), FechaUtil.formatoFecha);
return fechaResTxt;
}
// ***************************** getters y setters ***************************
public String getDspEstado() {
return dspEstado;
}
public String getEstado() {
return estado;
}
public void setDspEstado(String dspEstado) {
this.dspEstado = dspEstado;
}
public void setEstado(String estado) {
this.estado = estado;
}
/* TODO: borrar con nueva versión de reservas
public LineaActividad getActividad() {
return actividad;
}
public void setActividad(LineaActividad actividad) {
this.actividad = actividad;
}
*/
public DisponibilidadTour getDisponibilidad() {
return disponibilidad;
}
public void setDisponibilidadX(DisponibilidadTour disponibilidad) {
// si la reserva está asociada a una disponibilidad entonces
// eliminamos la asociación y LUEGO asignamos la nueva disponibilidad
if (getDisponibilidad() != null) {
getDisponibilidad().eliminarReserva(this);
}
// ...asociamos la nueva disponibilidad
this.disponibilidad = disponibilidad;
// y asociamos el otro extremo (agregamos esta reserva a la nueva disp)
getDisponibilidad().agregarReserva(this);
}
public void setDisponibilidad(DisponibilidadTour disponibilidad) {
this.disponibilidad = disponibilidad;
}
public Integer getCantidad() {
return cantidad;
}
public void setCantidad(Integer cantidad) {
this.cantidad = cantidad;
}
public Integer getIdDisponibilidad() {
return idDisponibilidad;
}
public void setIdDisponibilidad(Integer idDisponibilidad) {
this.idDisponibilidad = idDisponibilidad;
}
public Integer getIdHoja() {
return idHoja;
}
public void setIdHoja(Integer idHoja) {
this.idHoja = idHoja;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public String getTipoReserva() {
return tipoReserva;
}
public Integer getIdCapitan() {
return idCapitan;
}
public void setIdCapitan(Integer idCapitan) {
this.idCapitan = idCapitan;
}
}
|
[
"carlosal_p@yahoo.com"
] |
carlosal_p@yahoo.com
|
f738f279381d37ce285518c6ece10a67902e9198
|
5e2270d6cc16132fb1a66c47a72d9c18f2896c3a
|
/gosu-webservices/src/main/java/gw/internal/xml/ws/typeprovider/paraminfo/WsdlOperationParameterInfo.java
|
db13bbed09d3af2d578ee62085c7519b97af41d7
|
[
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
tellary/gosu-lang
|
4285c6484a27cf8d4cd2ab3b60e52a46e9fbb08c
|
04e4e0c29be82dccd9b172ca9e506a3a70092ca6
|
refs/heads/master
| 2020-12-07T15:35:55.150624
| 2014-12-18T20:21:57
| 2014-12-18T20:21:57
| 28,983,915
| 0
| 0
| null | 2015-01-08T20:13:01
| 2015-01-08T20:13:00
| null |
UTF-8
|
Java
| false
| false
| 5,595
|
java
|
/*
* Copyright 2014 Guidewire Software, Inc.
*/
package gw.internal.xml.ws.typeprovider.paraminfo;
import gw.internal.xml.xsd.typeprovider.IXmlSchemaElementTypeData;
import gw.internal.xml.xsd.typeprovider.XmlSchemaPropertySpec;
import gw.internal.xml.xsd.typeprovider.XmlSchemaTypeSchemaInfo;
import gw.internal.xml.xsd.typeprovider.schema.XmlSchemaElement;
import gw.internal.xml.xsd.typeprovider.schemaparser.XmlSchemaParser;
import gw.lang.reflect.IType;
import gw.xml.XmlElement;
import javax.xml.namespace.QName;
public abstract class WsdlOperationParameterInfo {
private final IType _parameterElementType;
private final QName _parameterElementName;
protected WsdlOperationParameterInfo( IType parameterElementType, QName parameterElementName ) {
_parameterElementType = parameterElementType;
_parameterElementName = parameterElementName;
}
public static WsdlOperationParameterInfo create( XmlSchemaPropertySpec parameterPropertySpec ) throws AnonymousElementException {
return createComponent( parameterPropertySpec, false, true );
}
private static WsdlOperationParameterInfo createComponent( XmlSchemaPropertySpec componentPropertySpec, boolean isComponent, boolean primitiveOk ) throws AnonymousElementException {
IXmlSchemaElementTypeData componentTypeData = componentPropertySpec.getElementPropertyGosuTypeData();
XmlSchemaTypeSchemaInfo componentSchemaInfo = componentTypeData.getSchemaInfo();
// perform pre-checks to see if we have a strategy to unwrap this component
boolean identity = false;
XmlSchemaElement element = (XmlSchemaElement) componentPropertySpec.getXmlSchemaObject();
boolean hasAttributes = hasAttributes( componentSchemaInfo );
boolean hasAny = hasAny( componentSchemaInfo );
if ( ! isComponent ) {
// top level parameter must be single and non-nillable
if ( componentPropertySpec.isPlural() ) {
identity = true; // cannot be plural since there is no wrapping list for now
}
if ( element.isNillable() ) {
identity = true;
}
}
if ( componentPropertySpec.hasSimpleContent() && ! hasAttributes && ! hasAny ) {
if ( isComponent && ! primitiveOk && ! element.isNillable() ) {
identity = true;
}
else {
return new SimpleContentWsdlOperationParameterInfo( componentPropertySpec, isComponent, primitiveOk );
}
}
if ( identity ) {
return new IdentityWsdlOperationParameterInfo( componentPropertySpec.getElementPropertyGosuType(), componentPropertySpec.getQName(), ! isComponent );
}
if ( ! componentSchemaInfo.getTypeData().isAnonymous() ) {
return new XmlTypeInstanceWsdlOperationParameterInfo( componentPropertySpec );
}
if ( componentSchemaInfo.getProperties().size() == 0 && ! hasAttributes && hasAny ) {
return new XmlElementWsdlOperationParameterInfo( componentPropertySpec, null );
}
if ( componentSchemaInfo.getProperties().size() == 1 && ! hasAttributes && ! hasAny ) {
XmlSchemaPropertySpec childPropertySpec = componentSchemaInfo.getProperties().get( 0 );
if ( childPropertySpec.isPlural() ) {
if ( XmlSchemaParser.VIEWAS_LIST.equals( element.getGwViewAs() ) ) {
WsdlOperationParameterInfo childParamInfo = createComponent( childPropertySpec, true, false );
if ( childParamInfo != null ) {
return new ListWsdlOperationParameterInfo( componentPropertySpec.getElementPropertyGosuType(), componentPropertySpec.getQName(), childParamInfo );
}
}
else {
WsdlOperationParameterInfo childParamInfo = createComponent( childPropertySpec, true, true );
if ( childParamInfo != null ) {
return new ArrayWsdlOperationParameterInfo( componentPropertySpec.getElementPropertyGosuType(), componentPropertySpec.getQName(), childParamInfo );
}
}
}
IXmlSchemaElementTypeData childTypeData = childPropertySpec.getElementPropertyGosuTypeData();
if ( ! childTypeData.isAnonymous() ) {
return new XmlElementWsdlOperationParameterInfo( componentPropertySpec, childPropertySpec );
}
else if ( ! childTypeData.getSchemaInfo().getTypeData().isAnonymous() ) {
return new XmlTypeInstanceWsdlOperationParameterInfo( componentPropertySpec );
}
}
else if ( componentTypeData.isAnonymous() && ! componentSchemaInfo.getTypeData().isAnonymous() ) {
// we normally prefer elements, but we prefer a non-anonymous typeinstance over an anonymous element
return new XmlTypeInstanceWsdlOperationParameterInfo( componentPropertySpec );
}
return new IdentityWsdlOperationParameterInfo( componentPropertySpec.getElementPropertyGosuType(), componentPropertySpec.getQName(), ! isComponent );
}
public static boolean hasAttributes( XmlSchemaTypeSchemaInfo componentSchemaInfo ) {
return componentSchemaInfo.getXsdType().getAnyAttributeRecursiveIncludingSupertypes() != null || ! componentSchemaInfo.getAttributeNames().isEmpty();
}
public static boolean hasAny( XmlSchemaTypeSchemaInfo componentSchemaInfo ) {
return componentSchemaInfo.getXsdType().getAnyRecursiveIncludingSupertypes() != null;
}
public abstract IType getType();
public abstract Object unwrap( XmlElement node );
public abstract String getName();
public abstract XmlElement wrap( Object obj, XmlElement componentElement );
public IType getParameterElementType() {
return _parameterElementType;
}
public QName getParameterElementName() {
return _parameterElementName;
}
}
|
[
"lboasso@guidewire.com"
] |
lboasso@guidewire.com
|
3eef237e96b849998f4400b876eadd32ca058f39
|
c81dd37adb032fb057d194b5383af7aa99f79c6a
|
/java/com/facebook/ads/redexgen/X/AnonymousClass6B.java
|
96536a4ae805518c779837d0565a6b0c7d38c43e
|
[] |
no_license
|
hongnam207/pi-network-source
|
1415a955e37fe58ca42098967f0b3307ab0dc785
|
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
|
refs/heads/main
| 2023-03-30T07:49:35.920796
| 2021-03-28T06:56:24
| 2021-03-28T06:56:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,850
|
java
|
package com.facebook.ads.redexgen.X;
import android.annotation.SuppressLint;
import android.util.Log;
import java.util.Arrays;
/* renamed from: com.facebook.ads.redexgen.X.6B reason: invalid class name */
public final class AnonymousClass6B {
public static AnonymousClass6A A00;
public static byte[] A01;
public static String[] A02;
public static final String A03 = AnonymousClass6B.class.getSimpleName();
public static String A00(int i, int i2, int i3) {
byte[] copyOfRange = Arrays.copyOfRange(A01, i, i + i2);
for (int i4 = 0; i4 < copyOfRange.length; i4++) {
copyOfRange[i4] = (byte) ((copyOfRange[i4] - i3) - 118);
}
return new String(copyOfRange);
}
public static void A01() {
byte[] bArr = {20, 71, 50, 52, 63, 67, 56, 62, 61, -17, 51, 68, 65, 56, 61, 54, -17, 52, 71, 52, 50, 68, 67, 56, 62, 61, -3};
String[] strArr = A02;
if (strArr[3].length() != strArr[5].length()) {
throw new RuntimeException();
}
String[] strArr2 = A02;
strArr2[0] = "lreKiDhdf1OAP";
strArr2[0] = "lreKiDhdf1OAP";
A01 = bArr;
}
public static void A02() {
A02 = new String[]{"sp1TByEGG7e0GADwDzlASPV0aap3ieHh", "uzFI86KB8SuPvllmns5EhrThmrxeiZB", "WffZMJDQYz5YPWrNy4ctgABXEOCgIES3", "xNvoCKy4p7HAo2gXsjU", "die", "gYyZIkzjV9FAWz0BtKI", "Id5RyLkBfkqUUkVvBGvirNkAkhkz8uh0", "U7WQUa4wbg5Ag319WkF2HwzvOv4zz"};
}
static {
A02();
A01();
}
public static void A03(AnonymousClass6A r0) {
A00 = r0;
}
@SuppressLint({"BadMethodUse-android.util.Log.e"})
public static void A04(Throwable th) {
AnonymousClass6A r0 = A00;
if (r0 != null) {
r0.ACU(th);
} else {
Log.e(A03, A00(0, 27, 89), th);
}
}
}
|
[
"nganht2@vng.com.vn"
] |
nganht2@vng.com.vn
|
00f68a8a3dbd3eee912f2ca937f737687a6ad3eb
|
a8d96e66ab9dee694bc81c8429c40f40a11ba88f
|
/src/main/java/com/thinkaurelius/faunus/formats/titan/SchemaInferencerMapReduce.java
|
cf3d9fbe635643ad76068434859ce2ba9424fb0b
|
[
"Apache-2.0"
] |
permissive
|
mmaro/faunus
|
626213b2ca3d572d827716f35ae4f6abf0a465c0
|
9163edd60b2dd3856e2a4c8a943ca20bcb717592
|
refs/heads/master
| 2020-12-24T14:52:52.444963
| 2013-06-13T17:29:25
| 2013-06-13T17:29:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,149
|
java
|
package com.thinkaurelius.faunus.formats.titan;
import com.thinkaurelius.faunus.FaunusVertex;
import com.thinkaurelius.faunus.formats.BlueprintsGraphOutputMapReduce;
import com.thinkaurelius.titan.core.DefaultTypeMaker;
import com.thinkaurelius.titan.core.TitanGraph;
import com.thinkaurelius.titan.graphdb.blueprints.BlueprintsDefaultTypeMaker;
import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Edge;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import java.io.IOException;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
public class SchemaInferencerMapReduce {
public enum Counters {
EDGE_LABELS_CREATED,
PROPERTY_KEYS_CREATED
}
private static final long funnyLong = -123456789l;
private static final LongWritable funnyKey = new LongWritable(funnyLong);
public static class Map extends Mapper<NullWritable, FaunusVertex, LongWritable, FaunusVertex> {
private final FaunusVertex funnyVertex = new FaunusVertex(funnyKey.get());
private final LongWritable longWritable = new LongWritable();
@Override
public void map(final NullWritable key, final FaunusVertex value, final Mapper<NullWritable, FaunusVertex, LongWritable, FaunusVertex>.Context context) throws IOException, InterruptedException {
for (final String property : value.getPropertyKeys()) {
this.funnyVertex.setProperty("t" + property, Object.class.getName());
// TODO: Automated type inference
/*final Object temp = this.funnyVertex.getProperty("t" + property);
if (null == temp) {
this.funnyVertex.setProperty("t" + property, value.getProperty(property).getClass().getName());
} else if (!value.getProperty(property).equals(temp)) {
this.funnyVertex.setProperty("t" + property, Object.class.getName());
}*/
}
for (final Edge edge : value.getEdges(Direction.OUT)) {
this.funnyVertex.setProperty("l" + edge.getLabel(), String.class.getName());
for (final String property : edge.getPropertyKeys()) {
this.funnyVertex.setProperty("t" + property, Object.class.getName());
}
}
this.longWritable.set(value.getIdAsLong());
context.write(this.longWritable, value);
}
@Override
public void cleanup(final Mapper<NullWritable, FaunusVertex, LongWritable, FaunusVertex>.Context context) throws IOException, InterruptedException {
context.write(funnyKey, this.funnyVertex);
}
}
public static class Reduce extends org.apache.hadoop.mapreduce.Reducer<LongWritable, FaunusVertex, NullWritable, FaunusVertex> {
private TitanGraph graph;
@Override
public void setup(final Reduce.Context context) throws IOException, InterruptedException {
this.graph = (TitanGraph) BlueprintsGraphOutputMapReduce.generateGraph(context.getConfiguration());
}
@Override
public void reduce(final LongWritable key, final Iterable<FaunusVertex> value, final Reducer<LongWritable, FaunusVertex, NullWritable, FaunusVertex>.Context context) throws IOException, InterruptedException {
if (key.get() == funnyLong) {
final DefaultTypeMaker typeMaker = BlueprintsDefaultTypeMaker.INSTANCE;
for (final FaunusVertex vertex : value) {
for (final String property : vertex.getPropertyKeys()) {
final String property2 = property.substring(1);
if (property.startsWith("t")) {
if (null == graph.getType(property2)) {
// TODO: Automated type inference
// typeMaker.makeKey(property2, graph.makeType().dataType(Class.forName(vertex.getProperty(property).toString())));
typeMaker.makeKey(property2, graph.makeType());
context.getCounter(Counters.PROPERTY_KEYS_CREATED).increment(1l);
}
} else {
if (null == graph.getType(property2)) {
typeMaker.makeLabel(property2, graph.makeType());
context.getCounter(Counters.EDGE_LABELS_CREATED).increment(1l);
}
}
}
}
} else {
for (final FaunusVertex vertex : value) {
context.write(NullWritable.get(), vertex);
}
}
}
@Override
public void cleanup(final Reducer<LongWritable, FaunusVertex, NullWritable, FaunusVertex>.Context context) throws IOException, InterruptedException {
this.graph.commit();
this.graph.shutdown();
}
}
}
|
[
"okrammarko@gmail.com"
] |
okrammarko@gmail.com
|
89ff7cd54ca80030a15ee5275c8f8e6ea56de062
|
62f27e40ef4ab0a9b66026d66dff0dd62f6fe460
|
/socket/src/main/java/com/ez08/support/util/EzKeyValue.java
|
9f94bd0aebb60579c87c8ab95a62d4a32463d908
|
[] |
no_license
|
DangerMaker/compass
|
73b8e256568b67b90d33dde4f2bcb6f6f65510e3
|
4d832a7dacf2880b1ace9179a7647764c8279e59
|
refs/heads/master
| 2020-04-20T05:30:45.600015
| 2019-04-12T09:34:54
| 2019-04-12T09:34:54
| 168,658,007
| 0
| 0
| null | null | null | null |
ISO-8859-2
|
Java
| false
| false
| 4,647
|
java
|
package com.ez08.support.util;
import java.io.ByteArrayOutputStream;
import android.os.Bundle;
public class EzKeyValue extends EzValue{
//name
private String name;
/**
*/
public EzKeyValue()
{
}
//
public EzKeyValue(String inName) {
name = new String(inName);
}
//
public EzKeyValue(String inName,EzValue inValue)
{
name = new String(inName);
setValue(inValue);
}
public EzKeyValue(String inName,Object inValue)
{
name = new String(inName);
if(inValue == null)
return;
setValue(inValue);
}
/**
* clone
*/
public EzKeyValue clone()
{
EzKeyValue var = new EzKeyValue();
if(this.name != null)
var.name = new String(this.name);
var.setValue((EzValue)this);
return var;
}
/**
* write key value to output. content = key + value;
*/
public boolean writeKeyValueTo(CodedOutputStream output)
{
try
{
if(name == null || name.equals(""))
return false;
ByteArrayOutputStream rawOutput = new ByteArrayOutputStream();
CodedOutputStream cop = CodedOutputStream.newInstance(rawOutput);
//§Őkey
cop.writeStringNoTag(name);
//§Ővalue(??valueType)
writeValueTo(cop);
cop.flush();
byte[] bytearray = rawOutput.toByteArray();
rawOutput.close();
//real output,length + content.
output.writeInt32NoTag(bytearray.length);
output.writeRawBytes(bytearray);
return true;
}
catch (Exception e)
{
e.printStackTrace();
return false;
}
}
/**
* read key value from input;
*/
public boolean readKeyValueFrom(CodedInputStream input)
{
try
{
int nLength = input.readInt32();
if(nLength > 0)
{
//key
name = input.readString();
if(name == null)
return false;
//value
return readValueFrom(input);
}
else return false;
}
catch (Exception e)
{
e.printStackTrace();
return false;
}
}
public String getName()
{
if(name == null)
return "";
else return new String(name);
}
/**
* set the key name
*/
public void setName(String inName)
{
if(inName == null)
name = inName;
else
name = new String(inName);
}
public boolean equals(EzKeyValue inValue)
{
if(name == inValue.getName())
{
return ((EzValue)this).equals((EzValue)inValue);
}
else if(name ==null || inValue.getName() == null)
{
return false;
}
else if(name.equals(inValue.getName())==false)
{
return false;
}
else
{
return ((EzValue)this).equals((EzValue)inValue);
}
}
/**
* description
*/
public String description(){
StringBuffer strBuffer = new StringBuffer();
//
if(getName() == null || getName().equals(""))
strBuffer.append("noname");
else
strBuffer.append(getName());
strBuffer.append(" = {");
//
strBuffer.append(super.description());
//
strBuffer.append("};\r\n");
return strBuffer.toString();
}
//use for android
/**
* add to bundle
*/
public boolean addToBundle(Bundle bdl)
{
if(bdl == null || name == null)
return false;
switch(getType())
{
case VALUE_TYPE_INT32:
bdl.putInt(name, getInt32());break;
case VALUE_TYPE_INT64:
bdl.putLong(name, getInt64());break;
case VALUE_TYPE_BOOL:
bdl.putBoolean(name, getBoolean());break;
case VALUE_TYPE_ENUM:
bdl.putInt(name, getInt32());break;
case VALUE_TYPE_FLOAT:
bdl.putFloat(name, getFloat());break;
case VALUE_TYPE_DOUBLE:
bdl.putDouble(name, getDouble());break;
case VALUE_TYPE_STRING:
bdl.putString(name, getString());break;
case VALUE_TYPE_BYTES:
bdl.putByteArray(name, getBytes());break;
case VALUE_TYPE_STRINGS:
bdl.putStringArray(name, getStrings());break;
case VALUE_TYPE_INT32S:
bdl.putIntArray(name, getInt32s());break;
case VALUE_TYPE_INT64S:
bdl.putLongArray(name, getInt64s());break;
case VALUE_TYPE_FLOATS:
bdl.putFloatArray(name, getFloats());break;
case VALUE_TYPE_DOUBLES:
bdl.putDoubleArray(name, getDoubles());break;
case VALUE_TYPE_MESSAGE:
if(getMessage() != null)
{
bdl.putSerializable(name,super.clone());
}
break;
case VALUE_TYPE_MESSAGES:
if(getMessages() != null)
{
bdl.putSerializable(name,super.clone());
}
break;
case VALUE_TYPE_KEYVALUE:
if(getKeyValue() != null)
{
bdl.putBundle(name,this.valueToBundle());
}
break;
case VALUE_TYPE_KEYVALUES:
if(getKeyValues() != null)
bdl.putBundle(name,this.valueToBundle());
break;
case VALUE_TYPE_VALUES:
if(getValues() != null)
{
bdl.putSerializable(name,super.clone());
}
break;
default:
return false;
}
return true;
}
}
|
[
"liuyujiaqing@123.com"
] |
liuyujiaqing@123.com
|
d18b9135d3fe7db0a24addc459c6186c7c50afc1
|
0f8ce911b0e527226a706bf4eb98a79619fc58f3
|
/app/src/main/java/ng/assist/UIs/ViewModel/CartModel.java
|
82db4ebb4cd1069db887c4d6dd42b18517096849
|
[] |
no_license
|
darmilola/Assist.ng-App
|
fea68fe188dd8137a0b7625354e797a5b6b5dab7
|
94c3f412ded82d1b1f202137bc1fc2c475736771
|
refs/heads/master
| 2023-08-10T17:52:19.178179
| 2021-10-10T18:48:35
| 2021-10-10T18:48:35
| 387,199,744
| 0
| 0
| null | 2021-10-10T18:48:35
| 2021-07-18T14:49:03
|
Java
|
UTF-8
|
Java
| false
| false
| 629
|
java
|
package ng.assist.UIs.ViewModel;
public class CartModel{
private String name;
private String price;
private String imageUrl;
private String quantity;
public CartModel(String name, String price, String imageUrl, String quantity){
this.name = name;
this.price = price;
this.imageUrl = imageUrl;
this.quantity = quantity;
}
public String getPrice() {
return price;
}
public String getImageUrl() {
return imageUrl;
}
public String getQuantity() {
return quantity;
}
public String getName() {
return name;
}
}
|
[
"="
] |
=
|
7c6564bec8def343d453d1c318cb89908569a042
|
3883554587c8f3f75a7bebd746e1269b8e1e5ef1
|
/kubernetes-model-generator/kubernetes-model-core/src/generated/java/io/fabric8/kubernetes/api/model/ComponentStatus.java
|
05831a660cde8fb2162bf785df6f0675fe3cad20
|
[
"Apache-2.0"
] |
permissive
|
KamalSinghKhanna/kubernetes-client
|
58f663fdc0ca4b6006ae1448ac89b04b6093e46d
|
08261fba6c9306eb063534ec2320e9166f85c71c
|
refs/heads/master
| 2023-08-17T04:33:28.646984
| 2021-09-23T17:17:24
| 2021-09-23T17:17:24
| 409,863,910
| 1
| 0
|
Apache-2.0
| 2021-09-24T06:55:57
| 2021-09-24T06:55:57
| null |
UTF-8
|
Java
| false
| false
| 3,968
|
java
|
package io.fabric8.kubernetes.api.model;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.fabric8.kubernetes.model.annotation.Group;
import io.fabric8.kubernetes.model.annotation.Version;
import io.sundr.builder.annotations.Buildable;
import io.sundr.transform.annotations.TemplateTransformation;
import io.sundr.transform.annotations.TemplateTransformations;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"apiVersion",
"kind",
"metadata",
"conditions"
})
@ToString
@EqualsAndHashCode
@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = true, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder")
@Version("v1")
@Group("")
@TemplateTransformations({
@TemplateTransformation(value = "/manifest.vm", outputPath = "core.properties", gather = true)
})
public class ComponentStatus implements HasMetadata
{
/**
*
* (Required)
*
*/
@JsonProperty("apiVersion")
private String apiVersion = "v1";
@JsonProperty("conditions")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<ComponentCondition> conditions = new ArrayList<ComponentCondition>();
/**
*
* (Required)
*
*/
@JsonProperty("kind")
private String kind = "ComponentStatus";
@JsonProperty("metadata")
private ObjectMeta metadata;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
/**
* No args constructor for use in serialization
*
*/
public ComponentStatus() {
}
/**
*
* @param metadata
* @param apiVersion
* @param kind
* @param conditions
*/
public ComponentStatus(String apiVersion, List<ComponentCondition> conditions, String kind, ObjectMeta metadata) {
super();
this.apiVersion = apiVersion;
this.conditions = conditions;
this.kind = kind;
this.metadata = metadata;
}
/**
*
* (Required)
*
*/
@JsonProperty("apiVersion")
public String getApiVersion() {
return apiVersion;
}
/**
*
* (Required)
*
*/
@JsonProperty("apiVersion")
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
@JsonProperty("conditions")
public List<ComponentCondition> getConditions() {
return conditions;
}
@JsonProperty("conditions")
public void setConditions(List<ComponentCondition> conditions) {
this.conditions = conditions;
}
/**
*
* (Required)
*
*/
@JsonProperty("kind")
public String getKind() {
return kind;
}
/**
*
* (Required)
*
*/
@JsonProperty("kind")
public void setKind(String kind) {
this.kind = kind;
}
@JsonProperty("metadata")
public ObjectMeta getMetadata() {
return metadata;
}
@JsonProperty("metadata")
public void setMetadata(ObjectMeta metadata) {
this.metadata = metadata;
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
|
[
"marc@marcnuri.com"
] |
marc@marcnuri.com
|
306557754b0f3fec25c757d6fae745f54ac10d08
|
9f8304a649e04670403f5dc1cb049f81266ba685
|
/common/src/main/java/com/cmcc/vrp/boss/hainan/model/HNBOSSCharge.java
|
dca3998751d0f7c340987737b04e1c3583d7e15e
|
[] |
no_license
|
hasone/pdata
|
632d2d0df9ddd9e8c79aca61a87f52fc4aa35840
|
0a9cfd988e8a414f3bdbf82ae96b82b61d8cccc2
|
refs/heads/master
| 2020-03-25T04:28:17.354582
| 2018-04-09T00:13:55
| 2018-04-09T00:13:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 946
|
java
|
package com.cmcc.vrp.boss.hainan.model;
/**
* <p>Title: </p>
* <p>Description: </p>
* @author lgk8023
* @date 2017年1月22日 上午10:20:08
*/
public class HNBOSSCharge {
private String transId;//平台流水编码
private String tradeId;//CRM流水号
private String orderId;//订单编码
private String groupId;//集团编码
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
public String getTransId() {
return transId;
}
public void setTransId(String transId) {
this.transId = transId;
}
public String getTradeId() {
return tradeId;
}
public void setTradeId(String tradeId) {
this.tradeId = tradeId;
}
}
|
[
"fromluozuwu@qq.com"
] |
fromluozuwu@qq.com
|
617dbf7b42c8d2c631da9d12a7debe9106d39e0f
|
a82a4183977853b828d8508a027bb07863cb5ec4
|
/src/test/java/trader/strategy/bgxstrategy/service/OrderServiceTest.java
|
442ab36f2e6acb5aaca2218bd43fe65e7210589b
|
[] |
no_license
|
tabria/BGXTrader
|
548ed554904b975a391f3339ed0474207fbf4906
|
b457fe09581a0757771e7b92af74fbfca44ac3e4
|
refs/heads/master
| 2020-03-26T19:57:01.170841
| 2019-06-14T11:09:16
| 2019-06-14T11:09:16
| 145,295,143
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,993
|
java
|
package trader.strategy.bgxstrategy.service;
import org.junit.Before;
import org.junit.Test;
import trader.exception.NullArgumentException;
import trader.order.OrderStrategy;
import trader.presenter.Presenter;
import trader.requestor.Request;
import trader.requestor.UseCase;
import trader.requestor.UseCaseFactory;
import trader.responder.Response;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class OrderServiceTest {
private OrderStrategy orderStrategyMock;
private Response responseMock;
private UseCase useCaseMock;
private UseCaseFactory useCaseFactoryMock;
private OrderService service;
private Presenter presenterMock;
@Before
public void setUp() throws Exception {
orderStrategyMock = mock(OrderStrategy.class);
responseMock = mock(Response.class);
useCaseMock = mock(UseCase.class);
useCaseFactoryMock = mock(UseCaseFactory.class);
presenterMock = mock(Presenter.class);
service = new OrderService(useCaseFactoryMock, presenterMock);
}
@Test(expected = NullArgumentException.class)
public void givenNullOrderStrategyName_WhenCallCreateOrderStrategy_ThenThrowException(){
service.createOrderStrategy(null);
}
@Test
public void givenCorrectOrderStrategyName_WhenCallCreateOrderStrategy_ThenReturnCorrectResult(){
setFakeOrderStrategy();
OrderStrategy strategy = service.createOrderStrategy("standard");
assertEquals(orderStrategyMock, strategy);
}
private void setFakeOrderStrategy() {
when(responseMock.getBody()).thenReturn(orderStrategyMock);
when(useCaseMock.execute(any(Request.class))).thenReturn(responseMock);
when(useCaseFactoryMock.make(anyString(), any(Presenter.class))).thenReturn(useCaseMock);
}
}
|
[
"forexftg@yahoo.com"
] |
forexftg@yahoo.com
|
53479b4921ae2f28dff4d3007c7e1588399a9abc
|
b864b992187e2e1c5c8da6fdabeeab5040058fe9
|
/Java Example/107/src/com/mingrisoft/ListIteratorDemo.java
|
c0a5c167ab3e46a6ed66498af816607ba1e547b8
|
[] |
no_license
|
Mr-Phoebe/ProgramLanguage
|
5384afeef20c8a12cd89cf3720beb0337bd38fc9
|
1588aea62e15304339efb73d55653be1b4e57156
|
refs/heads/master
| 2023-02-06T11:59:06.272680
| 2023-02-06T04:00:14
| 2023-02-06T04:00:14
| 65,252,634
| 52
| 37
| null | null | null | null |
GB18030
|
Java
| false
| false
| 836
|
java
|
package com.mingrisoft;
import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
public class ListIteratorDemo {
public static void main(String[] args) {
List<Integer> list = new ArrayList<Integer>();// 创建列表
for (int i = 0; i < 10; i++) {// 向列表中增加10个元素
list.add(i);
}
System.out.println("列表中的全部元素:" + list);
System.out.println("逆序输出列表中的元素:");
ListIterator<Integer> li = list.listIterator();// 获得ListIterator对象
for (li = list.listIterator(); li.hasNext();) {// 将游标定位到列表结尾
li.next();
}
for (; li.hasPrevious();) {// 逆序输出列表中的元素
System.out.print(li.previous() + " ");
}
}
}
|
[
"whn289467822@outlook.com"
] |
whn289467822@outlook.com
|
926c3956cff69aba48247b2e9da5536255d0226d
|
6718a628809ea53c3b59a9178e1153da4fad7f4f
|
/src/main/java/com/dyenigma/entity/SysPrjUser.java
|
dcdea45f3d52ec19f03fc2ef21ef5f478c9a0709
|
[] |
no_license
|
caosena5101/transformer
|
b96604987cc24c5eff588cb7f1fc8770459d3f52
|
9442661e0a2a47d6c8ca535c4cba8b10f7117944
|
refs/heads/master
| 2020-12-30T11:01:54.855953
| 2017-07-30T06:01:51
| 2017-07-30T06:01:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,612
|
java
|
package com.dyenigma.entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Table(name = "sys_prj_user")
public class SysPrjUser extends BaseDomain {
/**
* 项目成员配置自增ID
*/
@Id
@Column(name = "PU_ID")
private String puId;
/**
* 项目组ID
*/
@Column(name = "PRJ_ID")
private String prjId;
/**
* 用户ID
*/
@Column(name = "USER_ID")
private String userId;
/**
* 当前状态,E:有效的,I:无效的
*/
@Column(name = "STATUS")
private String status;
/**
* 创造日期
*/
@Column(name = "CREATED")
private Date created;
/**
* 修改日期
*/
@Column(name = "LASTMOD")
private Date lastmod;
/**
* 创建人
*/
@Column(name = "CREATER")
private String creater;
/**
* 修改人
*/
@Column(name = "MODIFYER")
private String modifyer;
/**
* 获取项目成员配置自增ID
*
* @return PU_ID - 项目成员配置自增ID
*/
public String getPuId() {
return puId;
}
/**
* 设置项目成员配置自增ID
*
* @param puId 项目成员配置自增ID
*/
public void setPuId(String puId) {
this.puId = puId;
}
/**
* 获取项目组ID
*
* @return PRJ_ID - 项目组ID
*/
public String getPrjId() {
return prjId;
}
/**
* 设置项目组ID
*
* @param prjId 项目组ID
*/
public void setPrjId(String prjId) {
this.prjId = prjId;
}
/**
* 获取用户ID
*
* @return USER_ID - 用户ID
*/
public String getUserId() {
return userId;
}
/**
* 设置用户ID
*
* @param userId 用户ID
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
* 获取当前状态,E:有效的,I:无效的
*
* @return STATUS - 当前状态,E:有效的,I:无效的
*/
public String getStatus() {
return status;
}
/**
* 设置当前状态,E:有效的,I:无效的
*
* @param status 当前状态,E:有效的,I:无效的
*/
public void setStatus(String status) {
this.status = status;
}
/**
* 获取创造日期
*
* @return CREATED - 创造日期
*/
public Date getCreated() {
return created;
}
/**
* 设置创造日期
*
* @param created 创造日期
*/
public void setCreated(Date created) {
this.created = created;
}
/**
* 获取修改日期
*
* @return LASTMOD - 修改日期
*/
public Date getLastmod() {
return lastmod;
}
/**
* 设置修改日期
*
* @param lastmod 修改日期
*/
public void setLastmod(Date lastmod) {
this.lastmod = lastmod;
}
/**
* 获取创建人
*
* @return CREATER - 创建人
*/
public String getCreater() {
return creater;
}
/**
* 设置创建人
*
* @param creater 创建人
*/
public void setCreater(String creater) {
this.creater = creater;
}
/**
* 获取修改人
*
* @return MODIFYER - 修改人
*/
public String getModifyer() {
return modifyer;
}
/**
* 设置修改人
*
* @param modifyer 修改人
*/
public void setModifyer(String modifyer) {
this.modifyer = modifyer;
}
}
|
[
"dyenigma@163.com"
] |
dyenigma@163.com
|
51caec019c07a4ac758e064b94fe9af1d5721ab3
|
6682c0f60249e53cc9dd4fb1d42606df819a890e
|
/src/main/java/mcjty/rftoolscontrol/api/parameters/BlockSide.java
|
68ef0d883050bb22f1f10c97554fd63e2aadf18a
|
[
"MIT"
] |
permissive
|
mindy15963/RFToolsControl
|
8d576e737081a5611c09426fc6899b21d4ccca4e
|
2bd1946ad7f371a93903445efdb841f0a6335145
|
refs/heads/master
| 2021-07-16T11:48:07.382835
| 2018-08-06T06:15:08
| 2018-08-06T06:15:08
| 143,683,928
| 0
| 0
|
MIT
| 2018-08-06T06:11:36
| 2018-08-06T06:11:36
| null |
UTF-8
|
Java
| false
| false
| 2,099
|
java
|
package mcjty.rftoolscontrol.api.parameters;
import net.minecraft.util.EnumFacing;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Nullable;
/**
* This class identifies a side of a network blocked. This basically
* is an optional nodename and an optional side. If side is null then
* it means the node or processor itself.
*/
public class BlockSide {
@Nullable private final String nodeName; // An inventory on a network
@Nullable private final EnumFacing side; // The side at which the inventory can be found
public BlockSide(@Nullable String name, @Nullable EnumFacing side) {
this.nodeName = (name == null || name.isEmpty()) ? null : name;
this.side = side;
}
@Nullable
public String getNodeName() {
return nodeName;
}
public boolean hasNodeName() {
return nodeName != null && !nodeName.isEmpty();
}
@Nullable
public EnumFacing getSide() {
return side;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
BlockSide blockSide = (BlockSide) o;
if (nodeName != null ? !nodeName.equals(blockSide.nodeName) : blockSide.nodeName != null) return false;
if (side != blockSide.side) return false;
return true;
}
@Override
public int hashCode() {
int result = nodeName != null ? nodeName.hashCode() : 0;
result = 31 * result + (side != null ? side.hashCode() : 0);
return result;
}
@Override
public String toString() {
if (side == null) {
return "*";
} else {
return side.toString();
}
}
public String getStringRepresentation() {
EnumFacing facing = getSide();
String s = facing == null ? "" : StringUtils.left(facing.getName().toUpperCase(), 1);
if (getNodeName() == null) {
return s;
} else {
return StringUtils.left(getNodeName(), 7) + " " + s;
}
}
}
|
[
"mcjty1@gmail.com"
] |
mcjty1@gmail.com
|
5cfbf67d8eb6abfe4082d38ce3713bfb223b9a89
|
dc0beecadd0404435e6fea1a49f2014f85b4c004
|
/src/net/ion/framework/db/async/Result.java
|
af192a1220a29b1f48671fed9ff210b19da167e9
|
[] |
no_license
|
bleujin/ionframework
|
6295ef747429b6d80b52c5372f54ad0aff461f43
|
bf1c5c5a2d46985a81114a9578adfb5823887350
|
refs/heads/master
| 2022-11-20T10:53:20.831425
| 2016-10-10T07:14:41
| 2016-10-10T07:14:41
| 1,971,241
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,722
|
java
|
package net.ion.framework.db.async;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import net.ion.framework.db.procedure.IQueryable;
/**
* <p>
* Title:
* </p>
* <p>
* Description:
* </p>
* <p>
* Copyright: Copyright (c) 2004
* </p>
* <p>
* Company:
* </p>
*
* @author bleujin
* @version 1.0
*/
public interface Result<T> {
public ExecMessage getResultMessage() throws InvocationTargetException;
public IQueryable getQuery();
public T get();
public Date getStartDate();
public Date getEndDate();
}
class ConcurrentFutureResult<T> implements Result<T> {
private final IQueryable query;
private final Date startDate;
private final Date endDate;
private final Future<T> future;
private ConcurrentFutureResult(IQueryable query, Date startDate, Future<T> future) {
this.query = query;
this.startDate = startDate;
this.endDate = new Date();
this.future = future;
}
public static <T> Result<T> create(IQueryable query, Future<T> future){
return new ConcurrentFutureResult(query, new Date(), future) ;
}
public Date getEndDate() {
return endDate;
}
public IQueryable getQuery() {
return query;
}
public ExecMessage getResultMessage() throws InvocationTargetException {
return ExecMessage.SUCCESS_MESSAGE;
}
public T get() {
try {
return future.get();
} catch (InterruptedException e) {
throw new RuntimeException(e) ;
} catch (ExecutionException e) {
throw new RuntimeException(e) ;
}
}
public Date getStartDate() {
return startDate;
}
}
|
[
"bleujin@gmail.com"
] |
bleujin@gmail.com
|
93a307cb04ffc702445e6fffb86f64914e90fda8
|
81b0bb3cfb2e9501f53451e7f03ec072ee2b0e13
|
/src/me/lyft/android/ui/driver/DriverDialogs$DriverOverflowMenuScreen.java
|
67183ab2f6bb0b224a063bf85cc568d22854c56c
|
[] |
no_license
|
reverseengineeringer/me.lyft.android
|
48bb85e8693ce4dab50185424d2ec51debf5c243
|
8c26caeeb54ffbde0711d3ce8b187480d84968ef
|
refs/heads/master
| 2021-01-19T02:32:03.752176
| 2016-07-19T16:30:00
| 2016-07-19T16:30:00
| 63,710,356
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 332
|
java
|
package me.lyft.android.ui.driver;
import com.lyft.scoop.Layout;
@Layout(2130903176)
public class DriverDialogs$DriverOverflowMenuScreen
extends DriverDialogs
{}
/* Location:
* Qualified Name: me.lyft.android.ui.driver.DriverDialogs.DriverOverflowMenuScreen
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
7c673d6f25ccd00d1828cca40600ec82ba6d237d
|
ac1768b715e9fe56be8b340bc1e4bc7f917c094a
|
/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/ExistingSpaceIdentifierOrProjectPredicate.java
|
55b4e682e9c9651eb0b727c645bc2fba606ed0a8
|
[
"Apache-2.0"
] |
permissive
|
kykrueger/openbis
|
2c4d72cb4b150a2854df4edfef325f79ca429c94
|
1b589a9656d95e343a3747c86014fa6c9d299b8d
|
refs/heads/master
| 2023-05-11T23:03:57.567608
| 2021-05-21T11:54:58
| 2021-05-21T11:54:58
| 364,558,858
| 0
| 0
|
Apache-2.0
| 2021-06-04T10:08:32
| 2021-05-05T11:48:20
|
Java
|
UTF-8
|
Java
| false
| false
| 1,259
|
java
|
/*
* Copyright 2008 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.generic.server.authorization.predicate;
import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SpaceIdentifier;
/**
* @author pkupczyk
*/
public class ExistingSpaceIdentifierOrProjectPredicate extends DelegatedPredicate<String, SpaceIdentifier>
{
public ExistingSpaceIdentifierOrProjectPredicate()
{
super(new SpaceOrProjectPredicate(true));
}
@Override
public String tryConvert(SpaceIdentifier value)
{
return value != null ? value.getSpaceCode() : null;
}
@Override
public String getCandidateDescription()
{
return "space identifier";
}
}
|
[
"pkupczyk"
] |
pkupczyk
|
320b607a63690beb6116d4325347bb0fc26d7d12
|
7f223ec1ddfc88fd1e8732fe227a88fddc054926
|
/app/androidF/application/build/generated/source/kapt/debug/com/wy/adbook/di/module/WebModule_ProvideAboutViewFactory.java
|
49aaac693fdc36166365425c7ca4cd4099fdfaf9
|
[] |
no_license
|
sengeiou/qy_book_free
|
93da8933e0b1bd584bf974f97ed65063615917c4
|
42e35f88c24ce864de61d9f4f6921ca7df2970b7
|
refs/heads/master
| 2022-04-07T11:28:18.472504
| 2019-06-25T07:57:58
| 2019-06-25T07:57:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,075
|
java
|
package com.wy.adbook.di.module;
import com.wy.adbook.mvp.view.web.act.WebContract;
import dagger.internal.Factory;
import dagger.internal.Preconditions;
import javax.annotation.Generated;
@Generated(
value = "dagger.internal.codegen.ComponentProcessor",
comments = "https://google.github.io/dagger"
)
public final class WebModule_ProvideAboutViewFactory implements Factory<WebContract.View> {
private final WebModule module;
public WebModule_ProvideAboutViewFactory(WebModule module) {
this.module = module;
}
@Override
public WebContract.View get() {
return Preconditions.checkNotNull(
module.provideAboutView(), "Cannot return null from a non-@Nullable @Provides method");
}
public static WebModule_ProvideAboutViewFactory create(WebModule module) {
return new WebModule_ProvideAboutViewFactory(module);
}
public static WebContract.View proxyProvideAboutView(WebModule instance) {
return Preconditions.checkNotNull(
instance.provideAboutView(), "Cannot return null from a non-@Nullable @Provides method");
}
}
|
[
"chenchendedefeng@126.com"
] |
chenchendedefeng@126.com
|
3c343d0d382e29c82427a1e641c246f50bdcbab3
|
69749d5de8dc1e32cd9acc255aaa7caca981b4d0
|
/src/main/java/com/dlg/wxsend/YaYaoWxSendApplication.java
|
b7d2b923d3b265b547ebf42a176d58bfbdc5e89d
|
[] |
no_license
|
jxxmskulong/YaYaoWxSend
|
fe19c9f17fd570392397d6e603b6a7e8ebaa4741
|
24a5c406bbd52c6d6935715fd485b9e639a37055
|
refs/heads/master
| 2020-03-21T22:25:07.915491
| 2018-05-25T01:10:07
| 2018-05-25T01:10:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 316
|
java
|
package com.dlg.wxsend;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class YaYaoWxSendApplication {
public static void main(String[] args) {
SpringApplication.run(YaYaoWxSendApplication.class, args);
}
}
|
[
"278076304@qq.com"
] |
278076304@qq.com
|
b4e664792bacb9cf82a6c8e31006857a010b9fc1
|
27f649c606bc2cdf839c175219fcfbf1af9b1f32
|
/src/main/java/net/bdsc/controller/admin/plugin/Pay99billPaymentController.java
|
14c9f7bbc9ab8d69d300696d5f5acbdb2c2bef7f
|
[] |
no_license
|
heyewei/block
|
38717394de805c9205755e7a46f46faa8a097415
|
849655194551d8c93a61545b959a1e74e99bd7bb
|
refs/heads/master
| 2023-01-28T22:25:00.012454
| 2020-12-10T05:16:15
| 2020-12-10T05:16:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,296
|
java
|
/*
* Copyright 2008-2018 shopxx.net. All rights reserved.
* Support: localhost
* License: localhost/license
* FileId: bcK5fLwoztA+9pPux99jdNcObg6ghLXs
*/
package net.bdsc.controller.admin.plugin;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import javax.inject.Inject;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import net.bdsc.Results;
import net.bdsc.controller.admin.BaseController;
import net.bdsc.entity.PluginConfig;
import net.bdsc.plugin.Pay99billPaymentPlugin;
import net.bdsc.plugin.PaymentPlugin;
import net.bdsc.service.PluginConfigService;
/**
* Controller - 快钱支付
*
* @author 好源++ Team
* @version 6.1
*/
@Controller("adminPluginPay99billPaymentController")
@RequestMapping("/admin/plugin/pay_99bill_payment")
public class Pay99billPaymentController extends BaseController {
@Inject
private Pay99billPaymentPlugin pay99billPaymentPlugin;
@Inject
private PluginConfigService pluginConfigService;
/**
* 安装
*/
@PostMapping("/install")
public ResponseEntity<?> install() {
if (!pay99billPaymentPlugin.getIsInstalled()) {
PluginConfig pluginConfig = new PluginConfig();
pluginConfig.setPluginId(pay99billPaymentPlugin.getId());
pluginConfig.setIsEnabled(false);
pluginConfig.setAttributes(null);
pluginConfigService.save(pluginConfig);
}
return Results.OK;
}
/**
* 卸载
*/
@PostMapping("/uninstall")
public ResponseEntity<?> uninstall() {
if (pay99billPaymentPlugin.getIsInstalled()) {
pluginConfigService.deleteByPluginId(pay99billPaymentPlugin.getId());
}
return Results.OK;
}
/**
* 设置
*/
@GetMapping("/setting")
public String setting(ModelMap model) {
PluginConfig pluginConfig = pay99billPaymentPlugin.getPluginConfig();
model.addAttribute("feeTypes", PaymentPlugin.FeeType.values());
model.addAttribute("pluginConfig", pluginConfig);
return "/admin/plugin/pay_99bill_payment/setting";
}
/**
* 更新
*/
@PostMapping("/update")
public ResponseEntity<?> update(String displayName, String partner, String key, PaymentPlugin.FeeType feeType, BigDecimal fee, String logo, String description, @RequestParam(defaultValue = "false") Boolean isEnabled, Integer order) {
PluginConfig pluginConfig = pay99billPaymentPlugin.getPluginConfig();
Map<String, String> attributes = new HashMap<>();
attributes.put(PaymentPlugin.DISPLAY_NAME_ATTRIBUTE_NAME, displayName);
attributes.put("partner", partner);
attributes.put("key", key);
attributes.put(PaymentPlugin.FEE_TYPE_ATTRIBUTE_NAME, String.valueOf(feeType));
attributes.put(PaymentPlugin.FEE_ATTRIBUTE_NAME, String.valueOf(fee));
attributes.put(PaymentPlugin.LOGO_ATTRIBUTE_NAME, logo);
attributes.put(PaymentPlugin.DESCRIPTION_ATTRIBUTE_NAME, description);
pluginConfig.setAttributes(attributes);
pluginConfig.setIsEnabled(isEnabled);
pluginConfig.setOrder(order);
pluginConfigService.update(pluginConfig);
return Results.OK;
}
}
|
[
"1169794338@qq.com"
] |
1169794338@qq.com
|
fdc8dde1ad1bca65ad43abcfb85f8907169a02ef
|
345f5ae6bf2d83e0037c03b02e0b5f24ff5237ee
|
/src/main/java/weac/compiler/precompile/TokenType.java
|
9e3170e9cc5ffd2d2a26d16bf563903a5860ea81
|
[] |
no_license
|
jglrxavpok/Weac2
|
6ea1ff739b5d1e7ccf0847af7ca7c1694914c323
|
afd2ded5e3e8b8f2405fd36271a5251bed70aa7f
|
refs/heads/master
| 2021-01-21T13:56:50.295023
| 2016-06-02T05:52:08
| 2016-06-02T05:52:08
| 48,510,724
| 7
| 0
| null | 2016-05-30T16:57:44
| 2015-12-23T20:57:24
|
Java
|
UTF-8
|
Java
| false
| false
| 1,269
|
java
|
package weac.compiler.precompile;
public enum TokenType {
WAITING_FOR_NEXT,
NUMBER(true),
SINGLE_CHARACTER(true),
STRING(true),
LITERAL(true),
OPERATOR,
MEMBER_ACCESSING,
ARGUMENT_SEPARATOR,
OPENING_PARENTHESIS,
CLOSING_PARENTHESIS,
OPENING_SQUARE_BRACKETS,
CLOSING_SQUARE_BRACKETS,
OPENING_CURLY_BRACKETS,
CLOSING_CURLY_BRACKETS,
DEFINE_INTERVAL,
DEFINE_ARRAY, // requires the size to be given inside the token
INTERVAL_STEP,
// Those six are created from the LITERAL value after analysing their context (parenthesis after it or not)
VARIABLE(true),
FUNCTION,
BOOLEAN(true),
THIS(true),
NULL(true),
TYPE,
IF,
ELSE,
ELSEIF,
FUNCTION_START,
INSTRUCTION_END,
NEW_LOCAL,
// Those two are created from the OPERATOR value after analysing their context (parenthesis before/after it or not)
BINARY_OPERATOR,
UNARY_OPERATOR,
CAST,
POP_INSTANCE,
ARRAY_START,
NATIVE_CODE,
NEW_LINE,
COMMENT;
private final boolean isValue;
TokenType() {
this(false);
}
TokenType(boolean isValue) {
this.isValue = isValue;
}
public boolean isValue() {
return isValue;
}
}
|
[
"jglrxavpok@gmail.com"
] |
jglrxavpok@gmail.com
|
3d99acc19f999d05207d6addf8f4ec516c5c8cb2
|
3c500ad85f13411f3a99d784c7185a6a1acea9c1
|
/thunder-stock/src/main/java/com/nepxion/thunder/stock/entity/StockPankou.java
|
4f6d45b5cf27bf848b96bf1cdab347bca80a7729
|
[
"Apache-2.0"
] |
permissive
|
Nepxion/Thunder
|
767c6e651f58437b3fe64346c8045dafe5f42d95
|
c8d8f77ddefbe6ade2b8c86ee3bc8f29962f524a
|
refs/heads/master
| 2023-04-13T14:15:13.717005
| 2023-04-09T12:29:24
| 2023-04-09T12:29:24
| 48,207,333
| 236
| 100
|
Apache-2.0
| 2021-06-23T06:37:49
| 2015-12-18T01:24:44
|
Java
|
UTF-8
|
Java
| false
| false
| 1,796
|
java
|
package com.nepxion.thunder.stock.entity;
/**
* <p>Title: Nepxion Stock</p>
* <p>Description: Nepxion Stock For Distribution</p>
* <p>Copyright: Copyright (c) 2017-2050</p>
* <p>Company: Nepxion</p>
* @author Haojun Ren
* @version 1.0
*/
public class StockPankou extends Stock {
private static final long serialVersionUID = -5544055675566806124L;
private float buyBig = -1;
private float buySmall = -1;
private float sellBig = -1;
private float sellSmall = -1;
public float getBuyBig() {
return buyBig;
}
public void setBuyBig(float buyBig) {
this.buyBig = buyBig;
}
public float getBuySmall() {
return buySmall;
}
public void setBuySmall(float buySmall) {
this.buySmall = buySmall;
}
public float getSellBig() {
return sellBig;
}
public void setSellBig(float sellBig) {
this.sellBig = sellBig;
}
public float getSellSmall() {
return sellSmall;
}
public void setSellSmall(float sellSmall) {
this.sellSmall = sellSmall;
}
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(super.toString());
if (buyBig != -1) {
buffer.append(": 买盘大单=");
buffer.append(buyBig + "万手");
}
if (buySmall != -1) {
buffer.append(" 买盘小单=");
buffer.append(buySmall + "万手");
}
if (sellBig != -1) {
buffer.append(" 卖盘大单=");
buffer.append(sellBig + "万手");
}
if (sellSmall != -1) {
buffer.append(" 卖盘小单=");
buffer.append(sellSmall + "万手");
}
return buffer.toString();
}
}
|
[
"1394997@qq.com"
] |
1394997@qq.com
|
d7c39bf43d17e338f025f8be29bc0d9508c0b5d1
|
3bab81792c722411c542596fedc8e4b1d086c1a9
|
/src/main/java/com/gome/maven/openapi/diff/impl/CompositeDiffPanel.java
|
d42d1307a096228623f3668c6ec481ddd738aa36
|
[] |
no_license
|
nicholas879110/maven-code-check-plugin
|
80d6810cc3c12a3b6c22e3eada331136e3d9a03e
|
8162834e19ed0a06ae5240b5e11a365c0f80d0a0
|
refs/heads/master
| 2021-04-30T07:09:42.455482
| 2018-03-01T03:21:21
| 2018-03-01T03:21:21
| 121,457,530
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,776
|
java
|
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gome.maven.openapi.diff.impl;
import com.gome.maven.execution.ui.RunnerLayoutUi;
import com.gome.maven.openapi.Disposable;
import com.gome.maven.openapi.actionSystem.PlatformDataKeys;
import com.gome.maven.openapi.diff.DiffRequest;
import com.gome.maven.openapi.diff.DiffViewer;
import com.gome.maven.openapi.diff.DiffViewerType;
import com.gome.maven.openapi.diff.impl.external.DiscloseMultiRequest;
import com.gome.maven.openapi.diff.impl.external.MultiLevelDiffTool;
import com.gome.maven.openapi.project.Project;
import com.gome.maven.openapi.util.Disposer;
import com.gome.maven.openapi.util.Pair;
import com.gome.maven.ui.content.Content;
import com.gome.maven.util.containers.HashSet;
import javax.swing.*;
import java.awt.*;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
* Created with IntelliJ IDEA.
* User: Irina.Chernushina
* Date: 2/13/12
* Time: 1:59 PM
*/
public class CompositeDiffPanel implements DiffViewer {
private final static String FICTIVE_KEY = "FICTIVE_KEY";
private final static int ourBadHackMagicContentsNumber = 101;
private final RunnerLayoutUi myUi;
private final DiscloseMultiRequest myRequest;
private final Window myWindow;
private final Disposable myParentDisposable;
private final Map<String, Pair<DiffViewer, Content>> myMap;
public CompositeDiffPanel(Project project, final DiscloseMultiRequest request, final Window window, Disposable parentDisposable) {
myRequest = request;
myWindow = window;
myParentDisposable = parentDisposable;
myUi = RunnerLayoutUi.Factory.getInstance(project).create("Diff", "Diff", "Diff", parentDisposable);
myUi.getComponent().setBorder(null);
myUi.getOptions().setMinimizeActionEnabled(false);
//myUi.getOptions().setTopToolbar()
myMap = new HashMap<String, Pair<DiffViewer, Content>>();
}
@Override
public boolean canShowRequest(DiffRequest request) {
return MultiLevelDiffTool.canShowRequest(request);
}
@Override
public void setDiffRequest(DiffRequest request) {
final Map<String, DiffRequest> requestMap = myRequest.discloseRequest(request);
HashMap<String, Pair<DiffViewer, Content>> mapCopy = new HashMap<String, Pair<DiffViewer, Content>>(myMap);
myMap.clear();
for (Map.Entry<String, DiffRequest> entry : requestMap.entrySet()) {
final String key = entry.getKey();
final DiffRequest diffRequest = entry.getValue();
diffRequest.getGenericData().put(PlatformDataKeys.COMPOSITE_DIFF_VIEWER.getName(), this);
final Pair<DiffViewer, Content> pair = mapCopy.get(key);
DiffViewer viewer = pair != null ? pair.first : null;
if (viewer != null && viewer.acceptsType(diffRequest.getType()) && viewer.canShowRequest(diffRequest)) {
viewer.setDiffRequest(diffRequest);
myMap.put(key, pair);
mapCopy.remove(key);
} else {
final DiffViewer newViewer = myRequest.viewerForRequest(myWindow, myParentDisposable, key, diffRequest);
if (newViewer == null) continue;
final Content content = myUi.createContent(key, newViewer.getComponent(), key, null, newViewer.getPreferredFocusedComponent());
content.setCloseable(false);
content.setPinned(true);
content.setDisposer(myParentDisposable);
myUi.addContent(content);
myMap.put(key, Pair.create(newViewer, content));
if (pair != null) myUi.removeContent(pair.second, false);
}
}
if (myMap.isEmpty()) {
final ErrorDiffViewer errorDiffViewer = new ErrorDiffViewer(myWindow, request);
final Content content = myUi.createContent(FICTIVE_KEY, errorDiffViewer.getComponent(), FICTIVE_KEY, null,
errorDiffViewer.getPreferredFocusedComponent());
content.setCloseable(false);
content.setPinned(true);
content.setDisposer(myParentDisposable);
myUi.addContent(content);
myMap.put(FICTIVE_KEY, Pair.<DiffViewer, Content>create(errorDiffViewer, content));
}
for (Pair<DiffViewer, Content> pair : mapCopy.values()) {
myUi.removeContent(pair.second, false);
if (pair.first instanceof Disposable) Disposer.dispose((Disposable)pair.first);
}
}
@Override
public JComponent getComponent() {
return myUi.getComponent();
}
@Override
public JComponent getPreferredFocusedComponent() {
final Content[] contents = myUi.getContents();
if (contents == null || contents.length == 0) return null;
return contents[0].getPreferredFocusableComponent();
}
@Override
public int getContentsNumber() {
return ourBadHackMagicContentsNumber;
}
@Override
public boolean acceptsType(DiffViewerType type) {
return DiffViewerType.multiLayer.equals(type) || DiffViewerType.contents.equals(type) || DiffViewerType.merge.equals(type);
}
}
|
[
"zhangliewei@gome.com.cn"
] |
zhangliewei@gome.com.cn
|
04296355f56f45e3d04f1418912204bbc5e0eba1
|
5f63a60fd029b8a74d2b1b4bf6992f5e4c7b429b
|
/com/planet_ink/coffee_mud/WebMacros/CommandJournalInfo.java
|
828253f831700e9bbd47d46bfaedfb5fb85a9e27
|
[
"Apache-2.0"
] |
permissive
|
bozimmerman/CoffeeMud
|
5da8b5b98c25b70554ec9a2a8c0ef97f177dc041
|
647864922e07572b1f6c863de8f936982f553288
|
refs/heads/master
| 2023-09-04T09:17:12.656291
| 2023-09-02T00:30:19
| 2023-09-02T00:30:19
| 5,267,832
| 179
| 122
|
Apache-2.0
| 2023-04-30T11:09:14
| 2012-08-02T03:22:12
|
Java
|
UTF-8
|
Java
| false
| false
| 3,435
|
java
|
package com.planet_ink.coffee_mud.WebMacros;
import com.planet_ink.coffee_web.interfaces.*;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2013-2023 Bo Zimmerman
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.
*/
public class CommandJournalInfo extends StdWebMacro
{
@Override
public String name()
{
return "CommandJournalInfo";
}
@Override
public boolean isAdminMacro()
{
return true;
}
@Override
public String runMacro(final HTTPRequest httpReq, final String parm, final HTTPResponse httpResp)
{
final java.util.Map<String,String> parms=parseParms(parm);
final String last=httpReq.getUrlParameter("COMMANDJOURNAL");
final StringBuffer str=new StringBuffer("");
if(parms.containsKey("ALLFLAGS"))
{
for(final JournalsLibrary.CommandJournalFlags flag : JournalsLibrary.CommandJournalFlags.values())
str.append("FLAG_"+flag.name()).append(", ");
}
else
if(last==null)
return " @break@";
if(last.length()>0)
{
final JournalsLibrary.CommandJournal C=CMLib.journals().getCommandJournal(last);
if(C==null)
return " @break@";
if(parms.containsKey("ID"))
str.append(C.NAME()).append(", ");
if(parms.containsKey("NAME"))
str.append(C.NAME()).append(", ");
if(parms.containsKey("JOURNALNAME"))
str.append(C.JOURNAL_NAME()).append(", ");
if(parms.containsKey("MASK"))
str.append(C.mask()).append(", ");
if(parms.containsKey("FLAGSET"))
{
for(final JournalsLibrary.CommandJournalFlags flag : JournalsLibrary.CommandJournalFlags.values())
httpReq.addFakeUrlParameter("FLAG_"+flag.name(), C.getFlag(flag)!=null?((C.getFlag(flag).length()==0)?"on":C.getFlag(flag)):"");
}
for(final JournalsLibrary.CommandJournalFlags flag : JournalsLibrary.CommandJournalFlags.values())
{
if(parms.containsKey("FLAG_"+flag.name().toUpperCase().trim()))
str.append(C.getFlag(flag)!=null?((C.getFlag(flag).length()==0)?"on":C.getFlag(flag)):"").append(", ");
}
}
String strstr=str.toString();
if(strstr.endsWith(", "))
strstr=strstr.substring(0,strstr.length()-2);
return clearWebMacros(strstr);
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
0a18c36356db80641a243d37577525c8f8e949b6
|
3d35b26f978c7a55837741121f9b3d0313140952
|
/app/src/main/java/com/hcworld/nbalive/support/SpaceItemDecoration.java
|
8b3fd03b5c451d4fbb5d904c9dbd04f7f1556542
|
[] |
no_license
|
hcgrady2/NBAProject
|
fdb747b596b006802083230e6fab290f11ad17b4
|
c61b8984881d01d9e3a6be72a6512ba6317bf798
|
refs/heads/master
| 2020-06-29T00:58:40.552383
| 2019-08-03T15:39:09
| 2019-08-03T15:39:09
| 200,389,101
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 602
|
java
|
package com.hcworld.nbalive.support;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;
/**
* Created by hcw on 2019/1/6.
* Copyright©hcw.All rights reserved.
*/
public class SpaceItemDecoration extends RecyclerView.ItemDecoration{
private int space;
public SpaceItemDecoration(int space) {
this.space = space;
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
if(parent.getChildPosition(view) != 0)
outRect.top = space;
}
}
|
[
"hcwang1024@163.com"
] |
hcwang1024@163.com
|
ae1063274c5afe79c7ec75e177bbd82618e4273b
|
6a07060a74309fe90a5e01cdc0d388455ea34621
|
/searchindex/searchindexserver/src/main/java/com/gpdi/searchengine/searchindexserver/server/internal/IntervalTimeCommitStrategy.java
|
ee975be9c9e67e8af2a4bd6433f02902fd4c697a
|
[] |
no_license
|
undergrowthlinear/searchengine20160819
|
fa0396ec6c74a271311b719e9625110c4adeb6e2
|
be00649467c2ad0570953531fe4b3daa01a37975
|
refs/heads/master
| 2020-07-15T05:45:17.360017
| 2016-08-19T14:34:19
| 2016-08-19T14:34:19
| 66,088,542
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,267
|
java
|
package com.gpdi.searchengine.searchindexserver.server.internal;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* @description: TODO(按照时间间隔提交索引策略)
* @author zhangwu
* @date 2016年8月16日
* @version 1.0.0
*/
public class IntervalTimeCommitStrategy implements CommitStrategy {
private Logger logger = LoggerFactory
.getLogger(IntervalTimeCommitStrategy.class);
private int intervalTime;
private long expireTime;
public void setIntervalTime(int intervalTime) {
this.intervalTime = intervalTime;
this.expireTime = getExpireTime();
}
private long getExpireTime() {
return TimeUnit.MILLISECONDS.convert(intervalTime, TimeUnit.SECONDS)
+ System.currentTimeMillis();
}
@Override
public boolean conformStrategy() {
// TODO Auto-generated method stub
if (this.expireTime < System.currentTimeMillis()) {
this.expireTime = getExpireTime();
return true;
}
try {
Thread.sleep(TimeUnit.MILLISECONDS.convert(this.intervalTime,
TimeUnit.SECONDS));
} catch (InterruptedException e) {
// TODO Auto-generated catch block
logger.info("IntervalTimeCommitStrategy InterruptedException error,"
+ e.getMessage());
}
return false;
}
}
|
[
"undergrowth@126.com"
] |
undergrowth@126.com
|
82c74ad95004c29e06cdea7f8487ef6ae39f9685
|
903be4f617a2db222ffe48498291fde8947ac1e3
|
/com/sun/corba/se/PortableActivationIDL/ServerManager.java
|
32fd6e040f888971739f8f571062e6873738f023
|
[] |
no_license
|
CrazyITBoy/jdk1_8_source
|
28b33e029a3a972ee30fa3c0429d8f193373a5c3
|
d01551b2df442d1912403127a1c56a06ac84f7bd
|
refs/heads/master
| 2022-12-10T07:27:54.028455
| 2020-07-05T15:18:50
| 2020-07-05T15:18:50
| 273,000,289
| 0
| 1
| null | 2020-06-27T15:22:27
| 2020-06-17T14:45:23
|
Java
|
UTF-8
|
Java
| false
| false
| 742
|
java
|
package com.sun.corba.se.PortableActivationIDL;
/**
* com/sun/corba/se/PortableActivationIDL/ServerManager.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /jenkins/workspace/8-2-build-macosx-x86_64/jdk8u251/737/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Thursday, March 12, 2020 2:38:17 AM PDT
*/
/** Interface used to combine the Activator and Locator when both are
* implemented together in the same process, as is currently the case
* for our implementation.
*/
public interface ServerManager extends ServerManagerOperations, com.sun.corba.se.PortableActivationIDL.Activator, com.sun.corba.se.PortableActivationIDL.Locator
{
} // interface ServerManager
|
[
"1396757497@qq.com"
] |
1396757497@qq.com
|
571c6b6405265f4eadcdf13351efccfca1df4d4b
|
bb80682a8aefa4fc5421b48805e4cbbbc0b2d4ae
|
/app/src/main/java/com/kcirqueit/playandearn/activity/ResultActivity.java
|
eb1ff896f94e6913375a75597d4a6fd2e28c781b
|
[] |
no_license
|
bd-mahfuz/PlayAndEarn
|
4c307cda41bd69b30f52262b124b49967479d341
|
610c3d6c1bac2820a8cda387e5a72594c4bb65e0
|
refs/heads/master
| 2020-04-23T10:09:53.690734
| 2019-05-14T05:05:38
| 2019-05-14T05:05:38
| 171,094,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,157
|
java
|
package com.kcirqueit.playandearn.activity;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import butterknife.BindView;
import butterknife.ButterKnife;
import android.animation.ValueAnimator;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
import android.widget.Toast;
import com.dinuscxj.progressbar.CircleProgressBar;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.InterstitialAd;
import com.google.android.gms.ads.MobileAds;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.kcirqueit.playandearn.R;
import com.kcirqueit.playandearn.model.Participant;
import com.kcirqueit.playandearn.model.Quiz;
import com.kcirqueit.playandearn.utility.DateUtility;
public class ResultActivity extends AppCompatActivity {
private static final String TAG = "ResultActivity";
@BindView(R.id.custom_progress5)
CircleProgressBar mCustomProgressBar;
@BindView(R.id.result_toolbar)
Toolbar mToolbar;
@BindView(R.id.r_quiz_name_et)
TextView mQuizNameTv;
@BindView(R.id.r_answered_et)
TextView mAansweredTv;
@BindView(R.id.r_total_q_et)
TextView mTotalQuestionTv;
@BindView(R.id.r_total_marks_et)
TextView mTotalMarksEt;
@BindView(R.id.r_time_limit_et)
TextView mTtimeLimitEt;
private String quizId;
private AdView mAdView;
private DatabaseReference mRootRef;
private DatabaseReference mParticipantRef;
private FirebaseAuth mAuth;
private InterstitialAd mInterstitialAd;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_result);
ButterKnife.bind(this);
MobileAds.initialize(this,
getString(R.string.admob_app_id));
mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId(getString(R.string.admob_interstitial_id));
mInterstitialAd.loadAd(new AdRequest.Builder().build());
mAuth = FirebaseAuth.getInstance();
mRootRef = FirebaseDatabase.getInstance().getReference();
mParticipantRef = mRootRef.child("Participants");
quizId = (String) getIntent().getSerializableExtra("quizId");
setSupportActionBar(mToolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
}
private void setData() {
ProgressDialog progressDialog = new ProgressDialog(this);
progressDialog.setMessage("Loading...");
progressDialog.show();
mParticipantRef.child(quizId).child(mAuth.getCurrentUser().getUid())
.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
if (dataSnapshot.getValue() != null) {
Participant participant = dataSnapshot.getValue(Participant.class);
//set quiz name in the title bar
getSupportActionBar().setTitle(participant.getQuizName());
mQuizNameTv.setText(participant.getQuizName());
mTotalMarksEt.setText(participant.getTotalMarks()+"");
mTtimeLimitEt.setText(DateUtility.milliToHour(Long.parseLong(participant.getTimeLimit()))+" hours");
mTotalQuestionTv.setText(participant.getTotalQuestion()+"");
mAansweredTv.setText(participant.getTotalAnswered()+"");
progressDialog.dismiss();
mCustomProgressBar.setProgressFormatter(new CircleProgressBar.ProgressFormatter() {
@Override
public CharSequence format(int progress, int max) {
return progress +"";
}
});
simulateProgress(participant.getScore(), participant.getTotalMarks());
} else {
progressDialog.dismiss();
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
Log.d(TAG, databaseError.toException().toString());
progressDialog.dismiss();
}
});
}
@Override
protected void onStart() {
super.onStart();
if (quizId != null) {
setData();
}
}
private void simulateProgress(int max, int totalMarks) {
ValueAnimator animator = ValueAnimator.ofInt(max);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
int progress = (int) animation.getAnimatedValue();
mCustomProgressBar.setProgress(progress);
mCustomProgressBar.setMax(totalMarks);
}
});
animator.setDuration(1000);
animator.start();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home)
{
if (mInterstitialAd.isLoaded()) {
mInterstitialAd.show();
} else {
Log.d("ResultActivity", "Failed to load interstitial ads.");
}
finish();
}
return true;
}
}
|
[
"bt23.mahfuz@gmail.com"
] |
bt23.mahfuz@gmail.com
|
eb88fa8c6ef3e1c861eee5c13c5bb4dc732b5ebe
|
f4b7924a03289706c769aff23abf4cce028de6bc
|
/smart_logic/src/main/java/plan_pro/modell/bahnuebergang/_1_9_0/ENUMBaumprofil.java
|
51a382c64a019175ee2b14b2bcf4c8f469eb22fe
|
[] |
no_license
|
jimbok8/ebd
|
aa18a2066b4a873bad1551e1578a7a1215de9b8b
|
9b0d5197bede5def2972cc44e63ac3711010eed4
|
refs/heads/main
| 2023-06-17T21:16:08.003689
| 2021-07-05T14:53:38
| 2021-07-05T14:53:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,627
|
java
|
//
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 generiert
// Siehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// �nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
// Generiert: 2020.01.16 um 04:27:51 PM CET
//
package plan_pro.modell.bahnuebergang._1_9_0;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java-Klasse f�r ENUMBaumprofil.
*
* <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
* <p>
* <pre>
* <simpleType name="ENUMBaumprofil">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Rechteck"/>
* <enumeration value="rund"/>
* <enumeration value="sonstige"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "ENUMBaumprofil")
@XmlEnum
public enum ENUMBaumprofil {
@XmlEnumValue("Rechteck")
RECHTECK("Rechteck"),
@XmlEnumValue("rund")
RUND("rund"),
@XmlEnumValue("sonstige")
SONSTIGE("sonstige");
private final String value;
ENUMBaumprofil(String v) {
value = v;
}
public String value() {
return value;
}
public static ENUMBaumprofil fromValue(String v) {
for (ENUMBaumprofil c: ENUMBaumprofil.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"iberl@verkehr.tu-darmstadt.de"
] |
iberl@verkehr.tu-darmstadt.de
|
47361056fdd4ab3a9e0e3073d400420471c9f303
|
7dc8e2e08c9eb25e4ef41568a561b503437b11f6
|
/src/main/java/cn/minalz/flyweight/demo2/TicketFactory.java
|
99757074a2752b452d382f1eb2a0e4346bcbacb5
|
[] |
no_license
|
minalz/design-pattern
|
249f787d0af3866d189cfae8af8cf63d1b5ac529
|
43f7599f5a88c2636fd8a93cf8eb074b286424ac
|
refs/heads/master
| 2023-04-15T21:07:00.270968
| 2021-04-18T16:36:48
| 2021-04-18T16:36:48
| 350,778,652
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 753
|
java
|
package cn.minalz.flyweight.demo2;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* @description:
* @author: minalz
* @date: 2021-04-08 23:39
**/
public class TicketFactory {
private static Map<String, ITicket> ticketPool = new ConcurrentHashMap<>();
public static ITicket queryTicket(String from, String to) {
String key = from + "->" + to;
if (ticketPool.containsKey(key)) {
System.out.println("使用缓存:" + key);
return ticketPool.get(key);
}
System.out.println("首次查询,创建对象:" + key);
TrainTicket ticket = new TrainTicket(from, to);
ticketPool.put(key, ticket);
return new TrainTicket(from ,to);
}
}
|
[
"119687281@qq.com"
] |
119687281@qq.com
|
7cd497b074aebfbf23da27a8afcde38c53db987e
|
63217a91d73674add57c6395f05ba891233b8c84
|
/dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubConnection.java
|
a10f07a664ad17d857d95d283215a1dc65b2a7e9
|
[
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] |
permissive
|
AurelienBallier/dart-sdk
|
f020f55388f50e475e51124e4b8005719e9f13e6
|
66931ab8372ef61e3ea421f094764d158f0a0669
|
refs/heads/master
| 2020-07-09T08:30:47.662771
| 2015-04-13T13:40:41
| 2015-04-13T13:40:41
| 33,870,380
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,560
|
java
|
/*
* Copyright (c) 2014, the Dart project authors.
*
* Licensed under the Eclipse Public License v1.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.eclipse.org/legal/epl-v10.html
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.dart.tools.debug.core.pubserve;
import com.google.dart.tools.debug.core.DartDebugCorePlugin;
import de.roderick.weberknecht.WebSocket;
import de.roderick.weberknecht.WebSocketEventHandler;
import de.roderick.weberknecht.WebSocketException;
import de.roderick.weberknecht.WebSocketMessage;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* A pub protocol websocket connection.
*/
public class PubConnection {
public static interface PubConnectionListener {
public void connectionClosed(PubConnection connection);
}
static interface Callback {
public void handleResult(JSONObject result) throws JSONException;
}
private String host;
private int port;
private String webSocketFile;
private URI webSocketUri;
private WebSocket websocket;
private boolean connected;
private PubCommands commands;
private List<PubConnectionListener> connectionListeners = new ArrayList<PubConnectionListener>();
private Map<Integer, Callback> callbackMap = new HashMap<Integer, Callback>();
private int requestId = 0;
public PubConnection(String host, int port, String webSocketFile) {
this.host = host;
this.port = port;
this.webSocketFile = webSocketFile;
}
public PubConnection(URI webSocketUri) {
this.webSocketUri = webSocketUri;
}
public void addConnectionListener(PubConnectionListener listener) {
connectionListeners.add(listener);
}
public void close() throws IOException {
if (websocket != null) {
try {
websocket.close();
} catch (WebSocketException exception) {
throw new IOException(exception);
} finally {
websocket = null;
}
}
}
public void connect() throws IOException {
try {
if (webSocketUri != null) {
websocket = new WebSocket(webSocketUri);
} else {
websocket = new WebSocket(host, port, webSocketFile);
}
// Register Event Handlers
websocket.setEventHandler(new WebSocketEventHandler() {
@Override
public void onClose() {
websocket = null;
notifyClosed();
}
@Override
public void onMessage(WebSocketMessage message) {
processWebSocketMessage(message);
}
@Override
public void onOpen() {
connected = true;
}
@Override
public void onPing() {
// nothing to do
}
@Override
public void onPong() {
// nothing to do
}
});
websocket.connect();
} catch (WebSocketException exception) {
throw new IOException(exception);
} catch (Throwable exception) {
// Defensively catch any programming errors from the weberknecht library.
throw new IOException(exception);
}
}
public PubCommands getCommands() {
if (commands == null) {
commands = new PubCommands(this);
}
return commands;
}
public boolean isConnected() {
return websocket != null && connected;
}
public void removeConnectionListener(PubConnectionListener listener) {
connectionListeners.remove(listener);
}
protected void notifyClosed() {
for (PubConnectionListener listener : connectionListeners) {
listener.connectionClosed(this);
}
// Clean up the callbackMap on termination.
List<Callback> callbacks = new ArrayList<Callback>(callbackMap.values());
for (Callback callback : callbacks) {
try {
callback.handleResult(PubResult.createJsonErrorResult("connection termination"));
} catch (JSONException e) {
}
}
callbackMap.clear();
}
protected void processWebSocketMessage(WebSocketMessage message) {
try {
JSONObject object = new JSONObject(message.getText());
DartDebugCorePlugin.log("pub <== " + object);
if (object.has("id")) {
processResponse(object);
} else {
processNotification(object);
}
} catch (JSONException exception) {
DartDebugCorePlugin.logError("Could not process message " + message.getText(), exception);
}
}
protected void sendRequest(JSONObject request) throws IOException, JSONException {
sendRequest(request, null);
}
protected void sendRequest(JSONObject request, Callback callback) throws IOException,
JSONException {
if (!isConnected()) {
throw new IOException("connection terminated");
}
int id = 0;
try {
synchronized (this) {
id = getNextRequestId();
request.put("id", id);
if (callback != null) {
callbackMap.put(id, callback);
}
}
DartDebugCorePlugin.log("pub ==> " + request);
websocket.send(request.toString());
} catch (WebSocketException exception) {
if (callback != null) {
synchronized (this) {
callbackMap.remove(id);
}
}
throw new IOException(exception);
}
}
private int getNextRequestId() {
return ++requestId;
}
private void processNotification(JSONObject object) {
// TODO: pub does not yet send notifications
}
private void processResponse(JSONObject result) {
try {
int id = result.optInt("id", -1);
Callback callback;
synchronized (this) {
callback = callbackMap.remove(id);
}
if (callback != null) {
callback.handleResult(result);
} else if (result.has("error")) {
// If we get an error back, and nobody was listening for the result, then log it.
PubResult<?> pubResult = PubResult.createFrom(result);
DartDebugCorePlugin.logInfo("Error from command id " + id + ": " + pubResult.getError());
}
} catch (Throwable exception) {
DartDebugCorePlugin.logError(exception);
}
}
}
|
[
"aurelien.ballier@cyclonit.com"
] |
aurelien.ballier@cyclonit.com
|
ac16e906be0d7c6cd4b744b560aaf9f603421291
|
d0c96978f4197f89dd6debd07e5f949d8078b37a
|
/src/test/java/org/apache/ibatis/submitted/complex_column/ComplexColumnTest.java
|
72bc3562c88420cb2a666564309d119df86550f9
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
Shaoxubao/MyBatis-Source-Study
|
17fb4dc03e47cace075c4522925c6c3dc784088f
|
b8afb58bf124f45bfc7d07ba00832d716deec020
|
refs/heads/master
| 2022-09-21T21:02:44.361213
| 2020-04-03T10:41:43
| 2020-04-03T10:41:43
| 252,654,011
| 1
| 0
|
Apache-2.0
| 2022-09-08T01:06:59
| 2020-04-03T06:49:05
|
Java
|
UTF-8
|
Java
| false
| false
| 6,249
|
java
|
/**
* Copyright 2009-2020 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.submitted.complex_column;
import java.io.Reader;
import org.apache.ibatis.BaseDataTest;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
class ComplexColumnTest {
private static SqlSessionFactory sqlSessionFactory;
@BeforeAll
static void initDatabase() throws Exception {
try (Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/complex_column/ibatisConfig.xml")) {
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
}
BaseDataTest.runScript(sqlSessionFactory.getConfiguration().getEnvironment().getDataSource(),
"org/apache/ibatis/submitted/complex_column/CreateDB.sql");
}
@Test
void testWithoutComplex() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
Person person = personMapper.getWithoutComplex(2L);
Assertions.assertNotNull(person, "person must not be null");
Assertions.assertEquals("Christian", person.getFirstName());
Assertions.assertEquals("Poitras", person.getLastName());
Person parent = person.getParent();
Assertions.assertNotNull(parent, "parent must not be null");
Assertions.assertEquals("John", parent.getFirstName());
Assertions.assertEquals("Smith", parent.getLastName());
}
}
@Test
void testWithComplex() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
Person person = personMapper.getWithComplex(2L);
Assertions.assertNotNull(person, "person must not be null");
Assertions.assertEquals("Christian", person.getFirstName());
Assertions.assertEquals("Poitras", person.getLastName());
Person parent = person.getParent();
Assertions.assertNotNull(parent, "parent must not be null");
Assertions.assertEquals("John", parent.getFirstName());
Assertions.assertEquals("Smith", parent.getLastName());
}
}
@Test
void testWithComplex2() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
Person person = personMapper.getWithComplex2(2L);
Assertions.assertNotNull(person, "person must not be null");
Assertions.assertEquals("Christian", person.getFirstName());
Assertions.assertEquals("Poitras", person.getLastName());
Person parent = person.getParent();
Assertions.assertNotNull(parent, "parent must not be null");
Assertions.assertEquals("John", parent.getFirstName());
Assertions.assertEquals("Smith", parent.getLastName());
}
}
@Test
void testWithComplex3() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
Person person = personMapper.getWithComplex3(2L);
Assertions.assertNotNull(person, "person must not be null");
Assertions.assertEquals("Christian", person.getFirstName());
Assertions.assertEquals("Poitras", person.getLastName());
Person parent = person.getParent();
Assertions.assertNotNull(parent, "parent must not be null");
Assertions.assertEquals("John", parent.getFirstName());
Assertions.assertEquals("Smith", parent.getLastName());
}
}
@Test
void testWithComplex4() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
Person criteria = new Person();
criteria.setFirstName("Christian");
criteria.setLastName("Poitras");
Person person = personMapper.getParentWithComplex(criteria);
Assertions.assertNotNull(person, "person must not be null");
Assertions.assertEquals("Christian", person.getFirstName());
Assertions.assertEquals("Poitras", person.getLastName());
Person parent = person.getParent();
Assertions.assertNotNull(parent, "parent must not be null");
Assertions.assertEquals("John", parent.getFirstName());
Assertions.assertEquals("Smith", parent.getLastName());
}
}
@Test
void testWithParamAttributes() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
Person person = personMapper.getComplexWithParamAttributes(2L);
Assertions.assertNotNull(person, "person must not be null");
Assertions.assertEquals("Christian", person.getFirstName());
Assertions.assertEquals("Poitras", person.getLastName());
Person parent = person.getParent();
Assertions.assertNotNull(parent, "parent must not be null");
Assertions.assertEquals("John", parent.getFirstName());
Assertions.assertEquals("Smith", parent.getLastName());
}
}
}
|
[
"shaoxubao-sz@fangdd.com"
] |
shaoxubao-sz@fangdd.com
|
e36b4961c480bfb28a26ba3431b049fb8bcd78d3
|
21da478fcabe0a979bfb3857896dfee6863c5c6a
|
/module2/src/introduction_to_java/thuc_hanh/SoNgayTrongThang.java
|
45515ff20e2967afe8be51690235b22f3e54ee6c
|
[] |
no_license
|
chauluong1995/C0620G1-LuongPhuChau
|
e1de1ef3207a950ba18d284a29b7d9325ec925df
|
a558b5b6c8a70920af29f88e63f830d7e04eea86
|
refs/heads/master
| 2023-06-24T03:25:33.621127
| 2021-05-26T07:49:06
| 2021-05-26T07:49:06
| 275,071,138
| 1
| 5
| null | 2021-07-22T21:00:34
| 2020-06-26T04:13:09
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,006
|
java
|
package introduction_to_java.thuc_hanh;
import java.util.Scanner;
public class SoNgayTrongThang {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Which month that you want to count days? ");
int month = scanner.nextInt();
String daysInMonth;
switch (month) {
case 2:
daysInMonth = "28 or 29";
break;
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
daysInMonth = "31";
break;
case 4:
case 6:
case 9:
case 11:
daysInMonth = "30";
break;
default:
daysInMonth = "";
}
if (daysInMonth != "") System.out.printf("The month '%d' has %s days!", month, daysInMonth);
else System.out.print("Invalid input!");
}
}
|
[
"supea52795@gmail.com"
] |
supea52795@gmail.com
|
9d578f1764328c83c7234e8660d277472e1e5be0
|
612d6b6b980bc43c712b7403adba3f27a976f66f
|
/src/osv45/src/de/ivu/wahl/export/ExportHandling.java
|
07146e4401da03e99d7fb62caabc90c964f745e5
|
[] |
no_license
|
ties/kiesraad-ondersteunende_software_verkiezingen
|
2dd328c940f5110b3d1cbb750eb02e6d875b3428
|
8ef3cbafdfd8d6fa9eb81fb75e33ec4433992453
|
refs/heads/master
| 2020-05-26T06:03:52.351505
| 2019-05-20T10:23:16
| 2019-05-20T10:23:16
| 84,993,057
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,303
|
java
|
/*
* AuswertungHandling
*
* Created on 15.10.2003
* Copyright (c) 2003-7 Statistisches Bundesamt und IVU Traffic Technologies AG
*/
package de.ivu.wahl.export;
import javax.ejb.EJBException;
import nu.xom.Document;
import de.ivu.wahl.auswertung.erg.ResultSummary;
import de.ivu.wahl.modell.ejb.Gebiet;
import de.ivu.wahl.modell.exception.ImportException;
/**
* All eml exports are generated here
*
* @author U. Müller, IVU Traffic Technologies AG
*/
public interface ExportHandling {
/**
* Creates xml-document containing all polling stations
*/
public Document createEML110() throws EJBException;
/**
* Creates xml-document as base for P22
*
* @param id_Ergebniseingang the import action for which the results are exported
* @param forCandidateLetters do include RG-Node for candidate letters
* @param forProtocolAppendix
* @return
* @throws EJBException technical problem
* @throws ImportException
*/
public Document createEML520(String id_Ergebniseingang,
boolean forCandidateLetters,
boolean forProtocolAppendix) throws EJBException, ImportException;
/**
* Creates xml-document EML 510 containing voting results
*
* @param gebiet region for which the results are exported
* @return
* @throws EJBException
* @throws ImportException
*/
public Document createEML510(Gebiet gebiet, boolean createRGNodes)
throws EJBException, ImportException;
/**
* Creates xml-document EML 510d in HSB containing voting results, see OSV-2080.
*/
public Document createEML510dInHSB(Gebiet gebiet, boolean createRGNodes)
throws EJBException, ImportException;
/**
* Creates xml-document EML 510 containing voting results
*
* @param gebiet region for which the results are exported
* @param createRGNodes true if ReportGenerator elements shall be created
* @param create510dForPSB
* @param emptyResults true if an empty EML (without voting results) shall be created
*/
public Document createEML510(Gebiet gebiet,
boolean createRGNodes,
boolean create510dForPSB,
boolean emptyResults) throws EJBException, ImportException;
/**
* Creates xml-document EML 510 containing empty voting results
*
* @param wurzelgebiet
* @return
* @throws EJBException
* @throws ImportException
*/
public Document createEmptyEML510(Gebiet wurzelgebiet) throws EJBException, ImportException;
/**
* Creates a CSV export of the votes per candidate
*/
public String createVotesCsvExport(ResultSummary resultSummary, Document eml510)
throws EJBException, ImportException;
/**
* Creates a CSV export of the names and addresses of all candidates (osv5-5)
*/
public String createCandidateAddressesCsvExport() throws EJBException, ImportException;
/**
* Creates a CSV export of the names and addresses of elected candidates (osv5-6)
*/
public String createCandidateDetailsCsvExport() throws EJBException, ImportException;
/**
* Creates or updates a zip file containing all files in the documents folder and the archive
* folder.
*/
public void updateBackupArchive();
/**
* Creates or updates a zip file containing all election results of P4 and P5.
*/
public void updateElectionResultArchive();
}
|
[
"ties@tiesdekock.nl"
] |
ties@tiesdekock.nl
|
65964c2d193f52d13d170356917c607f5fd5ad83
|
1594d85883fb5e65a3b5217d9bcbed0773c274ae
|
/src/main/java/datastructure/binarysearchtree/checking_searching/CheckForBST.java
|
cae75ce697181db41e4a9445b0b859e7e72a1a16
|
[] |
no_license
|
vinay25788/AlgorithimsAndDataStructure
|
01af50bbef79f2614e4e83230683b7dc068c4633
|
9d78f86514e13b87554c03a6087e875b55dba6c2
|
refs/heads/master
| 2023-01-13T06:27:49.790242
| 2022-12-26T15:44:34
| 2022-12-26T15:44:34
| 248,677,681
| 0
| 0
| null | 2022-03-09T01:49:32
| 2020-03-20T05:45:34
|
Java
|
UTF-8
|
Java
| false
| false
| 685
|
java
|
package datastructure.binarysearchtree.checking_searching;
public class CheckForBST {
static Node prev;
public static void main(String[] args) {
Node root = new Node(5);
root.left = new Node(2);
root.left.right = new Node(4);
root.right = new Node(10);
System.out.println(isBstR(root,null,null));
}
public static boolean isBstR(Node root,Node l,Node r)
{
if(root == null)
return true;
if(l != null && root.data<=l.data)
return false;
if(r!= null && root.data>= r.data)
return false;
return isBstR(root.left, l,root) && isBstR(root.right,root,r);
}
}
|
[
"Vinay.Kumar@target.com"
] |
Vinay.Kumar@target.com
|
ba71ee562a877b82fafe042c411aa696a79e7834
|
b9852e928c537ce2e93aa7e378689e5214696ca5
|
/hse-entity-service/src/main/java/com/hd/hse/service/workorder/IWorkTaskSrv.java
|
45865d68f3ff99d3167e6f254c0d1524849b5c39
|
[] |
no_license
|
zhanshen1373/Hseuse
|
bc701c6de7fd88753caced249032f22d2ca39f32
|
110f9d1a8db37d5b0ea348069facab8699e251f1
|
refs/heads/master
| 2023-04-04T08:27:10.675691
| 2021-03-29T07:44:02
| 2021-03-29T07:44:02
| 352,548,680
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 825
|
java
|
/**
* Project Name:hse-entity-service
* File Name:IWorkTaskSrv.java
* Package Name:com.hd.hse.service.workorder
* Date:2014年9月23日
* Copyright (c) 2014, longgang@ushayden.com All Rights Reserved.
*
*/
package com.hd.hse.service.workorder;
import java.util.List;
import com.hd.hse.common.entity.SuperEntity;
import com.hd.hse.common.exception.HDException;
/**
* ClassName:IWorkTaskSrv (作业任务后台服务接口).<br/>
* Date: 2014年9月23日 <br/>
* @author lg
* @version
* @see
*/
public interface IWorkTaskSrv {
/**
* loadWorkTaskList:(作业任务列表,带作业票). <br/>
* date: 2014年9月23日 <br/>
*
* @author lg
* @param condition
* @return
* @throws HDException
*/
public List<SuperEntity> loadWorkTaskList(String condition) throws HDException;
}
|
[
"dubojian@ushayden.com"
] |
dubojian@ushayden.com
|
97c2a1d9eb433a4be8cf0557f59c9581896a7cc9
|
a3694a5abce7e1444e67108cd46b3455b01a7c06
|
/mobile2/android/support/transition/Styleable.java
|
d3717a5ab71a156cff9a21739791fd5b149041a2
|
[] |
no_license
|
Hong5489/TrendMicroCTF2020
|
04de207d9e68b9db351805e7aa749846c0273c78
|
8beb5ff24cb118c3f4bae7957c316ea40248aa17
|
refs/heads/main
| 2022-12-24T21:50:39.493180
| 2020-10-09T05:21:18
| 2020-10-09T05:21:18
| 301,678,079
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,959
|
java
|
package android.support.transition;
class Styleable {
static final int[] ARC_MOTION;
static final int[] CHANGE_BOUNDS;
static final int[] CHANGE_TRANSFORM;
static final int[] FADE;
static final int[] PATTERN_PATH_MOTION;
static final int[] SLIDE;
static final int[] TRANSITION;
static final int[] TRANSITION_MANAGER;
static final int[] TRANSITION_SET;
static final int[] TRANSITION_TARGET = new int[] { 16842799, 16843740, 16843841, 16843842, 16843853, 16843854 };
static final int[] VISIBILITY_TRANSITION;
static {
TRANSITION_MANAGER = new int[] { 16843741, 16843742, 16843743 };
TRANSITION = new int[] { 16843073, 16843160, 16843746, 16843855 };
CHANGE_BOUNDS = new int[] { 16843983 };
VISIBILITY_TRANSITION = new int[] { 16843900 };
FADE = new int[] { 16843745 };
CHANGE_TRANSFORM = new int[] { 16843964, 16843965 };
SLIDE = new int[] { 16843824 };
TRANSITION_SET = new int[] { 16843744 };
ARC_MOTION = new int[] { 16843901, 16843902, 16843903 };
PATTERN_PATH_MOTION = new int[] { 16843978 };
}
static interface ArcMotion {
public static final int MAXIMUM_ANGLE = 2;
public static final int MINIMUM_HORIZONTAL_ANGLE = 0;
public static final int MINIMUM_VERTICAL_ANGLE = 1;
}
static interface ChangeBounds {
public static final int RESIZE_CLIP = 0;
}
static interface ChangeTransform {
public static final int REPARENT = 0;
public static final int REPARENT_WITH_OVERLAY = 1;
}
static interface Fade {
public static final int FADING_MODE = 0;
}
static interface PatternPathMotion {
public static final int PATTERN_PATH_DATA = 0;
}
static interface Slide {
public static final int SLIDE_EDGE = 0;
}
static interface Transition {
public static final int DURATION = 1;
public static final int INTERPOLATOR = 0;
public static final int MATCH_ORDER = 3;
public static final int START_DELAY = 2;
}
static interface TransitionManager {
public static final int FROM_SCENE = 0;
public static final int TO_SCENE = 1;
public static final int TRANSITION = 2;
}
static interface TransitionSet {
public static final int TRANSITION_ORDERING = 0;
}
static interface TransitionTarget {
public static final int EXCLUDE_CLASS = 3;
public static final int EXCLUDE_ID = 2;
public static final int EXCLUDE_NAME = 5;
public static final int TARGET_CLASS = 0;
public static final int TARGET_ID = 1;
public static final int TARGET_NAME = 4;
}
static interface VisibilityTransition {
public static final int TRANSITION_VISIBILITY_MODE = 0;
}
}
/* Location: /root/Downloads/trendmicro/mobile2/test/classes-dex2jar.jar!/android/support/transition/Styleable.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"hongwei5489@gmail.com"
] |
hongwei5489@gmail.com
|
bc14627c82f5d062223dd262096b7dc4f2b045a2
|
c9106d023a926f5968808a9958449e56a4170612
|
/jenax-arq-parent/jenax-arq-aggregators/src/main/java/org/aksw/jenax/arq/aggregation/AccTransform.java
|
95489c08387a21461ab4e63bedbd9c743682fec1
|
[] |
no_license
|
Scaseco/jenax
|
c6f726fa25fd4b15e05119d05dbafaf44c8f5411
|
58a8dec0b055eaca3f6848cab4b552c9fd19a6ec
|
refs/heads/develop
| 2023-08-24T13:37:16.574857
| 2023-08-24T11:53:24
| 2023-08-24T11:53:24
| 416,700,558
| 5
| 0
| null | 2023-08-03T14:41:53
| 2021-10-13T10:54:14
|
Java
|
UTF-8
|
Java
| false
| false
| 1,054
|
java
|
package org.aksw.jenax.arq.aggregation;
import java.util.function.Function;
import org.aksw.commons.collector.domain.Accumulator;
import org.apache.jena.sparql.engine.binding.Binding;
import org.apache.jena.sparql.function.FunctionEnv;
public class AccTransform<I, O>
extends AccTransform2<Binding, FunctionEnv, I, O>
implements Acc<O>
{
public AccTransform(Accumulator<Binding, FunctionEnv, I> subAcc, Function<I, O> transform) {
super(subAcc, transform);
}
}
//public class AccTransform<I, O>
// implements Acc<O>
//{
// private Acc<I> subAcc;
// private Function<I, O> transform;
//
// public AccTransform(Acc<I> subAcc, Function<I, O> transform) {
// this.subAcc = subAcc;
// this.transform = transform;
// }
//
// @Override
// public void accumulate(Binding binding) {
// subAcc.accumulate(binding);
// }
//
// @Override
// public O getValue() {
// I input = subAcc.getValue();
// O result = transform.apply(input);
// return result;
// }
//
//}
|
[
"RavenArkadon@googlemail.com"
] |
RavenArkadon@googlemail.com
|
d9a753dd77e49ca62610d1ac8fed61406c522e8f
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/26/26_a40e2d942363c7627fa2ebae508dae331b49a16e/HibernateExceptionLogDAO/26_a40e2d942363c7627fa2ebae508dae331b49a16e_HibernateExceptionLogDAO_t.java
|
0ef03aad9dd305eef96c268562e5313b0686aa56
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,300
|
java
|
/**
* The contents of this file are subject to the OpenMRS Public License Version
* 1.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://license.openmrs.org
*
* 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.
*
* Copyright (C) OpenMRS, LLC. All Rights Reserved.
*/
package org.openmrs.module.errorlogging.api.db.hibernate;
import java.util.Date;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
import org.openmrs.module.errorlogging.ExceptionLog;
import org.openmrs.module.errorlogging.api.db.ExceptionLogDAO;
import org.openmrs.module.errorlogging.util.ExceptionLogUtil;
/**
* It is a default implementation of {@link ExceptionLogDAO}.
*/
public class HibernateExceptionLogDAO implements ExceptionLogDAO {
protected final Log log = LogFactory.getLog(this.getClass());
private SessionFactory sessionFactory;
/**
* @param sessionFactory the sessionFactory to set
*/
public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
/**
* @return the sessionFactory
*/
public SessionFactory getSessionFactory() {
return sessionFactory;
}
/**
* @see {@link ExceptionLogService#saveExceptionLog(ExceptionLog)}
* @see {@link ExceptionLogDAOe#saveExceptionLog(ExceptionLog)}
*/
@Override
public ExceptionLog saveExceptionLog(ExceptionLog exceptionLog) {
sessionFactory.getCurrentSession().saveOrUpdate(exceptionLog);
return exceptionLog;
}
/**
* @see {@link ExceptionLogService#purgeExceptionLog())}
* @see {@link ExceptionLogDAO#deleteExceptionLog())}
*/
@Override
public void deleteExceptionLog(ExceptionLog exceptionLog) {
sessionFactory.getCurrentSession().delete(exceptionLog);
}
/**
* @see {@link ExceptionLogService#getExceptionLog(Integer)}
* @see {@link ExceptionLogDAO#getExceptionLog(Integer)}
*/
@Override
public ExceptionLog getExceptionLog(Integer exceptionLogId) {
return (ExceptionLog) sessionFactory.getCurrentSession().get(ExceptionLog.class, exceptionLogId);
}
/**
* @see {@link ExceptionLogService#getExceptionLogs(String, Date, Integer, Integer)}
* @see {@link ExceptionLogDAO#getExceptionLogs(String, Date, Integer, Integer)}
*/
@Override
public List<ExceptionLog> getExceptionLogs(String exceptionClass, Date minExceptionDateTime, Integer start,
Integer length) {
Criteria criteria = sessionFactory.getCurrentSession().createCriteria(ExceptionLog.class);
if (exceptionClass != null) {
criteria.add(Restrictions.eq("exceptionClass", exceptionClass));
}
if (minExceptionDateTime != null) {
criteria.add(Restrictions.ge("dateCreated", minExceptionDateTime));
}
criteria.addOrder(Order.desc("dateCreated"));
criteria.addOrder(Order.desc("exceptionClass"));
criteria.setFirstResult(start);
criteria.setMaxResults(length);
return criteria.list();
}
/**
* @see {@link ExceptionLogService#getCountOfExceptionLogs(String, Date)}
* @see {@link ExceptionLogDAO#getCountOfExceptionLogs(String, Date)}
*/
@Override
public Integer getCountOfExceptionLogs(String exceptionClass, Date minExceptionDateTime) {
Criteria criteria = sessionFactory.getCurrentSession().createCriteria(ExceptionLog.class);
if (exceptionClass != null) {
criteria.add(Restrictions.eq("exceptionClass", exceptionClass));
}
if (minExceptionDateTime != null) {
criteria.add(Restrictions.ge("dateCreated", minExceptionDateTime));
}
criteria.setProjection(Projections.rowCount());
Object count = criteria.uniqueResult();
if (count instanceof Integer) {
return (Integer) count;
} else {
return ExceptionLogUtil.convertToInteger((Long) count);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
df5d64225eff77bb7638dd177c055b87c5248f68
|
b77f083c87a6c5aa74b782161ea7277a9603ce12
|
/platform-pojo-bl/src/main/java/ua/com/fielden/platform/entity/query/fluent/AbstractSetOfOperands.java
|
c3c90569f0c4098db36a1b97786429cb6c58dc9d
|
[
"MIT"
] |
permissive
|
oleh-maikovych/tg
|
9c8d9244edba604e76ac6b613aed22c9dc3fb252
|
c6d86190b706556f4333c3f8e0d827d938e53161
|
refs/heads/develop
| 2021-01-19T12:29:26.860001
| 2017-04-11T14:42:38
| 2017-04-11T14:42:38
| 88,032,566
| 1
| 0
| null | 2017-04-12T09:11:38
| 2017-04-12T09:11:38
| null |
UTF-8
|
Java
| false
| false
| 1,473
|
java
|
package ua.com.fielden.platform.entity.query.fluent;
import ua.com.fielden.platform.entity.AbstractEntity;
import ua.com.fielden.platform.entity.query.exceptions.EqlException;
import ua.com.fielden.platform.entity.query.fluent.EntityQueryProgressiveInterfaces.IComparisonSetOperand;
import ua.com.fielden.platform.entity.query.model.SingleResultQueryModel;
abstract class AbstractSetOfOperands<T, ET extends AbstractEntity<?>> extends AbstractSingleOperand<T, ET> implements IComparisonSetOperand<T> {
protected AbstractSetOfOperands(final Tokens queryTokens) {
super(queryTokens);
}
@Override
public <E extends Object> T values(final E... values) {
if (values.length == 0) {
throw new EqlException("At least one value is expected when calling [values].");
} else {
return copy(getParent(), getTokens().setOfValues(values));
}
}
@Override
public T props(final String... properties) {
return copy(getParent(), getTokens().setOfProps(properties));
}
@Override
public T params(final String... paramNames) {
return copy(getParent(), getTokens().setOfParams(paramNames));
}
@Override
public T iParams(final String... paramNames) {
return copy(getParent(), getTokens().setOfIParams(paramNames));
}
@Override
public T model(final SingleResultQueryModel model) {
return copy(getParent(), getTokens().model(model));
}
}
|
[
"oles.hodych@gmail.com"
] |
oles.hodych@gmail.com
|
cac0566db94569896dc98b78de5392f33d540a7b
|
1ae767837eb37c73e081262f09af9acd07cdf6e7
|
/src/main/java/SeleniumSessions/ActionsClickAndSendKeys.java
|
978413ca2b3090c9260db0532897ce7fe9fa53f0
|
[] |
no_license
|
manis8050/Oct2020Selenium
|
dafdeaa0d28546cf8c9c6338120c7c023133f21b
|
ffb69bb0c979d16f5105f7176fe7a85d2eed1bc5
|
refs/heads/master
| 2023-02-23T21:06:14.323185
| 2021-01-27T16:55:58
| 2021-01-27T16:55:58
| 333,495,606
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,461
|
java
|
package SeleniumSessions;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.interactions.Actions;
import io.github.bonigarcia.wdm.WebDriverManager;
public class ActionsClickAndSendKeys {
static WebDriver driver;
public static void main(String[] args) {
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
driver.get("https://demo.opencart.com/index.php?route=account/register");
By firstname = By.id("input-firstname");
By lastname = By.id("input-lastname");
By loginLink = By.linkText("Login");
// Actions action = new Actions(driver);
//
// action.sendKeys(driver.findElement(firstname), "naveen").perform();
// action.sendKeys(driver.findElement(lastname), "automation").perform();
//
// action.click(driver.findElement(loginLink)).perform();
doActionsSendKeys(firstname, "naveen");
doActionsSendKeys(lastname, "automqtion");
doActionsClick(loginLink);
}
public static WebElement getElement(By locator) {
return driver.findElement(locator);
}
public static void doActionsClick(By locator) {
Actions action = new Actions(driver);
action.click(getElement(locator)).perform();
}
public static void doActionsSendKeys(By locator, String value) {
Actions action = new Actions(driver);
action.sendKeys(getElement(locator), value).perform();
}
}
|
[
"naveenautomationlabs@naveenautomationlabss-MacBook-Pro.local"
] |
naveenautomationlabs@naveenautomationlabss-MacBook-Pro.local
|
9f60e55ad3b1a7f4a5abd3d2e1d34a04000da479
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/35/35_c5270b6cda025cfae3536e8ce43af3c5ac3181e4/OutjectionInterceptor/35_c5270b6cda025cfae3536e8ce43af3c5ac3181e4_OutjectionInterceptor_s.java
|
1ba48624152581b9c6b8611403b797a8716fdfbc
|
[] |
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,171
|
java
|
package br.com.caelum.vraptor.vraptor2;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import br.com.caelum.vraptor.InterceptionException;
import br.com.caelum.vraptor.Interceptor;
import br.com.caelum.vraptor.core.InterceptorStack;
import br.com.caelum.vraptor.resource.ResourceMethod;
import br.com.caelum.vraptor.vraptor2.outject.Outjecter;
/**
* Uses the designated outjecter to outjects all vraptor2 compatible get
* accessible parameters.<br>
* VRaptor3-2 compatibility mode only supports type methods, not @Out annotation
* (further support might be implemented if required).
*
* @author Guilherme Silveira
*/
public class OutjectionInterceptor implements Interceptor {
private static final String GET = "get";
private static final String IS = "is";
private static final Logger logger = LoggerFactory.getLogger(OutjectionInterceptor.class);
private static final BeanHelper helper = new BeanHelper();
private final Outjecter outjecter;
public OutjectionInterceptor(Outjecter outjecter) {
this.outjecter = outjecter;
}
public boolean accepts(ResourceMethod method) {
return true;
}
public void intercept(InterceptorStack stack, ResourceMethod method, Object resourceInstance) throws IOException,
InterceptionException {
Class<?> type = method.getResource().getType();
Method[] methods = type.getDeclaredMethods();
for (Method outject : methods) {
if (outject.getName().length() < 3
|| !(outject.getName().startsWith(IS) || outject.getName().startsWith(GET))) {
continue;
}
if (outject.getParameterTypes().length != 0) {
logger.error("A get method was found at " + type
+ " but was not used because it receives parameters. Fix it.");
continue;
} else if (outject.getReturnType().equals(void.class)) {
logger
.error("A get method was found at " + type
+ " but was not used because it returns void. Fix it.");
continue;
}
try {
Object result = outject.invoke(resourceInstance);
String name = helper.nameForGetter(outject);
logger.debug("Outjecting " + name);
outjecter.include(name, result);
} catch (IllegalArgumentException e) {
throw new InterceptionException("Unable to outject value for " + outject.getName(), e);
} catch (IllegalAccessException e) {
throw new InterceptionException("Unable to outject value for " + outject.getName(), e);
} catch (InvocationTargetException e) {
throw new InterceptionException("Unable to outject value for " + outject.getName(), e.getCause());
}
}
stack.next(method, resourceInstance);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.