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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cee5a70b3cd944e1f1a56659f6cf4eaae79406b5
|
ff27196ffddc9937a74215daa24da0af0e398a65
|
/services/emailnotifier/api/src/main/java/org/outerj/daisy/emailnotifier/Subscription.java
|
0d80e9e0fd9584f15eebb508291bc9ea623ba6e5
|
[
"Apache-2.0"
] |
permissive
|
stevekaeser/daisycms
|
ac3a9cc7e6f2c0d46c8938f01eba63ea41569eaa
|
e772652c98742dbdb5268a9516a6ae210b9b4348
|
refs/heads/master
| 2023-03-08T10:14:43.600368
| 2022-03-16T16:42:29
| 2022-03-16T16:42:29
| 250,640,483
| 0
| 3
|
Apache-2.0
| 2023-02-22T00:15:26
| 2020-03-27T20:32:37
|
Java
|
UTF-8
|
Java
| false
| false
| 2,654
|
java
|
/*
* Copyright 2004 Outerthought bvba and Schaubroeck nv
*
* 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.outerj.daisy.emailnotifier;
import org.outerx.daisy.x10.SubscriptionDocument;
import org.outerj.daisy.repository.RepositoryException;
import org.outerj.daisy.repository.VariantKey;
import java.util.Locale;
public interface Subscription {
/**
* Returns the user to which this subscription applies.
*/
public long getUserId();
public void setReceiveDocumentEvents(boolean value);
public boolean getReceiveDocumentEvents();
public void setReceiveSchemaEvents(boolean value);
public boolean getReceiveSchemaEvents();
public void setReceiveUserEvents(boolean value);
public boolean getReceiveUserEvents();
public void setReceiveCollectionEvents(boolean value);
public boolean getReceiveCollectionEvents();
public void setReceiveAclEvents(boolean value);
public boolean getReceiveAclEvents();
public void setReceiveCommentEvents(boolean value);
public boolean getReceiveCommentEvents();
/**
* Returns the locale to use to format the notification mails, returns null if not set.
*/
public Locale getLocale();
/**
* Sets the locale used to format the notification mails.
* @param locale can be null
*/
public void setLocale(Locale locale);
public VariantKey[] getSubscribedVariantKeys();
/**
* Note: if any of the VariantKey components for an entry is '-1', it means 'any'
* (for the document ID, use '*', see also {@link EmailSubscriptionManager#DOCUMENT_ID_WILDCARD}).
*/
public void setSubscribedVariantKeys(VariantKey[] keys);
public CollectionSubscriptionKey[] getSubscribedCollectionKeys();
/**
* Note: if any of the CollectionSubscriptionKey components for an entry is '-1', it means 'any'.
*/
public void setSubscribedCollectionKeys(CollectionSubscriptionKey[] keys);
public void save() throws RepositoryException;
public SubscriptionDocument getXml();
public void setFromXml(SubscriptionDocument.Subscription subscriptionXml);
}
|
[
"stevek@ngdata.com"
] |
stevek@ngdata.com
|
9891dea9778c41968659343928598ac21bf802d3
|
c33e4029ea38999e5b35699952002f1888471b5c
|
/rgy/src/main/java/com/rgy/rgy/service/CaseLibraryService.java
|
99e406ebfab8621ffc55ee4b012d04c086a11c16
|
[] |
no_license
|
Pinyk/RgyWebAndSpringBoot
|
9410d08c072d2af7a2e47b2ce9c4c4cdddeaf41f
|
24d8dc3c472d6dbf87ace355a8be8ac60b75d185
|
refs/heads/master
| 2022-07-13T05:56:57.505024
| 2020-01-19T11:12:47
| 2020-01-19T11:12:47
| 221,175,402
| 2
| 5
| null | 2022-06-21T02:13:24
| 2019-11-12T09:09:32
|
Java
|
UTF-8
|
Java
| false
| false
| 1,328
|
java
|
package com.rgy.rgy.service;
import com.rgy.rgy.bean.CaseLibrary;
import com.rgy.rgy.dao.CaseLibraryDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class CaseLibraryService {
@Autowired
CaseLibraryDao caseLibraryDao;
public List<CaseLibrary> findByKeywordLike(String keyword){
return caseLibraryDao.findByKeywordLike("%"+keyword+"%");
}
public List<CaseLibrary> findAll(){
return caseLibraryDao.findAll();
}
public boolean add(String keyword,String root){
return caseLibraryDao.save(new CaseLibrary(keyword,root)) != null;
}
public boolean update(CaseLibrary caseLibrary){
CaseLibrary caseLibrary1 = caseLibraryDao.findByCID(caseLibrary.getCaseLibraryID());
if(caseLibrary1 == null){
return false;
}
caseLibrary1 = caseLibrary;
if(caseLibraryDao.save(caseLibrary1) != null){
return true;
}else{
return false;
}
}
public boolean delete(Integer id){
CaseLibrary caseLibrary = caseLibraryDao.findByCID(id);
if(caseLibrary != null) {
caseLibraryDao.deleteById(id);
return true;
}
return false;
}
}
|
[
"1748708966@qq.com"
] |
1748708966@qq.com
|
0954d5ac199fb35d1e86d82a60b9dbcf2c4235e3
|
677197bbd8a9826558255b8ec6235c1e16dd280a
|
/src/fm/qingting/qtradio/view/im/profile/CancelActionView.java
|
178a32eb08aecbae346672f44fc138c4c34d5d91
|
[] |
no_license
|
xiaolongyuan/QingTingCheat
|
19fcdd821650126b9a4450fcaebc747259f41335
|
989c964665a95f512964f3fafb3459bec7e4125a
|
refs/heads/master
| 2020-12-26T02:31:51.506606
| 2015-11-11T08:12:39
| 2015-11-11T08:12:39
| 45,967,303
| 0
| 1
| null | 2015-11-11T07:47:59
| 2015-11-11T07:47:59
| null |
UTF-8
|
Java
| false
| false
| 2,560
|
java
|
package fm.qingting.qtradio.view.im.profile;
import android.content.Context;
import android.graphics.Canvas;
import android.view.View.MeasureSpec;
import fm.qingting.framework.view.ButtonViewElement;
import fm.qingting.framework.view.QtView;
import fm.qingting.framework.view.ViewElement;
import fm.qingting.framework.view.ViewElement.OnElementClickListener;
import fm.qingting.framework.view.ViewLayout;
import fm.qingting.qtradio.manager.SkinManager;
public class CancelActionView extends QtView
implements ViewElement.OnElementClickListener
{
private final ViewLayout lineLayout = this.standardLayout.createChildLT(720, 1, 0, 0, ViewLayout.SCALE_FLAG_SLTCW);
private ButtonViewElement mLeftElement;
private final ViewLayout standardLayout = ViewLayout.createViewLayoutWithBoundsLT(720, 114, 720, 114, 0, 0, ViewLayout.SCALE_FLAG_SLTCW);
public CancelActionView(Context paramContext)
{
super(paramContext);
this.mLeftElement = new ButtonViewElement(paramContext);
this.mLeftElement.setBackgroundColor(SkinManager.getTextColorHighlight(), SkinManager.getBackgroundColor());
this.mLeftElement.setTextColor(SkinManager.getBackgroundColor(), SkinManager.getTextColorHighlight());
addElement(this.mLeftElement);
this.mLeftElement.setText("加入之");
this.mLeftElement.setOnElementClickListener(this);
}
private void drawLine(Canvas paramCanvas)
{
SkinManager.getInstance().drawHorizontalLine(paramCanvas, 0, this.standardLayout.width, 0, this.lineLayout.height);
}
protected void onDraw(Canvas paramCanvas)
{
super.onDraw(paramCanvas);
drawLine(paramCanvas);
}
public void onElementClick(ViewElement paramViewElement)
{
dispatchActionEvent("useraction", null);
}
protected void onMeasure(int paramInt1, int paramInt2)
{
this.standardLayout.scaleToBounds(View.MeasureSpec.getSize(paramInt1), View.MeasureSpec.getSize(paramInt2));
this.lineLayout.scaleToBounds(this.standardLayout);
this.mLeftElement.measure(this.standardLayout);
this.mLeftElement.setTextSize(SkinManager.getInstance().getMiddleTextSize());
setMeasuredDimension(this.standardLayout.width, this.standardLayout.height);
}
public void update(String paramString, Object paramObject)
{
if (paramString.equalsIgnoreCase("setData"))
this.mLeftElement.setText((String)paramObject);
}
}
/* Location: /Users/zhangxun-xy/Downloads/qingting2/classes_dex2jar.jar
* Qualified Name: fm.qingting.qtradio.view.im.profile.CancelActionView
* JD-Core Version: 0.6.2
*/
|
[
"cnzx219@qq.com"
] |
cnzx219@qq.com
|
815877ee763bb504f38157b633a705744904ec8f
|
d6715041792f5a5521495074bcc4bce31450acf4
|
/src/main/java/com/hobbitsadventure/ui/tiles/Tile.java
|
cf16cee8900d9b2615677db49b044ece86f7dad6
|
[] |
no_license
|
jlnewell216/hobbitsadventure
|
a2c977602b5d084106f5e6ae1ff05e0bbfc403c9
|
c0fe3507f25be8c274d13fb184ce0b55560efb53
|
refs/heads/master
| 2021-01-17T21:11:15.623890
| 2012-10-11T07:12:10
| 2012-10-11T07:12:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 349
|
java
|
package com.hobbitsadventure.ui.tiles;
import java.awt.Color;
/**
* Would be good to make these tiles data-driven instead of hardcoded classes.
*
* @author Willie Wheeler (willie.wheeler@gmail.com)
*/
public class Tile {
private Color color;
public Tile(Color color) { this.color = color; }
public Color getColor() { return color; }
}
|
[
"willie.wheeler@gmail.com"
] |
willie.wheeler@gmail.com
|
fce4f798b20217dae290fbe8c722e8507e85e14d
|
c4e97dce21396c2c3cd4b49442b4066b4b862523
|
/src/com/tang/intellij/devkt/lua/psi/LuaDoStat.java
|
8060c19bd640e37c6138cb78640795b9bb3f7e84
|
[
"MIT"
] |
permissive
|
devkt-plugins/emmylua-devkt
|
33c8d558fd8d9a37528c6984819a5f4bcf683e3c
|
268f8703800fc6dd3aba1ef3af0300de1136adf7
|
refs/heads/master
| 2020-03-11T15:40:17.885662
| 2018-09-15T03:19:12
| 2018-09-15T03:19:12
| 130,092,275
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 157
|
java
|
// This is a generated file. Not intended for manual editing.
package com.tang.intellij.devkt.lua.psi;
public interface LuaDoStat extends LuaStatement {
}
|
[
"ice1000kotlin@foxmail.com"
] |
ice1000kotlin@foxmail.com
|
73611367766041b15eb4be7182770eeccb28697b
|
b175b8ec89e7f6be3443b51c2f7c0c42f7cbae7b
|
/erp/erptest/src/webtest/form/cf/ProducePlanDetail.java
|
098b271ea5d15aa0069a7930530f9fb60e5eee1e
|
[] |
no_license
|
chenjuntao/jonoerp
|
84230a8681471cac7ccce1251316ab51b3d753b1
|
572994ebe7942b062d91a0802b2c2e2325da2a1d
|
refs/heads/master
| 2021-07-22T00:48:09.648040
| 2020-10-30T04:01:57
| 2020-10-30T04:01:57
| 227,536,826
| 0
| 0
| null | 2020-08-27T08:50:21
| 2019-12-12T06:32:23
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,341
|
java
|
/**
* Copyright (c) 2013
* Tanry Electronic Technology Co., Ltd.
* ChangSha, China
*
* All Rights Reserved.
*
* First created on 2016年10月20日 by yunshucjt
* Last edited on 2016年10月20日 by yunshu
*/
package webtest.form.cf;
import static webtest.form.cf.suite.CfForm.tester;
import static webtest.form.cf.suite.CfForm.logger;
import static webtest.form.cf.suite.CfForm.driver;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.JavascriptExecutor;
/**
* 说明:
*/
public class ProducePlanDetail {
@Before
public void setUp() throws Exception {
}
@Test
public void testRequire() throws Exception {
tester.clickLeftMenu("报表管理", "中央工厂生产计划明细报表");
Thread.sleep(1000);
tester.switchRightTab("中央工厂生产计划明细报表");
if (driver instanceof JavascriptExecutor) {
Boolean condition = Boolean.valueOf(((JavascriptExecutor) driver).executeScript(
"return grid.get('store').getData()==null?false:true").toString());
if (!condition) logger.debug("中央工厂生产计划明细报表grid初始化出错");
Assert.assertTrue(condition);
}
Thread.sleep(1000);
tester.closeRightTab("中央工厂生产计划明细报表");
Thread.sleep(1000);
}
}
|
[
"cjtlp2006@163.com"
] |
cjtlp2006@163.com
|
9eef2a51ee7d936e9ead1aac46777644f3adddcf
|
a4f1a8877c721c4275cb4d945abeb5da508792e3
|
/utterVoiceCommandsBETA_source_from_JADX/com/nuance/nmdp/speechkit/ae.java
|
ab3c9acfd5d0403e9456565ab632db1634be0103
|
[] |
no_license
|
coolchirag/androidRepez
|
36e686d0b2349fa823d810323034a20e58c75e6a
|
8d133ed7c523bf15670535dc8ba52556add130d9
|
refs/heads/master
| 2020-03-19T14:23:46.698124
| 2018-06-13T14:01:34
| 2018-06-13T14:01:34
| 136,620,480
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 214
|
java
|
package com.nuance.nmdp.speechkit;
public interface ae extends C0380q {
void mo209a(C0379p c0379p, String[] strArr, int[] iArr, String str);
void mo210b(C0379p c0379p);
void mo211c(C0379p c0379p);
}
|
[
"j.chirag5555@gmail.com"
] |
j.chirag5555@gmail.com
|
d9402b4312e51c68eb34450ef0b3c4a36c667520
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_ef4d5686d0c38ae2511887e5746e3e90508ec8ec/UtilsTest/12_ef4d5686d0c38ae2511887e5746e3e90508ec8ec_UtilsTest_t.java
|
f0a88454d3166f414c8f5e0868d6dd78ed319f50
|
[] |
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
| 536
|
java
|
package org.testng.internal;
import static org.testng.Assert.assertEquals;
import org.testng.annotations.Test;
/**
* Unit tests for {@link Utils}.
*
* @author Tomas Pollak
*/
public class UtilsTest {
private static final char INVALID_CHAR = 0xFFFE;
private static final char REPLACEMENT_CHAR = 0xFFFD;
@Test
public void escapeUnicode() {
assertEquals(Utils.escapeUnicode("test"), "test");
assertEquals(Utils.escapeUnicode(String.valueOf(INVALID_CHAR)),
String.valueOf(REPLACEMENT_CHAR));
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7a7ac6d13204c754862dbb4571418273308615c5
|
969844c3119e6fa8a19e4db533bb1ef3dc97a3dd
|
/src/main/java/SmallestStringStartingFromLeaf.java
|
bee5cebd923acae1ff6c5c186d6da01b88bb2347
|
[] |
no_license
|
israkul9/LeetCode
|
2f52796133bec9f897aa4fef0a20edc1a9f77799
|
b9699f5bb8f6b248b788911e4cdd378c6a9aceb2
|
refs/heads/master
| 2023-01-31T05:33:45.439042
| 2020-12-07T18:34:54
| 2020-12-07T18:34:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 994
|
java
|
import common.LeetCode;
import common.TreeNode;
/**
* @author RakhmedovRS
* @created 15-Jul-20
*/
@LeetCode(id = 988, name = "Smallest String Starting From Leaf", url = "https://leetcode.com/problems/smallest-string-starting-from-leaf/")
public class SmallestStringStartingFromLeaf
{
public String smallestFromLeaf(TreeNode root)
{
String[] min = new String[]{null};
dfs(root, new StringBuilder(), min);
return min[0];
}
private void dfs(TreeNode root, StringBuilder current, String[] min)
{
if (root == null)
{
return;
}
current.append((char) (root.val + 'a'));
if (root.left == null && root.right == null)
{
String word = current.reverse().toString();
current.reverse();
if (min[0] == null || min[0].isEmpty() || word.compareTo(min[0]) < 0)
{
min[0] = word;
}
current.deleteCharAt(current.length() - 1);
return;
}
dfs(root.left, current, min);
dfs(root.right, current, min);
current.deleteCharAt(current.length() - 1);
}
}
|
[
"rakhmedovrs@gmail.com"
] |
rakhmedovrs@gmail.com
|
c68ebaefe752a969ce895ac7cbdcc13b786bfd4c
|
eeaeddeab4775a1742dba5c8898686fd38caf669
|
/jvm/src/main/java/com/zsw/lesson/l4/Customer.java
|
c64bf38006203ed5b6d74e1f735cfa65530e4935
|
[
"Apache-2.0"
] |
permissive
|
MasterOogwayis/spring
|
8250dddd5d6ee9730c8aec4a7aeab1b80c3bf750
|
c9210e8d3533982faa3e7b89885fd4c54f27318e
|
refs/heads/master
| 2023-07-23T09:49:37.930908
| 2023-07-21T03:04:27
| 2023-07-21T03:04:27
| 89,329,352
| 0
| 0
|
Apache-2.0
| 2023-06-14T22:51:13
| 2017-04-25T07:13:03
|
Java
|
UTF-8
|
Java
| false
| false
| 131
|
java
|
package com.zsw.lesson.l4;
/**
* @author ZhangShaowei on 2021/4/9 17:25
*/
public interface Customer {
boolean isVIP();
}
|
[
"499504777@qq.com"
] |
499504777@qq.com
|
3ad36bab2ae6db784505a587653b76b8cbb14532
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/HyperSQL/HyperSQL2001.java
|
f0c4850fd75dba71d6a103a31876d43a904214a4
|
[] |
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
| 1,032
|
java
|
protected void openConnection(String host, int port, boolean isTLS) {
try {
if (isTLSWrapper) {
socket =
HsqlSocketFactory.getInstance(false).createSocket(host,
port);
}
socket = HsqlSocketFactory.getInstance(isTLS).createSocket(socket,
host, port);
socket.setTcpNoDelay(true);
dataOutput = new DataOutputStream(socket.getOutputStream());
dataInput = new DataInputStream(
new BufferedInputStream(socket.getInputStream()));
handshake();
} catch (Exception e) {
// The details from "e" should not be thrown away here. This is
// very useful info for end users to diagnose the runtime problem.
throw new HsqlException(e, Error.getStateString(ErrorCode.X_08001),
-ErrorCode.X_08001);
}
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
930456dff33cd10b320c7ef2d761532091c3d0da
|
7b81ddd3280abfbb8c3529e116a2209cbee18c9e
|
/src/main/java/nc/block/NCBlockMushroom.java
|
b8b40a109e1209b43493f940c343ee96daf76155
|
[
"CC0-1.0"
] |
permissive
|
dizzyd/NuclearCraft
|
84be0c93cda968e70d86c91ad73712595156fd89
|
01ab0221462b301be59c6af8bfbae2c3627e4c1e
|
refs/heads/master
| 2022-06-24T00:50:46.570414
| 2020-05-03T18:43:22
| 2020-05-03T19:04:47
| 110,978,229
| 0
| 0
| null | 2017-11-16T14:00:29
| 2017-11-16T14:00:28
| null |
UTF-8
|
Java
| false
| false
| 2,090
|
java
|
package nc.block;
import java.util.Random;
import nc.config.NCConfig;
import net.minecraft.block.BlockMushroom;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class NCBlockMushroom extends BlockMushroom {
public NCBlockMushroom() {
super();
}
@Override
public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) {
if (NCConfig.mushroom_spread_rate <= 0) return;
int spreadTime = 400/NCConfig.mushroom_spread_rate;
if (spreadTime <= 0) spreadTime = 1;
if (rand.nextInt(spreadTime) == 0) {
int shroomCheck = 5;
for (BlockPos blockpos : BlockPos.getAllInBoxMutable(pos.add(-4, -1, -4), pos.add(4, 1, 4))) {
if (world.getBlockState(blockpos).getBlock() == this) {
shroomCheck--;
if (shroomCheck <= 0) return;
}
}
BlockPos newPos = pos.add(rand.nextInt(3) - 1, rand.nextInt(2) - rand.nextInt(2), rand.nextInt(3) - 1);
for (int k = 0; k < 4; ++k) {
if (world.isAirBlock(newPos) && canBlockStay(world, newPos, this.getDefaultState())) pos = newPos;
newPos = pos.add(rand.nextInt(3) - 1, rand.nextInt(2) - rand.nextInt(2), rand.nextInt(3) - 1);
}
if (world.isAirBlock(newPos) && canBlockStay(world, newPos, this.getDefaultState())) {
world.setBlockState(newPos, getDefaultState(), 2);
}
}
}
@Override
public boolean canGrow(World worldIn, BlockPos pos, IBlockState state, boolean isClient) {
return false;
}
@Override
public boolean canUseBonemeal(World worldIn, Random rand, BlockPos pos, IBlockState state) {
return false;
}
@Override
public void grow(World worldIn, Random rand, BlockPos pos, IBlockState state) {}
@Override
public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state) {
if (pos.getY() >= 0 && pos.getY() < 256) {
IBlockState iblockstate = worldIn.getBlockState(pos.down());
return worldIn.getBlockState(pos.down()).getBlock().canSustainPlant(iblockstate, worldIn, pos.down(), net.minecraft.util.EnumFacing.UP, this);
}
return false;
}
}
|
[
"joedodd35@gmail.com"
] |
joedodd35@gmail.com
|
4d75c4bc4abb1af43e99ef1162ba2b2d83696f35
|
2a5c0c08e934177c35c5438522257ba50539ab6c
|
/core/src/main/java/org/jclouds/io/payloads/RSADecryptingPayload.java
|
d9fca3412058c69e1c519264b48012bf8630dfe9
|
[] |
no_license
|
kohsuke/jclouds
|
6258d76e94ad31cf51e1bf193e531ad301815b97
|
58f8a7eb1500f9574302b23d6382b379ebf187d9
|
refs/heads/master
| 2023-06-01T17:17:27.598644
| 2010-08-04T01:34:19
| 2010-08-04T01:34:19
| 816,000
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,727
|
java
|
/**
*
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.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 org.jclouds.io.payloads;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
import org.jclouds.io.Payload;
import com.google.common.base.Throwables;
/**
*
* @author Adrian Cole
*/
public class RSADecryptingPayload extends BaseCipherPayload {
public RSADecryptingPayload(Payload delegate, Key key) {
super(delegate, key);
}
@Override
public Cipher initializeCipher(Key key) {
Cipher cipher = null;
try {
cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, key);
} catch (NoSuchAlgorithmException e) {
Throwables.propagate(e);
} catch (NoSuchPaddingException e) {
Throwables.propagate(e);
} catch (InvalidKeyException e) {
Throwables.propagate(e);
}
return cipher;
}
}
|
[
"adrian@jclouds.org"
] |
adrian@jclouds.org
|
4a5c4176ac216aaec9851e986bb75cd8758d54d3
|
90545e13abc218d07d179e7390a3b5dc3dc867c1
|
/src/main/java/com/mycompany/demo/config/JacksonConfiguration.java
|
93ab935538cef7593494f796af812c42bd2887b7
|
[] |
no_license
|
mikya0101/demoapplication
|
4976bc152a48bd75a6084cf25829f5b65de8a76c
|
4e150b804c9a5e0b8dd97ddb5b9e38312a7cabf6
|
refs/heads/master
| 2022-12-26T10:24:36.693131
| 2019-11-18T17:39:38
| 2019-11-18T17:39:38
| 222,507,403
| 0
| 0
| null | 2022-12-16T04:41:53
| 2019-11-18T17:39:24
|
Java
|
UTF-8
|
Java
| false
| false
| 1,645
|
java
|
package com.mycompany.demo.config;
import com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.zalando.problem.ProblemModule;
import org.zalando.problem.violations.ConstraintViolationProblemModule;
@Configuration
public class JacksonConfiguration {
/**
* Support for Java date and time API.
* @return the corresponding Jackson module.
*/
@Bean
public JavaTimeModule javaTimeModule() {
return new JavaTimeModule();
}
@Bean
public Jdk8Module jdk8TimeModule() {
return new Jdk8Module();
}
/*
* Support for Hibernate types in Jackson.
*/
@Bean
public Hibernate5Module hibernate5Module() {
return new Hibernate5Module();
}
/*
* Jackson Afterburner module to speed up serialization/deserialization.
*/
@Bean
public AfterburnerModule afterburnerModule() {
return new AfterburnerModule();
}
/*
* Module for serialization/deserialization of RFC7807 Problem.
*/
@Bean
ProblemModule problemModule() {
return new ProblemModule();
}
/*
* Module for serialization/deserialization of ConstraintViolationProblem.
*/
@Bean
ConstraintViolationProblemModule constraintViolationProblemModule() {
return new ConstraintViolationProblemModule();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
881ec28145cf8349dc17fb72da0e0e367f6bdd8a
|
ea65710a42cfd1a0d4c4141ac5ba297c5e6287aa
|
/FoodSpoty/FoodSpoty/src/com/google/android/gms/internal/lw.java
|
ebca42b7cfe5c95845ac8cd5cf16111c1dac2d99
|
[] |
no_license
|
kanwarbirsingh/ANDROID
|
bc27197234c4c3295d658d73086ada47a0833d07
|
f84b29f0f6bd483d791983d5eeae75555e997c36
|
refs/heads/master
| 2020-03-18T02:26:55.720337
| 2018-05-23T18:05:47
| 2018-05-23T18:05:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,151
|
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.google.android.gms.internal;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import com.google.android.gms.fitness.result.DataReadResult;
public interface lw
extends IInterface
{
public static abstract class a extends Binder
implements lw
{
public static lw as(IBinder ibinder)
{
if (ibinder == null)
{
return null;
}
IInterface iinterface = ibinder.queryLocalInterface("com.google.android.gms.fitness.internal.IDataReadCallback");
if (iinterface != null && (iinterface instanceof lw))
{
return (lw)iinterface;
} else
{
return new a(ibinder);
}
}
public IBinder asBinder()
{
return this;
}
public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j)
throws RemoteException
{
switch (i)
{
default:
return super.onTransact(i, parcel, parcel1, j);
case 1598968902:
parcel1.writeString("com.google.android.gms.fitness.internal.IDataReadCallback");
return true;
case 1: // '\001'
parcel.enforceInterface("com.google.android.gms.fitness.internal.IDataReadCallback");
break;
}
if (parcel.readInt() != 0)
{
parcel = (DataReadResult)DataReadResult.CREATOR.createFromParcel(parcel);
} else
{
parcel = null;
}
a(parcel);
return true;
}
public a()
{
attachInterface(this, "com.google.android.gms.fitness.internal.IDataReadCallback");
}
}
private static class a.a
implements lw
{
private IBinder le;
public void a(DataReadResult datareadresult)
throws RemoteException
{
Parcel parcel = Parcel.obtain();
parcel.writeInterfaceToken("com.google.android.gms.fitness.internal.IDataReadCallback");
if (datareadresult == null)
{
break MISSING_BLOCK_LABEL_44;
}
parcel.writeInt(1);
datareadresult.writeToParcel(parcel, 0);
_L1:
le.transact(1, parcel, null, 1);
parcel.recycle();
return;
parcel.writeInt(0);
goto _L1
datareadresult;
parcel.recycle();
throw datareadresult;
}
public IBinder asBinder()
{
return le;
}
a.a(IBinder ibinder)
{
le = ibinder;
}
}
public abstract void a(DataReadResult datareadresult)
throws RemoteException;
}
|
[
"singhkanwar235@gmail.com"
] |
singhkanwar235@gmail.com
|
633e4a153a93d62041c2ba642bb27d3d5498ead4
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_5631cd4a86035a4f7673ad8df78fb9d267de99a5/StagersTest/11_5631cd4a86035a4f7673ad8df78fb9d267de99a5_StagersTest_t.java
|
c93f90531470f0ba1e0f5c32854cf23c1c629b78
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,223
|
java
|
package org.acme;
import static org.cotrix.repository.CodelistQueries.*;
import static org.junit.Assert.*;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import org.cotrix.common.cdi.ApplicationEvents.Startup;
import org.cotrix.domain.codelist.Code;
import org.cotrix.domain.codelist.Codelink;
import org.cotrix.domain.codelist.Codelist;
import org.cotrix.domain.user.User;
import org.cotrix.repository.CodelistRepository;
import org.cotrix.repository.UserRepository;
import org.cotrix.stage.data.SomeUsers;
import org.cotrix.test.ApplicationTest;
import org.cotrix.test.CurrentUser;
import org.junit.Test;
public class StagersTest extends ApplicationTest {
@Inject
UserRepository users;
@Inject
CodelistRepository codelists;
public void setup(@Observes Startup event,CurrentUser user) {
user.set(SomeUsers.owners.iterator().next());
}
@Test
public void stage() {
for (User user : SomeUsers.users)
assertNotNull(users.lookup(user.id()));
for (Codelist list : codelists.get(allLists())) {
for (Code code: list.codes())
for (Codelink link : code.links())
System.out.println(link.name()+":"+link.value());
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
5ba467d85bcd9843b6ea8f4d448b503a31393164
|
574afb819e32be88d299835d42c067d923f177b0
|
/src/net/minecraft/advancements/critereon/PlayerHurtEntityTrigger.java
|
d38f89e629616f1aa49b25ca0c873b5e0d64f0ec
|
[] |
no_license
|
SleepyKolosLolya/WintWare-Before-Zamorozka
|
7a474afff4d72be355e7a46a38eb32376c79ee76
|
43bff58176ec7422e826eeaf3ab8e868a0552c56
|
refs/heads/master
| 2022-07-30T04:20:18.063917
| 2021-04-25T18:16:01
| 2021-04-25T18:16:01
| 361,502,972
| 6
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,829
|
java
|
package net.minecraft.advancements.critereon;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonObject;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import net.minecraft.advancements.ICriterionTrigger;
import net.minecraft.advancements.PlayerAdvancements;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.DamageSource;
import net.minecraft.util.ResourceLocation;
public class PlayerHurtEntityTrigger implements ICriterionTrigger<PlayerHurtEntityTrigger.Instance> {
private static final ResourceLocation field_192222_a = new ResourceLocation("player_hurt_entity");
private final Map<PlayerAdvancements, PlayerHurtEntityTrigger.Listeners> field_192223_b = Maps.newHashMap();
public ResourceLocation func_192163_a() {
return field_192222_a;
}
public void func_192165_a(PlayerAdvancements p_192165_1_, ICriterionTrigger.Listener<PlayerHurtEntityTrigger.Instance> p_192165_2_) {
PlayerHurtEntityTrigger.Listeners playerhurtentitytrigger$listeners = (PlayerHurtEntityTrigger.Listeners)this.field_192223_b.get(p_192165_1_);
if (playerhurtentitytrigger$listeners == null) {
playerhurtentitytrigger$listeners = new PlayerHurtEntityTrigger.Listeners(p_192165_1_);
this.field_192223_b.put(p_192165_1_, playerhurtentitytrigger$listeners);
}
playerhurtentitytrigger$listeners.func_192522_a(p_192165_2_);
}
public void func_192164_b(PlayerAdvancements p_192164_1_, ICriterionTrigger.Listener<PlayerHurtEntityTrigger.Instance> p_192164_2_) {
PlayerHurtEntityTrigger.Listeners playerhurtentitytrigger$listeners = (PlayerHurtEntityTrigger.Listeners)this.field_192223_b.get(p_192164_1_);
if (playerhurtentitytrigger$listeners != null) {
playerhurtentitytrigger$listeners.func_192519_b(p_192164_2_);
if (playerhurtentitytrigger$listeners.func_192520_a()) {
this.field_192223_b.remove(p_192164_1_);
}
}
}
public void func_192167_a(PlayerAdvancements p_192167_1_) {
this.field_192223_b.remove(p_192167_1_);
}
public PlayerHurtEntityTrigger.Instance func_192166_a(JsonObject p_192166_1_, JsonDeserializationContext p_192166_2_) {
DamagePredicate damagepredicate = DamagePredicate.func_192364_a(p_192166_1_.get("damage"));
EntityPredicate entitypredicate = EntityPredicate.func_192481_a(p_192166_1_.get("entity"));
return new PlayerHurtEntityTrigger.Instance(damagepredicate, entitypredicate);
}
public void func_192220_a(EntityPlayerMP p_192220_1_, Entity p_192220_2_, DamageSource p_192220_3_, float p_192220_4_, float p_192220_5_, boolean p_192220_6_) {
PlayerHurtEntityTrigger.Listeners playerhurtentitytrigger$listeners = (PlayerHurtEntityTrigger.Listeners)this.field_192223_b.get(p_192220_1_.func_192039_O());
if (playerhurtentitytrigger$listeners != null) {
playerhurtentitytrigger$listeners.func_192521_a(p_192220_1_, p_192220_2_, p_192220_3_, p_192220_4_, p_192220_5_, p_192220_6_);
}
}
static class Listeners {
private final PlayerAdvancements field_192523_a;
private final Set<ICriterionTrigger.Listener<PlayerHurtEntityTrigger.Instance>> field_192524_b = Sets.newHashSet();
public Listeners(PlayerAdvancements p_i47407_1_) {
this.field_192523_a = p_i47407_1_;
}
public boolean func_192520_a() {
return this.field_192524_b.isEmpty();
}
public void func_192522_a(ICriterionTrigger.Listener<PlayerHurtEntityTrigger.Instance> p_192522_1_) {
this.field_192524_b.add(p_192522_1_);
}
public void func_192519_b(ICriterionTrigger.Listener<PlayerHurtEntityTrigger.Instance> p_192519_1_) {
this.field_192524_b.remove(p_192519_1_);
}
public void func_192521_a(EntityPlayerMP p_192521_1_, Entity p_192521_2_, DamageSource p_192521_3_, float p_192521_4_, float p_192521_5_, boolean p_192521_6_) {
List<ICriterionTrigger.Listener<PlayerHurtEntityTrigger.Instance>> list = null;
Iterator var8 = this.field_192524_b.iterator();
ICriterionTrigger.Listener listener1;
while(var8.hasNext()) {
listener1 = (ICriterionTrigger.Listener)var8.next();
if (((PlayerHurtEntityTrigger.Instance)listener1.func_192158_a()).func_192278_a(p_192521_1_, p_192521_2_, p_192521_3_, p_192521_4_, p_192521_5_, p_192521_6_)) {
if (list == null) {
list = Lists.newArrayList();
}
list.add(listener1);
}
}
if (list != null) {
var8 = list.iterator();
while(var8.hasNext()) {
listener1 = (ICriterionTrigger.Listener)var8.next();
listener1.func_192159_a(this.field_192523_a);
}
}
}
}
public static class Instance extends AbstractCriterionInstance {
private final DamagePredicate field_192279_a;
private final EntityPredicate field_192280_b;
public Instance(DamagePredicate p_i47406_1_, EntityPredicate p_i47406_2_) {
super(PlayerHurtEntityTrigger.field_192222_a);
this.field_192279_a = p_i47406_1_;
this.field_192280_b = p_i47406_2_;
}
public boolean func_192278_a(EntityPlayerMP p_192278_1_, Entity p_192278_2_, DamageSource p_192278_3_, float p_192278_4_, float p_192278_5_, boolean p_192278_6_) {
return !this.field_192279_a.func_192365_a(p_192278_1_, p_192278_3_, p_192278_4_, p_192278_5_, p_192278_6_) ? false : this.field_192280_b.func_192482_a(p_192278_1_, p_192278_2_);
}
}
}
|
[
"ask.neverhide@gmail.com"
] |
ask.neverhide@gmail.com
|
3e09afc4c4aaee0e2216f3a1bf165f19b2009290
|
27788437c69a20cffa1e5f97136c42f8024b36f6
|
/webauthn4j-test/src/main/java/com/webauthn4j/test/authenticator/CredentialRequestResponse.java
|
f089118ca2d56e79185f40619622fd2e97538210
|
[
"Apache-2.0"
] |
permissive
|
webauthn4j/webauthn4j
|
0b787ad400938b0d1757889919ce0bd027d1e264
|
432defbd13c296272b38b12565e93559c3c2fe19
|
refs/heads/master
| 2023-09-01T07:03:41.220676
| 2023-08-11T06:57:27
| 2023-08-11T06:57:27
| 134,147,639
| 346
| 75
|
Apache-2.0
| 2023-09-04T14:50:11
| 2018-05-20T12:14:36
|
Java
|
UTF-8
|
Java
| false
| false
| 1,734
|
java
|
/*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.webauthn4j.test.authenticator;
public class CredentialRequestResponse {
private final byte[] credentialId;
private final byte[] collectedClientDataBytes;
private final byte[] authenticatorDataBytes;
private final byte[] signature;
private final byte[] userHandle;
public CredentialRequestResponse(byte[] credentialId, byte[] collectedClientDataBytes, byte[] authenticatorDataBytes, byte[] signature, byte[] userHandle) {
this.credentialId = credentialId;
this.collectedClientDataBytes = collectedClientDataBytes;
this.authenticatorDataBytes = authenticatorDataBytes;
this.signature = signature;
this.userHandle = userHandle;
}
public byte[] getCredentialId() {
return credentialId;
}
public byte[] getCollectedClientDataBytes() {
return collectedClientDataBytes;
}
public byte[] getAuthenticatorDataBytes() {
return authenticatorDataBytes;
}
public byte[] getSignature() {
return signature;
}
public byte[] getUserHandle() {
return userHandle;
}
}
|
[
"mail@ynojima.net"
] |
mail@ynojima.net
|
fe0660d2c3b9bcf127b6f84f613304e78d55ef24
|
600792877088d46531cb71faf2cf9ab6b7a9358f
|
/src/main/java/com/chocolate/chocolateQuest/entity/ai/SelectorLiving.java
|
ffd85c0dd6231364c5dd24fb35918ea7a66df869
|
[] |
no_license
|
Bogdan-G/chocolateQuest
|
e6ca3da6a85eddc7291ef7ea4fdf67b8c237362b
|
8f79017f45ac18e14e9db6329cb787195988ff2d
|
refs/heads/master
| 2020-04-15T03:49:36.507542
| 2019-01-09T23:06:52
| 2019-01-09T23:06:52
| 164,361,568
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,050
|
java
|
package com.chocolate.chocolateQuest.entity.ai;
import com.chocolate.chocolateQuest.entity.ai.AITargetNearestAttackableForDragon;
import net.minecraft.command.IEntitySelector;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.EntityLivingBase;
class SelectorLiving implements IEntitySelector {
EntityCreature taskOwner;
AITargetNearestAttackableForDragon ownerAI;
IEntitySelector selector;
public SelectorLiving(EntityCreature par1EntityCreature, AITargetNearestAttackableForDragon par2, IEntitySelector parSelector) {
this.taskOwner = par1EntityCreature;
this.ownerAI = par2;
this.selector = parSelector;
}
public boolean isEntityApplicable(Entity entity) {
boolean flag = true;
if(this.selector != null) {
flag = this.selector.isEntityApplicable(entity);
}
return entity instanceof EntityLivingBase && flag?this.ownerAI.isSuitableTarget((EntityLivingBase)entity, false):false;
}
}
|
[
"bogdangtt@gmail.com"
] |
bogdangtt@gmail.com
|
7cc8410b52979eeba07589956ad909f1278d2e86
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE400_Resource_Exhaustion/CWE400_Resource_Exhaustion__getCookies_Servlet_for_loop_53d.java
|
4ae69152a13ca5b5d269d8adb13a3154cd7f45c9
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 2,141
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE400_Resource_Exhaustion__getCookies_Servlet_for_loop_53d.java
Label Definition File: CWE400_Resource_Exhaustion.label.xml
Template File: sources-sinks-53d.tmpl.java
*/
/*
* @description
* CWE: 400 Resource Exhaustion
* BadSource: getCookies_Servlet Read count from the first cookie using getCookies()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: for_loop
* GoodSink: Validate count before using it as the loop variant in a for loop
* BadSink : Use count as the loop variant in a for loop
* Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package
*
* */
package testcases.CWE400_Resource_Exhaustion;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.security.SecureRandom;
public class CWE400_Resource_Exhaustion__getCookies_Servlet_for_loop_53d
{
public void bad_sink(int count , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int i = 0;
/* POTENTIAL FLAW: For loop using count as the loop variant and no validation */
for (i = 0; i < count; i++)
{
IO.writeLine("Hello");
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(int count , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int i = 0;
/* POTENTIAL FLAW: For loop using count as the loop variant and no validation */
for (i = 0; i < count; i++)
{
IO.writeLine("Hello");
}
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(int count , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int i = 0;
/* FIX: Validate count before using it as the for loop variant */
if (count > 0 && count <= 20)
{
for (i = 0; i < count; i++)
{
IO.writeLine("Hello");
}
}
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
b2ede6cc9320119ae71be4edb7a1ee419b2083a6
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/4/4_1534d8574074dfd2fb448fe0c14fdd3307a7be63/SailBase/4_1534d8574074dfd2fb448fe0c14fdd3307a7be63_SailBase_t.java
|
31e4d835df7dd0414f78fb09335e8d8ee09199f5
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,720
|
java
|
/*
* Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2008.
*
* Licensed under the Aduna BSD-style license.
*/
package org.openrdf.sail.helpers;
import java.io.File;
import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.openrdf.sail.Sail;
import org.openrdf.sail.SailConnection;
import org.openrdf.sail.SailException;
/**
* SailBase is an abstract Sail implementation that takes care of common sail
* tasks, including proper closing of active connections and a grace period for
* active connections during shutdown of the store.
*
* @author Herko ter Horst
* @author jeen
* @author Arjohn Kampman
*/
public abstract class SailBase implements Sail {
/*-----------*
* Constants *
*-----------*/
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
/**
* Default connection timeout on shutdown: 20,000 milliseconds.
*/
protected final static long DEFAULT_CONNECTION_TIMEOUT = 20000L;
// Note: the following variable and method are package protected so that they
// can be removed when open connections no longer block other connections and
// they can be closed silently (just like in JDBC).
static final String DEBUG_PROP = "org.openrdf.repository.debug";
protected static boolean debugEnabled() {
try {
String value = System.getProperty(DEBUG_PROP);
return value != null && !value.equals("false");
}
catch (SecurityException e) {
// Thrown when not allowed to read system properties, for example when
// running in applets
return false;
}
}
/*-----------*
* Variables *
*-----------*/
/**
* Directory to store information related to this sail in.
*/
private File dataDir;
/**
* Flag indicating whether the Sail is shutting down.
*/
private boolean shutDownInProgress = false;
/**
* Connection timeout on shutdown (in ms). Defaults to
* {@link #DEFAULT_CONNECTION_TIMEOUT}.
*/
protected long connectionTimeOut = DEFAULT_CONNECTION_TIMEOUT;
/**
* Map used to track active connections and where these were acquired. The
* Throwable value may be null in case debugging was disable at the time the
* connection was acquired.
*/
private Map<SailConnection, Throwable> activeConnections = new IdentityHashMap<SailConnection, Throwable>();
/*---------*
* Methods *
*---------*/
public void setDataDir(File dataDir) {
this.dataDir = dataDir;
}
public File getDataDir() {
return dataDir;
}
public SailConnection getConnection()
throws SailException
{
if (shutDownInProgress) {
throw new IllegalStateException("shut down in progress");
}
SailConnection connection = getConnectionInternal();
Throwable stackTrace = debugEnabled() ? new Throwable() : null;
synchronized (activeConnections) {
activeConnections.put(connection, stackTrace);
}
return connection;
}
/**
* returns a store-specific SailConnection object.
*
* @return a SailConnection
* @throws SailException
*/
protected abstract SailConnection getConnectionInternal()
throws SailException;
public void shutDown()
throws SailException
{
// indicate no more new connections should be given out.
shutDownInProgress = true;
synchronized (activeConnections) {
// check if any active connections exist, if so, wait for a grace
// period for them to finish.
if (!activeConnections.isEmpty()) {
logger.info("Waiting for active connections to close before shutting down...");
try {
activeConnections.wait(DEFAULT_CONNECTION_TIMEOUT);
}
catch (InterruptedException e) {
// ignore and continue
}
}
// Forcefully close any connections that are still open
Iterator<Map.Entry<SailConnection, Throwable>> iter = activeConnections.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry<SailConnection, Throwable> entry = iter.next();
SailConnection con = entry.getKey();
Throwable stackTrace = entry.getValue();
iter.remove();
if (stackTrace == null) {
logger.warn(
"Closing active connection due to shut down; consider setting the {} system property",
DEBUG_PROP);
}
else {
logger.warn("Closing active connection due to shut down, connection was acquired in",
stackTrace);
}
try {
con.close();
}
catch (SailException e) {
logger.error("Failed to close connection", e);
}
}
}
try {
shutDownInternal();
}
finally {
shutDownInProgress = false;
}
}
/**
* Do store-specific operations to ensure proper shutdown of the store.
*
* @throws SailException
*/
protected abstract void shutDownInternal()
throws SailException;
/**
* Signals to the store that the supplied connection has been closed.
*
* @param connection
*/
protected void connectionClosed(SailConnection connection) {
synchronized (activeConnections) {
if (activeConnections.containsKey(connection)) {
activeConnections.remove(connection);
if (activeConnections.isEmpty()) {
// only notify waiting threads if all active connections have
// been closed.
activeConnections.notifyAll();
}
}
else {
logger.warn("tried to remove unknown connection object from store.");
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7952712a56a22c88ea4fe654884efbab8db73c1b
|
5eae683a6df0c4b97ab1ebcd4724a4bf062c1889
|
/bin/ext-commerce/selectivecartfacades/src/de/hybris/platform/selectivecartfacades/strategies/CartEntriesOrderingStrategy.java
|
cb98ba74b8bc329f9d36fbeb3b2d9ef6a4172f0d
|
[] |
no_license
|
sujanrimal/GiftCardProject
|
1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb
|
e0398eec9f4ec436d20764898a0255f32aac3d0c
|
refs/heads/master
| 2020-12-11T18:05:17.413472
| 2020-01-17T18:23:44
| 2020-01-17T18:23:44
| 233,911,127
| 0
| 0
| null | 2020-06-18T15:26:11
| 2020-01-14T18:44:18
| null |
UTF-8
|
Java
| false
| false
| 849
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.selectivecartfacades.strategies;
import de.hybris.platform.commercefacades.order.data.CartData;
/**
* Orders cart entries when displaying the cart page
*/
public interface CartEntriesOrderingStrategy
{
/**
* Orders cart entries
*
* @param cartData
* the cart data with entries to be sorted
* @return the cart data with correct ordering
*/
CartData ordering(CartData cartData);
}
|
[
"travis.d.crawford@accenture.com"
] |
travis.d.crawford@accenture.com
|
083e4358865da68e2ea4192e1b70e9b6c42af1ad
|
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
|
/project357/src/test/java/org/gradle/test/performance/largejavamultiproject/project357/p1788/Test35760.java
|
a86a398eec776051fddb89353600534d5412dfef
|
[] |
no_license
|
big-guy/largeJavaMultiProject
|
405cc7f55301e1fd87cee5878a165ec5d4a071aa
|
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
|
refs/heads/main
| 2023-03-17T10:59:53.226128
| 2021-03-04T01:01:39
| 2021-03-04T01:01:39
| 344,307,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,456
|
java
|
package org.gradle.test.performance.largejavamultiproject.project357.p1788;
import org.gradle.test.performance.largejavamultiproject.project357.p1787.Production35757;
import org.gradle.test.performance.largejavamultiproject.project357.p1787.Production35758;
import org.gradle.test.performance.largejavamultiproject.project357.p1787.Production35759;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test35760 {
Production35760 objectUnderTest = new Production35760();
@Test
public void testProperty0() {
Production35757 value = new Production35757();
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
Production35758 value = new Production35758();
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
Production35759 value = new Production35759();
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
}
|
[
"sterling.greene@gmail.com"
] |
sterling.greene@gmail.com
|
b261c2bfbde06d1143445e4445e93f3d737f6a2a
|
2bdedcda705f6dcf45a1e9a090377f892bcb58bb
|
/src/main/output/world/problem/game_area/head/test_lot_issue/aws_python_life/house_error.java
|
a01d2049fa97a9003359bfda7ab52e14b10e53c9
|
[] |
no_license
|
matkosoric/GenericNameTesting
|
860a22af1098dda9ea9e24a1fc681bb728aa2d69
|
03f4a38229c28bc6d83258e5a84fce4b189d5f00
|
refs/heads/master
| 2021-01-08T22:35:20.022350
| 2020-02-21T11:28:21
| 2020-02-21T11:28:21
| 242,123,053
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,564
|
java
|
'use strict';
let https = require ('https');
// **********************************************
// *** Update or verify the following values. ***
// **********************************************
// Replace the subscriptionKey string value with your valid subscription key.
let subscriptionKey = 'd13a7ff4e27d5ad8f1e33858b957bf88';
let host = 'api.microsofttranslator.com';
let path = '/V2/Http.svc/TranslateArray';
let target = 'fr-fr';
let params = '';
let ns = "http://schemas.microsoft.com/2003/10/Serialization/Arrays";
let content =
'<TranslateArrayRequest>\n' +
// NOTE: AppId is required, but it can be empty because we are sending the Ocp-Apim-Subscription-Key header.
' <AppId />\n' +
' <Texts>\n' +
' <string xmlns=\"' + ns + '\">Hello</string>\n' +
' <string xmlns=\"' + ns + '\">Goodbye</string>\n' +
' </Texts>\n' +
' <To>' + target + '</To>\n' +
'</TranslateArrayRequest>\n';
let response_handler = function (response) {
let body = '';
response.on ('data', function (d) {
body += d;
});
response.on ('end', function () {
console.log (body);
});
response.on ('error', function (e) {
console.log ('Error: ' + e.message);
});
};
let TranslateArray = function () {
let request_params = {
method : 'POST',
hostname : host,
path : path + params,
headers : {
'Content-Type' : 'text/xml',
'7fafb2a3b30d3e23ee7f878ab40a8f67' : subscriptionKey,
}
};
let req = https.request (request_params, response_handler);
req.write (content);
req.end ();
}
TranslateArray ();
|
[
"soric.matko@gmail.com"
] |
soric.matko@gmail.com
|
fec472bfe5c067ebd914945020aec25edaa2d1fd
|
ff27cb773d681e9113f311f2d1f34bb9a82605ac
|
/10_BBDD/src/test/_04_Obtener.java
|
0ec5235bbd453d73cc66a8cb73c00c5717b1e85a
|
[] |
no_license
|
AnaArias12/WorkspaceJava-1
|
ceb3765a9ff3a1028d22ca84b3134d7029b50a2e
|
7819c0b476f1bb28ec37c8aa849ed2159923dee2
|
refs/heads/master
| 2023-03-08T19:59:53.904515
| 2021-03-01T18:28:38
| 2021-03-01T18:28:38
| null | 0
| 0
| null | null | null | null |
WINDOWS-1250
|
Java
| false
| false
| 1,213
|
java
|
package test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class _04_Obtener {
public static void main(String[] args) {
// Paso 1: Establecemos los parametros de conexión con la base de datos
String cadenaConexion = "jdbc:mysql://localhost:3306/bbdd";
String user = "root";
String pass = "";
// Paso 2: Interactuar con la BD
try (Connection con = DriverManager.getConnection(cadenaConexion, user, pass)){
PreparedStatement sentencia = con.prepareStatement("SELECT * FROM PERSONAS WHERE ID=?");
sentencia.setInt(1, 6);
ResultSet rs = sentencia.executeQuery();
while (rs.next()) {
System.out.print(rs.getInt("ID"));
System.out.print(" - ");
System.out.print(rs.getString("NOMBRE"));
System.out.print(" - ");
System.out.print(rs.getInt("EDAD"));
System.out.print(" - ");
System.out.print(rs.getDouble("PESO"));
System.out.println(); // Retorno de carro
}
} catch (SQLException e) {
System.out.println("Error al realizar el listado de productos");
System.out.println(e.getMessage());
}
}
}
|
[
"f.depablo.lobo@gmail.com"
] |
f.depablo.lobo@gmail.com
|
6f9fde68958f4291501c1d47f78859ed147f4a92
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/XWIKI-14599-17-22-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/xwiki/job/AbstractJob_ESTest_scaffolding.java
|
81ac61fe632a7461f7416d14e675eb437418f005
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 429
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Nov 01 18:46:20 UTC 2021
*/
package org.xwiki.job;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class AbstractJob_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
eee819a2c610bd0392c943c26d32471a3a6e0959
|
41fcfe6760691c623bd6d8919c457c66f92a65f0
|
/ch16_스트림과병렬처리/src/sec05/stream_mapping/FlatMapEx.java
|
1ab61dda453b8a85068bcfa8d1a2681da95b347d
|
[] |
no_license
|
namjunemy/this-is-java
|
b38a71a2295542445616cca2a8407765cc2ef2b7
|
db97abf24a265ba673bc0fdb0b3fdee65dfa8077
|
refs/heads/master
| 2021-09-07T11:18:06.851821
| 2018-02-22T06:01:07
| 2018-02-22T06:01:07
| 103,539,775
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 833
|
java
|
package sec05.stream_mapping;
import java.util.Arrays;
import java.util.List;
public class FlatMapEx {
public static void main(String[] args) {
List<String> inputList1 = Arrays.asList("java8 lambda", "stream mapping");
inputList1.stream()
.flatMap(data -> Arrays.stream(data.split(" ")))
.forEach(System.out::println);
System.out.println();
List<String> inputList2 = Arrays.asList("10, 20, 30", "40, 50, 60");
inputList2.stream()
.flatMapToInt(data -> {
String[] strArray = data.split(",");
int[] intArray = new int[strArray.length];
for (int i = 0; i < strArray.length; i++) {
intArray[i] = Integer.parseInt(strArray[i].trim());
}
return Arrays.stream(intArray);
})
.forEach(System.out::println);
}
}
|
[
"namjunemy@gmail.com"
] |
namjunemy@gmail.com
|
94f8ba43f089a4a414fd6ae9f25747dc4fe69339
|
0cc6ba44bb5714a6b57b28e343681b0a2f2fa158
|
/sk-system/src/main/java/com/dxj/module/system/domain/query/MenuQuery.java
|
3c4177c071199e5b43d577c55b0ebf87ccc16560
|
[
"Apache-2.0"
] |
permissive
|
javascript666666/sk-admin
|
60c159f74f00e5e6cde5ca48b43601f94d1b5178
|
428809aac43af5bec3c907bfccd442e96e7a7ad9
|
refs/heads/master
| 2021-05-20T15:02:18.676200
| 2020-03-30T04:39:58
| 2020-03-30T04:39:58
| 252,341,846
| 2
| 0
|
Apache-2.0
| 2020-04-02T03:03:09
| 2020-04-02T03:03:09
| null |
UTF-8
|
Java
| false
| false
| 380
|
java
|
package com.dxj.module.system.domain.query;
import com.dxj.annotation.Query;
import lombok.Data;
import java.sql.Timestamp;
import java.util.List;
/**
* @author Sinkiang
* 公共查询类
*/
@Data
public class MenuQuery {
@Query(blurry = "name,path,component")
private String blurry;
@Query(type = Query.Type.BETWEEN)
private List<Timestamp> createTime;
}
|
[
"dengsinkiang@gmail.com"
] |
dengsinkiang@gmail.com
|
bc715c79b70f13f4afdec5961d85c35d6ddd3b21
|
687520cf81f9fb2f29d8452f4d7dc9427abb985d
|
/src/main/java/com/buit/his/treatment/request/ZlsqdyySaveOrUpdateAllReq.java
|
e497babc8639893390fa3a3768feb6a94f6b9d5a
|
[] |
no_license
|
gfz1103/mtd
|
ed9255a96c7012fe84fec9082a6bbd53e76eab8d
|
1c2fd5ed8ecdd6d810bbc515ef83651521788c66
|
refs/heads/master
| 2023-06-18T16:58:08.203357
| 2021-07-19T02:13:12
| 2021-07-19T02:13:12
| 387,313,158
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,307
|
java
|
package com.buit.his.treatment.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
/**
* 治疗预约申请单保存或修改入参
* zhouhaisheng
*/
@ApiModel(value = "治疗预约申请单保存或修改入参")
public class ZlsqdyySaveOrUpdateAllReq {
@ApiModelProperty(value="治疗申请单明细id")
private Integer zlSqdmxJlxh;
@ApiModelProperty(value = "治疗预约List")
List<ZlsqdyySaveOrUpdateReq> zlsqdyySaveOrUpdateReqs;
@ApiModelProperty(value = "治疗内容List")
List<ZlSqdxmzlnrReq> zlSqdxmzlnrReqs;
public List<ZlsqdyySaveOrUpdateReq> getZlsqdyySaveOrUpdateReqs() {
return zlsqdyySaveOrUpdateReqs;
}
public void setZlsqdyySaveOrUpdateReqs(List<ZlsqdyySaveOrUpdateReq> zlsqdyySaveOrUpdateReqs) {
this.zlsqdyySaveOrUpdateReqs = zlsqdyySaveOrUpdateReqs;
}
public List<ZlSqdxmzlnrReq> getZlSqdxmzlnrReqs() {
return zlSqdxmzlnrReqs;
}
public void setZlSqdxmzlnrReqs(List<ZlSqdxmzlnrReq> zlSqdxmzlnrReqs) {
this.zlSqdxmzlnrReqs = zlSqdxmzlnrReqs;
}
public Integer getZlSqdmxJlxh() {
return zlSqdmxJlxh;
}
public void setZlSqdmxJlxh(Integer zlSqdmxJlxh) {
this.zlSqdmxJlxh = zlSqdmxJlxh;
}
}
|
[
"gongfangzhou"
] |
gongfangzhou
|
12cb0efb28025f96a622243f085110bff66d30af
|
e1dbbd1c0289059bcc7426e30ab41c88221eff11
|
/modules/cae/contentbeans/src/main/java/com/coremedia/blueprint/common/layout/DynamizableContainer.java
|
8d6348f1ae61488717ebd7741edc5b4cfa5badf5
|
[] |
no_license
|
HongBitgrip/blueprint
|
9ed278a8df33dbe7ec2de7489592f704e408d897
|
14c4de20defd2918817f91174bdbdcc0b9541e2d
|
refs/heads/master
| 2020-03-25T23:15:24.580400
| 2018-08-17T14:44:43
| 2018-08-17T14:44:43
| 144,267,625
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 502
|
java
|
package com.coremedia.blueprint.common.layout;
import com.coremedia.blueprint.common.contentbeans.CMTeasable;
/**
* Container that possibly contains dynamic items. Useful to render a dynamic include on the container level.
*/
public interface DynamizableContainer extends Container<CMTeasable> {
/**
* Is this a dynamic container? Default implementation returns <code>true</code>.
* @return true if this is a dynamic container
*/
default boolean isDynamic() {
return true;
}
}
|
[
"hong.nguyen@bitgrip.de"
] |
hong.nguyen@bitgrip.de
|
10e65575820c11580a46595eda1dddbbe71e3720
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/plugin/wepkg/p1076b/C23198a.java
|
b1f04c09162fa1ddceef8eac597f72a961de1edb
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,211
|
java
|
package com.tencent.p177mm.plugin.wepkg.p1076b;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.p177mm.p230g.p711c.C37851fj;
import com.tencent.p177mm.sdk.p603e.C4925c.C4924a;
import java.lang.reflect.Field;
/* renamed from: com.tencent.mm.plugin.wepkg.b.a */
public final class C23198a extends C37851fj {
public static final C4924a fjX;
/* renamed from: Ag */
public final C4924a mo4635Ag() {
return fjX;
}
static {
AppMethodBeat.m2504i(63386);
C4924a c4924a = new C4924a();
c4924a.xDb = new Field[8];
c4924a.columns = new String[9];
StringBuilder stringBuilder = new StringBuilder();
c4924a.columns[0] = "pkgId";
c4924a.xDd.put("pkgId", "TEXT PRIMARY KEY ");
stringBuilder.append(" pkgId TEXT PRIMARY KEY ");
stringBuilder.append(", ");
c4924a.xDc = "pkgId";
c4924a.columns[1] = "version";
c4924a.xDd.put("version", "TEXT");
stringBuilder.append(" version TEXT");
stringBuilder.append(", ");
c4924a.columns[2] = "oldVersion";
c4924a.xDd.put("oldVersion", "TEXT");
stringBuilder.append(" oldVersion TEXT");
stringBuilder.append(", ");
c4924a.columns[3] = "oldPath";
c4924a.xDd.put("oldPath", "TEXT");
stringBuilder.append(" oldPath TEXT");
stringBuilder.append(", ");
c4924a.columns[4] = "md5";
c4924a.xDd.put("md5", "TEXT");
stringBuilder.append(" md5 TEXT");
stringBuilder.append(", ");
c4924a.columns[5] = "downloadUrl";
c4924a.xDd.put("downloadUrl", "TEXT");
stringBuilder.append(" downloadUrl TEXT");
stringBuilder.append(", ");
c4924a.columns[6] = "pkgSize";
c4924a.xDd.put("pkgSize", "INTEGER");
stringBuilder.append(" pkgSize INTEGER");
stringBuilder.append(", ");
c4924a.columns[7] = "downloadNetType";
c4924a.xDd.put("downloadNetType", "INTEGER");
stringBuilder.append(" downloadNetType INTEGER");
c4924a.columns[8] = "rowid";
c4924a.sql = stringBuilder.toString();
fjX = c4924a;
AppMethodBeat.m2505o(63386);
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
e703afb076d4ec8d35bb9695375cc68188f86b04
|
b5dd3902e66d96a579aa5756dbf222167ee5d778
|
/1.JavaSyntax/src/com/javarush/task/task07/task0703/Solution.java
|
54239c29edffe52d6af9f2e0991d09e1b0e2ebfb
|
[] |
no_license
|
PrimakovAlexander1993/JavaRushTask
|
fa8a901f45a1784d5da280806cea967f14c92f1f
|
339e506a8907db1b8a43d8a535cbb5fa96c3c000
|
refs/heads/master
| 2021-01-04T23:16:15.379815
| 2020-02-15T21:29:34
| 2020-02-15T21:29:34
| 240,791,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,351
|
java
|
package com.javarush.task.task07.task0703;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Общение одиноких массивов
1. Создать массив на 10 строк.
2. Создать массив на 10 чисел.
3. Ввести с клавиатуры 10 строк, заполнить ими массив строк.
4. В каждую ячейку массива чисел записать длину строки из массива строк, индекс/номер ячейки которой совпадает с
текущим индексом из массива чисел.
Вывести содержимое массива чисел на экран, каждое значение выводить с новой строки.
*/
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
BufferedReader reader= new BufferedReader(new InputStreamReader(System.in));
String[] arrayLine = new String[10];
int[] arrayInt = new int[10];
for (int i = 0; i < arrayLine.length; i++) {
arrayLine[i] = reader.readLine();
}
for (int i = 0; i < arrayInt.length; i++) {
System.out.println(arrayInt[i]=arrayLine[i].length());
}
}
}
|
[
"primakoffalexandr@yandex.ru"
] |
primakoffalexandr@yandex.ru
|
71e642edd487e353e19ce8d0e23d403ce5f3678a
|
23201229e306531c1a2d4a95dc3140f5fa3a04fa
|
/Java-Stack/Android/app/src/main/java/com/example/smarthomeapp/model/weather/Trav.java
|
29964b443fe06fb87bfa20fdcbc671a076be6a51
|
[] |
no_license
|
Olikelys/SmartHomeProject
|
c86c9d4b453bff72ad4d73a04c36c510cc8fac8a
|
bfc5d763a69e45f9fa5264f25ecb3239b914412b
|
refs/heads/master
| 2022-02-14T00:14:01.170182
| 2018-07-31T04:24:52
| 2018-07-31T04:24:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 714
|
java
|
package com.example.smarthomeapp.model.weather;
import com.google.gson.annotations.SerializedName;
public class Trav{
private static final String FIELD_BRF = "brf";
private static final String FIELD_TXT = "txt";
@SerializedName(FIELD_BRF)
private String mBrf;
@SerializedName(FIELD_TXT)
private String mTxt;
public Trav(){
}
public void setBrf(String brf) {
mBrf = brf;
}
public String getBrf() {
return mBrf;
}
public void setTxt(String txt) {
mTxt = txt;
}
public String getTxt() {
return mTxt;
}
@Override
public String toString(){
return "brf = " + mBrf + ", txt = " + mTxt;
}
}
|
[
"191836400@qq.com"
] |
191836400@qq.com
|
6063087ab4d5e4d8fdd8b84de80694c381cd6ed9
|
1c17d8626bb77a51010bdcc19dd9307ebc5cbaa5
|
/tools-manage/invocationlab-admin/src/main/java/org/javamaster/invocationlab/admin/controller/RpcPostmanTestCaseController.java
|
dfde67d42ec9ef5d180857d11cf2e3b192b2b29e
|
[
"Apache-2.0"
] |
permissive
|
jufeng98/java-master
|
299257f04fba29110fe72d124c63595b8c955af9
|
a1fc18a6af52762ae90f78e0181073f2a95d454a
|
refs/heads/master
| 2023-07-24T01:42:27.140862
| 2023-07-09T03:01:07
| 2023-07-09T03:01:07
| 191,107,543
| 123
| 65
|
Apache-2.0
| 2022-12-16T04:38:20
| 2019-06-10T06:10:04
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 5,685
|
java
|
package org.javamaster.invocationlab.admin.controller;
import org.javamaster.invocationlab.admin.dto.UserCaseDto;
import org.javamaster.invocationlab.admin.dto.UserCaseGroupDto;
import org.javamaster.invocationlab.admin.dto.WebApiRspDto;
import org.javamaster.invocationlab.admin.service.repository.redis.RedisKeys;
import org.javamaster.invocationlab.admin.service.repository.redis.RedisRepository;
import org.javamaster.invocationlab.admin.util.JsonUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
/**
* 用例相关的操作
* 用例在这个系统里面指一个接口的请求,目前来说是对一个dubbo接口的请求{@link UserCaseDto}
*
* @author yudong
*/
@Controller
@RequestMapping("/dubbo-postman/")
public class RpcPostmanTestCaseController extends AbstractController {
@Autowired
private RedisRepository cacheService;
@RequestMapping(value = "case/save", method = RequestMethod.POST)
@ResponseBody
public WebApiRspDto<Boolean> saveCase(@RequestBody UserCaseDto caseDto) {
String groupName = caseDto.getGroupName();
cacheService.setAdd(RedisKeys.CASE_KEY, groupName);
String value = JsonUtils.objectToString(caseDto);
cacheService.mapPut(groupName, caseDto.getCaseName(), value);
return WebApiRspDto.success(Boolean.TRUE);
}
@RequestMapping(value = "case/group-case-detail/list", method = RequestMethod.GET)
@ResponseBody
public WebApiRspDto<List<UserCaseDto>> getAllGroupCaseDetail() {
List<UserCaseDto> groupDtoList = new ArrayList<>(1);
Set<Object> groupNames = cacheService.members(RedisKeys.CASE_KEY);
for (Object obj : groupNames) {
Set<Object> caseNames = cacheService.mapGetKeys((String) obj);
for (Object sub : caseNames) {
String jsonStr = cacheService.mapGet(obj.toString(), sub.toString());
UserCaseDto caseDto = JsonUtils.parseObject(jsonStr, UserCaseDto.class);
groupDtoList.add(caseDto);
}
}
return WebApiRspDto.success(groupDtoList);
}
@RequestMapping(value = "case/group/list", method = RequestMethod.GET)
@ResponseBody
public WebApiRspDto<List<UserCaseGroupDto>> getAllGroupAndCaseName() {
List<UserCaseGroupDto> groupDtoList = new ArrayList<>(1);
Set<Object> groupNames = cacheService.members(RedisKeys.CASE_KEY);
for (Object obj : groupNames) {
UserCaseGroupDto parentDto = new UserCaseGroupDto();
parentDto.setValue(obj.toString());
parentDto.setLabel(obj.toString());
Set<Object> caseNames = cacheService.mapGetKeys((String) obj);
List<UserCaseGroupDto> children = new ArrayList<>(1);
parentDto.setChildren(children);
for (Object sub : caseNames) {
UserCaseGroupDto dto = new UserCaseGroupDto();
dto.setValue(sub.toString());
dto.setLabel(sub.toString());
dto.setChildren(null);
children.add(dto);
}
groupDtoList.add(parentDto);
}
return WebApiRspDto.success(groupDtoList);
}
@RequestMapping(value = "case/group-name/list", method = RequestMethod.GET)
@ResponseBody
public WebApiRspDto<List<String>> getAllGroupName() {
List<String> groupDtoList = new ArrayList<>(1);
Set<Object> groupNames = cacheService.members(RedisKeys.CASE_KEY);
for (Object obj : groupNames) {
UserCaseGroupDto groupDto = new UserCaseGroupDto();
groupDto.setValue(obj.toString());
groupDto.setLabel(obj.toString());
groupDto.setChildren(null);
groupDtoList.add(groupDto.getValue());
}
return WebApiRspDto.success(groupDtoList);
}
@RequestMapping(value = "case/detail", method = RequestMethod.GET)
@ResponseBody
public WebApiRspDto<UserCaseDto> queryCaseDetail(@RequestParam(value = "groupName") String groupName,
@RequestParam(value = "caseName") String caseName) {
String jsonStr = cacheService.mapGet(groupName, caseName);
UserCaseDto caseDto = JsonUtils.parseObject(jsonStr, UserCaseDto.class);
if (Objects.requireNonNull(caseDto).getClassName() == null) {
Map<String, String> classNameMap = getAllSimpleClassName(caseDto.getZkAddress(), caseDto.getServiceName());
for (Map.Entry<String, String> item : classNameMap.entrySet()) {
if (item.getValue().equals(caseDto.getInterfaceKey())) {
caseDto.setClassName(item.getKey());
break;
}
}
}
return WebApiRspDto.success(caseDto);
}
@RequestMapping(value = "case/delete", method = RequestMethod.GET)
@ResponseBody
public WebApiRspDto<String> deleteDetail(@RequestParam(value = "groupName") String groupName,
@RequestParam(value = "caseName") String caseName) {
cacheService.removeMap(groupName, caseName);
return WebApiRspDto.success("删除成功");
}
}
|
[
"liangyudong@bluemoon.com.cn"
] |
liangyudong@bluemoon.com.cn
|
5b7ac5390cfee6006390e6078fb7cdde8f598d49
|
89310d5eaaf500c4fbe5f10a7f664716fcb33dd7
|
/src/main/java/com/app/filetracker/config/audit/AuditEventConverter.java
|
606a1cf4b7953721c2617e0ca9c934993f1d765c
|
[] |
no_license
|
rkshnikhil/skilltracker
|
7cdbc2a934d01009c429bdf1da315f6eed74b7bd
|
8283aaa2f8340d8d91b6c4735cd3794912f54e98
|
refs/heads/master
| 2020-03-17T17:53:35.384241
| 2018-05-17T11:56:40
| 2018-05-17T11:56:40
| 133,806,356
| 0
| 0
| null | 2018-05-17T11:56:41
| 2018-05-17T11:53:40
|
Java
|
UTF-8
|
Java
| false
| false
| 3,329
|
java
|
package com.app.filetracker.config.audit;
import com.app.filetracker.domain.PersistentAuditEvent;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.stereotype.Component;
import java.util.*;
@Component
public class AuditEventConverter {
/**
* Convert a list of PersistentAuditEvent to a list of AuditEvent
*
* @param persistentAuditEvents the list to convert
* @return the converted list.
*/
public List<AuditEvent> convertToAuditEvent(Iterable<PersistentAuditEvent> persistentAuditEvents) {
if (persistentAuditEvents == null) {
return Collections.emptyList();
}
List<AuditEvent> auditEvents = new ArrayList<>();
for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) {
auditEvents.add(convertToAuditEvent(persistentAuditEvent));
}
return auditEvents;
}
/**
* Convert a PersistentAuditEvent to an AuditEvent
*
* @param persistentAuditEvent the event to convert
* @return the converted list.
*/
public AuditEvent convertToAuditEvent(PersistentAuditEvent persistentAuditEvent) {
if (persistentAuditEvent == null) {
return null;
}
return new AuditEvent(Date.from(persistentAuditEvent.getAuditEventDate()), persistentAuditEvent.getPrincipal(),
persistentAuditEvent.getAuditEventType(), convertDataToObjects(persistentAuditEvent.getData()));
}
/**
* Internal conversion. This is needed to support the current SpringBoot actuator AuditEventRepository interface
*
* @param data the data to convert
* @return a map of String, Object
*/
public Map<String, Object> convertDataToObjects(Map<String, String> data) {
Map<String, Object> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, String> entry : data.entrySet()) {
results.put(entry.getKey(), entry.getValue());
}
}
return results;
}
/**
* Internal conversion. This method will allow to save additional data.
* By default, it will save the object as string
*
* @param data the data to convert
* @return a map of String, String
*/
public Map<String, String> convertDataToStrings(Map<String, Object> data) {
Map<String, String> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, Object> entry : data.entrySet()) {
Object object = entry.getValue();
// Extract the data that will be saved.
if (object instanceof WebAuthenticationDetails) {
WebAuthenticationDetails authenticationDetails = (WebAuthenticationDetails) object;
results.put("remoteAddress", authenticationDetails.getRemoteAddress());
results.put("sessionId", authenticationDetails.getSessionId());
} else if (object != null) {
results.put(entry.getKey(), object.toString());
} else {
results.put(entry.getKey(), "null");
}
}
}
return results;
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
648784559370bb9a0ac8a10623258959a8c642b0
|
0397369ae56901759b24277d22e6ee17963a7635
|
/src/com/lw/dingtalkrecord/action/DingtalkRecordAction.java
|
609f26ac4c9de8bd106a04172ebe6fa31f1d6d46
|
[] |
no_license
|
DreamFlyC/yimi
|
df5cdafad79e681629362eb35d3f093e22eafdda
|
88eec8c3fad8542d4db05dd5d99879bd68eab068
|
refs/heads/master
| 2020-04-09T11:40:52.705250
| 2018-12-14T09:34:10
| 2018-12-14T09:34:10
| 160,319,759
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,450
|
java
|
package com.lw.dingtalkrecord.action;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.lw.common.page.Pager;
import com.lw.core.base.action.BaseAction;
import com.lw.dingtalkrecord.entity.DingtalkRecord;
import com.lw.dingtalkrecord.service.IDingtalkRecordService;
@Controller("DingtalkRecordAction")
@RequestMapping(value = "/dingtalkrecord")
@SuppressWarnings("all")
public class DingtalkRecordAction extends BaseAction{
@Autowired
private IDingtalkRecordService dingtalkRecordService;
//信息列表
@RequestMapping("")
public String list(){
instantPage(20);
List<DingtalkRecord> list=dingtalkRecordService.getList();
int total=dingtalkRecordService.getCount();
Pager pager=new Pager(super.getPage(),super.getRows(),total);
pager.setDatas(list);
getRequest().setAttribute("pager",pager);
return "/WEB-INF/dingtalkrecord/dingtalkrecord_list";
}
@RequestMapping(value="/post",method=RequestMethod.GET)
public String addDingtalkRecord(){
return "/WEB-INF/dingtalkrecord/dingtalkrecord_add";
}
//新增信息
@RequestMapping(value="/post",method=RequestMethod.POST)
public String addDingtalkRecord(DingtalkRecord dingtalkRecord){
dingtalkRecordService.save(dingtalkRecord);
return "redirect:/dingtalkrecord.html";
}
//删除信息
@RequestMapping(value="/del/{id}")
public String deleteDingtalkRecord(@PathVariable("id")int id,HttpServletResponse response){
dingtalkRecordService.del(id);
return "redirect:/dingtalkrecord.html";
}
//修改信息
@RequestMapping(value="/edit",method=RequestMethod.POST)
public String updateDingtalkRecord(DingtalkRecord dingtalkRecord,HttpServletResponse response){
dingtalkRecordService.edit(dingtalkRecord);
return "redirect:/dingtalkrecord.html";
}
//编辑前根据id获取信息
@RequestMapping(value="/{id}")
public String viewDingtalkRecord(@PathVariable("id")int id)
{
DingtalkRecord dingtalkRecord=dingtalkRecordService.get(id);
getRequest().setAttribute("dingtalkRecord",dingtalkRecord);
return "/WEB-INF/dingtalkrecord/dingtalkrecord_detail";
}
}
|
[
"742003942@qq.com"
] |
742003942@qq.com
|
0314c491ab9e7c99607f5e1affdc27539c3af4ac
|
92f7ba1ebc2f47ecb58581a2ed653590789a2136
|
/src/com/infodms/dms/common/pattern/NoquotationPattern.java
|
2c827bb6fd0047ad63b0aee9654850db3750b6ec
|
[] |
no_license
|
dnd2/CQZTDMS
|
504acc1883bfe45842c4dae03ec2ba90f0f991ee
|
5319c062cf1932f8181fdd06cf7e606935514bf1
|
refs/heads/master
| 2021-01-23T15:30:45.704047
| 2017-09-07T07:47:51
| 2017-09-07T07:47:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,500
|
java
|
/**********************************************************************
* <pre>
* FILE : NoquotationPattern.java
* CLASS : NoquotationPattern
*
* AUTHOR : ChenLiang
*
* FUNCTION : TODO
*
*
*======================================================================
* CHANGE HISTORY LOG
*----------------------------------------------------------------------
* MOD. NO.| DATE | NAME | REASON | CHANGE REQ.
*----------------------------------------------------------------------
* |2009-10-09| ChenLiang| Created |
* DESCRIPTION:
* </pre>
***********************************************************************/
package com.infodms.dms.common.pattern;
import com.infodms.dms.common.ErrorMsgContainer;
import com.infodms.dms.common.MyPattern;
import com.infodms.dms.common.ValidateUtil;
import com.infodms.dms.exception.BizException;
import com.infodms.dms.util.CommonUtils;
public class NoquotationPattern extends MyPattern
{
public void compile(ErrorMsgContainer container, Object... parms) throws BizException
{
String value = CommonUtils.checkNull((String) parms[0]);
if(value.length() == 0 && minLength != 0) {
container.addErrorMsg(actionKey + "不能为空");
}else{
if(value.length() > maxLength) {
container.addErrorMsg(actionKey + "长度不能超过"+maxLength);
return ;
}
if (!ValidateUtil.isNoquotation(value,minLength, maxLength))
{
container.addErrorMsg(actionKey + "不能包含',%");
}
}
}
}
|
[
"wanghanxiancn@gmail.com"
] |
wanghanxiancn@gmail.com
|
1fa0032d2bec9a14f049e1f47fc679547e930ef6
|
ca6ed1b41ccc5d8ac491aaa077c9974f443d8c94
|
/mall-ware/src/main/java/com/yp/mall/ware/dao/PurchaseDetailDao.java
|
e4107250265118e391d8bedafadb44c4859a66d4
|
[] |
no_license
|
yanping1/guli-mall
|
2b7996f6f5477c315ac7ad8ef8076913d3081fe9
|
60a0a6d9283f29bb1c0295639497ef76a9ed8f46
|
refs/heads/master
| 2023-07-01T12:56:57.413042
| 2021-08-06T09:26:23
| 2021-08-06T09:26:23
| 388,312,493
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 368
|
java
|
package com.yp.mall.ware.dao;
import com.yp.mall.ware.entity.PurchaseDetailEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
*
*
* @author firenay
* @email 1046762075@qq.com
* @date 2020-06-06 21:09:28
*/
@Mapper
public interface PurchaseDetailDao extends BaseMapper<PurchaseDetailEntity> {
}
|
[
"1822117257@qq.com"
] |
1822117257@qq.com
|
f057df4fa33595a22da17d1a221dfa35f872e2c4
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/google/firebase/iid/ad.java
|
af996d854a5ca21f45ec382e1d123dc5574ca73e
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 378
|
java
|
package com.google.firebase.iid;
import android.os.Bundle;
import com.google.android.gms.tasks.Continuation;
final class ad
implements Continuation<Bundle, String>
{
ad(ab paramab) {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes7.jar
* Qualified Name: com.google.firebase.iid.ad
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
ae21a88d4e452d39a2178489695df7fb679a21af
|
ae850894461e86494375a203012da7c5c433fd47
|
/week4/ERS-examples/hibernate-ERS-demo/src/main/java/com/revature/util/HibernateUtil.java
|
9c4a2ff66be75d3e3f03ae500aca2efe4ee4bf3d
|
[] |
no_license
|
bach-tran/demos
|
cdfcbf0e3f537a4f89b05b68e93345c40cc97a96
|
300bad9c35404381a98f9e50315998a873a51eea
|
refs/heads/main
| 2023-07-15T03:28:54.611493
| 2021-08-25T05:47:20
| 2021-08-25T05:47:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,072
|
java
|
package com.revature.util;
import org.hibernate.SessionFactory;
import org.hibernate.boot.Metadata;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
public class HibernateUtil {
private static StandardServiceRegistry registry;
private static SessionFactory sessionFactory;
public static SessionFactory getSessionFactory() {
if(sessionFactory == null) {
try {
registry = new StandardServiceRegistryBuilder().configure().build();
MetadataSources sources = new MetadataSources(registry);
Metadata metadata = sources.getMetadataBuilder().build();
sessionFactory = metadata.getSessionFactoryBuilder().build();
} catch (Exception e) {
e.printStackTrace();
if(registry != null) {
StandardServiceRegistryBuilder.destroy(registry);
}
}
}
return sessionFactory;
}
public static void shutdown() {
if(registry != null) {
StandardServiceRegistryBuilder.destroy(registry);
}
}
}
|
[
"msophiagavrila@gmail.com"
] |
msophiagavrila@gmail.com
|
0b1a490f164db027b484dfc30ff35a1930f090fb
|
c8688db388a2c5ac494447bac90d44b34fa4132c
|
/sources/com/google/android/gms/internal/ads/zzcwu.java
|
024764d152cfd20ca97da876a99a04dac2cb0bf2
|
[] |
no_license
|
mred312/apk-source
|
98dacfda41848e508a0c9db2c395fec1ae33afa1
|
d3ca7c46cb8bf701703468ddc88f25ba4fb9d975
|
refs/heads/master
| 2023-03-06T05:53:50.863721
| 2021-02-23T13:34:20
| 2021-02-23T13:34:20
| 341,481,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 662
|
java
|
package com.google.android.gms.internal.ads;
import android.content.Context;
import android.view.View;
/* compiled from: com.google.android.gms:play-services-ads@@19.5.0 */
public final class zzcwu implements zzcwo<zzbyx> {
/* renamed from: a */
private final zzbzx f15002a;
public zzcwu(Context context, zzbzx zzbzx) {
this.f15002a = zzbzx;
}
public final /* synthetic */ Object zza(zzdnj zzdnj, zzdmu zzdmu, View view, zzcwr zzcwr) {
zzbyz zza = this.f15002a.zza(new zzbos(zzdnj, zzdmu, (String) null), new C2333qq(this, C2259oq.f10399a));
zzcwr.zza(new C2296pq(this, zza));
return zza.zzahh();
}
}
|
[
"mred312@gmail.com"
] |
mred312@gmail.com
|
f693356fc2d8322efae233423c4725f9bac1c83f
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MOCKITO-10b-1-23-SPEA2-WeightedSum:TestLen:CallDiversity/org/mockito/exceptions/Reporter_ESTest_scaffolding.java
|
6b266c52b596ff0cd13eac0dfc522eae78204d77
|
[] |
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
| 4,713
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Apr 06 16:51:13 UTC 2020
*/
package org.mockito.exceptions;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class Reporter_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.mockito.exceptions.Reporter";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Reporter_ESTest_scaffolding.class.getClassLoader() ,
"org.mockito.exceptions.misusing.UnfinishedStubbingException",
"org.mockito.configuration.AnnotationEngine",
"org.mockito.cglib.proxy.Callback",
"org.mockito.exceptions.misusing.UnfinishedVerificationException",
"org.mockito.invocation.Invocation",
"org.mockito.exceptions.verification.NoInteractionsWanted",
"org.mockito.invocation.Location",
"org.mockito.exceptions.PrintableInvocation",
"org.mockito.listeners.InvocationListener",
"org.mockito.exceptions.Reporter",
"org.mockito.exceptions.verification.VerificationInOrderFailure",
"org.mockito.configuration.DefaultMockitoConfiguration",
"org.mockito.invocation.DescribedInvocation",
"org.mockito.internal.configuration.ClassPathLoader",
"org.mockito.exceptions.base.MockitoException",
"org.mockito.exceptions.misusing.NullInsteadOfMockException",
"org.mockito.stubbing.Answer",
"org.mockito.invocation.InvocationOnMock",
"org.mockito.exceptions.verification.WantedButNotInvoked",
"org.mockito.internal.util.StringJoiner",
"org.mockito.internal.exceptions.stacktrace.StackTraceFilter",
"org.mockito.exceptions.misusing.NotAMockException",
"org.mockito.internal.creation.CglibMockMaker",
"org.mockito.exceptions.misusing.FriendlyReminderException",
"org.mockito.configuration.IMockitoConfiguration",
"org.mockito.exceptions.misusing.MissingMethodInvocationException",
"org.mockito.exceptions.verification.SmartNullPointerException",
"org.mockito.exceptions.verification.TooLittleActualInvocations",
"org.mockito.exceptions.misusing.WrongTypeOfReturnValue",
"org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleaner",
"org.mockito.exceptions.stacktrace.StackTraceCleaner",
"org.mockito.internal.configuration.GlobalConfiguration",
"org.mockito.exceptions.base.MockitoAssertionError",
"org.mockito.internal.reporting.Discrepancy",
"org.mockito.cglib.proxy.MethodInterceptor",
"org.mockito.exceptions.verification.TooManyActualInvocations",
"org.mockito.plugins.MockMaker",
"org.mockito.exceptions.verification.ArgumentsAreDifferent",
"org.mockito.exceptions.verification.NeverWantedButInvoked",
"org.mockito.exceptions.misusing.CannotVerifyStubOnlyMock",
"org.mockito.exceptions.misusing.CannotStubVoidMethodWithReturnValue",
"org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleanerProvider",
"org.mockito.plugins.StackTraceCleanerProvider",
"org.mockito.exceptions.misusing.MockitoConfigurationException",
"org.mockito.internal.exceptions.stacktrace.ConditionalStackTraceFilter",
"org.mockito.configuration.MockitoConfiguration",
"org.mockito.exceptions.misusing.InvalidUseOfMatchersException"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
8f2fc54e204d90beaccf4cfe1893daa64be6f988
|
efca855f83be608cc5fcd5f9976b820f09f11243
|
/ethereum/core/src/main/java/org/enterchain/enter/ethereum/core/WrappedEvmAccount.java
|
b85bfee61832d2d0d6aec0a8ed14606830e64952
|
[
"Apache-2.0"
] |
permissive
|
enterpact/enterchain
|
5438e127c851597cbd7e274526c3328155483e58
|
d8b272fa6885e5d263066da01fff3be74a6357a0
|
refs/heads/master
| 2023-05-28T12:48:02.535365
| 2021-06-09T20:44:01
| 2021-06-09T20:44:01
| 375,483,000
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,524
|
java
|
/*
* Copyright ConsenSys AG.
*
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.enterchain.enter.ethereum.core;
import java.util.NavigableMap;
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import org.apache.tuweni.units.bigints.UInt256;
public class WrappedEvmAccount implements EvmAccount {
private final MutableAccount mutableAccount;
public boolean isImmutable() {
return isImmutable;
}
public void setImmutable(final boolean immutable) {
isImmutable = immutable;
}
private boolean isImmutable;
public WrappedEvmAccount(final MutableAccount mutableAccount) {
this.mutableAccount = mutableAccount;
this.isImmutable = false;
}
@Override
public MutableAccount getMutable() throws ModificationNotAllowedException {
if (isImmutable) {
throw new ModificationNotAllowedException();
}
return mutableAccount;
}
@Override
public Address getAddress() {
return mutableAccount.getAddress();
}
@Override
public Hash getAddressHash() {
return mutableAccount.getAddressHash();
}
@Override
public long getNonce() {
return mutableAccount.getNonce();
}
@Override
public Wei getBalance() {
return mutableAccount.getBalance();
}
@Override
public Bytes getCode() {
return mutableAccount.getCode();
}
@Override
public Hash getCodeHash() {
return mutableAccount.getCodeHash();
}
@Override
public int getVersion() {
return mutableAccount.getVersion();
}
@Override
public UInt256 getStorageValue(final UInt256 key) {
return mutableAccount.getStorageValue(key);
}
@Override
public UInt256 getOriginalStorageValue(final UInt256 key) {
return mutableAccount.getOriginalStorageValue(key);
}
@Override
public NavigableMap<Bytes32, AccountStorageEntry> storageEntriesFrom(
final Bytes32 startKeyHash, final int limit) {
return mutableAccount.storageEntriesFrom(startKeyHash, limit);
}
}
|
[
"webframes@gmail.com"
] |
webframes@gmail.com
|
9a6a12d23e676099578d5f9fdca3f72997360bce
|
dc15e59b5baa26178c02561308afde41c315bbb4
|
/swift-study/src/main/java/com/swift/sr18/mt564/SeqE1F92ACHARType.java
|
32f780a9c408be431e0e629e57bd21a7211d8fd7
|
[] |
no_license
|
zbdy20061001/swift
|
0e7014e2986a8f6fc04ad22f2505b7f05d67d7b8
|
260e942b848175d1e8d12571a3d32efecaa3d437
|
refs/heads/master
| 2020-04-26T19:16:05.954125
| 2019-03-04T15:12:27
| 2019-03-04T15:12:27
| 173,768,829
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,862
|
java
|
//
// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.8-b130911.1802 生成的
// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// 在重新编译源模式时, 对此文件的所有修改都将丢失。
// 生成时间: 2018.12.05 时间 12:24:35 AM CST
//
package com.swift.sr18.mt564;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SeqE1_F92a_CHAR_Type complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="SeqE1_F92a_CHAR_Type">
* <complexContent>
* <extension base="{urn:swift:xsd:fin.564.2018}Qualifier">
* <choice>
* <element name="F92A" type="{urn:swift:xsd:fin.564.2018}F92A_Type"/>
* <element name="F92F" type="{urn:swift:xsd:fin.564.2018}F92F_Type"/>
* <element name="F92K" type="{urn:swift:xsd:fin.564.2018}F92K_6_Type"/>
* </choice>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SeqE1_F92a_CHAR_Type", propOrder = {
"f92A",
"f92F",
"f92K"
})
public class SeqE1F92ACHARType
extends Qualifier
{
@XmlElement(name = "F92A")
protected F92AType f92A;
@XmlElement(name = "F92F")
protected F92FType f92F;
@XmlElement(name = "F92K")
protected F92K6Type f92K;
/**
* 获取f92A属性的值。
*
* @return
* possible object is
* {@link F92AType }
*
*/
public F92AType getF92A() {
return f92A;
}
/**
* 设置f92A属性的值。
*
* @param value
* allowed object is
* {@link F92AType }
*
*/
public void setF92A(F92AType value) {
this.f92A = value;
}
/**
* 获取f92F属性的值。
*
* @return
* possible object is
* {@link F92FType }
*
*/
public F92FType getF92F() {
return f92F;
}
/**
* 设置f92F属性的值。
*
* @param value
* allowed object is
* {@link F92FType }
*
*/
public void setF92F(F92FType value) {
this.f92F = value;
}
/**
* 获取f92K属性的值。
*
* @return
* possible object is
* {@link F92K6Type }
*
*/
public F92K6Type getF92K() {
return f92K;
}
/**
* 设置f92K属性的值。
*
* @param value
* allowed object is
* {@link F92K6Type }
*
*/
public void setF92K(F92K6Type value) {
this.f92K = value;
}
}
|
[
"zbdy20061001@163.com"
] |
zbdy20061001@163.com
|
fa66179d033426f1e58c1bde48bc22734b092488
|
d1057dd7f1c0a72821e511f7587e511368f41f94
|
/AndroidProject/Park/app/src/main/java/com/fcn/park/manager/contract/MenuLoadContract.java
|
495ef54a1376533629bdb2e2ada5a55d8e457ab4
|
[] |
no_license
|
hyb1234hi/Atom-Github
|
1c7b1800c2dcf8a12af90bf54de2a5964c6d625e
|
46bcb8cc204ef71f0d310d4bb9a3ae7cdf7b04a1
|
refs/heads/master
| 2020-08-27T16:23:50.568306
| 2018-07-06T01:26:17
| 2018-07-06T01:26:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 705
|
java
|
package com.fcn.park.manager.contract;
import android.support.v7.view.menu.MenuItemImpl;
import com.fcn.park.manager.bean.MenuBean;
import java.util.List;
/**
* Created by lvzp on 2017/3/2.
* 类描述:
*/
public interface MenuLoadContract {
interface View {
List<MenuItemImpl> getMenuList();
}
/**
* 不建议直接实现这个接口,建议继承它的子类{MenuModuleIml}
*
* @param <T>
*/
interface Module<T extends MenuBean> {
void attachMenuList(List<MenuItemImpl> menuItemList);
T buildMenuBean(MenuItemImpl menuItem);
List<T> getMenuBeanList();
}
interface Presenter {
void initMenu();
}
}
|
[
"wufengfeilong@163.com"
] |
wufengfeilong@163.com
|
a2187d0175e86494f9373e505a082338f258fe8f
|
6df88c30e293aaf1b50c39b58e910ee1b0f88d9a
|
/src/main/java/gr/iserm/java/jaxrsjackson/pojos/MyOwnTypeMixin.java
|
25381390655f03457d9fbc22709c5b201e554935
|
[] |
no_license
|
sermojohn/jaxrs-resteasy-jackson
|
d59e524e070ff0728a494390ae8665b5cfc91fd6
|
4bbdaca731808ae041bcd7489c8d63b412a9036d
|
refs/heads/master
| 2021-01-10T04:14:33.262658
| 2016-02-26T00:34:09
| 2016-02-26T00:34:09
| 52,566,584
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 315
|
java
|
package gr.iserm.java.jaxrsjackson.pojos;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* Created by sermojohn on 26/2/2016.
*/
public class MyOwnTypeMixin extends MyOwnType {
public MyOwnTypeMixin(@JsonProperty("paths") List<Path> paths) {
super(paths);
}
}
|
[
"sermojohn@gmail.com"
] |
sermojohn@gmail.com
|
6c08014c2a9e4cb4d649a3d3617043ab0f3e955e
|
8baa32e365272c27a77467f0d7cdd13bb8f1474f
|
/src/main/java/net/dv8tion/jda/core/audio/CombinedAudio.java
|
294114ad49ff3ce7d3aad4d500c8717db5a74765
|
[
"Apache-2.0"
] |
permissive
|
thvardhan/JDA
|
9853d162d17d008bbcf56576c803abdbbb594311
|
9948019cdd98cb5e2a6c25a8785bcac0429c9c8f
|
refs/heads/master
| 2020-05-22T22:31:27.130313
| 2017-03-12T15:00:23
| 2017-03-12T15:00:23
| 84,730,582
| 0
| 0
| null | 2017-03-12T14:10:35
| 2017-03-12T14:10:35
| null |
UTF-8
|
Java
| false
| false
| 3,158
|
java
|
/*
* Copyright 2015-2016 Austin Keener & Michael Ritter
*
* 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 net.dv8tion.jda.core.audio;
import net.dv8tion.jda.core.entities.User;
import java.util.Collections;
import java.util.List;
/**
* Represents a packet of combined audio data from 0 to n Users.
*/
public class CombinedAudio
{
protected List<User> users;
protected short[] audioData;
public CombinedAudio(List<User> users, short[] audioData)
{
this.users = Collections.unmodifiableList(users);
this.audioData = audioData;
}
/**
* An unmodifiable list of all {@link net.dv8tion.jda.core.entities.User Users} that provided audio that was combined.<br>
* Basically: This is a list of all users that can be heard in the data returned by {@link #getAudioData(double)}<p>
*
* <b>NOTE: If no users were speaking, this list is empty and {@link #getAudioData(double)} provides silent audio data.</b>
*
* @return
* Never-null list of all users that provided audio.
*/
public List<User> getUsers()
{
return users;
}
/**
* Provides 20 Milliseconds of combined audio data in 48KHz 16bit stereo signed BigEndian PCM.<br>
* Format defined by: {@link net.dv8tion.jda.core.audio.AudioReceiveHandler#OUTPUT_FORMAT AudioReceiveHandler.OUTPUT_FORMAT}.<p>
*
* The output volume of the data can be modifed by the provided `volume` parameter. `1.0`is considered to be 100% volume.<br>
* Going above `1.0` can increase the volume further, but you run the risk of audio distortion.<p>
*
* <b>NOTE: If no users were speaking, this provides silent audio and {@link #getUsers()} returns an empty list!</b>
*
* @param volume
* Value used to modify the "volume" of the returned audio data. 1.0 is normal volume.
* @return
* Never-null byte array of PCM data defined by {@link net.dv8tion.jda.core.audio.AudioReceiveHandler#OUTPUT_FORMAT AudioReceiveHandler.OUTPUT_FORMAT}
*/
public byte[] getAudioData(double volume)
{
short s;
int byteIndex = 0;
byte[] audio = new byte[audioData.length * 2];
for (int i = 0; i < audioData.length; i++)
{
s = audioData[i];
if (volume != 1.0)
s = (short) (s * volume);
byte leftByte = (byte) ((0x000000FF) & (s >> 8));
byte rightByte = (byte) (0x000000FF & s);
audio[byteIndex] = leftByte;
audio[byteIndex + 1] = rightByte;
byteIndex += 2;
}
return audio;
}
}
|
[
"keeneraustin@yahoo.com"
] |
keeneraustin@yahoo.com
|
6b7a386b5d1607a7fdaf8710a75467f1e3b9d091
|
774004a61fbc87daf2a51fa8466e7508dbc9f6b6
|
/bqiupu/account_sync/src/com/borqs/common/util/BLog.java
|
127a5569a7e62126c5e9d305be4067d62e07dfad
|
[] |
no_license
|
eastlhu/android
|
4f23984a5f11f835a22136ddd95b8f3b964ff3fd
|
0d256031e3c04fffdf61700fcbb49f7fcf93486a
|
refs/heads/master
| 2021-01-21T04:11:53.350910
| 2013-09-24T07:29:49
| 2013-09-24T07:29:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 729
|
java
|
/*
* Copyright (C) 2007-2011 Borqs Ltd.
* All rights reserved.
*/
package com.borqs.common.util;
import com.borqs.sync.client.common.Logger;
public class BLog {
private static String TAG = "BorqsContactsService";
private static boolean ACCOUNT_LOG_EABLED = true;
public static void d(String msg){
if(ACCOUNT_LOG_EABLED){
Logger.logD(TAG, msg);
}
}
public static void d(String tag, String msg){
if(ACCOUNT_LOG_EABLED){
Logger.logD(tag, msg);
}
}
public static void w(String msg){
if(ACCOUNT_LOG_EABLED){
Logger.logW(TAG, msg);
}
}
public static void e(String msg){
if(ACCOUNT_LOG_EABLED){
Logger.logE(TAG, msg);
}
}
}
|
[
"liuhuadong78@gmail.com"
] |
liuhuadong78@gmail.com
|
7c61bb7540be2b8daf70144ac538824c36f60671
|
d4edccf465d4a543f3c9abe068a43b44c75fba6f
|
/src/main/java/com/baislsl/decompiler/structure/attribute/ElementValue.java
|
9b9243d8db1dcc6fe98c169a42dee424610601f8
|
[
"MIT"
] |
permissive
|
msmtmsmt123/java-class-reader
|
724e3d806d0a1f9485e8924354ba18488baa83ba
|
23de04348aea7b31746699c2724077e1fc4c37a8
|
refs/heads/master
| 2021-05-02T17:43:08.392338
| 2017-11-18T06:31:43
| 2017-11-18T06:31:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,909
|
java
|
package com.baislsl.decompiler.structure.attribute;
import com.baislsl.decompiler.DecompileException;
import com.baislsl.decompiler.utils.Read;
import java.io.DataInputStream;
public abstract class ElementValue implements Builder {
private static final int TAG_SIZE = 1;
static final int INDEX_SIZE = 2;
private int tag;
public static ElementValue getElementValue(DataInputStream file) throws DecompileException {
int tag = Read.readBytes(file, TAG_SIZE);
ElementValue value = getElementType(tag);
value.build(file);
return value;
}
ElementValue(int tag) {
this.tag = tag;
}
private static ElementValue getElementType(int tag) throws DecompileException {
switch (tag) {
case 'B':
case 'C':
case 'D':
case 'F':
case 'I':
case 'J':
case 'S':
case 'Z':
case 's':
return new ConstantType(tag);
case 'e':
return new EnumType(tag);
case 'c':
return new ClassType(tag);
case '@':
return new AnnotationType(tag);
case '[':
return new ArrayType(tag);
default:
throw new DecompileException(
String.format("tag of value %d not match for element type", tag)
);
}
}
public int getTag() {
return tag;
}
}
class ConstantType extends ElementValue {
private int constValueIndex;
ConstantType(int tag) {
super(tag);
}
@Override
public void build(DataInputStream file) throws DecompileException {
constValueIndex = Read.readBytes(file, INDEX_SIZE);
}
public int getConstValueIndex() {
return constValueIndex;
}
}
class EnumType extends ElementValue {
private int typeNameIndex, constNameValue;
EnumType(int tag) {
super(tag);
}
@Override
public void build(DataInputStream file) throws DecompileException {
typeNameIndex = Read.readBytes(file, INDEX_SIZE);
constNameValue = Read.readBytes(file, INDEX_SIZE);
}
public int getConstNameValue() {
return constNameValue;
}
public int getTypeNameIndex() {
return typeNameIndex;
}
}
class ClassType extends ElementValue {
private int classInfoIndex;
ClassType(int tag) {
super(tag);
}
@Override
public void build(DataInputStream file) throws DecompileException {
classInfoIndex = Read.readBytes(file, INDEX_SIZE);
}
public int getClassInfoIndex() {
return classInfoIndex;
}
}
class AnnotationType extends ElementValue {
private Annotation annotation;
AnnotationType(int tag) {
super(tag);
}
@Override
public void build(DataInputStream file) throws DecompileException {
annotation = Annotation.getAnnotation(file);
}
public Annotation getAnnotation() {
return annotation;
}
}
class ArrayType extends ElementValue {
private final static int ELEMENT_VALUE_NUMBER_SIZE = 2;
private ElementValue[] elementValues;
ArrayType(int tag) {
super(tag);
}
@Override
public void build(DataInputStream file) throws DecompileException {
int elementValuesNum = Read.readBytes(file, ELEMENT_VALUE_NUMBER_SIZE);
elementValues = new ElementValue[elementValuesNum];
for (int i = 0; i < elementValuesNum; i++) {
elementValues[i] = ElementValue.getElementValue(file);
}
}
public int getElementValuesSize() {
return elementValues.length;
}
public ElementValue[] getElementValues() {
return elementValues;
}
public ElementValue getElementValueAt(int index){
return elementValues[index];
}
}
|
[
"baislsl666@gmail.com"
] |
baislsl666@gmail.com
|
624544fdd0acaf444341590bce056455d7ee2cda
|
e8ecd9a69fea673dd76f65f9075fd1c3c64b4e63
|
/2018-1/Aps3/src/java/rn/CursoRN.java
|
7ef5c4909f7dededbac6eaae4c0a954eae5fefe6
|
[] |
no_license
|
Neimarmg/PI2
|
6e18192e5cb0c6763304279dd7e4cbe0245bb9e1
|
28ff0f180f4d884609da14ac10826798b0bb1058
|
refs/heads/master
| 2021-01-23T04:59:27.339417
| 2018-07-12T19:13:17
| 2018-07-12T19:13:17
| 86,265,440
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,271
|
java
|
package rn;
import entidade.aCurso;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import util.JPAUtil;
/**
*
* @author neimarmoises
*/
public class CursoRN {
public aCurso inserir(aCurso curso) {
new JPAUtil().execInsert(curso, true);
return curso;
}
public List<aCurso> listar() {
EntityManager manager = JPAUtil.getManager();
TypedQuery<aCurso> query = manager.createQuery("SELECT m FROM aCurso m",aCurso.class);
List<aCurso> listaCursos = query.getResultList();
System.out.println("Curso:");
for (aCurso m : listaCursos) {
view.View.msg(m.getIdCurso()+ "-" + m.getIdModalidade()+ "-" + m.getIdProjetoCurso()+ "-" + m.getNomeCurso());
}
manager.close();
return (listaCursos);
}
public aCurso buscarPorId(Long id) {
EntityManager manager = JPAUtil.getManager();
aCurso curso = manager.find(aCurso.class, id);
manager.close();
return curso;
}
public aCurso atualizar(Long id, aCurso curso) throws Exception{
EntityManager manager = JPAUtil.getManager();
aCurso cursoAtual = manager.find(aCurso.class,id);
if(cursoAtual == null) throw new Exception();
manager.getTransaction().begin();
if(curso.getIdModalidade()!=null && !curso.getIdModalidade().equals(id))
cursoAtual.setIdModalidade(curso.getIdModalidade());
if(curso.getIdProjetoCurso()!=null && !curso.getIdProjetoCurso().equals(id))
curso.setIdProjetoCurso(curso.getIdProjetoCurso());
if(curso.getNomeCurso()!=null && !curso.getNomeCurso().isEmpty())
cursoAtual.setNomeCurso(curso.getNomeCurso());
manager.getTransaction().commit();
manager.close();
return cursoAtual; }
public aCurso deletar(Long id) throws Exception{
EntityManager manager = JPAUtil.getManager();
aCurso cursoAtual = manager.find(aCurso.class,id);
new JPAUtil().execDelete(manager, cursoAtual, true);
return (cursoAtual);
}
}
|
[
"neimarmg@hotmail.com"
] |
neimarmg@hotmail.com
|
9812044b28d4c7bc3ab78390b447a952b09837e8
|
dcd054783859a7a1bb3a74eadf867229044720b0
|
/app/src/main/java/com/example/feicui/news2/fragment/FragmentForgetpass.java
|
23e1bbc72bf53bfb743efe419d28f91e2aee3f96
|
[] |
no_license
|
tongshuai/News
|
d1f5fc6a446e101d66dc82c710e7c304add84dc1
|
70377bd86e1daae4f0882cc3053484d545334d9d
|
refs/heads/master
| 2020-07-04T04:26:50.951885
| 2016-11-18T07:33:46
| 2016-11-18T07:33:46
| 74,106,394
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,255
|
java
|
package com.example.feicui.news2.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.example.feicui.news2.R;
import com.example.feicui.news2.entity.BaseEntity;
import com.example.feicui.news2.entity.ToEmail;
import com.example.feicui.news2.parser.ParserUser;
import com.example.feicui.news2.ui.MainActivity;
import com.example.feicui.news2.utils.CommonUtil;
import com.example.feicui.news2.utils.UserManager;
import edu.feicui.mnewsupdate.volley.Response;
import edu.feicui.mnewsupdate.volley.VolleyError;
/**
* Created by Administrator on 2016/11/10.
*/
public class FragmentForgetpass extends Fragment {
private View view;
private EditText et_email;
private Button btn_commit;
private UserManager userManager;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
view=inflater.inflate(R.layout.fragment_user_wangjimima,container,false);
et_email= (EditText) view.findViewById(R.id.et_wangjimima);
btn_commit= (Button) view.findViewById(R.id.btn_wangjimima);
btn_commit.setOnClickListener(clickListener);
return view;
}
private Response.Listener<String> listener = new Response.Listener<String>() {
@Override
public void onResponse(String response) {
BaseEntity<ToEmail> entity = ParserUser.parserGetPwd(response);
int status = Integer.parseInt(entity.getStatus());
ToEmail data = entity.getData();
if(status==0){
if(data.getResult()==0){
((MainActivity)getActivity()).showFragmentMain();
}else if(data.getResult()==-1){
et_email.requestFocus();
}else if(data.getResult()==-2){
et_email.requestFocus();
}
Toast.makeText(getActivity(), data.getExplain(), Toast.LENGTH_SHORT).show();
}
}
};
private Response.ErrorListener errorListener = new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(getActivity(), "网络连接异常", Toast.LENGTH_SHORT).show();
}
};
private View.OnClickListener clickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
if(v.getId()==R.id.btn_wangjimima){
String email = et_email.getText().toString().trim();
if(!CommonUtil.verifyEmail(email)){
Toast.makeText(getActivity(), "邮箱格式不正确", Toast.LENGTH_SHORT).show();
return;
}
if(userManager==null){
userManager = UserManager.getInstance(getActivity());
}
userManager.forgetPass(getActivity(),listener,errorListener,CommonUtil.VERSION_CODE+"",email);
}
}
};
}
|
[
"123456@qq.com"
] |
123456@qq.com
|
fe8e4671b361008bae211260baf79b398d9da7dc
|
57b95a057dc4c7526736cb90abda10ef68ef9a8d
|
/designer/src/com/fr/design/webattr/ToolBarPane.java
|
1c44fa4cc991ddb26f64af9ca10a875e80ecf5a1
|
[] |
no_license
|
jingedawang/fineRep
|
1f97702f8690d6119a817bba8f44c265e9d7fcb5
|
fce3e7a9238dd13fc168bf475f93496abd4a9f39
|
refs/heads/master
| 2021-01-18T08:21:05.238130
| 2016-02-28T11:15:25
| 2016-02-28T11:15:25
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 5,482
|
java
|
package com.fr.design.webattr;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.ToolBar;
import com.fr.form.ui.Widget;
import javax.swing.*;
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.List;
public class ToolBarPane extends BasicBeanPane<ToolBar> {
private FToolBar ftoolbar = new FToolBar();
public ToolBarPane() {
super();
this.initComponent();
}
/**
* 添加鼠标监听
*
* @param mouselistener 鼠标监听
*/
public void addAuthorityListener(MouseListener mouselistener) {
List<ToolBarButton> list = ftoolbar.getButtonlist();
for (int i = 0; i < list.size(); i++) {
list.get(i).addMouseListener(mouselistener);
}
}
public ToolBarPane(ToolBarButton button) {
super();
this.initComponent();
this.add(button);
}
/**
* 初始化组件
*/
public void initComponent() {
this.addMouseListener(listener);
this.setLayout(FRGUIPaneFactory.createBoxFlowLayout());
this.setTransferHandler(new ToolBarHandler(TransferHandler.COPY));
this.setBorder(BorderFactory.createTitledBorder(""));
}
/**
* 删除鼠标事件
*/
public void removeDefaultMouseListener() {
this.removeMouseListener(listener);
}
@Override
protected String title4PopupWindow() {
return "Toolbar";
}
public void setSelectedButton(ToolBarButton button) {
this.ftoolbar.addButton(button);
}
/**
* 添加组件
*
* @param comp 组件
*
* @return 被添加的组件
*/
public Component add(Component comp) {
if (comp instanceof ToolBarButton) {
this.ftoolbar.addButton((ToolBarButton) comp);
}
return super.add(comp);
}
private Component addComp(Component comp) {
return super.add(comp);
}
protected void removeButtonList() {
this.ftoolbar.clearButton();
}
protected void setFToolBar(FToolBar ftoolbar) {
if (ftoolbar == null) {
ftoolbar = new FToolBar();
}
this.ftoolbar = ftoolbar;
this.setToolBar(this.ftoolbar.getButtonlist());
}
public List<ToolBarButton> getToolBarButtons() {
return ftoolbar.getButtonlist();
}
protected FToolBar getFToolBar() {
return this.ftoolbar;
}
protected boolean isEmpty() {
return this.ftoolbar.getButtonlist().size() <= 0;
}
private void setToolBar(List<ToolBarButton> list) {
if (list == null || list.size() < 0) {
return;
}
this.removeAll();
for (int i = 0; i < list.size(); i++) {
this.addComp(list.get(i));
}
this.validate();
this.repaint();
}
@Override
public void populateBean(ToolBar toolbar) {
this.removeAll();
this.getFToolBar().clearButton();
for (int j = 0; j < toolbar.getWidgetSize(); j++) {
Widget widget = toolbar.getWidget(j);
WidgetOption no = WidgetOption.getToolBarButton(widget.getClass());
if (no == null){
//如果装了什么插件, 放到了工具栏上, 后来删除了插件, 模板里还存着之前的控件
continue;
}
ToolBarButton button = new ToolBarButton(no.optionIcon(), widget);
button.setNameOption(no);
this.add(button);
this.validate();
this.repaint();
}
this.getFToolBar().setBackground(toolbar.getBackground());
this.getFToolBar().setDefault(toolbar.isDefault());
}
@Override
public ToolBar updateBean() {
return this.ftoolbar.getToolBar();
}
MouseListener listener = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() >= 2 && !SwingUtilities.isRightMouseButton(e)) {
final EditToolBar tb = new EditToolBar();
tb.populate(getFToolBar());
BasicDialog dialog = tb.showWindow(SwingUtilities.getWindowAncestor(ToolBarPane.this));
dialog.addDialogActionListener(new DialogActionAdapter() {
@Override
public void doOk() {
ToolBarPane.this.setFToolBar(tb.update());
}
});
dialog.setVisible(true);
}
}
};
/*
* 拖拽属性设置
*/
private class ToolBarHandler extends TransferHandler {
private int action;
public ToolBarHandler(int action) {
this.action = action;
}
@Override
public boolean canImport(TransferHandler.TransferSupport support) {
if (!support.isDrop()) {
return false;
}
if (!support.isDataFlavorSupported(DataFlavor.stringFlavor)) {
return false;
}
boolean actionSupported = (action & support.getSourceDropActions()) == action;
if (actionSupported) {
support.setDropAction(action);
return true;
}
return false;
}
@Override
public boolean importData(TransferHandler.TransferSupport support) {
if (!canImport(support)) {
return false;
}
WidgetOption data;
try {
data = (WidgetOption) support.getTransferable().getTransferData(DataFlavor.stringFlavor);
} catch (UnsupportedFlavorException e) {
return false;
} catch (java.io.IOException e) {
return false;
}
Widget widget = data.createWidget();
ToolBarButton btn = new ToolBarButton(data.optionIcon(), widget);
btn.setNameOption(data);
ToolBarPane.this.add(btn);
ToolBarPane.this.validate();
ToolBarPane.this.repaint();
return true;
}
}
}
|
[
"develop@finereport.com"
] |
develop@finereport.com
|
59c012b12a01dab97098158c553c080c3d342f4b
|
7f52c1414ee44a3efa9fae60308e4ae0128d9906
|
/core/src/test/java/com/alibaba/druid/bvt/sql/oracle/visitor/OracleOutputVisitorTest_Aggregate.java
|
eda1d2de185f402b9c783bbb53084cd35459bff8
|
[
"Apache-2.0"
] |
permissive
|
luoyongsir/druid
|
1f6ba7c7c5cabab2879a76ef699205f484f2cac7
|
37552f849a52cf0f2784fb7849007e4656851402
|
refs/heads/master
| 2022-11-19T21:01:41.141853
| 2022-11-19T13:21:51
| 2022-11-19T13:21:51
| 474,518,936
| 0
| 1
|
Apache-2.0
| 2022-03-27T02:51:11
| 2022-03-27T02:51:10
| null |
UTF-8
|
Java
| false
| false
| 2,264
|
java
|
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.druid.bvt.sql.oracle.visitor;
import java.util.List;
import org.junit.Assert;
import junit.framework.TestCase;
import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser;
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleOutputVisitor;
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleSchemaStatVisitor;
import com.alibaba.druid.stat.TableStat.Column;
public class OracleOutputVisitorTest_Aggregate extends TestCase {
public void test_0() throws Exception {
String sql = "SELECT MAX(salary) from emp where F1 = Date '2011-10-01'";
OracleStatementParser parser = new OracleStatementParser(sql);
List<SQLStatement> statementList = parser.parseStatementList();
SQLStatement stmt = statementList.get(0);
Assert.assertEquals(1, statementList.size());
OracleSchemaStatVisitor visitor = new OracleSchemaStatVisitor();
stmt.accept(visitor);
Assert.assertEquals(1, visitor.getTables().size());
Assert.assertEquals(true, visitor.containsTable("emp"));
Assert.assertEquals(2, visitor.getColumns().size());
Assert.assertEquals(true, visitor.getColumns().contains(new Column("emp", "salary")));
Assert.assertEquals(true, visitor.getColumns().contains(new Column("emp", "F1")));
StringBuilder buf = new StringBuilder();
OracleOutputVisitor outputVisitor = new OracleOutputVisitor(buf);
stmt.accept(outputVisitor);
Assert.assertEquals("SELECT MAX(salary)\nFROM emp\nWHERE F1 = DATE '2011-10-01'", buf.toString());
}
}
|
[
"shaojin.wensj@alibaba-inc.com"
] |
shaojin.wensj@alibaba-inc.com
|
bfbbce108c88ee061a21e4db73ae8472c690ce79
|
505fe7b9cf0d0958acf11f0058dbb5f8e797a0bb
|
/chapter3/src/main/java/WriteData/ThreadRead.java
|
01684e156af261811291eb841465d9a83644b11f
|
[] |
no_license
|
clown14/learnThread
|
e985cd9c15a03b311051d8e2a40cab066471f288
|
73dc2758269c1955ed6a85581c6772838e46de9a
|
refs/heads/master
| 2021-06-04T19:45:49.683679
| 2021-02-23T16:13:12
| 2021-02-23T16:13:12
| 135,125,677
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 379
|
java
|
package WriteData;
import java.io.PipedInputStream;
public class ThreadRead extends Thread {
private ReadData read;
private PipedInputStream input;
@Override
public void run() {
read.readMethod(input);
}
public ThreadRead(ReadData read, PipedInputStream input) {
super();
this.read = read;
this.input = input;
}
}
|
[
"785613198@qq.com"
] |
785613198@qq.com
|
a7563e44e73862a500bf598aa56d914a56a55827
|
6500848c3661afda83a024f9792bc6e2e8e8a14e
|
/gp_JADX/com/google/android/instantapps/common/p217e/ba.java
|
df99d3c1a1c12c2ab7d2ad455726916853d667a8
|
[] |
no_license
|
enaawy/gproject
|
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
|
91cb88559c60ac741d4418658d0416f26722e789
|
refs/heads/master
| 2021-09-03T03:49:37.813805
| 2018-01-05T09:35:06
| 2018-01-05T09:35:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 490
|
java
|
package com.google.android.instantapps.common.p217e;
import p000c.p001a.C0000a;
import p002a.p003a.C0004c;
public final class ba implements C0000a {
public final C0000a f29067a;
public ba(C0000a c0000a) {
this.f29067a = c0000a;
}
public final /* synthetic */ Object mo1a() {
return (bf) C0004c.m7a(((bg) this.f29067a.mo1a()).m27118a("SettingsReminder__").m27114a("required_views", 1), "Cannot return null from a non-@Nullable @Provides method");
}
}
|
[
"genius.ron@gmail.com"
] |
genius.ron@gmail.com
|
05207b178c635738ad7c66084609c8ef55360ef0
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project97/src/main/java/org/gradle/test/performance97_1/Production97_17.java
|
dcf50f91e642c94450c778c970c06a9116c952b2
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 302
|
java
|
package org.gradle.test.performance97_1;
public class Production97_17 extends org.gradle.test.performance17_1.Production17_17 {
private final String property;
public Production97_17() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
735a18ac59cba0ac26832083bfd608f3f8dc96ac
|
78f284cd59ae5795f0717173f50e0ebe96228e96
|
/factura-negocio/src/cl/stotomas/factura/negocio/init_3/copy4/TestingModel.java
|
b95f315f4b37840776114e46f89f844694007b5e
|
[] |
no_license
|
Pattricio/Factura
|
ebb394e525dfebc97ee2225ffc5fca10962ff477
|
eae66593ac653f85d05071b6ccb97fb1e058502d
|
refs/heads/master
| 2020-03-16T03:08:45.822070
| 2018-05-07T15:29:25
| 2018-05-07T15:29:25
| 132,481,305
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 680
|
java
|
package cl.stotomas.factura.negocio.init_3.copy4;
public class TestingModel {
class Echo {
// Control de Proceso
// Posible reemplazo de librería por una maliciosa
// Donde además s enos muestra el nombre explícito de esta.
public native void runEcho();
{
System.loadLibrary("echo"); // Se carga librería
}
public void main(String[] args)
{
new Echo().runEcho();
}
}
public final class compareStrings{
public String hola;
public String adios;
public void comparar()
{
if (hola == adios)
{
System.out.println("hola == adios");
}
}
}
}
|
[
"Adriana Molano@DESKTOP-GQ96FK8"
] |
Adriana Molano@DESKTOP-GQ96FK8
|
a8f248adc6ef440cee63ac0d26dba23aedf26add
|
532960b369d1364e7ed58e6a3650f3f43c6d7dac
|
/src/main/java/com/openkm/dao/bean/KeyValue.java
|
67b58dbebc8842bfa4050dfe990b369434e61d7b
|
[] |
no_license
|
okelah/openkm-code
|
f0c02062d909b2d5e185b9784b33a9b8753be948
|
d9e0687e0c6dab385cac0ce8b975cb92c8867743
|
refs/heads/master
| 2021-01-13T15:53:59.286016
| 2016-08-18T22:06:25
| 2016-08-18T22:06:25
| 76,772,981
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,581
|
java
|
/**
* OpenKM, Open Document Management System (http://www.openkm.com)
* Copyright (c) 2006-2015 Paco Avila & Josep Llort
*
* No bytes were intentionally harmed during the development of this application.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package com.openkm.dao.bean;
import java.io.Serializable;
public class KeyValue implements Serializable {
private static final long serialVersionUID = 1L;
private String key;
private String value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
sb.append("key="); sb.append(key);
sb.append(", value="); sb.append(value);
sb.append("}");
return sb.toString();
}
}
|
[
"github@sven-joerns.de"
] |
github@sven-joerns.de
|
4870eff127c736b8b8d6559d0d5a1ddbbe3eae7a
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/33/33_68d898302f91a1ef0329e5304ce63104effa5671/Flags/33_68d898302f91a1ef0329e5304ce63104effa5671_Flags_s.java
|
c57b28bf7a3679ed95f41c7b5d9090c58fea67f1
|
[] |
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,118
|
java
|
/**
* Generic flags class.
*
* Handles managing a set of flag states and efficiently encoding and decoding them
* to/from platform-independent binary format.
*/
public class Flags {
public static final int kDefaultNumFlags = 16;
public static final int kDefaultEncodedLength = (kDefaultNumFlags + 7) / 8;
private byte[] backingData;
/**
* Default constructor. Provides the default number of flags and
* clears all of them initially.
*/
public Flags() {
this(kDefaultNumFlags);
}
public Flags(int numFlags) {
backingData = new byte[(numFlags + 7) / 8];
}
public Flags(SyncFlags flag) {
this(kDefaultNumFlags);
set(flag);
}
public Flags(Flags other) {
backingData = new byte[other.backingData.length];
System.arraycopy(other.backingData, 0, backingData, 0, backingData.length);
}
private Flags(byte[] packed, int offset, int length) {
if (offset < 0 || offset >= packed.length)
throw new IllegalArgumentException("Invalid offset!");
if (length < 0 || offset + length >= packed.length)
throw new IllegalArgumentException("Packed data runs off the end of the array!");
backingData = new byte[length];
System.arraycopy(packed, offset, backingData, 0, length);
}
private int flagToByteId(int flag) {
if (flag >= (backingData.length * 8))
throw new IllegalArgumentException("No flag by that number!");
return backingData.length - ((flag + 7) / 8);
}
public int flagToBit(int flag) {
return (1 << (7 - (flag % 8)));
}
public boolean isSet(int flag) {
return (backingData[flagToByteId(flag)] & flagToBit(flag)) != 0;
}
public boolean isSet(SyncFlags flag) {
return (backingData[flagToByteId(flag.getId())] & flagToBit(flag.getId())) != 0;
}
public void set(int flag) {
backingData[flagToByteId(flag)] |= flagToBit(flag);
}
public void set(SyncFlags flag) {
set(flag.getId());
}
public void clear(int flag) {
backingData[flagToByteId(flag)] &= ~flagToBit(flag);
}
public void clear(SyncFlags flag) {
clear(flag.getId());
}
public void twiddle(int flag) {
backingData[flagToByteId(flag)] ^= flagToBit(flag);
}
public void twiddle(SyncFlags flag) {
twiddle(flag.getId());
}
public byte[] pack() {
byte[] packed = new byte[backingData.length];
System.arraycopy(backingData, 0, packed, 0, backingData.length);
return packed;
}
public static Flags unpack(byte[] packed, int start, int length) {
return new Flags(packed, start, length);
}
public String printByteArray(byte[] arr) {
StringBuilder sb = new StringBuilder();
sb.append("[");
if (arr.length > 0) {
sb.append(Integer.toHexString(arr[0] & 0xFF));
for (int i = 1; i < arr.length; ++i)
sb.append(", " + Integer.toHexString(arr[i] & 0xFF));
}
sb.append("]");
return sb.toString();
}
@Override
public String toString() {
return printByteArray(backingData);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
325d7717ee390f45e94b52bc641dd21d38708368
|
bf16fdf1a09b941840ccf8841fc0f5854c8947a9
|
/zadapter/src/main/java/com/zone/adapter/loadmore/view/LoadMoreFrameLayout.java
|
1938368277fc9038889affe599bec42f4efb2a81
|
[] |
no_license
|
SeekingForever/ZAdapter
|
d5de44d9bc99c2bfd3b1a45ae201e0a39c929395
|
f7653a2904e930d7ec2f1bcc94b9faf0c2ae2cc2
|
refs/heads/master
| 2021-01-25T11:40:49.016920
| 2017-04-08T09:42:05
| 2017-04-08T09:42:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 648
|
java
|
package com.zone.adapter.loadmore.view;
import android.content.Context;
import com.zone.adapter.R;
/**
* Created by Administrator on 2016/4/1.
*/
public class LoadMoreFrameLayout extends BaseLoadMoreFrameLayout {
public LoadMoreFrameLayout(Context context, Object listener) {
super(context, listener);
}
@Override
public int getLoadingLayoutID() {
return R.layout.sample_common_list_footer_loading;
}
@Override
public int getFailLayoutID() {
return R.layout.sample_common_list_footer_network_error;
}
@Override
public boolean getFailClickable() {
return true;
}
}
|
[
"1149324777@qq.com"
] |
1149324777@qq.com
|
c37e32bc82242305dbf8e7cec4a0491d0d89da5d
|
3e176296759f1f211f7a8bcfbba165abb1a4d3f1
|
/gosu-core-api/src/main/java/gw/lang/reflect/module/Dependency.java
|
94fc882e3efe3592e6510dcbf788c1766db2f535
|
[
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
gosu-lang/old-gosu-repo
|
6335ac90cd0c635fdec6360e3e208ba12ac0a39e
|
48c598458abd412aa9f2d21b8088120e8aa9de00
|
refs/heads/master
| 2020-05-18T03:39:34.631550
| 2014-04-21T17:36:38
| 2014-04-21T17:36:38
| 1,303,622
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 561
|
java
|
/*
* Copyright 2013 Guidewire Software, Inc.
*/
package gw.lang.reflect.module;
import gw.lang.UnstableAPI;
@UnstableAPI
public class Dependency
{
private IModule _module;
private boolean _exported;
public Dependency( IModule module, boolean bExported )
{
_module = module;
_exported = bExported;
}
public IModule getModule()
{
return _module;
}
public boolean isExported()
{
return _exported;
}
public String toString() {
return _module.toString() + (_exported ? " (exported)" : " (not exported)");
}
}
|
[
"smckinney@guidewire.com"
] |
smckinney@guidewire.com
|
f3c3c79ed5a62cf2c918c0d72752236db55bb9ec
|
b53605c3342ab14e31ea17f9422f89be939f9963
|
/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartType.java
|
7cd578639a39ed7ec39f76b019e1fe12ed17e51d
|
[
"Apache-2.0"
] |
permissive
|
marcelosv/juneau
|
2b099d7b36185b7c3cd417ab4c71210d8527ee93
|
b9303a124742987dddf20481fca4b6d7c6f56db1
|
refs/heads/master
| 2021-10-26T02:29:25.495084
| 2019-04-09T17:21:46
| 2019-04-09T17:21:46
| 157,426,064
| 2
| 0
|
Apache-2.0
| 2018-11-13T18:22:23
| 2018-11-13T18:22:23
| null |
UTF-8
|
Java
| false
| false
| 2,129
|
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.juneau.httppart;
/**
* Represents possible enum values that can be passed to the {@link HttpPartSerializerSession#serialize(HttpPartType, HttpPartSchema, Object)}.
*/
public enum HttpPartType {
/** An HTTP request body */
BODY,
/** A URI path variable */
PATH,
/** A URI query parameter */
QUERY,
/** A form-data parameter */
FORMDATA,
/** An HTTP request header */
HEADER,
/** An HTTP response header */
RESPONSE_HEADER,
/** An HTTP response body */
RESPONSE_BODY,
/** An HTTP response status code */
RESPONSE_STATUS,
/** A non-standard field */
OTHER,
}
|
[
"jamesbognar@apache.org"
] |
jamesbognar@apache.org
|
6f01ec9b7f1748943450cbcf6f7535a22433cf3b
|
13cbb329807224bd736ff0ac38fd731eb6739389
|
/org/omg/PortableServer/ServantManager.java
|
b0cdc3fa18d99e3ab11574831e1a3eab72c1a1d1
|
[] |
no_license
|
ZhipingLi/rt-source
|
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
|
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
|
refs/heads/master
| 2023-07-14T15:00:33.100256
| 2021-09-01T04:49:04
| 2021-09-01T04:49:04
| 401,933,858
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 381
|
java
|
package org.omg.PortableServer;
import org.omg.CORBA.Object;
import org.omg.CORBA.portable.IDLEntity;
public interface ServantManager extends ServantManagerOperations, Object, IDLEntity {}
/* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\org\omg\PortableServer\ServantManager.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.0.7
*/
|
[
"michael__lee@yeah.net"
] |
michael__lee@yeah.net
|
201ef1b2e814569b106e199f17a87cda2af6cf5e
|
629bfaa59457f48cb4f5ed3116293387ea6ebf9e
|
/Launcher3M/src/com/uet/launcher3/InsettableFrameLayout.java
|
077cb3c6d637c3404c991d82f7d099de84d0f82a
|
[] |
no_license
|
huy-lv/CacVanDeHienDaiCNTT
|
3c819bcef6e9b251e61622f855f00bbbf1d0841b
|
b0c0c8a2b47806032e2bb15dfb3e8e624a4cea6e
|
refs/heads/master
| 2021-05-30T01:36:15.133890
| 2015-12-15T13:38:48
| 2015-12-15T13:38:48
| 42,221,347
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,059
|
java
|
package com.uet.launcher3;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
public class InsettableFrameLayout extends FrameLayout implements
ViewGroup.OnHierarchyChangeListener, Insettable {
protected Rect mInsets = new Rect();
public InsettableFrameLayout(Context context, AttributeSet attrs) {
super(context, attrs);
setOnHierarchyChangeListener(this);
}
public void setFrameLayoutChildInsets(View child, Rect newInsets, Rect oldInsets) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
if (child instanceof Insettable) {
((Insettable) child).setInsets(newInsets);
} else if (!lp.ignoreInsets) {
lp.topMargin += (newInsets.top - oldInsets.top);
lp.leftMargin += (newInsets.left - oldInsets.left);
lp.rightMargin += (newInsets.right - oldInsets.right);
lp.bottomMargin += (newInsets.bottom - oldInsets.bottom);
}
child.setLayoutParams(lp);
}
@Override
public void setInsets(Rect insets) {
final int n = getChildCount();
for (int i = 0; i < n; i++) {
final View child = getChildAt(i);
setFrameLayoutChildInsets(child, insets, mInsets);
}
mInsets.set(insets);
}
@Override
public LayoutParams generateLayoutParams(AttributeSet attrs) {
return new InsettableFrameLayout.LayoutParams(getContext(), attrs);
}
@Override
protected LayoutParams generateDefaultLayoutParams() {
return new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
}
// Override to allow type-checking of LayoutParams.
@Override
protected boolean checkLayoutParams(ViewGroup.LayoutParams p) {
return p instanceof InsettableFrameLayout.LayoutParams;
}
@Override
protected LayoutParams generateLayoutParams(ViewGroup.LayoutParams p) {
return new LayoutParams(p);
}
public static class LayoutParams extends FrameLayout.LayoutParams {
boolean ignoreInsets = false;
public LayoutParams(Context c, AttributeSet attrs) {
super(c, attrs);
TypedArray a = c.obtainStyledAttributes(attrs,
R.styleable.InsettableFrameLayout_Layout);
ignoreInsets = a.getBoolean(
R.styleable.InsettableFrameLayout_Layout_layout_ignoreInsets, false);
a.recycle();
}
public LayoutParams(int width, int height) {
super(width, height);
}
public LayoutParams(ViewGroup.LayoutParams lp) {
super(lp);
}
}
@Override
public void onChildViewAdded(View parent, View child) {
setFrameLayoutChildInsets(child, mInsets, new Rect());
}
@Override
public void onChildViewRemoved(View parent, View child) {
}
}
|
[
"huylv177@gmail.com"
] |
huylv177@gmail.com
|
89a668cbc6bca0819dcbd38bbc68fb574b302970
|
14d4fa5f2eb32853f72f791de4bf92f76022b9da
|
/SimpleSDK/src/org/bouncycastle/pkcs/bc/PKCS12PBEUtils.java
|
eb4c0eca8901f460ebbca8dae1a6be0a45052b31
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"JSON",
"LicenseRef-scancode-warranty-disclaimer",
"EPL-1.0"
] |
permissive
|
SKT-ThingPlug2/device-sdk-javame
|
253ece8b8f41286256c27bae07a242dc551ff8c6
|
2a965a8d882b3a4e36753c7b81f152a9b56614d3
|
refs/heads/master
| 2021-05-02T12:52:01.394954
| 2018-03-09T08:22:25
| 2018-03-09T08:22:25
| 120,748,806
| 1
| 5
|
Apache-2.0
| 2018-03-23T06:16:34
| 2018-02-08T10:48:43
|
Java
|
UTF-8
|
Java
| false
| false
| 5,716
|
java
|
package org.bouncycastle.pkcs.bc;
import java.io.OutputStream;
import javax.util.HashMap;
import javax.util.HashSet;
import javax.util.Map;
import javax.util.Set;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.pkcs.PKCS12PBEParams;
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
import org.bouncycastle.crypto.BlockCipher;
import org.bouncycastle.crypto.CipherParameters;
import org.bouncycastle.crypto.ExtendedDigest;
import org.bouncycastle.crypto.engines.DESedeEngine;
import org.bouncycastle.crypto.engines.RC2Engine;
import org.bouncycastle.crypto.generators.PKCS12ParametersGenerator;
import org.bouncycastle.crypto.io.MacOutputStream;
import org.bouncycastle.crypto.macs.HMac;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncycastle.crypto.paddings.PKCS7Padding;
import org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher;
import org.bouncycastle.crypto.params.DESedeParameters;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.crypto.params.ParametersWithIV;
import org.bouncycastle.operator.GenericKey;
import org.bouncycastle.operator.MacCalculator;
import org.bouncycastle.util.Integers;
class PKCS12PBEUtils
{
private static Map keySizes = new HashMap();
private static Set noIvAlgs = new HashSet();
private static Set desAlgs = new HashSet();
static
{
keySizes.put(PKCSObjectIdentifiers.pbeWithSHAAnd128BitRC4, Integers.valueOf(128));
keySizes.put(PKCSObjectIdentifiers.pbeWithSHAAnd40BitRC4, Integers.valueOf(40));
keySizes.put(PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC, Integers.valueOf(192));
keySizes.put(PKCSObjectIdentifiers.pbeWithSHAAnd2_KeyTripleDES_CBC, Integers.valueOf(128));
keySizes.put(PKCSObjectIdentifiers.pbeWithSHAAnd128BitRC2_CBC, Integers.valueOf(128));
keySizes.put(PKCSObjectIdentifiers.pbeWithSHAAnd40BitRC2_CBC, Integers.valueOf(40));
noIvAlgs.add(PKCSObjectIdentifiers.pbeWithSHAAnd128BitRC4);
noIvAlgs.add(PKCSObjectIdentifiers.pbeWithSHAAnd40BitRC4);
desAlgs.add(PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC);
desAlgs.add(PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC);
}
static int getKeySize(ASN1ObjectIdentifier algorithm)
{
return ((Integer)keySizes.get(algorithm)).intValue();
}
static boolean hasNoIv(ASN1ObjectIdentifier algorithm)
{
return noIvAlgs.contains(algorithm);
}
static boolean isDesAlg(ASN1ObjectIdentifier algorithm)
{
return desAlgs.contains(algorithm);
}
static PaddedBufferedBlockCipher getEngine(ASN1ObjectIdentifier algorithm)
{
BlockCipher engine;
if (algorithm.equals(PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC)
|| algorithm.equals(PKCSObjectIdentifiers.pbeWithSHAAnd2_KeyTripleDES_CBC))
{
engine = new DESedeEngine();
}
else if (algorithm.equals(PKCSObjectIdentifiers.pbeWithSHAAnd128BitRC2_CBC)
|| algorithm.equals(PKCSObjectIdentifiers.pbeWithSHAAnd40BitRC2_CBC))
{
engine = new RC2Engine();
}
else
{
throw new IllegalStateException("unknown algorithm");
}
return new PaddedBufferedBlockCipher(new CBCBlockCipher(engine), new PKCS7Padding());
}
static MacCalculator createMacCalculator(final ASN1ObjectIdentifier digestAlgorithm, ExtendedDigest digest, final PKCS12PBEParams pbeParams, final char[] password)
{
PKCS12ParametersGenerator pGen = new PKCS12ParametersGenerator(digest);
pGen.init(PKCS12ParametersGenerator.PKCS12PasswordToBytes(password), pbeParams.getIV(), pbeParams.getIterations().intValue());
final KeyParameter keyParam = (KeyParameter)pGen.generateDerivedMacParameters(digest.getDigestSize() * 8);
final HMac hMac = new HMac(digest);
hMac.init(keyParam);
return new MacCalculator()
{
public AlgorithmIdentifier getAlgorithmIdentifier()
{
return new AlgorithmIdentifier(digestAlgorithm, pbeParams);
}
public OutputStream getOutputStream()
{
return new MacOutputStream(hMac);
}
public byte[] getMac()
{
byte[] res = new byte[hMac.getMacSize()];
hMac.doFinal(res, 0);
return res;
}
public GenericKey getKey()
{
return new GenericKey(getAlgorithmIdentifier(), PKCS12ParametersGenerator.PKCS12PasswordToBytes(password));
}
};
}
static CipherParameters createCipherParameters(ASN1ObjectIdentifier algorithm, ExtendedDigest digest, int blockSize, PKCS12PBEParams pbeParams, char[] password)
{
PKCS12ParametersGenerator pGen = new PKCS12ParametersGenerator(digest);
pGen.init(PKCS12ParametersGenerator.PKCS12PasswordToBytes(password), pbeParams.getIV(), pbeParams.getIterations().intValue());
CipherParameters params;
if (PKCS12PBEUtils.hasNoIv(algorithm))
{
params = pGen.generateDerivedParameters(PKCS12PBEUtils.getKeySize(algorithm));
}
else
{
params = pGen.generateDerivedParameters(PKCS12PBEUtils.getKeySize(algorithm), blockSize * 8);
if (PKCS12PBEUtils.isDesAlg(algorithm))
{
DESedeParameters.setOddParity(((KeyParameter)((ParametersWithIV)params).getParameters()).getKey());
}
}
return params;
}
}
|
[
"lesmin@sk.com"
] |
lesmin@sk.com
|
006eac64d70dbc11fe1127c92128fcb260d48aff
|
ea33632bd6353aa94290df2b7a8357e9801626a0
|
/src/main/java/com/avaya/jtapi/tsapi/impl/core/SavedCall.java
|
aab98782f31de0f832ab288a2bc9347789d3c33e
|
[] |
no_license
|
inkyu/TIL_JTAPI
|
b5dc049eda4567f7c290841e2925cadc54944a91
|
43539acfff2b0eec70e688299e3d641152eac028
|
refs/heads/master
| 2020-05-17T05:05:48.468878
| 2019-04-26T06:40:56
| 2019-04-26T06:40:56
| 183,523,767
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package com.avaya.jtapi.tsapi.impl.core;
final class SavedCall {
TSCall call;
long saveTime;
SavedCall(TSCall _call) {
this.call = _call;
this.saveTime = System.currentTimeMillis();
}
}
|
[
"inkyu@0566"
] |
inkyu@0566
|
795466bc329d423102d715e63f6aebe948972d84
|
6b23d8ae464de075ad006c204bd7e946971b0570
|
/WEB-INF/plugin/common/src/jp/groupsession/v2/convert/convert430/model/CvtCirUserModel.java
|
70d638bd699bc17417cfb6c0cb8631a5251d835e
|
[] |
no_license
|
kosuke8/gsession
|
a259c71857ed36811bd8eeac19c456aa8f96c61e
|
edd22517a22d1fb2c9339fc7f2a52e4122fc1992
|
refs/heads/master
| 2021-08-20T05:43:09.431268
| 2017-11-28T07:10:08
| 2017-11-28T07:10:08
| 112,293,459
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,765
|
java
|
package jp.groupsession.v2.convert.convert430.model;
import jp.co.sjts.util.date.UDate;
import jp.co.sjts.util.NullDefault;
import java.io.Serializable;
/**
* <p>CIR_USER Data Bindding JavaBean
*
* @author JTS DaoGenerator version 0.5
*/
public class CvtCirUserModel implements Serializable {
/** USR_SID mapping */
private int usrSid__;
/** CUR_MAX_DSP mapping */
private int curMaxDsp__;
/** CUR_SML_NTF mapping */
private int curSmlNtf__;
/** CUR_RELOAD mapping */
private int curReload__;
/** CUR_AUID mapping */
private int curAuid__;
/** CUR_ADATE mapping */
private UDate curAdate__;
/** CUR_EUID mapping */
private int curEuid__;
/** CUR_EDATE mapping */
private UDate curEdate__;
/** CUR_MEMO_KBN mapping */
private int curMemoKbn__;
/** CUR_MEMO_DAY mapping */
private int curMemoDay__;
/** CUR_KOU_KBN mapping */
private int curKouKbn__;
/** CUR_INIT_KBN mapping */
private int curInitKbn__;
/**
* <p>curReload を取得します。
* @return curReload
*/
public int getCurReload() {
return curReload__;
}
/**
* <p>curReload をセットします。
* @param curReload curReload
*/
public void setCurReload(int curReload) {
curReload__ = curReload;
}
/**
* <p>Default Constructor
*/
public CvtCirUserModel() {
}
/**
* <p>get USR_SID value
* @return USR_SID value
*/
public int getUsrSid() {
return usrSid__;
}
/**
* <p>set USR_SID value
* @param usrSid USR_SID value
*/
public void setUsrSid(int usrSid) {
usrSid__ = usrSid;
}
/**
* <p>get CUR_MAX_DSP value
* @return CUR_MAX_DSP value
*/
public int getCurMaxDsp() {
return curMaxDsp__;
}
/**
* <p>set CUR_MAX_DSP value
* @param curMaxDsp CUR_MAX_DSP value
*/
public void setCurMaxDsp(int curMaxDsp) {
curMaxDsp__ = curMaxDsp;
}
/**
* <p>get CUR_AUID value
* @return CUR_AUID value
*/
public int getCurAuid() {
return curAuid__;
}
/**
* <p>set CUR_AUID value
* @param curAuid CUR_AUID value
*/
public void setCurAuid(int curAuid) {
curAuid__ = curAuid;
}
/**
* <p>get CUR_ADATE value
* @return CUR_ADATE value
*/
public UDate getCurAdate() {
return curAdate__;
}
/**
* <p>set CUR_ADATE value
* @param curAdate CUR_ADATE value
*/
public void setCurAdate(UDate curAdate) {
curAdate__ = curAdate;
}
/**
* <p>get CUR_EUID value
* @return CUR_EUID value
*/
public int getCurEuid() {
return curEuid__;
}
/**
* <p>set CUR_EUID value
* @param curEuid CUR_EUID value
*/
public void setCurEuid(int curEuid) {
curEuid__ = curEuid;
}
/**
* <p>get CUR_EDATE value
* @return CUR_EDATE value
*/
public UDate getCurEdate() {
return curEdate__;
}
/**
* <p>set CUR_EDATE value
* @param curEdate CUR_EDATE value
*/
public void setCurEdate(UDate curEdate) {
curEdate__ = curEdate;
}
/**
* <p>curSmlNtf を取得します。
* @return curSmlNtf
*/
public int getCurSmlNtf() {
return curSmlNtf__;
}
/**
* <p>curSmlNtf をセットします。
* @param curSmlNtf curSmlNtf
*/
public void setCurSmlNtf(int curSmlNtf) {
curSmlNtf__ = curSmlNtf;
}
/**
* <p>to Csv String
* @return Csv String
*/
public String toCsvString() {
StringBuilder buf = new StringBuilder();
buf.append(usrSid__);
buf.append(",");
buf.append(curMaxDsp__);
buf.append(",");
buf.append(curAuid__);
buf.append(",");
buf.append(NullDefault.getStringFmObj(curAdate__, ""));
buf.append(",");
buf.append(curEuid__);
buf.append(",");
buf.append(NullDefault.getStringFmObj(curEdate__, ""));
return buf.toString();
}
/**
* <p>curMemoKbn を取得します。
* @return curMemoKbn
*/
public int getCurMemoKbn() {
return curMemoKbn__;
}
/**
* <p>curMemoKbn をセットします。
* @param curMemoKbn curMemoKbn
*/
public void setCurMemoKbn(int curMemoKbn) {
curMemoKbn__ = curMemoKbn;
}
/**
* <p>curMemoDay を取得します。
* @return curMemoDay
*/
public int getCurMemoDay() {
return curMemoDay__;
}
/**
* <p>curMemoDay をセットします。
* @param curMemoDay curMemoDay
*/
public void setCurMemoDay(int curMemoDay) {
curMemoDay__ = curMemoDay;
}
/**
* <p>curKouKbn を取得します。
* @return curKouKbn
*/
public int getCurKouKbn() {
return curKouKbn__;
}
/**
* <p>curKouKbn をセットします。
* @param curKouKbn curKouKbn
*/
public void setCurKouKbn(int curKouKbn) {
curKouKbn__ = curKouKbn;
}
/**
* <p>curInitKbn を取得します。
* @return curInitKbn
*/
public int getCurInitKbn() {
return curInitKbn__;
}
/**
* <p>curInitKbn をセットします。
* @param curInitKbn curInitKbn
*/
public void setCurInitKbn(int curInitKbn) {
curInitKbn__ = curInitKbn;
}
}
|
[
"PK140601-29@PK140601-29"
] |
PK140601-29@PK140601-29
|
91bdf91a95c9fc942be5494356dfccddf9aa9b7d
|
ab9387a1505654d8ae714d2fd138a9eeb824f4de
|
/src/magic/model/mstatic/MagicDummyModifier.java
|
5e03094ee2952e94a7d72e610a3ec3672e62eba8
|
[] |
no_license
|
hixio-mh/Magarena
|
d33b98aeff766c1828e998fada9a76b1c943baaf
|
97be52ee82bc7526caa079ca33e42ea521a490bc
|
refs/heads/master
| 2022-12-21T00:33:09.565690
| 2020-09-26T14:31:49
| 2020-09-26T14:31:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,536
|
java
|
package magic.model.mstatic;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.MagicPowerToughness;
import magic.model.MagicSubType;
import magic.model.MagicAbility;
import magic.model.MagicGame;
import java.util.Set;
public class MagicDummyModifier implements MagicModifier {
@Override
public MagicPlayer getController(final MagicPermanent source, final MagicPermanent permanent, final MagicPlayer controller) {
return controller;
}
@Override
public void modPowerToughness(final MagicPermanent source, final MagicPermanent permanent, final MagicPowerToughness pt) {
//leave power and toughness unchanged
}
@Override
public void modAbilityFlags(final MagicPermanent source, final MagicPermanent permanent, final Set<MagicAbility> flags) {
//leave abilities unchanged
}
@Override
public void modSubTypeFlags(final MagicPermanent permanent, final Set<MagicSubType> flags) {
//leave subtype unchanged
}
@Override
public int getTypeFlags(final MagicPermanent permanent, final int flags) {
return flags;
}
@Override
public int getColorFlags(final MagicPermanent permanent, final int flags) {
return flags;
}
@Override
public void modPlayer(final MagicPermanent source, final MagicPlayer player) {
//leave player unchanged
}
@Override
public void modGame(final MagicPermanent source, final MagicGame game) {
//leave game unchanged
}
}
|
[
"iargosyi@gmail.com"
] |
iargosyi@gmail.com
|
4f38dfdbd4c17a7757985b880ea923b37f373a8e
|
e5af5bce5ae99a4210205704d29c22dadc1fd03d
|
/src/main/java/org/drip/analytics/cashflow/CompositeFixedPeriod.java
|
a83ef87ca675e58f592522c6130b5ac00bfc3149
|
[
"Apache-2.0"
] |
permissive
|
idreamsfy/DRIP
|
7a5f969b1ca51f6cf957704ecb043d502c4c4bbc
|
f20cb7457efaadb7ff109fbcea0be0b9d9106230
|
refs/heads/master
| 2021-11-03T06:38:49.457972
| 2019-01-13T09:21:13
| 2019-01-13T09:21:13
| 100,677,021
| 0
| 0
|
Apache-2.0
| 2019-01-13T09:21:03
| 2017-08-18T05:43:52
|
Java
|
UTF-8
|
Java
| false
| false
| 4,428
|
java
|
package org.drip.analytics.cashflow;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/
/*!
* Copyright (C) 2017 Lakshmi Krishnamurthy
* Copyright (C) 2016 Lakshmi Krishnamurthy
* Copyright (C) 2015 Lakshmi Krishnamurthy
* Copyright (C) 2014 Lakshmi Krishnamurthy
*
* This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model
* libraries targeting analysts and developers
* https://lakshmidrip.github.io/DRIP/
*
* DRIP is composed of four main libraries:
*
* - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/
* - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/
* - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/
* - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/
*
* - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options,
* Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA
* Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV
* Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM
* Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics.
*
* - DRIP Asset Allocation: Library for models for MPT framework, Black Litterman Strategy Incorporator,
* Holdings Constraint, and Transaction Costs.
*
* - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality.
*
* - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning.
*
* 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.
*/
/**
* CompositeFixedPeriod implements the composed fixed coupon period functionality.
*
* @author Lakshmi Krishnamurthy
*/
public class CompositeFixedPeriod extends org.drip.analytics.cashflow.CompositePeriod {
/**
* CompositeFixedPeriod Constructor
*
* @param cps Composite Period Setting Instance
* @param lsCUP List of Composable Unit Fixed Periods
*
* @throws java.lang.Exception Thrown if the Accrual Compounding Rule is invalid
*/
public CompositeFixedPeriod (
final org.drip.param.period.CompositePeriodSetting cps,
final java.util.List<org.drip.analytics.cashflow.ComposableUnitPeriod> lsCUP)
throws java.lang.Exception
{
super (cps, lsCUP);
}
@Override public org.drip.product.calib.CompositePeriodQuoteSet periodQuoteSet (
final org.drip.product.calib.ProductQuoteSet pqs,
final org.drip.param.market.CurveSurfaceQuoteContainer csqs)
{
if (null == pqs || !(pqs instanceof org.drip.product.calib.FixedStreamQuoteSet)) return null;
org.drip.product.calib.FixedStreamQuoteSet fsqs = (org.drip.product.calib.FixedStreamQuoteSet)
pqs;
org.drip.analytics.cashflow.ComposableUnitPeriod cup = periods().get (0);
try {
org.drip.product.calib.CompositePeriodQuoteSet cpqs = new
org.drip.product.calib.CompositePeriodQuoteSet (pqs.lss());
if (!cpqs.setBaseRate (fsqs.containsCoupon() ? fsqs.coupon() : cup.baseRate (csqs))) return null;
if (!cpqs.setBasis (fsqs.containsCouponBasis() ? fsqs.couponBasis() : basis())) return null;
return cpqs;
} catch (java.lang.Exception e) {
e.printStackTrace();
}
return null;
}
@Override public double basisQuote (
final org.drip.product.calib.ProductQuoteSet pqs)
{
double dblBasis = basis();
if (null == pqs || !(pqs instanceof org.drip.product.calib.FixedStreamQuoteSet)) return dblBasis;
org.drip.product.calib.FixedStreamQuoteSet fsqs = (org.drip.product.calib.FixedStreamQuoteSet) pqs;
try {
if (fsqs.containsCouponBasis()) return fsqs.couponBasis();
} catch (java.lang.Exception e) {
e.printStackTrace();
}
return dblBasis;
}
}
|
[
"lakshmi@synergicdesign.com"
] |
lakshmi@synergicdesign.com
|
611067d62d0279e379268c3bef53fd354e4daa19
|
f0477a91193b68ff55a2f919913d0d249af7f117
|
/app/src/main/java/com/ceco/android/yagajobs/appabstract/util/WebFetcher.java
|
aab3d596e5aaf9aa8f897f8e17a810261bc506ea
|
[] |
no_license
|
powerslider/yagajobs-android-app
|
c05ac3187330b02a44ae7ec9458b822d08436442
|
b50c0a55e05ee3d0fe3b6cca09e05a826e321ae2
|
refs/heads/master
| 2020-05-19T19:16:25.175037
| 2014-08-17T11:16:51
| 2014-08-17T11:16:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,376
|
java
|
package com.ceco.android.yagajobs.appabstract.util;
import android.util.Log;
import android.widget.Toast;
import com.ceco.android.yagajobs.app.model.Vacancy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.lang.reflect.Type;
import java.util.List;
import javax.xml.transform.Result;
/**
* Created by ceco on 26.05.14.
*/
public class WebFetcher {
private List response;
private HttpEntity entity;
private Type listType;
private WebFetcher(String url) {
retrieveStream(url);
}
public static WebFetcher newInstance(String url) {
return new WebFetcher(url);
}
public List getResponse() {
return response;
}
public WebFetcher setListType(Type listType) {
this.listType = listType;
return this;
}
public void retrieveStream(String url) {
HttpClient client = new DefaultHttpClient();
HttpGet getRequest = new HttpGet(url);
try {
HttpResponse getResponse = client.execute(getRequest);
final int statusCode = getResponse.getStatusLine().getStatusCode();
if (statusCode != HttpStatus.SC_OK) {
Log.w("WebError", "Error " + statusCode + " for URL " + url);
}
entity = getResponse.getEntity();
} catch (IOException e) {
getRequest.abort();
Log.w("WebError", "Error for URL " + url, e);
}
}
public WebFetcher parseJsonResponse() {
String json = null;
try {
json = EntityUtils.toString(entity);
} catch (IOException e) {
Log.e("IOError", "Cannot resolve html entity to string!");
}
Gson gson = new GsonBuilder()
.enableComplexMapKeySerialization()
.setPrettyPrinting()
.create();
response = gson.fromJson(json, listType);
return this;
}
}
|
[
"tsvetan.dimitrov23@gmail.com"
] |
tsvetan.dimitrov23@gmail.com
|
39f224387a063ba2c99ae45cf2334ef0311b55fe
|
e601962865419fddd538fc50fdd79431a35cf558
|
/src/main/java/org/refact4j/xml/impl/Dataset2XmlConverterImpl.java
|
27b2a05f9860d5399dda21a7587dcb317ccf37c7
|
[] |
no_license
|
vdupain/refact4j
|
1993e94a7ea12df9fa5bcdbb9798be33df5cd076
|
b679fcac58d42bc2beaf491ebc2a8dd0fe7dee9a
|
refs/heads/master
| 2021-10-29T20:20:42.980418
| 2021-10-21T09:58:45
| 2021-10-21T09:58:45
| 3,265,746
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,651
|
java
|
package org.refact4j.xml.impl;
import org.refact4j.xml.*;
import org.refact4j.xml.impl.sax.DefaultSaxErrorHandler;
import org.refact4j.xml.reader.DatasetXmlElementReader;
import org.refact4j.xml.writer.DatasetXmlWriter;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import javax.xml.parsers.ParserConfigurationException;
import java.io.Reader;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.*;
public class Dataset2XmlConverterImpl implements DataSet2XmlConverter {
private static final String XMLSCHEMA_INSTANCE = "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"";
private static final String DATASET_TAGNAME = "dataset";
private final XmlElementFactoryRepositoryImpl xmlElementFactoryRepository = new XmlElementFactoryRepositoryImpl();
private final List<XmlDescriptor> xmlDescriptors = new ArrayList<>();
public void unmarshal(String xml, java.util.Set dataset) {
if (xml.contains(XMLSCHEMA_INSTANCE)) {
validate(new StringReader(xml));
}
unmarshal(new StringReader(xml), dataset);
}
private void validate(Reader reader) {
try {
org.xml.sax.XMLReader xmlReader = createXMLReader();
xmlReader.setErrorHandler(new DefaultSaxErrorHandler());
xmlReader.parse(new org.xml.sax.InputSource(reader));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public void unmarshal(Reader reader, java.util.Set dataset) {
try {
org.xml.sax.XMLReader xmlReader = createXMLReader();
final DatasetXmlElementReader datasetXmlNodeReader = new DatasetXmlElementReader(dataset, this);
XmlParserHelper.parse(xmlReader, new InputSource(reader), (localName, name, attributes) -> {
if (localName.equals(DATASET_TAGNAME)) {
return datasetXmlNodeReader;
}
return null;
});
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public XmlElementFactoryRepository getXmlElementFactoryRepository() {
return this.xmlElementFactoryRepository;
}
public void register(XmlDescriptor xmlDescriptor) {
xmlDescriptors.add(xmlDescriptor);
xmlElementFactoryRepository.register(xmlDescriptor);
}
private org.xml.sax.XMLReader createXMLReader() throws ParserConfigurationException, SAXException {
javax.xml.parsers.SAXParserFactory spf = javax.xml.parsers.SAXParserFactory.newInstance();
javax.xml.parsers.SAXParser sp = spf.newSAXParser();
org.xml.sax.XMLReader xmlReader = sp.getXMLReader();
xmlReader.setFeature("http://xml.org/sax/features/validation", true);
xmlReader.setFeature("http://xml.org/sax/features/namespaces", true);
xmlReader.setFeature("http://apache.org/xml/features/validation/schema", true);
return xmlReader;
}
public Collection<XmlElementHandler> getXmlElementHandlers(DatasetConverterHolder holder) {
List<XmlElementHandler> xmlWriters = new ArrayList<>();
for (XmlDescriptor descriptor : xmlDescriptors) {
xmlWriters.addAll(Arrays.asList(descriptor.getXmlElementHandlers(holder)));
}
return xmlWriters;
}
public String marshal(Set dataset) {
try {
StringWriter result = new StringWriter();
XmlWriterHelper.build(result, new DatasetXmlWriter(dataset, this));
return result.toString();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
|
[
"vdupain@gmail.com"
] |
vdupain@gmail.com
|
b449c4fb76950d745b209128dee91df88966e6f5
|
a7b868c8c81984dbcb17c1acc09c0f0ab8e36c59
|
/src/main/java/com/alipay/api/domain/ZhimaCreditAntifraudScoreGetModel.java
|
86af94dd05f4038058d6dc46b1e577b14559f93a
|
[
"Apache-2.0"
] |
permissive
|
1755616537/alipay-sdk-java-all
|
a7ebd46213f22b866fa3ab20c738335fc42c4043
|
3ff52e7212c762f030302493aadf859a78e3ebf7
|
refs/heads/master
| 2023-02-26T01:46:16.159565
| 2021-02-02T01:54:36
| 2021-02-02T01:54:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,440
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 申请欺诈评分
*
* @author auto create
* @since 1.0, 2017-10-30 10:55:35
*/
public class ZhimaCreditAntifraudScoreGetModel extends AlipayObject {
private static final long serialVersionUID = 4493382849498588321L;
/**
* 地址信息。省+市+区/县+详细地址,长度不超过256,不含",","/u0001","|","&","^","\\"
*/
@ApiField("address")
private String address;
/**
* 银行卡号。中国大陆银行发布的银行卡:借记卡长度19位;信用卡长度16位;各位的取值位[0,9]的整数;不含虚拟卡
*/
@ApiField("bank_card")
private String bankCard;
/**
* 证件号码
*/
@ApiField("cert_no")
private String certNo;
/**
* 证件类型。IDENTITY_CARD标识为身份证,目前仅支持身份证类型
*/
@ApiField("cert_type")
private String certType;
/**
* 电子邮箱。合法email,字母小写,特殊符号以半角形式出现
*/
@ApiField("email")
private String email;
/**
* 国际移动设备标志。15位长度数字
*/
@ApiField("imei")
private String imei;
/**
* ip地址。以"."分割的四段Ip,如 x.x.x.x,x为[0,255]之间的整数
*/
@ApiField("ip")
private String ip;
/**
* 物理地址。支持格式如下:xx:xx:xx:xx:xx:xx,xx-xx-xx-xx-xx-xx,xxxxxxxxxxxx,x取值范围[0,9]之间的整数及A,B,C,D,E,F
*/
@ApiField("mac")
private String mac;
/**
* 手机号码。中国大陆合法手机号,长度11位,不含国家代码
*/
@ApiField("mobile")
private String mobile;
/**
* 姓名,长度不超过64,姓名中不含",","/u0001","|","&","^","\\"
*/
@ApiField("name")
private String name;
/**
* 产品码,标记商户接入的具体产品;直接使用每个接口入参中示例值即可
*/
@ApiField("product_code")
private String productCode;
/**
* 商户请求的唯一标志,长度64位以内字符串,仅限字母数字下划线组合。该标识作为业务调用的唯一标识,商户要保证其业务唯一性,使用相同transaction_id的查询,芝麻在一段时间内(一般为1天)返回首次查询结果,超过有效期的查询即为无效并返回异常,有效期内的重复查询不重新计费
*/
@ApiField("transaction_id")
private String transactionId;
/**
* wifi的物理地址。支持格式如下:xx:xx:xx:xx:xx:xx,xx-xx-xx-xx-xx-xx,xxxxxxxxxxxx,x取值范围[0,9]之间的整数及A,B,C,D,E,F
*/
@ApiField("wifimac")
private String wifimac;
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBankCard() {
return this.bankCard;
}
public void setBankCard(String bankCard) {
this.bankCard = bankCard;
}
public String getCertNo() {
return this.certNo;
}
public void setCertNo(String certNo) {
this.certNo = certNo;
}
public String getCertType() {
return this.certType;
}
public void setCertType(String certType) {
this.certType = certType;
}
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
public String getImei() {
return this.imei;
}
public void setImei(String imei) {
this.imei = imei;
}
public String getIp() {
return this.ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getMac() {
return this.mac;
}
public void setMac(String mac) {
this.mac = mac;
}
public String getMobile() {
return this.mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getProductCode() {
return this.productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getTransactionId() {
return this.transactionId;
}
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
}
public String getWifimac() {
return this.wifimac;
}
public void setWifimac(String wifimac) {
this.wifimac = wifimac;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
b7a5e470b7efedc272d23811446b8e2fdef7eb72
|
0c249077623248cf98972abcc11d5a3e7e5e3b0c
|
/app/src/main/java/com/et/secondworld/bean/GetMineMyShopDataBean.java
|
d5b18e05a6a6fc77d7ef14cbc45da59f54bab815
|
[] |
no_license
|
zhengyi321/SecondWorld
|
c8ea5dd060011abf852203a43cb483575c68bd34
|
814fa9c3491ee35a7fb05518df109497eefc06d1
|
refs/heads/master
| 2022-12-05T18:13:48.744296
| 2020-08-27T08:02:34
| 2020-08-27T08:02:34
| 290,713,867
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,877
|
java
|
package com.et.secondworld.bean;
/**
* @Author zhyan
* @Description //TODO
* @Date 2020/4/24
**/
public class GetMineMyShopDataBean {
/**
* msg : 获取店铺资料成功
* locate : 浙江温州
* articleid : EB036528-AB2F-46D4-9BA5-A88E3BE3DCF8
* title : 测试
* content : 各位大神,我想问一下在java中我们通常用substring来进行截取字符串,有时候也有用到指定的字符串进行截取,我现在遇到一个问题,比如这个字符串
String bb ="asdfadfasdfasfasdfsdaf12213;asdfjdksfjkl3434;34534534534;dsfdsf;234234234;sdfgfsdg"我怎么用substring截取字符串的方法截取,从第0位开始到第三个分号前的数据呢?我用substring中的indexOf来做的话那只能截取0到第一个分号这个部分的内容,而我现在想要截取从0到第三个分号的数据
* modules : M1
* praise : 5
* fans : 0
* shopbg : null
* parise : 0
* issuccess : 1
* readers : 0
* shopname : 小洋人
* articleimg :
* logo : http://192.168.0.4/shop/shoplogo20200424145356725072250.jpg
* comment : 1
* shopid : 59CCE34E-9F07-4E73-8FB7-8E835EBE80B3
* tel : 187645545454
* repost : 0
* guanzhu : 0
* status : 3
*/
private String msg;
private String locate;
private String articleid;
private String title;
private String content;
private String modules;
private int good;
private int fans;
private String shopbg;
private int praise;
private String issuccess;
private int readers;
private String shopname;
private String articleimg;
private String logo;
private int comment;
private String shopid;
private String tel;
private String time;
private String businesshour;
private String street;
private String isfirst;
private int ispraised;
private int repost;
private int guanzhu;
private int status;
private int spreadprice;
public int getSpreadprice() {
return spreadprice;
}
public void setSpreadprice(int spreadprice) {
this.spreadprice = spreadprice;
}
public Integer getIspraised() {
return ispraised;
}
public void setIspraised(int ispraised) {
this.ispraised = ispraised;
}
public String getIsfirst() {
return isfirst;
}
public void setIsfirst(String isfirst) {
this.street = street;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getLocate() {
return locate;
}
public void setLocate(String locate) {
this.locate = locate;
}
public String getArticleid() {
return articleid;
}
public void setArticleid(String articleid) {
this.articleid = articleid;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getModules() {
return modules;
}
public void setModules(String modules) {
this.modules = modules;
}
public int getGood() {
return good;
}
public void setGood(int good) {
this.good = good;
}
public int getFans() {
return fans;
}
public void setFans(int fans) {
this.fans = fans;
}
public String getShopbg() {
return shopbg;
}
public void setShopbg(String shopbg) {
this.shopbg = shopbg;
}
public int getPraise() {
return praise;
}
public void setPraise(int praise) {
this.praise = praise;
}
public String getIssuccess() {
return issuccess;
}
public void setIssuccess(String issuccess) {
this.issuccess = issuccess;
}
public int getReaders() {
return readers;
}
public void setReaders(int readers) {
this.readers = readers;
}
public String getShopname() {
return shopname;
}
public void setShopname(String shopname) {
this.shopname = shopname;
}
public String getArticleimg() {
return articleimg;
}
public void setArticleimg(String articleimg) {
this.articleimg = articleimg;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public int getComment() {
return comment;
}
public void setComment(int comment) {
this.comment = comment;
}
public String getShopid() {
return shopid;
}
public void setShopid(String shopid) {
this.shopid = shopid;
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
public String getBusinesshour() {
return businesshour;
}
public void setBusinesshour(String businesshour) {
this.businesshour = businesshour;
}
public int getRepost() {
return repost;
}
public void setRepost(int repost) {
this.repost = repost;
}
public int getGuanzhu() {
return guanzhu;
}
public void setGuanzhu(int guanzhu) {
this.guanzhu = guanzhu;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
}
|
[
"zhengyi321@126.com"
] |
zhengyi321@126.com
|
3a4538da466024d7665de9874e08a1c7503f442e
|
2a19a0f364c37ee2c8d939082eaab89ab2a6b7d5
|
/src/main/java/com/lwxf/industry4/webapp/domain/entity/supplier/Material.java
|
50b0528208d6a21693683038cbca1539c4e1107a
|
[] |
no_license
|
sxw5036/myGit
|
e0d26c3daefd2cd6295afb2d2570494f6fe52910
|
740a2478ff0c02e13dacaf4808d55bcd1453394c
|
refs/heads/master
| 2022-11-05T19:58:22.383724
| 2019-08-20T09:25:37
| 2019-08-20T09:25:37
| 186,972,200
| 0
| 0
| null | 2022-10-12T20:26:46
| 2019-05-16T07:10:14
|
Java
|
UTF-8
|
Java
| false
| false
| 6,738
|
java
|
package com.lwxf.industry4.webapp.domain.entity.supplier;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.*;
import java.sql.*;
import java.util.Date;
import java.util.Arrays;
import java.util.List;
import com.lwxf.mybatis.utils.TypesExtend;
import com.lwxf.commons.exception.ErrorCodes;
import com.lwxf.commons.utils.DataValidatorUtils;
import com.lwxf.commons.utils.LwxfStringUtils;
import com.lwxf.mybatis.annotation.Table;
import com.lwxf.mybatis.annotation.Column;
import com.lwxf.industry4.webapp.domain.entity.base.IdEntity;
import com.lwxf.mybatis.utils.MapContext;
import com.lwxf.industry4.webapp.common.result.RequestResult;
import com.lwxf.industry4.webapp.common.result.ResultFactory;
/**
* 功能:material 实体类
*
* @author:SunXianWei(17838625030@163.com)
* @created:2019-08-01 11:22
* @version:2018 Version:1.0
* @dept:老屋新房 Created with IntelliJ IDEA
*/
@ApiModel(value = "原材料信息",description = "原材料信息")
@Table(name = "material",displayName = "material")
public class Material extends IdEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "产品名称",name = "name")
@Column(type = Types.VARCHAR,length = 40,name = "name",displayName = "产品名称")
private String name;
@ApiModelProperty(value = "颜色",name = "color",example="001")
@Column(type = Types.VARCHAR,length = 20,name = "color")
private String color;
@ApiModelProperty(value = "供应的原材料等级",name = "materialLevel")
@Column(type = Types.INTEGER,name = "material_level",displayName = "供应的原材料等级")
private Integer materialLevel;
@ApiModelProperty(value = "创建时间",name = "created")
@Column(type = TypesExtend.DATETIME,name = "created",displayName = "")
private Date created;
@ApiModelProperty(value = "创建人",name = "creator")
@Column(type = Types.CHAR,length = 13,name = "creator",displayName = "")
private String creator;
@ApiModelProperty(value = "企业id",name = "branchId")
@Column(type = Types.CHAR,length = 13,name = "branch_id",displayName = "")
private String branchId;
@ApiModelProperty(value = "原材料规格:长*宽*高",name = "materialSize",example="001")
@Column(type = Types.VARCHAR,length = 100,name = "material_size")
private String materialSize;
@ApiModelProperty(value = "状态-0:启用 1:下线",name = "materialStatus",example="状态-0:启用 1:下线")
@Column(type = Types.INTEGER,length = 10,name = "material_size")
private Integer materialStatus;
@ApiModelProperty(value = "原材料类型: 1-板材类 2-五金类 3-耗材类 4-其他类",name = "type",example="原材料类型: 1-板材类 2-五金类 3-耗材类 4-其他类")
@Column(type = Types.INTEGER,length = 4,name = "type")
private Integer type;
public Material() {
}
public RequestResult validateFields() {
Map<String, String> validResult = new HashMap<>();
if (LwxfStringUtils.getStringLength(this.name) > 40) {
validResult.put("name", ErrorCodes.VALIDATE_LENGTH_TOO_LONG);
}
if (LwxfStringUtils.getStringLength(this.color) > 20) {
validResult.put("color", ErrorCodes.VALIDATE_LENGTH_TOO_LONG);
}
if (LwxfStringUtils.getStringLength(this.creator) > 13) {
validResult.put("creator", ErrorCodes.VALIDATE_LENGTH_TOO_LONG);
}
if (LwxfStringUtils.getStringLength(this.branchId) > 13) {
validResult.put("branchId", ErrorCodes.VALIDATE_LENGTH_TOO_LONG);
}
if(validResult.size()>0){
return ResultFactory.generateErrorResult(ErrorCodes.VALIDATE_ERROR,validResult);
}else {
return null;
}
}
private final static List<String> propertiesList = Arrays.asList("id","name","color","materialLevel","created","creator");
public static RequestResult validateFields(MapContext map) {
Map<String, String> validResult = new HashMap<>();
if(map.size()==0){
return ResultFactory.generateErrorResult("error",ErrorCodes.VALIDATE_NOTNULL);
}
boolean flag;
Set<String> mapSet = map.keySet();
flag = propertiesList.containsAll(mapSet);
if(!flag){
return ResultFactory.generateErrorResult("error",ErrorCodes.VALIDATE_ILLEGAL_ARGUMENT);
}
if(map.containsKey("materialLevel")) {
if (!DataValidatorUtils.isInteger1(map.getTypedValue("materialLevel",String.class))) {
validResult.put("materialLevel", ErrorCodes.VALIDATE_INCORRECT_DATA_FORMAT);
}
}
if(map.containsKey("created")) {
if (!DataValidatorUtils.isDate(map.getTypedValue("created",String.class))) {
validResult.put("created", ErrorCodes.VALIDATE_INCORRECT_DATA_FORMAT);
}
}
if(map.containsKey("name")) {
if (LwxfStringUtils.getStringLength(map.getTypedValue("name",String.class)) > 40) {
validResult.put("name", ErrorCodes.VALIDATE_LENGTH_TOO_LONG);
}
}
if(map.containsKey("color")) {
if (LwxfStringUtils.getStringLength(map.getTypedValue("color",String.class)) > 20) {
validResult.put("color", ErrorCodes.VALIDATE_LENGTH_TOO_LONG);
}
}
if(map.containsKey("creator")) {
if (LwxfStringUtils.getStringLength(map.getTypedValue("creator",String.class)) > 13) {
validResult.put("creator", ErrorCodes.VALIDATE_LENGTH_TOO_LONG);
}
}
if(map.containsKey("materialSize")) {
if (LwxfStringUtils.getStringLength(map.getTypedValue("materialSize",String.class)) > 100) {
validResult.put("materialSize", ErrorCodes.VALIDATE_LENGTH_TOO_LONG);
}
}
if(validResult.size()>0){
return ResultFactory.generateErrorResult(ErrorCodes.VALIDATE_ERROR,validResult);
}else {
return null;
}
}
public void setName(String name){
this.name=name;
}
public String getName(){
return name;
}
public void setColor(String color){
this.color=color;
}
public String getColor(){
return color;
}
public void setMaterialLevel(Integer materialLevel){
this.materialLevel=materialLevel;
}
public Integer getMaterialLevel(){
return materialLevel;
}
public void setCreated(Date created){
this.created=created;
}
public Date getCreated(){
return created;
}
public void setCreator(String creator){
this.creator=creator;
}
public String getCreator(){
return creator;
}
public String getBranchId() {
return branchId;
}
public void setBranchId(String branchId) {
this.branchId = branchId;
}
public String getMaterialSize() {
return materialSize;
}
public void setMaterialSize(String materialSize) {
this.materialSize = materialSize;
}
public Integer getMaterialStatus() {
return materialStatus;
}
public void setMaterialStatus(Integer materialStatus) {
this.materialStatus = materialStatus;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
|
[
"17838625030@163.com"
] |
17838625030@163.com
|
573a4a17362fb166d195d096991348481ce78c01
|
2534bd23f82160e3111e6e0496aa5f4b79541196
|
/1_MyBatis/src/board/controller/BoardDetailServlet.java
|
d07eb8c20ba15dc846eb8fadbca1fc74066f9c24
|
[] |
no_license
|
ehdqkd616/MyBatis_Study
|
5324e9f8cf164f2f51875ff8e4722349da4d93b1
|
e406bda5cbfd2d7c5bf5e349ea589724ff5be654
|
refs/heads/main
| 2023-02-17T23:16:12.342443
| 2021-01-16T09:00:42
| 2021-01-16T09:00:42
| 310,484,959
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,559
|
java
|
package board.controller;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import board.model.exception.BoardException;
import board.model.service.BoardService;
import board.model.vo.Board;
import board.model.vo.PageInfo;
import common.Pagination;
@WebServlet("/selectOne.bo")
public class BoardDetailServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public BoardDetailServlet() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
int bId = Integer.parseInt(request.getParameter("bId"));
try {
Board b = new BoardService().selectBoardDetail(bId);
int rCount = 0;
if(!b.getReplyList().isEmpty()) {
rCount = b.getReplyList().size();
}
request.setAttribute("b", b);
request.setAttribute("rCount", rCount);
request.getRequestDispatcher("WEB-INF/views/board/boardDetail.jsp").forward(request, response);
} catch (BoardException e) {
request.setAttribute("message", e.getMessage());
request.getRequestDispatcher("WEB-INF/views/common/errorPage.jsp").forward(request, response);
}
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}
|
[
"64412357+ehdqkd616@users.noreply.github.com"
] |
64412357+ehdqkd616@users.noreply.github.com
|
b323587a1242a7899534518fa490ad5be6770e08
|
0ed20fe0fc9e1cd76034d5698c4f7dcf42c47a60
|
/ProjectDominationRatio/dirty/PowerSet.java
|
49fa0ae18f59f4904c18d1c5057626efa6d1c82e
|
[] |
no_license
|
Kamurai/EclipseRepository
|
61371f858ff82dfdfc70c3de16fd3322222759ed
|
4af50d1f63a76faf3e04a15129c0ed098fc6c545
|
refs/heads/master
| 2022-12-22T13:05:13.965919
| 2020-11-05T03:42:09
| 2020-11-05T03:42:09
| 101,127,637
| 0
| 0
| null | 2022-12-16T13:43:14
| 2017-08-23T02:18:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,181
|
java
|
package dirty;
import java.util.HashSet;
import java.util.Set;
import java.util.TreeSet;
public class PowerSet {
public static void main(String[] args) {
int items[] = {1,2,3,4,5,6,7};
Set<Set<Integer>> treeSet = new TreeSet<Set<Integer>>(new PowersetObjectComparator());
int len = items.length;
int elements = (int) Math.pow(2, len);
for (int i = 1; i < elements; i++)
{
String str = Integer.toBinaryString(i);
int value = str.length();
String pset = str;
for (int k = value; k < len; k++)
{
pset = "0" + pset;
}
Set<Integer> set = new HashSet<Integer>();
for (int j = 0; j < pset.length(); j++)
{
if (pset.charAt(j) == '1')
set.add(items[j]);
}
treeSet.add(set);
}
System.out.println(treeSet.toString().replace("[", "{").replace("]","}"));
}
}
|
[
"KamuraiBlue25@gmail.com"
] |
KamuraiBlue25@gmail.com
|
7f334b0540c1e3811a53906fa166ef821b949d29
|
70f7a06017ece67137586e1567726579206d71c7
|
/alimama/src/main/java/com/taobao/weex/utils/WXReflectionUtils.java
|
95d6ddf26d162f64c5573873820168f8b0b76a93
|
[] |
no_license
|
liepeiming/xposed_chatbot
|
5a3842bd07250bafaffa9f468562021cfc38ca25
|
0be08fc3e1a95028f8c074f02ca9714dc3c4dc31
|
refs/heads/master
| 2022-12-20T16:48:21.747036
| 2020-10-14T02:37:49
| 2020-10-14T02:37:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,182
|
java
|
package com.taobao.weex.utils;
import android.text.TextUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.Feature;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Type;
import java.math.BigDecimal;
public class WXReflectionUtils {
public static Object parseArgument(Type type, Object obj) {
if (obj != null) {
if (obj.getClass() == type) {
return obj;
}
if ((type instanceof Class) && ((Class) type).isAssignableFrom(obj.getClass())) {
return obj;
}
}
if (type == String.class) {
return obj instanceof String ? obj : JSON.toJSONString(obj);
}
if (type == Integer.TYPE) {
return obj.getClass().isAssignableFrom(Integer.TYPE) ? obj : Integer.valueOf(WXUtils.getInt(obj));
}
if (type == Long.TYPE) {
return obj.getClass().isAssignableFrom(Long.TYPE) ? obj : Long.valueOf(WXUtils.getLong(obj));
}
if (type == Double.TYPE) {
return obj.getClass().isAssignableFrom(Double.TYPE) ? obj : Double.valueOf(WXUtils.getDouble(obj));
}
if (type == Float.TYPE) {
return obj.getClass().isAssignableFrom(Float.TYPE) ? obj : Float.valueOf(WXUtils.getFloat(obj));
}
if (type == JSONArray.class && obj != null && obj.getClass() == JSONArray.class) {
return obj;
}
if (type == JSONObject.class && obj != null && obj.getClass() == JSONObject.class) {
return obj;
}
return JSON.parseObject(obj instanceof String ? (String) obj : JSON.toJSONString(obj), type, new Feature[0]);
}
public static void setValue(Object obj, String str, Object obj2) {
Object obj3;
if (obj != null && !TextUtils.isEmpty(str)) {
try {
Field declaredField = getDeclaredField(obj, str);
if ((obj2 instanceof BigDecimal) || (obj2 instanceof Number) || (obj2 instanceof String)) {
if (declaredField.getType() != Float.class) {
if (declaredField.getType() != Float.TYPE) {
if (declaredField.getType() != Double.class) {
if (declaredField.getType() != Double.TYPE) {
if (declaredField.getType() != Integer.class) {
if (declaredField.getType() != Integer.TYPE) {
if (declaredField.getType() != Boolean.class) {
if (declaredField.getType() == Boolean.TYPE) {
}
}
obj3 = Boolean.valueOf(obj2.toString());
if ((declaredField.getType() == Boolean.TYPE || declaredField.getType() == Boolean.class) && obj2 != null) {
obj3 = Boolean.valueOf(obj2.toString());
}
setProperty(obj, declaredField, obj3);
}
}
obj3 = Integer.valueOf((int) Double.parseDouble(obj2.toString()));
obj3 = Boolean.valueOf(obj2.toString());
setProperty(obj, declaredField, obj3);
}
}
obj3 = Double.valueOf(Double.parseDouble(obj2.toString()));
obj3 = Boolean.valueOf(obj2.toString());
setProperty(obj, declaredField, obj3);
}
}
obj3 = Float.valueOf(Float.parseFloat(obj2.toString()));
obj3 = Boolean.valueOf(obj2.toString());
setProperty(obj, declaredField, obj3);
}
obj3 = obj2;
obj3 = Boolean.valueOf(obj2.toString());
setProperty(obj, declaredField, obj3);
} catch (Exception unused) {
}
}
}
public static Field getDeclaredField(Object obj, String str) {
Class cls = obj.getClass();
while (cls != Object.class) {
try {
return cls.getDeclaredField(str);
} catch (Exception unused) {
cls = cls.getSuperclass();
}
}
return null;
}
public static void setProperty(Object obj, Field field, Object obj2) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
if (obj != null && field != null) {
try {
field.setAccessible(true);
field.set(obj, obj2);
} catch (Exception unused) {
}
}
}
}
|
[
"zhangquan@snqu.com"
] |
zhangquan@snqu.com
|
4c7ead3977981258894d4de352de031eb7dc92d5
|
e84e0b3072a059460294a85c042dded6b4b1ac48
|
/src/org/unclesniper/confhoard/logging/RequestParameterLoggerProvider.java
|
8dd2ae13096a4ab7e56425c77bc046486f6ccee8
|
[] |
no_license
|
UncleSniper/confhoard-log
|
9fe7a7ac59f76e784337176228578bcd949f1abb
|
f012ceaef604da0a87a353c711a8e91e80efdb40
|
refs/heads/master
| 2023-04-29T03:45:34.667594
| 2021-05-01T00:01:19
| 2021-05-01T00:01:19
| 360,687,262
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 914
|
java
|
package org.unclesniper.confhoard.logging;
import java.util.function.Function;
import org.unclesniper.logging.Logger;
public class RequestParameterLoggerProvider implements LoggerProvider {
public static final String DEFAULT_PARAMETER = "org.unclesniper.confhoard.logger";
private String parameter;
public RequestParameterLoggerProvider() {}
public RequestParameterLoggerProvider(String parameter) {
this.parameter = parameter;
}
public String getParameter() {
return parameter;
}
public void setParameter(String parameter) {
this.parameter = parameter;
}
public Logger getLogger(Function<String, Object> requestParameters) {
if(requestParameters == null)
return null;
String param = parameter;
if(param == null)
param = RequestParameterLoggerProvider.DEFAULT_PARAMETER;
Object obj = requestParameters.apply(param);
return obj instanceof Logger ? (Logger)obj : null;
}
}
|
[
"simon@bausch-alfdorf.de"
] |
simon@bausch-alfdorf.de
|
a3f892408fadaca62c56880fce8d357a54218344
|
2a920f5f42c588dad01740da5d8c3d9aecbc2a90
|
/src/org/deegree/io/rtree/NoneLeafNode.java
|
36c4721138b6b7415dd238fa53ac27fe75bc7e41
|
[] |
no_license
|
lat-lon/deegree2-rev30957
|
40b50297cd28243b09bfd05db051ea4cecc889e4
|
22aa8f8696e50c6e19c22adb505efb0f1fc805d8
|
refs/heads/master
| 2020-04-06T07:00:21.040695
| 2016-06-28T15:21:56
| 2016-06-28T15:21:56
| 12,290,316
| 0
| 0
| null | 2016-06-28T15:21:57
| 2013-08-22T06:49:45
|
Java
|
UTF-8
|
Java
| false
| false
| 5,210
|
java
|
//$HeadURL: https://scm.wald.intevation.org/svn/deegree/base/trunk/src/org/deegree/io/rtree/NoneLeafNode.java $
//----------------------------------------
// RTree implementation.
// Copyright (C) 2002-2004 Wolfgang Baer - WBaer@gmx.de
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//----------------------------------------
package org.deegree.io.rtree;
/**
* <p>
* Implementation of a NoneLeafNode. Inherits methods from the abstract class Node filling the
* defined abstract methods with life.
* </p>
*
* @author Wolfgang Baer - WBaer@gmx.de
*/
class NoneLeafNode extends Node {
protected int[] childNodes;
/**
* Constructor.
*
* @param pageNumber -
* number of this node in page file
* @param file -
* the PageFile of this node
*/
protected NoneLeafNode( int pageNumber, PageFile file ) {
super( pageNumber, file );
childNodes = new int[file.getCapacity()];
for ( int i = 0; i < file.getCapacity(); i++ )
childNodes[i] = -1;
}
/**
* @see Node#getData(int)
*/
protected Object getData( int index ) {
Object obj = null;
try {
obj = file.readNode( childNodes[index] );
} catch ( PageFileException e ) {
// PageFileException NoneLeafNode.getData
e.printStackTrace();
}
return obj;
}
/**
* @see Node#insertData(java.lang.Object, HyperBoundingBox)
*/
protected void insertData( Object node, HyperBoundingBox box ) {
childNodes[counter] = ( (Node) node ).getPageNumber();
hyperBBs[counter] = box;
unionMinBB = unionMinBB.unionBoundingBox( box );
( (Node) node ).parentNode = this.pageNumber;
( (Node) node ).place = this.counter;
counter++;
try {
file.writeNode( (Node) node );
} catch ( PageFileException e ) {
// PageFileException NoneLeafNode.insertData - at writeNode(Node)
e.printStackTrace();
}
}
/**
* @see Node#insertData(java.lang.Object, HyperBoundingBox)
*/
protected void deleteData( int index ) {
if ( this.getUsedSpace() == 1 ) {
// only one element is a special case.
hyperBBs[0] = HyperBoundingBox.getNullHyperBoundingBox( file.getDimension() );
childNodes[0] = -1;
counter--;
} else {
System.arraycopy( hyperBBs, index + 1, hyperBBs, index, counter - index - 1 );
System.arraycopy( childNodes, index + 1, childNodes, index, counter - index - 1 );
hyperBBs[counter - 1] = HyperBoundingBox.getNullHyperBoundingBox( file.getDimension() );
childNodes[counter - 1] = -1;
counter--;
for ( int i = 0; i < counter; i++ ) {
Node help = (Node) this.getData( i );
help.place = i;
try {
file.writeNode( help );
} catch ( PageFileException e ) {
// "PageFileException NoneLeafNode.deleteData - at writeNode(Node)
e.printStackTrace();
}
}
}
updateNodeBoundingBox();
}
/**
* Computes the index of the entry with least enlargement if the given HyperBoundingBox would be
* added.
*
* @param box -
* HyperBoundingBox to be added
* @return int - index of entry with least enlargement
*/
protected int getLeastEnlargement( HyperBoundingBox box ) {
double[] area = new double[counter];
for ( int i = 0; i < counter; i++ )
area[i] = ( hyperBBs[i].unionBoundingBox( box ) ).getArea() - hyperBBs[i].getArea();
double min = area[0];
int minnr = 0;
for ( int i = 1; i < counter; i++ ) {
if ( area[i] < min ) {
min = area[i];
minnr = i;
}
}
return minnr;
}
/**
* @see Node#clone()
*/
protected Object clone() {
NoneLeafNode clone = new NoneLeafNode( this.pageNumber, this.file );
clone.counter = this.counter;
clone.place = this.place;
clone.unionMinBB = (HyperBoundingBox) this.unionMinBB.clone();
clone.parentNode = this.parentNode;
for ( int i = 0; i < file.getCapacity(); i++ )
clone.hyperBBs[i] = (HyperBoundingBox) this.hyperBBs[i].clone();
return clone;
}
}
|
[
"erben@lat-lon.de"
] |
erben@lat-lon.de
|
7132a073de30aafc784a0006ec32fc1b8f94830b
|
0be6826ea59357f42ffe0aa07628abc2c9c556c2
|
/hiz/JavaSource/co/com/tactusoft/crm/view/datamodel/SpecialityDataModel.java
|
188647243fe3f356c2e1148a80c4fdaa8fcaf83a
|
[] |
no_license
|
tactusoft/anexa
|
900fdf1072ac4ff624877680dc4981ac3d5d380b
|
8db0e544c18f958d8acd020dc70355e8a5fa76e9
|
refs/heads/master
| 2021-01-12T03:29:27.472185
| 2017-06-22T03:45:44
| 2017-06-22T03:45:44
| 78,216,940
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,032
|
java
|
package co.com.tactusoft.crm.view.datamodel;
import java.io.Serializable;
import java.util.List;
import javax.faces.model.ListDataModel;
import org.primefaces.model.SelectableDataModel;
import co.com.tactusoft.crm.model.entities.CrmSpeciality;
public class SpecialityDataModel extends ListDataModel<CrmSpeciality> implements
SelectableDataModel<CrmSpeciality>, Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
public SpecialityDataModel() {
}
public SpecialityDataModel(List<CrmSpeciality> data) {
super(data);
}
@SuppressWarnings("unchecked")
@Override
public CrmSpeciality getRowData(String rowKey) {
// In a real app, a more efficient way like a query by rowKey should be
// implemented to deal with huge data
List<CrmSpeciality> list = (List<CrmSpeciality>) getWrappedData();
for (CrmSpeciality row : list) {
if (row.getId().equals(rowKey))
return row;
}
return null;
}
@Override
public Object getRowKey(CrmSpeciality car) {
return car.getId();
}
}
|
[
"carlossarmientor@gmail.com"
] |
carlossarmientor@gmail.com
|
32f7b59f484d13264832dca49af2a895a7e1e66d
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/CodeJamData/12/42/15.java
|
8d5d69acce6d0c4a23f7afa0ac2eb06c5c90ea6e
|
[] |
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
| 3,257
|
java
|
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
public class GCJ_R2_B {
static boolean test = true;
private void solve() throws Throwable {
int t = iread();
for (int i = 0; i < t; i++) {
solveIt(i+1);
}
}
class Person {
int pos, width;
public Person(int pos, int width) {
super();
this.pos = pos;
this.width = width;
}
@Override
public String toString() {
return "Person [pos=" + pos + ", width=" + width + "]";
}
}
private void solveIt(int casenr) throws Throwable {
String ans = "";
int w = iread();
long m = lread(), n = lread();
double[][] position = new double[w][2];
List<Person> widths = new ArrayList<Person>(w);
for (int i = 0; i < w; i++) {
Person p = new Person(i, iread());
widths.add(p);
}
Collections.sort(widths, new Comparator<Person>() {
@Override
public int compare(Person o1, Person o2) {
return o2.width - o1.width;
}
});
Person firstPerson = widths.get(0);
double curY = 0, curX = -1*firstPerson.width;
double lastSize = firstPerson.width;
for (int i = 0; i < widths.size() ; i++) {
Person person = widths.get(i);
curX += person.width;
if(curX > m){
curX = 0;
curY += lastSize + person.width;
lastSize = person.width;
}
position[person.pos][0] = curX;
position[person.pos][1] = curY;
curX += person.width;
}
for (int i = 0; i < w; i++) {
ans += position[i][0] + " " + position[i][1];
if(i< w -1 ){
ans += " ";
}
}
String answerString = "Case #" + casenr + ": " + ans;
out.write(answerString + "\n");
System.out.println(answerString);
}
public int iread() throws Exception {
return Integer.parseInt(wread());
}
public double dread() throws Exception {
return Double.parseDouble(wread());
}
public long lread() throws Exception {
return Long.parseLong(wread());
}
public String wread() throws IOException {
StringBuilder b = new StringBuilder();
int c;
c = in.read();
while (c >= 0 && c <= ' ')
c = in.read();
if (c < 0)
return "";
while (c > ' ') {
b.append((char) c);
c = in.read();
}
return b.toString();
}
public static void main(String[] args) throws Throwable {
new GCJ_R2_B().solve();
out.close();
}
public GCJ_R2_B() throws Throwable {
if (test) {
in = new BufferedReader(new FileReader(new File(testDataFile)));
out = new BufferedWriter(new FileWriter(getClass().getCanonicalName() + "-out.txt"));
} else {
new BufferedReader(inp);
}
}
static InputStreamReader inp = new InputStreamReader(System.in);
static BufferedReader in = new BufferedReader(inp);
static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
// static BufferedWriter out;// = new BufferedWriter(new FileWriter("out.txt"));
static String testDataFile = "B-large.in";
}
|
[
"kwnafi@yahoo.com"
] |
kwnafi@yahoo.com
|
661c1ca221a57a2548e5305cb8be6e350d9d2904
|
417745894eb66a3c112dad5f93bab77035895960
|
/app/src/main/java/com/yuejian/meet/utils/CustomRotateAnim.java
|
db56af6f63de15b76d9d297f64aeb1842adffbb6
|
[] |
no_license
|
ljh-xiaohong/meet-andoid-master
|
f3167119e38b7e27908250903b2053d689b52bf5
|
8356523f2f579119a0433d6f0685fdddb7e5868d
|
refs/heads/master
| 2020-07-28T14:09:36.041238
| 2019-09-19T01:23:15
| 2019-09-19T01:23:15
| 209,434,901
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,002
|
java
|
package com.yuejian.meet.utils;
import android.graphics.Matrix;
import android.view.animation.Animation;
import android.view.animation.Transformation;
public class CustomRotateAnim
extends Animation
{
private static CustomRotateAnim rotateAnim;
private int mHeight;
private int mWidth;
public static CustomRotateAnim getCustomRotateAnim()
{
if (rotateAnim == null) {
rotateAnim = new CustomRotateAnim();
}
return rotateAnim;
}
protected void applyTransformation(float paramFloat, Transformation paramTransformation)
{
paramTransformation.getMatrix().setRotate((float)(Math.sin(paramFloat * 3.141592653589793D * 2.0D) * 20.0D), this.mWidth / 2, this.mHeight / 2);
super.applyTransformation(paramFloat, paramTransformation);
}
public void initialize(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
{
this.mWidth = paramInt1;
this.mHeight = paramInt2;
super.initialize(paramInt1, paramInt2, paramInt3, paramInt4);
}
}
|
[
"http://192.168.0.254:3000/Fred/meet-andoid.git"
] |
http://192.168.0.254:3000/Fred/meet-andoid.git
|
3fbdec3f343abc9e4a3a913bd900ca88a858e1be
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a021/A021269Test.java
|
275fc4cba29f61c21273e7e8942ea73a3ca994ee
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a021;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A021269Test extends AbstractSequenceTest {
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
558a8845b8ba41a77e0b874dccdae4627986b359
|
7b3651fd7af9697566257e4849ce9e109b01fb29
|
/src/main/java/com/homurax/chapter04/server/parallel/executor/ServerTask.java
|
be2940e9f1b5db99f0e497c2ded6b3bcb4785caf
|
[] |
no_license
|
lixiangqi-github/concurrency-learn
|
812ac4e20aef9996894db5905ef32605786cd82d
|
b904d5e9f12e1dadf3e8e99adcf2a6c844f5e453
|
refs/heads/master
| 2022-02-20T19:16:08.240239
| 2019-10-22T02:08:24
| 2019-10-22T02:08:24
| 256,743,981
| 1
| 0
| null | 2020-04-18T12:07:14
| 2020-04-18T12:07:14
| null |
UTF-8
|
Java
| false
| false
| 570
|
java
|
package com.homurax.chapter04.server.parallel.executor;
import com.homurax.chapter04.server.parallel.command.ConcurrentCommand;
import lombok.Data;
import java.util.concurrent.FutureTask;
@Data
public class ServerTask<V> extends FutureTask<V> implements Comparable<ServerTask<V>> {
private ConcurrentCommand command;
public ServerTask(ConcurrentCommand command) {
super(command, null);
this.command = command;
}
@Override
public int compareTo(ServerTask<V> other) {
return command.compareTo(other.getCommand());
}
}
|
[
"homuraxenoblade@gmail.com"
] |
homuraxenoblade@gmail.com
|
1884dda06fe72b7602b1685f926e2eeb3215eeba
|
61602d4b976db2084059453edeafe63865f96ec5
|
/com/alibaba/baichuan/android/trade/utils/m.java
|
be46b3cdafdc0ad50cab4cb851cad9e81ece2420
|
[] |
no_license
|
ZoranLi/thunder
|
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
|
0778679ef03ba1103b1d9d9a626c8449b19be14b
|
refs/heads/master
| 2020-03-20T23:29:27.131636
| 2018-06-19T06:43:26
| 2018-06-19T06:43:26
| 137,848,886
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 507
|
java
|
package com.alibaba.baichuan.android.trade.utils;
import com.alibaba.baichuan.android.trade.f.b;
import java.util.regex.Pattern;
public class m {
protected static final String a = "com.alibaba.baichuan.android.trade.utils.m";
public static boolean a(String str) {
if (str == null) {
return false;
}
for (String matches : b.a) {
if (Pattern.matches(matches, str)) {
return true;
}
}
return false;
}
}
|
[
"lizhangliao@xiaohongchun.com"
] |
lizhangliao@xiaohongchun.com
|
259eeb764ffa8dc4dcf9407e2271d956dba0bbc3
|
9fe800087ef8cc6e5b17fa00f944993b12696639
|
/batik-svgbrowser/src/main/java/org/apache/batik/apps/svgbrowser/TransformHistory.java
|
177bb9d6c8962b95aef4273941e0d6bbf3fbcf94
|
[
"Apache-2.0"
] |
permissive
|
balabit-deps/balabit-os-7-batik
|
14b80a316321cbd2bc29b79a1754cc4099ce10a2
|
652608f9d210de2d918d6fb2146b84c0cc771842
|
refs/heads/master
| 2023-08-09T03:24:18.809678
| 2023-05-22T20:34:34
| 2023-05-27T08:21:21
| 158,242,898
| 0
| 0
|
Apache-2.0
| 2023-07-20T04:18:04
| 2018-11-19T15:03:51
|
Java
|
UTF-8
|
Java
| false
| false
| 2,613
|
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.batik.apps.svgbrowser;
import java.awt.geom.AffineTransform;
import java.util.ArrayList;
import java.util.List;
/**
* This class implements a transform history mechanism.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
* @version $Id: TransformHistory.java 1733416 2016-03-03 07:07:13Z gadams $
*/
public class TransformHistory {
/**
* The transform stack.
*/
protected List transforms = new ArrayList();
/**
* The current position in the stack.
*/
protected int position = -1;
/**
* Goes back of one position in the history.
* Assumes that <code>canGoBack()</code> is true.
*/
public void back() {
position -= 2;
}
/**
* Whether it is possible to go back.
*/
public boolean canGoBack() {
return position > 0;
}
/**
* Goes forward of one position in the history.
* Assumes that <code>canGoForward()</code> is true.
*/
public void forward() {
}
/**
* Whether it is possible to go forward.
*/
public boolean canGoForward() {
return position < transforms.size() - 1;
}
/**
* Returns the current transform.
*/
public AffineTransform currentTransform() {
return (AffineTransform)transforms.get(position + 1);
}
/**
* Adds a transform to the history.
*/
public void update(AffineTransform at) {
if (position < -1) {
position = -1;
}
if (++position < transforms.size()) {
if (!transforms.get(position).equals(at)) {
transforms = transforms.subList(0, position + 1);
}
transforms.set(position, at);
} else {
transforms.add(at);
}
}
}
|
[
"testbot@balabit.com"
] |
testbot@balabit.com
|
eac9b6783257db932dde06791be5042069279302
|
c6b98c88fc553e709f2fb6fa88c7893c21f47f30
|
/Exareme-Docker/src/exareme/exareme-master/src/main/java/madgik/exareme/master/connector/AdpDBConnectorFactory.java
|
3a887174e07dabaeca0ac51cad00a4ef77950613
|
[
"MIT"
] |
permissive
|
LSmyrnaios/exareme
|
f8a7db17a20958c53bebc25a8e1b4eab96a7570e
|
9b2b9360f0564d08fc76a56a7a750e2d1074ed4f
|
refs/heads/master
| 2022-12-01T07:34:13.667213
| 2020-11-03T11:32:09
| 2020-11-03T11:32:09
| 159,374,117
| 0
| 0
|
MIT
| 2018-11-27T17:30:47
| 2018-11-27T17:30:47
| null |
UTF-8
|
Java
| false
| false
| 721
|
java
|
/**
* Copyright MaDgIK Group 2010 - 2015.
*/
package madgik.exareme.master.connector;
import madgik.exareme.master.connector.local.LocalAdpDBConnector;
import madgik.exareme.master.connector.rmi.RmiAdpDBConnector;
import java.rmi.RemoteException;
/**
* @author heraldkllapi
*/
public class AdpDBConnectorFactory {
public static AdpDBConnector createAdpDBConnector() throws RemoteException {
return createAdpDBRmiConnector();
}
private static AdpDBConnector createAdpDBLocalConnector() throws RemoteException {
return new LocalAdpDBConnector();
}
private static AdpDBConnector createAdpDBRmiConnector() throws RemoteException {
return new RmiAdpDBConnector();
}
}
|
[
"nikolopoulos.vaggelis@gmail.com"
] |
nikolopoulos.vaggelis@gmail.com
|
a2719373bd97942d0aece385297c89dea3de65e8
|
35f7ba535264e9d5fd5e8db9f08130ab67242032
|
/src/test/java/com/test/madhan/pages/OrderHistoryPage.java
|
6dacea8fe05d96c517dea583cdc81019ccc17dbf
|
[] |
no_license
|
phystem/bdd-test-framework
|
33d19cad4fc30c079732c2be43966fbb6ed82915
|
f3768b0c60ccfd0dab595beff4fb4eb2a42f9654
|
refs/heads/master
| 2023-03-25T11:39:12.449874
| 2021-03-13T15:15:18
| 2021-03-13T15:15:18
| 347,403,099
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,566
|
java
|
package com.test.madhan.pages;
import com.codeborne.selenide.SelenideElement;
import com.test.madhan.model.OrderData;
import static com.codeborne.selenide.CollectionCondition.sizeGreaterThanOrEqual;
import static com.codeborne.selenide.Condition.text;
import static com.codeborne.selenide.Condition.visible;
import static com.codeborne.selenide.Selenide.$;
import static com.codeborne.selenide.Selenide.$$;
public class OrderHistoryPage {
private final SelenideElement orderDetailBlock = $("#block-order-detail");
private final SelenideElement orderDetailTable = $("#order-detail-content");
private final String productNameLabel = "tbody .item .bold";
private final String productQtyLabel = "tbody .item .return_quantity";
private final String orderTotalLabel = ".totalprice .price";
public OrderHistoryPage selectOrder(String orderReference) {
$$("#order-list td.history_link>a")
.shouldHave(sizeGreaterThanOrEqual(1))
.filter(text(orderReference))
.first().click();
return this;
}
public void verifyOrder(OrderData orderData) {
orderDetailBlock.should(visible);
SelenideElement orderDetailTableElement = orderDetailTable.scrollIntoView(true);
orderDetailTableElement.$(productNameLabel).shouldHave(text(orderData.getProductName()));
orderDetailTableElement.$(productQtyLabel).shouldHave(text(orderData.getProductQuantity()));
orderDetailTableElement.$(orderTotalLabel).shouldHave(text(orderData.getOrderTotal()));
}
}
|
[
"phystem2@gmail.com"
] |
phystem2@gmail.com
|
232b1e0a6153ec438dfeb80b24d87dbf8f6da682
|
e82c1473b49df5114f0332c14781d677f88f363f
|
/HOMEPAGE/sfd-core/src/main/java/nta/sfd/core/repository/main/HospitalRegisterRepository.java
|
bc80c38a5638d1cc28273a5a887c98600c2e0ccc
|
[] |
no_license
|
zhiji6/mih
|
fa1d2279388976c901dc90762bc0b5c30a2325fc
|
2714d15853162a492db7ea8b953d5b863c3a8000
|
refs/heads/master
| 2023-08-16T18:35:19.836018
| 2017-12-28T09:33:19
| 2017-12-28T09:33:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,429
|
java
|
package nta.sfd.core.repository.main;
import java.math.BigDecimal;
import java.util.List;
import nta.sfd.core.entity.HospitalRegister;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
/**
* The Interface MailTemplateRepository.
*
* @author Quan.Le.Minh
* @crtDate 2015/07/02
*/
@Repository
public interface HospitalRegisterRepository extends JpaRepository<HospitalRegister, Integer>{
/**
* Get all Hospital Register by Status
* @param status
* @return
*/
@Query("SELECT hr FROM HospitalRegister hr WHERE hr.status = ?1")
public List<HospitalRegister> findByStatus(Integer status);
@Query("SELECT hr FROM HospitalRegister hr WHERE hr.status = 3 AND hr.vpnYn = 'Y' ")
public List<HospitalRegister> findHospitalUseVpn();
@Query("SELECT hr FROM HospitalRegister hr WHERE hr.sessionId = ?1")
public HospitalRegister findBySessionId(String sessionId);
@Query("SELECT MAX(hr.hospitalRegisterId) FROM HospitalRegister hr")
public Integer maxHospitalRegisterId();
@Query("SELECT COUNT(hr.hospitalRegisterId) FROM HospitalRegister hr WHERE hr.registerEmail = :email AND activeFlg = 1 AND demoFlg = :demoFlg ")
public Integer countHospitalRegisterIdByEmail(@Param("email") String email, @Param("demoFlg") BigDecimal demoFlg);
}
|
[
"duc_nt@nittsusystem-vn.com"
] |
duc_nt@nittsusystem-vn.com
|
29631f5753ceb5c91c43c74ad709c75dcae1489d
|
84556663012154e29ca8afd720c24051f4b284a4
|
/src/test/java/io/github/jhipster/firstapplication/web/rest/UserJWTControllerIntTest.java
|
3b4fcfe0d4f669288c00bf62eb4123d54d242a1f
|
[] |
no_license
|
MelaniePetit/jhipsterSampleApplication
|
e22585dfc4ae628ff240c4b87246606e8948df31
|
8c6cdbf5c1dd7dfc9d8516b482ac2783b1f4128a
|
refs/heads/master
| 2020-03-23T10:16:17.593917
| 2018-07-18T13:59:38
| 2018-07-18T13:59:38
| 141,434,313
| 0
| 0
| null | 2018-07-18T13:59:39
| 2018-07-18T12:51:20
|
Java
|
UTF-8
|
Java
| false
| false
| 5,019
|
java
|
package io.github.jhipster.firstapplication.web.rest;
import io.github.jhipster.firstapplication.JhipsterSampleApplicationApp;
import io.github.jhipster.firstapplication.domain.User;
import io.github.jhipster.firstapplication.repository.UserRepository;
import io.github.jhipster.firstapplication.security.jwt.TokenProvider;
import io.github.jhipster.firstapplication.web.rest.vm.LoginVM;
import io.github.jhipster.firstapplication.web.rest.errors.ExceptionTranslator;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.transaction.annotation.Transactional;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.Matchers.isEmptyString;
import static org.hamcrest.Matchers.not;
/**
* Test class for the UserJWTController REST controller.
*
* @see UserJWTController
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = JhipsterSampleApplicationApp.class)
public class UserJWTControllerIntTest {
@Autowired
private TokenProvider tokenProvider;
@Autowired
private AuthenticationManager authenticationManager;
@Autowired
private UserRepository userRepository;
@Autowired
private PasswordEncoder passwordEncoder;
@Autowired
private ExceptionTranslator exceptionTranslator;
private MockMvc mockMvc;
@Before
public void setup() {
UserJWTController userJWTController = new UserJWTController(tokenProvider, authenticationManager);
this.mockMvc = MockMvcBuilders.standaloneSetup(userJWTController)
.setControllerAdvice(exceptionTranslator)
.build();
}
@Test
@Transactional
public void testAuthorize() throws Exception {
User user = new User();
user.setLogin("user-jwt-controller");
user.setEmail("user-jwt-controller@example.com");
user.setActivated(true);
user.setPassword(passwordEncoder.encode("test"));
userRepository.saveAndFlush(user);
LoginVM login = new LoginVM();
login.setUsername("user-jwt-controller");
login.setPassword("test");
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id_token").isString())
.andExpect(jsonPath("$.id_token").isNotEmpty())
.andExpect(header().string("Authorization", not(nullValue())))
.andExpect(header().string("Authorization", not(isEmptyString())));
}
@Test
@Transactional
public void testAuthorizeWithRememberMe() throws Exception {
User user = new User();
user.setLogin("user-jwt-controller-remember-me");
user.setEmail("user-jwt-controller-remember-me@example.com");
user.setActivated(true);
user.setPassword(passwordEncoder.encode("test"));
userRepository.saveAndFlush(user);
LoginVM login = new LoginVM();
login.setUsername("user-jwt-controller-remember-me");
login.setPassword("test");
login.setRememberMe(true);
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id_token").isString())
.andExpect(jsonPath("$.id_token").isNotEmpty())
.andExpect(header().string("Authorization", not(nullValue())))
.andExpect(header().string("Authorization", not(isEmptyString())));
}
@Test
@Transactional
public void testAuthorizeFails() throws Exception {
LoginVM login = new LoginVM();
login.setUsername("wrong-user");
login.setPassword("wrong password");
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isUnauthorized())
.andExpect(jsonPath("$.id_token").doesNotExist())
.andExpect(header().doesNotExist("Authorization"));
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
6307e704088a6388420ee63292fbddb93f4fb4b5
|
768ac7d2fbff7b31da820c0d6a7a423c7e2fe8b8
|
/WEB-INF/java/com/youku/soku/sort/server/ServerManager.java
|
b2fb2a7c6ed943e3d5146c090cf66125a85e16a2
|
[] |
no_license
|
aiter/-java-soku
|
9d184fb047474f1e5cb8df898fcbdb16967ee636
|
864b933d8134386bd5b97c5b0dd37627f7532d8d
|
refs/heads/master
| 2021-01-18T17:41:28.396499
| 2015-08-24T06:09:21
| 2015-08-24T06:09:21
| 41,285,373
| 0
| 0
| null | 2015-08-24T06:08:00
| 2015-08-24T06:08:00
| null |
UTF-8
|
Java
| false
| false
| 2,783
|
java
|
package com.youku.soku.sort.server;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.concurrent.ThreadPoolExecutor;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.mina.common.ByteBuffer;
import org.apache.mina.common.DefaultIoFilterChainBuilder;
import org.apache.mina.common.SimpleByteBufferAllocator;
import org.apache.mina.common.ThreadModel;
import org.apache.mina.filter.codec.ProtocolCodecFilter;
import org.apache.mina.filter.codec.serialization.ObjectSerializationCodecFactory;
import org.apache.mina.filter.executor.ExecutorFilter;
import org.apache.mina.transport.socket.nio.SocketAcceptor;
import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
import com.youku.search.pool.net.MinaExecutors;
import com.youku.search.pool.net.ThreadPoolExetutorMonitor;
import com.youku.search.pool.net.mina.ByteBufferUtil;
public class ServerManager {
private static Log logger = LogFactory.getLog(ServerManager.class);
private ThreadPoolExecutor executorIo = MinaExecutors.io();
private ThreadPoolExecutor executorFilterChain = MinaExecutors.filter();
public static final int PORT = 8080;
private static ServerManager self = new ServerManager();
private ServerManager() {
init();
}
public static ServerManager getInstance() {
return self;
}
private void init() {
ByteBufferUtil.initByteBuffer();
SocketAcceptorConfig config = new SocketAcceptorConfig();
config.setThreadModel(ThreadModel.MANUAL);
// config.getSessionConfig().setTcpNoDelay(true);
DefaultIoFilterChainBuilder chain = config.getFilterChain();
chain.addLast("codec", new ProtocolCodecFilter(
new ObjectSerializationCodecFactory()));
chain.addLast("threadPool", new ExecutorFilter(executorFilterChain));
int ioCount = Runtime.getRuntime().availableProcessors() + 1;
SocketAcceptor acceptor = new SocketAcceptor(ioCount, executorIo);
// 启动 ServerHandler
try {
acceptor.bind(new InetSocketAddress(PORT), new ServerHandler(),
config);
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
logger.info("mina server starts on port " + PORT + ", with " + ioCount
+ " io thread(s)");
// 监视ThreadPoolExecutor
final long period = 60 * 1000;
ThreadPoolExetutorMonitor.monitor("s_filter", executorFilterChain,
period);
}
public static void main(String[] args) throws IOException {
ServerManager.getInstance();
}
}
|
[
"lyu302@gmail.com"
] |
lyu302@gmail.com
|
f2975ed5e52a5e5cbfddcedf86ad962f67e9721a
|
2c140a0632890ce2a28a9025b493cbc67fab3bd5
|
/src/main/java/org/hl7/v3/PRPAMT201304UV02Group.java
|
bcc8e18973649f6c25d5bef8e4671268d76f5491
|
[] |
no_license
|
darkxi/hl7-Edition2012
|
cf5d475e06464c776b8b39676953835aae1fb3f5
|
add3330c499fd0491fd18a2f71be04a3c1efb391
|
refs/heads/master
| 2020-06-07T01:21:19.768327
| 2017-07-18T03:23:43
| 2017-08-18T09:03:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,681
|
java
|
//
// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.7 生成的
// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// 在重新编译源模式时, 对此文件的所有修改都将丢失。
// 生成时间: 2017.08.10 时间 10:45:02 AM CST
//
package org.hl7.v3;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>PRPA_MT201304UV02.Group complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="PRPA_MT201304UV02.Group">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <group ref="{urn:hl7-org:v3}InfrastructureRootElements"/>
* <element name="id" type="{urn:hl7-org:v3}DSET_II" minOccurs="0"/>
* <element name="code" type="{urn:hl7-org:v3}CD" minOccurs="0"/>
* <element name="name" type="{urn:hl7-org:v3}COLL_EN" minOccurs="0"/>
* </sequence>
* <attGroup ref="{urn:hl7-org:v3}InfrastructureRootAttributes"/>
* <attribute name="nullFlavor" type="{urn:hl7-org:v3}NullFlavor" />
* <attribute name="classCode" use="required" type="{urn:hl7-org:v3}EntityClassOrganization" />
* <attribute name="determinerCode" use="required" type="{urn:hl7-org:v3}EntityDeterminerSpecific" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PRPA_MT201304UV02.Group", propOrder = {
"realmCode",
"typeId",
"templateId",
"id",
"code",
"name"
})
public class PRPAMT201304UV02Group {
protected DSETCS realmCode;
protected II typeId;
protected LISTII templateId;
protected DSETII id;
protected CD code;
protected COLLEN name;
@XmlAttribute(name = "nullFlavor")
protected NullFlavor nullFlavor;
@XmlAttribute(name = "classCode", required = true)
protected EntityClassOrganization classCode;
@XmlAttribute(name = "determinerCode", required = true)
protected EntityDeterminerSpecific determinerCode;
/**
* 获取realmCode属性的值。
*
* @return
* possible object is
* {@link DSETCS }
*
*/
public DSETCS getRealmCode() {
return realmCode;
}
/**
* 设置realmCode属性的值。
*
* @param value
* allowed object is
* {@link DSETCS }
*
*/
public void setRealmCode(DSETCS value) {
this.realmCode = value;
}
/**
* 获取typeId属性的值。
*
* @return
* possible object is
* {@link II }
*
*/
public II getTypeId() {
return typeId;
}
/**
* 设置typeId属性的值。
*
* @param value
* allowed object is
* {@link II }
*
*/
public void setTypeId(II value) {
this.typeId = value;
}
/**
* 获取templateId属性的值。
*
* @return
* possible object is
* {@link LISTII }
*
*/
public LISTII getTemplateId() {
return templateId;
}
/**
* 设置templateId属性的值。
*
* @param value
* allowed object is
* {@link LISTII }
*
*/
public void setTemplateId(LISTII value) {
this.templateId = value;
}
/**
* 获取id属性的值。
*
* @return
* possible object is
* {@link DSETII }
*
*/
public DSETII getId() {
return id;
}
/**
* 设置id属性的值。
*
* @param value
* allowed object is
* {@link DSETII }
*
*/
public void setId(DSETII value) {
this.id = value;
}
/**
* 获取code属性的值。
*
* @return
* possible object is
* {@link CD }
*
*/
public CD getCode() {
return code;
}
/**
* 设置code属性的值。
*
* @param value
* allowed object is
* {@link CD }
*
*/
public void setCode(CD value) {
this.code = value;
}
/**
* 获取name属性的值。
*
* @return
* possible object is
* {@link COLLEN }
*
*/
public COLLEN getName() {
return name;
}
/**
* 设置name属性的值。
*
* @param value
* allowed object is
* {@link COLLEN }
*
*/
public void setName(COLLEN value) {
this.name = value;
}
/**
* 获取nullFlavor属性的值。
*
* @return
* possible object is
* {@link NullFlavor }
*
*/
public NullFlavor getNullFlavor() {
return nullFlavor;
}
/**
* 设置nullFlavor属性的值。
*
* @param value
* allowed object is
* {@link NullFlavor }
*
*/
public void setNullFlavor(NullFlavor value) {
this.nullFlavor = value;
}
/**
* 获取classCode属性的值。
*
* @return
* possible object is
* {@link EntityClassOrganization }
*
*/
public EntityClassOrganization getClassCode() {
return classCode;
}
/**
* 设置classCode属性的值。
*
* @param value
* allowed object is
* {@link EntityClassOrganization }
*
*/
public void setClassCode(EntityClassOrganization value) {
this.classCode = value;
}
/**
* 获取determinerCode属性的值。
*
* @return
* possible object is
* {@link EntityDeterminerSpecific }
*
*/
public EntityDeterminerSpecific getDeterminerCode() {
return determinerCode;
}
/**
* 设置determinerCode属性的值。
*
* @param value
* allowed object is
* {@link EntityDeterminerSpecific }
*
*/
public void setDeterminerCode(EntityDeterminerSpecific value) {
this.determinerCode = value;
}
}
|
[
"2319457455@qq.com"
] |
2319457455@qq.com
|
dd4e0019c5ab5aa31b155757bfab0b76542d8a14
|
2b03a14247eacd51f053ec0f41209c2563850d10
|
/ejb3/jpaTreze/src/treze/Aluno.java
|
e5e1d8d109524ea38e6f467fa362dab0e8e97355
|
[] |
no_license
|
thiagolimacg/exemplos
|
bc5bbf56a99780a0cdfcfe98e549ccc00776a3f6
|
b872a6a8301473ad908eb55be23816c1a3f72eb1
|
refs/heads/master
| 2021-01-16T21:31:33.865292
| 2010-06-29T20:38:38
| 2010-06-29T20:38:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 535
|
java
|
package treze;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
@Entity
public class Aluno {
@Id
@GeneratedValue
private long id;
@ManyToOne(optional=false)
private Turma turma;
private String nome;
public Aluno() {}
public Aluno(String nome) {
this.nome = nome;
}
public String toString() {
return nome;
}
public Turma getTurma() {
return turma;
}
public void setTurma(Turma turma) {
this.turma = turma;
}
}
|
[
"projeto.kyrios@e2954138-3125-0410-b7ab-251e373a8e33"
] |
projeto.kyrios@e2954138-3125-0410-b7ab-251e373a8e33
|
ae3a88646af8deadb96faec100743d0e41191793
|
d13340796a4beb317f5f2da1f8b8baaf4dd0d23b
|
/src/main/java/com/hrbeu/O2O/service/AreaService.java
|
a6c4942c4c6cdb8c9ef08daca8fc0102ffcd3309
|
[] |
no_license
|
nxtabb/O2O
|
3113f9ed6ef32fa3ecdd0033cce0b6104525455d
|
c11509b52ca43b8d1e06f0d341bc168125859caf
|
refs/heads/master
| 2022-12-10T02:55:35.718140
| 2020-09-14T13:08:32
| 2020-09-14T13:08:32
| 294,109,168
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 152
|
java
|
package com.hrbeu.O2O.service;
import com.hrbeu.O2O.Pojo.Area;
import java.util.List;
public interface AreaService {
List<Area> getAreaList();
}
|
[
"1"
] |
1
|
ce4cbfe7f0b4cf681f8bf7a62178233e917b7e31
|
8c6824a9c34cbf8fb46c4da2ae323e74944e13c6
|
/src/main/java/model/TaotaoResult.java
|
900ed6106d6ff499fdaaa55a4b07bf15f425f0b5
|
[] |
no_license
|
whl6785968/Monitor
|
7385d823f135a30fa1d302374ec6e492f5927307
|
8e709d8336825a4978de8392d21afd049828f272
|
refs/heads/master
| 2022-12-22T15:13:29.837786
| 2020-07-02T06:48:57
| 2020-07-02T06:48:57
| 182,954,853
| 1
| 0
| null | 2022-12-16T07:45:48
| 2019-04-23T07:05:15
|
Roff
|
UTF-8
|
Java
| false
| false
| 3,816
|
java
|
package model;
import java.io.Serializable;
import java.util.List;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* 淘淘商城自定义响应结构
*/
public class TaotaoResult implements Serializable {
// 定义jackson对象
private static final ObjectMapper MAPPER = new ObjectMapper();
// 响应业务状态
private Integer status;
// 响应消息
private String msg;
// 响应中的数据
private Object data;
public static TaotaoResult build(Integer status, String msg, Object data) {
return new TaotaoResult(status, msg, data);
}
public static TaotaoResult ok(Object data) {
return new TaotaoResult(data);
}
public static TaotaoResult ok() {
return new TaotaoResult(null);
}
public TaotaoResult() {
}
public static TaotaoResult build(Integer status, String msg) {
return new TaotaoResult(status, msg, null);
}
public TaotaoResult(Integer status, String msg, Object data) {
this.status = status;
this.msg = msg;
this.data = data;
}
public TaotaoResult(Object data) {
this.status = 200;
this.msg = "OK";
this.data = data;
}
// public Boolean isOK() {
// return this.status == 200;
// }
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
/**
* 将json结果集转化为TaotaoResult对象
*
* @param jsonData json数据
* @param clazz TaotaoResult中的object类型
* @return
*/
public static TaotaoResult formatToPojo(String jsonData, Class<?> clazz) {
try {
if (clazz == null) {
return MAPPER.readValue(jsonData, TaotaoResult.class);
}
JsonNode jsonNode = MAPPER.readTree(jsonData);
JsonNode data = jsonNode.get("data");
Object obj = null;
if (clazz != null) {
if (data.isObject()) {
obj = MAPPER.readValue(data.traverse(), clazz);
} else if (data.isTextual()) {
obj = MAPPER.readValue(data.asText(), clazz);
}
}
return build(jsonNode.get("status").intValue(), jsonNode.get("msg").asText(), obj);
} catch (Exception e) {
return null;
}
}
/**
* 没有object对象的转化
*
* @param json
* @return
*/
public static TaotaoResult format(String json) {
try {
return MAPPER.readValue(json, TaotaoResult.class);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* Object是集合转化
*
* @param jsonData json数据
* @param clazz 集合中的类型
* @return
*/
public static TaotaoResult formatToList(String jsonData, Class<?> clazz) {
try {
JsonNode jsonNode = MAPPER.readTree(jsonData);
JsonNode data = jsonNode.get("data");
Object obj = null;
if (data.isArray() && data.size() > 0) {
obj = MAPPER.readValue(data.traverse(),
MAPPER.getTypeFactory().constructCollectionType(List.class, clazz));
}
return build(jsonNode.get("status").intValue(), jsonNode.get("msg").asText(), obj);
} catch (Exception e) {
return null;
}
}
}
|
[
"806403789@qq.com"
] |
806403789@qq.com
|
ae1ea0f34c075f9912f996e4887c61f1cb072fd2
|
6e1f73601a8a83aa5a7c324e9b031522ba778c42
|
/app/src/main/java/com/cxw/drawerlayoutdemo/volly/DVolley.java
|
94ad278235af757d9d9f6a44cb67ff6cf5705ef0
|
[] |
no_license
|
mmsapling/DrawerLayoutDemo
|
23a4e17e6387cf78b32ea0ce419e078e278661eb
|
0ed737a11b6d4aac8c88a4f8aab7bdc1898c213f
|
refs/heads/master
| 2021-01-10T06:10:14.612398
| 2016-03-09T07:32:42
| 2016-03-09T07:32:42
| 53,125,736
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,764
|
java
|
package com.cxw.drawerlayoutdemo.volly;
import java.util.HashMap;
import java.util.Map;
import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.content.Context;
import android.os.Build;
import android.util.Log;
import android.widget.ImageView;
import com.android.volley.AuthFailureError;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.cxw.drawerlayoutdemo.volly.image.BitmapLruCache;
import com.cxw.drawerlayoutdemo.volly.image.BitmapLruCache2_3;
import com.cxw.drawerlayoutdemo.volly.image.ImageListenerFactory;
import com.cxw.drawerlayoutdemo.volly.util.VolleyUtil;
/**
*
*/
@SuppressLint("NewApi")
public class DVolley {
private static final String DVolley_TAG = "DVolley";
private static DVolley instance;
private static RequestQueue mRequestQueue;
private static ImageLoader mImageLoader;
private final static int RATE = 8; // 默认分配最大空间的几分之一
private DVolley(Context context) {
mRequestQueue = Volley.newRequestQueue(context);
if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.HONEYCOMB){
// 确定在LruCache中,分配缓存空间大小,默认程序分配最大空间的 1/8
ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
int maxSize = manager.getMemoryClass() / RATE; // 比如 64M/8,单位为M
// BitmapLruCache自定义缓存class,该框架本身支持二级缓存,在BitmapLruCache封装一个软引用缓存
mImageLoader = new ImageLoader(mRequestQueue, new BitmapLruCache(context,1024 * 1024 * maxSize));
}else{
mImageLoader = new ImageLoader(mRequestQueue, new BitmapLruCache2_3(context));
}
}
/** 初始化Volley相关对象,在使用Volley前应该完成初始化 */
public static void init(Context context) {
if (instance == null) {
instance = new DVolley(context);
}
}
public static void getImage(String requestUrl, ImageView imageView, int defaultImageResId) {
if(requestUrl==null||requestUrl.equals("")){
return;
}
imageView.setTag(requestUrl);
getImageLoader().get(requestUrl, ImageListenerFactory.getImageListener(imageView, defaultImageResId), 0, 0);
}
public static void post(String url, final Map<String, String> params,DResponseService response) {
if(Constants.DEBUG){
//Log.i(DVolley_TAG+"_POST",VolleyUtil.getURL(url, params));
}
StringRequest jr = new StringRequest(Request.Method.POST, url,response, response) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String,String> map=new HashMap<String,String>();
map.put("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0");
map.put("Connection", "keep-alive");
map.put("Accept-Language", "zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3");
map.put("Accept-Encoding", "gzip, deflate");
map.put("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
return map;
}
};
jr.setTag(DVolley_TAG);
DVolley.getRequestQueue().add(jr);
}
public static void get(String url, Map<String, String> params,DResponseService response){
if(Constants.DEBUG){
Log.i(DVolley_TAG+"_GET", VolleyUtil.getURL(url, params));
}
StringRequest jr = new StringRequest(Request.Method.GET, VolleyUtil.getURL(url, params), response,response);
jr.setTag(DVolley_TAG);
DVolley.getRequestQueue().add(jr);
}
public static void cancelAll(){
if (mRequestQueue != null) {
mRequestQueue.cancelAll(DVolley_TAG);
}
}
/**得到请求队列对象*/
private static RequestQueue getRequestQueue() {
throwIfNotInit();
return mRequestQueue;
}
/** 得到ImageLoader对象*/
private static ImageLoader getImageLoader() {
throwIfNotInit();
return mImageLoader;
}
/**检查是否完成初始化*/
private static void throwIfNotInit() {
if (instance == null) {// 尚未初始化
throw new IllegalStateException("DYVolley尚未初始化,在使用前应该执行init()");
}
}
}
|
[
"tylzcxw@163.com"
] |
tylzcxw@163.com
|
0cdb5d93de8e0b8aa3afaeacb63cf8c41a3de798
|
7edaf0a19ea05fe61d466e58a8f13ff802f4caaf
|
/app/src/main/java/com/example/androidview/banner/HomeBannerAdapter.java
|
2fa84fd4de7d5d6c391b9eb3dca91794c5a23bbb
|
[] |
no_license
|
heliguo/androidview
|
42012756fe9f16fe25e47d1d03280ebd1b7fc135
|
df9a7f3b57a7c7c155e57865f96b669c160cff14
|
refs/heads/master
| 2023-08-21T09:08:15.448147
| 2021-10-23T06:45:03
| 2021-10-23T06:45:03
| 263,242,127
| 0
| 0
| null | 2021-06-03T08:26:32
| 2020-05-12T05:32:35
|
Java
|
UTF-8
|
Java
| false
| false
| 1,640
|
java
|
package com.example.androidview.banner;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.example.androidview.R;
import com.youth.banner.adapter.BannerAdapter;
import com.youth.banner.util.BannerUtils;
import java.util.List;
/**
* @author lgh on 2021/5/29 14:29
* @description
*/
public class HomeBannerAdapter extends BannerAdapter<BannerBean, HomeBannerAdapter.ImageHolder> {
public HomeBannerAdapter(List<BannerBean> datas) {
super(datas);
}
@Override
public ImageHolder onCreateHolder(ViewGroup parent, int viewType) {
ImageView imageView = (ImageView) BannerUtils.getView(parent, R.layout.banner_image);
// //通过裁剪实现圆角
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// BannerUtils.setBannerRound(imageView, 20);
// }
return new ImageHolder(imageView);
}
@Override
public void onBindView(ImageHolder holder, BannerBean data, int position, int size) {
Glide.with(holder.itemView)
.load(data.getUrl())
.thumbnail(Glide.with(holder.itemView).load(data.getUrl()).thumbnail(0.3f))
.into(holder.imageView);
}
public static class ImageHolder extends RecyclerView.ViewHolder {
public ImageView imageView;
public ImageHolder(@NonNull View view) {
super(view);
this.imageView = (ImageView) view;
}
}
}
|
[
"ysulgh@163.com"
] |
ysulgh@163.com
|
23aab36d5283c67e31299ebd6eafeb9b656caf3d
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/thinkaurelius--titan/f1ef6cbaafff7306673ceabc3e560178a2e27d8f/before/FaunusGraph.java
|
7b8de8a8737e230897e5ce3cb107157af360258b
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,786
|
java
|
package com.thinkaurelius.faunus;
import com.google.common.base.Preconditions;
import com.thinkaurelius.faunus.formats.Inverter;
import com.thinkaurelius.faunus.hdfs.HDFSTools;
import com.thinkaurelius.faunus.mapreduce.util.EmptyConfiguration;
import org.apache.hadoop.conf.Configurable;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapreduce.InputFormat;
import org.apache.hadoop.mapreduce.OutputFormat;
import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
public class FaunusGraph implements Configurable {
public static final String FAUNUS_GRAPH_INPUT_FORMAT = "faunus.graph.input.format";
public static final String FAUNUS_INPUT_LOCATION = "faunus.input.location";
public static final String FAUNUS_GRAPH_OUTPUT_FORMAT = "faunus.graph.output.format";
public static final String FAUNUS_SIDEEFFECT_OUTPUT_FORMAT = "faunus.sideeffect.output.format";
public static final String FAUNUS_OUTPUT_LOCATION = "faunus.output.location";
public static final String FAUNUS_OUTPUT_LOCATION_OVERWRITE = "faunus.output.location.overwrite";
private final FaunusType.Manager types = new FaunusType.Manager();
private Configuration configuration;
private FaunusSerializer serializer;
private static FaunusGraph current;
public static final FaunusGraph getCurrent() {
Preconditions.checkState(current!=null,"FaunusGraph has not yet been initialized");
return current;
}
public FaunusGraph() {
this(new Configuration());
}
public FaunusGraph(final Configuration configuration) {
this.configuration = new Configuration(configuration);
Preconditions.checkState(current==null,"FaunusGraph has already been initialized");
current = this;
}
public Configuration getConf() {
return this.configuration;
}
public FaunusType.Manager getTypes() {
return types;
}
public FaunusSerializer getSerializer() {
Preconditions.checkState(serializer!=null);
return serializer;
}
public Configuration getConf(final String prefix) {
final Configuration prefixConf = new EmptyConfiguration();
final Iterator<Map.Entry<String, String>> itty = this.configuration.iterator();
while (itty.hasNext()) {
final Map.Entry<String, String> entry = itty.next();
if (entry.getKey().startsWith(prefix + "."))
prefixConf.set(entry.getKey(), entry.getValue());
}
return prefixConf;
}
public void setConf(final Configuration configuration) {
this.configuration = configuration;
}
// GRAPH INPUT AND OUTPUT FORMATS
public Class<? extends InputFormat> getGraphInputFormat() {
return this.configuration.getClass(FAUNUS_GRAPH_INPUT_FORMAT, InputFormat.class, InputFormat.class);
}
public void setGraphInputFormat(final Class<? extends InputFormat> format) {
this.configuration.setClass(FAUNUS_GRAPH_INPUT_FORMAT, format, InputFormat.class);
}
public Class<? extends OutputFormat> getGraphOutputFormat() {
return this.configuration.getClass(FAUNUS_GRAPH_OUTPUT_FORMAT, OutputFormat.class, OutputFormat.class);
}
public void setGraphOutputFormat(final Class<? extends OutputFormat> format) {
this.configuration.setClass(FAUNUS_GRAPH_OUTPUT_FORMAT, format, OutputFormat.class);
}
// SIDE-EFFECT OUTPUT FORMAT
public Class<? extends OutputFormat> getSideEffectOutputFormat() {
return this.configuration.getClass(FAUNUS_SIDEEFFECT_OUTPUT_FORMAT, OutputFormat.class, OutputFormat.class);
}
public void setSideEffectOutputFormat(final Class<? extends OutputFormat> format) {
this.configuration.setClass(FAUNUS_SIDEEFFECT_OUTPUT_FORMAT, format, OutputFormat.class);
}
// INPUT AND OUTPUT LOCATIONS
public Path getInputLocation() {
if (null == this.configuration.get(FAUNUS_INPUT_LOCATION))
return null;
return new Path(this.configuration.get(FAUNUS_INPUT_LOCATION));
}
public void setInputLocation(final Path path) {
this.configuration.set(FAUNUS_INPUT_LOCATION, path.toString());
}
public void setInputLocation(final String path) {
this.setInputLocation(new Path(path));
}
public Path getOutputLocation() {
if (null == this.configuration.get(FAUNUS_OUTPUT_LOCATION))
throw new IllegalStateException("Please set " + FAUNUS_OUTPUT_LOCATION + " configuration option.");
return new Path(this.configuration.get(FAUNUS_OUTPUT_LOCATION));
}
public void setOutputLocation(final Path path) {
this.configuration.set(FAUNUS_OUTPUT_LOCATION, path.toString());
}
public void setOutputLocation(final String path) {
this.setOutputLocation(new Path(path));
}
public boolean getOutputLocationOverwrite() {
return this.configuration.getBoolean(FAUNUS_OUTPUT_LOCATION_OVERWRITE, false);
}
public void setOutputLocationOverwrite(final boolean overwrite) {
this.configuration.setBoolean(FAUNUS_OUTPUT_LOCATION_OVERWRITE, overwrite);
}
public void shutdown() {
this.configuration.clear();
}
public String toString() {
return "faunusgraph[" + this.configuration.getClass(FAUNUS_GRAPH_INPUT_FORMAT, InputFormat.class).getSimpleName().toLowerCase() + "->" + this.configuration.getClass(FAUNUS_GRAPH_OUTPUT_FORMAT, OutputFormat.class).getSimpleName().toLowerCase() + "]";
}
public FaunusGraph getNextGraph() throws IOException {
FaunusGraph graph = new FaunusGraph(this.getConf());
if (null != this.getGraphOutputFormat())
graph.setGraphInputFormat(Inverter.invertOutputFormat(this.getGraphOutputFormat()));
if (null != this.getOutputLocation()) {
graph.setInputLocation(HDFSTools.getOutputsFinalJob(FileSystem.get(this.configuration), this.getOutputLocation().toString()));
graph.setOutputLocation(new Path(this.getOutputLocation().toString() + "_"));
}
/*
TODO: This needs to be put into the "input handler" system
final Iterator<Map.Entry<String, String>> itty = this.configuration.iterator();
while (itty.hasNext()) {
final Map.Entry<String, String> entry = itty.next();
if (entry.getKey().startsWith("faunus.graph.output.titan.")) {
configuration.set("faunus.graph.input.titan." + entry.getKey().substring("faunus.graph.output.titan.".length()+1), entry.getValue());
}
}*/
return graph;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
da3a8fb09f23a044ac04c975ad5b17ad6d73abd9
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a087/A087621Test.java
|
73c951e37e92a49f6845bade57644244b153dd58
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a087;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A087621Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
0d23bec1c3c3faa69510fbe4bad8ec826f564bac
|
50d663816949cedaaeb8925fe9c1b7f4090d381d
|
/src/main/java/io/cloudsoft/win4j/service/shell/DesiredStreamType.java
|
e0e82fd6549f889fe51d5b770d1353960434e595
|
[
"Apache-2.0"
] |
permissive
|
TANGKUO/twoMan
|
43ac7749530b8f83b9a24da938a3fa7ddc0ea608
|
5898b0fc07af271b49592a6ecedbe1be994e4729
|
refs/heads/master
| 2021-01-20T13:04:28.141670
| 2017-08-06T13:37:38
| 2017-08-06T13:37:38
| 90,444,986
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,586
|
java
|
package io.cloudsoft.win4j.service.shell;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DesiredStreamType", propOrder = {
"value"
})
public class DesiredStreamType {
@XmlValue
protected String value;
@XmlAttribute(name = "CommandId", namespace = "http://schemas.microsoft.com/wbem/wsman/1/windows/shell")
protected String commandId;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the commandId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCommandId() {
return commandId;
}
/**
* Sets the value of the commandId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCommandId(String value) {
this.commandId = value;
}
}
|
[
"616507752@qq.com"
] |
616507752@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.