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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b2ba8484de904d4f7da512d3756182aea9a14c34
|
2b6de4ef64f921f212cb2e167f01bf32cf621ef1
|
/service/service-ucenter/src/main/java/com/atguigu/guli/service/ucenter/mapper/MemberMapper.java
|
70e99a28e59a23a54915b416030b96820918a458
|
[] |
no_license
|
TL-SH/guli
|
7c1e69add236c6b5fd5e55a3531462fc1eebe94d
|
daa83e82db18172ff55874e7f438a8ade0e7465e
|
refs/heads/master
| 2022-07-10T19:18:04.274584
| 2019-12-23T14:39:34
| 2019-12-23T14:39:34
| 223,131,061
| 0
| 0
| null | 2022-06-21T02:17:17
| 2019-11-21T08:58:26
|
Java
|
UTF-8
|
Java
| false
| false
| 439
|
java
|
package com.atguigu.guli.service.ucenter.mapper;
import com.atguigu.guli.service.ucenter.entity.Member;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 会员表 Mapper 接口
* </p>
*
* @author leishuai
* @since 2019-12-04
*/
public interface MemberMapper extends BaseMapper<Member> {
/**
* 用户注册统计
* @param day
* @return
*/
Integer selectRegisterCount(String day);
}
|
[
"2258010965@qq.com"
] |
2258010965@qq.com
|
002881cbc8f83599bda9b2c8c26f56a4db59aa37
|
a59ac307b503ff470e9be5b1e2927844eff83dbe
|
/wheatfield/branches/rkylin-wheatfield-BBZX_NEW/wheatfield/src/main/java/com/rkylin/wheatfield/manager/impl/InterestRepaymentHisManagerImpl.java
|
9dc18402bee4614a7a64bb43488615181745cd73
|
[] |
no_license
|
yangjava/kylin-wheatfield
|
2cc82ee9e960543264b1cfc252f770ba62669e05
|
4127cfca57a332d91f8b2ae1fe1be682b9d0f5fc
|
refs/heads/master
| 2020-12-02T22:07:06.226674
| 2017-07-03T07:59:15
| 2017-07-03T07:59:15
| 96,085,446
| 0
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,952
|
java
|
/*
* Powered By code-generator
* Web Site: http://www.rkylin.com
* Since 2014 - 2015
*/
package com.rkylin.wheatfield.manager.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import com.rkylin.wheatfield.dao.InterestRepaymentHisDao;
import com.rkylin.wheatfield.manager.InterestRepaymentHisManager;
import com.rkylin.wheatfield.pojo.InterestRepaymentHis;
import com.rkylin.wheatfield.pojo.InterestRepaymentHisQuery;
@Component("interestRepaymentHisManager")
public class InterestRepaymentHisManagerImpl implements InterestRepaymentHisManager {
@Autowired
@Qualifier("interestRepaymentHisDao")
private InterestRepaymentHisDao interestRepaymentHisDao;
@Override
public void saveInterestRepaymentHis(InterestRepaymentHis interestRepaymentHis) {
interestRepaymentHisDao.insertSelective(interestRepaymentHis);
}
@Override
public int updateInterestRepaymentHis(InterestRepaymentHis interestRepaymentHis) {
return interestRepaymentHisDao.updateByPrimaryKeySelective(interestRepaymentHis);
}
@Override
public InterestRepaymentHis findInterestRepaymentHisById(String id) {
return interestRepaymentHisDao.selectByPrimaryKey(id);
}
@Override
public List<InterestRepaymentHis> queryList(InterestRepaymentHisQuery query) {
return interestRepaymentHisDao.selectByExample(query);
}
@Override
public void deleteInterestRepaymentHisById(String id) {
interestRepaymentHisDao.deleteByPrimaryKey(id);
}
@Override
public void deleteInterestRepaymentHis(InterestRepaymentHisQuery query) {
interestRepaymentHisDao.deleteByExample(query);
}
@Override
public long sumRepaidAmountByExample(InterestRepaymentHisQuery example) {
Long amount = interestRepaymentHisDao.sumRepaidAmountByExample(example);
if(amount == null){
return 0;
}
return amount;
}
}
|
[
"yangjava@users.noreply.github.com"
] |
yangjava@users.noreply.github.com
|
1518a39b3d8289ada28980e9ed2c3e99f404582b
|
ec281fd0f11643aaf86a45aa05bdaeb383e63e87
|
/app/src/main/java/net/leelink/communityboss/adapter/PreOrderAdapter.java
|
5be6d242aed83a63f70b53088abadb390e695a34
|
[] |
no_license
|
zeroys0/CommunityBoss
|
0a2b6f3041335948f904739e90026292914ef196
|
de594913a8e6a3afaf37e5d91e0406da6faf7ff2
|
refs/heads/master
| 2023-04-28T06:48:52.370251
| 2023-04-24T03:24:02
| 2023-04-24T03:24:02
| 216,946,808
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,525
|
java
|
package net.leelink.communityboss.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import net.leelink.communityboss.R;
import net.leelink.communityboss.app.CommunityBossApplication;
import net.leelink.communityboss.bean.GoodsBean;
import net.leelink.communityboss.bean.OrderDetail;
import net.leelink.communityboss.utils.Urls;
import java.math.BigDecimal;
import java.util.List;
import androidx.recyclerview.widget.RecyclerView;
public class PreOrderAdapter extends RecyclerView.Adapter<PreOrderAdapter.ViewHolder> {
private Context context;
private List<GoodsBean> list;
public PreOrderAdapter(Context context, List<GoodsBean> list) {
this.context =context;
this.list = list;
}
@Override
public PreOrderAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.pre_order_item, parent, false); // 实例化viewholder
PreOrderAdapter.ViewHolder viewHolder = new PreOrderAdapter.ViewHolder(v);
return viewHolder;
}
@Override
public void onBindViewHolder(PreOrderAdapter.ViewHolder holder, int position) {
holder.tv_name.setText(list.get(position).getName());
Glide.with(context).load(Urls.getInstance().IMG_URL+list.get(position).getImageUrl()).into(holder.img_head);
holder.tv_count.setText("x"+list.get(position).getNumber());
holder.tv_price.setText("¥"+big2(list.get(position).getPrice()));
}
@Override
public int getItemCount() {
return list==null?0:list.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
TextView tv_name,tv_count,tv_price;
ImageView img_head;
public ViewHolder(View itemView) {
super(itemView);
tv_name = itemView.findViewById(R.id.tv_name);
img_head = itemView.findViewById(R.id.img_head);
tv_count = itemView.findViewById(R.id.tv_count);
tv_price = itemView.findViewById(R.id.tv_price);
}
}
private static String big2(double d) {
BigDecimal d1 = new BigDecimal(Double.toString(d));
BigDecimal d2 = new BigDecimal(Integer.toString(1));
// 四舍五入,保留2位小数
return d1.divide(d2,2,BigDecimal.ROUND_HALF_UP).toString();
}
}
|
[
"370099094@qq.com"
] |
370099094@qq.com
|
b72633ff73f0f48e9c2024686831e116c3a12966
|
f3c9530b94b0c8829454b7ff5699a978ab04393d
|
/jnetpcap/tags/1.3/branch-1.3.b4.r1249-turnedoff-dbg-msg/tests/java1.5/org/jnetpcap/packet/TestNoSystemOutOutput.java
|
9714fc4e0c1d8879e51e8a417397c5c90e9383cd
|
[] |
no_license
|
hongpingwei/jnetpcap-code
|
70083699858b720ebec4f1e373f4683d6bd86b9a
|
f271c3e3e004c7e7d7d808aa8adc25bbfe15bd2c
|
refs/heads/master
| 2021-01-11T19:57:10.823207
| 2015-03-19T14:33:54
| 2015-03-19T14:33:54
| 79,429,395
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,355
|
java
|
/*
* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Sly Technologies, Inc.
*
* This file is part of jNetPcap.
*
* jNetPcap 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 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.jnetpcap.packet;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintStream;
import org.jnetpcap.packet.format.TextFormatter;
import junit.framework.TestCase;
// TODO: Auto-generated Javadoc
/**
* The Class TestNoSystemOutOutput.
*/
public class TestNoSystemOutOutput
extends
TestCase {
/** The Constant DIR. */
private final static File DIR = new File("tests");
/** The saved out. */
private PrintStream savedOut;
/** The saved err. */
private PrintStream savedErr;
/** The out. */
private ByteArrayOutputStream out;
/** The DISGAR d_ output. */
private TextFormatter DISGARD_OUTPUT = new TextFormatter(TestUtils.DEV_NULL);
/*
* (non-Javadoc)
*
* @see junit.framework.TestCase#setUp()
*/
@Override
protected void setUp() throws Exception {
savedOut = System.out;
savedErr = System.err;
out = new ByteArrayOutputStream();
System.setOut(new PrintStream(out));
System.setErr(new PrintStream(out));
}
/**
* Reset.
*/
private void reset() {
out = new ByteArrayOutputStream();
System.setOut(new PrintStream(out));
System.setErr(new PrintStream(out));
}
/*
* (non-Javadoc)
*
* @see junit.framework.TestCase#tearDown()
*/
@Override
protected void tearDown() throws Exception {
System.setOut(savedOut);
System.setErr(savedErr);
}
/**
* Test system out redirection is working.
*/
public void testSystemOutRedirectionIsWorking() {
assertTrue("redirection failed", out.size() == 0);
System.err.println("hello");
assertFalse("redirection failed", out.size() == 0);
reset();
}
/**
* Test no output from core protocols.
*
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public void testNoOutputFromCoreProtocols() throws IOException {
String[] files = DIR.list(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.endsWith(".pcap");
}
});
// int count = 0;
for (String f : files) {
for (PcapPacket packet : TestUtils.getIterable(DIR + "/" + f)) {
// savedOut.printf("TestNoSystemOutput() #%d\n", count ++);
// savedOut.flush();
//
DISGARD_OUTPUT.format(packet);
assertTrue("unexpected System.out output found " + f + ": packet="
+ packet.toString() + "\noutput found=" + out.toString(), out.size() == 0);
}
}
}
}
|
[
"voytechs@905ad56a-9210-0410-a722-a9c141187570"
] |
voytechs@905ad56a-9210-0410-a722-a9c141187570
|
856299c8bcd90871eba444ca14b00e5f021222e0
|
acd9b11687fd0b5d536823daf4183a596d4502b2
|
/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ExcludeFrequent.java
|
ed759f407a2dc17cdee7cf24951bd7e7810acad8
|
[
"Apache-2.0"
] |
permissive
|
szabosteve/elasticsearch-java
|
75be71df80a4e010abe334a5288b53fa4a2d6d5e
|
79a1249ae77be2ce9ebd5075c1719f3c8be49013
|
refs/heads/main
| 2023-08-24T15:36:51.047105
| 2021-10-01T14:23:34
| 2021-10-01T14:23:34
| 399,091,850
| 0
| 0
|
Apache-2.0
| 2021-08-23T12:15:19
| 2021-08-23T12:15:19
| null |
UTF-8
|
Java
| false
| false
| 1,587
|
java
|
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//----------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------
package co.elastic.clients.elasticsearch.ml;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.util.StringEnum;
@JsonpDeserializable
public enum ExcludeFrequent implements StringEnum {
All("all"), None("none"), By("by"), Over("over");
private final String jsonValue;
ExcludeFrequent(String jsonValue) {
this.jsonValue = jsonValue;
}
public String jsonValue() {
return this.jsonValue;
}
public static final StringEnum.Deserializer<ExcludeFrequent> _DESERIALIZER = new StringEnum.Deserializer<>(
ExcludeFrequent.values());
}
|
[
"sylvain@elastic.co"
] |
sylvain@elastic.co
|
cf1bc06ee5d418e99ae26117f53ec4b71937c05b
|
0ca9a0873d99f0d69b78ed20292180f513a20d22
|
/src/main/java/org/checkerframework/checker/units/qual/Temperature.java
|
efc6fada300f5ab7b5355b3c662a19427be4fc45
|
[] |
no_license
|
Eliminater74/com.google.android.tvlauncher
|
44361fbbba097777b99d7eddd6e03d4bbe5f4d60
|
e8284f9970d77a05042a57e9c2173856af7c4246
|
refs/heads/master
| 2021-01-14T23:34:04.338366
| 2020-02-24T16:39:53
| 2020-02-24T16:39:53
| 242,788,539
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 481
|
java
|
package org.checkerframework.checker.units.qual;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.checkerframework.framework.qual.SubtypeOf;
@SubtypeOf({UnknownUnits.class})
@Documented
@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface Temperature {
}
|
[
"eliminater74@gmail.com"
] |
eliminater74@gmail.com
|
e4b6622fc05195fe8293b11b19eb8d25b51b3488
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/48/585.java
|
f38731ff469aeefdb50fa9cfb75e66083a8cb2ff
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,601
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int i;
int j;
int m;
int n;
int k;
int[][] a = new int[9][9];
int[][] b = new int[9][9];
//C++ TO JAVA CONVERTER TODO TASK: The memory management function 'memset' has no equivalent in Java:
memset(a,0,9 * 9 * (Integer.SIZE / Byte.SIZE));
//C++ TO JAVA CONVERTER TODO TASK: The memory management function 'memset' has no equivalent in Java:
memset(b,0,9 * 9 * (Integer.SIZE / Byte.SIZE));
m = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));
n = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));
a[4][4] = m;
b[4][4] = m;
for (k = 0;k <= n;k++)
{
for (i = 4 - k;i < 4 + k;i++)
{
for (j = 4 - k;j < 4 + k;j++)
{
b[i - 1][j - 1] += a[i][j];
b[i - 1][j] += a[i][j];
b[i - 1][j + 1] += a[i][j];
b[i][j - 1] += a[i][j];
b[i][j + 1] += a[i][j];
b[i + 1][j - 1] += a[i][j];
b[i + 1][j] += a[i][j];
b[i + 1][j + 1] += a[i][j];
b[i][j] += a[i][j];
}
}
for (i = 0;i < 9;i++)
{
for (j = 0;j < 9;j++)
{
a[i][j] = b[i][j];
}
}
}
for (i = 0;i < 9;i++) //????
{
for (j = 0;j < 9;j++)
{
if (i < 8)
{
if (j < 8)
{
System.out.print(a[i][j]);
System.out.print(" ");
}
else
{
System.out.print(a[i][j]);
System.out.print("\n");
}
}
else
{
if (j < 8)
{
System.out.print(a[i][j]);
System.out.print(" ");
}
else
{
System.out.print(a[i][j]);
}
}
}
}
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
cd07a8333c169235773b9f042a24d68718edddd6
|
df1a3f7047e24bc03c6735d42214bde6330ade80
|
/ibas.accounting.service/src/main/java/org/colorcoding/ibas/accounting/service/rest/Resolver.java
|
fb6d61585f335d0be2050dc52a2370509eea6c5f
|
[
"Apache-2.0"
] |
permissive
|
GSGSS/ibas.accounting
|
4de634ce6b051335189a65485e9cc23539e14061
|
3e19b3355d69e4e8fe6351dfaed0281565b77cef
|
refs/heads/master
| 2020-04-28T08:15:44.960619
| 2019-03-08T06:46:10
| 2019-03-08T06:46:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,151
|
java
|
package org.colorcoding.ibas.accounting.service.rest;
import javax.ws.rs.Produces;
import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import org.colorcoding.ibas.bobas.bo.UserFieldProxy;
import org.colorcoding.ibas.bobas.common.Criteria;
import org.colorcoding.ibas.bobas.common.OperationResult;
import org.colorcoding.ibas.accounting.bo.dimension.Dimension;
import org.colorcoding.ibas.accounting.bo.postingperiod.PostingPeriod;
import org.colorcoding.ibas.accounting.bo.project.Project;
/**
* 序列化解释器
*/
@Provider
@Produces({ "application/json" })
public class Resolver implements ContextResolver<JAXBContext> {
private static JAXBContext jaxbContext = null;
public JAXBContext getContext(Class<?> type) {
try {
if (jaxbContext == null) {
jaxbContext = JAXBContext.newInstance(Criteria.class, OperationResult.class, UserFieldProxy.class,
PostingPeriod.class, Project.class, Dimension.class);
}
} catch (JAXBException e) {
e.printStackTrace();
}
return jaxbContext;
}
}
|
[
"niuren.zhu@icloud.com"
] |
niuren.zhu@icloud.com
|
1ae0ac1592112dd99bfe4f9d1122bf9d2c723236
|
9e20645e45cc51e94c345108b7b8a2dd5d33193e
|
/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q078_SagaOfTheDoomcryer/Q078_SagaOfTheDoomcryer.java
|
63d2f6adc8842e75b8d1b2cc47837953765cfab7
|
[] |
no_license
|
Enryu99/L2jMobius-01-11
|
2da23f1c04dcf6e88b770f6dcbd25a80d9162461
|
4683916852a03573b2fe590842f6cac4cc8177b8
|
refs/heads/master
| 2023-09-01T22:09:52.702058
| 2021-11-02T17:37:29
| 2021-11-02T17:37:29
| 423,405,362
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,926
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q078_SagaOfTheDoomcryer;
import quests.SagasSuperClass;
/**
* Saga of the Doomcryer (78)
* @author Emperorc
*/
public class Q078_SagaOfTheDoomcryer extends SagasSuperClass
{
public Q078_SagaOfTheDoomcryer()
{
super(78, "Saga of the Doomcryer");
_npc = new int[]
{
31336,
31624,
31589,
31290,
31642,
31646,
31649,
31650,
31654,
31655,
31657,
31290
};
_items = new int[]
{
7080,
7539,
7081,
7493,
7276,
7307,
7338,
7369,
7400,
7431,
7101,
0
};
_mob = new int[]
{
27295,
27227,
27285
};
_classId = new int[]
{
116
};
_prevClass = new int[]
{
0x34
};
_x = new int[]
{
191046,
46087,
46066
};
_y = new int[]
{
-40640,
-36372,
-36396
};
_z = new int[]
{
-3042,
-1685,
-1685
};
_text = new String[]
{
"PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!",
"... Oh ... good! So it was ... let's begin!",
"I do not have the patience ..! I have been a giant force ...! Cough chatter ah ah ah!",
"Paying homage to those who disrupt the orderly will be PLAYERNAME's death!",
"Now, my soul freed from the shackles of the millennium, Halixia, to the back side I come ...",
"Why do you interfere others' battles?",
"This is a waste of time.. Say goodbye...!",
"...That is the enemy",
"...Goodness! PLAYERNAME you are still looking?",
"PLAYERNAME ... Not just to whom the victory. Only personnel involved in the fighting are eligible to share in the victory.",
"Your sword is not an ornament. Don't you think, PLAYERNAME?",
"Goodness! I no longer sense a battle there now.",
"let...",
"Only engaged in the battle to bar their choice. Perhaps you should regret.",
"The human nation was foolish to try and fight a giant's strength.",
"Must...Retreat... Too...Strong.",
"PLAYERNAME. Defeat...by...retaining...and...Mo...Hacker",
"....! Fight...Defeat...It...Fight...Defeat...It..."
};
registerNPCs();
}
}
|
[
"MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b"
] |
MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b
|
7b7675da9501adb1b0d4d21ac990a9729564e130
|
4e7ce544d5383a67279b3cff8194efb2d8296a57
|
/civcraft/src/com/avrgaming/civcraft/items/components/DurabilityOnDeath.java
|
f30e5114440e9a4d6d3a47fcabc7b1bd549f23e8
|
[] |
no_license
|
YourCoal/Project
|
658553333fa243c1e7cfb877654d630ce2a627e0
|
7c830b8f75692fbdcc380e959a77c019f3197bf9
|
refs/heads/master
| 2020-04-10T21:13:24.564032
| 2017-04-15T01:25:35
| 2017-04-15T01:25:35
| 50,268,051
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,545
|
java
|
/*************************************************************************
*
* AVRGAMING LLC
* __________________
*
* [2013] AVRGAMING LLC
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of AVRGAMING LLC and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to AVRGAMING LLC
* and its suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from AVRGAMING LLC.
*/
package com.avrgaming.civcraft.items.components;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.inventory.ItemStack;
import com.avrgaming.civcraft.loreenhancements.LoreEnhancement;
import com.avrgaming.civcraft.loreenhancements.LoreEnhancementDurability;
import com.avrgaming.civcraft.lorestorage.ItemChangeResult;
import com.avrgaming.civcraft.main.CivMessage;
import com.avrgaming.civcraft.util.CivColor;
import gpl.AttributeUtil;
public class DurabilityOnDeath extends ItemComponent {
@Override
public void onPrepareCreate(AttributeUtil attrs) {
}
@Override
public ItemChangeResult onDurabilityDeath(PlayerDeathEvent event, ItemChangeResult result, ItemStack sourceStack) {
if (result == null) {
result = new ItemChangeResult();
result.stack = sourceStack;
result.destroyItem = false;
}
if (result.destroyItem) {
return result;
}
double percent = this.getDouble("value");
AttributeUtil attrs = new AttributeUtil(result.stack);
/* Try to get any extra enhancements from this item. */
for (LoreEnhancement enh : attrs.getEnhancements()) {
if (enh instanceof LoreEnhancementDurability) {
percent = percent/2;
CivMessage.send((Player)event.getEntity(), CivColor.LightGrayItalic+"Due to the enhancement 'Durability' on your "+sourceStack.getItemMeta().getDisplayName()
+CivColor.LightGrayItalic+", your armor saved 50% more durability.");
}
}
int reduction = (int)(result.stack.getType().getMaxDurability()*percent);
int durabilityLeft = result.stack.getType().getMaxDurability() - result.stack.getDurability();
if (durabilityLeft > reduction) {
result.stack.setDurability((short)(result.stack.getDurability() + reduction));
} else {
result.destroyItem = true;
}
return result;
}
}
|
[
"yourcoal5446@gmail.com"
] |
yourcoal5446@gmail.com
|
9fef14445e838018a8ca8ac5f0def875add875c1
|
3386dd7e7be492cfb06912215e5ef222bbc7ce34
|
/autocomment_netbeans/spooned/org/jbpm/process/instance/impl/JavaScriptReturnValueEvaluator.java
|
0637ec3a04cd74041a21c2db32ac24832c958534
|
[
"Apache-2.0"
] |
permissive
|
nerzid/autocomment
|
cc1d3af05045bf24d279e2f824199ac8ae51b5fd
|
5803cf674f5cadfdc672d4957d46130a3cca6cd9
|
refs/heads/master
| 2021-03-24T09:17:16.799705
| 2016-09-28T14:32:21
| 2016-09-28T14:32:21
| 69,360,519
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,352
|
java
|
/**
* Copyright 2010 Red Hat, Inc. and/or its affiliates.
*
* 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.jbpm.process.instance.impl;
import java.io.Externalizable;
import org.kie.api.runtime.Globals;
import java.io.IOException;
import java.util.Map;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.kie.api.runtime.process.ProcessContext;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import org.jbpm.process.instance.context.variable.VariableScopeInstance;
import org.jbpm.workflow.instance.WorkflowProcessInstance;
public class JavaScriptReturnValueEvaluator implements ReturnValueEvaluator , Externalizable {
private static final long serialVersionUID = 630L;
private String expr;
public JavaScriptReturnValueEvaluator() {
}
public JavaScriptReturnValueEvaluator(String expr) {
JavaScriptReturnValueEvaluator.this.expr = expr;
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
expr = in.readUTF();
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeUTF(expr);
}
public Object evaluate(ProcessContext context) throws Exception {
ScriptEngineManager factory = new ScriptEngineManager();
ScriptEngine engine = factory.getEngineByName("JavaScript");
// insert globals into context
Globals globals = context.getKieRuntime().getGlobals();
if ((globals != null) && ((globals.getGlobalKeys()) != null)) {
for (String gKey : globals.getGlobalKeys()) {
engine.put(gKey, globals.get(gKey));
}
}
// insert process kcontext
engine.put("kcontext", context);
if (((context.getProcessInstance()) != null) && ((context.getProcessInstance().getProcess()) != null)) {
// insert process variables
VariableScopeInstance variableScope = ((VariableScopeInstance) (((WorkflowProcessInstance) (context.getProcessInstance())).getContextInstance(VariableScope.VARIABLE_SCOPE)));
Map<String, Object> variables = variableScope.getVariables();
if (variables != null) {
for (Map.Entry<String, Object> variable : variables.entrySet()) {
engine.put(variable.getKey(), variable.getValue());
}
}
}
Object value = engine.eval(expr);
if (!(value instanceof Boolean)) {
throw new RuntimeException((((("Constraints must return boolean values: " + (expr)) + " returns ") + value) + (value == null ? "" : " (type=" + (value.getClass()))));
}
return ((Boolean) (value)).booleanValue();
}
public String toString() {
return JavaScriptReturnValueEvaluator.this.expr;
}
}
|
[
"nerzid@gmail.com"
] |
nerzid@gmail.com
|
7c6eb0efc46ebe6a98dd624131a0d9eda1059975
|
acc3f2f9db8bbed8c972113cb513ac471063f4de
|
/phoebus-master/phoebus-master/core/framework/src/main/java/org/phoebus/framework/preferences/PhoebusPreferenceService.java
|
1953a467ba7440fd12e69b017213913867c1654b
|
[] |
no_license
|
ScXin/localrepo
|
26cf31e1895d4af120c852e1fa8f36afc433551b
|
c9697d382c8e4337e97e50e01add74b4596a8798
|
refs/heads/master
| 2022-10-21T11:08:33.286886
| 2020-08-30T12:24:52
| 2020-08-30T12:24:52
| 164,069,320
| 1
| 5
| null | 2022-10-04T23:51:20
| 2019-01-04T06:45:27
|
Java
|
UTF-8
|
Java
| false
| false
| 750
|
java
|
package org.phoebus.framework.preferences;
import java.util.prefs.Preferences;
import java.util.prefs.PreferencesFactory;
/**
*
* @author Kunal Shroff
*
*/
public class PhoebusPreferenceService implements PreferencesFactory {
/** Obtain preference node for a class
* @param clazz Class
* @return {@link Preferences} for that class
*/
public static Preferences userNodeForClass(final Class<?> clazz)
{
return Preferences.userNodeForPackage(clazz).node(clazz.getSimpleName());
}
@Override
public Preferences userRoot() {
return FileSystemPreferences.getUserRoot();
}
@Override
public Preferences systemRoot() {
return FileSystemPreferences.getSystemRoot();
}
}
|
[
"980425123@qq.com"
] |
980425123@qq.com
|
ec01193fe83d7c9e00df5219dd459e0afa6b8016
|
bf3584f8f6636d0d70706f4b8d9348796aaf2071
|
/src/Java_chobo2/ch12/Ex12_4.java
|
aebcb3422b4ee98af6011bee705cc38ec879e903
|
[] |
no_license
|
stpn94/Java_chobo2
|
bc46671aa9a216c30bf29096b5af43a87e39897e
|
a83bcbd25c9b0c204790aaf8c5e88ddca1f20cf2
|
refs/heads/master
| 2023-03-20T12:27:22.604118
| 2021-03-09T06:47:09
| 2021-03-09T06:47:09
| 341,820,140
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,343
|
java
|
package Java_chobo2.ch12;
import java.util.ArrayList;
class Fruit2 { public String toString() { return "Fruit";}}
class Apple2 extends Fruit2 { public String toString() { return "Apple";}}
class Grape2 extends Fruit2 { public String toString() { return "Grape";}}
class Juice {
String name;
Juice(String name) { this.name = name + "Juice"; }
public String toString() { return name; }
}
class Juicer {
static Juice makeJuice(FruitBox2<? extends Fruit2> box) {
String tmp = "";
for(Fruit2 f : box.getList())
tmp += f + " ";
return new Juice(tmp);
}
}
class Ex12_4 {
public static void main(String[] args) {
FruitBox2<Fruit2> fruitBox = new FruitBox2<Fruit2>();
FruitBox2<Apple2> appleBox = new FruitBox2<Apple2>();
fruitBox.add(new Apple2());
fruitBox.add(new Grape2());
appleBox.add(new Apple2());
appleBox.add(new Apple2());
System.out.println(Juicer.makeJuice(fruitBox));
System.out.println(Juicer.makeJuice(appleBox));
} // main
}
class FruitBox2<T extends Fruit2> extends Box2<T> {}
class Box2<T> {
ArrayList<T> list = new ArrayList<T>();
void add(T item) { list.add(item); }
T get(int i) { return list.get(i); }
ArrayList<T> getList() { return list; }
int size() { return list.size(); }
public String toString() { return list.toString();}
}
|
[
"stpn94@gmail.com"
] |
stpn94@gmail.com
|
883b243acb8356abf436aa35ac807ec0996b3bc6
|
cb7ca5469115cab34b64a6b3c255660cf8bf6e09
|
/com.archimatetool.editor/src/com/archimatetool/editor/diagram/editparts/diagram/NoteEditPart.java
|
cdc816a598bb114092fff15e2970aaece5f81ca1
|
[
"MIT",
"LicenseRef-scancode-free-unknown"
] |
permissive
|
archimatetool/archi
|
59b0a984b3d0471643835cd8f9ff5a648bd97de7
|
eec0869ad2b6e9c192e127aa9bc00bdbc82b7cd0
|
refs/heads/master
| 2023-09-04T02:29:50.509293
| 2023-08-31T10:28:46
| 2023-08-31T10:28:46
| 1,547,663
| 799
| 274
|
MIT
| 2023-05-26T16:55:05
| 2011-03-30T19:18:13
|
Java
|
UTF-8
|
Java
| false
| false
| 3,175
|
java
|
/**
* This program and the accompanying materials
* are made available under the terms of the License
* which accompanies this distribution in the file LICENSE.txt
*/
package com.archimatetool.editor.diagram.editparts.diagram;
import org.eclipse.draw2d.IFigure;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.RequestConstants;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.DirectEditPolicy;
import org.eclipse.gef.requests.DirectEditRequest;
import org.eclipse.gef.tools.DirectEditManager;
import com.archimatetool.editor.diagram.directedit.MultiLineTextDirectEditManager;
import com.archimatetool.editor.diagram.editparts.AbstractConnectedEditPart;
import com.archimatetool.editor.diagram.figures.IDiagramModelObjectFigure;
import com.archimatetool.editor.diagram.figures.diagram.NoteFigure;
import com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy;
import com.archimatetool.editor.diagram.policies.PartComponentEditPolicy;
import com.archimatetool.editor.model.commands.EObjectFeatureCommand;
import com.archimatetool.model.IArchimatePackage;
import com.archimatetool.model.IDiagramModelNote;
/**
* Note Edit Part
*
* @author Phillip Beauvoir
*/
public class NoteEditPart extends AbstractConnectedEditPart {
@Override
protected void createEditPolicies() {
// Allow parts to be connected
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ArchimateDiagramConnectionPolicy());
// Add a policy to handle editing the Parts (for example, deleting a part)
installEditPolicy(EditPolicy.COMPONENT_ROLE, new PartComponentEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new NoteDirectEditPolicy());
}
@Override
protected IFigure createFigure() {
NoteFigure figure = new NoteFigure((IDiagramModelNote)getModel());
return figure;
}
@Override
protected void refreshFigure() {
((IDiagramModelObjectFigure)figure).refreshVisuals();
}
@Override
public void performRequest(Request req) {
if(req.getType() == RequestConstants.REQ_DIRECT_EDIT) {
createDirectEditManager().show();
}
else if(req.getType() == RequestConstants.REQ_OPEN) {
// Show Properties view
showPropertiesView();
}
}
protected DirectEditManager createDirectEditManager() {
return new MultiLineTextDirectEditManager(this);
}
/**
* DirectEditPolicy
*/
private class NoteDirectEditPolicy extends DirectEditPolicy {
@Override
protected Command getDirectEditCommand(DirectEditRequest request) {
String content = (String)request.getCellEditor().getValue();
return new EObjectFeatureCommand(Messages.NoteEditPart_0, getModel(),
IArchimatePackage.Literals.TEXT_CONTENT__CONTENT, content);
}
@Override
protected void showCurrentEditValue(DirectEditRequest request) {
}
}
}
|
[
"p.beauvoir@dadabeatnik.com"
] |
p.beauvoir@dadabeatnik.com
|
452cd73dba739b92215cba595107e6a45526501d
|
b452440779c93dfb135cfb1b01803de7145893dd
|
/app/src/main/java/com/yfy/view/textView/RunningTextView.java
|
b6431ad9f19d42cb90226dd07aef82937afba7ae
|
[] |
no_license
|
Zhaoxianxv/wuhou_dish
|
08ed3f96e8a84f49c08333d38dfe8b81b8708eee
|
e177d23c243673ba34ca587a43d4bd1c3652adc1
|
refs/heads/master
| 2022-12-27T00:24:34.386835
| 2020-10-14T02:31:40
| 2020-10-14T02:31:40
| 303,881,954
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,223
|
java
|
package com.yfy.view.textView;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.util.AttributeSet;
import android.widget.TextView;
import java.text.DecimalFormat;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* 一、设置跳跃的帧数,setFrames(int frames),默认是25帧 二、设置数字格式 , setFormat(String
* pattern),具体查DecimalFormat类的api 三、需要动画效果用,playNumber(double
* number)方法代替setText()方法,小数如果超过3位小数会四舍五入保留2位小数
*
* @author Lance
*
*/
@SuppressLint("AppCompatCustomView")
public class RunningTextView extends TextView {
public double content;// 最后显示的数字
private int frames = 25;// 总共跳跃的帧数,默认25跳
private double nowNumber = 0.00;// 显示的时间
private ExecutorService thread_pool;
private Handler handler;
private DecimalFormat formater;// 格式化时间,保留两位小数
public RunningTextView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
public RunningTextView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public RunningTextView(Context context) {
super(context);
init();
}
public int getFrames() {
return frames;
}
// 设置帧数
public void setFrames(int frames) {
this.frames = frames;
}
/**
* 设置数字格式,具体查DecimalFormat类的api
* @param pattern
*/
public void setFormat(String pattern) {
formater = new DecimalFormat(pattern);
}
// 初始化
private void init() {
thread_pool = Executors.newFixedThreadPool(2);// 2个线程的线程池
formater = new DecimalFormat("0.00");// 最多两位小数,而且不够两位整数用0占位。可以通过setFormat再次设置
handler = new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
RunningTextView.this.setText(formater.format(nowNumber).toString());// 更新显示的数字
nowNumber += Double.parseDouble(msg.obj.toString());// 跳跃arg1那么多的数字间隔
//
if (nowNumber < content) {
Message msg2 = handler.obtainMessage();
msg2.obj = msg.obj;
handler.sendMessage(msg2);// 继续发送通知改变UI
} else {
RunningTextView.this.setText(formater.format(content).toString());// 最后显示的数字,动画停止
}
}
};
}
/**
* 播放数字动画的方法
*
* @param moneyNumber
*/
public void playNumber(double moneyNumber) {
if (moneyNumber == 0) {
RunningTextView.this.setText("0.00");
return;
}
content = moneyNumber;// 设置最后要显示的数字
nowNumber = 0.00;// 默认都是从0开始动画
thread_pool.execute(new Runnable() {
@Override
public void run() {
Message msg = handler.obtainMessage();
double temp = content / frames;
msg.obj = temp < 0.01 ? 0.01 : temp;// 如果每帧的间隔比1小,就设置为1
// Log.v("每帧跳跃的数量:", "" + msg.obj.toString());
handler.sendMessage(msg);// 发送通知改变UI
}
});
}
}
|
[
"1006584058@qq.com"
] |
1006584058@qq.com
|
3d449401d2be3ccb04e5a46dfaa338553ea004b5
|
26c627640de997cbbf5dc6268c1bbf6d2ca2d385
|
/stn-jigsaw/provider/src/com/cqx/acc/Accessible.java
|
71e5ef3c7e83ff807de6c35516ee36ff4a58db2f
|
[
"MIT"
] |
permissive
|
cqxxxxxxxx/somethingnew
|
80bdf421bad9d23a4c3f299bece6ef6334c25bad
|
2b7f7e13eda670c1698887f2d863535b773b892c
|
refs/heads/master
| 2023-04-28T23:40:20.226077
| 2022-09-25T11:55:17
| 2022-09-25T12:00:24
| 198,219,013
| 0
| 2
|
MIT
| 2023-04-17T17:35:12
| 2019-07-22T12:28:20
|
Java
|
UTF-8
|
Java
| false
| false
| 285
|
java
|
package com.cqx.acc;
import com.cqx.unacc.UnAccessible;
/**
* @desc:
* @version: 1.0.0
* @author: cqx
* @Date: 2019/1/16
*/
public class Accessible {
public String sayHi(String msg) {
System.out.println(new UnAccessible().pureMsg(msg));
return msg;
}
}
|
[
"82803852@qq.com"
] |
82803852@qq.com
|
990d2eabd1b420bd260591ac47af9802cbceb86a
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12584-2-4-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/XWikiHibernateStore_ESTest.java
|
8752e6ce39a5cf03d4afbf13f3c8c35159ae7b66
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 564
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Apr 01 14:55:47 UTC 2020
*/
package com.xpn.xwiki.store;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class XWikiHibernateStore_ESTest extends XWikiHibernateStore_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
0597753b2fa622000df7d7b784124914b2fac7c9
|
90868039ba3031eaeb47b75616573f3dc4bcd20a
|
/app/src/main/java/com/xinyuan/xyshop/mvp/contract/StoreGoodView.java
|
53c348eb6262eb4a16f24aa8a3a8a30b80cb4e58
|
[] |
no_license
|
xiasiqiu/XinYuan
|
5a6ddd67efff1a98c6920e587a23e085beec99ec
|
00f863b0eff7031c83cb18d4a0d074aefd8f80ff
|
refs/heads/master
| 2021-01-20T01:46:00.318949
| 2020-07-29T09:41:59
| 2020-07-29T09:41:59
| 89,322,724
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 266
|
java
|
package com.xinyuan.xyshop.mvp.contract;
import com.xinyuan.xyshop.bean.GoodListItemBean;
import java.util.List;
/**
* Created by fx on 2017/8/31.
*/
public interface StoreGoodView {
void showGoods(List<GoodListItemBean> list);
void showState(int state);
}
|
[
"491850673@qq.com"
] |
491850673@qq.com
|
31bd652f619a4076ac1b4dbb3ab5f8ebe8b49e38
|
73622c61f98d6955aa62855a9191ad47be2e5257
|
/aima-java/src/aima/AllDemos.java
|
420a290b547fcf01d8c3b6ba528bdafe7058c21f
|
[
"MIT"
] |
permissive
|
hello-sources/Course_Design_Project
|
8c05a437b9fad1dcad27bffb264c3e3acdb7fc27
|
96ed1bfbf9d0b9c2c5bbe7a97d300d7f75e40a49
|
refs/heads/master
| 2022-11-12T01:14:36.643098
| 2020-06-29T23:45:57
| 2020-06-29T23:45:57
| 272,621,331
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 407
|
java
|
package aima;
import aima.learning.demos.LearningDemo;
import aima.logic.demos.LogicDemo;
import aima.probability.demos.ProbabilityDemo;
import aima.search.demos.SearchDemo;
/**
* @author RaviMohan
*
*/
public class AllDemos {
public static void main(String[] args) {
SearchDemo.main(null);
LogicDemo.main(null);
ProbabilityDemo.main(null);
LearningDemo.main(null);
}
}
|
[
"3245849061@qq.com"
] |
3245849061@qq.com
|
eaf692c462f9879bdded273f7692bd52e168a293
|
2c16007de25b78fa7f010cf8d471606b1bb31b2e
|
/aspects/docs/examples/dbc15/test/dbc/office/OfficeManager.java
|
4f51f466626a1bc7a20eeb87f6b39abf93e67c3b
|
[] |
no_license
|
stalep/jboss-aop
|
24e1c64acb48540dca858fa3b093861b91f724eb
|
f9d6e15fc724f9e1c07a98aa301a52b4273a882f
|
refs/heads/master
| 2022-07-08T04:31:18.718343
| 2009-01-28T03:01:01
| 2009-01-28T03:01:01
| 116,122
| 3
| 2
| null | 2022-07-01T22:17:50
| 2009-01-27T22:31:04
|
Java
|
UTF-8
|
Java
| false
| false
| 3,046
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This 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 software 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 software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package test.dbc.office;
import java.util.ArrayList;
/**
*
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
* @version $Revision$
*/
@org.jboss.aspects.dbc.Dbc
@org.jboss.aspects.dbc.Invariant ({"$tgt.computers != null", "$tgt.developers != null", "forall test.dbc.office.Computer c in $tgt.computers | c != null", "forall d in $tgt.developers | d != null"})
public class OfficeManager
{
ArrayList computers = new ArrayList();
ArrayList developers = new ArrayList();
/**
* PostCond: The computer should be unassigned after adding
*/
@org.jboss.aspects.dbc.PostCond ({"exists test.dbc.office.Computer c in $tgt.computers | c.getDeveloper() == null && c == $rtn"})
public Computer createComputer(String name)
{
Computer computer = new Computer(name);
computers.add(computer);
return computer;
}
/**
* PostCond: The developer should not have a computer after adding
*/
@org.jboss.aspects.dbc.PostCond ({"exists test.dbc.office.Developer d in $tgt.developers | d.getComputer() == null && d == $rtn"})
public Developer createDeveloper(String name)
{
Developer developer = new Developer(name);
developers.add(developer);
return developer;
}
/**
* PreCond: The computer and developer must both be not-null, and not previously assigned
* PostCond: Make sure that all developers have a computer, and that that computer is
* associated with the developer in question
*/
@org.jboss.aspects.dbc.PreCond ({"$0 != null", "$1 != null", "exists test.dbc.office.Computer c in $tgt.computers | c.getDeveloper() == null && c == $0", "exists test.dbc.office.Developer d in $tgt.developers | d.getComputer() == null && d == $1"})
@org.jboss.aspects.dbc.PostCond ({"forall d in $tgt.developers | exists c in $tgt.computers | (c == d.getComputer() && d == c.getDeveloper())"})
public void assignComputer(Computer computer, Developer developer)
{
computer.setDeveloper(developer);
developer.setComputer(computer);
}
}
|
[
"kabir.khan@jboss.com@84be2c1e-ba19-0410-b317-a758671a6fc1"
] |
kabir.khan@jboss.com@84be2c1e-ba19-0410-b317-a758671a6fc1
|
8653b0c97f08562c4f4d97a3fe16717c5556f22f
|
a42ad717c6130ea79cb4ce2ae47dd9c189b15a0d
|
/studySpring/src/com/j/ch15/aop/UpdateMemberInfoTraceAdvice.java
|
e4e4e516e940e2c20612ecd4e46f772c8d4104b7
|
[] |
no_license
|
moving33/studyWeb
|
3d9ce99aa85f455c3525180f30aef37dc62039c7
|
5de1c487b89d58bc09cc4e2d447ee5af972fcad9
|
refs/heads/master
| 2020-03-09T17:52:31.434974
| 2018-05-08T09:45:00
| 2018-05-08T09:45:00
| 128,918,393
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 541
|
java
|
//정보수정 추적 결과 를 알려줄 녀석
package com.j.ch15.aop;
import com.j.ch15.member.service.UpdateInfo;
import org.aspectj.lang.JoinPoint;
public class UpdateMemberInfoTraceAdvice {
public void traceReturn(JoinPoint joinPoint, boolean result, String memberId, UpdateInfo info){
System.out.println("[UpdateMemberInfoTraceAdvice] 정보 수정 결과=" +
result+",대상회원= "+memberId+",수정정보 = "+info+",실행한 메서드 이름 :"+joinPoint.getSignature().toShortString());
}
}
|
[
"moving5254@gmail.com"
] |
moving5254@gmail.com
|
84fa81cc2b0d8a54c848a4b353ead2efa096d0f7
|
ca94247e577b1bd4e3c81380b379430eaa356093
|
/app/src/main/java/gxyclub/ui/activity/everyDayActivity/EveryDayActivity.java
|
c86620cb9091430e73856e60b42cc21623511531
|
[] |
no_license
|
zhudaihao/caipu
|
3a92c6a9cb6bcf103d3c07fd16819d3e9a5266e3
|
1b26b26df2d6febea6093aeb50bda34c3ecb90c7
|
refs/heads/master
| 2020-09-13T04:07:14.994410
| 2019-11-19T08:49:09
| 2019-11-19T08:49:09
| 222,650,430
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,888
|
java
|
package gxyclub.ui.activity.everyDayActivity;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import com.longsh.longshlibrary.PagerSlidingTabStrip;
import java.util.ArrayList;
import java.util.List;
import base.BaseActivity;
import butterknife.BindView;
import butterknife.Unbinder;
import cn.gxyclub.R;
import gxyclub.adapter.EveryDayAdapter;
import gxyclub.ui.fragment.everyFragment.BreakFastFragment;
import gxyclub.ui.fragment.everyFragment.DinnerFastFragment;
import gxyclub.ui.fragment.everyFragment.LunchFragment;
import gxyclub.ui.fragment.everyFragment.MidnightSnackFragment;
import gxyclub.ui.fragment.everyFragment.TeaFragment;
/**
* 每日三餐更多
*/
public class EveryDayActivity extends BaseActivity {
@BindView(R.id.tabs)
PagerSlidingTabStrip tabs;
@BindView(R.id.viewPager)
ViewPager viewPager;
Unbinder unbinder;
@Override
public int getResLayout() {
return R.layout.activity_everyday;
}
private List<Fragment> mList = new ArrayList<>();
//早餐
private BreakFastFragment breakFastFragment = new BreakFastFragment();
//午餐
private LunchFragment lunchFragment = new LunchFragment();
//晚餐
private DinnerFastFragment dinnerFastFragment = new DinnerFastFragment();
//下午茶
private TeaFragment teaFragment = new TeaFragment();
//宵夜
private MidnightSnackFragment midnightSnackFragment = new MidnightSnackFragment();
protected EveryDayAdapter everyDayAdapter;
public void initView() {
tv_base_title.setText("每日三餐");
mList.add(breakFastFragment);
mList.add(lunchFragment);
mList.add(dinnerFastFragment);
mList.add(teaFragment);
mList.add(midnightSnackFragment);
//注意fragment嵌套fragment用getChildFragmentManager()管理器
everyDayAdapter = new EveryDayAdapter(getSupportFragmentManager(), mList);
viewPager.setAdapter(everyDayAdapter);
//设置指示器(注意需要放在setAdapter后面)
tabs.setViewPager(viewPager);
//设置参数
setTabsValue();
}
//设置指示器
private void setTabsValue() {
DisplayMetrics dm = getResources().getDisplayMetrics();
// 设置Tab底部选中的指示器Indicator的高度
tabs.setIndicatorHeight(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1.0f, dm));
// 设置Tab底部选中的指示器 Indicator的颜色
tabs.setIndicatorColorResource(R.color.colorPrimaryDark);
//设置指示器Indicatorin是否跟文本一样宽,默认false
tabs.setIndicatorinFollowerTv(true);
//设置小红点提示,item从0开始计算,true为显示,false为隐藏,默认为全部隐藏
// tabs.setMsgToast(2, true);
//设置红点滑动到当前页面自动消失,默认为true
tabs.setMsgToastPager(true);
//设置Tab标题文字的颜色
tabs.setTextColorResource(R.color.color_7A);
// 设置Tab标题文字的大小
tabs.setTextSize((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 14, dm));
// 设置选中的Tab文字的颜色
tabs.setSelectedTextColorResource(R.color.colorPrimaryDark);
//设置Tab底部分割线的高度
tabs.setUnderlineHeight(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 0f, dm));
//设置Tab底部分割线的颜色
tabs.setUnderlineColorResource(R.color.colorPrimaryDark);
// 设置点击某个Tab时的背景色,设置为0时取消背景色tabs.setTabBackground(0);
// tabs.setTabBackground(R.drawable.bg_tab);
tabs.setTabBackground(0);
// 设置Tab是自动填充满屏幕的
tabs.setShouldExpand(true);
}
}
|
[
"zhudaihao@wswtz.com"
] |
zhudaihao@wswtz.com
|
d02a26fd9acdb69694954c1de92ebed529324ac8
|
bb6b14d1371af4aaa7fd98a30870466c8c34589a
|
/commons/src/main/java/com/github/commons/utils/SdCardUtil.java
|
247d456da0a738b5b08e57ec194981ed16849be1
|
[
"Apache-2.0"
] |
permissive
|
JackChan1999/GooglePlay
|
768bdcfd4a95c3a07f28de388557b2758a19ad2f
|
f050f5442e338278ed57bc380363820d2ef6b1fc
|
refs/heads/master
| 2021-06-16T16:55:47.102128
| 2017-04-17T14:17:37
| 2017-04-17T14:17:37
| 80,725,785
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,915
|
java
|
package com.github.commons.utils;
import android.annotation.TargetApi;
import android.os.Build;
import android.os.Environment;
import android.os.StatFs;
import com.github.commons.android.log.Log;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
/**
* Get SD card info.
*/
public class SdCardUtil {
private static final String TAG = SdCardUtil.class.getSimpleName();
/**
* is sd card available.
* @return true if available
*/
public boolean isSdCardAvailable() {
return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState());
}
/**
* Get {@link StatFs}.
*/
public static StatFs getStatFs(String path) {
return new StatFs(path);
}
/**
* Get phone data path.
*/
public static String getDataPath() {
return Environment.getDataDirectory().getPath();
}
/**
* Get SD card path.
*/
public static String getNormalSDCardPath() {
return Environment.getExternalStorageDirectory().getPath();
}
/**
* Get SD card path by CMD.
*/
public static String getSDCardPath() {
String cmd = "cat /proc/mounts";
String sdcard = null;
Runtime run = Runtime.getRuntime();// 返回与当前 Java 应用程序相关的运行时对象
BufferedReader bufferedReader = null;
try {
Process p = run.exec(cmd);// 启动另一个进程来执行命令
bufferedReader = new BufferedReader(new InputStreamReader(new BufferedInputStream(p.getInputStream())));
String lineStr;
while ((lineStr = bufferedReader.readLine()) != null) {
Log.i(TAG, "proc/mounts: " + lineStr);
if (lineStr.contains("sdcard")
&& lineStr.contains(".android_secure")) {
String[] strArray = lineStr.split(" ");
if (strArray.length >= 5) {
sdcard = strArray[1].replace("/.android_secure", "");
Log.i(TAG, "find sd card path: " + sdcard);
return sdcard;
}
}
if (p.waitFor() != 0 && p.exitValue() == 1) {
// p.exitValue()==0表示正常结束,1:非正常结束
Log.e(TAG, cmd + " 命令执行失败");
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (bufferedReader != null) {
bufferedReader.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
sdcard = Environment.getExternalStorageDirectory().getPath();
Log.i(TAG, "not find sd card path return default: " + sdcard);
return sdcard;
}
/**
* Get SD card path list.
*/
public static ArrayList<String> getSDCardPathEx() {
ArrayList<String> list = new ArrayList<String>();
try {
Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec("mount");
InputStream is = proc.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
String line;
BufferedReader br = new BufferedReader(isr);
while ((line = br.readLine()) != null) {
Log.i(TAG, "mount: " + line);
if (line.contains("secure")) {
continue;
}
if (line.contains("asec")) {
continue;
}
if (line.contains("fat")) {
String columns[] = line.split(" ");
if (columns.length > 1) {
list.add("*" + columns[1]);
}
} else if (line.contains("fuse")) {
String columns[] = line.split(" ");
if (columns.length > 1) {
list.add(columns[1]);
}
}
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return list;
}
/**
* Get available size of SD card.
*/
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
public static long getAvailableSize(String path) {
try {
File base = new File(path);
StatFs stat = new StatFs(base.getPath());
return stat.getBlockSizeLong() * stat.getAvailableBlocksLong();
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
/**
* Get SD card info detail.
*/
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
public static SDCardInfo getSDCardInfo() {
SDCardInfo sd = new SDCardInfo();
String state = Environment.getExternalStorageState();
if (Environment.MEDIA_MOUNTED.equals(state)) {
sd.isExist = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
File sdcardDir = Environment.getExternalStorageDirectory();
StatFs sf = new StatFs(sdcardDir.getPath());
sd.totalBlocks = sf.getBlockCountLong();
sd.blockByteSize = sf.getBlockSizeLong();
sd.availableBlocks = sf.getAvailableBlocksLong();
sd.availableBytes = sf.getAvailableBytes();
sd.freeBlocks = sf.getFreeBlocksLong();
sd.freeBytes = sf.getFreeBytes();
sd.totalBytes = sf.getTotalBytes();
}
}
if (Log.isPrint) {
Log.i(TAG, sd.toString());
}
return sd;
}
/**
* see more {@link StatFs}
*/
public static class SDCardInfo {
public boolean isExist;
public long totalBlocks;
public long freeBlocks;
public long availableBlocks;
public long blockByteSize;
public long totalBytes;
public long freeBytes;
public long availableBytes;
@Override
public String toString() {
return "SDCardInfo{" +
"isExist=" + isExist +
", totalBlocks=" + totalBlocks +
", freeBlocks=" + freeBlocks +
", availableBlocks=" + availableBlocks +
", blockByteSize=" + blockByteSize +
", totalBytes=" + totalBytes +
", freeBytes=" + freeBytes +
", availableBytes=" + availableBytes +
'}';
}
}
}
|
[
"jackychan2040@gmail.com"
] |
jackychan2040@gmail.com
|
4e6ea5e704edadb35daaa365311ea21889b49e61
|
6a2a5652672096896019afe5f4069353f920c3e0
|
/PureIoc/src/net/cassite/pure/ioc/handlers/type/TypeIsSingletonHandler.java
|
f0f27e338e4aab9e180c8731cc5d387b31323dfd
|
[
"MIT"
] |
permissive
|
wkgcass/common
|
cc4c0f2c03d641e2bbc117ad21ec270e342818a0
|
5813f552e87d8eea693fbc8f07494d0f7ce61b54
|
refs/heads/master
| 2021-03-12T23:48:14.589227
| 2015-10-29T12:08:41
| 2015-10-29T12:08:41
| 38,412,339
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,634
|
java
|
package net.cassite.pure.ioc.handlers.type;
import java.lang.annotation.Annotation;
import org.apache.log4j.Logger;
import net.cassite.pure.ioc.AnnotationHandlingException;
import net.cassite.pure.ioc.IOCController;
import net.cassite.pure.ioc.annotations.Singleton;
import net.cassite.pure.ioc.handlers.TypeAnnotationHandler;
import net.cassite.pure.ioc.handlers.TypeHandlerChain;
/**
* Handler for IsSingleton annotation. <br>
* the class would be considered as a singleton.
*
* @author wkgcass
*
* @see net.cassite.pure.ioc.annotations.Singleton
*
*/
public class TypeIsSingletonHandler extends IOCController implements TypeAnnotationHandler {
private static final Logger LOGGER = Logger.getLogger(TypeIsSingletonHandler.class);
@Override
public boolean canHandle(Annotation[] annotations) {
for (Annotation ann : annotations) {
if (ann.annotationType() == Singleton.class) {
return true;
}
}
return false;
}
@Override
public Object handle(Class<?> cls, TypeHandlerChain chain) throws AnnotationHandlingException {
LOGGER.debug("Entered TypeIsSingletonHandler with args: \n\tcls:\t" + cls + "\n\tchain:\t" + chain);
try {
return chain.next().handle(cls, chain);
} catch (AnnotationHandlingException e) {
LOGGER.debug("start handling with TypeIsSingletonHandler");
return getObject(cls);
}
}
}
|
[
"wkgcass@hotmail.com"
] |
wkgcass@hotmail.com
|
605c84d5c24311df60275269f8a1076a481f3c27
|
589479f111c710e5bbd398c4437b61fff98e5f41
|
/Maven/maven-in-action/chapter-10/account-parent/account-captcha/src/main/java/com/zjc/mvnbook/account/captcha/AccountCaptchaService.java
|
aeff8f5035017f595cf0cd23e2851989b3663c8e
|
[] |
no_license
|
Daniel49zhu/StudyNotes
|
cc4a4e13048222c5148645842179ebcc4b7bd9ed
|
6df5fb5e7e6634c42ea1dfa52043d91c9a10496b
|
refs/heads/master
| 2023-04-27T21:05:50.429825
| 2023-02-24T15:13:31
| 2023-02-24T15:13:31
| 168,356,932
| 0
| 1
| null | 2023-04-17T19:46:31
| 2019-01-30T14:32:03
|
Java
|
UTF-8
|
Java
| false
| false
| 488
|
java
|
package com.zjc.mvnbook.account.captcha;
import java.util.List;
public interface AccountCaptchaService
{
String generateCaptchaKey()
throws AccountCaptchaException;
byte[] generateCaptchaImage( String captchaKey )
throws AccountCaptchaException;
boolean validateCaptcha( String captchaKey, String captchaValue )
throws AccountCaptchaException;
List<String> getPreDefinedTexts();
void setPreDefinedTexts( List<String> preDefinedTexts );
}
|
[
"zhujiacheng94@163.com"
] |
zhujiacheng94@163.com
|
4f8b128a2b449fbe04573772028173c7387ebaca
|
de7b67d4f8aa124f09fc133be5295a0c18d80171
|
/workspace_activeMq/activemq-parent/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePageEntry.java
|
fe5816fa2ec582fa0a80f1bb6d3360e59aa69fe9
|
[
"Apache-2.0"
] |
permissive
|
lin-lee/eclipse_workspace_test
|
adce936e4ae8df97f7f28965a6728540d63224c7
|
37507f78bc942afb11490c49942cdfc6ef3dfef8
|
refs/heads/master
| 2021-05-09T10:02:55.854906
| 2018-01-31T07:19:02
| 2018-01-31T07:19:02
| 119,460,523
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,338
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.activemq.kaha.impl.index.tree;
/**
* A conglomarate used for return results from a tree lookup
*
*
*/
class TreePageEntry {
private TreeEntry treeEntry;
private TreePage treePage;
private TreePage.Flavour flavour;
private int index = -1;
TreePageEntry(TreeEntry treeEntry, TreePage treePage, TreePage.Flavour flavour, int index) {
this.treeEntry = treeEntry;
this.treePage = treePage;
this.flavour = flavour;
this.index = index;
}
/**
* @return the flavour
*/
TreePage.Flavour getFlavour() {
return this.flavour;
}
/**
* @param flavour the flavour to set
*/
void setFlavour(TreePage.Flavour flavour) {
this.flavour = flavour;
}
/**
* @return the treePage
*/
TreePage getTreePage() {
return this.treePage;
}
/**
* @param treePage the treePage to set
*/
void setTreePage(TreePage treePage) {
this.treePage = treePage;
}
/**
* @return the index
*/
public int getIndex() {
return this.index;
}
/**
* @param index the index to set
*/
public void setIndex(int index) {
this.index = index;
}
/**
* @return the treeEntry
*/
public TreeEntry getTreeEntry() {
return this.treeEntry;
}
/**
* @param treeEntry the treeEntry to set
*/
public void setTreeEntry(TreeEntry treeEntry) {
this.treeEntry = treeEntry;
}
}
|
[
"lilin@lvmama.com"
] |
lilin@lvmama.com
|
d0e5d60a57c7e199c8605fe9a89908f8fb409333
|
4e72deae64847042ec9c0c6653280a813b99d190
|
/oneview-sdk-java-lib/src/main/java/com/hp/ov/sdk/dto/generated/FcoeSettings.java
|
e0d8d846be2e46c6cf8e3fd0c08f91dec7b074cb
|
[
"Apache-2.0"
] |
permissive
|
turbonomic/oneview-sdk-java
|
05d848c2e8d8bac48b7addd96ab7465712df1360
|
1f08bdb02568a387af7410b4344ef5f2fc0030c5
|
refs/heads/master
| 2020-04-02T01:54:12.669131
| 2016-08-25T18:05:25
| 2016-08-25T18:05:25
| 64,190,438
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,129
|
java
|
/*******************************************************************************
* (C) Copyright 2016 Hewlett Packard Enterprise Development LP
*
* 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.hp.ov.sdk.dto.generated;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
public class FcoeSettings implements Serializable{
private static final long serialVersionUID = 1L;
private FcoeSettings.FcoeMode fcoeMode;
/**
*
* @return
* The fcoeMode
*/
public FcoeSettings.FcoeMode getFcoeMode() {
return fcoeMode;
}
/**
*
* @param fcoeMode
* The fcoeMode
*/
public void setFcoeMode(FcoeSettings.FcoeMode fcoeMode) {
this.fcoeMode = fcoeMode;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@Override
public int hashCode() {
return new HashCodeBuilder()
.append(fcoeMode)
.toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof FcoeSettings) == false) {
return false;
}
FcoeSettings rhs = ((FcoeSettings) other);
return new EqualsBuilder()
.append(fcoeMode, rhs.fcoeMode)
.isEquals();
}
public static enum FcoeMode {
TRANSIT("Transit"),
FCF_NPV("FcfNpv"),
UNKNOWN("Unknown"),
NOT_APPLICABLE("NotApplicable");
private final String value;
private final static Map<String, FcoeSettings.FcoeMode> CONSTANTS = new HashMap<String, FcoeSettings.FcoeMode>();
static {
for (FcoeSettings.FcoeMode c: values()) {
CONSTANTS.put(c.value, c);
}
}
private FcoeMode(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
public static FcoeSettings.FcoeMode fromValue(String value) {
FcoeSettings.FcoeMode constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}
|
[
"luiz.her.svoboda@hpe.com"
] |
luiz.her.svoboda@hpe.com
|
76809804e8d8a52e220fc36322d1b2cfc753da2b
|
74a53525e0cdad6b2f2f30ed6eb5ad56842b5292
|
/app/src/main/java/Classes/EmbeddedArt_context_rect.java
|
21bc42dd7bfb0bbad01f0fff46a0d51699a88203
|
[] |
no_license
|
Leoxinghai/Citiville
|
28ed8b29323ebe124b581f6fa73dea491abbe01f
|
e788cef3c52d5ff8bbd38155573533c7c06c4475
|
refs/heads/master
| 2021-01-18T17:27:02.763391
| 2017-03-31T09:19:12
| 2017-03-31T09:19:12
| 86,801,515
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,041
|
java
|
package Classes;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.Display;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.Window;
import android.view.WindowManager;
import android.graphics.*;
import com.xiyu.util.Array;
import com.xiyu.util.Dictionary;
import mx.core.*;
public class EmbeddedArt_context_rect extends SpriteAsset
{
public EmbeddedArt_context_rect ()
{
return;
}//end
}
|
[
"leoxinghai@hotmail.com"
] |
leoxinghai@hotmail.com
|
860a379f12c43485eb6cfa27c312e1223220ef58
|
f890bd6082783d8332755b387963917309d71510
|
/AspectjAOP6-Annotaitons-AroundAdice/src/main/java/com/nt/aspect/PerformanceMonitoringAdvice.java
|
e03bf146e73ef68dfc7b0bd8d5449de3664e6982
|
[] |
no_license
|
aakulasaikiran/Spring_Ntsp67
|
37fb5d9cc29cd0b253683928efb2206fb1ee12a9
|
78acc73de465e795d938a01992b1c9e7c06230f3
|
refs/heads/master
| 2020-03-23T15:23:34.906838
| 2018-07-20T18:29:17
| 2018-07-20T18:29:17
| 141,744,739
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 818
|
java
|
package com.nt.aspect;
import java.util.Arrays;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@Aspect
@Component("pmAdvice")
@Order(3)
public class PerformanceMonitoringAdvice {
private long start, end;
@Around("execution(* com.nt.service.IntrAmountCalculator.*(..))")
public Object monitor(ProceedingJoinPoint pjp) throws Throwable {
Object retVal = null;
start = System.currentTimeMillis();
retVal = pjp.proceed();
end = System.currentTimeMillis();
System.out.println(" Method "+pjp.getSignature()+"with args"+Arrays.toString(pjp.getArgs())+" has taken "+(end-start)+" ms");
return retVal;
}// monitor
}// class
|
[
"aakulasaikiran@gmail.com"
] |
aakulasaikiran@gmail.com
|
9f459b90bfa8b24fa7cae5880c3443ab32253f0a
|
33630bb72572f2e5cfaf5529faf178dedaa2aa0b
|
/server/src/main/java/jp/chang/myclinic/server/rest/ConductDrugController.java
|
60e8cab17240f57750e4c3ca7fa93e29758397b7
|
[
"MIT"
] |
permissive
|
hangilc/myclinic-spring
|
917472333853e3a2848cfb60ca5ade05098b700f
|
69ac47ca1ae4383a423a8e097df3caea52ffcb41
|
refs/heads/master
| 2022-12-21T23:43:35.317076
| 2022-06-27T23:09:31
| 2022-06-27T23:09:31
| 135,880,487
| 0
| 0
|
MIT
| 2022-12-14T20:36:52
| 2018-06-03T06:43:15
|
Java
|
UTF-8
|
Java
| false
| false
| 1,200
|
java
|
package jp.chang.myclinic.server.rest;
import jp.chang.myclinic.dto.ConductDrugDTO;
import jp.chang.myclinic.dto.ConductDrugFullDTO;
import jp.chang.myclinic.server.db.myclinic.DbGateway;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/json")
@Transactional
class ConductDrugController {
@Autowired
private DbGateway dbGateway;
@RequestMapping(value="/enter-conduct-drug", method= RequestMethod.POST)
public int enterConductDrug(@RequestBody ConductDrugDTO drug){
return dbGateway.enterConductDrug(drug);
}
@RequestMapping(value="/delete-conduct-drug", method=RequestMethod.POST)
public boolean deleteConductDrug(@RequestParam("conduct-drug-id") int conductDrugId){
dbGateway.deleteConductDrug(conductDrugId);
return true;
}
@RequestMapping(value="/get-conduct-drug-full", method=RequestMethod.GET)
public ConductDrugFullDTO getConductDrugFull(@RequestParam("conduct-drug-id") int conductDrugId){
return dbGateway.getConductDrugFull(conductDrugId);
}
}
|
[
"hangil@chang.jp"
] |
hangil@chang.jp
|
a5d4b86ec6914d305f95881c935bc5fc6e558aa2
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE190_Integer_Overflow/s05/CWE190_Integer_Overflow__short_rand_multiply_51a.java
|
a222f5abbb1a18638963fc4ba2cd79229990bfe1
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,590
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__short_rand_multiply_51a.java
Label Definition File: CWE190_Integer_Overflow.label.xml
Template File: sources-sinks-51a.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: rand Set data to result of rand()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: multiply
* GoodSink: Ensure there will not be an overflow before multiplying data by 2
* BadSink : If data is positive, multiply by 2, which can cause an overflow
* Flow Variant: 51 Data flow: data passed as an argument from one function to another in different classes in the same package
*
* */
package testcases.CWE190_Integer_Overflow.s05;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE190_Integer_Overflow__short_rand_multiply_51a extends AbstractTestCase
{
public void bad() throws Throwable
{
short data;
/* POTENTIAL FLAW: Use a random value */
data = (short)((new java.security.SecureRandom()).nextInt(1+Short.MAX_VALUE-Short.MIN_VALUE)+Short.MIN_VALUE);
(new CWE190_Integer_Overflow__short_rand_multiply_51b()).badSink(data );
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
short data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
(new CWE190_Integer_Overflow__short_rand_multiply_51b()).goodG2BSink(data );
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
short data;
/* POTENTIAL FLAW: Use a random value */
data = (short)((new java.security.SecureRandom()).nextInt(1+Short.MAX_VALUE-Short.MIN_VALUE)+Short.MIN_VALUE);
(new CWE190_Integer_Overflow__short_rand_multiply_51b()).goodB2GSink(data );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
332bacd7939c89463c35549f8cb36272049b5976
|
5b2c309c903625b14991568c442eb3a889762c71
|
/classes/org/apache/http/auth/params/AuthPNames.java
|
142fc2bc40309c0b4525616acfe7df97e62132c9
|
[] |
no_license
|
iidioter/xueqiu
|
c71eb4bcc53480770b9abe20c180da693b2d7946
|
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
|
refs/heads/master
| 2020-12-14T23:55:07.246659
| 2016-10-08T08:56:27
| 2016-10-08T08:56:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 510
|
java
|
package org.apache.http.auth.params;
@Deprecated
public abstract interface AuthPNames
{
public static final String CREDENTIAL_CHARSET = "http.auth.credential-charset";
public static final String PROXY_AUTH_PREF = "http.auth.proxy-scheme-pref";
public static final String TARGET_AUTH_PREF = "http.auth.target-scheme-pref";
}
/* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\org\apache\http\auth\params\AuthPNames.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
680100e608c73d784d4451a7505f13ab8cce3580
|
002701110d96cc36cc32bc356657457b0168630b
|
/smack-resolver-minidns/src/main/java/org/jivesoftware/smack/util/dns/minidns/MiniDnsResolver.java
|
2a18ad6e7ca2c4758fdcf0d9b68d103cbdfab167
|
[] |
no_license
|
Devlad91/Smack
|
05f8818c053c88da0a0d67f3ad6cb726991ea5e4
|
888de7e1c1d3e01c06120121d6c15743cb86625c
|
refs/heads/master
| 2021-01-22T13:53:00.099516
| 2014-10-16T11:02:06
| 2014-10-16T11:02:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,187
|
java
|
/**
*
* Copyright 2014 Florian Schmaus
*
* 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.jivesoftware.smack.util.dns.minidns;
import java.util.LinkedList;
import java.util.List;
import org.jivesoftware.smack.initializer.SmackAndOsgiInitializer;
import org.jivesoftware.smack.util.DNSUtil;
import org.jivesoftware.smack.util.dns.DNSResolver;
import org.jivesoftware.smack.util.dns.SRVRecord;
import org.jxmpp.util.cache.ExpirationCache;
import de.measite.minidns.Client;
import de.measite.minidns.DNSCache;
import de.measite.minidns.DNSMessage;
import de.measite.minidns.Question;
import de.measite.minidns.Record;
import de.measite.minidns.Record.CLASS;
import de.measite.minidns.Record.TYPE;
import de.measite.minidns.record.SRV;
/**
* This implementation uses the <a href="https://github.com/rtreffer/minidns/">minidns</a> implementation for
* resolving DNS addresses.
*/
public class MiniDnsResolver extends SmackAndOsgiInitializer implements DNSResolver {
private static final long ONE_DAY = 24*60*60*1000;
private static final MiniDnsResolver instance = new MiniDnsResolver();
private static final ExpirationCache<Question, DNSMessage> cache = new ExpirationCache<Question, DNSMessage>(10, ONE_DAY);
private final Client client;
public MiniDnsResolver() {
client = new Client(new DNSCache() {
@Override
public DNSMessage get(Question question) {
return cache.get(question);
}
@Override
public void put(Question question, DNSMessage message) {
long expirationTime = ONE_DAY;
for (Record record : message.getAnswers()) {
if (record.isAnswer(question)) {
expirationTime = record.getTtl();
break;
}
}
cache.put(question, message, expirationTime);
}
});
}
public static DNSResolver getInstance() {
return instance;
}
@Override
public List<SRVRecord> lookupSRVRecords(String name) {
List<SRVRecord> res = new LinkedList<SRVRecord>();
DNSMessage message = client.query(name, TYPE.SRV, CLASS.IN);
for (Record record : message.getAnswers()) {
SRV srv = (SRV) record.getPayload();
res.add(new SRVRecord(srv.getName(), srv.getPort(), srv.getPriority(), srv.getWeight()));
}
return res;
}
public static void setup() {
DNSUtil.setDNSResolver(getInstance());
}
@Override
public List<Exception> initialize() {
setup();
return null;
}
}
|
[
"flo@geekplace.eu"
] |
flo@geekplace.eu
|
80bed50ef27d835c74dd47afc127fbb05f4166d4
|
003acda90c23c1ef6f74e3cecbc9568b08a439b7
|
/se321/se321-pz-nikola_tasic_3698/src/main/java/com/example/backend/controller/RoleController.java
|
cdca11cfea4c552d093eaaa03e9e02b09a91e3a2
|
[] |
no_license
|
7aske/uni
|
cf2ab0d2c4a174cd7857722d8cd688810e52a112
|
f82efe2ff6056f2df51360ebb93198b7ddd62c4c
|
refs/heads/master
| 2023-03-15T10:46:53.202580
| 2022-11-17T10:55:13
| 2022-11-17T10:55:13
| 152,237,750
| 6
| 10
| null | 2023-03-06T09:27:13
| 2018-10-09T11:14:41
|
Java
|
UTF-8
|
Java
| false
| false
| 1,512
|
java
|
package com.example.backend.controller;
import com.example.backend.entity.Role;
import com.example.backend.entity.User;
import com.example.backend.service.RoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/roles")
@RequiredArgsConstructor
public class RoleController {
private final RoleService roleService;
@GetMapping
public ResponseEntity<List<Role>> getAll() {
return ResponseEntity.ok(roleService.findAll());
}
@GetMapping("/{roleId}")
public ResponseEntity<Role> getById(@PathVariable Integer roleId) {
return ResponseEntity.ok(roleService.findById(roleId));
}
@PostMapping
public ResponseEntity<Role> save(@RequestBody Role role) {
return ResponseEntity.ok(roleService.save(role));
}
@PutMapping
public ResponseEntity<Role> update(@RequestBody Role role) {
return ResponseEntity.ok(roleService.update(role));
}
@PutMapping("/{roleId}")
public ResponseEntity<Role> updateById(@RequestBody Role role, @PathVariable Integer roleId) {
role.setId(roleId);
return ResponseEntity.ok(roleService.update(role));
}
@DeleteMapping("/{roleId}")
public void deleteById(@PathVariable Integer roleId) {
roleService.deleteById(roleId);
}
@GetMapping("/{roleId}/users")
public ResponseEntity<List<User>> getAllUsers(@PathVariable Integer roleId) {
return ResponseEntity.ok(roleService.findAllUsersById(roleId));
}
}
|
[
"ntasic7@gmail.com"
] |
ntasic7@gmail.com
|
0f079a67d97e18e86ff0ce621b2ac6822ce7ebbf
|
5cefafafa516d374fd600caa54956a1de7e4ce7d
|
/oasis/web/ePolicy/PM/src/dti/pm/core/securitymgr/impl/SecurityManagerImpl.java
|
689900ed6667264063ee525215ec76f05cac2cd7
|
[] |
no_license
|
TrellixVulnTeam/demo_L223
|
18c641c1d842c5c6a47e949595b5f507daa4aa55
|
87c9ece01ebdd918343ff0c119e9c462ad069a81
|
refs/heads/master
| 2023-03-16T00:32:08.023444
| 2019-04-08T15:46:48
| 2019-04-08T15:46:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,921
|
java
|
package dti.pm.core.securitymgr.impl;
import dti.oasis.app.ConfigurationException;
import dti.pm.core.securitymgr.SecurityManager;
import dti.pm.core.securitymgr.dao.DataSecurityDAO;
/**
* This class implements the SecurityManager to provide implementation of security features handled in the application.
*
* <p>(C) 2003 Delphi Technology, inc. (dti)</p>
* Date: Dec 12, 2006
*
* @author mlmanickam
*/
/*
*
* Revision Date Revised By Description
* ---------------------------------------------------
*
* ---------------------------------------------------
*/
public class SecurityManagerImpl implements SecurityManager {
/**
* Returns a boolean that indicates whether the data is secured for the provided parameters.
* The securityPattern is used to define 1 or more code=value combinations of the format:
* ^code1^code1value^code2^code2value^codeN^codeNvalue^
*
* @param subSystem sub-system code
* @param securityType security type code
* @param securityPattern a security pattern string in the format: ^code^codevalue^
* @return boolean true, if the data is secured; otherwise false.
*/
public boolean isDataSecured(String subSystem, String securityType, String securityPattern) {
return isDataSecured(subSystem, securityType, securityPattern, "0");
}
/**
* Returns a boolean that indicates whether the data is secured for the provided parameters.
*
* @param subSystem sub-system code
* @param securityType security type code
* @param sourceTable source table for the sub-system
* @param sourceId source id for the source table.
* @return boolean true, if the data is secured; otherwise false.
*/
public boolean isDataSecured(String subSystem, String securityType, String sourceTable, String sourceId) {
boolean isSecured=false;
String returnValue = getDataSecurityDAO().getUserSecurity(subSystem, securityType, sourceTable, sourceId);
if (returnValue != "") {
isSecured = !("READWRITE".equalsIgnoreCase(returnValue) || "RW".equalsIgnoreCase(returnValue));
}
return isSecured;
}
//-------------------------------------------------
// Configuration constructor and accessor methods
//-------------------------------------------------
public void verifyConfig() {
if (getDataSecurityDAO() == null)
throw new ConfigurationException("The required property 'dataSecurityDAO' is missing.");
}
public SecurityManagerImpl() {
}
public DataSecurityDAO getDataSecurityDAO() {
return m_dataSecurityDao;
}
public void setDataSecurityDAO(DataSecurityDAO securityManager) {
this.m_dataSecurityDao = securityManager;
}
private DataSecurityDAO m_dataSecurityDao;
}
|
[
"athidevwork@gmail.com"
] |
athidevwork@gmail.com
|
e072a654e6ceceb3711f499929d506bfe95c81ef
|
6cff23733e6dd7a546b570bad530ee44a518f732
|
/sample/src/main/java/fake/package_7/Foo22.java
|
ea4d8c8c7894f2e494a36be24027f4b880162f73
|
[
"Apache-2.0"
] |
permissive
|
hacktons/dexing
|
940248a0501255cc2939eecef63b57735f811b06
|
e774aaa3a562514bb59634c932aa85a1578a5182
|
refs/heads/master
| 2020-09-05T05:12:52.749052
| 2020-04-07T07:08:42
| 2020-04-07T07:08:42
| 219,990,044
| 5
| 0
|
Apache-2.0
| 2020-04-07T07:08:43
| 2019-11-06T12:19:38
|
Java
|
UTF-8
|
Java
| false
| false
| 1,638
|
java
|
package fake.package_7;
public class Foo22 {
public void foo0(){
new Foo21().foo49();
}
public void foo1(){
foo0();
}
public void foo2(){
foo1();
}
public void foo3(){
foo2();
}
public void foo4(){
foo3();
}
public void foo5(){
foo4();
}
public void foo6(){
foo5();
}
public void foo7(){
foo6();
}
public void foo8(){
foo7();
}
public void foo9(){
foo8();
}
public void foo10(){
foo9();
}
public void foo11(){
foo10();
}
public void foo12(){
foo11();
}
public void foo13(){
foo12();
}
public void foo14(){
foo13();
}
public void foo15(){
foo14();
}
public void foo16(){
foo15();
}
public void foo17(){
foo16();
}
public void foo18(){
foo17();
}
public void foo19(){
foo18();
}
public void foo20(){
foo19();
}
public void foo21(){
foo20();
}
public void foo22(){
foo21();
}
public void foo23(){
foo22();
}
public void foo24(){
foo23();
}
public void foo25(){
foo24();
}
public void foo26(){
foo25();
}
public void foo27(){
foo26();
}
public void foo28(){
foo27();
}
public void foo29(){
foo28();
}
public void foo30(){
foo29();
}
public void foo31(){
foo30();
}
public void foo32(){
foo31();
}
public void foo33(){
foo32();
}
public void foo34(){
foo33();
}
public void foo35(){
foo34();
}
public void foo36(){
foo35();
}
public void foo37(){
foo36();
}
public void foo38(){
foo37();
}
public void foo39(){
foo38();
}
public void foo40(){
foo39();
}
public void foo41(){
foo40();
}
public void foo42(){
foo41();
}
public void foo43(){
foo42();
}
public void foo44(){
foo43();
}
public void foo45(){
foo44();
}
public void foo46(){
foo45();
}
public void foo47(){
foo46();
}
public void foo48(){
foo47();
}
public void foo49(){
foo48();
}
}
|
[
"chaobinwu89@gmail.com"
] |
chaobinwu89@gmail.com
|
c3ee688a0d660df07c23a19b5433fd4974258b87
|
d6ee393f6e3728a5cdc8dc5cbf3cb09edffcbf25
|
/.svn/pristine/02/02f1bb904b000e80fccbb07e043af703e55ed93e.svn-base
|
2b1fc7e1a119106659b0d5d6babe6d393a24d9eb
|
[] |
no_license
|
wuzhining/mesParent
|
f4cfd11828586d738e8123c6d4b675a77d465333
|
d806586103327d48f26ce2725e0e201292793f94
|
refs/heads/master
| 2022-12-21T00:07:07.116066
| 2019-10-04T05:35:10
| 2019-10-04T05:35:10
| 212,742,010
| 3
| 0
| null | 2022-12-16T09:57:13
| 2019-10-04T05:25:37
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,524
|
package com.techsoft.dao.equip;
import javax.annotation.Resource;
import org.springframework.stereotype.Repository;
import com.techsoft.common.BaseDaoImpl;
import com.techsoft.common.BaseMapper;
import com.techsoft.common.BusinessException;
import com.techsoft.common.SQLException;
import com.techsoft.mapper.sys.MycatSequenceMapper;
import com.techsoft.entity.common.EquipSpecsFixtureArea;
import com.techsoft.mapper.equip.EquipSpecsFixtureAreaMapper;
@Repository
public class EquipSpecsFixtureAreaDaoImpl extends BaseDaoImpl<EquipSpecsFixtureArea> implements EquipSpecsFixtureAreaDao {
@Resource
protected EquipSpecsFixtureAreaMapper equipSpecsFixtureAreaMapper;
@Resource
protected MycatSequenceMapper mycatSequenceMapper;
@Override
public Class<EquipSpecsFixtureArea> getEntityClass() {
return EquipSpecsFixtureArea.class;
}
@Override
public BaseMapper<EquipSpecsFixtureArea> getBaseMapper() {
return this.equipSpecsFixtureAreaMapper;
}
@Override
@SuppressWarnings({ "rawtypes" })
public BaseMapper getSeqMapper() {
return mycatSequenceMapper;
}
@Override
public String getTableName() {
return "EQUIP_SPECS_FIXTURE_AREA";
}
@Override
public void insertSaveCheck(EquipSpecsFixtureArea value) throws BusinessException, SQLException {
}
@Override
public void updateSaveCheck(EquipSpecsFixtureArea value) throws BusinessException, SQLException {
}
@Override
public void deleteSaveCheck(EquipSpecsFixtureArea value) throws BusinessException, SQLException {
}
}
|
[
"wzn354753575@sina.cn"
] |
wzn354753575@sina.cn
|
|
705db2924a2f0ab97c8b8d5b205c78e17eea9fcb
|
50c6e9156ecc733484aedff4b3608bc7ce31f55d
|
/app/src/main/java/com/lee/x/activity/SocketRunnable.java
|
6df6df592674ea569c4d7b15a556d5b14a633228
|
[] |
no_license
|
lixinxinlove/X
|
59e08b67d011600b16195f225efc165e5357860f
|
f638eb19b122710ffa738dbc8bc96810ed73d37b
|
refs/heads/master
| 2021-01-19T21:08:31.630372
| 2017-05-05T10:41:40
| 2017-05-05T10:41:40
| 88,611,686
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,112
|
java
|
package com.lee.x.activity;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Socket;
/**
* Created by android on 2017/4/26.
*/
public class SocketRunnable implements Runnable {
private Socket socket;
InputStream is;
OutputStream os;
public SocketRunnable() {
try {
socket = new Socket();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void run() {
try {
socket.connect(new InetSocketAddress("192.168.1.120", 10000), 1000 * 20);
is = socket.getInputStream();
os = socket.getOutputStream();
os.write(11);
os.write(11);
os.write(11);
os.write(11);
os.flush();
} catch (IOException e) {
e.printStackTrace();
}
}
public void w() {
byte b = 0x11;
try {
os.write(b);
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
[
"895330766@qq.com"
] |
895330766@qq.com
|
abe7d84481ae1afc71da6768c6baf7b59a6bff5d
|
0ec24deb783f0e2962bc6f0878477dac491043fc
|
/src/replitProjects/R157_Methods12_TimeConversion.java
|
7e98cabb2bb46d5d2ab15c29f6b7f1c26213cbfb
|
[] |
no_license
|
blackpars4x4/Self_Project2020_Basics
|
add637b1ba73c3a7b71a852db0d8fd94ade8520f
|
9ce0c52bcaba805e849c1ae22f466a56bd9afc6a
|
refs/heads/master
| 2023-02-14T20:27:07.584398
| 2021-01-13T15:43:15
| 2021-01-13T15:43:15
| 305,784,311
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,065
|
java
|
package replitProjects;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
public class R157_Methods12_TimeConversion {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
timeConversion(scan.nextLine());
}
public static void timeConversion(String s) {
/*
* Write your code here.
*/
String[] hours = s.split(":");
if(hours[2].substring(2).equalsIgnoreCase("AM")){
s = s.replaceFirst("AM", "");
System.out.println(s);
}else if(hours[2].substring(2).equalsIgnoreCase("PM")){
int h2 = Integer.parseInt(s.substring(0, s.indexOf(":")));
int h = h2 + 12;
if(h2>=10){
if(h<24){
s=s.replaceFirst(s.substring(0,2),"");
s=s.replaceFirst("PM","");
System.out.println(h+s);
}else{
h=0;
s=s.replaceFirst(s.substring(0,2),"");
s=s.replaceFirst("PM","");
System.out.println("00"+s);
}
}else {
if (s.startsWith("0")){
s = s.replaceFirst(s.substring(0, 2), "");
s = s.replaceFirst("PM", "");
System.out.println(h + s);
}else {
s = s.replaceFirst(s.substring(0, 1), "");
s = s.replaceFirst("PM", "");
System.out.println(h + s);
}
}
}
}
}
/*
Given a time in 12-hour AM/PM format, convert it to military (24-hour) time.
Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock.
Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock.
Function Description
It should print a new string representing the input time in 24 hour format.
timeConversion has the following parameter(s):
s: a string representing time in 12 hour format
Input: 07:05:45PM
Output: 19:05:45
*/
|
[
"55367496+blackpars4x4@users.noreply.github.com"
] |
55367496+blackpars4x4@users.noreply.github.com
|
121c61db4c5633b2cf1c3f601f0a2703d09e53f5
|
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
|
/src_fernflower/com/google/common/base/Functions$PredicateFunction.java
|
e63908460e6d36acf11b177a61e1cf85a3b0b2a0
|
[] |
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,384
|
java
|
package com.google.common.base;
import com.google.common.base.Function;
import com.google.common.base.Functions$1;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import java.io.Serializable;
import javax.annotation.Nullable;
class Functions$PredicateFunction implements Function, Serializable {
private final Predicate predicate;
private static final long serialVersionUID = 0L;
private Functions$PredicateFunction(Predicate var1) {
this.predicate = (Predicate)Preconditions.checkNotNull(var1);
}
public Boolean apply(@Nullable Object var1) {
return Boolean.valueOf(this.predicate.apply(var1));
}
public boolean equals(@Nullable Object var1) {
if(var1 instanceof Functions$PredicateFunction) {
Functions$PredicateFunction var2 = (Functions$PredicateFunction)var1;
return this.predicate.equals(var2.predicate);
} else {
return false;
}
}
public int hashCode() {
return this.predicate.hashCode();
}
public String toString() {
String var1 = String.valueOf(this.predicate);
return (new StringBuilder(24 + String.valueOf(var1).length())).append("Functions.forPredicate(").append(var1).append(")").toString();
}
// $FF: synthetic method
Functions$PredicateFunction(Predicate var1, Functions$1 var2) {
this(var1);
}
}
|
[
"manouchehri@riseup.net"
] |
manouchehri@riseup.net
|
dca1e24cb6b33504d6c4003bbfcafe947939570e
|
2cc8104d1eb6979e9aeb5ed1d0487f3cc7efcf30
|
/src/test/java/com/microsoft/graph/functional/CustomRequestTests.java
|
b9912315af6fac71fc9a57551d09e1bb33e80fef
|
[
"MIT"
] |
permissive
|
jnavalon/msgraph-sdk-java
|
d0609bdacb24dde7ae850452a6e7d8ed498b006a
|
f53187932cdb9f269527d01deeb5f5e0c843e09e
|
refs/heads/master
| 2020-04-15T17:59:36.972175
| 2018-11-14T11:25:22
| 2018-11-14T11:25:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,004
|
java
|
package com.microsoft.graph.functional;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import com.google.gson.JsonObject;
import com.microsoft.graph.models.extensions.User;
/**
* Tests for sending custom requests using the SDK
*/
@Ignore
public class CustomRequestTests {
private TestBase testBase;
@Before
public void setUp() {
testBase = new TestBase();
}
/**
* Test GET with a custom request for both serialized and JSON content
*/
@Test
public void testCustomGet() {
User meOriginal = testBase.graphClient.me().buildRequest().get();
User meGraphService = testBase.graphClient
.customRequest("/me", User.class)
.buildRequest()
.get();
JsonObject meJson = testBase.graphClient
.customRequest("/me")
.buildRequest()
.get();
assertEquals(meGraphService.displayName, meOriginal.displayName);
assertEquals(meJson.get("displayName").getAsString(), meOriginal.displayName);
}
}
|
[
"caitbal@microsoft.com"
] |
caitbal@microsoft.com
|
c859481813dbe864d119d7571dcfdb8307d28914
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Log4j/Log4j3007.java
|
c36db79e00eee1c23dda75c165ab2e6a0b37a143
|
[] |
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
| 697
|
java
|
private boolean isEnabledFor(final Level level, final Marker marker) {
final org.slf4j.Marker slf4jMarker = getMarker(marker);
switch (level.getStandardLevel()) {
case DEBUG :
return logger.isDebugEnabled(slf4jMarker);
case TRACE :
return logger.isTraceEnabled(slf4jMarker);
case INFO :
return logger.isInfoEnabled(slf4jMarker);
case WARN :
return logger.isWarnEnabled(slf4jMarker);
case ERROR :
return logger.isErrorEnabled(slf4jMarker);
default :
return logger.isErrorEnabled(slf4jMarker);
}
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
cf434d56a69692352bf4c0a99da6af5a36a84d12
|
4e3c5dc1cfd033b0e7c1bea625f9ee64ae12871a
|
/com/google/android/gms/wearable/ChannelIOException.java
|
a1b13937271fc3f10c916a90b15be91157899e5e
|
[] |
no_license
|
haphan2014/idle_heroes
|
ced0f6301b7a618e470ebfa722bef3d4becdb6ba
|
5bcc66f8e26bf9273a2a8da2913c27a133b7d60a
|
refs/heads/master
| 2021-01-20T05:01:54.157508
| 2017-08-25T14:06:51
| 2017-08-25T14:06:51
| 101,409,563
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 529
|
java
|
package com.google.android.gms.wearable;
import java.io.IOException;
public class ChannelIOException extends IOException {
private final int zzaSO;
private final int zzaSP;
public ChannelIOException(String message, int closeReason, int appSpecificErrorCode) {
super(message);
this.zzaSO = closeReason;
this.zzaSP = appSpecificErrorCode;
}
public int getAppSpecificErrorCode() {
return this.zzaSP;
}
public int getCloseReason() {
return this.zzaSO;
}
}
|
[
"hien.bui@vietis.com.vn"
] |
hien.bui@vietis.com.vn
|
09031c7e03d42fc6d5fae989edfba1ebb2cf6300
|
0f1a73dc0329cead4fa60981c1c1eb141d758a5d
|
/kfs-parent/core/src/main/java/org/kuali/kfs/module/bc/document/service/BenefitsCalculationService.java
|
8dfe03372accc37684c8a62026558813166979ca
|
[] |
no_license
|
r351574nc3/kfs-maven
|
20d9f1a65c6796e623c4845f6d68834c30732503
|
5f213604df361a874cdbba0de057d4cd5ea1da11
|
refs/heads/master
| 2016-09-06T15:07:01.034167
| 2012-06-01T07:40:46
| 2012-06-01T07:40:46
| 3,441,165
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,612
|
java
|
/*
* Copyright 2011 The Kuali Foundation.
*
* Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
*
* 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.kuali.kfs.module.bc.document.service;
/**
* This class defines methods that a Benefits Calculation Service must provide The Benefits Calculation Service supports
* functionality related to calculating benefits request amounts for a Budget Construction Document (account/sub-account). This
* includes calculations for annual and monthly amounts. Monthly amounts are only calculated when associated monthly request amounts
* exist.
*/
public interface BenefitsCalculationService {
/**
* This method returns the disabled setting of the System Parameter controlling Budget module Benefits Calculation. Disabling
* Benefits Calculation will cause any UI controls related to the Benefits Calculation functionality to not be displayed.
* Disabling will also cause associated business rules checks to behave differently or not be run.
*
* @return
*/
public boolean isBenefitsCalculationDisabled();
/**
*
* calculates the annual benefits for the budget construction general ledger key passed in, and stores them in the database
* @param documentNumber the string containing the document number
* @param fiscalYear the integer value of the fiscal year
* @param chartOfAccounts the string containing the chart of accounts
* @param accountNumber the string containing the account number
* @param subAccountNumber the string containing the sub account number
*/
public void calculateAnnualBudgetConstructionGeneralLedgerBenefits(String documentNumber,
Integer fiscalYear,
String chartOfAccounts,
String accountNumber,
String subAccountNumber);
/**
*
* calculates the monthly budget benefits for the budget construction general ledger key passed in, and stores them in the database
* @param documentNumber the string containing the document number
* @param fiscalYear the integer value of the fiscal year
* @param chartOfAccounts the string containing the chart of accounts
* @param accountNumber the string containing the account number
* @param subAccountNumber the string containing the sub account number
*
*/
public void calculateMonthlyBudgetConstructionGeneralLedgerBenefits(String documentNumber,
Integer fiscalYear,
String chartOfAccounts,
String accountNumber,
String subAccountNumber);
/**
*
* calculates both the monthly budget and the annual budget budget construction general ledger benefits for the key passed in, and
* stores them in the database.
* @param documentNumber the string containing the document number
* @param fiscalYear the integer value of the fiscal year
* @param chartOfAccounts the string containing the chart of accounts
* @param accountNumber the string containing the account number
* @param subAccountNumber
*/
public void calculateAllBudgetConstructionGeneralLedgerBenefits(String documentNumber,
Integer fiscalYear,
String chartOfAccounts,
String accountNumber,
String subAccountNumber);
}
|
[
"r351574nc3@gmail.com"
] |
r351574nc3@gmail.com
|
4c9696ed36990c697348308ec7c0f60d15ed0b2a
|
5407585b7749d94f5a882eee6f7129afc6f79720
|
/dm-code/dm-dao/src/test/java/org/finra/dm/dao/BaseJpaDaoTest.java
|
7df9effd3ce1eb096ab5e95ccb6686b948dc28e3
|
[
"Apache-2.0"
] |
permissive
|
walw/herd
|
67144b0192178050118f5572c5aa271e1525e14f
|
e236f8f4787e62d5ebf5e1a55eda696d75c5d3cf
|
refs/heads/master
| 2021-01-14T14:16:23.163693
| 2015-10-08T14:23:54
| 2015-10-08T14:23:54
| 43,558,552
| 0
| 1
| null | 2015-10-02T14:50:59
| 2015-10-02T14:50:59
| null |
UTF-8
|
Java
| false
| false
| 5,013
|
java
|
/*
* Copyright 2015 herd contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.finra.dm.dao;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.finra.dm.model.jpa.StoragePlatformEntity;
/**
* This class tests various functionality in the base JPA DAO.
*/
public class BaseJpaDaoTest extends AbstractDaoTest
{
// The "name" property for the storage platform entity.
private static final String NAME_PROPERTY = "name";
// The "createdBy" property for the auditable entities.
private static final String CREATED_BY_PROPERTY = "createdBy";
// Although DmDao extends BaseJpaDao, we will autowire it so we can use it directly and not take a chance that any base functionality is overridden.
@Qualifier(value = "baseJpaDaoImpl")
@Autowired
protected BaseJpaDao baseJpaDao;
@Test
public void testGetEntityManager()
{
assertNotNull(baseJpaDao.getEntityManager());
}
@Test
public void testFindById()
{
StoragePlatformEntity storagePlatformEntity = baseJpaDao.findById(StoragePlatformEntity.class, StoragePlatformEntity.S3);
assertNotNull(storagePlatformEntity);
assertEquals(StoragePlatformEntity.S3, storagePlatformEntity.getName());
}
@Test
public void testFindByNamedProperties()
{
Map<String, String> namedProperties = new HashMap<>();
namedProperties.put(NAME_PROPERTY, StoragePlatformEntity.S3);
List<StoragePlatformEntity> storagePlatformEntities = baseJpaDao.findByNamedProperties(StoragePlatformEntity.class, namedProperties);
validateSingleS3StorageEntity(storagePlatformEntities);
}
@Test
public void testFindUniqueByNamedProperties()
{
// Retrieve the existing entity to get the createdBy value needed to use more than one property to query against.
StoragePlatformEntity storagePlatformEntity = baseJpaDao.findById(StoragePlatformEntity.class, StoragePlatformEntity.S3);
assertNotNull(storagePlatformEntity);
Map<String, String> namedProperties = new HashMap<>();
namedProperties.put(NAME_PROPERTY, StoragePlatformEntity.S3);
namedProperties.put(CREATED_BY_PROPERTY, storagePlatformEntity.getCreatedBy());
storagePlatformEntity = baseJpaDao.findUniqueByNamedProperties(StoragePlatformEntity.class, namedProperties);
assertNotNull(storagePlatformEntity);
assertEquals(StoragePlatformEntity.S3, storagePlatformEntity.getName());
}
@Test
public void testFindUniqueByNamedPropertiesNoExist()
{
Map<String, String> namedProperties = new HashMap<>();
namedProperties.put(NAME_PROPERTY, UUID.randomUUID().toString()); // Search for a random entity name that doesn't exist.
StoragePlatformEntity storagePlatformEntity = baseJpaDao.findUniqueByNamedProperties(StoragePlatformEntity.class, namedProperties);
assertNull(storagePlatformEntity);
}
@Test
public void testQueryByNamedParams()
{
Map<String, String> namedParams = new HashMap<>();
namedParams.put(StoragePlatformEntity.COLUMN_NAME, StoragePlatformEntity.S3);
List<StoragePlatformEntity> storagePlatformEntities =
baseJpaDao.queryByNamedParams(StoragePlatformEntity.GET_STORAGE_PLATFORM_BY_NAME_QUERY_STRING, namedParams);
validateSingleS3StorageEntity(storagePlatformEntities);
}
@Test
public void testQueryByNamedQuery()
{
List<StoragePlatformEntity> storagePlatformEntities = baseJpaDao.queryByNamedQuery(StoragePlatformEntity.QUERY_GET_S3_STORAGE_PLATFORM);
validateSingleS3StorageEntity(storagePlatformEntities);
}
/**
* Validates that the list contains a single S3 storage platform entity.
*
* @param storagePlatformEntities the list of storage platform entities to test.
*/
private void validateSingleS3StorageEntity(List<StoragePlatformEntity> storagePlatformEntities)
{
assertNotNull(storagePlatformEntities);
assertEquals(1, storagePlatformEntities.size());
assertEquals(StoragePlatformEntity.S3, storagePlatformEntities.get(0).getName());
}
}
|
[
"mchao47@gmail.com"
] |
mchao47@gmail.com
|
388ecfd7b0b8d8b59b2590490846a6ff32e80fbd
|
17a33488736d3f6b84beaacbfcdc15dc43261a9e
|
/support/cas-server-support-couchdb-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/CouchDbTicketRegistry.java
|
e591338f1a5dc8ae1703e36b198221f00fd0b770
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-free-unknown"
] |
permissive
|
hdeadman/cas
|
68fa815d55ccc36a31b5037f500a8e827b6a566d
|
6d3cf1b64b2d4f9ab1ba07ab1105c9b7c77e8870
|
refs/heads/pr-puppeteerwin2
| 2023-08-06T05:59:12.248532
| 2022-03-16T00:32:45
| 2022-03-16T00:32:45
| 80,761,455
| 1
| 1
|
Apache-2.0
| 2022-03-22T00:15:11
| 2017-02-02T19:38:09
|
Java
|
UTF-8
|
Java
| false
| false
| 4,619
|
java
|
package org.apereo.cas.ticket.registry;
import org.apereo.cas.couchdb.tickets.TicketDocument;
import org.apereo.cas.couchdb.tickets.TicketRepository;
import org.apereo.cas.ticket.Ticket;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.apache.commons.lang3.StringUtils;
import org.ektorp.DbAccessException;
import org.ektorp.DocumentNotFoundException;
import org.ektorp.UpdateConflictException;
import java.util.Collection;
import java.util.function.Predicate;
import java.util.stream.Collectors;
/**
* This is {@link CouchDbTicketRegistry }.
*
* @author Timur Duehr
* @since 5.3.0
*/
@RequiredArgsConstructor
@Slf4j
public class CouchDbTicketRegistry extends AbstractTicketRegistry {
private final TicketRepository couchDb;
private final int conflictRetries;
@Override
public boolean deleteSingleTicket(final String ticketIdToDelete) {
val ticketId = encodeTicketId(ticketIdToDelete);
LOGGER.debug("Deleting ticket [{}]", ticketIdToDelete);
var exception = (DbAccessException) null;
var success = false;
val ticketDocument = new TicketDocument();
ticketDocument.setRevision(couchDb.getCurrentRevision(ticketId));
ticketDocument.setId(ticketId);
for (var retries = 0; retries < conflictRetries && exception == null && !success; retries++) {
try {
couchDb.remove(ticketDocument);
success = true;
} catch (final UpdateConflictException e) {
ticketDocument.setRevision(couchDb.getCurrentRevision(ticketId));
if (retries + 1 == conflictRetries) {
exception = e;
}
} catch (final DocumentNotFoundException e) {
exception = e;
}
}
if (exception != null) {
LOGGER.warn("Could not delete [{}] [{}]", ticketId, exception.getMessage());
} else if (success) {
LOGGER.trace("Successfully deleted ticket [{}].", ticketId);
} else {
LOGGER.warn("Could not delete [{}] - failed.", ticketId);
}
return success;
}
@Override
public void addTicketInternal(final Ticket ticketToAdd) throws Exception {
val encodedTicket = encodeTicket(ticketToAdd);
LOGGER.trace("Adding ticket [{}]", encodedTicket.getId());
couchDb.add(new TicketDocument(encodedTicket));
}
@Override
public Ticket getTicket(final String ticketId, final Predicate<Ticket> predicate) {
LOGGER.trace("Locating ticket id [{}]", ticketId);
val encTicketId = encodeTicketId(ticketId);
if (StringUtils.isBlank(encTicketId)) {
LOGGER.trace("Ticket id [{}] could not be found", encTicketId);
return null;
}
try {
val document = this.couchDb.get(encTicketId);
val t = document.getTicket();
LOGGER.trace("Got ticket [{}] from the registry.", t);
val decoded = decodeTicket(t);
if (predicate.test(decoded)) {
return decoded;
}
return null;
} catch (final DocumentNotFoundException ignored) {
LOGGER.trace("Ticket [{}] not found in the registry.", encTicketId);
}
return null;
}
@Override
public long deleteAll() {
return couchDb.delete(couchDb.getAll());
}
@Override
public Collection<? extends Ticket> getTickets() {
return decodeTickets(couchDb.getAll().stream().map(TicketDocument::getTicket).collect(Collectors.toList()));
}
@Override
public Ticket updateTicket(final Ticket ticket) throws Exception {
val encodedTicket = encodeTicket(ticket);
LOGGER.trace("Updating [{}]", encodedTicket.getId());
var success = false;
val doc = new TicketDocument(encodedTicket);
doc.setRevision(couchDb.getCurrentRevision(encodedTicket.getId()));
for (var retries = 0; retries < conflictRetries; retries++) {
try {
couchDb.update(doc);
success = true;
} catch (final DbAccessException e) {
doc.setRevision(couchDb.getCurrentRevision(encodedTicket.getId()));
LOGGER.warn("Could not update [{}] [{}]", encodedTicket.getId(), e.getMessage());
}
if (success) {
LOGGER.trace("Successfully updated ticket [{}].", encodedTicket.getId());
return ticket;
}
}
return null;
}
}
|
[
"mm1844@gmail.com"
] |
mm1844@gmail.com
|
8103438b439d6b883832c0acf0d75ceebc71ae3d
|
3657b6f5b30ac061e2ab1db7cd745e2ca8183af3
|
/homeProject/src/com/house/home/service/basic/OrganizationService.java
|
6d4ba518d1dcc14ff6f4a75ce2bd2f4e2c199dd7
|
[] |
no_license
|
Lxt000806/eclipse_workspace
|
b25f4f81bd0aa6f8d55fc834dd09cdb473af1f3f
|
04376681ec91c3f8dbde2908d35612c4842a868c
|
refs/heads/main
| 2023-05-23T12:05:26.989438
| 2021-06-13T05:49:26
| 2021-06-13T05:49:26
| 376,452,726
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 774
|
java
|
package com.house.home.service.basic;
import java.util.Map;
import com.house.framework.bean.Result;
import com.house.framework.commons.orm.BaseService;
import com.house.framework.commons.orm.Page;
import com.house.home.entity.basic.Organization;
public interface OrganizationService extends BaseService {
/**Organization分页信息
* @param page
* @param organization
* @return
*/
public Page<Map<String,Object>> findPageBySql(Page<Map<String,Object>> page, Organization organization);
public Result doSave(Organization organization);
public void doUpdate(Organization organization);
public void doDelete(Organization organization);
public void doIdentity(Organization organization);
public void doRefreshIdentity(Organization organization);
}
|
[
"1728490992@qq.com"
] |
1728490992@qq.com
|
02d8fecb36748fa254983663796b4e5be7a7224a
|
e1912d55c809f3765c36d041b5feb6a47a91d7d4
|
/src/main/java/com/elasticapp/web/rest/UserJWTController.java
|
00e7b4d86548bab007ee00719cd93403809a098f
|
[] |
no_license
|
edumenezes/elastic-app
|
a48f45d2bbd09cb28c66a595670d3236d2953dc4
|
7ecf371cb68063ff3167d3f5e1018d4e7746c0c6
|
refs/heads/master
| 2022-12-21T21:52:33.755526
| 2019-07-17T16:06:27
| 2019-07-17T16:06:27
| 197,422,410
| 0
| 1
| null | 2022-12-16T05:02:15
| 2019-07-17T16:06:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,547
|
java
|
package com.elasticapp.web.rest;
import com.elasticapp.security.jwt.JWTFilter;
import com.elasticapp.security.jwt.TokenProvider;
import com.elasticapp.web.rest.vm.LoginVM;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
* Controller to authenticate users.
*/
@RestController
@RequestMapping("/api")
public class UserJWTController {
private final TokenProvider tokenProvider;
private final AuthenticationManagerBuilder authenticationManagerBuilder;
public UserJWTController(TokenProvider tokenProvider, AuthenticationManagerBuilder authenticationManagerBuilder) {
this.tokenProvider = tokenProvider;
this.authenticationManagerBuilder = authenticationManagerBuilder;
}
@PostMapping("/authenticate")
public ResponseEntity<JWTToken> authorize(@Valid @RequestBody LoginVM loginVM) {
UsernamePasswordAuthenticationToken authenticationToken =
new UsernamePasswordAuthenticationToken(loginVM.getUsername(), loginVM.getPassword());
Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken);
SecurityContextHolder.getContext().setAuthentication(authentication);
boolean rememberMe = (loginVM.isRememberMe() == null) ? false : loginVM.isRememberMe();
String jwt = tokenProvider.createToken(authentication, rememberMe);
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.add(JWTFilter.AUTHORIZATION_HEADER, "Bearer " + jwt);
return new ResponseEntity<>(new JWTToken(jwt), httpHeaders, HttpStatus.OK);
}
/**
* Object to return as body in JWT Authentication.
*/
static class JWTToken {
private String idToken;
JWTToken(String idToken) {
this.idToken = idToken;
}
@JsonProperty("id_token")
String getIdToken() {
return idToken;
}
void setIdToken(String idToken) {
this.idToken = idToken;
}
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
bf84d83dda2ee54fe9cd5adbc9285d593af53d82
|
98e5b3aec60935f6768cb4e2a24b21da0b528b6d
|
/datalayer/stockoption/src/main/java/com/waben/stock/datalayer/stockoption/entity/StockOptionAmountLimit.java
|
a358c9ef0ad360e81d9fe5079ef5ec378ac45725
|
[] |
no_license
|
sunliang123/zhongbei-zhonghang-zhongzi-yidian
|
3eb95a77658d7ad9de1cdf9c3f85714ee007a871
|
54fed94b9784f5e392b4b9517cb5fe19c1b34443
|
refs/heads/master
| 2020-03-29T05:26:02.515289
| 2018-09-20T09:11:48
| 2018-09-20T09:11:48
| 149,582,090
| 1
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,578
|
java
|
package com.waben.stock.datalayer.stockoption.entity;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* 期权交易限额
*
* @author luomengan
*
*/
@Entity
@Table(name = "stock_option_amount_limit")
public class StockOptionAmountLimit {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/**
* 限额
*/
private BigDecimal amountLimit;
/**
* 是否为全局设置
*/
private Boolean isGlobal;
/**
* 股票代码
*/
private String stockCode;
/**
* 股票名称
*/
private String stockName;
/**
* 更新时间
*/
private Date updateTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public BigDecimal getAmountLimit() {
return amountLimit;
}
public void setAmountLimit(BigDecimal amountLimit) {
this.amountLimit = amountLimit;
}
public Boolean getIsGlobal() {
return isGlobal;
}
public void setIsGlobal(Boolean isGlobal) {
this.isGlobal = isGlobal;
}
public String getStockCode() {
return stockCode;
}
public void setStockCode(String stockCode) {
this.stockCode = stockCode;
}
public String getStockName() {
return stockName;
}
public void setStockName(String stockName) {
this.stockName = stockName;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
|
[
"sunliang_s666@163.com"
] |
sunliang_s666@163.com
|
22548774145333b7a3db68c2be9ca6c73bdecb92
|
9113e825106c3f756bc982493fa634309d32ff23
|
/src/com/cabletech/baseinfo/beans/LineBean.java
|
ca5ffb4a6957e5eb2e79ac4a837c38b3cc51b0e7
|
[] |
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 |
UTF-8
|
Java
| false
| false
| 1,579
|
java
|
package com.cabletech.baseinfo.beans;
import org.apache.struts.action.*;
import com.cabletech.commons.base.*;
public class LineBean extends BaseBean{
private String lineID;
private String lineName;
private String ruleDeptID;
private String lineType;
private String state;
private String regionid;
private String remark;
public LineBean(){
}
public String getLineID(){
return lineID;
}
public void setLineID( String lineID ){
this.lineID = lineID;
}
public String getLineName(){
return lineName;
}
public void setLineName( String lineName ){
this.lineName = lineName;
}
public String getRuleDeptID(){
return ruleDeptID;
}
public void setRuleDeptID( String ruleDeptID ){
this.ruleDeptID = ruleDeptID;
}
public String getLineType(){
return lineType;
}
public void setLineType( String lineType ){
this.lineType = lineType;
}
// Public Methods
public void reset( ActionMapping mapping,
javax.servlet.http.HttpServletRequest request ){
}
public String getState(){
return state;
}
public void setState( String state ){
this.state = state;
}
public String getRegionid(){
return regionid;
}
public String getRemark(){
return remark;
}
public void setRegionid( String regionid ){
this.regionid = regionid;
}
public void setRemark( String remark ){
this.remark = remark;
}
}
|
[
"253479240@qq.com"
] |
253479240@qq.com
|
9a023183412341e4924f406fbe5e84b0048a8f55
|
d6c708cf4456cc48676b8ca8fbcd699b0327e9f7
|
/app/src/main/java/com/example/android/theworkspace/ResetPasswordSucces.java
|
ec610fa5ba61dc200fe0692711d54fa28717094d
|
[] |
no_license
|
prasium/TheWorkspace
|
22647ca7b085779d595295876fe663adafcbcaa6
|
c007755f8b570674c6b34e5bed3a0414552214e2
|
refs/heads/master
| 2022-11-07T21:28:40.761699
| 2020-06-21T14:10:22
| 2020-06-21T14:10:22
| 273,915,158
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 894
|
java
|
package com.example.android.theworkspace;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
public class ResetPasswordSucces extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reset_password_succes);
ImageView imageView = findViewById(R.id.back_icon);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
public void goLogin (View view){
Intent goLoginIntent = new Intent(ResetPasswordSucces.this, LoginActivity.class);
startActivity(goLoginIntent);
finish();
}
}
|
[
"you@example.com"
] |
you@example.com
|
3d1d77b6cbbc9e661cc16fd38ffa15b577ab9415
|
a5dd4b9080b19dbdd25acc6e2297ff29feaa9f56
|
/src/main/java/com/shawn/condition/MyImportSelector.java
|
3ea91c10110d8752227fc9d35ba922f724a6f354
|
[] |
no_license
|
LuckyShawn/spring-annotation
|
4b9249e780a47eb5aa3d32766cf9bc91ec14f1d4
|
fe8188b8c76bc12bdaff94bad0f90c2db2da6e5b
|
refs/heads/master
| 2020-04-17T21:39:25.301738
| 2019-01-23T08:41:36
| 2019-01-23T08:41:36
| 166,960,201
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 672
|
java
|
package com.shawn.condition;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;
//自定义逻辑返回需要导入的组件
public class MyImportSelector implements ImportSelector {
//返回值,就是到导入到容器中的组件全类名
//AnnotationMetadata:当前标注@Import注解的类的所有注解信息
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
// TODO Auto-generated method stub
//importingClassMetadata
//方法不要返回null值
return new String[]{"com.shawn.bean.Blue","com.shawn.bean.Yellow"};
}
}
|
[
"LuckyShawn@foxmail.com"
] |
LuckyShawn@foxmail.com
|
8e63f4b022298f3adf06e7acbd98a73f900814c8
|
adb073a93ec2ceae65756d9e6f2f04478d6c74aa
|
/advance-java/week5/22.Structural-design-pattern/practice/proxy/src/MathCalculator.java
|
e12d4965c2ab99370f3227ff7754648ceea9bd30
|
[] |
no_license
|
nhlong9697/codegym
|
0ae20f19360a337448e206137d703c5c2056a17b
|
38e105272fca0aecc0e737277b3a0a47b8cc0702
|
refs/heads/master
| 2023-05-12T17:18:14.570378
| 2022-07-13T09:07:52
| 2022-07-13T09:07:52
| 250,012,451
| 0
| 0
| null | 2023-05-09T05:40:08
| 2020-03-25T15:12:34
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 432
|
java
|
public class MathCalculator implements Calculator {
@Override
public double add(double first, double second) {
return first + second;
}
@Override
public double sub(double first, double second) {
return first - second;
}
@Override
public double mul(double first, double second) {
return first * second;
}
@Override
public double div(double first, double second) {
return first/second;
}
}
|
[
"n.h.long.9697@gmail.com"
] |
n.h.long.9697@gmail.com
|
f25a850a439f71cf3509713bc34a993de89bc81d
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/google/android/play/core/splitinstall/C17126ac.java
|
2ae278eb29890662ba07c051563d73d74aed5133
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,689
|
java
|
package com.google.android.play.core.splitinstall;
import android.os.Bundle;
import android.os.RemoteException;
import com.google.android.play.core.internal.C17097af;
import com.google.android.play.core.internal.C17098ag;
import com.google.android.play.core.internal.C17113bd;
import com.google.android.play.core.tasks.C17157l;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/* renamed from: com.google.android.play.core.splitinstall.ac */
final class C17126ac extends C17113bd {
/* renamed from: b */
private final /* synthetic */ Collection f47844b;
/* renamed from: c */
private final /* synthetic */ Collection f47845c;
/* renamed from: d */
private final /* synthetic */ C17157l f47846d;
/* renamed from: e */
private final /* synthetic */ C17125ab f47847e;
C17126ac(C17125ab abVar, C17157l lVar, Collection collection, Collection collection2, C17157l lVar2) {
this.f47847e = abVar;
this.f47844b = collection;
this.f47845c = collection2;
this.f47846d = lVar2;
super(lVar);
}
/* renamed from: a */
public final void mo44331a() {
ArrayList a = C17125ab.m56768d(this.f47844b);
a.addAll(C17125ab.m56766c(this.f47845c));
try {
((C17097af) this.f47847e.f47840a.f47815a).mo44338a(this.f47847e.f47842e, (List<Bundle>) a, C17125ab.m56767d(), (C17098ag) new C17140j(this.f47847e, this.f47846d));
} catch (RemoteException e) {
C17125ab.f47838b.mo15890a((Throwable) e, "startInstall(%s,%s)", this.f47844b, this.f47845c);
this.f47846d.mo44428a((Exception) new RuntimeException(e));
}
}
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
1b60854ef89233789abd38ddd33355489063f793
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/AtCoder/abc080/A/4184895.java
|
8447a202f8669ae0e39f2f7d5c1d82897b1224de
|
[] |
no_license
|
Kawser-nerd/CLCDSA
|
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
|
aee32551795763b54acb26856ab239370cac4e75
|
refs/heads/master
| 2022-02-09T11:08:56.588303
| 2022-01-26T18:53:40
| 2022-01-26T18:53:40
| 211,783,197
| 23
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 430
|
java
|
import java.util.*;
public class Main{
public static void main (String[] args){
Scanner scanner = new Scanner (System.in);
int N = scanner.nextInt();
int A = scanner.nextInt();
int B = scanner.nextInt();
int plan1 = N*A;
int plan2 = B;
if (plan1 > plan2){
System.out.println(plan2);
} if (plan1 <= plan2){
System.out.println(plan1);
}
}
}
|
[
"kwnafi@yahoo.com"
] |
kwnafi@yahoo.com
|
225210b805775d9582a5e046e786a3921e849a13
|
85fc7f22cf377434ea7ac63b614e7fd2945059b2
|
/src/test/java/com/mycompany/provisioning/config/timezone/HibernateTimeZoneIT.java
|
b008fb2e32a1d6705544f5427146deeb425ad519
|
[] |
no_license
|
rgause/provisioning
|
dfe4799684e760901c7f576b1bc915afe9bdd65b
|
972643b0cd53208efdcd05ed9ddfb40d54322521
|
refs/heads/main
| 2023-07-26T10:16:09.124096
| 2021-09-13T17:02:05
| 2021-09-13T17:02:05
| 398,056,602
| 0
| 0
| null | 2021-08-25T01:00:59
| 2021-08-19T19:41:50
|
Java
|
UTF-8
|
Java
| false
| false
| 6,744
|
java
|
package com.mycompany.provisioning.config.timezone;
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;
import com.mycompany.provisioning.IntegrationTest;
import com.mycompany.provisioning.repository.timezone.DateTimeWrapper;
import com.mycompany.provisioning.repository.timezone.DateTimeWrapperRepository;
import java.time.*;
import java.time.format.DateTimeFormatter;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.rowset.SqlRowSet;
import org.springframework.transaction.annotation.Transactional;
/**
* Integration tests for the ZoneId Hibernate configuration.
*/
@IntegrationTest
class HibernateTimeZoneIT {
@Autowired
private DateTimeWrapperRepository dateTimeWrapperRepository;
@Autowired
private JdbcTemplate jdbcTemplate;
@Value("${spring.jpa.properties.hibernate.jdbc.time_zone:UTC}")
private String zoneId;
private DateTimeWrapper dateTimeWrapper;
private DateTimeFormatter dateTimeFormatter;
private DateTimeFormatter timeFormatter;
private DateTimeFormatter dateFormatter;
@BeforeEach
public void setup() {
dateTimeWrapper = new DateTimeWrapper();
dateTimeWrapper.setInstant(Instant.parse("2014-11-12T05:50:00.0Z"));
dateTimeWrapper.setLocalDateTime(LocalDateTime.parse("2014-11-12T07:50:00.0"));
dateTimeWrapper.setOffsetDateTime(OffsetDateTime.parse("2011-12-14T08:30:00.0Z"));
dateTimeWrapper.setZonedDateTime(ZonedDateTime.parse("2011-12-14T08:30:00.0Z"));
dateTimeWrapper.setLocalTime(LocalTime.parse("14:30:00"));
dateTimeWrapper.setOffsetTime(OffsetTime.parse("14:30:00+02:00"));
dateTimeWrapper.setLocalDate(LocalDate.parse("2016-09-10"));
dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S").withZone(ZoneId.of(zoneId));
timeFormatter = DateTimeFormatter.ofPattern("HH:mm:ss").withZone(ZoneId.of(zoneId));
dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
}
@Test
@Transactional
void storeInstantWithZoneIdConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("instant", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeFormatter.format(dateTimeWrapper.getInstant());
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
void storeLocalDateTimeWithZoneIdConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper.getLocalDateTime().atZone(ZoneId.systemDefault()).format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
void storeOffsetDateTimeWithZoneIdConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("offset_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper.getOffsetDateTime().format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
void storeZoneDateTimeWithZoneIdConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("zoned_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper.getZonedDateTime().format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
void storeLocalTimeWithZoneIdConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalTime()
.atDate(LocalDate.of(1970, Month.JANUARY, 1))
.atZone(ZoneId.systemDefault())
.format(timeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
void storeOffsetTimeWithZoneIdConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("offset_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getOffsetTime()
.toLocalTime()
.atDate(LocalDate.of(1970, Month.JANUARY, 1))
.atZone(ZoneId.systemDefault())
.format(timeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
void storeLocalDateWithZoneIdConfigShouldBeStoredWithoutTransformation() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_date", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper.getLocalDate().format(dateFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
private String generateSqlRequest(String fieldName, long id) {
return format("SELECT %s FROM jhi_date_time_wrapper where id=%d", fieldName, id);
}
private void assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(SqlRowSet sqlRowSet, String expectedValue) {
while (sqlRowSet.next()) {
String dbValue = sqlRowSet.getString(1);
assertThat(dbValue).isNotNull();
assertThat(dbValue).isEqualTo(expectedValue);
}
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
91fc2b9c2eccfa2f3bbdbe534149ea4a22319047
|
d0352f49cfb42f3c0d583389ab57598640c78fc6
|
/week1/Threads/src/main/java/com/producerconsumer/Consumer.java
|
0c4967a93790d981bff7fbb1365418d27880ad92
|
[] |
no_license
|
201026-reston-java-msa/demos
|
c0c79139391e70fe0393be2e705182e17ee4b244
|
57a56ff56df12afff167565554effac0ea284336
|
refs/heads/main
| 2023-03-29T04:27:20.165396
| 2021-03-31T11:21:20
| 2021-03-31T11:21:20
| 307,373,580
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,988
|
java
|
package com.producerconsumer;
import java.util.Queue;
/*
* LIVELOCK - is when two or more threads keep repeating a particular piece of code.
* This is a recursive situation. 1 thread is responding to the other, and the other is doing the same
*
* DEADLOCK - this is when one thread is waiting on another thread , and the other thread is doing the same
*
* both of these situations prevent the threads from progressing
*
* SYNCHRONIZATION - is the concurrent execution of two or more threads that share critiical
* resources (memory)...like a buffer.
*
* PRODUCER/CONSUMER problem: 2 processes: a producer and a consumer share a fixed-size buffer
* (like a queue set to a particular capacity)...
* The producer's job is to generate data and store it within the buffer
* The consumer's job is to consume data/remove it from the buffer
*
* However...if neither are doing their job and removing data/adding data at the wrong times,
* we enter into this situation...
*/
public class Consumer extends Thread {
// This is the buffer that will be shared with other threads
// Remember that all threads share the same heap
// This means that all threads will have reference to the same object
// (There is only ONE queue in memory...
private Queue<Integer> q;
public void run() {
try {
while(true) {
// This prevents multiple threads from accessing the same queue object at the same
// time. Java will block the other threads while one thread is using it.
synchronized (q) {
while(q.isEmpty()) {
System.out.println("Consumer " + getName() + " falling asleep");
q.wait();
}
int val = q.remove(); // Queue's are FIFO
System.out.println("Reading value: " + val);
q.notifyAll();
Thread.sleep(4);
}
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public void setQueue(Queue<Integer> q) {
this.q = q;
}
}
|
[
"msophiagavrila@gmail.com"
] |
msophiagavrila@gmail.com
|
69a7a90e3801f6db5dd1cfb2f3edf1ea501797fa
|
305fe6dc70184b3b3397485e77dee46c39336416
|
/examples/adwords_axis/src/main/java/adwords/axis/v201306/campaignmanagement/AddLocationExtensionOverride.java
|
bec1d0b8fb717b7dec06ea097a7fe064f94d3062
|
[
"Apache-2.0"
] |
permissive
|
wangshuo870606/googleads-java-lib
|
a6b51f93bed1d56c9ca277218189a0f196a0dbed
|
dfb2bc36124297833805f08f322b2db8b97fc11f
|
refs/heads/master
| 2021-01-12T19:44:15.291058
| 2014-03-06T05:41:09
| 2014-03-06T05:41:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,534
|
java
|
// Copyright 2012 Google Inc. 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 adwords.axis.v201306.campaignmanagement;
import com.google.api.ads.adwords.axis.factory.AdWordsServices;
import com.google.api.ads.adwords.axis.v201306.cm.AdExtension;
import com.google.api.ads.adwords.axis.v201306.cm.AdExtensionOverride;
import com.google.api.ads.adwords.axis.v201306.cm.AdExtensionOverrideOperation;
import com.google.api.ads.adwords.axis.v201306.cm.AdExtensionOverrideReturnValue;
import com.google.api.ads.adwords.axis.v201306.cm.AdExtensionOverrideServiceInterface;
import com.google.api.ads.adwords.axis.v201306.cm.LocationOverrideInfo;
import com.google.api.ads.adwords.axis.v201306.cm.LocationOverrideInfoRadiusUnits;
import com.google.api.ads.adwords.axis.v201306.cm.Operator;
import com.google.api.ads.adwords.axis.v201306.cm.OverrideInfo;
import com.google.api.ads.adwords.lib.client.AdWordsSession;
import com.google.api.ads.common.lib.auth.OfflineCredentials;
import com.google.api.ads.common.lib.auth.OfflineCredentials.Api;
import com.google.api.client.auth.oauth2.Credential;
/**
* This example ads an ad extension override to an ad using an existing campaign
* ad extension. To get ads, run GetTextAds.java. To get campaign ad extensions,
* run AddLocationExtension.java.
*
* Credentials and properties in {@code fromFile()} are pulled from the
* "ads.properties" file. See README for more info.
*
* Tags: AdExtensionOverrideService.mutate
*
* Category: adx-exclude
*
* @author Kevin Winter
*/
public class AddLocationExtensionOverride {
public static void main(String[] args) throws Exception {
// Generate a refreshable OAuth2 credential similar to a ClientLogin token
// and can be used in place of a service account.
Credential oAuth2Credential = new OfflineCredentials.Builder()
.forApi(Api.ADWORDS)
.fromFile()
.build()
.generateCredential();
// Construct an AdWordsSession.
AdWordsSession session = new AdWordsSession.Builder()
.fromFile()
.withOAuth2Credential(oAuth2Credential)
.build();
long adId = Long.parseLong("INSERT_AD_ID_HERE");
long campaignAdExtensionId = Long.parseLong("INSERT_CAMPAIGN_AD_EXTENSION_ID_HERE");
AdWordsServices adWordsServices = new AdWordsServices();
runExample(adWordsServices, session, adId, campaignAdExtensionId);
}
public static void runExample(AdWordsServices adWordsServices, AdWordsSession session, Long adId,
Long campaignAdExtensionId) throws Exception {
// Get the AdExtensionOverrideService.
AdExtensionOverrideServiceInterface adExtensionOverrideService =
adWordsServices.get(session, AdExtensionOverrideServiceInterface.class);
// Create ad extension override.
AdExtensionOverride adExtensionOverride = new AdExtensionOverride();
adExtensionOverride.setAdId(adId);
// Create ad extension using existing id.
AdExtension adExtension = new AdExtension();
adExtension.setId(campaignAdExtensionId);
adExtensionOverride.setAdExtension(adExtension);
adExtensionOverride.setOverrideInfo(new OverrideInfo(new LocationOverrideInfo(5,
LocationOverrideInfoRadiusUnits.MILES)));
// Create operations.
AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
operation.setOperand(adExtensionOverride);
operation.setOperator(Operator.ADD);
AdExtensionOverrideOperation[] operations = new AdExtensionOverrideOperation[] {operation};
// Add ad extension override.
AdExtensionOverrideReturnValue result = adExtensionOverrideService.mutate(operations);
// Display ad extension overrides.
for (AdExtensionOverride adExtensionOverrideResult : result.getValue()) {
System.out.println("Location ad extension override with ad id \""
+ adExtensionOverrideResult.getAdId() + "\" and ad extension id \""
+ adExtensionOverrideResult.getAdExtension().getId() + "\" was added.");
}
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
a2e9a1fb67b39290dbb825ae595407cb82e41a53
|
64eaf5bd1069f0bdffb4422d2b6285f41d5a2721
|
/yadn-mock/src/main/java/com/adstream/automate/babylon/yadn/YADNMockService.java
|
635f6673264f7d8e02a905a3f867f5cf0ea8d386
|
[] |
no_license
|
DevikaS/gdam
|
892f731c69ded3ee48474f3326f8d06d8f77e3f0
|
7ebd8f5059d88e8f7e34b463e3111fe2e090da21
|
refs/heads/master
| 2021-10-28T10:29:01.637709
| 2019-04-23T13:31:11
| 2019-04-23T13:31:11
| 183,001,214
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,640
|
java
|
package com.adstream.automate.babylon.yadn;
import com.adstream.automate.gdn.activemq.*;
import com.adstream.automate.utils.Common;
import com.adstream.automate.utils.IO;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.TextMessage;
import java.io.File;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* Created with IntelliJ IDEA.
* User: savitskiy-a
* Date: 05.08.13
* Time: 16:01
*/
public class YADNMockService extends LoggingListener {
protected final static Logger log = Logger.getLogger(YADNMockService.class);
private static Properties properties;
private static long delayBetweenMessagesMs;
private static int messageSenderPoolThreadsCount;
private static String messageProcessorClass;
protected final Destination inQ;
protected final ActiveMQService activeMQService;
private Producer producer;
private Consumer consumer;
private ExecutorService messageSenderPool;
private int messagesReceived = 0;
private MessageProcessor messageProcessor;
public static void main(String[] args){
properties = IO.getProperties(new File("default.properties"));
String activeMQQueue = properties.getProperty("activeMQ_queue","adstream.yadn.fake");
String activeMQService = properties.getProperty("activeMQ_service","failover:(tcp://10.44.202.19:61616)");
boolean matchExtensionToMediatype = Boolean.getBoolean(properties.getProperty("match_extension_to_mediatype","false")); //true - otherwise it will randomize
delayBetweenMessagesMs = Long.parseLong(properties.getProperty("delay_between_messages_ms", "0"));
messageSenderPoolThreadsCount = Integer.parseInt(properties.getProperty("message_sender_pool_threads_count", "4"));
messageProcessorClass = properties.getProperty("message_processor_class", "com.adstream.automate.babylon.yadn.HardcodedMessageProcessor");
PropertyConfigurator.configure("log4j.properties");
YADNMockService service = new YADNMockService(new ActiveMQQueue(activeMQQueue),
new ActiveMQService(activeMQService));
service.startConsuming();
}
public YADNMockService(Destination inQ, ActiveMQService activeMQService) {
this.inQ = inQ;
this.activeMQService = activeMQService;
messageSenderPool = Executors.newFixedThreadPool(messageSenderPoolThreadsCount);
try {
messageProcessor = (MessageProcessor) Class.forName(messageProcessorClass).getConstructor(Properties.class).newInstance(properties);
} catch (Exception e) {
throw new RuntimeException("Could not initialize message processor", e);
}
}
protected Producer getProducer() throws JMSException {
if (producer == null) {
producer = activeMQService.createProducer();
}
return producer;
}
protected Consumer getConsumer() throws JMSException {
if (consumer == null) {
consumer = activeMQService.createConsumer(inQ);
}
return consumer;
}
protected void startConsuming() {
try {
getConsumer().startConsuming(this);
} catch (JMSException e) {
log.error(e);
}
}
protected void stopConsuming() {
try {
getConsumer().endConsuming();
} catch (JMSException e) {
log.error(e);
}
}
protected void sendTextMessage(List<TextMessage> messages) {
if (messages == null) return;
try {
Iterator<TextMessage> messageIterator = messages.iterator();
while (messageIterator.hasNext()) {
getProducer().produce(messageIterator.next());
if (messageIterator.hasNext()) {
Common.sleep(delayBetweenMessagesMs);
}
}
} catch (Exception e) {
log.error(e);
}
}
@Override
public void onMessage(final TextMessage message) {
messageSenderPool.execute(new Runnable() {
@Override
public void run() {
sendTextMessage(messageProcessor.replyTo(message));
}
});
log.info("Processed " + ++messagesReceived + " messages");
}
}
|
[
"Devika.Subramanian@adstream.com"
] |
Devika.Subramanian@adstream.com
|
b90c85b834e82deb3340887728043674e08f9697
|
2b2e5ac097426b7fc77cb098d4114015ae1fa112
|
/java/Thmod/Cards/ItemCards/ByoukiHeiyu.java
|
f0482550582734615d5475f82ee13c87f7ff5be5
|
[] |
no_license
|
LazurasLong/KomeijiMod
|
2d0c1b9526cb7947c0b595403b8f20efc0837011
|
1429d94e6bac796939f4ccaee94b937dce340d26
|
refs/heads/master
| 2022-12-07T10:32:51.808255
| 2018-09-01T11:48:15
| 2018-09-01T11:48:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,782
|
java
|
package Thmod.Cards.ItemCards;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.ReducePowerAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import Thmod.Power.HeiyuPower;
import Thmod.Power.PointPower;
public class ByoukiHeiyu extends AbstractItemCards {
public static final String ID = "ByoukiHeiyu";
private static final CardStrings cardStrings;
public static final String NAME;
public static final String DESCRIPTION;
private static final int COST = 0;
public ByoukiHeiyu() {
super("ByoukiHeiyu", ByoukiHeiyu.NAME, 0, ByoukiHeiyu.DESCRIPTION, CardType.SKILL, CardRarity.SPECIAL, CardTarget.SELF);
}
public void use(final AbstractPlayer p, final AbstractMonster m) {
if (p.hasPower("PointPower")) {
if (p.getPower("PointPower").amount >= 1) {
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new HeiyuPower(p)));
AbstractDungeon.actionManager.addToTop(new ReducePowerAction(p,p,"PointPower",1));
}
}
}
public AbstractCard makeCopy() {
return new ByoukiHeiyu();
}
public void upgrade() {
if (!(this.upgraded)) {
this.upgradeName();
}
}
static {
cardStrings = CardCrawlGame.languagePack.getCardStrings("ByoukiHeiyu");
NAME = ByoukiHeiyu.cardStrings.NAME;
DESCRIPTION = ByoukiHeiyu.cardStrings.DESCRIPTION;
}
}
|
[
"1500959719@qq.com"
] |
1500959719@qq.com
|
bb673dca2a2d8d0e8aee5713d59108ca23ace648
|
81480f1ff5a5d94b5dc38a0a0f8fcf724f556c73
|
/shopping-parent/shopping-model/src/main/java/com/palmble/sp/manger/model/ZsGoodsSkuAttrValue.java
|
b87f9a394af5851accbf327f0208d52dd8db6837
|
[] |
no_license
|
15638836857/shoppingManager
|
6c3cf8571d20eb921110747a2c29a4d5fee8f278
|
0be206eb6a9815e0cf5440ec1ba0ad79efd9d840
|
refs/heads/master
| 2020-03-26T05:04:39.945070
| 2018-08-20T02:21:15
| 2018-08-20T02:21:15
| 144,537,191
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 817
|
java
|
package com.palmble.sp.manger.model;
public class ZsGoodsSkuAttrValue {
private Integer id;
private String attrValue;
private Integer skuAttrId;
public Integer getId() {
return id;
}
public ZsGoodsSkuAttrValue() {
}
public ZsGoodsSkuAttrValue(String attrValue,Integer skuAttrId) {
this.attrValue=attrValue;
this.skuAttrId=skuAttrId;
}
public void setId(Integer id) {
this.id = id;
}
public String getAttrValue() {
return attrValue;
}
public void setAttrValue(String attrValue) {
this.attrValue = attrValue == null ? null : attrValue.trim();
}
public Integer getSkuAttrId() {
return skuAttrId;
}
public void setSkuAttrId(Integer skuAttrId) {
this.skuAttrId = skuAttrId;
}
}
|
[
"15638836857@163.com"
] |
15638836857@163.com
|
23d67cbf51055a51c330c135e695a0aee1904df2
|
9a6ea6087367965359d644665b8d244982d1b8b6
|
/src/main/java/X/AbstractC24961Du.java
|
afb6336b56f73a71f95283124f0b74e61d8fec84
|
[] |
no_license
|
technocode/com.wa_2.21.2
|
a3dd842758ff54f207f1640531374d3da132b1d2
|
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
|
refs/heads/master
| 2023-02-12T11:20:28.666116
| 2021-01-14T10:22:21
| 2021-01-14T10:22:21
| 329,578,591
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 174
|
java
|
package X;
/* renamed from: X.1Du reason: invalid class name and case insensitive filesystem */
public interface AbstractC24961Du {
void A3n(int i);
void APf();
}
|
[
"madeinborneo@gmail.com"
] |
madeinborneo@gmail.com
|
4d58ca14e004c940af9738d184f48e3cac82e5dd
|
7164ed7105f8e0bfdf5ba81d42bf3704ddeebc27
|
/app/src/main/java/com/arcsoft/arcfacesingle/server/pojo/request/RequestPersonAddList.java
|
67cc18fd2412e785d1a32580732e8c0ca7866dd5
|
[
"Apache-2.0"
] |
permissive
|
lichao3140/ArcFaceGo
|
68821ba84ecb3cc8a63bad2ecec7f6662892d35f
|
93c64fb34091cbdc8b43f5d081cf61716be7d9bd
|
refs/heads/master
| 2022-11-19T05:00:34.920055
| 2020-07-09T02:51:56
| 2020-07-09T02:51:56
| 267,548,489
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,499
|
java
|
/**
* Copyright 2020 ArcSoft Corporation Limited. 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 com.arcsoft.arcfacesingle.server.pojo.request;
import java.io.Serializable;
import java.util.List;
public class RequestPersonAddList implements Serializable {
private boolean registerComplete;
private int threadCount;
public int getThreadCount() {
return threadCount;
}
public void setThreadCount(int threadCount) {
this.threadCount = threadCount;
}
public boolean isRegisterComplete() {
return registerComplete;
}
public void setRegisterComplete(boolean registerComplete) {
this.registerComplete = registerComplete;
}
private List<RequestPersonAdd> personAddList;
public List<RequestPersonAdd> getPersonAddList() {
return personAddList;
}
public void setPersonAddList(List<RequestPersonAdd> personAddList) {
this.personAddList = personAddList;
}
}
|
[
"396229938@qq.com"
] |
396229938@qq.com
|
6e321bffc7a30ca5ca1b3138825841506c04364d
|
48c28b25284c8de2d247dd22c9461fbff28f9ab4
|
/app/src/main/java/com/example/myfirstapp/modelss/Region.java
|
3775c12cf12082b3ac863b815023f622ec407ac4
|
[] |
no_license
|
nice-nicole/MyFirstApp2
|
ed7e286fd9dc3da06c718512851cc6490b7b10c6
|
806e77e2499428e6b231e9a7862bcf553f848af6
|
refs/heads/master
| 2020-08-24T07:33:26.119104
| 2019-10-25T08:50:17
| 2019-10-25T08:50:17
| 216,785,800
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 650
|
java
|
package com.example.myfirstapp.modelss;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import org.parceler.Parcel;
@Parcel
public class Region {
@SerializedName("center")
@Expose
public Center center;
/**
* No args constructor for use in serialization
*
*/
public Region() {
}
/**
*
* @param center
*/
public Region(Center center) {
super();
this.center = center;
}
public Center getCenter() {
return center;
}
public void setCenter(Center center) {
this.center = center;
}
}
|
[
"you@example.com"
] |
you@example.com
|
defc5129e7f939511ab1ea856b7983b3bad03635
|
d8be8c45aca2ffa4b9e8f7778a2ee7a5d29b0adb
|
/plainsource/src/main/java/gnu/trove/impl/sync/TSynchronizedLongIntMap.java
|
c49bea4c30dfbbf18dcfd76017e25f975f67d3aa
|
[] |
no_license
|
slimjars/trove4j-plain
|
530aba3fae2bd10b39c8d6da6cbd2c05106777ff
|
a23ef0bde2f5546540186b1f2b90f787fb26a309
|
refs/heads/master
| 2020-12-03T03:46:17.527811
| 2017-07-13T11:27:35
| 2017-07-13T11:27:35
| 95,769,713
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,701
|
java
|
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2008, Robert D. Eden All Rights Reserved.
// Copyright (c) 2009, Jeff Randall All Rights Reserved.
//
// 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 General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
///////////////////////////////////////////////////////////////////////////////
package gnu.trove.impl.sync;
//////////////////////////////////////////////////
// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! //
//////////////////////////////////////////////////
////////////////////////////////////////////////////////////
// THIS IS AN IMPLEMENTATION CLASS. DO NOT USE DIRECTLY! //
// Access to these methods should be through TCollections //
////////////////////////////////////////////////////////////
import gnu.trove.iterator.*;
import gnu.trove.procedure.*;
import gnu.trove.set.*;
import gnu.trove.function.*;
import gnu.trove.map.*;
import gnu.trove.*;
import java.util.Map;
import java.io.Serializable;
import java.io.ObjectOutputStream;
import java.io.IOException;
public class TSynchronizedLongIntMap implements TLongIntMap, Serializable {
private static final long serialVersionUID = 1978198479659022715L;
private final TLongIntMap m; // Backing Map
final Object mutex; // Object on which to synchronize
public TSynchronizedLongIntMap( TLongIntMap m ) {
if ( m == null )
throw new NullPointerException();
this.m = m;
mutex = this;
}
public TSynchronizedLongIntMap( TLongIntMap m, Object mutex ) {
this.m = m;
this.mutex = mutex;
}
public int size() {
synchronized( mutex ) { return m.size(); }
}
public boolean isEmpty(){
synchronized( mutex ) { return m.isEmpty(); }
}
public boolean containsKey( long key ) {
synchronized( mutex ) { return m.containsKey( key ); }
}
public boolean containsValue( int value ){
synchronized( mutex ) { return m.containsValue( value ); }
}
public int get( long key ) {
synchronized( mutex ) { return m.get( key ); }
}
public int put( long key, int value ) {
synchronized( mutex ) { return m.put( key, value ); }
}
public int remove( long key ) {
synchronized( mutex ) { return m.remove( key ); }
}
public void putAll( Map<? extends Long, ? extends Integer> map ) {
synchronized( mutex ) { m.putAll( map ); }
}
public void putAll( TLongIntMap map ) {
synchronized( mutex ) { m.putAll( map ); }
}
public void clear() {
synchronized( mutex ) { m.clear(); }
}
private transient TLongSet keySet = null;
private transient TIntCollection values = null;
public TLongSet keySet() {
synchronized( mutex ) {
if ( keySet == null )
keySet = new TSynchronizedLongSet( m.keySet(), mutex );
return keySet;
}
}
public long[] keys() {
synchronized( mutex ) { return m.keys(); }
}
public long[] keys( long[] array ) {
synchronized( mutex ) { return m.keys( array ); }
}
public TIntCollection valueCollection() {
synchronized( mutex ) {
if ( values == null )
values = new TSynchronizedIntCollection( m.valueCollection(), mutex );
return values;
}
}
public int[] values() {
synchronized( mutex ) { return m.values(); }
}
public int[] values( int[] array ) {
synchronized( mutex ) { return m.values( array ); }
}
public TLongIntIterator iterator() {
return m.iterator(); // Must be manually synched by user!
}
// these are unchanging over the life of the map, no need to lock
public long getNoEntryKey() { return m.getNoEntryKey(); }
public int getNoEntryValue() { return m.getNoEntryValue(); }
public int putIfAbsent( long key, int value ) {
synchronized( mutex ) { return m.putIfAbsent( key, value ); }
}
public boolean forEachKey( TLongProcedure procedure ) {
synchronized( mutex ) { return m.forEachKey( procedure ); }
}
public boolean forEachValue( TIntProcedure procedure ) {
synchronized( mutex ) { return m.forEachValue( procedure ); }
}
public boolean forEachEntry( TLongIntProcedure procedure ) {
synchronized( mutex ) { return m.forEachEntry( procedure ); }
}
public void transformValues( TIntFunction function ) {
synchronized( mutex ) { m.transformValues( function ); }
}
public boolean retainEntries( TLongIntProcedure procedure ) {
synchronized( mutex ) { return m.retainEntries( procedure ); }
}
public boolean increment( long key ) {
synchronized( mutex ) { return m.increment( key ); }
}
public boolean adjustValue( long key, int amount ) {
synchronized( mutex ) { return m.adjustValue( key, amount ); }
}
public int adjustOrPutValue( long key, int adjust_amount, int put_amount ) {
synchronized( mutex ) { return m.adjustOrPutValue( key, adjust_amount, put_amount ); }
}
public boolean equals( Object o ) {
synchronized( mutex ) { return m.equals( o ); }
}
public int hashCode() {
synchronized( mutex ) { return m.hashCode(); }
}
public String toString() {
synchronized( mutex ) { return m.toString(); }
}
private void writeObject( ObjectOutputStream s ) throws IOException {
synchronized( mutex ) { s.defaultWriteObject(); }
}
}
|
[
"sebastian@topobyte.de"
] |
sebastian@topobyte.de
|
f16dd3a292fae8caa49106a69e077dfb4f9a12b9
|
acfea005cc3ccfebd91de160231c3967f684bdd6
|
/app/src/main/java/com/example/hong/google_market/ui/activity/MainActivity.java
|
41951197dfe9b8f0bd1aa1625cac8199a93c3cba
|
[] |
no_license
|
zhangkangmu/google_market
|
2a67a95c9a0d1559ab7a8b140e2e7d936a4bebde
|
9c3c838961e5855d11864dced55a57802069aad4
|
refs/heads/master
| 2020-05-26T08:31:21.641234
| 2019-06-03T15:22:01
| 2019-06-03T15:22:01
| 188,168,416
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,714
|
java
|
package com.example.hong.google_market.ui.activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.Log;
import com.example.hong.google_market.R;
import com.example.hong.google_market.ui.fragment.BaseFragment;
import com.example.hong.google_market.ui.fragment.FragmentFactory;
import com.example.hong.google_market.ui.view.PagerTab;
import com.example.hong.google_market.utils.UIUtils;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
public class MainActivity extends BaseActivity {
@BindView(R.id.pager_tab)
PagerTab pagerTab;
@BindView(R.id.viewpager)
ViewPager viewpager;
private MyAdapter myAdapter;
private Unbinder unbinder;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
unbinder = ButterKnife.bind(this);
initPagerTab();
}
private void initPagerTab() {
myAdapter = new MyAdapter(getSupportFragmentManager());
viewpager.setAdapter(myAdapter);
pagerTab.setViewPager(viewpager);
pagerTab.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
BaseFragment fragment = FragmentFactory
.createFragment(position);
// 开始加载数据
fragment.loadData();
Log.e("zyh",position+"");
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
}
class MyAdapter extends FragmentPagerAdapter {
private String[] mTabNames;
public MyAdapter(FragmentManager fm) {
super(fm);
mTabNames = UIUtils.getStringArray(R.array.tab_names);
}
@Override
public CharSequence getPageTitle(int position) {
return mTabNames[position];
}
@Override
public Fragment getItem(int position) {
BaseFragment fragment = FragmentFactory.createFragment(position);
return fragment;
}
@Override
public int getCount() {
return mTabNames.length;
}
}
@Override
protected void onDestroy() {
super.onDestroy();
unbinder.unbind();
}
}
|
[
"289590351@qq.com"
] |
289590351@qq.com
|
5f37a57a1e07abd82b4816ccb518bf9b0b7347d8
|
522c4abef6c0410d52dd5b8433bf4487d46c1c25
|
/efamily-common/src/main/java/com/winterframework/efamily/service/IEjlComThirdPartyLoginService.java
|
338e17388eb730b08988582d621f7a753c0b1de7
|
[] |
no_license
|
xjiafei/efamily
|
05b1c71e1f7f485132e5d6243e7af7208b567517
|
0401d6ec572c7959721c294408f6d525e3d12866
|
refs/heads/master
| 2020-03-10T11:42:00.359799
| 2018-04-13T08:13:58
| 2018-04-13T08:13:58
| 129,361,914
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 422
|
java
|
package com.winterframework.efamily.service;
import java.util.List;
import com.winterframework.efamily.core.base.IBaseService;
import com.winterframework.efamily.entity.EjlThirdPartyLogin;
import com.winterframework.efamily.entity.ThirdPartyLoginStruc;
public interface IEjlComThirdPartyLoginService extends IBaseService<EjlThirdPartyLogin>{
public List<ThirdPartyLoginStruc> getThirdPartyLoginStruc(Long userId);
}
|
[
"xjiafei126@126.com"
] |
xjiafei126@126.com
|
ef23cbcb25113d9618366be47606114c3bf41002
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/pluginsdk/i/a/b/k$a.java
|
ebab646edc9b0efad49de809047a1f0e75e4f96a
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 4,306
|
java
|
package com.tencent.mm.pluginsdk.i.a.b;
import com.tencent.mm.pluginsdk.i.a.b.b.c;
import com.tencent.mm.pluginsdk.i.a.d.f.d;
import com.tencent.mm.pluginsdk.i.a.e.a;
import com.tencent.mm.sdk.platformtools.bh;
import com.tencent.mm.sdk.platformtools.x;
final class k$a extends d<a> {
protected k$a(a aVar) {
super(aVar);
}
public final void run() {
x.i("MicroMsg.ResDownloader.CheckResUpdate.DecryptTask", "%s: decryptTask, entered", new Object[]{((a) aai()).vgd});
a aVar = (a) aai();
int i = aVar.fpm;
int i2 = aVar.fpn;
int i3 = aVar.fpo;
try {
l lVar;
aVar = (a) aai();
l lVar2 = new l(aVar.fpm, aVar.fpn, aVar.filePath, aVar.vge, aVar.vgf, aVar.vgg, aVar.vgh, aVar.vgk, aVar.fpp, aVar.vgi, aVar.vgj, aVar.vgm, aVar.vgl, aVar.url, aVar.vgn, aVar.vgo, aVar.fpo);
if (lVar2.vgM) {
x.i("MicroMsg.ResDownloader.CheckResUpdate.FileDecryptPerformer", "%s: checkFileExists(), do fileDecompress", new Object[]{lVar2.vgd});
lVar2.vhm = lVar2.filePath + ".decompressed";
lVar2.state = 32;
if (lVar2.bZt() != null) {
lVar2.state = 16;
x.i("MicroMsg.ResDownloader.CheckResUpdate.FileDecryptPerformer", "%s: checkFileExists(), file already valid", new Object[]{lVar2.vgd});
}
lVar = lVar2;
} else if (lVar2.vgN) {
x.i("MicroMsg.ResDownloader.CheckResUpdate.FileDecryptPerformer", "%s: checkFileExists(), do fileDecrypt", new Object[]{lVar2.vgd});
lVar2.vhm = lVar2.filePath + ".decrypted";
lVar2.state = 32;
if (lVar2.bZt() != null) {
lVar2.state = 16;
x.i("MicroMsg.ResDownloader.CheckResUpdate.FileDecryptPerformer", "%s: checkFileExists(), file already valid", new Object[]{lVar2.vgd});
}
lVar = lVar2;
} else {
x.i("MicroMsg.ResDownloader.CheckResUpdate.FileDecryptPerformer", "%s: checkFileExists(), just check sum", new Object[]{lVar2.vgd});
lVar2.vhm = lVar2.filePath;
lVar2.state = 32;
if (lVar2.bZt() != null) {
lVar2.state = 16;
x.i("MicroMsg.ResDownloader.CheckResUpdate.FileDecryptPerformer", "%s: checkFileExists(), file already valid", new Object[]{lVar2.vgd});
}
lVar = lVar2;
}
x.i("MicroMsg.ResDownloader.CheckResUpdate.FileDecryptPerformer", "%s: verify(), file_state " + lVar.bZu(), new Object[]{lVar.vgd});
if (16 != lVar.state) {
if (lVar.vgN) {
lVar.vhm = lVar.filePath;
lVar.vhn = lVar.filePath + ".decrypted";
lVar.state = 1;
} else if (lVar.vgM) {
lVar.vhm = lVar.filePath;
lVar.vhn = lVar.filePath + ".decompressed";
lVar.state = 2;
} else {
lVar.vhm = lVar.filePath;
lVar.state = 4;
}
}
String bZt = lVar.bZr().bZs().bZt();
if (bh.ov(bZt)) {
a.Sa(((a) aai()).filePath + ".decrypted");
a.Sa(((a) aai()).filePath + ".decompressed");
} else {
c.bZm().b(i, i2, bZt, i3);
}
if (Thread.interrupted()) {
x.i("MicroMsg.ResDownloader.CheckResUpdate.DecryptTask", "%s: decrypting and interrupted", new Object[]{((a) aai()).vgd});
a.Sa(((a) aai()).filePath);
a.Sa(((a) aai()).filePath + ".decrypted");
a.Sa(((a) aai()).filePath + ".decompressed");
}
} catch (Throwable th) {
Throwable th2 = th;
if (Thread.interrupted()) {
x.i("MicroMsg.ResDownloader.CheckResUpdate.DecryptTask", "%s: decrypting and interrupted", new Object[]{((a) aai()).vgd});
a.Sa(((a) aai()).filePath);
a.Sa(((a) aai()).filePath + ".decrypted");
a.Sa(((a) aai()).filePath + ".decompressed");
}
}
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
708be77babb5ca8144cccf6679d7f233f5ce72fd
|
5aa4d6e75dff32e54ccaa4b10709e7846721af05
|
/samples/j2ee/snippets/com.ibm.sbt.automation.test/src/main/java/com/ibm/sbt/test/controls/grid/forum/PublicForums.java
|
c3b54645aac7c1a50e93eedf127e6f0673571617
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
gnuhub/SocialSDK
|
6bc49880e34c7c02110b7511114deb8abfdee924
|
02cc3ac4d131b7a094f6983202c1b5e0043b97eb
|
refs/heads/master
| 2021-01-16T20:08:07.509051
| 2014-07-09T08:53:03
| 2014-07-09T08:53:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,183
|
java
|
/*
* � Copyright IBM Corp. 2013
*
* 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.ibm.sbt.test.controls.grid.forum;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import com.ibm.sbt.automation.core.test.BaseGridTest;
/**
* @author David Ryan
* @date 20 August 2013
*/
public class PublicForums extends BaseGridTest {
@Override
protected boolean isEnvironmentValid() {
return super.isEnvironmentValid() && !environment.isSmartCloud();
}
@Test
public void publicForumsTest() {
assertTrue("Expected the test to generate a grid", checkGrid("Social_Forums_Controls_Public_Forums",false,false));
}
}
|
[
"LORENZOB@ie.ibm.com"
] |
LORENZOB@ie.ibm.com
|
b3d010c9d370b8cd0b67f57a7413cd0305ede1d4
|
bf7b4c21300a8ccebb380e0e0a031982466ccd83
|
/middlewareConcepts2014-master/Assignment3/lib/jacorb-3.4/src/generated/org/omg/CORBA/INV_OBJREFHelper.java
|
b651ea44b96f9713dcaa88bad68ae280378b09fa
|
[] |
no_license
|
Puriakshat/Tuberlin
|
3fe36b970aabad30ed95e8a07c2f875e4912a3db
|
28dcf7f7edfe7320c740c306b1c0593a6c1b3115
|
refs/heads/master
| 2021-01-19T07:30:16.857479
| 2014-11-06T18:49:16
| 2014-11-06T18:49:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,192
|
java
|
package org.omg.CORBA;
/**
* Generated from IDL exception "INV_OBJREF".
*
* @author JacORB IDL compiler V @project.version@
* @version generated at 27-May-2014 20:14:30
*/
public abstract class INV_OBJREFHelper
{
private volatile static org.omg.CORBA.TypeCode _type;
public static org.omg.CORBA.TypeCode type ()
{
if (_type == null)
{
synchronized(INV_OBJREFHelper.class)
{
if (_type == null)
{
_type = org.omg.CORBA.ORB.init().create_exception_tc(org.omg.CORBA.INV_OBJREFHelper.id(),"INV_OBJREF",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("minor", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(5)), null),new org.omg.CORBA.StructMember("completed", org.omg.CORBA.ORB.init().create_enum_tc(org.omg.CORBA.CompletionStatusHelper.id(),"CompletionStatus",new String[]{"COMPLETED_YES","COMPLETED_NO","COMPLETED_MAYBE"}), null)});
}
}
}
return _type;
}
public static void insert (final org.omg.CORBA.Any any, final org.omg.CORBA.INV_OBJREF s)
{
any.type(type());
write( any.create_output_stream(),s);
}
public static org.omg.CORBA.INV_OBJREF extract (final org.omg.CORBA.Any any)
{
org.omg.CORBA.portable.InputStream in = any.create_input_stream();
try
{
return read (in);
}
finally
{
try
{
in.close();
}
catch (java.io.IOException e)
{
throw new RuntimeException("Unexpected exception " + e.toString() );
}
}
}
public static String id()
{
return "IDL:omg.org/CORBA/INV_OBJREF:1.0";
}
public static org.omg.CORBA.INV_OBJREF read (final org.omg.CORBA.portable.InputStream in)
{
String id = in.read_string();
if (!id.equals(id())) throw new org.omg.CORBA.MARSHAL("wrong id: " + id);
int x0;
x0=in.read_ulong();
org.omg.CORBA.CompletionStatus x1;
x1=org.omg.CORBA.CompletionStatusHelper.read(in);
final org.omg.CORBA.INV_OBJREF result = new org.omg.CORBA.INV_OBJREF(id, x0, x1);
return result;
}
public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.CORBA.INV_OBJREF s)
{
out.write_string(id());
out.write_ulong(s.minor);
org.omg.CORBA.CompletionStatusHelper.write(out,s.completed);
}
}
|
[
"puri.akshat@gmail.com"
] |
puri.akshat@gmail.com
|
b51c7a680a42f774cb7976e20b99e1cf979fbfa2
|
883bbebd546b3f92be3f886e64f9e0e573e4a495
|
/src/com/nonfamous/tang/web/validator/AddGoodsValidator.java
|
795a246acac74d0377712d5d51cc4f544d561687
|
[] |
no_license
|
fred521/5iyaya
|
0c73c6e0c51014b7c64b91243adfa619c8fb1f33
|
bcce17f88dc1bbef763d902c239838fdf2c9826e
|
refs/heads/master
| 2021-01-17T08:28:27.631964
| 2014-12-14T21:09:28
| 2014-12-14T21:09:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,585
|
java
|
package com.nonfamous.tang.web.validator;
import java.util.ArrayList;
import java.util.Collections;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.ServletRequestUtils;
import com.nonfamous.commom.form.FieldConfig;
import com.nonfamous.commom.form.Form;
import com.nonfamous.commom.form.FormFactory;
import com.nonfamous.tang.domain.GoodsBaseInfo;
public class AddGoodsValidator {
private FormFactory factory;
private HttpServletRequest request;
private Form form;
public void setFactory(FormFactory factory) {
this.factory = factory;
}
public void setRequest(HttpServletRequest request) {
this.request = request;
}
public Form getForm() {
return form;
}
public void setForm(Form form) {
this.form = form;
}
/**
* Validate method.
*
* @return
*/
public boolean validate(){
form = factory.getForm("addGoods", request);
String goodsType = ServletRequestUtils.getStringParameter(
request, "goodsType", GoodsBaseInfo.NORMAL_TYPE);
if(GoodsBaseInfo.NORMAL_TYPE.equals(goodsType)){
form.getField("groupPrice").setFieldConfigs(new ArrayList<FieldConfig>());
form.getField("groupDefaultNum").setFieldConfigs(new ArrayList<FieldConfig>());
}
else if(GoodsBaseInfo.TEAM_TYPE.equals(goodsType)){
form.getField("batchPrice").setFieldConfigs(new ArrayList<FieldConfig>());
form.getField("batchNum").setFieldConfigs(new ArrayList<FieldConfig>());
}
else if(GoodsBaseInfo.MIXED_TYPE.equals(goodsType)){
//ignore since there is already configured validation.
}
return form.isValide();
}
}
|
[
"fred.dai@perficient.com"
] |
fred.dai@perficient.com
|
d63fafd04d6abdea311f72367678300daf8b9850
|
b998b375e53c0d8141db7f8e07cb01b494ed3d0a
|
/Decompiled-APK/com/samsung/android/spayfw/remoteservice/Response.java
|
53d3b0d570f39785b67def4627841ee3ac0bf35e
|
[] |
no_license
|
atthisaccount/SPay-inner-workings
|
c3b6256c8ed10c2492d19eca8e63f656cd855be2
|
6dd83a6ea0916c272423ea0dc1fa3757baa632e7
|
refs/heads/master
| 2022-03-22T04:12:05.100198
| 2019-10-06T13:25:49
| 2019-10-06T13:25:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 758
|
java
|
package com.samsung.android.spayfw.remoteservice;
import com.samsung.android.spayfw.remoteservice.models.ErrorResponseData;
/* renamed from: com.samsung.android.spayfw.remoteservice.c */
public class Response<T> {
private ErrorResponseData AG;
private String AH;
private T result;
private int statusCode;
public Response(ErrorResponseData errorResponseData, T t, int i) {
this.AG = errorResponseData;
this.result = t;
this.statusCode = i;
}
public ErrorResponseData fa() {
return this.AG;
}
public T getResult() {
return this.result;
}
public int getStatusCode() {
return this.statusCode;
}
public void bh(String str) {
this.AH = str;
}
}
|
[
"pandalion98@gmail.com"
] |
pandalion98@gmail.com
|
6842edcd792cfd1a6769951c87ca3a2d28f7f383
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Log4j/Log4j1831.java
|
ad78f5e9408717decedf930a9f59caab1c4d22d2
|
[] |
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
| 474
|
java
|
@Test
public void testRollingRandomAccessFileAppender() {
// @formatter:off
RollingRandomAccessFileAppender.newBuilder()
.withName("test2")
.withFileName("target/testcmd2.log")
.withFilePattern("target/testcmd2.log.%d{yyyy-MM-dd}")
.withPolicy(createPolicy())
.withStrategy(createStrategy())
.setConfiguration(configuration)
.build();
// @formatter:on
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
29e3fecf71cdc1a5fe809ea946722dd51125a4cc
|
a0a146c41685f7a157938c3af0f5771f8a0ac42e
|
/src/test/java/com/example/demo/controllers/OrderControllerTest.java
|
64f31dae0b62ded79152b21b1bf019b9f0da392d
|
[] |
no_license
|
mtpayne/und-ecommerce
|
9904bf72bf5d0b275b4e169301883c9791617fed
|
b3c10de7bb981319622819d02c684bb4fef41976
|
refs/heads/master
| 2020-08-10T08:34:59.222586
| 2019-10-11T18:22:45
| 2019-10-11T18:22:45
| 214,302,438
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,240
|
java
|
package com.example.demo.controllers;
import com.example.demo.TestUtils;
import com.example.demo.model.persistence.Cart;
import com.example.demo.model.persistence.Item;
import com.example.demo.model.persistence.User;
import com.example.demo.model.persistence.UserOrder;
import com.example.demo.model.persistence.repositories.OrderRepository;
import com.example.demo.model.persistence.repositories.UserRepository;
import org.junit.Before;
import org.junit.Test;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import java.math.BigDecimal;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class OrderControllerTest {
private OrderController orderController;
private UserRepository userRepository = mock(UserRepository.class);
private OrderRepository orderRepository = mock(OrderRepository.class);
@Before
public void setUp() throws Exception {
orderController = new OrderController();
TestUtils.injectObjects(orderController, "userRepository", userRepository);
TestUtils.injectObjects(orderController, "orderRepository", orderRepository);
}
@Test
public void submit() {
User user = new User();
user.setUsername("Username");
Item item = new Item();
item.setId(1L);
item.setPrice(new BigDecimal(2));
Cart cart = new Cart();
cart.addItem(item);
user.setCart(cart);
when(userRepository.findByUsername("Username")).thenReturn(user);
ResponseEntity<UserOrder> response = orderController.submit("Username");
assertNotNull(response);
assertEquals(HttpStatus.OK, response.getStatusCode());
}
@Test
public void getOrdersForUser() {
User user = new User();
user.setUsername("Username");
when(userRepository.findByUsername("Username")).thenReturn(user);
ResponseEntity<List<UserOrder>> response = orderController.getOrdersForUser("Username");
assertNotNull(response);
assertEquals(HttpStatus.OK, response.getStatusCode());
}
}
|
[
"admin@example.com"
] |
admin@example.com
|
369135992810f0b2dbcb85bbbf11a932baa693ce
|
377405a1eafa3aa5252c48527158a69ee177752f
|
/src/com/biznessapps/around_us/AroundUsActivity$1.java
|
03fb725b29c6325602d5abb9f9da47b78e00eec3
|
[] |
no_license
|
apptology/AltFuelFinder
|
39c15448857b6472ee72c607649ae4de949beb0a
|
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
|
refs/heads/master
| 2016-08-12T04:00:46.440301
| 2015-10-25T18:25:16
| 2015-10-25T18:25:16
| 44,921,258
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,496
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.biznessapps.around_us;
import android.graphics.Bitmap;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.biznessapps.common.entities.MapEntity;
import com.biznessapps.location.LocationUtils;
import com.biznessapps.location.entities.LocationEntity;
import com.biznessapps.utils.StringUtils;
import com.biznessapps.utils.google.caching.ImageFetcher;
import com.google.android.gms.maps.model.Marker;
import java.util.Map;
// Referenced classes of package com.biznessapps.around_us:
// AroundUsActivity
class alog
implements com.google.android.gms.maps.wAdapter
{
final AroundUsActivity this$0;
private final View view;
public View getInfoContents(Marker marker)
{
if (marker != null && marker.isInfoWindowShown())
{
marker.hideInfoWindow();
marker.showInfoWindow();
}
return null;
}
public View getInfoWindow(final Marker marker)
{
Object obj = (MapEntity)AroundUsActivity.access$000(AroundUsActivity.this).get(marker);
if (obj instanceof tem)
{
obj = (tem)obj;
if (((tem) (obj)).isCurrentLocoation())
{
marker = getLayoutInflater().inflate(com.biznessapps.layout.ialog, null);
((TextView)marker.findViewById(com.biznessapps.layout.ialog)).setText(((tem) (obj)).getGeneralInfo());
return marker;
}
((TextView)view.findViewById(com.biznessapps.layout.._cls1.view)).setText((new StringBuilder()).append("\u200E").append(Html.fromHtml(((tem) (obj)).getName())).toString());
((TextView)view.findViewById(com.biznessapps.layout.._cls1.view)).setText((new StringBuilder()).append("\u200E").append(Html.fromHtml(((tem) (obj)).getLocation().getAddress1())).toString());
Object obj1 = (TextView)view.findViewById(com.biznessapps.layout.._cls1.view);
LocationUtils.setDistanceValue(getApplicationContext(), ((TextView) (obj1)), ((MapEntity) (obj)));
obj1 = (ImageView)view.findViewById(com.biznessapps.layout.._cls1.view);
if (StringUtils.isNotEmpty(((tem) (obj)).getImageUrl()) && !((tem) (obj)).getImageUrl().contains("aroundus.png"))
{
AroundUsActivity.access$100(AroundUsActivity.this).loadCircledBackground(((tem) (obj)).getImageUrl(), ((View) (obj1)), new com.biznessapps.utils.google.caching.ImageWorker.ImageLoadCallback() {
final AroundUsActivity._cls1 this$1;
final Marker val$marker;
public void onImageLoaded(String s, Bitmap bitmap, View view1)
{
((ImageView)view1).setImageBitmap(bitmap);
getInfoContents(marker);
}
{
this$1 = AroundUsActivity._cls1.this;
marker = marker1;
super();
}
});
}
}
return view;
}
_cls1.val.marker()
{
this$0 = AroundUsActivity.this;
super();
view = getLayoutInflater().inflate(com.biznessapps.layout._dialog, null);
}
}
|
[
"rich.foreman@apptology.com"
] |
rich.foreman@apptology.com
|
5c0a03a2cfd3405188b54aa6f68c2f1f28a456ad
|
fd06ec5302fe88723697ba56f0494369a941b835
|
/plugin/coverage/src/com/perl5/lang/perl/coverage/PerlCoverageProgramRunner.java
|
f4726e89af8a05ec7009660b8128debd7ea77405
|
[
"Apache-2.0"
] |
permissive
|
ssccloud/Perl5-IDEA
|
bc8879a9614a14a0c1b06bba827453544e17575a
|
14ab31db295f64aabd90926116eac6cde4061e16
|
refs/heads/master
| 2023-07-19T02:33:41.103273
| 2021-09-12T15:22:57
| 2021-09-12T15:22:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,208
|
java
|
/*
* Copyright 2015-2021 Alexandr Evstigneev
*
* 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.perl5.lang.perl.coverage;
import com.intellij.coverage.CoverageDataManager;
import com.intellij.coverage.CoverageExecutor;
import com.intellij.coverage.CoverageRunnerData;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.ExecutionManager;
import com.intellij.execution.Executor;
import com.intellij.execution.configurations.ConfigurationInfoProvider;
import com.intellij.execution.configurations.RunProfile;
import com.intellij.execution.configurations.RunnerSettings;
import com.intellij.execution.process.ProcessHandler;
import com.intellij.execution.runners.DefaultProgramRunnerKt;
import com.intellij.execution.runners.ExecutionEnvironment;
import com.intellij.execution.ui.RunContentDescriptor;
import com.perl5.lang.perl.idea.run.GenericPerlProgramRunner;
import com.perl5.lang.perl.idea.run.GenericPerlRunConfiguration;
import com.perl5.lang.perl.idea.run.PerlRunProfileState;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class PerlCoverageProgramRunner extends GenericPerlProgramRunner {
@Override
public @NotNull String getRunnerId() {
return "PERL5_COVERAGE_RUNNER";
}
@Override
public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) {
return executorId.equals(CoverageExecutor.EXECUTOR_ID) && profile instanceof GenericPerlRunConfiguration;
}
@Override
protected @Nullable PerlRunProfileState createState(@NotNull Executor executor, @NotNull ExecutionEnvironment executionEnvironment)
throws ExecutionException {
return new PerlCoverageProfileState(executionEnvironment);
}
@Override
public @Nullable RunnerSettings createConfigurationData(@NotNull ConfigurationInfoProvider settingsProvider) {
return new CoverageRunnerData();
}
@Override
public void execute(@NotNull ExecutionEnvironment environment) throws ExecutionException {
ExecutionManager.getInstance(environment.getProject()).startRunProfile(environment, state -> {
GenericPerlRunConfiguration runConfiguration = (GenericPerlRunConfiguration)environment.getRunProfile();
RunContentDescriptor descriptor = DefaultProgramRunnerKt.executeState(state, environment, this);
if (descriptor == null) {
return null;
}
ProcessHandler processHandler = descriptor.getProcessHandler();
if (processHandler != null) {
CoverageDataManager.getInstance(runConfiguration.getProject())
.attachToProcess(processHandler, runConfiguration, environment.getRunnerSettings());
}
return descriptor;
});
}
}
|
[
"hurricup@gmail.com"
] |
hurricup@gmail.com
|
6b827e644f84c8aa3bd926971163fd1ff28a587b
|
530cae66ef69f8c369c0018301ea73b36e713e27
|
/src/main/java/sonar/calculator/mod/network/packets/PacketJumpModule.java
|
96ea7dfd869f8afdf652fe0d7b79b7c635d453c0
|
[
"MIT"
] |
permissive
|
Rumaruka/Calculator
|
ed7678041fde8a77e41fc9782295b08b156f4ab0
|
8ac43a2ed189e9cf8402229a575b649b420cfe4f
|
refs/heads/1.9.4
| 2021-01-14T14:16:34.983268
| 2018-06-10T10:32:54
| 2018-06-10T10:32:54
| 63,601,513
| 0
| 0
| null | 2018-06-10T10:32:55
| 2016-07-18T12:34:03
|
Java
|
UTF-8
|
Java
| false
| false
| 3,585
|
java
|
package sonar.calculator.mod.network.packets;
import io.netty.buffer.ByteBuf;
import java.util.Random;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import net.minecraftforge.fml.relauncher.Side;
import sonar.calculator.mod.api.items.IModuleProvider;
import sonar.core.SonarCore;
import cofh.api.energy.IEnergyContainerItem;
public class PacketJumpModule implements IMessage {
public BlockPos pos;
public PacketJumpModule() {
}
public PacketJumpModule(BlockPos pos) {
this.pos = pos;
}
@Override
public void fromBytes(ByteBuf buf) {
this.pos = new BlockPos(buf.readInt(), buf.readInt(), buf.readInt());
}
@Override
public void toBytes(ByteBuf buf) {
buf.writeInt(pos.getX());
buf.writeInt(pos.getY());
buf.writeInt(pos.getZ());
}
public static class Handler implements IMessageHandler<PacketJumpModule, IMessage> {
public IMessage onMessage(PacketJumpModule message, MessageContext ctx) {
EntityPlayer player = SonarCore.proxy.getPlayerEntity(ctx);
if (player != null && ctx.side == Side.SERVER) {
ItemStack held = player.getHeldItemMainhand();
if (message.pos.getY() <= 0) {
return null;
}
if (held != null && held.getItem() instanceof IModuleProvider && held.getItem() instanceof IEnergyContainerItem) {
IEnergyContainerItem item = (IEnergyContainerItem) held.getItem();
if (player.capabilities.isCreativeMode || item.getEnergyStored(held) > 1000) {
player.setPositionAndUpdate(message.pos.getX() + 0.5, message.pos.getY() + 1, message.pos.getZ() + 0.5);
player.getEntityWorld().playSound(player, player.getPosition(), SoundEvent.REGISTRY.getObject(new ResourceLocation("mob.endermen.portal")), SoundCategory.HOSTILE, 1.0F, 1.0F);
if (!player.capabilities.isCreativeMode)
item.extractEnergy(held, 1000, true);
return new PacketJumpModule(message.pos);
}
}
} else if (player != null && ctx.side == Side.CLIENT) {
Random rand = new Random();
for (int i = 0; i < 32; ++i) {
player.getEntityWorld().spawnParticle(EnumParticleTypes.PORTAL, player.posX, player.posY + rand.nextDouble() * 2.0D, player.posZ, rand.nextGaussian(), 0.0D, rand.nextGaussian(), new int[0]);
}
/*
int i = 12;
for (int l = 0; l < i; ++l) {
double d6 = message.pos.getX() + rand.nextFloat();
double d1 = message.pos.getY() + 1 + rand.nextFloat();
d6 = message.pos.getZ() + rand.nextFloat();
double d3 = 0.0D;
double d4 = 0.0D;
double d5 = 0.0D;
int i1 = rand.nextInt(2) * 2 - 1;
int j1 = rand.nextInt(2) * 2 - 1;
d3 = (rand.nextFloat() - 0.5D) * 0.125D;
d4 = (rand.nextFloat() - 0.5D) * 0.125D;
d5 = (rand.nextFloat() - 0.5D) * 0.125D;
double d2 = message.pos.getZ() + 0.5D + 0.25D * j1;
d5 = rand.nextFloat() * 1.0F * j1;
double d0 = message.pos.getX() + 0.5D + 0.25D * i1;
d3 = rand.nextFloat() * 1.0F * i1;
player.getEntityWorld().spawnParticle(EnumParticleTypes.PORTAL, d0, d1, d2, d3, d4, d5);
}
player.getEntityWorld().playSoundAtEntity(player, "mob.endermen.portal", 1.0F, 1.0F);
*/
}
return null;
}
}
}
|
[
"ollielansdell@hotmail.co.uk"
] |
ollielansdell@hotmail.co.uk
|
d24fb11b06332100d9b385367843120aaa0325b2
|
8f86c6cd69af01feddf6ad852cb43d63d5486439
|
/src/main/java/com/viettel/construction/model/api/AuthenticationInfo.java
|
e33b5631c378dd63e0ff0329203f43004731b1a8
|
[] |
no_license
|
si1991Van/xay-lap
|
3d36c57d3b91cbc2815f35faf270cd229ab0f1d1
|
4cb6c327fbee09ee01b43666b87eb5c1397eb2c8
|
refs/heads/master
| 2022-10-01T14:12:58.413336
| 2020-06-08T01:05:35
| 2020-06-08T01:05:35
| 267,989,939
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 941
|
java
|
package com.viettel.construction.model.api;
/**
* Created by manro on 3/6/2018.
*/
public class AuthenticationInfo {
private String username;
private String password;
private String version;
public AuthenticationInfo() {
}
public AuthenticationInfo(String username, String password, String version) {
this.username = username;
this.password = password;
this.version = version;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}
|
[
"sivannguyen1991@gmail.com"
] |
sivannguyen1991@gmail.com
|
c92f9be738a1a3e4301f5d808c46ed1003a09eff
|
81be44cf072ce0480788bb29e99fa1c8eb916d9e
|
/src/main/java/site/binghai/Entity/DayInCalendar.java
|
8494c3041fff249e85fe7eecb5d85f85befac9ca
|
[] |
no_license
|
IceSeaOnly/Calendar
|
f3b641a4eb8725031eabbf9dd1cabbc55ea52afb
|
2e90e32708d60bf206d8e1db297ef5b38d9d7f44
|
refs/heads/master
| 2021-01-20T16:09:26.427118
| 2017-05-16T10:13:08
| 2017-05-16T10:13:08
| 90,818,831
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,184
|
java
|
package site.binghai.Entity;
import java.util.List;
/**
* Created by IceSea on 2017/5/10.
* GitHub: https://github.com/IceSeaOnly
* 日历中每天的表示元素
*/
public class DayInCalendar {
private int day;
private int leftOff;
private int topOff;
private int flagWordX;
private int flagWordY;
private int flagX;
private int flagY;
private int topEventLeft;
private int topEventTop;
public DayInCalendar(int day, int leftOff, int topOff, int flagWordX, int flagWordY, int flagX, int flagY,int tl,int tt) {
this.day = day;
this.leftOff = leftOff;
this.topOff = topOff;
this.flagWordX = flagWordX;
this.flagWordY = flagWordY;
this.flagX = flagX;
this.flagY = flagY;
this.topEventLeft = tl;
this.topEventTop = tt;
}
public DayInCalendar() {
}
public int getDay() {
return day;
}
public void setDay(int day) {
this.day = day;
}
public int getLeftOff() {
return leftOff;
}
public void setLeftOff(int leftOff) {
this.leftOff = leftOff;
}
public int getTopOff() {
return topOff;
}
public void setTopOff(int topOff) {
this.topOff = topOff;
}
public int getFlagX() {
return flagX;
}
public void setFlagX(int flagX) {
this.flagX = flagX;
}
public int getFlagY() {
return flagY;
}
public void setFlagY(int flagY) {
this.flagY = flagY;
}
public int getFlagWordX() {
return flagWordX;
}
public void setFlagWordX(int flagWordX) {
this.flagWordX = flagWordX;
}
public int getFlagWordY() {
return flagWordY;
}
public void setFlagWordY(int flagWordY) {
this.flagWordY = flagWordY;
}
public int getTopEventLeft() {
return topEventLeft;
}
public void setTopEventLeft(int topEventLeft) {
this.topEventLeft = topEventLeft;
}
public int getTopEventTop() {
return topEventTop;
}
public void setTopEventTop(int topEventTop) {
this.topEventTop = topEventTop;
}
}
|
[
"1041414957@qq.com"
] |
1041414957@qq.com
|
be15c8a332170866775220963cb2f25935af0732
|
7b82d70ba5fef677d83879dfeab859d17f4809aa
|
/tmp/sys/demo22/src/main/java/com/flowable/demo/Demo.java
|
c054c20d042c1b18ed9060573ed456587220bb87
|
[] |
no_license
|
apollowesley/jun_test
|
fb962a28b6384c4097c7a8087a53878188db2ebc
|
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
|
refs/heads/main
| 2022-12-30T20:47:36.637165
| 2020-10-13T18:10:46
| 2020-10-13T18:10:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,360
|
java
|
package com.flowable.demo;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.flowable.engine.DynamicBpmnService;
import org.flowable.engine.FormService;
import org.flowable.engine.HistoryService;
import org.flowable.engine.IdentityService;
import org.flowable.engine.ManagementService;
import org.flowable.engine.ProcessEngine;
import org.flowable.engine.ProcessEngineConfiguration;
import org.flowable.engine.ProcessEngines;
import org.flowable.engine.RepositoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.engine.form.FormProperty;
import org.flowable.engine.form.FormType;
import org.flowable.engine.form.StartFormData;
import org.flowable.engine.form.TaskFormData;
import org.flowable.engine.impl.form.DateFormType;
import org.flowable.engine.impl.form.EnumFormType;
import org.flowable.engine.repository.Deployment;
import org.flowable.engine.repository.DeploymentBuilder;
import org.flowable.engine.runtime.ProcessInstance;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:flowable-context.xml")
public class Demo {
private ProcessEngine processEngine;
private TaskService taskService;
private RuntimeService runtimeService;
private RepositoryService repositoryService;
private HistoryService historyService;
private DynamicBpmnService dynamicBpmnService;
private FormService formService;
private IdentityService identityService;
private ManagementService managementService;
private ProcessEngineConfiguration processEngineConfiguration;
@Before
public void testProcessEngine() {
processEngine = ProcessEngines.getDefaultProcessEngine();
System.out.println("流程引擎类:" + processEngine);
taskService = processEngine.getTaskService();
System.out.println(taskService);
runtimeService = processEngine.getRuntimeService();
System.out.println(taskService);
repositoryService = processEngine.getRepositoryService();
System.out.println(repositoryService);
historyService = processEngine.getHistoryService();
System.out.println(historyService);
dynamicBpmnService = processEngine.getDynamicBpmnService();
System.out.println(dynamicBpmnService);
formService = processEngine.getFormService();
System.out.println(formService);
identityService = processEngine.getIdentityService();
System.out.println(identityService);
managementService = processEngine.getManagementService();
System.out.println(managementService);
String name = processEngine.getName();
System.out.println("流程引擎的名称: " + name);
processEngineConfiguration = processEngine.getProcessEngineConfiguration();
System.out.println(processEngineConfiguration);
}
/**
* 关闭流程引擎
*/
@After
public void close() {
processEngine.close();
}
/**
* classpath方式部署 涉及三张表:ACT_RE_PROCDEF,ACT_RE_DEPLOYMENT,ACT_GE_BYTEARRAY
*/
@Test
public void deploy() {
DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().category("formTask").key("formTask")
.name("动态表单").addClasspathResource("动态表单.bpmn20.xml");
Deployment deploy = deploymentBuilder.deploy();
System.out.println("请假流程部署,流程ID: " + deploy.getId());
}
/**
* 获取开始节点表单信息
*/
@Test
public void getStartFormData() {
String processDefinitionId = "dynamicform:1:4";
StartFormData startFormData = formService.getStartFormData(processDefinitionId);
System.out.println(startFormData.getProcessDefinition());
System.out.println(startFormData.getDeploymentId());
System.out.println(startFormData.getFormKey());
List<FormProperty> formProperties = startFormData.getFormProperties();
for (FormProperty fm : formProperties) {
System.out.println("############################");
System.out.println(fm.getId());
System.out.println(fm.getName());
FormType formType = fm.getType();
System.out.println(formType);
String key = "";
if (formType instanceof EnumFormType) {
key = "values";
} else if (formType instanceof DateFormType) {
key = "datePattern";
}
Object information = formType.getInformation(key);
System.out.println("information:" + information);
System.out.println(fm.getValue());
System.out.println("############################");
}
}
/**
* 启动流程实例:表单流程也可以用这种方式启动
*/
@Test
public void startProcessInstanceByKey() {
String processDefinitionKey = "dynamicform";
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processDefinitionKey);
System.out.println(processInstance.getId() + "," + processInstance.getActivityId());
}
/**
* 启动表单流程
*/
@Test
public void submitStartFormData() {
String processDefinitionId = "dynamicform:1:4";
Map<String, String> properties = new HashMap<String, String>();
properties.put("start_time",getCurrentDate());
properties.put("end_time", getCurrentDate());
properties.put("days", "6");
properties.put("reason", "旅游");
formService.submitStartFormData(processDefinitionId, properties);
}
/**
* 保存并数据,但不会完成任务
*/
@Test
public void saveFormData() {
String taskId = "5013";
Map<String, String> properties = new HashMap<String, String>();
properties.put("start_time",getCurrentDate());
properties.put("end_time", getCurrentDate());
properties.put("day", "3");
properties.put("reason", "去玩玩1111");
formService.saveFormData(taskId, properties);
}
/**
* 保存并完成任务
*/
@Test
public void submitTaskFormData() {
String taskId = "10006";
Map<String, String> properties = new HashMap<String, String>();
properties.put("start_time",getCurrentDate());
properties.put("end_time", getCurrentDate());
properties.put("day", "20");
properties.put("reason", "去玩玩");
formService.submitTaskFormData(taskId, properties);
}
/**
* 获取任务表单信息
*/
@Test
public void getTaskFormData() {
String taskId = "5013";
TaskFormData taskFormData = formService.getTaskFormData(taskId);
List<FormProperty> formProperties = taskFormData.getFormProperties();
for (FormProperty fm : formProperties) {
System.out.println("############################");
System.out.println(fm.getId());
System.out.println(fm.getName());
FormType formType = fm.getType();
System.out.println(formType);
String key = "";
if (formType instanceof EnumFormType) {
key = "values";
} else if (formType instanceof DateFormType) {
key = "datePattern";
}
Object information = formType.getInformation(key);
System.out.println("information:" + information);
System.out.println(fm.getValue());
System.out.println("############################");
}
System.out.println(taskFormData.getTask().getName());
}
public String getCurrentDate(){
SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
String s = simpleDateFormat.format(new Date());
return s;
}
}
|
[
"wujun728@hotmail.com"
] |
wujun728@hotmail.com
|
8eb90878594cbe0b3218b767ad2d0c6bdfc54795
|
f7f773ab56f61a83032682e66019372e6e853ec9
|
/extras/wd/src/cc/alcina/extras/webdriver/api/WDWriter.java
|
ea91b997b7ba665a639d26ab5bc73ddfdf74ee7b
|
[] |
no_license
|
sp2020jarvan3/alcina
|
b4025b71375e0c0cdcda3d52400f8cba22bfb795
|
40f5089c710d37542d04fde1bcd9a5b681ca901d
|
refs/heads/main
| 2023-03-23T11:49:38.184094
| 2021-03-22T17:33:24
| 2021-03-22T17:33:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,688
|
java
|
package cc.alcina.extras.webdriver.api;
import java.io.IOException;
import java.io.PrintStream;
import java.io.StringWriter;
import java.io.Writer;
import javax.servlet.http.HttpServletResponse;
import cc.alcina.framework.entity.ResourceUtilities;
public class WDWriter {
private Writer storageWriter = new StringWriter();
private PrintStream consoleWriter = System.out;
private HttpServletResponse resp;
private boolean statsOnly;
public Writer getStorageWriter() {
return this.storageWriter;
}
public void setStorageWriter(Writer storageWriter) {
this.storageWriter = storageWriter;
}
public PrintStream getConsoleWriter() {
return this.consoleWriter;
}
public void setConsoleWriter(PrintStream consoleWriter) {
this.consoleWriter = consoleWriter;
}
public HttpServletResponse getResp() {
return this.resp;
}
public void setResp(HttpServletResponse resp) {
this.resp = resp;
}
public WDWriter() {
}
public void write(String s, int level) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < level; i++) {
sb.append("-- ");
}
sb.append(s);
s = sb.toString();
if (isStatsOnly()) {
if (ResourceUtilities.getBoolean(WDWriter.class,
"logStatsToSysOut")) {
System.out.println(s);
}
return;
}
try {
if (resp != null) {
resp.getWriter().write(s.replace("\n", "<br />\n"));
resp.getWriter().flush();
resp.flushBuffer();
} else {
consoleWriter.print(s);
}
storageWriter.write(s);
} catch (IOException e) {
e.printStackTrace();
}
}
public void setStatsOnly(boolean statsOnly) {
this.statsOnly = statsOnly;
}
public boolean isStatsOnly() {
return statsOnly;
}
}
|
[
"nick.reddel@gmail.com"
] |
nick.reddel@gmail.com
|
4c0063319812e7e8b47d609857f41a730f6cec30
|
0b574869b4a287fc42f6d7b1d4dfeb8cf283a730
|
/plugins/jira/src/main/java/org/jboss/jawabot/plugin/jira/scrapers/ScrapingException.java
|
308ea8449fcb149a97ab8123c207791fb908a1e9
|
[] |
no_license
|
OndraZizka/jawabot
|
5cb1344103638f506746b846097ffbb73d14e047
|
9e397a784dfd70e7e6a56e74ded2e5a2400a3ca4
|
refs/heads/master
| 2021-01-10T15:01:57.168285
| 2013-07-20T11:37:12
| 2013-07-20T11:37:12
| 54,440,116
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 465
|
java
|
package org.jboss.jawabot.plugin.jira.scrapers;
import org.jboss.jawabot.plugin.jira.core.JiraBotException;
/**
*
* @author Ondrej Zizka
*/
public class ScrapingException extends JiraBotException {
public ScrapingException(String message) {
super(message);
}
public ScrapingException(String message, Throwable cause) {
super(message, cause);
}
public ScrapingException(Throwable cause) {
super(cause);
}
}// class
|
[
"zizka@seznam.cz"
] |
zizka@seznam.cz
|
df7017d6bf8f0a35e48216cdadd640d7f04e3bfd
|
e4cb19a29c80033d45ec4228210cd56e2974ba0a
|
/me.tomassetti.asttransf.ui/src-gen/me/tomassetti/ui/internal/AstTransformationsDslActivator.java
|
eef37141fe065799022e44fcdf8103f82c5da0dd
|
[] |
no_license
|
ftomassetti/AntlrTransformationDsl
|
ee969cedb88e5e45efa800c0b1ed72ae0719f2c1
|
c275256d447707d30c21fb47b2926b2a4c68f142
|
refs/heads/master
| 2021-01-10T11:08:09.213591
| 2015-06-01T13:53:58
| 2015-06-01T13:53:58
| 36,652,440
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,776
|
java
|
/*
* generated by Xtext 2.9.0.v201505220408
*/
package me.tomassetti.ui.internal;
import java.util.Collections;
import java.util.Map;
import org.apache.log4j.Logger;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.ui.shared.SharedStateModule;
import org.eclipse.xtext.util.Modules2;
import org.osgi.framework.BundleContext;
import com.google.common.collect.Maps;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
/**
* This class was generated. Customizations should only happen in a newly
* introduced subclass.
*/
public class AstTransformationsDslActivator extends AbstractUIPlugin {
public static final String ME_TOMASSETTI_ASTTRANSFORMATIONSDSL = "me.tomassetti.AstTransformationsDsl";
private static final Logger logger = Logger.getLogger(AstTransformationsDslActivator.class);
private static AstTransformationsDslActivator INSTANCE;
private Map<String, Injector> injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1));
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
INSTANCE = this;
}
@Override
public void stop(BundleContext context) throws Exception {
injectors.clear();
INSTANCE = null;
super.stop(context);
}
public static AstTransformationsDslActivator getInstance() {
return INSTANCE;
}
public Injector getInjector(String language) {
synchronized (injectors) {
Injector injector = injectors.get(language);
if (injector == null) {
injectors.put(language, injector = createInjector(language));
}
return injector;
}
}
protected Injector createInjector(String language) {
try {
Module runtimeModule = getRuntimeModule(language);
Module sharedStateModule = getSharedStateModule();
Module uiModule = getUiModule(language);
Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
return Guice.createInjector(mergedModule);
} catch (Exception e) {
logger.error("Failed to create injector for " + language);
logger.error(e.getMessage(), e);
throw new RuntimeException("Failed to create injector for " + language, e);
}
}
protected Module getRuntimeModule(String grammar) {
if (ME_TOMASSETTI_ASTTRANSFORMATIONSDSL.equals(grammar)) {
return new me.tomassetti.AstTransformationsDslRuntimeModule();
}
throw new IllegalArgumentException(grammar);
}
protected Module getUiModule(String grammar) {
if (ME_TOMASSETTI_ASTTRANSFORMATIONSDSL.equals(grammar)) {
return new me.tomassetti.ui.AstTransformationsDslUiModule(this);
}
throw new IllegalArgumentException(grammar);
}
protected Module getSharedStateModule() {
return new SharedStateModule();
}
}
|
[
"federico@tomassetti.me"
] |
federico@tomassetti.me
|
725436616638b88a9d488f5b3ba17275e160dd4a
|
6f4489ebbe0df149b29905b72847ff45767b7b79
|
/activity-service/src/main/java/com/cuize/activity/service/dto/wxpreorder/WxhbPreorderQueryByPageInDto.java
|
8bb6167f0ed277ed32e89d057311a0bd0687f583
|
[] |
no_license
|
luqs/activity
|
51e60d9e97c9c83e76a6e3854e677c198f362897
|
c33db6d6d7e78562bba0abb212e42b0c11372343
|
refs/heads/master
| 2021-01-08T11:37:09.478125
| 2016-06-03T03:19:33
| 2016-06-03T03:19:33
| 60,687,034
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 741
|
java
|
package com.cuize.activity.service.dto.wxpreorder;
/**
* 分页查询入参
* @author JackieLan
*
*/
public class WxhbPreorderQueryByPageInDto {
private int start;
private int limit;
private String hbType;
private int status;
public int getStart() {
return start;
}
public void setStart(int start) {
this.start = start;
}
public int getLimit() {
return limit;
}
public void setLimit(int limit) {
this.limit = limit;
}
public String getHbType() {
return hbType;
}
public void setHbType(String hbType) {
this.hbType = hbType;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
}
|
[
"12345678"
] |
12345678
|
1f6988bdafa82b54bb676cf8885c44062c8f5436
|
b63612b0c157713f6222988df9c1a9dd678edd95
|
/hello-servlet/src/main/java/com/chen/servlet/HelloServlet.java
|
a95762fde7e3bf872ae99653f33bcf08ba744462
|
[
"Apache-2.0"
] |
permissive
|
leifchen/hello-java-gradle
|
ac8362e46ec706581747fd7c6f3178fd7e997ff8
|
6710f49e523139dbb329589d52d4c00c2cfc1348
|
refs/heads/master
| 2021-07-22T10:20:37.033987
| 2019-05-14T02:31:15
| 2019-05-14T02:31:15
| 138,532,520
| 1
| 2
|
Apache-2.0
| 2020-04-17T02:54:21
| 2018-06-25T02:10:45
|
Java
|
UTF-8
|
Java
| false
| false
| 826
|
java
|
package com.chen.servlet;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
/**
* 自定义Servlet
* <p>
* @Author LeifChen
* @Date 2019-04-23
*/
public class HelloServlet implements Servlet {
@Override
public void init(ServletConfig config) {
System.out.println("Hello Servlet init");
}
@Override
public ServletConfig getServletConfig() {
return null;
}
@Override
public void service(ServletRequest req, ServletResponse res) {
System.out.println("Hello Servlet service method");
}
@Override
public String getServletInfo() {
return null;
}
@Override
public void destroy() {
System.out.println("Hello Servlet destroy");
}
}
|
[
"leifchen90@gmail.com"
] |
leifchen90@gmail.com
|
60b0fc686f6b62159dc2078a2b8c3f8d712399f6
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_6ed7dd958c9901d9b8ee8a414a4ab51638b68341/AjaxTerm/14_6ed7dd958c9901d9b8ee8a414a4ab51638b68341_AjaxTerm_s.java
|
29e09d8c05b8569fe879159107539249a94eefc0
|
[] |
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,153
|
java
|
package org.kohsuke.ajaxterm.demo;
import com.trilead.ssh2.Connection;
import com.trilead.ssh2.InteractiveCallback;
import org.kohsuke.ajaxterm.Session;
import org.kohsuke.ajaxterm.trilead.SshProcessWithPty;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.HttpResponses;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.framework.adjunct.AdjunctManager;
import javax.servlet.ServletContext;
import java.io.IOException;
/**
* @author Kohsuke Kawaguchi
*/
public class AjaxTerm {
Session session;
public final AdjunctManager adjuncts;
public AjaxTerm(ServletContext context) {
adjuncts = new AdjunctManager(context,getClass().getClassLoader(),"adjuncts");
}
/**
* When '/' is requested, show the login page or the terminal page depending on whether the session has already been created.
*/
public HttpResponse doIndex() {
if (session!=null)
return HttpResponses.forwardToView(this,"session.gsp");
else
return HttpResponses.forwardToView(this,"login.gsp");
}
/**
* This shuttles page update and keyboard interactions.
*/
public void doU(StaplerRequest req, StaplerResponse rsp) throws Exception {
session.handleUpdate(req,rsp);
}
/**
* Start a terminal with a local shell.
*/
public HttpResponse doLocal(
@QueryParameter int w,
@QueryParameter int h) throws Exception {
destroy();
session = new Session(w,h,Session.getAjaxTerm(),"/bin/bash","--login");
return HttpResponses.redirectToDot();
}
/**
* Start a terminal with remote SSH.
*/
public HttpResponse doLogin(@QueryParameter String host, @QueryParameter int port, @QueryParameter String user, @QueryParameter final String password,
@QueryParameter int w,
@QueryParameter int h) throws Exception {
Connection con = new Connection(host, port);
if (!con.authenticateWithPassword(user,password))
con.authenticateWithKeyboardInteractive(user,new InteractiveCallback() {
public String[] replyToChallenge(String name, String instruction, int numPrompts, String[] prompt, boolean[] echo) throws Exception {
return new String[]{password};
}
});
if (!con.isAuthenticationComplete())
throw new IOException("Authentication failed");
com.trilead.ssh2.Session s = con.openSession();
s.requestPTY(Session.getAjaxTerm(), w,h,0,0,null);
s.startShell();
destroy();
session = new Session(w,h,new SshProcessWithPty(s));
return HttpResponses.redirectToDot();
}
/**
* If there's any existing session, destroy it.
*/
private void destroy() {
if (session!=null)
session.getChildProcess().destroy();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d9370c75eff9508c8ae58a6b81fc4f2784353873
|
3430c356804e60f916289508ff6ec305406995a5
|
/Chapter04/App04/src/main/java/net/homenet/Main.java
|
0a3a52a53041045041e84b84094e9cae266a94ef
|
[] |
no_license
|
mousesd/Spring4
|
1e053dce0c085c0c1f7d0d8ecbb605d728f77bca
|
8ad36703305ce43ecf48a9885b27ceddb59b8218
|
refs/heads/master
| 2020-04-07T18:56:53.420992
| 2018-12-31T04:40:52
| 2018-12-31T04:40:52
| 158,630,448
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 858
|
java
|
package net.homenet;
import org.apache.commons.dbcp.BasicDataSource;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import javax.sql.DataSource;
public class Main {
public static void main(String[] args) {
ApplicationContext context = new AnnotationConfigApplicationContext(DataSourceConfiguration.class);
BasicDataSource dataSource = (BasicDataSource) context.getBean(DataSource.class);
System.out.println("DriverName: " + dataSource.getDriverClassName());
System.out.println("Url: " + dataSource.getUrl());
System.out.println("Username: " + dataSource.getUsername());
System.out.println("Password: " + dataSource.getPassword());
System.out.println("MaxPoolSize: " + dataSource.getMaxActive());
}
}
|
[
"mousesd@gmail.com"
] |
mousesd@gmail.com
|
9f048f1eab14ea4168d3c51efb76da1b73631798
|
dbafd979fd02716644014db753e4875a4be9899f
|
/vertx-gaia/vertx-up/src/main/java/io/vertx/up/runtime/ZeroHelper.java
|
6ff4cdec98aeef6be6872223cd3bdf0c22af4376
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
silentbalanceyh/vertx-zero-0.6
|
704a226038dec8c3c07983e7fb2129f9a2f50d39
|
ac9a62fac74ece44764138417aae42f965e0e2da
|
refs/heads/master
| 2023-08-13T13:41:54.860931
| 2021-10-18T10:00:17
| 2021-10-18T10:00:17
| 418,441,292
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,653
|
java
|
package io.vertx.up.runtime;
import io.vertx.up.annotations.Agent;
import io.vertx.up.eon.Values;
import io.vertx.up.eon.em.ServerType;
import io.vertx.up.fn.Fn;
import io.vertx.up.log.Annal;
import io.vertx.up.util.Ut;
import io.vertx.zero.exception.AgentDuplicatedException;
import javax.ws.rs.Path;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.stream.Collectors;
/**
* @author Lang
*/
public class ZeroHelper {
private static final Annal LOGGER = Annal.get(ZeroHelper.class);
/**
*
**/
public static ServerType getAgentKey(final Class<?> clazz) {
return Fn.getSemi(clazz.isAnnotationPresent(Agent.class), LOGGER,
() -> Ut.invoke(clazz.getDeclaredAnnotation(Agent.class), "type"),
() -> null);
}
/**
*
**/
public static ConcurrentMap<ServerType, Boolean> isAgentDefined(
final ConcurrentMap<ServerType, List<Class<?>>> agents,
final Class<?>... exclude) {
final Set<Class<?>> excludes = new HashSet<>(Arrays.asList(exclude));
final ConcurrentMap<ServerType, Boolean> defined
= new ConcurrentHashMap<>();
for (final ServerType server : agents.keySet()) {
final List<Class<?>> item = agents.get(server);
// Filter to result.
final List<Class<?>> filtered =
item.stream()
.filter(each -> !excludes.contains(each))
.collect(Collectors.toList());
// > 1 means duplicated defined
final int size = filtered.size();
Fn.outUp(1 < size,
LOGGER, AgentDuplicatedException.class,
ZeroHelper.class, server, size,
filtered.stream()
.map(Class::getName)
.collect(Collectors.toSet()));
// == 0 means undefined
// == 1 means correct defined
defined.put(server, Values.ONE == size);
}
return defined;
}
/**
*
**/
public static Path getPath(final Class<?> clazz) {
return getPath(clazz.getDeclaredAnnotation(Path.class));
}
/**
*
**/
public static Path getPath(final Method method) {
return getPath(method.getDeclaredAnnotation(Path.class));
}
private static Path getPath(final Annotation anno) {
return (anno instanceof Path) ? (Path) anno : null;
}
}
|
[
"silentbalanceyh@126.com"
] |
silentbalanceyh@126.com
|
47efc0ce3763af530d823de2481ea898d8f02031
|
e20b9a1f40a130cbebbbfb018072eb2d07862478
|
/net/minecraft/server/WorldGenLargeFeatureStart.java
|
ca724e2b1b1940fef34313d6b3eb4b6c7effa5d9
|
[] |
no_license
|
IServerPowered/mc-dev
|
d3aec5d09375e34264037a190285dbfbc95fc46a
|
14d88a9a6d9e4c9084d3037a0682a5c415832042
|
refs/heads/1.8.3
| 2021-01-17T17:49:54.651138
| 2015-03-09T22:35:39
| 2015-03-09T22:35:39
| 33,264,491
| 2
| 0
| null | 2015-04-01T18:19:08
| 2015-04-01T18:19:07
| null |
UTF-8
|
Java
| false
| false
| 1,118
|
java
|
package net.minecraft.server;
import java.util.Random;
public class WorldGenLargeFeatureStart extends StructureStart {
public WorldGenLargeFeatureStart() {}
public WorldGenLargeFeatureStart(World world, Random random, int i, int j) {
super(i, j);
BiomeBase biomebase = world.getBiome(new BlockPosition(i * 16 + 8, 0, j * 16 + 8));
if (biomebase != BiomeBase.JUNGLE && biomebase != BiomeBase.JUNGLE_HILLS) {
if (biomebase == BiomeBase.SWAMPLAND) {
WorldGenWitchHut worldgenwitchhut = new WorldGenWitchHut(random, i * 16, j * 16);
this.a.add(worldgenwitchhut);
} else if (biomebase == BiomeBase.DESERT || biomebase == BiomeBase.DESERT_HILLS) {
WorldGenPyramidPiece worldgenpyramidpiece = new WorldGenPyramidPiece(random, i * 16, j * 16);
this.a.add(worldgenpyramidpiece);
}
} else {
WorldGenJungleTemple worldgenjungletemple = new WorldGenJungleTemple(random, i * 16, j * 16);
this.a.add(worldgenjungletemple);
}
this.c();
}
}
|
[
"Techcable@outlook.com"
] |
Techcable@outlook.com
|
56aee097f042b686aa2e48a27d5545ec7e91ec9e
|
e88e0130b3e627b0f8e514fe263208b396859ec3
|
/src/main/java/galileonews/jpa/Attachments.java
|
de0e2ede61f3d32f0b5ec0de734cd823c67b926c
|
[] |
no_license
|
sfranklyn/galileonews
|
eccef856d68514a92a96e686bb4e8ffb0e0311bc
|
cfb9ea1e58c2c1d788fbe120671b281997ead0fd
|
refs/heads/master
| 2020-12-25T15:29:13.575002
| 2016-08-10T01:25:49
| 2016-08-10T01:25:49
| 30,737,058
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,639
|
java
|
/*
* Copyright 2015 Samuel Franklyn <sfranklyn@gmail.com>.
*
* 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 galileonews.jpa;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
/**
*
* @author Samuel Franklyn <sfranklyn@gmail.com>
*/
@Entity
@Table(name = "attachments")
@NamedQueries({
@NamedQuery(name = "Attachments.selectAll",
query = "SELECT a FROM Attachments a"),
@NamedQuery(name = "Attachments.selectAllCount",
query = "SELECT COUNT(a) FROM Attachments a"),
@NamedQuery(name = "Attachments.selectByNews",
query = "SELECT a FROM Attachments a "
+ "WHERE a.newsId = :newsId"),
@NamedQuery(name = "Attachments.selectByNewsCount",
query = "SELECT COUNT(a) FROM Attachments a "
+ "WHERE a.newsId = :newsId")
})
public class Attachments extends Base implements Serializable {
private static final long serialVersionUID = -6514552662020952310L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "attachment_id", nullable = false)
private Integer attachmentId;
@JoinColumn(name = "news_id", referencedColumnName = "news_id", nullable = false)
@ManyToOne(optional = false)
private News newsId;
@Size(max = 250)
@Column(name = "attachment_file_name", length = 250)
private String attachmentFileName;
@Size(max = 30)
@Column(name = "attachment_file_type", length = 30)
private String attachmentFileType;
@Lob
@Column(name = "attachment_content")
private byte[] attachmentContent;
public Attachments() {
}
public Attachments(Integer attachmentId) {
this.attachmentId = attachmentId;
}
public Integer getAttachmentId() {
return attachmentId;
}
public void setAttachmentId(Integer attachmentId) {
this.attachmentId = attachmentId;
}
public String getAttachmentFileName() {
return attachmentFileName;
}
public void setAttachmentFileName(String attachmentFileName) {
this.attachmentFileName = attachmentFileName;
}
public String getAttachmentFileType() {
return attachmentFileType;
}
public void setAttachmentFileType(String attachmentFileType) {
this.attachmentFileType = attachmentFileType;
}
public byte[] getAttachmentContent() {
return attachmentContent;
}
public void setAttachmentContent(byte[] attachmentContent) {
this.attachmentContent = attachmentContent;
}
public News getNewsId() {
return newsId;
}
public void setNewsId(News newsId) {
this.newsId = newsId;
}
}
|
[
"sfranklyn@gmail.com"
] |
sfranklyn@gmail.com
|
adec4fcc34318157828aad99fd76d3e9707dd2f1
|
db57fceb74e14fd085aaa03e1f9343ce4350c97c
|
/file/src/main/java/com/danny/file/room/takeout/TakeoutSeller.java
|
54e3b9e992b9dc2e7222bbd03d8785ccd1805cdd
|
[
"Apache-2.0"
] |
permissive
|
dannycx/Demo
|
b8beb57ea0dda5ae982cac4193a9cff68b19bf5b
|
204fca655db00cf41fcefa187d6acfc10a073370
|
refs/heads/master
| 2020-03-23T15:57:06.582900
| 2018-07-26T06:48:54
| 2018-07-26T06:48:54
| 140,068,204
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 897
|
java
|
package com.danny.file.room.takeout;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;
/**
* 外卖表
* Created by danny on 4/21/18.
*/
@Entity(tableName = "seller")
public class TakeoutSeller {
@PrimaryKey(autoGenerate = true)
@NonNull
public int id;
public String seller_name;
public String food_name;
public int count;
public double price;
public String time_date;//版本升级添加新字段
@Override
public String toString() {
return "TakeoutSeller{" +
"id='" + id + '\'' +
", seller_name='" + seller_name + '\'' +
", food_name='" + food_name + '\'' +
", count=" + count +
", price=" + price +
", time_date=" + time_date +
'}';
}
}
|
[
"ryan.fp.chan@mail.foxconn.com"
] |
ryan.fp.chan@mail.foxconn.com
|
f3b78f8cb1cb197cab1fad860e066a6dc64089ff
|
b765ff986f0cd8ae206fde13105321838e246a0a
|
/Inspect/app/src/main/java/com/growingio_rewriter/a/c/a/g.java
|
3f1120d8cf51b877d25b847d8d0c5adaba4c856f
|
[] |
no_license
|
piece-the-world/inspect
|
fe3036409b20ba66343815c3c5c9f4b0b768c355
|
a660dd65d7f40501d95429f8d2b126bd8f59b8db
|
refs/heads/master
| 2020-11-29T15:28:39.406874
| 2016-10-09T06:24:32
| 2016-10-09T06:24:32
| 66,539,462
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 181
|
java
|
/*
* Decompiled with CFR 0_115.
*/
package com.growingio.a.c.a;
import com.growingio.a.c.a.h;
import java.lang.annotation.Annotation;
public @interface g {
public h a();
}
|
[
"taochao@corp.netease.com"
] |
taochao@corp.netease.com
|
63e4c79697f968824208044f8ffc92284048557e
|
d0090f4422e7c0b427bd515ccdec4319dc4a6bc3
|
/src/main/src/org/compass/gps/device/jdbc/datasource/DriverManagerDataSource.java
|
683d65515e19f0ca39c55e75a380a7dbd44cd344
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
gpc/compass
|
4e71e87cbcfe477482bd32fbe03587152a629590
|
6d9be5db0dfdb7d220e1d124b0d6de7ca796952f
|
refs/heads/master
| 2021-01-16T20:36:33.506173
| 2010-12-28T09:37:35
| 2011-05-25T05:37:52
| 1,797,357
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,034
|
java
|
/*
* Copyright 2004-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.compass.gps.device.jdbc.datasource;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import org.compass.gps.device.jdbc.CannotGetJdbcConnectionException;
/**
* Simple implementation of the standard JDBC DataSource interface, configuring
* a plain old JDBC Driver via bean properties, and returning a new Connection
* for every <code>getConnection</code> call.
* <p>
* Useful for test or standalone environments outside of a J2EE container.
* Pool-assuming <code>Connection.close()</code> calls will simply close the
* Connection, so any DataSource-aware persistence code should work.
* <p>
* In a J2EE container, it is recommended to use a JNDI DataSource provided by
* the container.
* <p>
* If you need a "real" connection pool outside of a J2EE container, consider <a
* href="http://jakarta.apache.org/commons/dbcp">Apache's Jakarta Commons DBCP</a>.
* Its BasicDataSource is a full connection pool bean, supporting the same basic
* properties as this class plus specific settings.
* <p>
* Taken from Spring.
*
* @author kimchy
*/
public class DriverManagerDataSource extends AbstractDataSource {
private String driverClassName;
private String url;
private String username;
private String password;
/**
* Constructor for bean-style configuration.
*/
public DriverManagerDataSource() {
}
/**
* Create a new DriverManagerDataSource with the given standard
* DriverManager parameters.
*
* @param driverClassName
* the JDBC driver class name
* @param url
* the JDBC URL to use for accessing the DriverManager
* @param username
* the JDBC username to use for accessing the DriverManager
* @param password
* the JDBC password to use for accessing the DriverManager
* @see java.sql.DriverManager#getConnection(String, String, String)
*/
public DriverManagerDataSource(String driverClassName, String url, String username, String password)
throws CannotGetJdbcConnectionException {
setDriverClassName(driverClassName);
setUrl(url);
setUsername(username);
setPassword(password);
}
/**
* Create a new DriverManagerDataSource with the given standard
* DriverManager parameters.
*
* @param url
* the JDBC URL to use for accessing the DriverManager
* @param username
* the JDBC username to use for accessing the DriverManager
* @param password
* the JDBC password to use for accessing the DriverManager
* @see java.sql.DriverManager#getConnection(String, String, String)
*/
public DriverManagerDataSource(String url, String username, String password)
throws CannotGetJdbcConnectionException {
setUrl(url);
setUsername(username);
setPassword(password);
}
/**
* Create a new DriverManagerDataSource with the given JDBC URL, not
* specifying a username or password for JDBC access.
*
* @param url
* the JDBC URL to use for accessing the DriverManager
* @see java.sql.DriverManager#getConnection(String)
*/
public DriverManagerDataSource(String url) throws CannotGetJdbcConnectionException {
setUrl(url);
}
/**
* Set the JDBC driver class name. This driver will get initialized on
* startup, registering itself with the JDK's DriverManager.
* <p>
* Alternatively, consider initializing the JDBC driver yourself before
* instantiating this DataSource.
*
* @see Class#forName(String)
* @see java.sql.DriverManager#registerDriver(java.sql.Driver)
*/
public void setDriverClassName(String driverClassName) throws CannotGetJdbcConnectionException {
this.driverClassName = driverClassName;
try {
Class.forName(this.driverClassName, true, Thread.currentThread().getContextClassLoader());
} catch (ClassNotFoundException ex) {
throw new CannotGetJdbcConnectionException("Could not load JDBC driver class [" + this.driverClassName
+ "]", ex);
}
if (log.isInfoEnabled()) {
log.info("Loaded JDBC driver [" + this.driverClassName + "]");
}
}
/**
* Return the JDBC driver class name, if any.
*/
public String getDriverClassName() {
return driverClassName;
}
/**
* Set the JDBC URL to use for accessing the DriverManager.
*
* @see java.sql.DriverManager#getConnection(String, String, String)
*/
public void setUrl(String url) {
this.url = url;
}
/**
* Return the JDBC URL to use for accessing the DriverManager.
*/
public String getUrl() {
return url;
}
/**
* Set the JDBC username to use for accessing the DriverManager.
*
* @see java.sql.DriverManager#getConnection(String, String, String)
*/
public void setUsername(String username) {
this.username = username;
}
/**
* Return the JDBC username to use for accessing the DriverManager.
*/
public String getUsername() {
return username;
}
/**
* Set the JDBC password to use for accessing the DriverManager.
*
* @see java.sql.DriverManager#getConnection(String, String, String)
*/
public void setPassword(String password) {
this.password = password;
}
/**
* Return the JDBC password to use for accessing the DriverManager.
*/
public String getPassword() {
return password;
}
/**
* This implementation delegates to
* <code>getConnectionFromDriverManager</code>, using the default
* username and password of this DataSource.
*
* @see #getConnectionFromDriverManager()
*/
public Connection getConnection() throws SQLException {
return getConnectionFromDriverManager();
}
/**
* This implementation delegates to
* <code>getConnectionFromDriverManager</code>, using the given username
* and password.
*
* @see #getConnectionFromDriverManager(String, String, String)
*/
public Connection getConnection(String username, String password) throws SQLException {
return getConnectionFromDriverManager(getUrl(), username, password);
}
/**
* Get a Connection from the DriverManager, using the default username and
* password of this DataSource.
*
* @see #getConnectionFromDriverManager(String, String, String)
*/
protected Connection getConnectionFromDriverManager() throws SQLException {
return getConnectionFromDriverManager(getUrl(), getUsername(), getPassword());
}
/**
* Getting a connection using the nasty static from DriverManager is
* extracted into a protected method to allow for easy unit testing.
*
* @see java.sql.DriverManager#getConnection(String, String, String)
*/
protected Connection getConnectionFromDriverManager(String url, String username, String password)
throws SQLException {
if (log.isDebugEnabled()) {
log.debug("Creating new JDBC connection to [" + url + "]");
}
return DriverManager.getConnection(url, username, password);
}
}
|
[
"kimchy@gmail.com"
] |
kimchy@gmail.com
|
cc1c6f17f6e67b648d698ab112d8565d89f3184c
|
43ea91f3ca050380e4c163129e92b771d7bf144a
|
/services/dcs/src/main/java/com/huaweicloud/sdk/dcs/v2/model/QueryTenantQuotaRespQuotas.java
|
4c9a5aa415a93594242bfc37a597a1bf0581137c
|
[
"Apache-2.0"
] |
permissive
|
wxgsdwl/huaweicloud-sdk-java-v3
|
660602ca08f32dc897d3770995b496a82a1cc72d
|
ee001d706568fdc7b852792d2e9aefeb9d13fb1e
|
refs/heads/master
| 2023-02-27T14:20:54.774327
| 2021-02-07T11:48:35
| 2021-02-07T11:48:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,644
|
java
|
package com.huaweicloud.sdk.dcs.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.dcs.v2.model.Resources;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.Objects;
/**
* 配额信息。
*/
public class QueryTenantQuotaRespQuotas {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="resources")
private List<Resources> resources = null;
public QueryTenantQuotaRespQuotas withResources(List<Resources> resources) {
this.resources = resources;
return this;
}
public QueryTenantQuotaRespQuotas addResourcesItem(Resources resourcesItem) {
if (this.resources == null) {
this.resources = new ArrayList<>();
}
this.resources.add(resourcesItem);
return this;
}
public QueryTenantQuotaRespQuotas withResources(Consumer<List<Resources>> resourcesSetter) {
if(this.resources == null ){
this.resources = new ArrayList<>();
}
resourcesSetter.accept(this.resources);
return this;
}
/**
* 配额列表。
* @return resources
*/
public List<Resources> getResources() {
return resources;
}
public void setResources(List<Resources> resources) {
this.resources = resources;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
QueryTenantQuotaRespQuotas queryTenantQuotaRespQuotas = (QueryTenantQuotaRespQuotas) o;
return Objects.equals(this.resources, queryTenantQuotaRespQuotas.resources);
}
@Override
public int hashCode() {
return Objects.hash(resources);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class QueryTenantQuotaRespQuotas {\n");
sb.append(" resources: ").append(toIndentedString(resources)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
6432b3752a5a49abd63b11103742c7692ed5ce69
|
90c093f59ba5e001f778ecf7beaacd6185c464d0
|
/src/com/eviware/soapui/support/types/StringToStringMap.java
|
0a2322d2f6949800613164eb02939d0e79cefc48
|
[
"MIT"
] |
permissive
|
juozasg/suis4j
|
b8c74811843cc9dfb16b3ee07fccfd7c1230f091
|
1c9f24bfc5ca98fd32882feb76c6e90440e1bcf0
|
refs/heads/master
| 2020-03-08T05:39:16.180735
| 2018-04-10T21:57:32
| 2018-04-10T21:57:32
| 127,952,899
| 0
| 0
|
MIT
| 2018-04-03T18:40:49
| 2018-04-03T18:40:49
| null |
UTF-8
|
Java
| false
| false
| 5,073
|
java
|
/*
* SoapUI, Copyright (C) 2004-2016 SmartBear Software
*
* Licensed under the EUPL, Version 1.1 or - as soon as they will be approved by the European Commission - subsequen
* versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://ec.europa.eu/idabc/eupl
*
* Unless required by applicable law or agreed to in writing, software distributed under the Licence is
* distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the Licence for the specific language governing permissions and limitations
* under the Licence.
*/
package com.eviware.soapui.support.types;
import com.eviware.soapui.SoapUI;
import com.eviware.soapui.config.StringToStringMapConfig;
import java.util.HashMap;
import java.util.Map;
/**
* HashMap<String,String>
*
* @author Ole.Matzura
*/
public class StringToStringMap extends HashMap<String, String> {
private boolean equalsOnThis;
public StringToStringMap() {
super();
}
public StringToStringMap(int initialCapacity, float loadFactor) {
super(initialCapacity, loadFactor);
}
public StringToStringMap(int initialCapacity) {
super(initialCapacity);
}
public StringToStringMap(Map<? extends String, ? extends String> m) {
super(m);
}
public String get(String key, String defaultValue) {
String value = get(key);
return value == null ? defaultValue : value;
}
/**
* Get the inverse of this map.
*/
public StringToStringMap inverse() {
StringToStringMap inverse = new StringToStringMap();
for (String key : keySet()) {
String value = get(key);
inverse.put(value, key);
}
return inverse;
}
public String toXml() {
StringToStringMapConfig xmlConfig = StringToStringMapConfig.Factory.newInstance();
for (String key : keySet()) {
StringToStringMapConfig.Entry entry = xmlConfig.addNewEntry();
entry.setKey(key);
entry.setValue(get(key));
}
return xmlConfig.toString();
}
public static StringToStringMap fromXml(String value) {
if (value == null || value.trim().length() == 0 || value.equals("<xml-fragment/>")) {
return new StringToStringMap();
}
try {
StringToStringMapConfig nsMapping = StringToStringMapConfig.Factory.parse(value);
return fromXml(nsMapping);
} catch (Exception e) {
SoapUI.logError(e);
}
return new StringToStringMap();
}
public static StringToStringMap fromXml(StringToStringMapConfig nsMapping) {
StringToStringMap result = new StringToStringMap();
for (StringToStringMapConfig.Entry entry : nsMapping.getEntryList()) {
result.put(entry.getKey(), entry.getValue());
}
return result;
}
public final boolean getBoolean(String key) {
return Boolean.parseBoolean(get(key));
}
public boolean hasValue(String key) {
return containsKey(key) && get(key).length() > 0;
}
public void putIfMissing(String key, String value) {
if (!containsKey(key)) {
put(key, value);
}
}
public void put(String key, boolean value) {
put(key, Boolean.toString(value));
}
public static StringToStringMap fromHttpHeader(String value) {
StringToStringMap result = new StringToStringMap();
int ix = value.indexOf(';');
while (ix > 0) {
extractNVPair(value.substring(0, ix), result);
value = value.substring(ix + 1);
ix = value.indexOf(';');
}
if (value.length() > 2) {
extractNVPair(value, result);
}
return result;
}
private static void extractNVPair(String value, StringToStringMap result) {
int ix;
ix = value.indexOf('=');
if (ix != -1) {
String str = value.substring(ix + 1).trim();
if (str.startsWith("\"") && str.endsWith("\"")) {
str = str.substring(1, str.length() - 1);
}
result.put(value.substring(0, ix).trim(), str);
}
}
public void setEqualsOnThis(boolean equalsOnThis) {
this.equalsOnThis = equalsOnThis;
}
@Override
public boolean equals(Object o) {
return equalsOnThis ? this == o : super.equals(o);
}
public int getInt(String key, int def) {
try {
return Integer.parseInt(get(key));
} catch (Exception e) {
return def;
}
}
public String[] getKeys() {
return keySet().toArray(new String[size()]);
}
public boolean containsKeyIgnoreCase(String string) {
for (String key : keySet()) {
if (key.equalsIgnoreCase(string)) {
return true;
}
}
return false;
}
}
|
[
"juozasgaigalas@gmail.com"
] |
juozasgaigalas@gmail.com
|
1d73008e36bc911964527f1d67d2ac8945300926
|
b4b217dd13c44750979421566f50df5a77e07dde
|
/com/planet_ink/coffee_mud/Abilities/Druid/Chant_Earthpocket.java
|
2cf48736e4161b67527b63e93faaaae3bc614c8d
|
[
"Apache-2.0"
] |
permissive
|
crosstuck/CoffeeMud
|
8ceeb19f5b333133a8b1fca23700c62472817bb5
|
b1883d526719da458621a728b570fe65fa657eb9
|
refs/heads/master
| 2023-04-07T07:34:03.467485
| 2021-03-26T22:36:36
| 2021-03-26T22:36:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,194
|
java
|
package com.planet_ink.coffee_mud.Abilities.Druid;
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.Commands.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.Libraries.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 2004-2021 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 Chant_Earthpocket extends Chant
{
@Override
public String ID()
{
return "Chant_Earthpocket";
}
private final static String localizedName = CMLib.lang().L("Earthpocket");
@Override
public String name()
{
return localizedName;
}
@Override
public String displayText()
{
return L("(Earthpocket: " + (super.tickDown / CMProps.getIntVar(CMProps.Int.TICKSPERMUDDAY)) + ")");
}
@Override
public int abstractQuality()
{
return Ability.QUALITY_OK_SELF;
}
@Override
protected int canAffectCode()
{
return CAN_MOBS;
}
@Override
public int classificationCode()
{
return Ability.ACODE_CHANT | Ability.DOMAIN_ROCKCONTROL;
}
private Container pocket = null;
@Override
public void unInvoke()
{
// undo the affects of this spell
if(!(affected instanceof MOB))
return;
final MOB mob=(MOB)affected;
super.unInvoke();
if((pocket!=null) && (!pocket.amDestroyed())&&(super.canBeUninvoked()))
{
mob.tell(L("Your earthpocket fades away, dumping its contents into your inventory!"));
final List<Item> V=pocket.getDeepContents();
for(int v=0;v<V.size();v++)
{
V.get(v).setContainer(null);
mob.moveItemTo(V.get(v));
}
pocket.destroy();
pocket=null;
}
}
@Override
public boolean okMessage(final Environmental host, final CMMsg msg)
{
if((msg.source()!=affected)
&&((msg.target()==pocket)||(msg.tool()==pocket))
&&(CMath.bset(msg.sourceMajor(),CMMsg.MASK_HANDS)
||CMath.bset(msg.sourceMajor(),CMMsg.MASK_MOVE)
||CMath.bset(msg.sourceMajor(),CMMsg.MASK_DELICATE)
||CMath.bset(msg.sourceMajor(),CMMsg.MASK_MOUTH)))
{
msg.source().tell(L("The dark pocket draws away from you, preventing your action."));
return false;
}
return true;
}
@Override
public void executeMsg(final Environmental host, final CMMsg msg)
{
super.executeMsg(host,msg);
movePocket();
}
@Override
public boolean tick(final Tickable ticking, final int tickID)
{
if(!super.tick(ticking,tickID))
return false;
movePocket();
return true;
}
public void movePocket()
{
if((affected instanceof MOB)&&(pocket!=null))
{
if(pocket.owner() instanceof MOB)
pocket.removeFromOwnerContainer();
else
if(pocket.owner() instanceof Room)
{
final Room mobR=((MOB)affected).location();
if(mobR!=null)
{
if((mobR.domainType()==Room.DOMAIN_INDOORS_CAVE)
||((mobR.getAtmosphere()&RawMaterial.MATERIAL_MASK)==RawMaterial.MATERIAL_ROCK))
{
if(CMath.bset(pocket.basePhyStats().disposition(),PhyStats.IS_NOT_SEEN))
{
pocket.basePhyStats().setDisposition(pocket.basePhyStats().disposition()-PhyStats.IS_NOT_SEEN);
pocket.recoverPhyStats();
}
if(!mobR.isContent(pocket))
{
final Room R=CMLib.map().roomLocation(pocket);
mobR.moveItemTo(pocket);
if(mobR.isContent(pocket))
{
if((R!=mobR)&&(R.isContent(pocket)))
R.delItem(pocket);
}
}
}
else
if(!CMath.bset(pocket.basePhyStats().disposition(),PhyStats.IS_NOT_SEEN))
{
pocket.basePhyStats().setDisposition(pocket.basePhyStats().disposition()|PhyStats.IS_NOT_SEEN);
pocket.recoverPhyStats();
}
}
else
if(!CMath.bset(pocket.basePhyStats().disposition(),PhyStats.IS_NOT_SEEN))
{
pocket.basePhyStats().setDisposition(pocket.basePhyStats().disposition()|PhyStats.IS_NOT_SEEN);
pocket.recoverPhyStats();
}
}
}
}
@Override
public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel)
{
MOB target=mob;
if((auto)&&(givenTarget!=null)&&(givenTarget instanceof MOB))
target=(MOB)givenTarget;
if((mob.location().domainType()!=Room.DOMAIN_INDOORS_CAVE)
&&((mob.location().getAtmosphere()&RawMaterial.MATERIAL_MASK)!=RawMaterial.MATERIAL_ROCK))
{
mob.tell(L("The earthpocket can only be summoned or seen in a cave."));
return false;
}
if(target.fetchEffect(ID())!=null)
{
mob.tell(target,null,null,L("<S-NAME> <S-IS-ARE> already connected with an earthpocket."));
return false;
}
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
final boolean success=proficiencyCheck(mob,0,auto);
if(success)
{
invoker=mob;
final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto),auto?"":L("^S<S-NAME> chant(s) for a connection with a mystical dimension!^?"));
if(mob.location().okMessage(mob,msg))
{
mob.location().send(mob,msg);
pocket=(Container)CMClass.getItem("GenContainer");
pocket.setCapacity(Integer.MAX_VALUE);
pocket.basePhyStats().setSensesMask(PhyStats.SENSE_ITEMNOTGET|PhyStats.SENSE_ALWAYSCOMPRESSED);
pocket.basePhyStats().setWeight(0);
pocket.setMaterial(RawMaterial.RESOURCE_NOTHING);
pocket.setName(L("an earthpocket"));
pocket.setDisplayText(L("an empty pitch-black pocket is in the wall here."));
pocket.setDescription(L("It looks like an endless black hole in the wall. Very mystical."));
pocket.recoverPhyStats();
target.location().addItem(pocket);
beneficialAffect(mob,target,asLevel,CMProps.getIntVar(CMProps.Int.TICKSPERMUDMONTH));
target.location().show(target,null,CMMsg.MSG_OK_VISUAL,L("A dark pocket of energy appears in a nearby wall."));
}
}
else
return beneficialWordsFizzle(mob,target,L("<S-NAME> chant(s), but nothing more happens."));
// return whether it worked
return success;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
ce98c7290fc2e3296a7ce0cf87447c8f4276eb7f
|
c43d8f1446e0dd6791b8f35848f987112c4a7d46
|
/src/trees/PreorderBST.java
|
8f989b2326764cec17cca191dcf11fbccdb5899e
|
[] |
no_license
|
khatwaniNikhil/Data-Structures-In-Java
|
4a49718221086097ab8d1c6d60db7b3775469603
|
01b9306c2847d87683d10db796a1eb1e05c98320
|
refs/heads/master
| 2021-01-12T20:05:37.968249
| 2016-05-17T16:11:04
| 2016-05-17T16:11:04
| 58,610,328
| 0
| 0
| null | 2016-05-12T05:25:22
| 2016-05-12T05:25:22
| null |
UTF-8
|
Java
| false
| false
| 1,452
|
java
|
/*
Given preorder traversal of a binary search tree, construct the BST.
*/
package trees;
public class PreorderBST {
private static int min = Integer.MIN_VALUE;
private static int max = Integer.MAX_VALUE;
private static int index = 0;
public static void main(String[] args) {
int[] preOrder = new int[]{10, 5, 1, 7, 40, 50};
Traversal.in_Order(constructTree(preOrder, preOrder.length, preOrder[0], min, max));
}
private static Node constructTree(int[] preOrder, int size, int key, int min, int max) {
if (index >= size) {
return null;
}
Node root = null;
if (key > min && key < max) {
root = new Node(key);
index++;
if (index < size) {
root.left = constructTree(preOrder, size, preOrder[index], min, root.info);
root.right = constructTree(preOrder, size, preOrder[index], root.info, max);
}
}
return root;
}
}
/*
The trick is to set a range {min .. max} for every node.
Initialize the range as {INT_MIN .. INT_MAX}.
The first node will definitely be in range, so create root node.
To construct the left subtree, set the range as {INT_MIN …root->data}.
If a values is in the range {INT_MIN .. root->data}, the values is part part of left subtree.
To construct the right subtree, set the range as {root->data..max .. INT_MAX}.
*/
|
[
"puravbhatia9@gmail.com"
] |
puravbhatia9@gmail.com
|
f7ee91c5c513fc1f3816d782e303c2bf0e031e5b
|
d802012aac989a4e7e53925f3c8e5cff7599e4d6
|
/spar-wings-event/src/main/java/jp/xet/sparwings/event/QueueMessageDescriptor.java
|
c10b3d3ddd0e327a96ef05bf62dfe655495ffe20
|
[] |
no_license
|
amcp/spar-wings
|
2c83559d06c1d679af00f6d4362987fa1616cb73
|
19f743e958785fffdb5673b0b244bad5866f0e34
|
refs/heads/master
| 2021-01-15T15:26:04.413017
| 2016-07-26T03:05:42
| 2016-07-26T03:05:42
| 65,608,894
| 0
| 0
| null | 2016-08-13T08:59:15
| 2016-08-13T08:59:14
| null |
UTF-8
|
Java
| false
| false
| 1,318
|
java
|
/*
* Copyright 2015-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jp.xet.sparwings.event;
import java.io.Serializable;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* TODO for daisuke
*
* @since 0.16
* @author daisuke
*/
@Data
@JsonInclude(Include.NON_NULL)
@Accessors(chain = true)
@SuppressWarnings("serial")
public class QueueMessageDescriptor implements Serializable {
@Getter
@Setter
@JsonProperty("queue")
private String queue;
@Getter
@Setter
@JsonProperty("message_id")
private String messageId;
}
|
[
"dai.0304@gmail.com"
] |
dai.0304@gmail.com
|
f3adf824a8cb62a6e758d92db3fea1a12565fe3d
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/springframework/boot/test/context/runner/AbstractApplicationContextRunnerTests.java
|
8ec8f0a25545f1b48148eee047b3126936c76de4
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 7,723
|
java
|
/**
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.test.context.runner;
import com.google.gson.Gson;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import org.junit.Test;
import org.springframework.boot.context.annotation.UserConfigurations;
import org.springframework.boot.test.context.FilteredClassLoader;
import org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.type.AnnotatedTypeMetadata;
import org.springframework.util.ClassUtils;
/**
* Abstract tests for {@link AbstractApplicationContextRunner} implementations.
*
* @param <T>
* The runner type
* @param <C>
* the context type
* @param <A>
* the assertable context type
* @author Stephane Nicoll
* @author Phillip Webb
*/
public abstract class AbstractApplicationContextRunnerTests<T extends AbstractApplicationContextRunner<T, C, A>, C extends ConfigurableApplicationContext, A extends ApplicationContextAssertProvider<C>> {
@Test
public void runWithInitializerShouldInitialize() {
AtomicBoolean called = new AtomicBoolean();
withInitializer(( context) -> called.set(true)).run(( context) -> {
});
AbstractApplicationContextRunnerTests.assertThat(called).isTrue();
}
@Test
public void runWithSystemPropertiesShouldSetAndRemoveProperties() {
String key = "test." + (UUID.randomUUID());
AbstractApplicationContextRunnerTests.assertThat(System.getProperties().containsKey(key)).isFalse();
withSystemProperties((key + "=value")).run(( context) -> assertThat(System.getProperties()).containsEntry(key, "value"));
AbstractApplicationContextRunnerTests.assertThat(System.getProperties().containsKey(key)).isFalse();
}
@Test
public void runWithSystemPropertiesWhenContextFailsShouldRemoveProperties() {
String key = "test." + (UUID.randomUUID());
AbstractApplicationContextRunnerTests.assertThat(System.getProperties().containsKey(key)).isFalse();
withUserConfiguration(AbstractApplicationContextRunnerTests.FailingConfig.class).run(( context) -> assertThat(context).hasFailed());
AbstractApplicationContextRunnerTests.assertThat(System.getProperties().containsKey(key)).isFalse();
}
@Test
public void runWithSystemPropertiesShouldRestoreOriginalProperties() {
String key = "test." + (UUID.randomUUID());
System.setProperty(key, "value");
try {
AbstractApplicationContextRunnerTests.assertThat(System.getProperties().getProperty(key)).isEqualTo("value");
withSystemProperties((key + "=newValue")).run(( context) -> assertThat(System.getProperties()).containsEntry(key, "newValue"));
AbstractApplicationContextRunnerTests.assertThat(System.getProperties().getProperty(key)).isEqualTo("value");
} finally {
System.clearProperty(key);
}
}
@Test
public void runWithSystemPropertiesWhenValueIsNullShouldRemoveProperty() {
String key = "test." + (UUID.randomUUID());
System.setProperty(key, "value");
try {
AbstractApplicationContextRunnerTests.assertThat(System.getProperties().getProperty(key)).isEqualTo("value");
withSystemProperties((key + "=")).run(( context) -> assertThat(System.getProperties()).doesNotContainKey(key));
AbstractApplicationContextRunnerTests.assertThat(System.getProperties().getProperty(key)).isEqualTo("value");
} finally {
System.clearProperty(key);
}
}
@Test
public void runWithMultiplePropertyValuesShouldAllAllValues() {
withPropertyValues("test.bar=2").run(( context) -> {
Environment environment = context.getEnvironment();
assertThat(environment.getProperty("test.foo")).isEqualTo("1");
assertThat(environment.getProperty("test.bar")).isEqualTo("2");
});
}
@Test
public void runWithPropertyValuesWhenHasExistingShouldReplaceValue() {
withPropertyValues("test.foo=2").run(( context) -> {
Environment environment = context.getEnvironment();
assertThat(environment.getProperty("test.foo")).isEqualTo("2");
});
}
@Test
public void runWithConfigurationsShouldRegisterConfigurations() {
withUserConfiguration(AbstractApplicationContextRunnerTests.FooConfig.class).run(( context) -> assertThat(context).hasBean("foo"));
}
@Test
public void runWithMultipleConfigurationsShouldRegisterAllConfigurations() {
withUserConfiguration(AbstractApplicationContextRunnerTests.FooConfig.class).withConfiguration(UserConfigurations.of(AbstractApplicationContextRunnerTests.BarConfig.class)).run(( context) -> assertThat(context).hasBean("foo").hasBean("bar"));
}
@Test
public void runWithFailedContextShouldReturnFailedAssertableContext() {
withUserConfiguration(AbstractApplicationContextRunnerTests.FailingConfig.class).run(( context) -> assertThat(context).hasFailed());
}
@Test
public void runWithClassLoaderShouldSetClassLoaderOnContext() {
get().withClassLoader(new FilteredClassLoader(Gson.class.getPackage().getName())).run(( context) -> assertThatExceptionOfType(.class).isThrownBy(() -> ClassUtils.forName(.class.getName(), context.getClassLoader())));
}
@Test
public void runWithClassLoaderShouldSetClassLoaderOnConditionContext() {
withUserConfiguration(AbstractApplicationContextRunnerTests.ConditionalConfig.class).run(( context) -> assertThat(context).hasSingleBean(.class));
}
@Test
public void thrownRuleWorksWithCheckedException() {
run(( context) -> assertThatIOException().isThrownBy(() -> throwCheckedException("Expected message")).withMessageContaining("Expected message"));
}
@Configuration
static class FailingConfig {
@Bean
public String foo() {
throw new IllegalStateException("Failed");
}
}
@Configuration
static class FooConfig {
@Bean
public String foo() {
return "foo";
}
}
@Configuration
static class BarConfig {
@Bean
public String bar() {
return "bar";
}
}
@Configuration
@Conditional(AbstractApplicationContextRunnerTests.FilteredClassLoaderCondition.class)
static class ConditionalConfig {}
static class FilteredClassLoaderCondition implements Condition {
@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
return (context.getClassLoader()) instanceof FilteredClassLoader;
}
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
ebff00ce6349bacb4fbd166408cce0c505046a6f
|
682bfd40c3cc651a6196e8e368696e930370a618
|
/order-service/src/main/java/ekol/orders/transportOrder/dto/Warehouse.java
|
7bcb2ae242c719232f1c13e2811e79b2bc90ea86
|
[] |
no_license
|
seerdaryilmazz/OOB
|
3b27b67ce1cbf3f411f7c672d0bed0d71bc9b127
|
199f0c18b82d04569d26a08a1a4cd8ee8c7ba42d
|
refs/heads/master
| 2022-12-30T09:23:25.061974
| 2020-10-09T13:14:39
| 2020-10-09T13:14:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 869
|
java
|
package ekol.orders.transportOrder.dto;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import ekol.orders.transportOrder.common.domain.IdNamePair;
import java.io.Serializable;
/**
* Created by kilimci on 22/08/2017.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class Warehouse implements Serializable {
private Long id;
private String name;
private IdNamePair companyLocation;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public IdNamePair getCompanyLocation() {
return companyLocation;
}
public void setCompanyLocation(IdNamePair companyLocation) {
this.companyLocation = companyLocation;
}
}
|
[
"dogukan.sahinturk@ekol.com"
] |
dogukan.sahinturk@ekol.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.