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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2c348b946f04f5ba9986d6b5f154c413854756f6
|
1690b1a472c7ae779832c00b762464c073baed09
|
/src/org/scapesoft/api/event/command/impl/StopLoop.java
|
c976dae3a0397d00329d2cba62d5fab40bca24de
|
[] |
no_license
|
bradleysixx/insomniapk-server
|
e5d78ab14786e49b18dccf742a6572da698b8ec6
|
e5ec12bfca18ed6885c2a99320f12d908a9168f5
|
refs/heads/master
| 2022-01-23T20:23:22.177976
| 2019-04-02T18:42:24
| 2019-04-02T18:42:24
| 177,716,541
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 594
|
java
|
package org.scapesoft.api.event.command.impl;
import org.scapesoft.api.event.command.CommandSkeleton;
import org.scapesoft.game.player.Player;
import org.scapesoft.utilities.game.player.Rights;
/**
* @author Tyluur <itstyluur@gmail.com>
* @since Mar 23, 2014
*/
public class StopLoop extends CommandSkeleton {
@Override
public Rights getRightsRequired() {
return Rights.OWNER;
}
@Override
public String[] getCommandApplicable() {
return new String[] { "sl" };
}
@Override
public void execute(Player player) {
player.getTemporaryAttributtes().put("stop_loop", true);
}
}
|
[
"37641668+bradleysixx@users.noreply.github.com"
] |
37641668+bradleysixx@users.noreply.github.com
|
c922c48c2e329ef38e96a579c9d808271b23ee31
|
e63d80f7fc164bcc4165fb407f57fa951a98424e
|
/src/main/java/laboGrid/impl/common/task/messages/package-info.java
|
bd9d4841f11ba10c74d504bcc93af25e80fd8c06
|
[] |
no_license
|
cfd-learner/labogrid
|
f4b8096253816c54715d2ae59b85f3b7bd535885
|
fcf43f5e31affc7d95e81a260f4913ca99745d9e
|
refs/heads/master
| 2021-01-20T12:10:39.578987
| 2011-08-11T13:54:54
| 2011-08-11T13:54:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 905
|
java
|
/*
* #%L
* LaBoGrid
* %%
* Copyright (C) 2011 LaBoGrid Team
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
/**
* Contains the common messages handled by centralized and decentralized LaBoGrid
* Task implementations.
*/
package laboGrid.impl.common.task.messages;
|
[
"g.dethier@gmail.com"
] |
g.dethier@gmail.com
|
ba9697195ef6de7a8d2b4449d2e9395fbaaadc42
|
31032f0adec76936295bb5c276e817b5b9d786bd
|
/src/main/java/com/corundumstudio/socketio/store/HazelcastStoreFactory.java
|
4697bcf975014f7fdadbb430fcc0d8b023949f0b
|
[
"Apache-2.0"
] |
permissive
|
akshaydeo/netty-socketio
|
a9e36bc72afdd43b9846245878a3a703e5fa835c
|
28db9d2ceef72ff960a65c349b6a332be5a4dd9d
|
refs/heads/master
| 2021-01-15T18:36:09.674001
| 2014-02-06T22:17:17
| 2014-02-06T22:17:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,095
|
java
|
/**
* Copyright 2012 Nikita Koksharov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.corundumstudio.socketio.store;
import java.util.UUID;
import com.corundumstudio.socketio.store.pubsub.BaseStoreFactory;
import com.corundumstudio.socketio.store.pubsub.PubSubStore;
import com.hazelcast.client.HazelcastClient;
import com.hazelcast.core.HazelcastInstance;
/**
* WARN: It's necessary to add netty-socketio.jar in hazelcast server classpath.
*
*/
public class HazelcastStoreFactory extends BaseStoreFactory {
private final HazelcastInstance hazelcastClient;
private final HazelcastInstance hazelcastPub;
private final HazelcastInstance hazelcastSub;
public HazelcastStoreFactory() {
this(HazelcastClient.newHazelcastClient());
}
public HazelcastStoreFactory(HazelcastInstance instance) {
hazelcastClient = instance;
hazelcastPub = instance;
hazelcastSub = instance;
}
public HazelcastStoreFactory(HazelcastInstance hazelcastClient, HazelcastInstance hazelcastPub, HazelcastInstance hazelcastSub) {
this.hazelcastClient = hazelcastClient;
this.hazelcastPub = hazelcastPub;
this.hazelcastSub = hazelcastSub;
}
@Override
public Store create(UUID sessionId) {
return new HazelcastStore(sessionId, hazelcastClient);
}
@Override
public void shutdown() {
hazelcastClient.shutdown();
}
@Override
public PubSubStore getPubSubStore() {
return new HazelcastPubSubStore(hazelcastPub, hazelcastSub, getNodeId());
}
}
|
[
"abracham.mitchell@gmail.com"
] |
abracham.mitchell@gmail.com
|
f711027e54a912a195611ab9f636d687fae480c6
|
f910a84171e04f833a415f5d9bcc36920aa8c9aa
|
/User-Registration-Module/src/main/java/nybsys/tillboxweb/models/VMCurrencySettingModel.java
|
e862ec6f7da8f2efa8eb19ee446e6aa54dce88c2
|
[] |
no_license
|
rocky-bgta/Java_Mircoservice_Backend_With_Mosquitto
|
7ecb35ca05c1d44d5f43668ccd6c5f3bcb40e03b
|
7528f12ed35560fcd4aba40b613ff09c5032bebf
|
refs/heads/master
| 2022-11-17T23:50:42.207381
| 2020-09-18T13:53:00
| 2020-09-18T13:53:00
| 138,392,854
| 0
| 1
| null | 2022-11-16T07:30:17
| 2018-06-23T10:38:52
|
Java
|
UTF-8
|
Java
| false
| false
| 544
|
java
|
/**
* Created By: Md. Rashed Khan Menon
* Created Date: 02/05/2018
* Time: 04:18
* Modified By:
* Modified date:
* (C) CopyRight NybSys ltd.
*/
package nybsys.tillboxweb.models;
import nybsys.tillboxweb.coreModels.CurrencyExchangeRateModel;
import nybsys.tillboxweb.coreModels.CurrencyModel;
import java.util.ArrayList;
import java.util.List;
public class VMCurrencySettingModel {
public List<CurrencyModel> lstCurrencyModel = new ArrayList<>();
public CurrencySettingModel currencySettingModel = new CurrencySettingModel();
}
|
[
"rocky.bgta@gmail.com"
] |
rocky.bgta@gmail.com
|
ead5729c37a5d8c53e37081ffa6bccf5e87d09d7
|
634ae05c5e190412b2c50a7b5317c3d331322bdf
|
/Games/Solitaire/src/com/cardsForest/games/twoStacks/TwoStacks.java
|
8b42460daf74a474e491fce5f112fc4a6bad17ce
|
[
"MIT"
] |
permissive
|
ganqzz/java_workspace
|
1b919aff1f177c5b6971e7f19f465129a247ed72
|
3a7285e9b1945c8b55a4b02bbb20aee3d31a9086
|
refs/heads/master
| 2023-07-16T06:03:36.310878
| 2021-09-04T03:44:37
| 2021-09-04T03:44:37
| 389,467,395
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,502
|
java
|
package com.cardsForest.games.twoStacks;
import com.cardsForest.foundations.Stack;
import com.cardsForest.logic.GameLogic;
/**
*
*/
public class TwoStacks extends GameLogic {
Stack stack1;
Stack stack2;
public TwoStacks() {
createStacks();
}
private void createStacks() {
stack1 = Stack.newEmptyStack();
stack2 = Stack.newEmptyStack();
Stack stack3 = Stack.newEmptyStack();
stack1.setBehavior(new StackBehavior(stack2));
stack1.getSprite().setRelativePos(0.2, 0.5);
stack1.getSprite().spread = true;
stacks.add(stack1);
stack2.setBehavior(new StackBehavior(stack1));
stack2.getSprite().setRelativePos(0.8, 0.5);
stack2.getSprite().spread = true;
stacks.add(stack2);
stack3.setBehavior(new StackBehavior(stack1));
stack3.getSprite().setRelativePos(0.5, 0.6);
stack3.getSprite().spread = true;
stacks.add(stack3);
}
/* (non-Javadoc)
* @see com.cardsForest.logic.GameLogic#checkGameDone()
*/
@Override
public boolean checkGameDone() {
if (selection.isAvailable() && selection.src == stack1) {
return false;
}
return stack1.isEmpty();
}
/* (non-Javadoc)
* @see com.cardsForest.logic.GameLogic#deal()
*/
@Override
public void deal() {
Stack stock = Stack.newDeck();
stock.moveTo(stack1, 10, true);
stack1.setAllFaceUp(true);
}
}
|
[
"ganqzz@users.noreply.github.com"
] |
ganqzz@users.noreply.github.com
|
252f0c3078b3c6ac08955174aecfe24cc982492f
|
835cce7f67fc31a131ee22cd18d3c57f8cd94d08
|
/app/src/main/java/com/familydemo/callback/CardCallback.java
|
b0e09c4fceb60e1236255d04d1a3f33d1d6c467c
|
[] |
no_license
|
18300602795/FamilyDemo
|
6d017866fd95004d589b030fd0cfa265fdcc56f6
|
6f7ab6a0eb063761b4d0f5de667340fb769b01b7
|
refs/heads/master
| 2021-04-27T03:38:27.478335
| 2018-03-15T10:37:54
| 2018-03-15T10:37:54
| 122,717,765
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,803
|
java
|
package com.familydemo.callback;
import android.graphics.Canvas;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
import com.mcxtzhang.commonadapter.rv.ViewHolder;
import com.mcxtzhang.layoutmanager.swipecard.CardConfig;
import com.mcxtzhang.layoutmanager.swipecard.RenRenCallback;
import java.util.List;
import static com.mcxtzhang.layoutmanager.swipecard.CardConfig.SCALE_GAP;
import static com.mcxtzhang.layoutmanager.swipecard.CardConfig.TRANS_Y_GAP;
/**
* Created by Administrator on 2018\2\24 0024.
*/
public class CardCallback extends RenRenCallback {
private static final int MAX_ROTATION = 15;
//2016 12 26 考虑 探探垂直上下方向滑动,不删除卡片,
//判断 此次滑动方向是否是竖直的 ,水平方向上的误差(阈值,默认我给了50dp)
int mHorizontalDeviation;
public CardCallback(RecyclerView rv, RecyclerView.Adapter adapter, List datas) {
//this(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT, rv, adapter, datas);
super(rv, adapter, datas);
mHorizontalDeviation = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 50, mRv.getContext().getResources().getDisplayMetrics());
}
public CardCallback(int dragDirs, int swipeDirs, RecyclerView rv, RecyclerView.Adapter adapter, List datas) {
super(dragDirs, swipeDirs, rv, adapter, datas);
}
public int getHorizontalDeviation() {
return mHorizontalDeviation;
}
public CardCallback setHorizontalDeviation(int horizontalDeviation) {
mHorizontalDeviation = horizontalDeviation;
return this;
}
@Override
public float getSwipeThreshold(RecyclerView.ViewHolder viewHolder) {
/* Log.d("TAG", "getSwipeThreshold() called with: viewHolder.itemView.getX() = [" + viewHolder.itemView.getX() + "]");
Log.d("TAG", "getSwipeThreshold() called with: viewHolder.itemView.getWidth() / 2 = [" + viewHolder.itemView.getWidth() / 2 + "]");
Log.d("TAG", "getSwipeThreshold() called with: mRv.getX() = [" + mRv.getX() + "]");
Log.d("TAG", "getSwipeThreshold() called with: mRv.getWidth() / 2 = [" + mRv.getWidth() / 2 + "]");*/
if (isTopViewCenterInHorizontal(viewHolder.itemView)) {
return Float.MAX_VALUE;
}
return super.getSwipeThreshold(viewHolder);
}
@Override
public float getSwipeEscapeVelocity(float defaultValue) {
View topView = mRv.getChildAt(mRv.getChildCount() - 1);
if (isTopViewCenterInHorizontal(topView)) {
return Float.MAX_VALUE;
}
return super.getSwipeEscapeVelocity(defaultValue);
}
@Override
public float getSwipeVelocityThreshold(float defaultValue) {
View topView = mRv.getChildAt(mRv.getChildCount() - 1);
if (isTopViewCenterInHorizontal(topView)) {
return Float.MAX_VALUE;
}
return super.getSwipeVelocityThreshold(defaultValue);
}
/**
* 返回TopView此时在水平方向上是否是居中的
*
* @return
*/
public boolean isTopViewCenterInHorizontal(View topView) {
Log.d("TAG", "getSwipeThreshold() called with: viewHolder.itemView.getX() = [" + topView.getX() + "]");
Log.d("TAG", "getSwipeThreshold() called with: viewHolder.itemView.getWidth() / 2 = [" + topView.getWidth() / 2 + "]");
Log.d("TAG", "getSwipeThreshold() called with: mRv.getX() = [" + mRv.getX() + "]");
Log.d("TAG", "getSwipeThreshold() called with: mRv.getWidth() / 2 = [" + mRv.getWidth() / 2 + "]");
return Math.abs(mRv.getWidth() / 2 - topView.getX() - (topView.getWidth() / 2)) < mHorizontalDeviation;
}
@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
super.onSwiped(viewHolder, direction);
//如果不需要循环删除
/* Object remove = mDatas.remove(viewHolder.getLayoutPosition());
mAdapter.notifyDataSetChanged();*/
Log.e("swipecard", "厉害了");
/* if (isLeftSwipe){
Toast.makeText(mRv.getContext(), "左滑删除", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(mRv.getContext(), "右滑删除", Toast.LENGTH_SHORT).show();
}*/
//探探只是第一层加了rotate & alpha的操作
//对rotate进行复位
viewHolder.itemView.setRotation(0);
//自己感受一下吧 Alpha
if (viewHolder instanceof ViewHolder) {
ViewHolder holder = (ViewHolder) viewHolder;
// holder.setAlpha(R.id.iv_love, 0);
// holder.setAlpha(R.id.iv_del, 0);
}
}
@Override
public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);
Log.e("swipecard", "onChildDraw() viewHolder = [" + viewHolder + "], dX = [" + dX + "], dY = [" + dY + "], actionState = [" + actionState + "], isCurrentlyActive = [" + isCurrentlyActive + "]");
//探探的效果
double swipValue = Math.sqrt(dX * dX + dY * dY);
double fraction = swipValue / getThreshold(viewHolder);
//边界修正 最大为1
if (fraction > 1) {
fraction = 1;
}
int childCount = recyclerView.getChildCount();
for (int i = 0; i < childCount; i++) {
View child = recyclerView.getChildAt(i);
//第几层,举例子,count =7, 最后一个TopView(6)是第0层,
int level = childCount - i - 1;
if (level > 0) {
child.setScaleX((float) (1 - SCALE_GAP * level + fraction * SCALE_GAP));
if (level < CardConfig.MAX_SHOW_COUNT - 1) {
child.setScaleY((float) (1 - SCALE_GAP * level + fraction * SCALE_GAP));
child.setTranslationY((float) (TRANS_Y_GAP * level - fraction * TRANS_Y_GAP));
} else {
//child.setTranslationY((float) (mTranslationYGap * (level - 1) - fraction * mTranslationYGap));
}
} else {
//探探只是第一层加了rotate & alpha的操作
//不过他区分左右
float xFraction = dX / getThreshold(viewHolder);
//边界修正 最大为1
if (xFraction > 1) {
xFraction = 1;
} else if (xFraction < -1) {
xFraction = -1;
}
//rotate
child.setRotation(xFraction * MAX_ROTATION);
//自己感受一下吧 Alpha
if (viewHolder instanceof ViewHolder) {
ViewHolder holder = (ViewHolder) viewHolder;
if (dX > 0) {
//露出左边,比心
// holder.setAlpha(R.id.iv_love, xFraction);
} else if (dX<0){
//露出右边,滚犊子
// holder.setAlpha(R.id.iv_del, -xFraction);
}else {
// holder.setAlpha(R.id.iv_love, 0);
// holder.setAlpha(R.id.iv_del, 0);
}
}
}
}
//可以在此判断左右滑:
float v = mRv.getWidth() / 2 - viewHolder.itemView.getX() - (viewHolder.itemView.getWidth() / 2);
if (v > 0) {
isLeftSwipe = true;
} else if (v < 0) {
isLeftSwipe = false;
}
}
//一个flag 判断左右滑
private boolean isLeftSwipe;
}
|
[
"18300602795@163.com"
] |
18300602795@163.com
|
b89252dcbba15c8ceef6223fb4c4156e2c3ffbab
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_69d3aca27a6bcd23323a873950efd5c0899c9314/Potter/2_69d3aca27a6bcd23323a873950efd5c0899c9314_Potter_s.java
|
c54d062001fd1ac2159b3e0fc5dd45361d990dcc
|
[] |
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
| 217
|
java
|
package com.github.kpacha.jkata.potter;
public class Potter {
public static double priceFor(int items) {
if (items == 2)
return 8 * 2 * 0.95;
if (items == 1)
return 8;
return 0;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
9bbad5c95fc41f5db06c1472535bfc767b2f6bb6
|
87c3c335023681d1c906892f96f3a868b3a6ee8e
|
/HTML5/dev/simplivity-citrixplugin-service/src/main/java/com/vmware/vim25/NetDhcpConfigSpec.java
|
3aea4af1affafe78fdc24564cc090b127fad6a42
|
[
"Apache-2.0"
] |
permissive
|
HewlettPackard/SimpliVity-Citrix-VCenter-Plugin
|
19d2b7655b570d9515bf7e7ca0cf1c823cbf5c61
|
504cbeec6fce27a4b6b23887b28d6a4e85393f4b
|
refs/heads/master
| 2023-08-09T08:37:27.937439
| 2020-04-30T06:15:26
| 2020-04-30T06:15:26
| 144,329,090
| 0
| 1
|
Apache-2.0
| 2020-04-07T07:27:53
| 2018-08-10T20:24:34
|
Java
|
UTF-8
|
Java
| false
| false
| 940
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.06.12 at 09:16:35 AM EDT
//
package com.vmware.vim25;
/**
*
*/
public class NetDhcpConfigSpec
extends DynamicData
{
public NetDhcpConfigSpecDhcpOptionsSpec ipv6;
public NetDhcpConfigSpecDhcpOptionsSpec ipv4;
public NetDhcpConfigSpecDhcpOptionsSpec getIpv6() {
return ipv6;
}
public void setIpv6(NetDhcpConfigSpecDhcpOptionsSpec ipv6) {
this.ipv6 = ipv6;
}
public NetDhcpConfigSpecDhcpOptionsSpec getIpv4() {
return ipv4;
}
public void setIpv4(NetDhcpConfigSpecDhcpOptionsSpec ipv4) {
this.ipv4 = ipv4;
}
}
|
[
"anuanusha471@gmail.com"
] |
anuanusha471@gmail.com
|
ddc6b1d653de38a5575c38bf1d4f39bb7cc8307b
|
629baa7d242ffcadec3a40e80e6c2a81b1a9f44f
|
/src/main/java/de/intarsys/nativec/type/NativeVoid.java
|
de6e04470a39031fdaac5af3cce44cd3faa5894a
|
[
"BSD-3-Clause"
] |
permissive
|
RWTH-i5-IDSG/native-c
|
ec7b76b7cae3b168c4dc5cdaf6f61a746ce4fee5
|
18f9247b4759bcf03aade93d575b720689d82413
|
refs/heads/master
| 2021-01-18T09:48:43.619236
| 2016-06-01T12:28:44
| 2016-06-01T12:28:44
| 60,173,520
| 0
| 0
| null | 2016-06-01T12:07:34
| 2016-06-01T12:07:33
|
Java
|
UTF-8
|
Java
| false
| false
| 2,650
|
java
|
/*
* Copyright (c) 2008, intarsys consulting GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of intarsys nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package de.intarsys.nativec.type;
import de.intarsys.nativec.api.INativeHandle;
import de.intarsys.nativec.api.NativeInterface;
import de.intarsys.nativec.api.NativeTools;
/**
* An object representing "void" ("nothing" or rather nothing we can specify
* more explicitly). Mostly (only?) useful with references.
*/
public class NativeVoid extends NativeSimple {
/** The meta class instance */
public static final NativeVoidType META = new NativeVoidType();
public static final NativeVoid NULL = (NativeVoid) META
.createNative(NativeInterface.NULL);
static {
NativeType.register(NativeVoid.class, META);
}
static public NativeVoid createFromAddress(long address) {
return (NativeVoid) NativeVoid.META.createNative(NativeTools
.toHandle(address));
}
protected NativeVoid(INativeHandle handle) {
super(handle);
}
@Override
public INativeType getNativeType() {
return META;
}
@Override
public Object getValue() {
throw new UnsupportedOperationException();
}
@Override
public void setValue(Object value) {
throw new UnsupportedOperationException();
}
}
|
[
"mtraut@intarsys.de"
] |
mtraut@intarsys.de
|
08133592ad6d84b7ba2d9a678659b65cda370208
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/16/16_ad6555d6e50cd0d1889afd6ec10d65d155ba5053/Application/16_ad6555d6e50cd0d1889afd6ec10d65d155ba5053_Application_t.java
|
df5ce9d2185afc28b493987d1e282d8dafe832e9
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,079
|
java
|
package controllers;
import models.*;
import play.Logger;
import java.util.List;
import java.util.Map;
public class Application extends PageController {
public static void index() {
// DEV MODE : discard connected user if not found in DB (when you restarted your local dev application with initial data)
String login = Security.connected();
if (login != null && Member.findByLogin(login) == null) {
session.remove("username");
}
// Three recent articles
List<Article> articles = Article.recents(1, 3);
List<Talk> sessions = Talk.recents(1, 3);
List<Member> members = Member.recents(1, 9);
List<Map> tags = Interest.getCloud();
render(articles, sessions, members, tags);
}
public static void members() {
List<Member> members = Member.findAll();
Logger.info(members.size() + " membres");
render("Application/list.html", members);
}
public static void staff() {
List<Staff> members = Staff.findAll();
Logger.info(members.size() + " membres du staff");
render("Application/list.html", members);
}
public static void speakers() {
List<Speaker> members = Speaker.findAll();
Logger.info(members.size() + " speakers");
render("Application/list.html", members);
}
public static void sponsors() {
List<Sponsor> members = Sponsor.findAll();
Logger.info(members.size() + " sponsors");
render("Application/list.html", members);
}
public static void sessionsAndMembersByInterest(String interest) {
List<Member> members = Member.findMembersInterestedIn(interest);
Logger.info(Member.count() + " membres interested by " + interest);
List<Session> sessions = Session.findSessionsLinkedWith(interest);
Logger.info(Session.count() + " session linked with " + interest);
render("Interests/list.html", members, sessions, interest);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
0b3ce99848e6793718f4d0a2750aaa8318302b47
|
d57176af406c4acc60155baa5e141225113e172d
|
/src/java/com/tsp/workflow/ws/SarWS.java
|
ece14ce01e3102cc408617caa233cb2d8472d145
|
[] |
no_license
|
njmube/SGFENS_BAFAR
|
8aa2bcf5312355efa46b84ab8533169df23a8cc9
|
4141ee825294246ca4703f7a4441f5a1b06fe0cb
|
refs/heads/master
| 2021-01-11T11:58:48.354602
| 2016-07-28T02:39:23
| 2016-07-28T02:39:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,441
|
java
|
package com.tsp.workflow.ws;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.Action;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2.6-1b01
* Generated source version: 2.2
*
*/
@WebService(name = "SarWS", targetNamespace = "http://ws.workflow.tsp.com/")
@XmlSeeAlso({
ObjectFactory.class
})
public interface SarWS {
/**
*
* @param accesoRequest
* @param consultaComprobanteRequest
* @return
* returns com.tsp.workflow.ws.ConsultaComprobanteResponse
*/
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "getComprobantes", targetNamespace = "http://ws.workflow.tsp.com/", className = "com.tsp.workflow.ws.GetComprobantes")
@ResponseWrapper(localName = "getComprobantesResponse", targetNamespace = "http://ws.workflow.tsp.com/", className = "com.tsp.workflow.ws.GetComprobantesResponse")
@Action(input = "http://ws.workflow.tsp.com/SarWS/getComprobantesRequest", output = "http://ws.workflow.tsp.com/SarWS/getComprobantesResponse")
public ConsultaComprobanteResponse getComprobantes(
@WebParam(name = "accesoRequest", targetNamespace = "")
AccesoRequest accesoRequest,
@WebParam(name = "consultaComprobanteRequest", targetNamespace = "")
ConsultaComprobanteRequest consultaComprobanteRequest);
/**
*
* @param accesoRequest
* @param consultaComprobanteRequest
* @return
* returns com.tsp.workflow.ws.ConsultaFlujoComprobanteResponse
*/
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "getFlujoComprobantes", targetNamespace = "http://ws.workflow.tsp.com/", className = "com.tsp.workflow.ws.GetFlujoComprobantes")
@ResponseWrapper(localName = "getFlujoComprobantesResponse", targetNamespace = "http://ws.workflow.tsp.com/", className = "com.tsp.workflow.ws.GetFlujoComprobantesResponse")
@Action(input = "http://ws.workflow.tsp.com/SarWS/getFlujoComprobantesRequest", output = "http://ws.workflow.tsp.com/SarWS/getFlujoComprobantesResponse")
public ConsultaFlujoComprobanteResponse getFlujoComprobantes(
@WebParam(name = "accesoRequest", targetNamespace = "")
AccesoRequest accesoRequest,
@WebParam(name = "consultaComprobanteRequest", targetNamespace = "")
ConsultaComprobanteRequest consultaComprobanteRequest);
/**
*
* @param accesoRequest
* @return
* returns com.tsp.workflow.ws.ConsultaDatosGralProveedorResponse
*/
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "getDatosGeneralProveedor", targetNamespace = "http://ws.workflow.tsp.com/", className = "com.tsp.workflow.ws.GetDatosGeneralProveedor")
@ResponseWrapper(localName = "getDatosGeneralProveedorResponse", targetNamespace = "http://ws.workflow.tsp.com/", className = "com.tsp.workflow.ws.GetDatosGeneralProveedorResponse")
@Action(input = "http://ws.workflow.tsp.com/SarWS/getDatosGeneralProveedorRequest", output = "http://ws.workflow.tsp.com/SarWS/getDatosGeneralProveedorResponse")
public ConsultaDatosGralProveedorResponse getDatosGeneralProveedor(
@WebParam(name = "accesoRequest", targetNamespace = "")
AccesoRequest accesoRequest);
/**
*
* @param accesoRequest
* @param registraComprobanteRequest
* @return
* returns com.tsp.workflow.ws.RegistraComprobanteResponse
*/
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "setComprobante", targetNamespace = "http://ws.workflow.tsp.com/", className = "com.tsp.workflow.ws.SetComprobante")
@ResponseWrapper(localName = "setComprobanteResponse", targetNamespace = "http://ws.workflow.tsp.com/", className = "com.tsp.workflow.ws.SetComprobanteResponse")
@Action(input = "http://ws.workflow.tsp.com/SarWS/setComprobanteRequest", output = "http://ws.workflow.tsp.com/SarWS/setComprobanteResponse")
public RegistraComprobanteResponse setComprobante(
@WebParam(name = "accesoRequest", targetNamespace = "")
AccesoRequest accesoRequest,
@WebParam(name = "registraComprobanteRequest", targetNamespace = "")
RegistraComprobanteRequest registraComprobanteRequest);
/**
*
* @param editaComprobanteRequest
* @param accesoRequest
* @return
* returns com.tsp.workflow.ws.RegistraComprobanteResponse
*/
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "editComprobante", targetNamespace = "http://ws.workflow.tsp.com/", className = "com.tsp.workflow.ws.EditComprobante")
@ResponseWrapper(localName = "editComprobanteResponse", targetNamespace = "http://ws.workflow.tsp.com/", className = "com.tsp.workflow.ws.EditComprobanteResponse")
@Action(input = "http://ws.workflow.tsp.com/SarWS/editComprobanteRequest", output = "http://ws.workflow.tsp.com/SarWS/editComprobanteResponse")
public RegistraComprobanteResponse editComprobante(
@WebParam(name = "accesoRequest", targetNamespace = "")
AccesoRequest accesoRequest,
@WebParam(name = "editaComprobanteRequest", targetNamespace = "")
EditaComprobanteRequest editaComprobanteRequest);
}
|
[
"nelly.gonzalez@vincoorbis.com"
] |
nelly.gonzalez@vincoorbis.com
|
70c23c617791073c7d16924a55dc687fdf773c17
|
20a68bc8842f2de6f241da165f99650639dcf3f8
|
/007DesignPattern/HeadFirstDesignPattern/src/main/java/com/hef/design11/factory/AbstractDuckFactory.java
|
d939d9b4c12615eb49d88b341ff039866be67d7a
|
[] |
no_license
|
kinoko67/learning-area
|
6c7af64b677f60f0aa690348da7738615cf81711
|
6cf460938624833f6c7d586ffaae5c68fbbdae61
|
refs/heads/master
| 2023-02-17T14:17:11.059096
| 2019-10-23T05:39:13
| 2019-10-23T05:39:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 367
|
java
|
package com.hef.design11.factory;
import com.hef.design11.Quackable;
/**
* @Date 2019-06-14
* @Author lifei
*/
public abstract class AbstractDuckFactory {
public abstract Quackable createMallardDuck();
public abstract Quackable createRedheadDuck();
public abstract Quackable createDuckCall();
public abstract Quackable createRubberDuck();
}
|
[
"hefrankeleyn@gamil.com"
] |
hefrankeleyn@gamil.com
|
b742d69bddb9ce5a5eb0fd0f0a7d7ad224f6a6fe
|
53a24c1290f33dd74923d5611bb6e01dd15ee5c3
|
/lazy/src/main/java/com/speedment/fika/lazy/specialized/LazyBigDecimal.java
|
f6ab2ce6fee12ec179d466f8958f6de7dae3f9c5
|
[
"Apache-2.0"
] |
permissive
|
jkost/fika
|
ad06b31e95f82a0f76dbeb344016476c08761d48
|
df1d9d6fd79ca136c8641204139465a7f9366670
|
refs/heads/master
| 2021-01-15T18:31:53.473178
| 2016-05-08T17:55:28
| 2016-05-08T17:55:31
| 62,167,795
| 1
| 0
| null | 2016-06-28T19:18:32
| 2016-06-28T19:18:32
| null |
UTF-8
|
Java
| false
| false
| 1,788
|
java
|
/**
*
* Copyright (c) 2006-2016, Speedment, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); You may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.speedment.fika.lazy.specialized;
import java.math.BigDecimal;
import static java.util.Objects.requireNonNull;
import java.util.function.Supplier;
/**
* Generic lazy initialization class. The supplier must produce a non-null
* value.
*
* This class is thread safe. The Supplier is guaranteed to be called exactly
* one time following one or several calls to
* {@link #getOrCompute(java.util.function.Supplier) } by any number of
* threads.
*
* @author Per Minborg
*/
public final class LazyBigDecimal {
private volatile BigDecimal value;
private LazyBigDecimal() {
}
public BigDecimal getOrCompute(Supplier<BigDecimal> supplier) {
// With this local variable, we only need to do one volatile read
final BigDecimal result = value;
return result == null ? maybeCompute(supplier) : result;
}
private synchronized BigDecimal maybeCompute(Supplier<BigDecimal> supplier) {
if (value == null) {
value = requireNonNull(supplier.get());
}
return value;
}
public static LazyBigDecimal create() {
return new LazyBigDecimal();
}
}
|
[
"minborg@speedment.com"
] |
minborg@speedment.com
|
28d2bef3ce76708fef90cebbc2b590ec52abb226
|
efbfbad75813b92ba0cce0df492fe6c7cf41a8c6
|
/basic-xml/src/main/java/example/service/MessageServiceImpl.java
|
f8cfd7b2cfc74fda87716864008e3750155bb54a
|
[] |
no_license
|
sergueik/springboot_study
|
d4636cd255cdaec07a22276393541a7dd9bb97c1
|
59c87d64d0d8d5e2eae6fe496b2a84425208fcfd
|
refs/heads/master
| 2023-09-01T14:04:34.285473
| 2023-08-31T22:29:09
| 2023-08-31T22:29:09
| 101,407,389
| 5
| 6
| null | 2023-03-04T00:57:19
| 2017-08-25T13:38:05
|
Java
|
UTF-8
|
Java
| false
| false
| 441
|
java
|
package example.service;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
public class MessageServiceImpl implements MessageService {
public String sendData(List<Object> data) {
return String.join(",", data.stream().map(o -> o.toString()).collect(Collectors.toList()));
}
}
|
[
"kouzmine_serguei@yahoo.com"
] |
kouzmine_serguei@yahoo.com
|
115e58e5ec7844d0027a913e933c3b4daffd77b4
|
263b9556d76279459ab9942b0005a911e2b085c5
|
/src/main/java/com/alipay/api/domain/AlipayPcreditLoanRepayplanQueryModel.java
|
f78c19db9bf208dbb7349991243dba07005fd156
|
[
"Apache-2.0"
] |
permissive
|
getsgock/alipay-sdk-java-all
|
1c98ffe7cb5601c715b4f4b956e6c2b41a067647
|
1ee16a85df59c08fb9a9b06755743711d5cd9814
|
refs/heads/master
| 2020-03-30T05:42:59.554699
| 2018-09-19T06:17:22
| 2018-09-19T06:17:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 675
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 用户还款计划查询
*
* @author auto create
* @since 1.0, 2018-07-18 10:46:20
*/
public class AlipayPcreditLoanRepayplanQueryModel extends AlipayObject {
private static final long serialVersionUID = 1265481876636888299L;
/**
* 贷款申请单号,借呗客户申请贷款时系统生成的全局唯一业务流水号
*/
@ApiField("loan_apply_no")
private String loanApplyNo;
public String getLoanApplyNo() {
return this.loanApplyNo;
}
public void setLoanApplyNo(String loanApplyNo) {
this.loanApplyNo = loanApplyNo;
}
}
|
[
"liuqun.lq@alibaba-inc.com"
] |
liuqun.lq@alibaba-inc.com
|
386706f07d85305d2b52d8da8c601ec3a09ce581
|
c156463cf82d43fff75cd484b0884a6b99404aa2
|
/ZeroToHero1/src/ARRAY_NEW_Topic/SortingIN_ARRAY.java
|
572c6986385bd9305214c0f08a2364dd4f3e16a6
|
[] |
no_license
|
bamboo1991/ZeroToHero1
|
39d71380d5e8f96beb4c4301cb3571b759d48a55
|
84402e09e63e176d5129f0460fd6087d218dabd8
|
refs/heads/master
| 2022-07-10T19:30:33.958922
| 2020-04-04T04:33:01
| 2020-04-04T04:33:01
| 241,712,319
| 0
| 1
| null | 2020-10-13T20:23:23
| 2020-02-19T19:56:37
|
Java
|
UTF-8
|
Java
| false
| false
| 487
|
java
|
package ARRAY_NEW_Topic;
import java.util.Arrays;
public class SortingIN_ARRAY {
public static void main(String[] args) {
int [] numbers ={2, 55, 3, 11, 44, 101, 34, 8};
Arrays.sort(numbers);
int [] smallestToLargest = new int[numbers.length];
for(int i=0, k=numbers.length-1; i<numbers.length; i++, k--){
smallestToLargest[i]=numbers[k];
}
System.out.println("--------> "+Arrays.toString(smallestToLargest));
}
}
|
[
"stamovuber@gmail.com"
] |
stamovuber@gmail.com
|
9bf036adf500ec63bff059ef33915ea25e1a3e28
|
0c534afc44908b50f24487c77bd090bbece83dcc
|
/agent-admin/src/com/flypaas/admin/service/data/VersionServiceImpl.java
|
6b50820f271368def720003300c5fae9120db30d
|
[] |
no_license
|
yangmingke/project
|
6b47dc01d9cd71c9f86c5b313b3604c7d71bdf14
|
991f6a32b6643bb771d5fdafdeeb527c2d3d6d4e
|
refs/heads/master
| 2021-09-06T17:51:47.813854
| 2018-02-09T08:48:48
| 2018-02-09T08:48:48
| 107,483,864
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,196
|
java
|
package com.flypaas.admin.service.data;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.flypaas.admin.constant.LogConstant.LogType;
import com.flypaas.admin.dao.MasterDao;
import com.flypaas.admin.model.PageContainer;
import com.flypaas.admin.service.LogService;
import com.flypaas.admin.service.TagService;
import com.flypaas.admin.util.ConfigUtils;
import com.flypaas.admin.util.file.FileUtil;
/**
* 信息管理-版本管理
*
* @author zenglb
*/
@Service
@Transactional
public class VersionServiceImpl implements VersionService {
@Autowired
private MasterDao dao;
@Autowired
private LogService logService;
@Autowired
private MsgService msgService;
@Autowired
private TagService tagService;
private String base_path;
@Override
public PageContainer query(Map<String, String> params) {
return dao.getSearchPage("version.query", "version.queryCount", params);
}
@Override
public Map<String, Object> updateStatus(Map<String, String> params) {
Map<String, Object> data = new HashMap<String, Object>();
if("2".equals(params.get("version_status"))){
dao.update("version.updateStatusCurrStatus", params);// 重置当前版本的状态
}
int i = dao.update("version.updateStatus", params);// 修改
if (i > 0) {
data.put("result", "success");
data.put("msg", "操作成功");
} else {
data.put("result", "fail");
data.put("msg", "版本不存在或原始状态不对,操作失败");
}
logService.add(LogType.update, "信息管理-版本管理:版本状态变更", params, data);
return data;
}
@Override
public Map<String, Object> view(Integer id) {
Map<String, Object> data = new HashMap<String, Object>();
Map<String, Object> entity = dao.getOneInfo("version.getEntity", id);// 获取应用
if (entity != null) {
data.put("entity", entity);
}
return data;
}
@Override
public Map<String, Object> save(Integer id, File version_file, String version_name_key, Map<String, Object> params){
Map<String, Object> data = new HashMap<String, Object>();
if (dao.getSearchSize("version.check", params) > 0) {// 查重
data.put("result", "fail");
data.put("msg", "此版本已配置,请重新编辑");
return data;
}
List<Map<String, Object>> lst = tagService.getTagDataForDictionary("version_name", new HashMap<String, Object>());
String version_name = null;
Integer vnk = Integer.valueOf(version_name_key);
for (Map<String, Object> map : lst) {
if(version_name_key.equals(map.get("value"))){
version_name = (String)map.get("text");
break;
}
}
int version_type = vnk / 10;
params.put("version_type", version_type);
params.put("version_name", version_name.replace("(开源)", "").replace("(安装)", ""));
if(version_file!=null){
String fileName ="UCS_" + version_name + "_V"+params.get("version_index") + "."+params.get("version_fileContentType");
if(null == base_path){
base_path = ConfigUtils.version_base_path +"/";
}
fileName = fileName.replace(" ", "_");
fileName = fileName.replace("(开源)", "").replace("(安装)", "");
String fn = FileUtil.upload(version_file, base_path + params.get("version_index") + "/", fileName);
params.put("version_path",fn);
}
if (id == null) {// 添加渠道
int i = dao.insert("version.insert", params);
if (i > 0) {
data.put("result", "success");
data.put("msg", "添加成功");
} else {
data.put("result", "fail");
data.put("msg", "添加失败");
}
logService.add(LogType.add, "信息管理-版本管理:添加版本", params, data);
} else {// 修改渠道
int i = dao.update("version.update", params);
if (i > 0) {
data.put("result", "success");
data.put("msg", "修改成功");
} else {
data.put("result", "fail");
data.put("msg", "版本不存在,修改失败");
}
logService.add(LogType.update, "信息管理-版本管理:修改版本", params, data);
}
return data;
}
}
|
[
"237050820@qq.com"
] |
237050820@qq.com
|
a64b220f624642fdccfd3e8ef6baa9993444ab41
|
0b3e1baebad030e584a5ad8e8408025e0aa71fce
|
/Json/JsonBean.java
|
a512138baac62b2d4327e02d69aa150d4ce6279c
|
[] |
no_license
|
NEIL-ORZZH/CodeUtils
|
64e19e46b771ce545053439347938a25dd47b0b2
|
f1bcd6cac93e9f099ac1ce60cb7547ef6f98bdeb
|
refs/heads/master
| 2021-05-29T19:29:52.758727
| 2015-10-18T08:31:14
| 2015-10-18T08:31:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 479
|
java
|
public class JsonBeans {
private Company company;
/*sub class*/
public class Company {
private String city_name;
private int creater_id;
private int province_id;
private Object website;
private int star;
private String intro;
private String business;
private ArrayList<Object> photos;
private int city_id;
private int id;
private String province_name;
private String address;
private String name;
private Object more_info;
private int auth;
}
}
|
[
"48262906@qq.com"
] |
48262906@qq.com
|
903d1c3765089b4d34837346e7bc481225298478
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project67/src/test/java/org/gradle/test/performance67_2/Test67_195.java
|
6b9c28b93a018ec2b963b3a42f3bb9d347d3586c
|
[] |
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
| 292
|
java
|
package org.gradle.test.performance67_2;
import static org.junit.Assert.*;
public class Test67_195 {
private final Production67_195 production = new Production67_195("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
73897e944974e22c27fe36c7ac7c72792b072172
|
499c60119cd6e1423fccfc8a94c7ad556c47b297
|
/samples-and-tests/album/app/models/Photo.java
|
577746e8769a80e2e3186ccfbcd4fef4e4b91118
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
kapilpendse/play-morphia
|
121f5b1b60c35ec650631c0c230cd3898a32c331
|
5d89d558d433726e382fc6023de2d77ac44309b7
|
refs/heads/master
| 2021-01-14T12:40:46.969111
| 2014-01-17T09:25:08
| 2014-01-17T09:25:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 833
|
java
|
package models;
import com.google.code.morphia.annotations.Entity;
import play.modules.morphia.Blob;
import play.modules.morphia.Model;
import java.util.HashSet;
import java.util.Set;
/**
* Created with IntelliJ IDEA.
* User: luog
* Date: 11/06/13
* Time: 9:19 PM
* To change this template use File | Settings | File Templates.
*/
@Entity("photo")
public class Photo extends Model {
public String albumId;
public String desc;
public Blob blob;
public Set<String> tags;
public Photo(String albumId) {
init();
this.albumId = albumId;
}
@Model.Loaded
void init() {
if (null == tags) {
tags = new HashSet<String>();
}
}
public String getUrl() {
return null == blob ? null: blob.getUrl();
//return null;
}
}
|
[
"greenlaw110@gmail.com"
] |
greenlaw110@gmail.com
|
ff7fd11b5ad820a887661907b9893d4df6e6d654
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_42615.java
|
2b7ee1643b4641119cd3aba0a7cfabfb9b42c10c
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,132
|
java
|
/**
* ?????? ????????????????,???????,??TRUE ????????????,??FALSE
* @param bankOrderNo ?????
* @return
*/
@Override public boolean processingTradeRecord(String bankOrderNo){
RpTradePaymentRecord byBankOrderNo=rpTradePaymentRecordDao.getByBankOrderNo(bankOrderNo);
if (byBankOrderNo == null) {
LOG.info("?????????[{}]???????",bankOrderNo);
throw new TradeBizException(TradeBizException.TRADE_ORDER_ERROR,"?????");
}
LOG.info("???:[{}],?????[{}]",byBankOrderNo.getBankOrderNo(),byBankOrderNo.getPayWayCode());
if (!TradeStatusEnum.WAITING_PAYMENT.name().equals(byBankOrderNo.getStatus())) {
LOG.info("??????[{}]??????????:{},??????",bankOrderNo,byBankOrderNo.getStatus());
return true;
}
if (byBankOrderNo.getPayWayCode().equals(PayWayEnum.WEIXIN.name())) {
Map<String,Object> resultMap;
if (PayTypeEnum.WX_PROGRAM_PAY.name().equals(byBankOrderNo.getPayTypeCode())) {
LOG.info("??--???????!???:[{}]",byBankOrderNo.getBankOrderNo());
resultMap=WeiXinPayUtils.orderQuery(byBankOrderNo.getBankOrderNo(),WeixinConfigUtil.xAppId,WeixinConfigUtil.xMchId,WeixinConfigUtil.xPayKey);
}
else {
LOG.info("??--????!???:[{}]",byBankOrderNo.getBankOrderNo());
resultMap=WeiXinPayUtils.orderQuery(byBankOrderNo.getBankOrderNo(),WeixinConfigUtil.appId,WeixinConfigUtil.mch_id,WeixinConfigUtil.partnerKey);
}
LOG.info("????????:{}",resultMap.toString());
if (resultMap == null || resultMap.isEmpty()) {
return false;
}
Object returnCode=resultMap.get("return_code");
if (null == returnCode || "FAIL".equals(returnCode)) {
return false;
}
if ("SUCCESS".equals(resultMap.get("trade_state"))) {
completeSuccessOrder(byBankOrderNo,byBankOrderNo.getBankTrxNo(),new Date(),"??????");
return true;
}
return false;
}
if (byBankOrderNo.getPayWayCode().equals(PayWayEnum.ALIPAY.name())) {
if (PayTypeEnum.DIRECT_PAY.name().equals(byBankOrderNo.getPayTypeCode())) {
LOG.info("???--????????!???:[{}]",byBankOrderNo.getBankOrderNo());
Map<String,Object> resultMap=AliPayUtil.singleTradeQuery(byBankOrderNo.getBankOrderNo());
if (resultMap.isEmpty() || !"T".equals(resultMap.get("is_success"))) {
return false;
}
if ("TRADE_SUCCESS".equals(resultMap.get("trade_status")) || "TRADE_FINISHED".equals(resultMap.get("trade_status"))) {
completeSuccessOrder(byBankOrderNo,byBankOrderNo.getBankTrxNo(),new Date(),"??????");
return true;
}
}
else if (PayTypeEnum.F2F_PAY.name().equals(byBankOrderNo.getPayTypeCode())) {
LOG.info("???--????????!???:[{}]",byBankOrderNo.getBankOrderNo());
Map<String,Object> resultMap=AliPayUtil.tradeQuery(byBankOrderNo.getBankOrderNo());
if (!"10000".equals(resultMap.get("code"))) {
return false;
}
if ("TRADE_SUCCESS".equals(resultMap.get("tradeStatus")) || "TRADE_FINISHED".equals(resultMap.get("tradeStatus"))) {
completeSuccessOrder(byBankOrderNo,byBankOrderNo.getBankTrxNo(),new Date(),"??????");
return true;
}
return false;
}
}
return false;
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
14930c5f76906a022d71d43de0a09413f30611a3
|
fd2487df8a7b087f946bb54b53d668f9ded32736
|
/para/src/test/java/com/erudika/para/search/ElasticSearchIT.java
|
f2c5444d919c9bb9fb6e881c0456a7afcb0f548d
|
[
"Apache-2.0"
] |
permissive
|
vkolev/para
|
1f4ea1ad7e116200f17ca8cf785ec002de8ca290
|
dea6ddc2d0260b588652e55e0b168086bb0e36f6
|
refs/heads/master
| 2021-01-18T06:32:42.786266
| 2014-07-20T21:36:30
| 2014-07-20T21:36:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,360
|
java
|
/*
* Copyright 2013-2014 Erudika. http://erudika.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.
*
* For issues and patches go to: https://github.com/erudika
*/
package com.erudika.para.search;
import com.erudika.para.persistence.DAO;
import com.erudika.para.utils.Config;
import org.junit.AfterClass;
import static org.junit.Assert.*;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.mockito.Mockito.mock;
/**
*
* @author Alex Bogdanovski [alex@erudika.com]
*/
public class ElasticSearchIT extends SearchTest {
@BeforeClass
public static void setUpClass() {
System.setProperty("para.env", "embedded");
s = new ElasticSearch(mock(DAO.class));
ElasticSearchUtils.createIndex(Config.APP_NAME_NS);
ElasticSearchUtils.createIndex(appid1);
ElasticSearchUtils.createIndex(appid2);
SearchTest.init();
}
@AfterClass
public static void tearDownClass() {
ElasticSearchUtils.deleteIndex(Config.APP_NAME_NS);
ElasticSearchUtils.deleteIndex(appid1);
ElasticSearchUtils.deleteIndex(appid2);
ElasticSearchUtils.shutdownClient();
SearchTest.cleanup();
}
@Test
public void testCreateDeleteExistsIndex() throws InterruptedException {
String appid3 = "test-index";
String badAppid = "test index 123";
ElasticSearchUtils.createIndex("");
assertFalse(ElasticSearchUtils.existsIndex(""));
ElasticSearchUtils.createIndex(appid3);
assertTrue(ElasticSearchUtils.existsIndex(appid3));
assertTrue(ElasticSearchUtils.optimizeIndex(appid3));
ElasticSearchUtils.deleteIndex(appid3);
assertFalse(ElasticSearchUtils.existsIndex(appid3));
assertFalse(ElasticSearchUtils.createIndex(badAppid));
assertFalse(ElasticSearchUtils.existsIndex(badAppid));
assertFalse(ElasticSearchUtils.deleteIndex(appid3));
assertFalse(ElasticSearchUtils.deleteIndex(badAppid));
}
@Test
public void testRebuildIndex() {
// TODO
}
@Test
public void testGetSearchClusterMetadata() {
assertFalse(ElasticSearchUtils.getSearchClusterMetadata().isEmpty());
}
@Test
public void testGetIndexNameForAlias() throws InterruptedException {
ElasticSearchUtils.createIndex("test-index");
assertNull(ElasticSearchUtils.getIndexNameForAlias(""));
assertEquals("test-index1", ElasticSearchUtils.getIndexNameForAlias("test-index"));
ElasticSearchUtils.deleteIndex("test-index");
}
@Test
public void testSharedIndex() {
// IndexBasedDAO no longer supports shared Apps so these test will fail.
// If tested using a different DAO these should be OK.
// String app1 = "myapp1";
// String app2 = "myapp2";
// String shared = "shared-index";
// assertTrue(ElasticSearchUtils.createIndex(shared));
// assertTrue(ElasticSearchUtils.addIndexAlias(shared, app1, true));
// assertTrue(ElasticSearchUtils.addIndexAlias(shared, app2, true));
//
// try {
// Tag t1 = new Tag("t1");
// Tag t2 = new Tag("t2");
// Tag t3 = new Tag("t3");
//
// t1.setAppid(app1);
// t2.setAppid(app2);
// t3.setAppid(app1);
//
// // enable on-index routing by setting the shardKey for each object
// t1.setShardKey(t1.getAppid());
// t2.setShardKey(t2.getAppid());
// t3.setShardKey(t3.getAppid());
//
// s.index(t1.getAppid(), t1);
// s.index(t2.getAppid(), t2);
// s.index(t3.getAppid(), t3);
//
// // enable on-search routing by prefixing the routing value to the alias.
// // "_" means the same value as the alias
// app1 = "_:" + app1;
// app2 = "_:" + app2;
//
// // top view of all docs in shared index
// assertEquals(3, s.getCount(shared, "tag").intValue());
// // local view for each app space
// assertEquals(2, s.getCount(app1, "tag").intValue());
// assertEquals(1, s.getCount(app2, "tag").intValue());
//
// List<Tag> l = s.findQuery(app1, "tag", "*");
// assertEquals(2, l.size());
// } finally {
// ElasticSearchUtils.deleteIndex(shared);
// }
}
}
|
[
"alex@erudika.com"
] |
alex@erudika.com
|
d7984c3d5a2b5d77b4da56cf70b696b29bb54429
|
c1f0aa8b673188aae1ff06735fb474343db164af
|
/weixin4j-qy/src/main/java/com/foxinmy/weixin4j/qy/suite/Weixin4jSuiteSettings.java
|
c160d4388c452348ac0b35328949296cf77afd31
|
[
"Apache-2.0"
] |
permissive
|
HaoJie23/weixin4j
|
28e2b95060cb8ec06ed487fa8453c749aaf59377
|
816a4ec0efe4b715ec782e23ceeaefd247a7e3e1
|
refs/heads/master
| 2021-01-18T12:14:17.757219
| 2016-05-22T02:50:04
| 2016-05-22T02:50:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,031
|
java
|
package com.foxinmy.weixin4j.qy.suite;
import java.util.Arrays;
import com.alibaba.fastjson.JSON;
import com.foxinmy.weixin4j.http.HttpParams;
import com.foxinmy.weixin4j.model.WeixinAccount;
import com.foxinmy.weixin4j.qy.model.WeixinQyAccount;
import com.foxinmy.weixin4j.token.FileTokenStorager;
import com.foxinmy.weixin4j.token.TokenStorager;
import com.foxinmy.weixin4j.util.StringUtil;
import com.foxinmy.weixin4j.util.Weixin4jConfigUtil;
/**
* 微信第三方套件配置相关
*
* @className Weixin4jSuiteSettings
* @author jinyu(foxinmy@gmail.com)
* @date 2016年1月28日
* @since JDK 1.6
* @see
*/
public class Weixin4jSuiteSettings {
/**
* 微信企业号信息
*/
private final WeixinQyAccount weixinAccount;
/**
* Http参数
*/
private HttpParams httpParams;
/**
* token存储方式 默认为FileTokenStorager
*/
private TokenStorager tokenStorager;
/**
* 系统临时目录
*/
private String tmpdir;
/**
* 默认使用weixin4j.properties配置的信息
*/
public Weixin4jSuiteSettings() {
this(JSON.parseObject(Weixin4jConfigUtil.getValue("account"),
WeixinQyAccount.class));
}
/**
*
* @param providerCorpId
* 服务商的企业号ID <font color="red">使用服务商API时必填项</font>
* @param providerSecret
* 服务商secret <font color="red">使用服务商API时必填项</font>
* @param suites
* 套件信息 <font color="red">使用套件API时必填项</font>
*/
public Weixin4jSuiteSettings(String providerCorpId, String providerSecret,
WeixinAccount... suites) {
this.weixinAccount = new WeixinQyAccount(providerCorpId, null,
Arrays.asList(suites), providerSecret, null);
}
private Weixin4jSuiteSettings(WeixinQyAccount weixinAccount) {
this.weixinAccount = weixinAccount;
}
public WeixinQyAccount getWeixinAccount() {
return weixinAccount;
}
public HttpParams getHttpParams() {
return httpParams;
}
public HttpParams getHttpParams0() {
if (httpParams == null) {
return new HttpParams();
}
return httpParams;
}
public String getTmpdir() {
return tmpdir;
}
public String getTmpdir0() {
if (StringUtil.isBlank(tmpdir)) {
return Weixin4jConfigUtil.getClassPathValue("weixin4j.tmpdir",
System.getProperty("java.io.tmpdir"));
}
return tmpdir;
}
public TokenStorager getTokenStorager() {
return tokenStorager;
}
public TokenStorager getTokenStorager0() {
if (tokenStorager == null) {
return new FileTokenStorager(getTmpdir0());
}
return tokenStorager;
}
public void setHttpParams(HttpParams httpParams) {
this.httpParams = httpParams;
}
public void setTmpdir(String tmpdir) {
this.tmpdir = tmpdir;
}
public void setTokenStorager(TokenStorager tokenStorager) {
this.tokenStorager = tokenStorager;
}
@Override
public String toString() {
return "Weixin4jSuiteSettings [weixinAccount=" + weixinAccount
+ ", httpParams=" + httpParams + ",tokenStorager="
+ tokenStorager + ", tmpdir=" + tmpdir + "]";
}
}
|
[
"foxinmy@gmail.com"
] |
foxinmy@gmail.com
|
7febe2e9cefbc47efb7ec89aafe3360308b89a16
|
0031716e70b380c4564a9ba506df3c01673e4dc5
|
/app/src/main/java/com/sina/weibo/sdk/api/CmdObject.java
|
474bd0b52558a03cb0e168bb08f3e7ca1f310cf5
|
[] |
no_license
|
sridhar191986/DouBanYueDu
|
fc08c583f4ef53bb293f967de2a2772eb5b55719
|
fd126db0e3ed684f27a498eda7eaedb06e6c396c
|
refs/heads/master
| 2020-09-07T14:32:40.823864
| 2016-02-18T10:22:58
| 2016-02-18T10:22:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,390
|
java
|
package com.sina.weibo.sdk.api;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
import io.realm.internal.Table;
public class CmdObject extends BaseMediaObject {
public static final String CMD_HOME = "home";
public static final Creator<CmdObject> CREATOR;
public String cmd;
static {
CREATOR = new Creator<CmdObject>() {
public CmdObject createFromParcel(Parcel in) {
return new CmdObject(in);
}
public CmdObject[] newArray(int size) {
return new CmdObject[size];
}
};
}
public CmdObject(Parcel in) {
this.cmd = in.readString();
}
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.cmd);
}
public boolean checkArgs() {
if (this.cmd == null || this.cmd.length() == 0 || this.cmd.length() > AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT) {
return false;
}
return true;
}
public int getObjType() {
return 7;
}
protected BaseMediaObject toExtraMediaObject(String str) {
return this;
}
protected String toExtraMediaString() {
return Table.STRING_DEFAULT_VALUE;
}
}
|
[
"blankeeee@gmail.com"
] |
blankeeee@gmail.com
|
af2eba82eef487eb3ade8ef5449426ac01ffc772
|
58aaa6d3e5e6c5bad58b41e338dca29f48cebd6e
|
/trunk/zportal.web/src/main/java/iglabs/zportal/web/dto/ResponseDTO.java
|
69aaac8afc0b3c6ed130bbb55d033181c7fda350
|
[] |
no_license
|
BGCX261/z-portal-svn-to-git
|
cccc2fac1c436fd11193636eed8e744c2c35350f
|
39e94089ba7e713d5c37bcb9279b31973c7cd417
|
refs/heads/master
| 2021-01-23T18:09:01.465535
| 2015-08-25T15:18:50
| 2015-08-25T15:18:50
| 41,499,850
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 814
|
java
|
package iglabs.zportal.web.dto;
public class ResponseDTO<T> {
public static <U> ResponseDTO<U> success(U data) {
return new ResponseDTO<U>(data, true, null);
}
public static ResponseDTO failure(String message) {
return new ResponseDTO(null, false, message);
}
protected ResponseDTO(T data, boolean success, String message) {
this.data = data;
this.success = success;
this.message = message;
}
public T getData() {
return data;
}
public String getMessage() {
return message;
}
public boolean isSuccess() {
return success;
}
private final T data;
private final boolean success;
private final String message;
}
|
[
"you@example.com"
] |
you@example.com
|
35d403fa66509b984f12e482c6a7088b7abc8473
|
493a8065cf8ec4a4ccdf136170d505248ac03399
|
/net.sf.ictalive.coordination.wfvv.diagram/src/net/sf/ictalive/coordination/wfvv/diagram/edit/helpers/DeadlineViolationEditHelper.java
|
2ef4d0244c5dcdc57c8b70251115cb417e030772
|
[] |
no_license
|
ignasi-gomez/aliveclipse
|
593611b2d471ee313650faeefbed591c17beaa50
|
9dd2353c886f60012b4ee4fe8b678d56972dff97
|
refs/heads/master
| 2021-01-14T09:08:24.839952
| 2014-10-09T14:21:01
| 2014-10-09T14:21:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 159
|
java
|
package net.sf.ictalive.coordination.wfvv.diagram.edit.helpers;
/**
* @generated
*/
public class DeadlineViolationEditHelper extends WfvvBaseEditHelper {
}
|
[
"salvarez@lsi.upc.edu"
] |
salvarez@lsi.upc.edu
|
4f11323c9bc794ee69065ed9c5d4c0063eedf835
|
b1fb8c75ad7a4a17a6d8b262a58ecd87ff75f3d8
|
/src/test/java/org/soulwing/credo/service/request/DownloadCredentialRequestServiceBeanTest.java
|
b67800708d9bfeca6231fd7ed6dd2148f1a28f4b
|
[
"Apache-2.0"
] |
permissive
|
soulwing/credo
|
cd5138457af74ab9b9a820ee3365aa636e0323c3
|
261d79a32d57ca6482cd75371a552d745ca6e430
|
refs/heads/master
| 2016-09-06T18:03:52.771247
| 2016-02-27T12:08:17
| 2016-02-27T12:08:17
| 17,405,272
| 0
| 0
| null | 2014-03-04T20:04:19
| 2014-03-04T14:40:51
|
Java
|
UTF-8
|
Java
| false
| false
| 2,653
|
java
|
/*
* File created on Apr 12, 2014
*
* Copyright (c) 2014 Virginia Polytechnic Institute and State University
*
* 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.soulwing.credo.service.request;
import org.jmock.Expectations;
import org.jmock.auto.Mock;
import org.jmock.integration.junit4.JUnitRuleMockery;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.soulwing.credo.CredentialRequest;
import org.soulwing.credo.repository.CredentialRequestRepository;
import org.soulwing.credo.service.FileDownloadResponse;
import org.soulwing.credo.service.credential.NoSuchCredentialException;
/**
* Unit tests for {@link DownloadCredentialRequestServiceBean}.
*
* @author Carl Harris
*/
public class DownloadCredentialRequestServiceBeanTest {
private static final long REQUEST_ID = -1L;
@Rule
public final JUnitRuleMockery context = new JUnitRuleMockery();
@Mock
private CredentialRequestRepository requestRepository;
@Mock
private CreateCredentialRequestService createRequestService;
@Mock
private CredentialRequest request;
@Mock
private FileDownloadResponse response;
private DownloadCredentialRequestServiceBean service = new DownloadCredentialRequestServiceBean();
@Before
public void setUp() throws Exception {
service.requestRepository = requestRepository;
service.createRequestService = createRequestService;
}
@Test
public void testDownloadRequestById() throws Exception {
context.checking(new Expectations() { {
oneOf(requestRepository).findById(with(REQUEST_ID));
will(returnValue(request));
oneOf(createRequestService).downloadRequest(with(same(request)),
with(same(response)));
} });
service.downloadRequest(REQUEST_ID, response);
}
@Test(expected = NoSuchCredentialException.class)
public void testDownloadRequestByIdWhenNotFound() throws Exception {
context.checking(new Expectations() { {
oneOf(requestRepository).findById(with(REQUEST_ID));
will(returnValue(null));
} });
service.downloadRequest(REQUEST_ID, response);
}
}
|
[
"ceharris@vt.edu"
] |
ceharris@vt.edu
|
5c1218a11008557461b9721fcf77dc2190097648
|
5dd84e9ca419ed669e11c236a845b0c1645cf180
|
/com/planet_ink/coffee_mud/MOBS/FireGiant.java
|
6711ca862e60947b81f2b783269dd427d32d80a1
|
[
"Apache-2.0"
] |
permissive
|
jmbflat/CoffeeMud
|
0ab169f8d473f0aa3534ffe3c0ae82ed9a221ec8
|
c6e48d89aa58332ae030904550442155e673488c
|
refs/heads/master
| 2023-02-16T04:21:26.845481
| 2021-01-09T01:36:11
| 2021-01-09T01:36:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,985
|
java
|
package com.planet_ink.coffee_mud.MOBS;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2001-2020 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class FireGiant extends StdMOB
{
@Override
public String ID()
{
return "FireGiant";
}
public FireGiant()
{
super();
final Random randomizer = new Random(System.currentTimeMillis());
_name="a Fire Giant";
setDescription("A tall humanoid standing about 18 feet tall, 12 foot chest, coal black skin and fire red-orange hair.");
setDisplayText("A Fire Giant ponders killing you.");
CMLib.factions().setAlignment(this,Faction.Align.EVIL);
setMoney(0);
basePhyStats.setWeight(6500 + Math.abs(randomizer.nextInt() % 1001));
baseCharStats().setStat(CharStats.STAT_INTELLIGENCE,8 + Math.abs(randomizer.nextInt() % 3));
baseCharStats().setStat(CharStats.STAT_STRENGTH,20);
baseCharStats().setStat(CharStats.STAT_DEXTERITY,13);
baseCharStats().setMyRace(CMClass.getRace("Giant"));
baseCharStats().getMyRace().startRacing(this,false);
basePhyStats().setDamage(20);
basePhyStats().setSpeed(1.0);
basePhyStats().setAbility(0);
basePhyStats().setLevel(15);
basePhyStats().setArmor(-10);
baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(),20,basePhyStats().level()));
addBehavior(CMClass.getBehavior("Aggressive"));
recoverMaxState();
resetToMaxState();
recoverPhyStats();
recoverCharStats();
}
@Override
public void recoverCharStats()
{
super.recoverCharStats();
charStats().setStat(CharStats.STAT_SAVE_FIRE,charStats().getStat(CharStats.STAT_SAVE_FIRE)+100);
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
959f1632f9344661a01a0e7a1c4cebabf1a5a2dd
|
ca1cdb090ac0b88a9a287583880fe5bf48a8a3b1
|
/src/jdbcStudy/JDBCUtil.java
|
b08d86249c55561109b863720eb79ad894b05b6b
|
[] |
no_license
|
Git-zhoujunjie/JDBC
|
8ecc9d1bb7a6e7379056ef25b25588e83a30ca39
|
3a2c55e43dfdb4a20480e7900790b90f85e618c8
|
refs/heads/master
| 2020-04-26T09:13:30.165537
| 2019-03-05T12:01:15
| 2019-03-05T12:01:15
| 173,448,302
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,459
|
java
|
package jdbcStudy;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Properties;
/**
* 封装代码
* 1、连接数据库
* 2、关闭连接流
* 3、读写配置文件
*/
public class JDBCUtil {
private JDBCUtil(){} //工具类的构造器应当私有化
private static Properties pros = null; //帮组读取和处理资源文件的信息
static{ //静态块,只有在加载JDBCUtil类时调用
pros = new Properties();
try {
pros.load(Thread.currentThread().
getContextClassLoader().
getResourceAsStream("db.properties"));
} catch (IOException e) {
e.printStackTrace();
}
}
public static Connection getMysqlConn(){
//加载驱动类
try {
Class.forName(pros.getProperty("JDBC_DRIVER"));
return DriverManager.getConnection(pros.getProperty("DB_URL"),
pros.getProperty("USER"), pros.getProperty("PWD"));
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static void close(AutoCloseable... stream) {
for (AutoCloseable c : stream) {
try {
if (c != null) {
c.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
|
[
"1160529743@qq.com"
] |
1160529743@qq.com
|
8e744e2ed27f69c6dcd572c7c5a90b273019175e
|
8b2a1da80f7cf21697a3f3f1c536ea78eb1c7998
|
/family_service_platform/src/main/java/com/zxf/bean/WyPropertyTakeoverSchema.java
|
65f952a146961c8208af6f8e5efd19fc04f63f12
|
[] |
no_license
|
zhang6132326/reps4
|
b7a6053e23d1bac4afeb766ad15f745e0877eaf6
|
078616768ba8f8c1d37f186b76972c8546eea449
|
refs/heads/master
| 2023-02-03T11:59:29.903891
| 2020-12-19T12:53:14
| 2020-12-19T12:53:14
| 322,591,549
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,149
|
java
|
package com.zxf.bean;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
/**
* <p>
* 物业接管概要; InnoDB free: 8192 kB
* </p>
*
* @author zxf
* @since 2020-09-19
*/
public class WyPropertyTakeoverSchema implements Serializable {
private static final long serialVersionUID=1L;
/**
* 接管单号
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 接管标题
*/
private String takeoverTitle;
/**
* 所属楼盘
*/
private Integer estateId;
/**
* 接管备注
*/
private String remark;
/**
* 创建人
*/
private String createPerson;
/**
* 创建日期
*/
private LocalDateTime createDate;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTakeoverTitle() {
return takeoverTitle;
}
public void setTakeoverTitle(String takeoverTitle) {
this.takeoverTitle = takeoverTitle;
}
public Integer getEstateId() {
return estateId;
}
public void setEstateId(Integer estateId) {
this.estateId = estateId;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getCreatePerson() {
return createPerson;
}
public void setCreatePerson(String createPerson) {
this.createPerson = createPerson;
}
public LocalDateTime getCreateDate() {
return createDate;
}
public void setCreateDate(LocalDateTime createDate) {
this.createDate = createDate;
}
@Override
public String toString() {
return "WyPropertyTakeoverSchema{" +
"id=" + id +
", takeoverTitle=" + takeoverTitle +
", estateId=" + estateId +
", remark=" + remark +
", createPerson=" + createPerson +
", createDate=" + createDate +
"}";
}
}
|
[
"6132326@qq.com"
] |
6132326@qq.com
|
80479f20e96caeb9b9deb586c16164513b6f31ed
|
83d56024094d15f64e07650dd2b606a38d7ec5f1
|
/sicc_druida/fuentes/java/CarGrupoSolicComboFormatter.java
|
c3dd935f9d696336d48e148044f7da2118853f6e
|
[] |
no_license
|
cdiglesias/SICC
|
bdeba6af8f49e8d038ef30b61fcc6371c1083840
|
72fedb14a03cb4a77f62885bec3226dbbed6a5bb
|
refs/heads/master
| 2021-01-19T19:45:14.788800
| 2016-04-07T16:20:51
| 2016-04-07T16:20:51
| null | 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 2,607
|
java
|
/*
INDRA/CAR/mmg
$Id: CarGrupoSolicComboFormatter.java,v 1.1 2009/12/03 18:34:02 pecbazalar Exp $
DESC
*/
/*
INDRA/CAR/mmg
$Id: CarGrupoSolicComboFormatter.java,v 1.1 2009/12/03 18:34:02 pecbazalar Exp $
fdsfdsf
DRUIDATARGET=/install/cvsiniciales
*/
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;
import java.util.Vector;
import es.indra.belcorp.mso.*;
import es.indra.druida.DruidaFormatoObjeto;
import es.indra.druida.belcorp.MMGDruidaFormatoObjeto;
import es.indra.druida.belcorp.MMGDruidaHelper;
import es.indra.mare.common.dto.IMareDTO;
import es.indra.utils.*;
/**
* Clase de formateo de objetos "CarGrupoSolic" para Druida
*
* @author Indra
*/
public class CarGrupoSolicComboFormatter extends MMGDruidaFormatoObjeto {
public CarGrupoSolicComboFormatter() {
}
public void formatea(String s, Object obj) throws Exception {
IMareDTO dto = (IMareDTO) obj;
Vector carGrupoSolicCombo = (Vector) dto.getProperty("result");
Vector result = new Vector();
//Ordenamos los elementos
//TreeMap orderBy = new TreeMap();
TreeMap orderBy = new TreeMap(new Comparador());
for(int i=0; i< carGrupoSolicCombo.size(); i++){
CarGrupoSolicData carGrupoSolicData = (CarGrupoSolicData)carGrupoSolicCombo.get(i);
String description = carGrupoSolicData.getCodGrupSoli() != null ?
FormatUtils.formatObject(carGrupoSolicData.getCodGrupSoli(),
MMGDruidaHelper.getUserDecimalFormatPattern(this),
MMGDruidaHelper.getUserDecimalFormatSymbols(this)) : "";
orderBy.put(description.toUpperCase(), carGrupoSolicData);
}
//Construimos cada fila con los valores de la clave y la descripción del elemento que se mostrará en el combo
for (Iterator it = orderBy.entrySet().iterator() ; it.hasNext();) {
CarGrupoSolicData carGrupoSolicData = (CarGrupoSolicData)((Map.Entry)it.next()).getValue();
Vector row = new Vector();
// Añadir la clave
Hashtable primaryKey = carGrupoSolicData.mmgGetPrimaryKey();
Enumeration keys = primaryKey.keys();
while (keys.hasMoreElements()) {
Object element = primaryKey.get(keys.nextElement());
row.add((element != null ? element.toString() : ""));
}
// Añadir el atributo choice
row.add((carGrupoSolicData.getCodGrupSoli() != null ?
FormatUtils.formatObject(carGrupoSolicData.getCodGrupSoli(),
MMGDruidaHelper.getUserDecimalFormatPattern(this),
MMGDruidaHelper.getUserDecimalFormatSymbols(this)) : ""));
result.add(row);
}
setCampo(s, result);
}
}
|
[
"hp.vega@hotmail.com"
] |
hp.vega@hotmail.com
|
a7d79b17049c84c673e958699bd15c98268aa62e
|
aaeb0ea812f3694521eda79171a2bf1fe4a25dbb
|
/app/src/main/java/com/ruguo/gupa/utils/DownloadUtils.java
|
ae82c4eef3557fb84e967263fb4580eaed787741
|
[] |
no_license
|
heboot/GUPA
|
5ec8296124e763a488cc46c14cc403cf824b5367
|
bbe92cf373eafc397debee6f77a04f21bdc38e4e
|
refs/heads/master
| 2020-11-25T17:45:13.106656
| 2019-12-18T06:59:33
| 2019-12-18T06:59:33
| 228,778,499
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,843
|
java
|
package com.ruguo.gupa.utils;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import androidx.core.content.FileProvider;
import com.ruguo.gupa.BuildConfig;
import java.io.File;
public class DownloadUtils {
// public DownloadTask doDownloadAPK(String url, String appName, DownloadListener listener) {
// DownloadTask task = new DownloadTask.Builder(url, SDCardUtils.getRootPathFilePath(), appName)
// // the minimal interval millisecond for callback progress
// .setMinIntervalMillisCallbackProcess(30)
// // do re-download even if the task has already been completed in the past.
// .setPassIfAlreadyCompleted(false)
// .build();
//
// task.enqueue(listener);
//
// return task;
//
//// cancel
//// task.cancel();
//
//// execute task synchronized
//// task.execute(listener);
// }
public static void installAPP(Context context, String url) {
// 核心是下面几句代码
Intent intent;
File file = new File(url);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Uri apkUri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".provider", file);
intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
intent.setData(apkUri);
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
context.startActivity(intent);
} else {
Uri apkUri = Uri.fromFile(file);
intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(apkUri, "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
}
}
|
[
"heboot@126.com"
] |
heboot@126.com
|
1752cb4663a929379503c81d961e8e9583a9431e
|
b86ea11b73fed747f7878ed7b0fa3d2f010f717f
|
/app/src/main/java/np/com/naxa/safercities/database/dao/PublicationsListDao.java
|
2d30dbb06628c9fd7407affef50dda38cb1114ac
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/Safer-Cities
|
dff751ccfbf002333feafbee0167b8cd5d002cdd
|
1caa62fd4c552eaf14e8269c0c37b12d6cf74286
|
refs/heads/master
| 2020-05-30T11:30:17.712238
| 2019-05-31T07:50:46
| 2019-05-31T07:50:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,353
|
java
|
package np.com.naxa.safercities.database.dao;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;
import java.util.List;
import io.reactivex.Flowable;
import np.com.naxa.safercities.publications.entity.PublicationsListDetails;
@Dao
public interface PublicationsListDao {
// LiveData is a data holder class that can be observed within a given lifecycle.
// Always holds/caches latest version of data. Notifies its active observers when the
// data has changed. Since we are getting all the contents of the database,
// we are notified whenever any of the database contents have changed.
@Query("SELECT * from PublicationsListDetails ORDER BY pid ASC")
Flowable<List<PublicationsListDetails>> getAllPublicationslsList();
@Query("SELECT * from PublicationsListDetails WHERE type LIKE :type")
Flowable<List<PublicationsListDetails>> getTypeWiseList(String type);
@Query("SELECT * from PublicationsListDetails WHERE name LIKE :name")
Flowable<List<PublicationsListDetails>> getNameWiseList(String name);
@Query("SELECT * from PublicationsListDetails WHERE name LIKE :name AND type LIKE :type")
Flowable<List<PublicationsListDetails>> getNameTypeWiseList(String name, String type);
@Query("SELECT DISTINCT name from PublicationsListDetails")
Flowable<List<String>> getDistinctNameList();
@Query("SELECT DISTINCT type from PublicationsListDetails")
Flowable<List<String>> getDistinctTypeist();
@Query("SELECT DISTINCT type from PublicationsListDetails WHERE name LIKE :name")
Flowable<List<String>> getDistinctTypeLIstFromName(String name);
// We do not need a conflict strategy, because the word is our primary key, and you cannot
// add two items with the same primary key to the database. If the table has more than one
// column, you can use @Insert(onConflict = OnConflictStrategy.REPLACE) to update a row.
@Insert(onConflict = OnConflictStrategy.REPLACE)
long insert(PublicationsListDetails PublicationsListDetails);
@Query("DELETE FROM PublicationsListDetails")
void deleteAll();
@Query("DELETE FROM PublicationsListDetails WHERE id LIKE :unique_id")
void deleteSpecific(String unique_id);
}
|
[
"samirdangal@gmail.com"
] |
samirdangal@gmail.com
|
ccc63c03f47d5c7647f52c004eb168857a02fc6f
|
aee5df69cd38887110c09d3d2bd723cb6e8987d6
|
/2.JavaCore/src/com/javarush/task/task15/task1530/TeaMaker.java
|
472eee8c6284fba3f4dc46f6c218a36ed0b3d3d8
|
[] |
no_license
|
siarheikorbut/JavaRush
|
5e98158ad71594b2ad1b41342b51df39517341fc
|
095690627248ed8cb4d2b1a3314c06333aef2235
|
refs/heads/master
| 2023-08-24T05:34:03.674176
| 2021-10-16T17:57:19
| 2021-10-16T17:57:19
| 306,656,990
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 407
|
java
|
package com.javarush.task.task15.task1530;
public class TeaMaker extends DrinkMaker {
@Override
void getRightCup() {
System.out.println("Берем чашку для чая");
}
@Override
void putIngredient() {
System.out.println("Насыпаем чай");
}
@Override
void pour() {
System.out.println("Заливаем кипятком");
}
}
|
[
"siarheikorbut@gmail.com"
] |
siarheikorbut@gmail.com
|
3ffef42101898b888c41cb7530f5991928b495ae
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/8/8_59161d8f0fba0a264fc84999232f38c7c51ae3cc/ProtegeParserFactory/8_59161d8f0fba0a264fc84999232f38c7c51ae3cc_ProtegeParserFactory_t.java
|
91e8d8625dcc58f945a7a4fa83a4da6f0eee73ea
|
[] |
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
| 7,749
|
java
|
/**
*
*/
package org.coode.oppl.protege;
import java.util.Set;
import org.coode.oppl.OPPLAbstractFactory;
import org.coode.oppl.OPPLParser;
import org.coode.oppl.OPPLParser.AbstractParserFactory;
import org.coode.parsers.DisposableOWLEntityChecker;
import org.coode.parsers.DisposableShortFormEntityChecker;
import org.coode.parsers.EntityFinder;
import org.coode.parsers.ErrorListener;
import org.coode.parsers.ShortFormEntityRenderer;
import org.coode.parsers.factory.SymbolTableFactory;
import org.coode.parsers.oppl.OPPLScope;
import org.coode.parsers.oppl.OPPLSymbolTable;
import org.protege.editor.core.Disposable;
import org.protege.editor.owl.OWLEditorKit;
import org.protege.editor.owl.model.event.OWLModelManagerChangeEvent;
import org.protege.editor.owl.model.event.OWLModelManagerListener;
import org.semanticweb.owlapi.expression.OWLEntityChecker;
import org.semanticweb.owlapi.model.OWLClass;
import org.semanticweb.owlapi.model.OWLDataProperty;
import org.semanticweb.owlapi.model.OWLDatatype;
import org.semanticweb.owlapi.model.OWLEntity;
import org.semanticweb.owlapi.model.OWLNamedIndividual;
import org.semanticweb.owlapi.model.OWLObjectProperty;
import org.semanticweb.owlapi.util.SimpleShortFormProvider;
/**
* @author Luigi Iannone
*
*/
public class ProtegeParserFactory implements AbstractParserFactory, Disposable {
private class ProtegeEntityFinder implements EntityFinder {
public Set<OWLDatatype> getMatchingOWLDataTypes(String match) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLDatatypes(
match);
}
public Set<OWLDatatype> getMatchingOWLDataTypes(String match, boolean fullRegExp) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLDatatypes(
match,
fullRegExp);
}
public Set<OWLEntity> getEntities(String match) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLEntities(
match);
}
public Set<OWLEntity> getEntities(String match, boolean fullRegExp) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLEntities(
match,
fullRegExp);
}
public Set<OWLClass> getMatchingOWLClasses(String match) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLClasses(
match);
}
public Set<OWLClass> getMatchingOWLClasses(String match, boolean fullRegExp) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLClasses(
match,
fullRegExp);
}
public Set<OWLObjectProperty> getMatchingOWLObjectProperties(String match) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLObjectProperties(
match);
}
public Set<OWLObjectProperty> getMatchingOWLObjectProperties(String match,
boolean fullRegExp) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLObjectProperties(
match,
fullRegExp);
}
public Set<OWLDataProperty> getMatchingOWLDataProperties(String match) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLDataProperties(
match);
}
public Set<OWLDataProperty> getMatchingOWLDataProperties(String match, boolean fullRegExp) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLDataProperties(
match,
fullRegExp);
}
public Set<OWLNamedIndividual> getMatchingOWLIndividuals(String match) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLIndividuals(
match);
}
public Set<OWLNamedIndividual> getMatchingOWLIndividuals(String match, boolean fullRegExp) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLEntityFinder().getMatchingOWLIndividuals(
match,
fullRegExp);
}
}
private class ProtegeSymbolTableFactory implements SymbolTableFactory<OPPLSymbolTable> {
public OPPLSymbolTable createSymbolTable() {
DisposableOWLEntityChecker entityChecker = new DisposableShortFormEntityChecker(
ProtegeParserFactory.this.getOWLEntityChecker());
ShortFormEntityRenderer entityRenderer = ProtegeParserFactory.this.getEntityRenderer();
EntityFinder entityFinder = ProtegeParserFactory.this.getEntityFinder();
return new OPPLSymbolTable(
new OPPLScope(entityChecker, entityFinder, entityRenderer),
ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getOWLDataFactory());
}
}
private class ProtegeOWLEntityRenderer extends ShortFormEntityRenderer {
public ProtegeOWLEntityRenderer() {
super(new SimpleShortFormProvider());
}
@Override
public String render(OWLEntity entity) {
return ProtegeParserFactory.this.getOWLEditorKit().getOWLModelManager().getRendering(
entity);
}
}
private static ProtegeParserFactory instance = null;
private final OWLEditorKit owlEditorKit;
private final ProtegeOWLEntityChecker protegeOWLEntityChecker;
private final EntityFinder protegeEntityFinder;
private final OPPLAbstractFactory opplFactory;
private final ShortFormEntityRenderer entityRenderer;
private static final OWLModelManagerListener modelManagerListener = new OWLModelManagerListener() {
public void handleChange(OWLModelManagerChangeEvent event) {
reset();
}
};
/**
* @param owlEditorKit
*/
private ProtegeParserFactory(OWLEditorKit owlEditorKit) {
assert owlEditorKit != null;
this.owlEditorKit = owlEditorKit;
this.owlEditorKit.getOWLModelManager().addListener(modelManagerListener);
this.protegeOWLEntityChecker = new ProtegeOWLEntityChecker(this.getOWLEditorKit());
this.protegeEntityFinder = new ProtegeEntityFinder();
this.opplFactory = new ProtegeOPPLFactory(this.getOWLEditorKit());
this.entityRenderer = new ProtegeOWLEntityRenderer();
this.owlEditorKit.put("ProtegeParserFactory", this);
}
/**
* @see org.coode.oppl.OPPLParser.AbstractParserFactory#build(org.coode.parsers
* .ErrorListener)
*/
public OPPLParser build(ErrorListener errorListener) {
SymbolTableFactory<OPPLSymbolTable> symbolTableFactory = new ProtegeSymbolTableFactory();
OPPLParser parser = new OPPLParser(this.getOPPLFactory(), errorListener, symbolTableFactory);
return parser;
}
public static ProtegeParserFactory getInstance(OWLEditorKit owlEditorKit) {
if (owlEditorKit == null) {
throw new NullPointerException("The OWLEditorKit cannot be null");
}
if (instance == null) {
instance = new ProtegeParserFactory(owlEditorKit);
}
return instance;
}
/**
* @return the owlEditorKit
*/
public OWLEditorKit getOWLEditorKit() {
return this.owlEditorKit;
}
public OWLEntityChecker getOWLEntityChecker() {
return this.protegeOWLEntityChecker;
}
public EntityFinder getEntityFinder() {
return this.protegeEntityFinder;
}
/**
* @return the opplFactory
*/
public OPPLAbstractFactory getOPPLFactory() {
return this.opplFactory;
}
/**
* @return the entityRenderer
*/
public ShortFormEntityRenderer getEntityRenderer() {
return this.entityRenderer;
}
public void dispose() {
this.owlEditorKit.getOWLModelManager().removeListener(modelManagerListener);
reset();
}
public static void reset() {
instance = null;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
c690241de8097835b4b491d7eb696d186720a784
|
76943449993b9a7aef4a1773f866b35c3a9dffe2
|
/projects/Java/src/proto/proto/OrderSide.java
|
b04e1876cc70246b884ebbdff600fca1cdce96f3
|
[
"MIT"
] |
permissive
|
ismiyati/FastBinaryEncoding
|
0a17ee4bf6e44c76b05835c54d44343fc9c5add2
|
e961feeb1ed897a8237f13f7fe3ef33828e5e56e
|
refs/heads/master
| 2020-05-31T14:40:55.525775
| 2019-05-31T11:06:24
| 2019-05-31T11:06:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,190
|
java
|
// Automatically generated by the Fast Binary Encoding compiler, do not modify!
// https://github.com/chronoxor/FastBinaryEncoding
// Source: proto.fbe
// Version: 1.3.0.0
package proto;
import java.io.*;
import java.lang.*;
import java.lang.reflect.*;
import java.math.*;
import java.nio.ByteBuffer;
import java.nio.charset.*;
import java.time.*;
import java.util.*;
import fbe.*;
public final class OrderSide implements Comparable<OrderSide>
{
public static final OrderSide buy = new OrderSide(OrderSideEnum.buy);
public static final OrderSide sell = new OrderSide(OrderSideEnum.sell);
private OrderSideEnum value = OrderSideEnum.values()[0];
public OrderSide() {}
public OrderSide(byte value) { setEnum(value); }
public OrderSide(OrderSideEnum value) { setEnum(value); }
public OrderSide(OrderSide value) { setEnum(value); }
public OrderSideEnum getEnum() { return value; }
public byte getRaw() { return value.getRaw(); }
public void setDefault() { setEnum((byte)0); }
public void setEnum(byte value) { this.value = OrderSideEnum.mapValue(value); }
public void setEnum(OrderSideEnum value) { this.value = value; }
public void setEnum(OrderSide value) { this.value = value.value; }
@Override
public int compareTo(OrderSide other)
{
if (value == null)
return -1;
if (other.value == null)
return 1;
return (int)(value.getRaw() - other.value.getRaw());
}
@Override
public boolean equals(Object other)
{
if (other == null)
return false;
if (!OrderSide.class.isAssignableFrom(other.getClass()))
return false;
final OrderSide enm = (OrderSide)other;
if ((value == null) || (enm.value == null))
return false;
if (value.getRaw() != enm.value.getRaw())
return false;
return true;
}
@Override
public int hashCode()
{
int hash = 17;
hash = hash * 31 + ((value != null) ? value.hashCode() : 0);
return hash;
}
@Override
public String toString() { return (value != null) ? value.toString() : "<unknown>"; }
}
|
[
"chronoxor@gmail.com"
] |
chronoxor@gmail.com
|
6876aa2f57fa65e8d2b4a5314ecd4e70405da8d4
|
b6451ee714c3d082e58424371a333802bebf2d3f
|
/src/main/java/delfos/experiment/validation/predictionvalidation/UserRecommendationRequest.java
|
f4e5e050e2ca58b9321b953ea28470005ae59ccb
|
[] |
no_license
|
jcastro-inf/delfos
|
1cde0f0bbd204164ff2b3c73baff56abdc4c3713
|
5e1e985ca3336e492e0bd75f7ee3362b839cfca0
|
refs/heads/master
| 2021-01-17T15:18:29.973673
| 2018-07-26T15:17:58
| 2018-07-26T15:17:58
| 44,369,613
| 2
| 1
| null | 2016-09-08T04:59:53
| 2015-10-16T07:32:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,914
|
java
|
/*
* Copyright (C) 2016 jcastro
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package delfos.experiment.validation.predictionvalidation;
import delfos.dataset.basic.item.Item;
import delfos.dataset.basic.loader.types.DatasetLoader;
import delfos.dataset.basic.rating.Rating;
import delfos.dataset.basic.user.User;
import java.util.Set;
/**
* Encapsula los resultados del protocolo de predicción para usuarios.
*
* @author jcastro-inf ( https://github.com/jcastro-inf )
* @param <RatingType>
*/
public class UserRecommendationRequest<RatingType extends Rating> {
private final DatasetLoader<RatingType> predictionPhaseDatasetLoader;
private final User user;
private final Set<Item> itemsToPredict;
public UserRecommendationRequest(
DatasetLoader<RatingType> predictionPhaseDatasetLoader,
User user,
Set<Item> itemsToPredict) {
this.predictionPhaseDatasetLoader = predictionPhaseDatasetLoader;
this.user = user;
this.itemsToPredict = itemsToPredict;
}
public Set<Item> getItemsToPredict() {
return itemsToPredict;
}
public DatasetLoader<RatingType> getPredictionPhaseDatasetLoader() {
return predictionPhaseDatasetLoader;
}
public User getUser() {
return user;
}
}
|
[
"jcastro@ujaen.es"
] |
jcastro@ujaen.es
|
f719bbdfc0d7c217ec069940f00c6645d4df1707
|
d0e73cda30de4ef0d66d07561c6f572a0f1d952f
|
/jspwiki-war/src/test/java/org/apache/wiki/i18n/InternationalizationManagerTest.java
|
d72d36e2292d3d42e96b99848deb18a96f5bc998
|
[
"Apache-2.0",
"MPL-2.0",
"BSD-2-Clause",
"CC-BY-2.5",
"DOC",
"LicenseRef-scancode-jdom",
"Apache-1.1",
"CPL-1.0",
"MPL-1.1",
"BSD-3-Clause",
"CDDL-1.0",
"MIT"
] |
permissive
|
managanesh/jspwiki
|
9846293491cacad90efe4c87dfe86a877172fcfe
|
a3c80aa35ba33f9097ce8e3cb44a155155493459
|
refs/heads/trunk
| 2023-04-28T04:42:27.121021
| 2015-08-20T08:54:26
| 2015-08-20T08:54:26
| 18,417,527
| 0
| 0
|
Apache-2.0
| 2023-04-15T18:43:39
| 2014-04-03T20:40:03
|
Java
|
UTF-8
|
Java
| false
| false
| 2,681
|
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.wiki.i18n;
import java.util.Locale;
import junit.framework.TestCase;
public class InternationalizationManagerTest extends TestCase
{
InternationalizationManager i18n = new InternationalizationManager( null );
protected void setUp() throws Exception
{
// enforce english locale as the default one. Otherwise, if your default locale is one
// of the given translations, ResourceBundle.getBundle(String, Locale.ENGLISH) will
// return the bundle of your locale, rather than returning the default -english- one
Locale.setDefault( Locale.ENGLISH );
}
public void testGetFromCoreWithArgs()
{
String str = i18n.get( InternationalizationManager.CORE_BUNDLE,
Locale.ENGLISH,
"security.error.cannot.rename",
"Test User" );
assertEquals( "Cannot rename: the login name 'Test User' is already taken.", str );
}
public void testGetFromDefTemplateWithArgs()
{
String str = i18n.get( InternationalizationManager.DEF_TEMPLATE,
Locale.ENGLISH,
"notification.createUserProfile.accept.content",
"JSPWiki", "testUser", "Test User", "test@user.com", "www.foo.com" );
assertEquals( "Congratulations! Your new profile on JSPWiki has been created. " +
"Your profile details are as follows: \n\n" +
"Login name: testUser \n" +
"Your name : Test User \n" +
"E-mail : test@user.com \n\n" +
"If you forget your password, you can reset it at www.foo.com",
str );
}
}
|
[
"juanpablo@apache.org"
] |
juanpablo@apache.org
|
0dcf84d3fefba5c8b362efccacb2af8849bc5599
|
8b9afd6d8ef17fae81f0ea47f8c6b47e457bf931
|
/src/main/java/act/conf/ConfigurationByteCodeScanner.java
|
2582f79ec5ed9aa2cbc63cf30eb79891c5c81909
|
[
"ISC",
"Apache-2.0",
"MIT"
] |
permissive
|
oshatrk/actframework
|
89749ca455bd9e8d33b7eb58bb216e36b034a5d9
|
3e055bba95ffc33eb4ec856712f99849847c5522
|
refs/heads/master
| 2020-06-22T04:25:07.677686
| 2019-07-02T22:38:08
| 2019-07-02T22:38:08
| 197,632,120
| 0
| 0
|
Apache-2.0
| 2019-07-18T17:45:11
| 2019-07-18T17:45:10
| null |
UTF-8
|
Java
| false
| false
| 6,936
|
java
|
package act.conf;
/*-
* #%L
* ACT Framework
* %%
* Copyright (C) 2014 - 2018 ActFramework
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import act.app.AppByteCodeScannerBase;
import act.app.event.SysEventId;
import act.asm.AnnotationVisitor;
import act.asm.FieldVisitor;
import act.asm.Type;
import act.inject.DefaultValue;
import act.inject.DependencyInjector;
import act.util.AsmTypes;
import act.util.ByteCodeVisitor;
import org.osgl.$;
import org.osgl.inject.BeanSpec;
import org.osgl.inject.annotation.Configuration;
import org.osgl.inject.loader.ConfigurationValueLoader;
import org.osgl.util.C;
import org.osgl.util.Const;
import org.osgl.util.E;
import org.osgl.util.S;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;
public class ConfigurationByteCodeScanner extends AppByteCodeScannerBase {
private static final String CONF_DESC = Type.getType(Configuration.class).getDescriptor();
private String className;
// map field name to configuration key
private Map<String, String> staticConfigurationFields = new HashMap<>();
@Override
protected boolean shouldScan(String className) {
return true;
}
@Override
protected void reset(String className) {
super.reset(className);
this.className = className;
staticConfigurationFields.clear();
}
@Override
public ByteCodeVisitor byteCodeVisitor() {
return new ByteCodeVisitor() {
@Override
public FieldVisitor visitField(int access, final String name, String desc, String signature, Object value) {
FieldVisitor fv = super.visitField(access, name, desc, signature, value);
boolean isStatic = AsmTypes.isStatic(access);
if (!isStatic) {
return fv;
}
final String fieldName = name;
return new FieldVisitor(ASM5, fv) {
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
AnnotationVisitor av = super.visitAnnotation(desc, visible);
if (S.eq(CONF_DESC, desc)) {
return new AnnotationVisitor(ASM5, av) {
@Override
public void visit(String name, Object value) {
staticConfigurationFields.put(fieldName, S.string(value));
super.visit(name, value);
}
};
}
return av;
}
};
}
};
}
@Override
public void scanFinished(final String className) {
E.unexpectedIf(S.neq(this.className, className), "oops");
if (staticConfigurationFields.isEmpty()) {
return;
}
final DependencyInjector injector = app().injector();
final Map<String, String> staticConfigurationFields = new HashMap<>(this.staticConfigurationFields);
app().jobManager().on(SysEventId.PRE_START, "ConfigurationByteCodeScanner:loadIntoStaticFieldsOf:" + className, new Runnable() {
@Override
public void run() {
Class<?> theClass = app().classForName(className);
for (Map.Entry<String, String> entry : staticConfigurationFields.entrySet()) {
String fieldName = entry.getKey();
String conf = entry.getValue();
Field field = $.fieldOf(theClass, fieldName, false);
DefaultValue defaultValue = field.getAnnotation(DefaultValue.class);
field.setAccessible(true);
Class<?> fieldType = field.getType();
boolean isConst = false;
boolean isVal = false;
BeanSpec valueSpec = BeanSpec.of(field, injector);
if (Const.class.isAssignableFrom(fieldType)) {
valueSpec = BeanSpec.of(field, injector).componentSpec();
isConst = true;
} else if ($.Val.class.isAssignableFrom(fieldType)) {
valueSpec = BeanSpec.of(field, injector).componentSpec();
isVal = true;
}
ConfigurationValueLoader loader = app().getInstance(ConfigurationValueLoader.class);
Map<String, String> map = C.newMap("value", conf);
if (null != defaultValue) {
map.put("defaultValue", defaultValue.value());
}
loader.init(map, valueSpec);
Object value = loader.get();
if (null == value) {
return;
}
try {
if (isConst) {
Const<?> fieldValue = $.cast(field.get(null));
if (null == fieldValue) {
fieldValue = $.constant(value);
field.set(null, fieldValue);
} else {
Field fv = Const.class.getDeclaredField("v");
fv.setAccessible(true);
fv.set(fieldValue, value);
}
} else if (isVal) {
$.Val<?> fieldValue = $.cast(field.get(null));
if (null == fieldValue) {
fieldValue = $.val(value);
field.set(null, fieldValue);
} else {
Field fv = $.Var.class.getDeclaredField("v");
fv.setAccessible(true);
fv.set(fieldValue, value);
}
} else {
field.set(null, value);
}
} catch (Exception e) {
throw E.unexpected(e, "failed to set configuration value[%s] to field[%s]", value, field);
}
}
}
});
}
}
|
[
"greenlaw110@gmail.com"
] |
greenlaw110@gmail.com
|
5faf8448185cee4c7583b075d0128659a6dcafcf
|
fc4b196567b8e0363adad4a11a11640194385ebb
|
/big_variable_tree/module28/src/main/java/module28packageJava0/Foo4.java
|
23526f3e6dc6f64ddcf23a8595fe3761c903a1a9
|
[] |
no_license
|
MaTriXy/android-projects
|
8c9e93233bfff6661c51d55438224883518f8c5b
|
53faf79ca3f39b16e48ddbd35a4a11470ed5fd03
|
refs/heads/master
| 2020-04-10T12:27:35.232439
| 2018-10-31T21:18:30
| 2018-10-31T21:18:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 516
|
java
|
package module28packageJava0;
public class Foo4 {
public void foo0() {
final Runnable anything = () -> System.out.println("anything");
new module28packageJava0.Foo3().foo3();
}
public void foo1() {
final Runnable anything = () -> System.out.println("anything");
foo0();
}
public void foo2() {
final Runnable anything = () -> System.out.println("anything");
foo1();
}
public void foo3() {
final Runnable anything = () -> System.out.println("anything");
foo2();
}
}
|
[
"jingwen@google.com"
] |
jingwen@google.com
|
e3a7533eeeb058a10c955d416017809890537c63
|
d0117f5ae9bb82df2b62ddd57bba3f8ffaa94186
|
/app/src/main/java/com/mypolice/poo/util/filecache/Util.java
|
fffade9f10edc3e12bcd39b888ebfd335a6b82b4
|
[] |
no_license
|
wjl7123093/poo
|
23e8126ae118c77c02442d398d3400db43727b5e
|
f7c4ab53f24088a39c4e2f76c037ac272636ef5f
|
refs/heads/master
| 2020-03-12T08:53:03.420554
| 2018-06-19T10:25:11
| 2018-06-19T10:25:11
| 130,538,683
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,099
|
java
|
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mypolice.poo.util.filecache;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.io.StringWriter;
import java.nio.charset.Charset;
/** Junk drawer of utility methods. */
final class Util {
static final Charset US_ASCII = Charset.forName("US-ASCII");
static final Charset UTF_8 = Charset.forName("UTF-8");
private Util() {
}
static String readFully(Reader reader) throws IOException {
try {
StringWriter writer = new StringWriter();
char[] buffer = new char[1024];
int count;
while ((count = reader.read(buffer)) != -1) {
writer.write(buffer, 0, count);
}
return writer.toString();
} finally {
reader.close();
}
}
/**
* Deletes the contents of {@code dir}. Throws an IOException if any file
* could not be deleted, or if {@code dir} is not a readable directory.
*/
static void deleteContents(File dir) throws IOException {
File[] files = dir.listFiles();
if (files == null) {
throw new IOException("not a readable directory: " + dir);
}
for (File file : files) {
if (file.isDirectory()) {
deleteContents(file);
}
if (!file.delete()) {
throw new IOException("failed to delete file: " + file);
}
}
}
static void closeQuietly(/* Auto */Closeable closeable) {
if (closeable != null) {
try {
closeable.close();
} catch (RuntimeException rethrown) {
throw rethrown;
} catch (Exception ignored) {
}
}
}
}
|
[
"wjl7123093@163.com"
] |
wjl7123093@163.com
|
d65de421b05d26321a780d6f57a23034ce485e29
|
13496701ebeafb7eb840f409d8d196f2a1dd20bf
|
/isuite-core-ui/src/main/java/gov/nwcg/isuite/core/rules/financial/OF288/HasEmployeeTypeRule.java
|
e57d0bdbfdce126cfa521f2c46234dc1908ff56f
|
[] |
no_license
|
paulduong222/development
|
9a79c65e79bdf3fb35e505355e7bd66652f3817c
|
ace0e056d7e6f2f056daa3dd34b7cdbea983612b
|
refs/heads/master
| 2023-01-09T23:01:17.546717
| 2019-09-19T21:49:27
| 2019-09-19T21:49:27
| 209,649,814
| 0
| 0
| null | 2023-01-07T09:56:09
| 2019-09-19T21:15:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,506
|
java
|
package gov.nwcg.isuite.core.rules.financial.OF288;
import gov.nwcg.isuite.core.vo.dialogue.DialogueVo;
import gov.nwcg.isuite.framework.core.rules.IRule;
import gov.nwcg.isuite.framework.exceptions.ServiceException;
import org.springframework.context.ApplicationContext;
public class HasEmployeeTypeRule extends AbstractInvoiceGenerationRule implements IRule {
public HasEmployeeTypeRule(ApplicationContext ctx, String rname)
{
super(ctx, rname);
}
/*
* (non-Javadoc)
* @see gov.nwcg.isuite.framework.core.rules.IRule#executeRules(gov.nwcg.isuite.core.vo.dialogue.DialogueVo)
*/
public int executeRules(DialogueVo dialogueVo) throws Exception {
try{
if(isCourseOfActionComplete(dialogueVo, ruleName))
return _OK;
/*
* Run rule check
*/
if(runRuleCheck(dialogueVo) == _FAIL) {
return _FAIL;
}
/*
* Rule check passed, mark as completed
*/
dialogueVo.getProcessedCourseOfActionVos()
.add(super.buildNoActionCoaVo(ruleName,true));
}catch(Exception e){
throw new ServiceException(e);
}
return _OK;
}
/**
* @param dialogueVo
* @return
*/
private int runRuleCheck(DialogueVo dialogueVo) throws Exception {
//TODO: implement rule if still applicable
return _OK;
}
/* (non-Javadoc)
* @see gov.nwcg.isuite.framework.core.rules.IRule#executePostProcessActions(gov.nwcg.isuite.core.vo.dialogue.DialogueVo)
*/
public void executePostProcessActions(DialogueVo dialogueVo) throws Exception {
}
}
|
[
"paulduong@yahoo.com"
] |
paulduong@yahoo.com
|
b4335b70cadf4dc93bc39a21ef7777dceef80844
|
f7363d13603eab6ae415f9bb5ed5bbb0e8a60ef8
|
/src/test/java/com/mrfahim/ecommapp/web/rest/UserJWTControllerIT.java
|
3e354bf6ac4d258532a1958430e8c3420e1b159e
|
[] |
no_license
|
jackdangca/EcommerceApp-JHipster-SpringBoot-React
|
d1551548e20e8b97bc2dc24a493b845a915d238c
|
70251ce8d4179a69c7e360c523ded617a664d2b9
|
refs/heads/master
| 2022-11-17T12:13:35.421979
| 2020-06-25T10:49:37
| 2020-06-25T10:49:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,167
|
java
|
package com.mrfahim.ecommapp.web.rest;
import static org.hamcrest.Matchers.emptyString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import com.mrfahim.ecommapp.EcommerceApp;
import com.mrfahim.ecommapp.domain.User;
import com.mrfahim.ecommapp.repository.UserRepository;
import com.mrfahim.ecommapp.web.rest.vm.LoginVM;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.transaction.annotation.Transactional;
/**
* Integration tests for the {@link UserJWTController} REST controller.
*/
@AutoConfigureMockMvc
@SpringBootTest(classes = EcommerceApp.class)
public class UserJWTControllerIT {
@Autowired
private UserRepository userRepository;
@Autowired
private PasswordEncoder passwordEncoder;
@Autowired
private MockMvc mockMvc;
@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(MediaType.APPLICATION_JSON).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(is(emptyString()))));
}
@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(MediaType.APPLICATION_JSON).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(is(emptyString()))));
}
@Test
public void testAuthorizeFails() throws Exception {
LoginVM login = new LoginVM();
login.setUsername("wrong-user");
login.setPassword("wrong password");
mockMvc
.perform(post("/api/authenticate").contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isUnauthorized())
.andExpect(jsonPath("$.id_token").doesNotExist())
.andExpect(header().doesNotExist("Authorization"));
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
6ec9cdba28b982229fdfbf95b2d674e5870aa32d
|
1c70988c8c88a1db634060792314d7cb1df840f4
|
/org.javabuilders.gtk/lib/src/org/gnome/gtk/VRuler.java
|
df356bc0b928d8b9e4671e97ad5886aa588884d3
|
[] |
no_license
|
Sebast91/javabuilders
|
c763f89f6b554870c186b858c75240a653218a90
|
44cb39db6ec0a80c0cf060716082816dbbb2e963
|
refs/heads/master
| 2021-01-17T16:22:30.345535
| 2009-03-26T02:13:37
| 2009-03-26T02:13:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,023
|
java
|
/*
* VRuler.java
*
* Copyright (c) 2007 Operational Dynamics Consulting Pty Ltd
*
* The code in this file, and the library it is a part of, are made available
* to you by the authors under the terms of the "GNU General Public Licence,
* version 2" plus the "Classpath Exception" (you may link to this code as a
* library into other programs provided you don't make a derivation of it).
* See the LICENCE file for the terms governing usage and redistribution.
*/
package org.gnome.gtk;
/*
* FIXME this is a placeholder stub for what will become the public API for
* this type. Replace this comment with appropriate javadoc including author
* and since tags. Note that the class may need to be made abstract, implement
* interfaces, or even have its parent changed. No API stability guarantees
* are made about this class until it has been reviewed by a hacker and this
* comment has been replaced.
*/
public class VRuler extends Ruler
{
protected VRuler(long pointer) {
super(pointer);
}
}
|
[
"jacek99@gmail.com"
] |
jacek99@gmail.com
|
23940a9ceb4d64b939402c228bfa54c76ab7d90f
|
96a1e3b146e35fd86482147c1f648865f9b4b94c
|
/TSS.Java/src/tss/tpm/TPMS_SESSION_AUDIT_INFO.java
|
36dfc0e42f6266f32326f7e04faa2b0e5d6b95a1
|
[
"MIT"
] |
permissive
|
CIPop/TSS.MSR
|
c496182503e8792c0a703369a7e8c181f5ccda45
|
66425274b1c93765678cc845865366d0e67829af
|
refs/heads/master
| 2021-08-23T01:14:06.776704
| 2017-12-01T06:25:03
| 2017-12-01T06:25:03
| 107,336,461
| 0
| 0
| null | 2017-10-17T23:53:09
| 2017-10-17T23:53:08
| null |
UTF-8
|
Java
| false
| false
| 3,174
|
java
|
package tss.tpm;
import tss.*;
// -----------This is an auto-generated file: do not edit
//>>>
/**
* This is the attested data for TPM2_GetSessionAuditDigest().
*/
public class TPMS_SESSION_AUDIT_INFO extends TpmStructure implements TPMU_ATTEST
{
/**
* This is the attested data for TPM2_GetSessionAuditDigest().
*
* @param _exclusiveSession current exclusive status of the session TRUE if all of the commands recorded in the sessionDigest were executed without any intervening TPM command that did not use this audit session
* @param _sessionDigest the current value of the session audit digest
*/
public TPMS_SESSION_AUDIT_INFO(byte _exclusiveSession,byte[] _sessionDigest)
{
exclusiveSession = _exclusiveSession;
sessionDigest = _sessionDigest;
}
/**
* This is the attested data for TPM2_GetSessionAuditDigest().
*/
public TPMS_SESSION_AUDIT_INFO() {};
/**
* current exclusive status of the session TRUE if all of the commands recorded in the sessionDigest were executed without any intervening TPM command that did not use this audit session
*/
public byte exclusiveSession;
/**
* size in octets of the buffer field; may be 0
*/
// private short sessionDigestSize;
/**
* the current value of the session audit digest
*/
public byte[] sessionDigest;
@Override
public void toTpm(OutByteBuf buf)
{
buf.write(exclusiveSession);
buf.writeInt((sessionDigest!=null)?sessionDigest.length:0, 2);
buf.write(sessionDigest);
return;
}
@Override
public void initFromTpm(InByteBuf buf)
{
exclusiveSession = (byte) buf.readInt(1);
int _sessionDigestSize = buf.readInt(2);
sessionDigest = new byte[_sessionDigestSize];
buf.readArrayOfInts(sessionDigest, 1, _sessionDigestSize);
}
@Override
public byte[] toTpm()
{
OutByteBuf buf = new OutByteBuf();
toTpm(buf);
return buf.getBuf();
}
public static TPMS_SESSION_AUDIT_INFO fromTpm (byte[] x)
{
TPMS_SESSION_AUDIT_INFO ret = new TPMS_SESSION_AUDIT_INFO();
InByteBuf buf = new InByteBuf(x);
ret.initFromTpm(buf);
if (buf.bytesRemaining()!=0)
throw new AssertionError("bytes remaining in buffer after object was de-serialized");
return ret;
}
public static TPMS_SESSION_AUDIT_INFO fromTpm (InByteBuf buf)
{
TPMS_SESSION_AUDIT_INFO ret = new TPMS_SESSION_AUDIT_INFO();
ret.initFromTpm(buf);
return ret;
}
@Override
public String toString()
{
TpmStructurePrinter _p = new TpmStructurePrinter("TPMS_SESSION_AUDIT_INFO");
toStringInternal(_p, 1);
_p.endStruct();
return _p.toString();
}
@Override
public void toStringInternal(TpmStructurePrinter _p, int d)
{
_p.add(d, "BYTE", "exclusiveSession", exclusiveSession);
_p.add(d, "byte", "sessionDigest", sessionDigest);
};
};
//<<<
|
[
"Andrey.Marochko@microsoft.com"
] |
Andrey.Marochko@microsoft.com
|
bb7abdbf54c7916881666a2f43409245139088b6
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2009-01-29/seasar2-2.4.34/seasar2/s2-framework/src/test/java/org/seasar/framework/container/factory/ClassPathResourceResolverTest.java
|
44f6495dd67750a45a6aacd6fa3d309224de5281
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,459
|
java
|
/*
* Copyright 2004-2009 the Seasar Foundation and the Others.
*
* 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.seasar.framework.container.factory;
import java.io.File;
import java.net.URL;
import junit.framework.TestCase;
import org.seasar.framework.env.Env;
import org.seasar.framework.util.ResourceUtil;
/**
* @author skirnir
*/
public class ClassPathResourceResolverTest extends TestCase {
private static final String PATH = "org/seasar/framework/container/factory/ClassPathResourceResolverTest.dicon";
private static final String PATH2 = "org/seasar/framework/container/factory/aaa.dicon";
private static final String ENV_PATH = "org/seasar/framework/container/factory/env.txt";
private ClassPathResourceResolver target = new ClassPathResourceResolver();
protected void tearDown() {
Env.initialize();
}
/**
* @throws Exception
*/
public void testToURL1() throws Exception {
URL actual = target.toURL(PATH);
assertNotNull(actual);
assertEquals(getClass().getClassLoader().getResource(PATH), actual);
}
/**
* @throws Exception
*/
public void testToURL2() throws Exception {
final URL expected = new File(ResourceUtil.getBuildDir(getClass()),
PATH).toURI().toURL();
URL actual = target.toURL(expected.toExternalForm());
assertNotNull(actual);
assertEquals(expected, actual);
}
/**
* @throws Exception
*/
public void testGetURL() throws Exception {
URL url = target.getURL(PATH2);
System.out.println(url.getPath());
assertTrue(url.getPath().endsWith("aaa.dicon"));
Env.setFilePath(ENV_PATH);
url = target.getURL(PATH2);
System.out.println(url.getPath());
assertTrue(url.getPath().endsWith("aaa_ut.dicon"));
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
2ac4655f83d70af2985644667060e3073acfb48b
|
ca57c3651db75069fcbbb7c5190e6a328331660e
|
/src/com/siwuxie095/forme/designpattern/summary/pattern5th/abstractfactory/example1st/PizzaIngredientFactoryInNewYork.java
|
6f26717825f09f8d421154b3f580edab83649683
|
[] |
no_license
|
gouyanzhan/HelloWorld
|
f915ec8eabf8878b0c01fb8ec29b869e6fd68c5f
|
8cd9dc117d301d10207690052f2f27de2d9b9e2c
|
refs/heads/master
| 2022-03-25T07:31:52.842092
| 2022-03-11T07:08:30
| 2022-03-11T07:08:30
| 164,224,001
| 1
| 1
| null | 2019-01-07T14:18:44
| 2019-01-05T14:52:23
|
Java
|
UTF-8
|
Java
| false
| false
| 660
|
java
|
package com.siwuxie095.forme.designpattern.summary.pattern5th.abstractfactory.example1st;
/**
* 纽约风味的比萨原料工厂
*
* @author Jiajing Li
* @date 2019-10-14 14:59:36
*/
class PizzaIngredientFactoryInNewYork implements PizzaIngredientFactory {
/*
* 对于原料家族内的每一种原料,都提供了纽约的版本。
*/
@Override
public Dough createDough() {
return new DoughInNewYork();
}
@Override
public Sauce createSauce() {
return new SauceInNewYork();
}
@Override
public Topping[] createToppings() {
return new Topping[] {new ToppingInNewYork()};
}
}
|
[
"834879583@qq.com"
] |
834879583@qq.com
|
fe6e0ba8ce3e4917aa65ffa3f49545c2c8544a8e
|
3cd69da4d40f2d97130b5bf15045ba09c219f1fa
|
/sources/com/google/firebase/database/core/view/EventGenerator.java
|
00038b17ab7d39ef3e158baa2a2cc9c295086bba
|
[] |
no_license
|
TheWizard91/Album_base_source_from_JADX
|
946ea3a407b4815ac855ce4313b97bd42e8cab41
|
e1d228fc2ee550ac19eeac700254af8b0f96080a
|
refs/heads/master
| 2023-01-09T08:37:22.062350
| 2020-11-11T09:52:40
| 2020-11-11T09:52:40
| 311,927,971
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,041
|
java
|
package com.google.firebase.database.core.view;
import com.google.firebase.database.core.EventRegistration;
import com.google.firebase.database.core.view.Event;
import com.google.firebase.database.snapshot.Index;
import com.google.firebase.database.snapshot.IndexedNode;
import com.google.firebase.database.snapshot.NamedNode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
public class EventGenerator {
/* access modifiers changed from: private */
public final Index index;
private final QuerySpec query;
public EventGenerator(QuerySpec query2) {
this.query = query2;
this.index = query2.getIndex();
}
private void generateEventsForType(List<DataEvent> events, Event.EventType type, List<Change> changes, List<EventRegistration> eventRegistrations, IndexedNode eventCache) {
List<Change> filteredChanges = new ArrayList<>();
for (Change change : changes) {
if (change.getEventType().equals(type)) {
filteredChanges.add(change);
}
}
Collections.sort(filteredChanges, changeComparator());
for (Change change2 : filteredChanges) {
for (EventRegistration registration : eventRegistrations) {
if (registration.respondsTo(type)) {
events.add(generateEvent(change2, registration, eventCache));
}
}
}
}
private DataEvent generateEvent(Change change, EventRegistration registration, IndexedNode eventCache) {
Change newChange;
if (change.getEventType().equals(Event.EventType.VALUE) || change.getEventType().equals(Event.EventType.CHILD_REMOVED)) {
newChange = change;
} else {
newChange = change.changeWithPrevName(eventCache.getPredecessorChildName(change.getChildKey(), change.getIndexedNode().getNode(), this.index));
}
return registration.createEvent(newChange, this.query);
}
public List<DataEvent> generateEventsForChanges(List<Change> changes, IndexedNode eventCache, List<EventRegistration> eventRegistrations) {
ArrayList arrayList = new ArrayList();
List<Change> moves = new ArrayList<>();
for (Change change : changes) {
if (change.getEventType().equals(Event.EventType.CHILD_CHANGED) && this.index.indexedValueChanged(change.getOldIndexedNode().getNode(), change.getIndexedNode().getNode())) {
moves.add(Change.childMovedChange(change.getChildKey(), change.getIndexedNode()));
}
}
ArrayList arrayList2 = arrayList;
List<Change> list = changes;
List<EventRegistration> list2 = eventRegistrations;
IndexedNode indexedNode = eventCache;
generateEventsForType(arrayList2, Event.EventType.CHILD_REMOVED, list, list2, indexedNode);
generateEventsForType(arrayList2, Event.EventType.CHILD_ADDED, list, list2, indexedNode);
generateEventsForType(arrayList2, Event.EventType.CHILD_MOVED, moves, list2, indexedNode);
List<Change> list3 = changes;
generateEventsForType(arrayList2, Event.EventType.CHILD_CHANGED, list3, list2, indexedNode);
generateEventsForType(arrayList2, Event.EventType.VALUE, list3, list2, indexedNode);
return arrayList;
}
private Comparator<Change> changeComparator() {
return new Comparator<Change>() {
static final /* synthetic */ boolean $assertionsDisabled = false;
static {
Class<EventGenerator> cls = EventGenerator.class;
}
public int compare(Change a, Change b) {
if (a.getChildKey() == null || b.getChildKey() == null) {
throw new AssertionError();
}
return EventGenerator.this.index.compare(new NamedNode(a.getChildKey(), a.getIndexedNode().getNode()), new NamedNode(b.getChildKey(), b.getIndexedNode().getNode()));
}
};
}
}
|
[
"agiapong@gmail.com"
] |
agiapong@gmail.com
|
70db0a0d0579dcb3b45d158268ca64918c5e49d5
|
821b2fcbceb73fcc51aba44ecb4038ea6323ad24
|
/small-spring-step-12/src/main/java/cn/bugstack/springframework/beans/factory/support/DefaultSingletonBeanRegistry.java
|
9430360244fb50f5578fcf860fb806f0493839da
|
[
"Apache-2.0"
] |
permissive
|
kaixuanzhang123/small-spring
|
8b1dd2b9364ea12219b26a87f769d689015db569
|
9aa0785034639fb85360c368e1e051ef13c02590
|
refs/heads/main
| 2023-07-04T16:12:59.578319
| 2021-08-12T11:54:22
| 2021-08-12T11:54:22
| 390,183,556
| 1
| 0
|
Apache-2.0
| 2021-08-12T11:54:23
| 2021-07-28T02:13:39
| null |
UTF-8
|
Java
| false
| false
| 2,047
|
java
|
package cn.bugstack.springframework.beans.factory.support;
import cn.bugstack.springframework.beans.BeansException;
import cn.bugstack.springframework.beans.factory.DisposableBean;
import cn.bugstack.springframework.beans.factory.config.SingletonBeanRegistry;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
* 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获!
* 公众号:bugstack虫洞栈
* Create by 小傅哥(fustack)
*/
public class DefaultSingletonBeanRegistry implements SingletonBeanRegistry {
/**
* Internal marker for a null singleton object:
* used as marker value for concurrent Maps (which don't support null values).
*/
protected static final Object NULL_OBJECT = new Object();
private Map<String, Object> singletonObjects = new ConcurrentHashMap<>();
private final Map<String, DisposableBean> disposableBeans = new LinkedHashMap<>();
@Override
public Object getSingleton(String beanName) {
return singletonObjects.get(beanName);
}
public void registerSingleton(String beanName, Object singletonObject) {
singletonObjects.put(beanName, singletonObject);
}
public void registerDisposableBean(String beanName, DisposableBean bean) {
disposableBeans.put(beanName, bean);
}
public void destroySingletons() {
Set<String> keySet = this.disposableBeans.keySet();
Object[] disposableBeanNames = keySet.toArray();
for (int i = disposableBeanNames.length - 1; i >= 0; i--) {
Object beanName = disposableBeanNames[i];
DisposableBean disposableBean = disposableBeans.remove(beanName);
try {
disposableBean.destroy();
} catch (Exception e) {
throw new BeansException("Destroy method on bean with name '" + beanName + "' threw an exception", e);
}
}
}
}
|
[
"184172133@qq.com"
] |
184172133@qq.com
|
e57bd69e2db790f970ef558ae6e703a2953b8dc0
|
46d7ae974a4940bf944b70ba4e593ac129477109
|
/src/main/java/io/swagger/client/model/IoK8sKubernetesPkgApiV1PersistentVolumeClaimStatus.java
|
c4df1f43e37f8204d00530eac569c63d1cdc4a61
|
[] |
no_license
|
ShivanshVij/Kubernetes-Java-GSON-Library
|
e7a0222323baa864c4231fca424b5dea7a7e5db9
|
c9303fd8d7744e131b9acbb9cd18d70dc6299943
|
refs/heads/master
| 2020-05-22T23:42:23.749276
| 2019-05-14T06:32:50
| 2019-05-14T06:32:50
| 186,558,997
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,326
|
java
|
/*
* Kubernetes
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.13.5
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import java.util.Arrays;
/**
* IoK8sKubernetesPkgApiV1PersistentVolumeClaimStatus
*/
public class IoK8sKubernetesPkgApiV1PersistentVolumeClaimStatus {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IoK8sKubernetesPkgApiV1PersistentVolumeClaimStatus {\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"shivanshvij@outlook.com"
] |
shivanshvij@outlook.com
|
dc713a1c965e1f893734ae395d261e90322f73d9
|
18eb42fab8644a34afc17aedc76d4c45dbe5d375
|
/Final_Maksimovich_v2/src/by/epam/totalizator/bean/build/TournamentBuilder.java
|
47a8a233f36b8ce85f90641219206e02cacdaf52
|
[] |
no_license
|
oleggye/Java11_16_Maksimovich
|
8223d210145552d5dc0889d86a2cb31974d1051c
|
f258914500141d43a84c6e1fb06de581abb41cf3
|
refs/heads/master
| 2021-01-11T20:38:03.197997
| 2017-05-30T06:34:41
| 2017-05-30T06:34:41
| 79,159,014
| 0
| 2
| null | 2017-01-20T12:06:32
| 2017-01-16T21:01:08
|
Java
|
UTF-8
|
Java
| false
| false
| 758
|
java
|
package by.epam.totalizator.bean.build;
import by.epam.totalizator.bean.Sport;
import by.epam.totalizator.bean.Tournament;
/**
*
* Realization of builder pattern for Tournament bean {@link Tournament}
*
*/
public final class TournamentBuilder {
private int id;
private String name;
private Sport sport;
public Tournament build() {
Tournament tournament = new Tournament();
tournament.setId(id);
tournament.setName(name);
tournament.setSport(sport);
return tournament;
}
public TournamentBuilder buildId(int id) {
this.id = id;
return this;
}
public TournamentBuilder buildName(String name) {
this.name = name;
return this;
}
public TournamentBuilder buildSport(Sport sport) {
this.sport = sport;
return this;
}
}
|
[
"4ydak2008@gmail.com"
] |
4ydak2008@gmail.com
|
54fa86dfa7ad7d2362c112a94c2d953c2d222932
|
027cd7112ef70fbcdb2670a009654f360bb7e06e
|
/org/eclipse/swt/events/ExpandListener.java
|
8ec59f0bc4d8633b64ecc39849019dab82eea853
|
[] |
no_license
|
code4ghana/courseScheduler
|
1c968ebc249a75661bdc22075408fc60e6d0df19
|
9885df3638c6b287841f8a7b751cfe1523a68fb2
|
refs/heads/master
| 2016-08-03T14:06:38.715664
| 2014-08-03T03:37:36
| 2014-08-03T03:37:36
| 22,566,289
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 473
|
java
|
package org.eclipse.swt.events;
import org.eclipse.swt.internal.SWTEventListener;
public abstract interface ExpandListener extends SWTEventListener
{
public abstract void itemCollapsed(ExpandEvent paramExpandEvent);
public abstract void itemExpanded(ExpandEvent paramExpandEvent);
}
/* Location: /Users/jeff.kusi/Downloads/AutomatedScheduler - Fakhry & Kusi.jar
* Qualified Name: org.eclipse.swt.events.ExpandListener
* JD-Core Version: 0.6.2
*/
|
[
"jeff.kusi@willowtreeapps.com"
] |
jeff.kusi@willowtreeapps.com
|
9efbb0c3acb8ebe8d67ceac0f1aa860fbedf5a91
|
31724b234ccbc30ab4f5274279e5ef4bfce0a18b
|
/mat-plugin/src/com/github/vlsi/mat/optiq/Query.java
|
41322fdb44b097d0be91c324d0ea00d74c0d4927
|
[
"Apache-2.0"
] |
permissive
|
vlsi/optiq-mat-plugin
|
78e2d51848523acdcededfa38d2bf5711bbeb214
|
added1fd183e72d1d7b6f5310a3282ec56dca336
|
refs/heads/master
| 2021-01-01T18:42:01.312545
| 2014-11-02T15:19:22
| 2014-11-02T15:19:22
| 16,053,745
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,328
|
java
|
package com.github.vlsi.mat.optiq;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.sql.rowset.CachedRowSet;
import javax.sql.rowset.RowSetFactory;
import javax.sql.rowset.RowSetProvider;
import org.eclipse.mat.query.IQuery;
import org.eclipse.mat.query.IResult;
import org.eclipse.mat.query.annotations.Argument;
import org.eclipse.mat.query.annotations.Category;
import org.eclipse.mat.query.annotations.CommandName;
import org.eclipse.mat.query.annotations.Name;
import org.eclipse.mat.snapshot.ISnapshot;
import org.eclipse.mat.util.IProgressListener;
@Name("SQL via optiq")
@Category("SQL")
@CommandName("optiq")
public class Query implements IQuery {
@Argument
public ISnapshot snapshot;
@Argument(flag = Argument.UNFLAGGED)
public String sql;
@Override
public IResult execute(IProgressListener listener) throws Exception {
Connection con = null;
Statement st = null;
ResultSet rs = null;
try {
con = OptiqDataSource.getConnection(snapshot);
st = con.createStatement();
rs = st.executeQuery(sql);
RowSetFactory rowSetFactory = RowSetProvider.newFactory();
CachedRowSet rowSet = rowSetFactory.createCachedRowSet();
rowSet.populate(rs);
return new RowSetTable(rowSet);
} finally {
OptiqDataSource.close(rs, st, con);
}
}
}
|
[
"sitnikov.vladimir@gmail.com"
] |
sitnikov.vladimir@gmail.com
|
e2291722dd76ea4e1fe067e26bd31f9816178f9d
|
0a8e84b18a5d328a4926ca5a2d0325b9471c9a72
|
/tmql4j-hibernate/src/main/java/de/topicmapslab/tmql4j/hibernate/path/function/MaxFunction.java
|
9ef5f07900a26e0bf1020d93fb98a6b6b43ecc1e
|
[] |
no_license
|
tmlab/tmql
|
5b2204c416852661320ee449fb501dd194c128e0
|
45a537d433ba3ab45808f1aa6446ba5ac2bcfb8e
|
refs/heads/master
| 2021-01-10T02:40:07.473546
| 2011-04-29T09:16:50
| 2011-04-29T09:16:50
| 36,683,495
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 955
|
java
|
/**
*
*/
package de.topicmapslab.tmql4j.hibernate.path.function;
import de.topicmapslab.tmql4j.hibernate.IQueryPart;
/**
* @author Sven Krosse
*
*/
public class MaxFunction extends FunctionImpl {
/**
* constructor
*
* @param context
* the context of counting
* @param condition
* the condition
*/
public MaxFunction(final IQueryPart context, final IQueryPart condition) {
addArgument(context);
addArgument(condition);
}
/**
* {@inheritDoc}
*/
@Override
protected String getFunctionName() {
return de.topicmapslab.tmql4j.path.grammar.functions.aggregate.MaxFunction.IDENTIFIER;
}
/**
* {@inheritDoc}
*/
@Override
public MaxFunction clone() throws CloneNotSupportedException {
IQueryPart context = getArguments().get(0).clone();
IQueryPart condition = getArguments().get(1).clone();
return new MaxFunction(context, condition);
}
}
|
[
"hoyer@localhost"
] |
hoyer@localhost
|
c6a25ab4ee4a305c13a840ff77afe69036efabe1
|
9f25cdd9b47fcb19b68b03a8ae8c44619581d852
|
/day03/src/com/igeek/Demo04.java
|
f4702b450fadb23a8349c8cc9ce0fd58db35eccd
|
[] |
no_license
|
CHENGSISHUO/wxthxy
|
ea831e6eab975e32d916994463532796864c94ae
|
3845c61e5da36df29b7153505b9097044a562100
|
refs/heads/master
| 2020-07-24T03:57:42.805259
| 2019-09-11T09:20:22
| 2019-09-11T09:20:22
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,070
|
java
|
package com.igeek;
import java.util.Scanner;
/**
* @author zx
* @version 1.0
* @description:
* 需求:键盘录入数据,要求数据是四位的整数,现需要对数据进行加密,加密规则如下:
* 每位数字都加上5,然后除以10的余数代替该数字,
* 再将第一位和第四位交换,第二位和第三位交换,
* 请把加密后的数据输出到控制台
*/
public class Demo04 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入是四位的整数:");
int num = scanner.nextInt();
int[] arr = new int[4];
int ge = num%10;
int shi = num/10%10;
int bai = num/10/10%10;
int qian = num/10/10/10%10;
arr[0] = ge;
arr[1] = shi;
arr[2] = bai;
arr[3] = qian;
for (int i = 0; i < arr.length; i++) {
arr[i] += 5;
arr[i] %= 10;
}
int temp = arr[0];
arr[0] = arr[3];
arr[3] = temp;
int temp2 = arr[1];
arr[1] = arr[2];
arr[2] = temp2;
for (int i = 0; i < arr.length; i++) {
System.out.println(arr[i]);
}
}
}
|
[
"875494325@qq.com"
] |
875494325@qq.com
|
05855598c37496c011b04415795b493b904a7ef6
|
9f9781df52c2d00e61c5abeb86f90d5394316b4a
|
/gen/org/intellij/xquery/psi/impl/XQueryDirPIConstructorImpl.java
|
d4c3be1f8245b02834403af29e1f5280972d73e7
|
[
"Apache-2.0"
] |
permissive
|
jmakeig/intellij-xquery
|
da234a65967b40abe2e9e57c71ac8ec6363238ba
|
c0c99dc3e03f915b5204d7964bc0bbd22f055351
|
refs/heads/master
| 2021-01-13T12:56:49.859079
| 2017-01-09T16:17:19
| 2017-01-09T16:17:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,666
|
java
|
/*
* Copyright 2013-2016 Grzegorz Ligas <ligasgr@gmail.com> and other contributors
* (see the CONTRIBUTORS file).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// This is a generated file. Not intended for manual editing.
package org.intellij.xquery.psi.impl;
import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import static org.intellij.xquery.psi.XQueryTypes.*;
import org.intellij.xquery.psi.*;
public class XQueryDirPIConstructorImpl extends XQueryPsiElementImpl implements XQueryDirPIConstructor {
public XQueryDirPIConstructorImpl(ASTNode node) {
super(node);
}
public void accept(@NotNull XQueryVisitor visitor) {
visitor.visitDirPIConstructor(this);
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof XQueryVisitor) accept((XQueryVisitor)visitor);
else super.accept(visitor);
}
@Override
@Nullable
public XQueryDirPIContents getDirPIContents() {
return findChildByClass(XQueryDirPIContents.class);
}
}
|
[
"ligasgr@gmail.com"
] |
ligasgr@gmail.com
|
c5c2597e310eb0e880f56d020b4f9a23d8ddb924
|
c0b312c7418f22ccbe1b1b3358667838e00b6243
|
/src/com/gridscape/sep/org/zigbee/sep/VoltageRMS.java
|
b154732644c7f2d8c2e1c01ddf2744397e3eb708
|
[] |
no_license
|
rahul-me/e-ope
|
cb8005ad93dfe9b5b2f792379f33b678c1bc76a3
|
3b2e76c3c0109ab10eb2caf013ed541ed54fb260
|
refs/heads/master
| 2022-04-16T18:17:45.953574
| 2020-04-10T17:44:41
| 2020-04-10T17:44:41
| 254,696,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,979
|
java
|
package com.gridscape.sep.org.zigbee.sep;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* Average electric potential difference between two points.
*
* <p>Java class for VoltageRMS complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="VoltageRMS">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="multiplier" type="{http://zigbee.org/sep}PowerOfTenMultiplierType"/>
* <element name="value" type="{http://zigbee.org/sep}UInt16"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VoltageRMS", propOrder = {
"multiplier",
"value"
})
public class VoltageRMS {
@XmlElement(required = true)
protected PowerOfTenMultiplierType multiplier;
protected int value;
/**
* Gets the value of the multiplier property.
*
* @return
* possible object is
* {@link PowerOfTenMultiplierType }
*
*/
public PowerOfTenMultiplierType getMultiplier() {
return multiplier;
}
/**
* Sets the value of the multiplier property.
*
* @param value
* allowed object is
* {@link PowerOfTenMultiplierType }
*
*/
public void setMultiplier(PowerOfTenMultiplierType value) {
this.multiplier = value;
}
/**
* Gets the value of the value property.
*
*/
public int getValue() {
return value;
}
/**
* Sets the value of the value property.
*
*/
public void setValue(int value) {
this.value = value;
}
}
|
[
"crahul10101991@gmail.com"
] |
crahul10101991@gmail.com
|
7faa853871b33ff56acd58c15ab7ce2fc92006b2
|
a2c14baf96ebdf52260fbd649857d45a02bdd0c9
|
/libs/de-persistence/src/main/java/org/iplantc/persistence/dao/listing/AnalysisListingDao.java
|
b50c9a2ec2df7d235d6d07ebc880ab7157c55f3e
|
[] |
no_license
|
clojens/DiscoveryEnvironmentBackend
|
44a48fe41ede80eb7b6d4021ba6524f9c9dcf452
|
4138f702a9107f73ac9f6e191c45b4587edea9ed
|
refs/heads/master
| 2020-04-06T06:58:55.306291
| 2014-07-18T17:38:07
| 2014-07-18T17:49:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 523
|
java
|
package org.iplantc.persistence.dao.listing;
import org.iplantc.persistence.dao.GenericDao;
import org.iplantc.persistence.dto.listing.AnalysisListing;
/**
* @author Dennis Roberts
*/
public interface AnalysisListingDao extends GenericDao<AnalysisListing> {
/**
* Finds an analysis listing using the external identifier.
*
* @param id the identifier.
* @return the analysis listing or null if the analysis listing isn't found.
*/
public AnalysisListing findByExternalId(String id);
}
|
[
"jstroot@iplantcollaborative.org"
] |
jstroot@iplantcollaborative.org
|
cea30fe6557cae7b8810364464c7221ae10f0ac6
|
e46d8e8fd1848a93472d9b8a50335cfc422a87c6
|
/src/main/java/com/netsuite/webservices/lists/support_2018_1/SupportCaseSolutionsList.java
|
46265192bb4e3a2c318867c9e8e0f3604f65c819
|
[] |
no_license
|
djXplosivo/suitetalk-webservices
|
6d0f1737c52c566fde07eb6e008603b3c271d8d1
|
bff927f0acb45e772a5944272d0f7d55b87caf2a
|
refs/heads/master
| 2020-03-28T02:56:52.772003
| 2018-09-06T02:52:57
| 2018-09-06T02:52:57
| 147,608,548
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,728
|
java
|
package com.netsuite.webservices.lists.support_2018_1;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for SupportCaseSolutionsList complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SupportCaseSolutionsList">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="solutions" type="{urn:support_2018_1.lists.webservices.netsuite.com}SupportCaseSolutions" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="replaceAll" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SupportCaseSolutionsList", propOrder = {
"solutions"
})
public class SupportCaseSolutionsList {
protected List<SupportCaseSolutions> solutions;
@XmlAttribute(name = "replaceAll")
protected Boolean replaceAll;
/**
* Gets the value of the solutions property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the solutions property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSolutions().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SupportCaseSolutions }
*
*
*/
public List<SupportCaseSolutions> getSolutions() {
if (solutions == null) {
solutions = new ArrayList<SupportCaseSolutions>();
}
return this.solutions;
}
/**
* Gets the value of the replaceAll property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isReplaceAll() {
if (replaceAll == null) {
return true;
} else {
return replaceAll;
}
}
/**
* Sets the value of the replaceAll property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setReplaceAll(Boolean value) {
this.replaceAll = value;
}
}
|
[
"ccolon@git.eandjmedia.com"
] |
ccolon@git.eandjmedia.com
|
269d420adb8d71513135bb44c307838fd4733223
|
6471e8d82fdb5ebf5458bc85c85f9fbedb42218d
|
/src/main/java/component/alarm/response/AlarmResponseType.java
|
353d2064e55b86a9e58dd9b192a06dba50ff8ef3
|
[] |
no_license
|
mankicho/split
|
7e2ffd3246743c808bdee6f70dd917be30d7395a
|
86372e6ec9da23b549d6106de41e6a11eb5b6dd3
|
refs/heads/master
| 2023-07-16T03:35:25.925976
| 2021-09-03T11:22:24
| 2021-09-03T11:22:24
| 307,864,886
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 585
|
java
|
package component.alarm.response;
public enum AlarmResponseType {
SuccessFulUpdateData(202, "successful update data"),
SuccessFulDeleteData(203, "successful delete data"),
NoDataToUpdate(204, "there is no data to update"),
ServerError(500, "server error"),
DontHaveTheAlarm(501, "you have not the alarm");
int status;
String msg;
AlarmResponseType(int status, String msg) {
this.status = status;
this.msg = msg;
}
public int getStatus() {
return status;
}
public String getMsg() {
return msg;
}
}
|
[
"skxz123@gmail.com"
] |
skxz123@gmail.com
|
fc94ef3f0859b1bea59ef0304ccee0222a111fe1
|
f5895157c00f15425770d115ae3ba197a6d159a8
|
/src/main/java/hd/car/dao/carmgmt/InsuranceDao.java
|
242c54bbbc4e2b1237b3a8956f1a00919f9e013b
|
[] |
no_license
|
qh870754310/car
|
df62294b6de2f678d964cd1f27e17688838db1ae
|
7a068996b8e0f847664eaef91f692cd9b8e9449f
|
refs/heads/master
| 2020-04-24T00:44:26.737237
| 2019-02-20T01:07:47
| 2019-02-20T01:07:47
| 171,440,802
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 464
|
java
|
package hd.car.dao.carmgmt;
import hd.car.model.carmgmt.Insurance;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 保险记录-数据访问接口
* Created by jumpa on 2018/10/30 15:15.
*/
@Repository
public interface InsuranceDao {
int add(Insurance insurance);
int modify(Insurance insurance);
int del(String id);
List<Insurance> get(Map param);
Insurance getById(String id);
}
|
[
"870754310@qq.com"
] |
870754310@qq.com
|
069ab8d1430617567866bc749aa61fc1b5590811
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/annotatedStaticMemberQualifyingType/beforeNestedMultipleAnnotatedTypeParameterMoveFirst.java
|
53e9fcc9e7ea48aec00c59450d2856cc25942e9c
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 436
|
java
|
// "Move type annotation" "true-preview"
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target(ElementType.TYPE_USE)
@interface First { }
@Target(ElementType.TYPE_USE)
@interface Second { }
class Generic<T> {}
class Main extends Generic</*1 */ /*2*/@<caret>/* 3 */ /* 4*/ First/*one*/ @/*two*/Second /*5 *//*6 */ Main.Data.Nested> {
public static class Data {
public static class Nested { }
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
958fd0e5d0ca1ac9d576016ae9c6bf6a0387aa12
|
77f41106d18d9d2fd2ca85c18531f7e30e6968a8
|
/clients/desktop-uploader-wizard/uploader-wizard-swing-ui/src/main/java/com/infoclinika/mssharing/wizard/upload/gui/swing/forms/component/ComboBoxTableCellEditor.java
|
cb628ea4a1faf902d8ef79d2629c9a018a952282
|
[] |
no_license
|
StratusBioSciences/chorus
|
a8abaa7ab1e9e8f6d867d327c7ec26e804e6fe0b
|
c9d8099419733314c0166980ee6270563a212383
|
refs/heads/master
| 2021-01-20T12:41:17.996158
| 2017-05-05T13:33:37
| 2017-05-05T13:33:37
| 90,378,816
| 0
| 4
| null | 2019-05-08T17:09:36
| 2017-05-05T13:32:47
|
Java
|
UTF-8
|
Java
| false
| false
| 2,831
|
java
|
package com.infoclinika.mssharing.wizard.upload.gui.swing.forms.component;
import com.infoclinika.mssharing.dto.response.DictionaryDTO;
import com.infoclinika.mssharing.wizard.upload.gui.swing.forms.UiProperties;
import com.infoclinika.mssharing.upload.common.dto.DictionaryWrapper;
import javax.swing.*;
import javax.swing.event.CellEditorListener;
import javax.swing.table.TableCellEditor;
import java.awt.*;
import java.util.*;
/**
* @author timofey.kasyanov
* date: 30.01.14
*/
public class ComboBoxTableCellEditor implements TableCellEditor {
private final DefaultCellEditor defaultCellEditor;
private final JComboBox comboBox;
private final JPanel panel;
private final java.util.List<DictionaryWrapper> species;
public ComboBoxTableCellEditor(java.util.List<DictionaryWrapper> species) {
this.species = species;
final DefaultComboBoxModel model = new DefaultComboBoxModel();
for (DictionaryWrapper wrapper : species) {
model.addElement(wrapper);
}
comboBox = new JComboBox(model);
defaultCellEditor = new DefaultCellEditor(comboBox);
final int v = UiProperties.EDITABLE_CELL_MARGIN;
panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(v, v, v, v));
panel.add(comboBox);
}
@Override
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
final Color color = isSelected ? table.getSelectionBackground() : table.getBackground();
panel.setBackground(color);
final DictionaryDTO specie = (DictionaryDTO) value;
for(DictionaryWrapper wrapper : species){
if(wrapper.getDictionary().getName().equals(specie.getName())){
comboBox.setSelectedItem(wrapper);
break;
}
}
return panel;
}
@Override
public Object getCellEditorValue() {
return defaultCellEditor.getCellEditorValue();
}
@Override
public boolean isCellEditable(EventObject anEvent) {
return defaultCellEditor.isCellEditable(anEvent);
}
@Override
public boolean shouldSelectCell(EventObject anEvent) {
return defaultCellEditor.shouldSelectCell(anEvent);
}
@Override
public boolean stopCellEditing() {
return defaultCellEditor.stopCellEditing();
}
@Override
public void cancelCellEditing() {
defaultCellEditor.cancelCellEditing();
}
@Override
public void addCellEditorListener(CellEditorListener l) {
defaultCellEditor.addCellEditorListener(l);
}
@Override
public void removeCellEditorListener(CellEditorListener l) {
defaultCellEditor.removeCellEditorListener(l);
}
}
|
[
"vladimir.moiseiev@teamdev.com"
] |
vladimir.moiseiev@teamdev.com
|
f1ef6632aca0fcef30cb484f56e205e4bc3f639f
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/oss-20190517/src/main/java/com/aliyun/oss20190517/models/ReplicationDestination.java
|
00591681fb352d69e4b2657f83f84138683f2fc9
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,166
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.oss20190517.models;
import com.aliyun.tea.*;
public class ReplicationDestination extends TeaModel {
@NameInMap("Bucket")
public String bucket;
@NameInMap("Location")
public String location;
@NameInMap("TransferType")
public String transferType;
public static ReplicationDestination build(java.util.Map<String, ?> map) throws Exception {
ReplicationDestination self = new ReplicationDestination();
return TeaModel.build(map, self);
}
public ReplicationDestination setBucket(String bucket) {
this.bucket = bucket;
return this;
}
public String getBucket() {
return this.bucket;
}
public ReplicationDestination setLocation(String location) {
this.location = location;
return this;
}
public String getLocation() {
return this.location;
}
public ReplicationDestination setTransferType(String transferType) {
this.transferType = transferType;
return this;
}
public String getTransferType() {
return this.transferType;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
230d4aad27e9176504bb3d55a00d30fb998f2e33
|
87901d9fd3279eb58211befa5357553d123cfe0c
|
/bin/ext-commerce/payment/testsrc/de/hybris/platform/payment/commands/impl/StandaloneRefundMockCommand.java
|
45a35a902fae4c112dd60cfafa340248abd1b07a
|
[] |
no_license
|
prafullnagane/learning
|
4d120b801222cbb0d7cc1cc329193575b1194537
|
02b46a0396cca808f4b29cd53088d2df31f43ea0
|
refs/heads/master
| 2020-03-27T23:04:17.390207
| 2014-02-27T06:19:49
| 2014-02-27T06:19:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,668
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2013 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("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 hybris.
*
*
*/
package de.hybris.platform.payment.commands.impl;
import de.hybris.platform.payment.commands.StandaloneRefundCommand;
import de.hybris.platform.payment.commands.request.StandaloneRefundRequest;
import de.hybris.platform.payment.commands.result.RefundResult;
import de.hybris.platform.payment.dto.TransactionStatus;
import de.hybris.platform.payment.dto.TransactionStatusDetails;
import java.util.Date;
/**
* A mockup Implementation for {@link StandaloneRefundCommand}.
*/
public class StandaloneRefundMockCommand extends GenericMockCommand implements
StandaloneRefundCommand<StandaloneRefundRequest>
{
@Override
public RefundResult perform(final StandaloneRefundRequest request)
{
final RefundResult result = new RefundResult();
// Let's be as much polite as possible and return the requested data where it makes sense
result.setCurrency( request.getCurrency() );
result.setTotalAmount( request.getTotalAmount() );
result.setRequestTime( new Date() );
// And the most important
result.setTransactionStatus( TransactionStatus.ACCEPTED );
result.setTransactionStatusDetails( TransactionStatusDetails.SUCCESFULL );
genericPerform( request, result );
return result;
}
}
|
[
"admin1@neev31.(none)"
] |
admin1@neev31.(none)
|
8aa173a47f741f0dd4de5be67b5d06496831fb00
|
44eef90e43fd3ad94f6c820fe502876301bc5d02
|
/mybatis/src/main/java/org/apache/ibatis/reflection/property/PropertyNamer.java
|
b208730cc8dc97f0f525379ca57859a217beef0b
|
[] |
no_license
|
chenhonghaovip/spring-framework-master
|
faafc370433113a25093e22c9927e8886f8a7463
|
5d56503bacf032d40e00b3075df1650dbb5a743f
|
refs/heads/master
| 2023-08-18T15:21:40.161286
| 2023-08-11T07:22:57
| 2023-08-11T07:22:57
| 251,283,524
| 0
| 1
| null | 2022-12-10T06:04:11
| 2020-03-30T11:24:10
|
Java
|
UTF-8
|
Java
| false
| false
| 1,779
|
java
|
/**
* Copyright 2009-2015 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.reflection.property;
import org.apache.ibatis.reflection.ReflectionException;
import java.util.Locale;
/**
* @author Clinton Begin
*/
public final class PropertyNamer {
private PropertyNamer() {
// Prevent Instantiation of Static Class
}
public static String methodToProperty(String name) {
if (name.startsWith("is")) {
name = name.substring(2);
} else if (name.startsWith("get") || name.startsWith("set")) {
name = name.substring(3);
} else {
throw new ReflectionException("Error parsing property name '" + name + "'. Didn't start with 'is', 'get' or 'set'.");
}
if (name.length() == 1 || (name.length() > 1 && !Character.isUpperCase(name.charAt(1)))) {
name = name.substring(0, 1).toLowerCase(Locale.ENGLISH) + name.substring(1);
}
return name;
}
public static boolean isProperty(String name) {
return name.startsWith("get") || name.startsWith("set") || name.startsWith("is");
}
public static boolean isGetter(String name) {
return name.startsWith("get") || name.startsWith("is");
}
public static boolean isSetter(String name) {
return name.startsWith("set");
}
}
|
[
"zhihei.chh@alibaba-inc.com"
] |
zhihei.chh@alibaba-inc.com
|
2039ab0af98f8b56c87bdcbc630412792abac79b
|
82eba08b9a7ee1bd1a5f83c3176bf3c0826a3a32
|
/ZmailSoap/src/wsdl-test/generated/zcsclient/admin/testDeleteMailboxRequest.java
|
c85dab1f062f9649c0537c1c512987e016a7e4a4
|
[
"MIT"
] |
permissive
|
keramist/zmailserver
|
d01187fb6086bf3784fe180bea2e1c0854c83f3f
|
762642b77c8f559a57e93c9f89b1473d6858c159
|
refs/heads/master
| 2021-01-21T05:56:25.642425
| 2013-10-21T11:27:05
| 2013-10-22T12:48:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,025
|
java
|
/*
* ***** BEGIN LICENSE BLOCK *****
*
* Zimbra Collaboration Suite Server
* Copyright (C) 2011, 2012 VMware, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
*
* ***** END LICENSE BLOCK *****
*/
package generated.zcsclient.admin;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for deleteMailboxRequest complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="deleteMailboxRequest">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="mbox" type="{urn:zmailAdmin}mailboxByAccountIdSelector" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "deleteMailboxRequest", propOrder = {
"mbox"
})
public class testDeleteMailboxRequest {
protected testMailboxByAccountIdSelector mbox;
/**
* Gets the value of the mbox property.
*
* @return
* possible object is
* {@link testMailboxByAccountIdSelector }
*
*/
public testMailboxByAccountIdSelector getMbox() {
return mbox;
}
/**
* Sets the value of the mbox property.
*
* @param value
* allowed object is
* {@link testMailboxByAccountIdSelector }
*
*/
public void setMbox(testMailboxByAccountIdSelector value) {
this.mbox = value;
}
}
|
[
"bourgerie.quentin@gmail.com"
] |
bourgerie.quentin@gmail.com
|
ff66ad8e00a91663ec747f3d59202a6d25a66f88
|
e70abc02efbb8a7637eb3655f287b0a409cfa23b
|
/hyjf-batch/src/main/java/com/hyjf/batch/datarecover/couponrepay/bank/RepayDataRecoverService.java
|
818e95f1045b458fafe59bdbf0075bfc4b51de6c
|
[] |
no_license
|
WangYouzheng1994/hyjf
|
ecb221560460e30439f6915574251266c1a49042
|
6cbc76c109675bb1f120737f29a786fea69852fc
|
refs/heads/master
| 2023-05-12T03:29:02.563411
| 2020-05-19T13:49:56
| 2020-05-19T13:49:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 212
|
java
|
package com.hyjf.batch.datarecover.couponrepay.bank;
import java.util.List;
import com.hyjf.batch.BaseService;
public interface RepayDataRecoverService extends BaseService {
List<String> selectNidForTyj();
}
|
[
"heshuying@hyjf.com"
] |
heshuying@hyjf.com
|
5009add87d93f267e1a728bfd54d639aba1cf863
|
b324895006255526e9afca01dc1931f2a0d1b85d
|
/pangaea/pangaea-core/src/main/java/edu/mit/cci/roma/pangaea/corenew/config/VensimModelInputConfig.java
|
9d4b4e4ef245819c64c91e1034b168aa85824735
|
[] |
no_license
|
CCI-MIT/ROMA
|
603c6923bf1b29742e80919c9201796b48402ad4
|
9db8ad54442dc980a26ce5ea5399527b3e421cbe
|
refs/heads/master
| 2020-12-07T17:11:05.499639
| 2017-05-05T00:09:43
| 2017-05-05T00:09:43
| 17,189,278
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,808
|
java
|
package edu.mit.cci.roma.pangaea.corenew.config;
import java.util.Map;
import org.simpleframework.xml.Element;
import edu.mit.cci.roma.pangaea.corenew.PangaeaPropsUtils;
import edu.mit.cci.roma.pangaea.corenew.inputs.InputValue;
import edu.mit.cci.roma.pangaea.corenew.inputs.StringInputValue;
import edu.mit.cci.roma.pangaea.corenew.processors.inputs.InputProcessor;
public class VensimModelInputConfig extends BaseVensimVariableInfo {
@Element(required=false)
private VensimModelInputProcessorConfig processorConfig;
private InputProcessor processor;
public Map<String, InputValue> processInputValues(Map<String, InputValue> inputValues) {
Map<String, InputValue> ret = inputValues;
InputProcessor processor = getProcessor();
if (processor == null) {
// do nothing as we don't need to process the value
String varName = getVensimContextVariable() == null ? getName() : getVensimContextVariable();
if (getDefaultVal() != null && !inputValues.containsKey(varName) ) {
inputValues.put(varName, new StringInputValue(varName, getDefaultVal()));
}
}
else {
ret = processor.processInputValues(inputValues);
}
if (getVensimContextVariable() != null && ret.containsKey(getName())) {
// replace parameter for getName() with getVensimContextVariable as this is the variable that we need to set
ret.put(getVensimContextVariable(), ret.get(getName()));
ret.remove(getName());
}
return ret;
}
private InputProcessor getProcessor() {
if (processorConfig != null && processor == null) {
processor = PangaeaPropsUtils.getInputProcessorForName(processorConfig.getName());
processor.init(getVensimContextVariable() == null ? getName() : getVensimContextVariable(), getName(), processorConfig.getConfiguration());
}
return processor;
}
}
|
[
"janusz.parfieniuk@gmail.com"
] |
janusz.parfieniuk@gmail.com
|
ece23d55acf1dc03850a6ebfb5b740bcf2cb05bf
|
f43598db6001c9d6e40e71631fabfd0641cbcdb5
|
/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryService.java
|
e932fa8c35d320539d6a0e99c20cd979f40506c3
|
[
"BSD-3-Clause"
] |
permissive
|
abyot/sun-pmt-234
|
e839850591393fba02fc1fa00f953724a810e66a
|
12e09e544e9a702b4511ef6cfc7025180a56bdd5
|
refs/heads/master
| 2023-03-08T18:17:27.860300
| 2022-12-03T10:37:12
| 2022-12-03T10:37:12
| 265,843,044
| 2
| 1
| null | 2023-02-22T08:28:52
| 2020-05-21T12:29:03
|
Java
|
UTF-8
|
Java
| false
| false
| 7,307
|
java
|
package org.hisp.dhis.query;
/*
* Copyright (c) 2004-2020, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.List;
import org.hisp.dhis.common.IdentifiableObject;
import org.hisp.dhis.fieldfilter.Defaults;
import org.hisp.dhis.preheat.Preheat;
import org.hisp.dhis.query.planner.QueryPlan;
import org.hisp.dhis.query.planner.QueryPlanner;
import org.springframework.stereotype.Component;
import lombok.extern.slf4j.Slf4j;
/**
* Default implementation of QueryService which works with IdObjects.
*
* @author Morten Olav Hansen <mortenoh@gmail.com>
*/
@Slf4j
@Component( "org.hisp.dhis.query.QueryService" )
public class DefaultQueryService
implements QueryService
{
private final QueryParser queryParser;
private final QueryPlanner queryPlanner;
private final CriteriaQueryEngine<? extends IdentifiableObject> criteriaQueryEngine;
private final InMemoryQueryEngine<? extends IdentifiableObject> inMemoryQueryEngine;
private final Junction.Type DEFAULT_JUNCTION_TYPE = Junction.Type.AND;
public DefaultQueryService( QueryParser queryParser, QueryPlanner queryPlanner,
CriteriaQueryEngine<? extends IdentifiableObject> criteriaQueryEngine,
InMemoryQueryEngine<? extends IdentifiableObject> inMemoryQueryEngine )
{
checkNotNull( queryParser );
checkNotNull( queryPlanner );
checkNotNull( criteriaQueryEngine );
checkNotNull( inMemoryQueryEngine );
this.queryParser = queryParser;
this.queryPlanner = queryPlanner;
this.criteriaQueryEngine = criteriaQueryEngine;
this.inMemoryQueryEngine = inMemoryQueryEngine;
}
@Override
public List<? extends IdentifiableObject> query( Query query )
{
return queryObjects( query );
}
@Override
@SuppressWarnings( { "unchecked", "rawtypes" } )
public List<? extends IdentifiableObject> query( Query query, ResultTransformer transformer )
{
List<? extends IdentifiableObject> objects = queryObjects( query );
if ( transformer != null )
{
return transformer.transform( objects );
}
return objects;
}
@Override
public int count( Query query )
{
Query cloned = Query.from( query );
cloned.clearOrders();
cloned.setFirstResult( 0 );
cloned.setMaxResults( Integer.MAX_VALUE );
return countObjects( cloned );
}
@Override
public Query getQueryFromUrl( Class<?> klass, List<String> filters, List<Order> orders, Pagination pagination) throws QueryParserException
{
return getQueryFromUrl( klass, filters, orders, pagination, DEFAULT_JUNCTION_TYPE );
}
@Override
public Query getQueryFromUrl(Class<?> klass, List<String> filters, List<Order> orders, Pagination pagination, Junction.Type rootJunction ) throws QueryParserException
{
Query query = queryParser.parse( klass, filters, rootJunction );
query.addOrders( orders );
if ( pagination.hasPagination() )
{
query.setFirstResult( pagination.getFirstResult() );
query.setMaxResults( pagination.getSize() );
}
return query;
}
@Override
public Query getQueryFromUrl( Class<?> klass, List<String> filters, List<Order> orders ) throws QueryParserException
{
return getQueryFromUrl( klass, filters, orders, new Pagination(), DEFAULT_JUNCTION_TYPE );
}
//---------------------------------------------------------------------------------------------
// Helper methods
//---------------------------------------------------------------------------------------------
private int countObjects( Query query )
{
List<? extends IdentifiableObject> objects;
QueryPlan queryPlan = queryPlanner.planQuery( query );
Query pQuery = queryPlan.getPersistedQuery();
Query npQuery = queryPlan.getNonPersistedQuery();
if ( !npQuery.isEmpty() )
{
npQuery.setObjects( criteriaQueryEngine.query( pQuery ) );
objects = inMemoryQueryEngine.query( npQuery );
return objects.size();
}
else
{
return criteriaQueryEngine.count( pQuery );
}
}
private List<? extends IdentifiableObject> queryObjects( Query query )
{
List<? extends IdentifiableObject> objects = query.getObjects();
if ( objects != null )
{
objects = inMemoryQueryEngine.query( query.setObjects( objects ) );
clearDefaults( query.getSchema().getKlass(), objects, query.getDefaults() );
return objects;
}
QueryPlan queryPlan = queryPlanner.planQuery( query );
Query pQuery = queryPlan.getPersistedQuery();
Query npQuery = queryPlan.getNonPersistedQuery();
objects = criteriaQueryEngine.query( pQuery );
if ( !npQuery.isEmpty() )
{
if ( log.isDebugEnabled() )
{
log.debug( "Doing in-memory for " + npQuery.getCriterions().size() + " criterions and "
+ npQuery.getOrders().size() + " orders." );
}
npQuery.setObjects( objects );
objects = inMemoryQueryEngine.query( npQuery );
}
clearDefaults( query.getSchema().getKlass(), objects, query.getDefaults() );
return objects;
}
private void clearDefaults( Class<?> klass, List<? extends IdentifiableObject> objects, Defaults defaults )
{
if ( Defaults.INCLUDE == defaults || !Preheat.isDefaultClass( klass ) )
{
return;
}
objects.removeIf( object -> "default".equals( object.getName() ) );
}
}
|
[
"abyota@gmail.com"
] |
abyota@gmail.com
|
64b1f99dfd8c04b192b37520e8aa10fbe706ca63
|
e2c5f97074476733a4372c662d8430029e381a8c
|
/src/office_hour/office_hour_01_28/Animal.java
|
f9a1f108553239b260183665c03a38feaa81a427
|
[] |
no_license
|
Halis-Can/JavaProgrammingB15Online
|
571e8bf07697d6c274c55d270ef4f0a7ca97e890
|
6df977bddc9531a932893965cdcf9ced2ee76c69
|
refs/heads/master
| 2021-08-20T04:04:40.840907
| 2021-02-11T05:00:33
| 2021-02-11T05:00:33
| 244,282,494
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 836
|
java
|
package office_hour.office_hour_01_28;
public abstract class Animal implements Zoo {
//1. no object creation
int age;
//infomation --> variable
//variables ==> local , instance , static
String color;
String breed;
//default constructor
public Animal() {
}
//Actions --> method
//method --> instance , constructor
//concrete method
public void eat() {
System.out.println("The animal is eating ");
}
public void call() {
System.out.println("The animal is calling .. ");
}
//what if we just declare a method that should be in child class, and they have different
//body
//abstract method == I want this method will be appear in both cat
//and dog classes , yet they should have dofferent body
public abstract void run();
}
|
[
"github@cybertekschool.com"
] |
github@cybertekschool.com
|
089d6aa29fa0634f8578b9d7c9131bde43b31888
|
d436fade2ee33c96f79a841177a6229fdd6303b7
|
/com/planet_ink/coffee_mud/Common/WeakItemCollection.java
|
e78f971e28992630563f3f674cd144b96b16b113
|
[
"Apache-2.0"
] |
permissive
|
SJonesy/UOMUD
|
bd4bde3614a6cec6fba0e200ac24c6b8b40a2268
|
010684f83a8caec4ea9d38a7d57af2a33100299a
|
refs/heads/master
| 2021-01-20T18:30:23.641775
| 2017-05-19T21:38:36
| 2017-05-19T21:38:36
| 90,917,941
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,289
|
java
|
package com.planet_ink.coffee_mud.Common;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.interfaces.ItemPossessor.Expire;
import com.planet_ink.coffee_mud.core.threads.ServiceEngine;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.Clan.Function;
import com.planet_ink.coffee_mud.Common.interfaces.Clan.Authority;
import com.planet_ink.coffee_mud.Common.interfaces.Clan.ClanVote;
import com.planet_ink.coffee_mud.Common.interfaces.Clan.MemberRecord;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.DatabaseEngine.PlayerData;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.StdRace;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.lang.ref.WeakReference;
import java.util.*;
/*
Copyright 2011-2017 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* Abstract collection of item objects, complete with some
* finders and various accessors. Also, the copyOf method
* does a deep copy. Also, this is a weak item collection,
* so as items get destroyed, they disappear from here.
*/
public class WeakItemCollection implements ItemCollection, CMCommon
{
private final SVector<WeakReference<Item>> innerContents=new SVector<WeakReference<Item>>(0);
private final ConvertingList<WeakReference<Item>,Item> contents
= new ConvertingList<WeakReference<Item>,Item>(innerContents,
new Converter<WeakReference<Item>,Item>()
{
@Override
public Item convert(WeakReference<Item> obj)
{
return obj.get();
}
});
@Override
public String ID()
{
return "WeakItemCollection";
}
@Override
public String name()
{
return ID();
}
@Override
public CMObject copyOf()
{
final WeakItemCollection c=(WeakItemCollection)newInstance();
for(int i=0;i<contents.size();i++)
{
final Item I=contents.get(i);
if(I!=null)
{
final Item I2=(Item)I.copyOf();
I2.setOwner(I.owner());
c.innerContents.add(new WeakReference<Item>(I2));
}
}
for(int i=0;i<contents.size();i++)
{
final Item I=contents.get(i);
final Item I2=c.contents.get(i);
if((I!=null)&&(I2!=null))
{
if(I.container() != null)
for(int i2=0;i2<contents.size();i2++)
if(I.container() == contents.get(i2))
{
I2.setContainer((Container)c.contents.get(i2));
break;
}
}
}
return c;
}
@Override
public void initializeClass()
{
}
@Override
public CMObject newInstance()
{
return new WeakItemCollection();
}
@Override
public int compareTo(CMObject o)
{
return o==this?0:1;
}
@Override
public Item findItem(String itemID)
{
Item item=(Item)CMLib.english().fetchEnvironmental(contents,itemID,true);
if(item==null)
item=(Item)CMLib.english().fetchEnvironmental(contents,itemID,false);
return item;
}
@Override
public Enumeration<Item> items()
{
return new IteratorEnumeration<Item>(contents.iterator());
}
@Override
public Item findItem(Item goodLocation, String itemID)
{
Item item=CMLib.english().fetchAvailableItem(contents,itemID,goodLocation,Wearable.FILTER_ANY,true);
if(item==null)
item=CMLib.english().fetchAvailableItem(contents,itemID,goodLocation,Wearable.FILTER_ANY,false);
return item;
}
@Override
public List<Item> findItems(Item goodLocation, String itemID)
{
List<Item> items=CMLib.english().fetchAvailableItems(contents,itemID,goodLocation,Wearable.FILTER_ANY,true);
if(items.size()==0)
items=CMLib.english().fetchAvailableItems(contents,itemID,goodLocation,Wearable.FILTER_ANY,false);
return items;
}
@Override @SuppressWarnings({"unchecked","rawtypes"})
public List<Item> findItems(String itemID)
{
List items=CMLib.english().fetchEnvironmentals(contents,itemID,true);
if(items.size()==0)
items=CMLib.english().fetchEnvironmentals(contents,itemID, false);
return items;
}
@Override
public void addItem(Item item)
{
if((item!=null)&&(!item.amDestroyed()))
innerContents.addElement(new WeakReference<Item>(item));
}
@Override
public void delItem(Item item)
{
for(int i=contents.size()-1;i>=0;i--)
{
final Item I=getItem(i);
if(I==item)
{
innerContents.remove(i);
break;
}
else
if(I==null)
{
try
{
innerContents.remove(i);
}
catch (final java.lang.ArrayIndexOutOfBoundsException x)
{
}
}
}
}
@Override
public void delAllItems(boolean destroy)
{
if(destroy)
for(int i=numItems()-1;i>=0;i--)
{
final Item I=getItem(i);
if(I!=null)
I.destroy();
}
innerContents.clear();
}
@Override
public int numItems()
{
return contents.size();
}
@Override
public boolean isContent(Item item)
{
for(int i=contents.size()-1;i>=0;i--)
{
final Item I=getItem(i);
if(I==item)
return true;
if(I==null)
{
try
{
innerContents.remove(i);
}
catch(final java.lang.ArrayIndexOutOfBoundsException x)
{
}
}
}
return false;
}
@Override
public Item getItem(int i)
{
try
{
final Item I=contents.get(i);
if(I==null)
innerContents.remove(i);
else
return I;
}
catch(final java.lang.ArrayIndexOutOfBoundsException x)
{
}
return null;
}
@Override
public void eachItem(final EachApplicable<Item> applier)
{
final List<Item> contents=this.contents;
if(contents!=null)
try
{
for(int a=0;a<contents.size();a++)
{
final Item I=contents.get(a);
if(I!=null)
applier.apply(I);
else
{
try
{
innerContents.remove(a);
}
catch(final java.lang.ArrayIndexOutOfBoundsException x)
{
}
}
}
}
catch(final ArrayIndexOutOfBoundsException e)
{
}
}
@Override
public Item getRandomItem()
{
if(numItems()==0)
return null;
return getItem(CMLib.dice().roll(1,numItems(),-1));
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
0510c66464e30faa5888caeda5a5ae9af5b7de9a
|
8e13c338dec36021668e46798ff40c7ea9b6b065
|
/Mage.Sets/src/mage/cards/i/IngeniousArtillerist.java
|
cef253dd4406f434c721c7d5affe291f363fd590
|
[
"MIT"
] |
permissive
|
ninthworld/mage
|
c38aeeaa65a2a0afa908779b7c63ef2e1b1e413a
|
ba558f9a18032148a2936eedf874d90c97c7d46c
|
refs/heads/master
| 2022-07-29T23:17:30.439762
| 2022-07-02T22:20:41
| 2022-07-02T22:20:41
| 140,520,040
| 1
| 0
|
MIT
| 2018-07-11T04:08:35
| 2018-07-11T04:08:35
| null |
UTF-8
|
Java
| false
| false
| 3,052
|
java
|
package mage.cards.i;
import mage.MageInt;
import mage.MageItem;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.dynamicvalue.common.SavedDamageValue;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeGroupEvent;
import java.util.Objects;
import java.util.UUID;
import java.util.stream.Stream;
/**
* @author TheElk801
*/
public final class IngeniousArtillerist extends CardImpl {
public IngeniousArtillerist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ARTIFICER);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// Whenever one or more artifacts enter the battlefield under you control, Ingenious Artillerist deals that much damage to each opponent.
this.addAbility(new IngeniousArtilleristTriggeredAbility());
}
private IngeniousArtillerist(final IngeniousArtillerist card) {
super(card);
}
@Override
public IngeniousArtillerist copy() {
return new IngeniousArtillerist(this);
}
}
class IngeniousArtilleristTriggeredAbility extends TriggeredAbilityImpl {
IngeniousArtilleristTriggeredAbility() {
super(Zone.BATTLEFIELD, new DamagePlayersEffect(
Outcome.Benefit, SavedDamageValue.MANY, TargetController.OPPONENT
), false);
}
private IngeniousArtilleristTriggeredAbility(final IngeniousArtilleristTriggeredAbility ability) {
super(ability);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.ZONE_CHANGE_GROUP;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event;
if (zEvent.getToZone() != Zone.BATTLEFIELD) {
return false;
}
int artifacts = Stream.concat(
zEvent.getTokens()
.stream(),
zEvent.getCards()
.stream()
.map(MageItem::getId)
.map(game::getPermanent)
.filter(Objects::nonNull)
).filter(permanent -> permanent.isArtifact(game)).mapToInt(x -> 1).sum();
if (artifacts > 0) {
this.getEffects().setValue("damage", artifacts);
return true;
}
return false;
}
@Override
public IngeniousArtilleristTriggeredAbility copy() {
return new IngeniousArtilleristTriggeredAbility(this);
}
@Override
public String getRule() {
return "Whenever one or more artifacts enter the battlefield under your control, " +
"{this} deals that much damage to each opponent.";
}
}
|
[
"theelk801@gmail.com"
] |
theelk801@gmail.com
|
e7f941f3aa0c0a4c69f2b213e552cca8c56e1aec
|
ce996d943e3fe61721c679346f34469736276fcd
|
/java-jc/src/main/java/com/xhc/javabased/java_jc/code_09/demo10/Fu.java
|
686b8bc7a4963c516ddf2aabc4b541092a863cdc
|
[] |
no_license
|
xuhongchang2008/javadome
|
c43117584f1bb9450b335a0ba9999c0bc193bc9e
|
3436f971ef14041a4b4d6160c5f6ef61648a9437
|
refs/heads/master
| 2023-03-02T03:44:10.181467
| 2021-02-02T05:23:01
| 2021-02-02T05:23:01
| 325,902,715
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 169
|
java
|
package com.xhc.javabased.java_jc.code_09.demo10;
public class Fu {
int num = 10;
public void method() {
System.out.println("父类方法");
}
}
|
[
"8355853+xhc2008@user.noreply.gitee.com"
] |
8355853+xhc2008@user.noreply.gitee.com
|
510c3092fc69e5e53cec9814a35f11f3a1e93f9f
|
f441829b2dad7176f97a85297b8a6cf1b948a164
|
/GeneratedClient/generated/org/bimserver/generatedclient/SetSettingAllowSelfRegistrationResponse.java
|
1bc5832dfbb77139682ef1b9b2526bd6d372eacd
|
[] |
no_license
|
rehno-lindeque/bimserver
|
07b2439909c1ce5cb9221a5c4d9bcac8bf96e8bf
|
eedddb2ef6e3349925d4d98531fd581e27215537
|
refs/heads/master
| 2021-03-12T22:47:03.855671
| 2011-07-01T16:02:15
| 2011-07-01T16:02:15
| 2,233,301
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 869
|
java
|
package org.bimserver.generatedclient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for setSettingAllowSelfRegistrationResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="setSettingAllowSelfRegistrationResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "setSettingAllowSelfRegistrationResponse")
public class SetSettingAllowSelfRegistrationResponse {
}
|
[
"ruben@logic-labs.nl"
] |
ruben@logic-labs.nl
|
a6e5fa6f181de01db34eeea0aa6f0f3c04c1011d
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/live/b/x$$ExternalSyntheticLambda1.java
|
60f80409acc087212b8b419e0d79eab110b5f4d3
|
[] |
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
| 436
|
java
|
package com.tencent.mm.live.b;
import com.tencent.mm.sdk.platformtools.MTimerHandler.CallBack;
public final class x$$ExternalSyntheticLambda1
implements MTimerHandler.CallBack
{
public final boolean onTimerExpired() {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes10.jar
* Qualified Name: com.tencent.mm.live.b.x..ExternalSyntheticLambda1
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
b1d40539cdfdaf2bf739a3c618faaaaa676a2993
|
10d77fabcbb945fe37e15ae438e360a89a24ea05
|
/graalvm/transactions/fork/narayana/ArjunaJTS/jts/tests/classes/com/hp/mwtests/ts/jts/local/transactions/TxAssociationUnitTest.java
|
9636a774e06b73d62deb542b9d0605a029483978
|
[
"Apache-2.0",
"LGPL-2.1-or-later",
"LGPL-2.1-only",
"LicenseRef-scancode-other-copyleft"
] |
permissive
|
nmcl/scratch
|
1a881605971e22aa300487d2e57660209f8450d3
|
325513ea42f4769789f126adceb091a6002209bd
|
refs/heads/master
| 2023-03-12T19:56:31.764819
| 2023-02-05T17:14:12
| 2023-02-05T17:14:12
| 48,547,106
| 2
| 1
|
Apache-2.0
| 2023-03-01T12:44:18
| 2015-12-24T15:02:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,745
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2006, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
* This program is distributed in the hope that it will be useful, but WITHOUT A
* 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,
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
* (C) 2005-2006,
* @author JBoss Inc.
*/
/*
* Copyright (C) 2004,
*
* Arjuna Technologies Ltd,
* Newcastle upon Tyne,
* Tyne and Wear,
* UK.
*
* $Id: xidcheck.java 2342 2006-03-30 13:06:17Z $
*/
package com.hp.mwtests.ts.jts.local.transactions;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import com.arjuna.ats.jts.extensions.DebugTxAssociation;
import com.hp.mwtests.ts.jts.resources.TestBase;
public class TxAssociationUnitTest extends TestBase
{
@Test
public void test () throws Exception
{
DebugTxAssociation tx = new DebugTxAssociation();
tx.begin(null);
tx.commit(null);
tx.rollback(null);
tx.suspend(null);
tx.resume(null);
assertEquals(tx.name(), "Debug");
}
}
|
[
"mlittle@redhat.com"
] |
mlittle@redhat.com
|
0f27fa06579cfba70d70802929a5dcc44340821c
|
83527bc3bbda00fb9a2ebc2793ef669c0f4c8fd4
|
/src/main/java/com/github/vimcmd/javaFundamentals/p02_classesAndLibrariesUsage/ch12_jdbc/sub03_transactions/TransactionRunner.java
|
92369cc5480363c04f55c444ca9b70e141f4d386
|
[] |
no_license
|
vimcmd/JavaFundamentals
|
d5dd7c3e108fc57c5bb1a1fd3ac3f254a0181e3d
|
52fa30ee914a039a2129cfaf9a082d0868c5f06c
|
refs/heads/master
| 2020-04-16T10:57:27.931920
| 2016-08-26T08:54:12
| 2016-08-26T08:54:12
| 53,472,847
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 446
|
java
|
package com.github.vimcmd.javaFundamentals.p02_classesAndLibrariesUsage.ch12_jdbc.sub03_transactions;
import java.sql.SQLException;
/* # 6.1 # transaction runner */
public class TransactionRunner {
public static void main(String[] args) {
SingletonEngine runner = SingletonEngine.getInstance();
try {
runner.transfer("100");
} catch (SQLException e) {
e.printStackTrace();
}
}
}
|
[
"vim.cmd@gmail.com"
] |
vim.cmd@gmail.com
|
589514d3f60e308c970ece48aebc0034d89349a5
|
a1f2ddd2109c79bf04b394215d3b0d343f8bcd64
|
/ara-testbench-service/src/test/java/com/aratek/service/TasFpVerifyLogServiceTest.java
|
cf49e72922cb70c42fa12dfcf60fe31cf86d08d0
|
[] |
no_license
|
yuanlincheng/ara-testbench
|
efebd8139ab76c2b448ed80f77849ccbac746941
|
0a23d37649c1d52708d6b2d2da2a0826bd7712bc
|
refs/heads/master
| 2019-07-01T15:47:34.624723
| 2018-01-12T11:46:34
| 2018-01-12T11:46:34
| 97,545,013
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 592
|
java
|
/**
* author: tree
* version: 1.0
* date: 2018/01/12
* description:
* own: Aratek
*/
package com.aratek.service;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import lombok.extern.slf4j.Slf4j;
import com.aratek.ServiceApplication;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = ServiceApplication.class)
@Slf4j
public class TasFpVerifyLogServiceTest {
}
|
[
"yuanlinchengyx@163.com"
] |
yuanlinchengyx@163.com
|
1b4118b5a3d4d541e96d59bde1b023049908e57c
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/JetBrains--intellij-community/dc4fa3038c4a9c215c0da01bf793487e25ae3b33/before/SMTRunnerConsoleView.java
|
649122bddb869ba705653f5cc4aa595123f9880c
|
[] |
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
| 2,478
|
java
|
package org.jetbrains.plugins.ruby.testing.sm.runner.ui;
import com.intellij.execution.ExecutionBundle;
import com.intellij.execution.process.ProcessHandler;
import com.intellij.execution.testframework.TestConsoleProperties;
import com.intellij.execution.testframework.TestsUIUtil;
import com.intellij.execution.testframework.ui.BaseTestsOutputConsoleView;
import com.intellij.execution.testframework.ui.PrintableTestProxy;
import com.intellij.openapi.application.ModalityState;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.util.Disposer;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.ruby.utils.IdeaInternalUtil;
import javax.swing.*;
/**
* @author: Roman Chernyatchik
*/
public class SMTRunnerConsoleView extends BaseTestsOutputConsoleView {
private static final Icon OUTPUT_TAB_ICON = TestsUIUtil.loadIcon("testOuput");
private TestResultsViewer myResultsViewer;
public SMTRunnerConsoleView(final TestConsoleProperties consoleProperties,
final TestResultsViewer resultsViewer) {
super(consoleProperties);
consoleProperties.setConsole(this);
// Results View
myResultsViewer = resultsViewer;
// Console
myResultsViewer.addTab(ExecutionBundle.message("output.tab.title"), OUTPUT_TAB_ICON,
getConsole().getComponent());
myResultsViewer.addTestsProxySelectionListener(new TestProxyTreeSelectionListener() {
public void onSelected(@Nullable final PrintableTestProxy selectedTestProxy) {
if (selectedTestProxy == null) {
return;
}
IdeaInternalUtil.runInEventDispatchThread(new Runnable() {
public void run() {
getPrinter().updateOnTestSelected(selectedTestProxy);
}
}, ModalityState.NON_MODAL);
}
});
// init
myResultsViewer.initLogFilesManager();
}
public void attachToProcess(final ProcessHandler processHandler) {
// Process handler may be null only in JUnit test's mocks
if (processHandler != null) {
myResultsViewer.attachToProcess(processHandler);
} else {
assert ApplicationManager.getApplication().isUnitTestMode();
}
getPrinter().setCollectOutput(false);
}
public JComponent getComponent() {
return myResultsViewer.getContentPane();
}
public void dispose() {
Disposer.dispose(myResultsViewer);
myResultsViewer = null;
super.dispose();
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
69494a1da8567946598d38ef370d97a0f5a0ef7d
|
eefd17924e23614bcf83894e82c11672e5920e0f
|
/src/main/java/com/ringcentral/paths/MeetingServiceInfo.java
|
ab84c515248c195cd8d4a4a7a68c9532bff61e8c
|
[] |
no_license
|
tylerlong/ringcentral-java
|
3327b451d3ffe2d0fbf337fda3eb2d8a25be9046
|
ba945cdd693a77b9f097998aef969856d8466f9d
|
refs/heads/master
| 2021-01-20T01:50:23.366783
| 2017-06-07T09:40:10
| 2017-06-07T09:40:10
| 89,331,762
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 387
|
java
|
package com.ringcentral.paths;
import com.ringcentral.Path;
import com.ringcentral.PathSegment;
import com.ringcentral.RestClient;
public class MeetingServiceInfo extends Path {
public MeetingServiceInfo(RestClient restClient, PathSegment parent, String id) {
this.restClient = restClient;
pathSegment = new PathSegment(parent, "meeting/service-info", id);
}
}
|
[
"tyler4long@gmail.com"
] |
tyler4long@gmail.com
|
7511911c14daa0e0de93de055964ca8e652d0dc5
|
7844d28422e2c4eefd5393ba7807a7bb3921b10f
|
/ide/plugins/org.anyframe.ide.codegenerator/src/org/anyframe/ide/codegenerator/util/MavenJob.java
|
ade87f73622c5e2877df044f070cd09886517ccd
|
[
"Apache-2.0"
] |
permissive
|
leejungwoogit/anyframe-ide
|
ecb203aee8cdf13911cfb4668be04c7662c21476
|
957f311ee7024050b3ca297ed79ac1b923a776e9
|
refs/heads/master
| 2020-06-19T02:52:16.517175
| 2016-11-03T02:07:31
| 2016-11-03T02:07:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,388
|
java
|
/*
* Copyright 2008-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.anyframe.ide.codegenerator.util;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
/**
* This is an MavenJob class.
*
* @author Sooyeon Park
*/
public class MavenJob extends Job {
private PostProcess postProcess;
public MavenJob(final String name) {
super(name);
}
@Override
protected IStatus run(IProgressMonitor monitor) {
executePostProcess();
return Status.OK_STATUS;
}
public void setPostProcess(PostProcess postProcess) {
this.postProcess = postProcess;
}
public void executePostProcess() {
if (postProcess != null)
postProcess.execute(null);
}
}
|
[
"anyframe@samsung.com"
] |
anyframe@samsung.com
|
0a36a488afcd2ddbc327f1ccafbc217e1c0d123a
|
4004a2013924b3819770d6a4f6bc0c2897631d5c
|
/apis/oauth/src/main/java/org/jclouds/oauth/v2/filters/ClientCredentialsJWTBearerTokenFlow.java
|
9adb848066737570211c8d76d792b9eb15aad55f
|
[
"Apache-2.0"
] |
permissive
|
Comcast/jclouds
|
c3a4a6d7c2fe5d1803ca55accdd134d5bb6d7275
|
18eb7f3d383a280f6dd8f8c24978f578c5e88780
|
refs/heads/master
| 2021-05-12T16:29:09.686492
| 2018-01-08T07:06:32
| 2018-01-10T06:26:53
| 117,011,918
| 1
| 2
| null | 2018-10-17T22:53:07
| 2018-01-10T21:18:17
|
Java
|
UTF-8
|
Java
| false
| false
| 5,515
|
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.jclouds.oauth.v2.filters;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL;
import java.util.UUID;
import javax.inject.Inject;
import javax.inject.Named;
import org.jclouds.domain.Credentials;
import org.jclouds.http.HttpException;
import org.jclouds.http.HttpRequest;
import org.jclouds.location.Provider;
import org.jclouds.oauth.v2.AuthorizationApi;
import org.jclouds.oauth.v2.config.OAuthConfigFactory;
import org.jclouds.oauth.v2.config.OAuthConfigFactory.OAuthConfig;
import org.jclouds.oauth.v2.domain.ClientCredentialsAuthArgs;
import org.jclouds.oauth.v2.domain.ClientCredentialsClaims;
import org.jclouds.oauth.v2.domain.Token;
import com.google.common.base.Joiner;
import com.google.common.base.Supplier;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
/**
* Authorizes new Bearer Tokens at runtime by authorizing claims needed for the http request.
*
* <h3>Cache</h3>
* This maintains a time-based Bearer Token cache. By default expires after 59 minutes
* (the maximum time a token is valid is 60 minutes).
* This cache and expiry period is system-wide and does not attend to per-instance expiry time
* (e.g. "expires_in" from Google Compute -- which is set to the standard 3600 seconds).
*/
public class ClientCredentialsJWTBearerTokenFlow implements OAuthFilter {
private static final Joiner ON_SPACE = Joiner.on(" ");
private final Supplier<Credentials> credentialsSupplier;
private final OAuthConfigFactory oauthConfigFactory;
private final LoadingCache<ClientCredentialsAuthArgs, Token> tokenCache;
@Inject
ClientCredentialsJWTBearerTokenFlow(AuthorizeToken loader, @Named(PROPERTY_SESSION_INTERVAL) long tokenDuration,
@Provider Supplier<Credentials> credentialsSupplier,
OAuthConfigFactory oauthConfigFactory) {
this.credentialsSupplier = credentialsSupplier;
this.oauthConfigFactory = oauthConfigFactory;
// since the session interval is also the token expiration time requested to the server make the token expire a
// bit before the deadline to make sure there aren't session expiration exceptions
long cacheExpirationSeconds = tokenDuration > 30 ? tokenDuration - 30 : tokenDuration;
this.tokenCache = CacheBuilder.newBuilder().expireAfterWrite(cacheExpirationSeconds, SECONDS).build(loader);
}
static final class AuthorizeToken extends CacheLoader<ClientCredentialsAuthArgs, Token> {
private final AuthorizationApi api;
private final long tokenDuration;
@Inject AuthorizeToken(AuthorizationApi api, @Named(PROPERTY_SESSION_INTERVAL) long tokenDuration) {
this.api = api;
this.tokenDuration = tokenDuration;
}
long currentTimeSeconds() {
return System.currentTimeMillis() / 1000;
}
@Override public Token load(ClientCredentialsAuthArgs key) throws Exception {
final long now = currentTimeSeconds();
final ClientCredentialsClaims claims = ClientCredentialsClaims.create(
key.claims().iss(),
key.claims().sub(),
key.claims().aud(),
now + tokenDuration,
now,
UUID.randomUUID().toString()
);
return api.authorize(key.clientId(), claims, key.resource(), key.scope());
}
}
@Override public HttpRequest filter(HttpRequest request) throws HttpException {
OAuthConfig oauthConfig = oauthConfigFactory.forRequest(request);
ClientCredentialsClaims claims = ClientCredentialsClaims.create( //
credentialsSupplier.get().identity, // iss
credentialsSupplier.get().identity, // sub
oauthConfig.audience(), // aud
-1, // placeholder exp for the cache
-1, // placeholder nbf for the cache
null // placeholder jti for the cache
);
ClientCredentialsAuthArgs authArgs = ClientCredentialsAuthArgs.create(
credentialsSupplier.get().identity,
claims,
oauthConfig.resource(),
oauthConfig.scopes().isEmpty() ? null : ON_SPACE.join(oauthConfig.scopes())
);
Token token = tokenCache.getUnchecked(authArgs);
String authorization = String.format("%s %s", token.tokenType(), token.accessToken());
return request.toBuilder().addHeader("Authorization", authorization).build();
}
}
|
[
"nacx@apache.org"
] |
nacx@apache.org
|
1fd591702c2c0d9024b2180c99bbcfdb03abb938
|
38747d6a5b9c748a534a91f5410b244910eb7388
|
/src/test/java/com/traveledge/pageobjectlib/Air.java
|
8ec7465aac327c767ffe7ce1f4b1ae596c75fb8c
|
[] |
no_license
|
pritamsamantaray1993/JAVASeleniumTest
|
8117932728d2a6f05db97ae07e2673268aaba002
|
acd314b2bdffedc84b40226e9cf946b33eb89a6c
|
refs/heads/master
| 2021-03-16T05:39:10.098487
| 2017-05-17T08:29:47
| 2017-05-17T08:29:47
| 91,561,490
| 0
| 0
| null | 2017-05-17T09:55:30
| 2017-05-17T09:55:30
| null |
UTF-8
|
Java
| false
| false
| 3,821
|
java
|
package com.traveledge.pageobjectlib;
import java.io.IOException;
import org.apache.poi.EncryptedDocumentException;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.ui.Select;
import com.traveledge.common.ExcelLib;
import com.traveledge.common.WebDriverCommonLib;
public class Air extends WebDriverCommonLib{
@FindBy(xpath="//div[text()='New Air ']")
private WebElement newAirQuote;
@FindBy(xpath="//label[@class='btn btn-default label-normal one-way-label']")
private WebElement onWay;
@FindBy(id="airport-from-1")
private WebElement from;
@FindBy(xpath="//input[@name='airport-to-1']")
private WebElement to;
@FindBy(xpath=".//*[@id='air']/div/div[2]/div/div/div/form/div[2]/div/div[1]/div[2]/div[1]/div/div[1]/div/div/input")
private WebElement depart;
@FindBy(xpath=".//*[@id='air']/div/div[2]/div/div/div/form/div[2]/div/div[2]/div/div/div/div[1]/div/div[1]/div/div/input")
private WebElement Return;
@FindBy(xpath="//button[@class='btn btn-primary btn-search-airfare']")
private WebElement flightsearch;
@FindBy(xpath="//input[@placeholder='Enter Airline Code or Airline Name']")
private WebElement airlinesAndAlliances;
@FindBy(xpath="//select[@name='inventory-source']")
private WebElement inventorySourceGDS;
ExcelLib e= new ExcelLib();
//String travellerName=e.getExcelData(sheetName, rowNum, colNum);
public void selectGDS() throws InterruptedException{
Select s= new Select(inventorySourceGDS);
s.selectByValue("2");
}
public void searchFlightOneWay(Actions act) throws InterruptedException, EncryptedDocumentException, InvalidFormatException, IOException{
newAirQuote.click();
onWay.click();
String fromAir=e.getExcelData("Air",0,1);
String toAir=e.getExcelData("Air",1,1);
from.sendKeys(fromAir);
Thread.sleep(4000);
act.sendKeys(Keys.ARROW_DOWN);
act.sendKeys(Keys.ENTER).perform();
to.sendKeys(toAir);
Thread.sleep(4000);
act.sendKeys(Keys.ARROW_DOWN);
act.sendKeys(Keys.ENTER).perform();
depart.click();
act.sendKeys(Keys.ARROW_RIGHT);
act.sendKeys(Keys.ENTER).perform();
addAirLines(act);
selectGDS();
flightsearch.click();
waitForPageToLoad();
}
@FindBy(xpath="//label[@class='btn btn-default label-normal round-trip-label active']")
private WebElement roundTrip;
public void searchFlightRoundTrip(Actions act) throws InterruptedException, EncryptedDocumentException, InvalidFormatException, IOException{
newAirQuote.click();
roundTrip.click();
String fromAir=e.getExcelData("Air",0,1);
String toAir=e.getExcelData("Air",1,1);
from.sendKeys(fromAir);
Thread.sleep(4000);
act.sendKeys(Keys.ARROW_DOWN);
act.sendKeys(Keys.ENTER).perform();
to.sendKeys(toAir);
Thread.sleep(4000);
act.sendKeys(Keys.ARROW_DOWN);
act.sendKeys(Keys.ENTER).perform();
depart.click();
act.sendKeys(Keys.ARROW_RIGHT);
act.sendKeys(Keys.ENTER).perform();
Return.click();
act.sendKeys(Keys.ARROW_RIGHT);
act.sendKeys(Keys.ENTER).perform();
addAirLines(act);
selectGDS();
flightsearch.click();
waitForPageToLoad();
}
public void addAirLines(Actions act) throws InterruptedException, EncryptedDocumentException, InvalidFormatException, IOException{
airlinesAndAlliances.click();
String airLine=e.getExcelData("Air",3,1);
airlinesAndAlliances.sendKeys(airLine);
Thread.sleep(3000);
act.sendKeys(Keys.ARROW_DOWN);
act.sendKeys(Keys.ENTER).perform();
}
public void selectFromDropDown(WebElement wb,String value){
Select s=new Select(wb);
s.selectByValue(value);
}
}
|
[
"="
] |
=
|
dae2a7ca6bb873bf56e5c28940d8a363a34b7a4a
|
2b8c47031dddd10fede8bcf16f8db2b52521cb4f
|
/subject SPLs and test cases/Lampiro(6)/Lampiro_P4/evosuite-tests5/it/yup/xmpp/packets/Message_ESTest_scaffolding5.java
|
bf1721efeff0046742ae54c7d35d121bac0102db
|
[] |
no_license
|
psjung/SRTST_experiments
|
6f1ff67121ef43c00c01c9f48ce34f31724676b6
|
40961cb4b4a1e968d1e0857262df36832efb4910
|
refs/heads/master
| 2021-06-20T04:45:54.440905
| 2019-09-06T04:05:38
| 2019-09-06T04:05:38
| 206,693,757
| 1
| 0
| null | 2020-10-13T15:50:41
| 2019-09-06T02:10:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,480
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Jul 01 19:12:47 KST 2018
*/
package it.yup.xmpp.packets;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class Message_ESTest_scaffolding5 {
@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 = "it.yup.xmpp.packets.Message";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
}
|
[
"psjung@kaist.ac.kr"
] |
psjung@kaist.ac.kr
|
8e2090ff7a90523a8cc3807bc518713b7c715b34
|
52c36ce3a9d25073bdbe002757f08a267abb91c6
|
/src/main/java/com/alipay/api/request/AlipaySecurityProdFingerprintDeleteRequest.java
|
4d817a43af3165fb27021be38eb6be253842f170
|
[
"Apache-2.0"
] |
permissive
|
itc7/alipay-sdk-java-all
|
d2f2f2403f3c9c7122baa9e438ebd2932935afec
|
c220e02cbcdda5180b76d9da129147e5b38dcf17
|
refs/heads/master
| 2022-08-28T08:03:08.497774
| 2020-05-27T10:16:10
| 2020-05-27T10:16:10
| 267,271,062
| 0
| 0
|
Apache-2.0
| 2020-05-27T09:02:04
| 2020-05-27T09:02:04
| null |
UTF-8
|
Java
| false
| false
| 3,174
|
java
|
package com.alipay.api.request;
import com.alipay.api.domain.AlipaySecurityProdFingerprintDeleteModel;
import java.util.Map;
import com.alipay.api.AlipayRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.AlipaySecurityProdFingerprintDeleteResponse;
import com.alipay.api.AlipayObject;
/**
* ALIPAY API: alipay.security.prod.fingerprint.delete request
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipaySecurityProdFingerprintDeleteRequest implements AlipayRequest<AlipaySecurityProdFingerprintDeleteResponse> {
private AlipayHashMap udfParams; // add user-defined text parameters
private String apiVersion="1.0";
/**
* 指纹解注册
*/
private String bizContent;
public void setBizContent(String bizContent) {
this.bizContent = bizContent;
}
public String getBizContent() {
return this.bizContent;
}
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
private boolean needEncrypt=false;
private AlipayObject bizModel=null;
public String getNotifyUrl() {
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public void setTerminalType(String terminalType){
this.terminalType=terminalType;
}
public String getTerminalType(){
return this.terminalType;
}
public void setTerminalInfo(String terminalInfo){
this.terminalInfo=terminalInfo;
}
public String getTerminalInfo(){
return this.terminalInfo;
}
public void setProdCode(String prodCode) {
this.prodCode=prodCode;
}
public String getProdCode() {
return this.prodCode;
}
public String getApiMethodName() {
return "alipay.security.prod.fingerprint.delete";
}
public Map<String, String> getTextParams() {
AlipayHashMap txtParams = new AlipayHashMap();
txtParams.put("biz_content", this.bizContent);
if(udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new AlipayHashMap();
}
this.udfParams.put(key, value);
}
public Class<AlipaySecurityProdFingerprintDeleteResponse> getResponseClass() {
return AlipaySecurityProdFingerprintDeleteResponse.class;
}
public boolean isNeedEncrypt() {
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
this.needEncrypt=needEncrypt;
}
public AlipayObject getBizModel() {
return this.bizModel;
}
public void setBizModel(AlipayObject bizModel) {
this.bizModel=bizModel;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
edf630f826780846965ee1f1b7e2f0ba6121f50f
|
6c8987d48d600fe9ad2640174718b68932ed4a22
|
/OpenCylocs-Gradle/src/main/java/nl/strohalm/cyclos/utils/Pair.java
|
9e2293cd17b2a2a4cacc9433427c632441dd4216
|
[] |
no_license
|
hvarona/ocwg
|
f89140ee64c48cf52f3903348349cc8de8d3ba76
|
8d4464ec66ea37e6ad10255efed4236457b1eacc
|
refs/heads/master
| 2021-01-11T20:26:38.515141
| 2017-03-04T19:49:40
| 2017-03-04T19:49:40
| 79,115,248
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,743
|
java
|
/*
This file is part of Cyclos (www.cyclos.org).
A project of the Social Trade Organisation (www.socialtrade.org).
Cyclos 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.
Cyclos 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 Cyclos; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package nl.strohalm.cyclos.utils;
import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
/**
* A pair of two values
* @author luis
*
* @param <T1> The first value type
* @param <T2> The second value type
*/
public class Pair<T1, T2> implements Cloneable, Serializable {
private static final long serialVersionUID = 1934715538721883614L;
/**
* Factory class for a pair. Useful to reduce generics declaration, as generic types are inferred
*/
public static <T1, T2> Pair<T1, T2> of(final T1 first, final T2 second) {
return new Pair<T1, T2>(first, second);
}
private T1 first;
private T2 second;
public Pair() {
}
public Pair(final T1 first, final T2 second) {
this.first = first;
this.second = second;
}
@Override
@SuppressWarnings("unchecked")
public Pair<T1, T2> clone() {
try {
return (Pair<T1, T2>) super.clone();
} catch (final CloneNotSupportedException e) {
return null;
}
}
@Override
public boolean equals(final Object obj) {
if (!(obj instanceof Pair<?, ?>)) {
return false;
}
final Pair<?, ?> pair = (Pair<?, ?>) obj;
return new EqualsBuilder().append(first, pair.first).append(second, pair.second).isEquals();
}
public T1 getFirst() {
return first;
}
public T2 getSecond() {
return second;
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(first).append(second).toHashCode();
}
public void setFirst(final T1 first) {
this.first = first;
}
public void setSecond(final T2 second) {
this.second = second;
}
}
|
[
"wladimir2113@gmail.com"
] |
wladimir2113@gmail.com
|
1932f74aa400726b03669170ce41f7658fbd1b4a
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/3/3_9f76c1462d4d7dd8eab22bd6ac2bfd176b45e266/SeleniumRunner/3_9f76c1462d4d7dd8eab22bd6ac2bfd176b45e266_SeleniumRunner_t.java
|
966fdc1c7c832ec8a817c2417c4d183978025232
|
[] |
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,984
|
java
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.vitro.utilities.testrunner;
import static edu.cornell.mannlib.vitro.utilities.testrunner.SeleniumRunnerParameters.LOGFILE_NAME;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Run the Selenium test suites. Provide the properties file and perhaps an
* "interactive" flag.
*/
public class SeleniumRunner {
private final SeleniumRunnerParameters parms;
private final Listener listener;
private final UploadAreaCleaner uploadCleaner;
private final ModelCleaner modelCleaner;
private final SuiteRunner suiteRunner;
private final OutputManager outputManager;
public SeleniumRunner(SeleniumRunnerParameters parms) {
this.parms = parms;
this.listener = parms.getListener();
this.uploadCleaner = new UploadAreaCleaner(parms);
this.modelCleaner = new ModelCleaner(parms);
this.suiteRunner = new SuiteRunner(parms);
this.outputManager = new OutputManager(parms);
}
public boolean runSelectedSuites() {
boolean success;
try {
listener.runStarted();
outputManager.cleanOutputDirectory();
for (File suiteDir : parms.getSelectedSuites()) {
listener.suiteStarted(suiteDir);
try {
if (parms.isCleanModel()) {
modelCleaner.clean();
}
if (parms.isCleanUploads()) {
uploadCleaner.clean();
}
suiteRunner.runSuite(suiteDir);
} catch (IOException e) {
listener.suiteFailed(suiteDir, e);
} catch (CommandRunnerException e) {
listener.suiteFailed(suiteDir, e);
}
listener.suiteStopped(suiteDir);
}
listener.runEndTime();
Status status = outputManager.summarizeOutput();
success = (status == Status.OK);
} catch (IOException e) {
listener.runFailed(e);
success = false;
e.printStackTrace();
} catch (FatalException e) {
listener.runFailed(e);
success = false;
e.printStackTrace();
}
listener.runStopped();
return success;
}
private static void selectAllSuites(SeleniumRunnerParameters parms) {
List<File> suites = new ArrayList<File>();
for (File parentDir : parms.getSuiteParentDirectories()) {
suites.addAll(parms.findSuiteDirs(parentDir));
}
parms.setSelectedSuites(suites);
}
private static void usage(String message) {
System.out.println(message);
System.out.println("Usage is: SeleniumRunner <parameters_file> "
+ "[\"interactive\"]");
System.exit(1);
}
public static void main(String[] args) {
SeleniumRunnerParameters parms = null;
boolean interactive = false;
boolean success = false;
if ((args.length != 1) && (args.length != 2)) {
usage("Wrong number of arguments.");
}
if (args.length == 2) {
String option = args[1].trim();
if (option.length() > 0) {
if (!"interactive".equalsIgnoreCase(args[1])) {
usage("Invalid argument '" + args[1] + "'");
}
interactive = true;
}
}
try {
parms = new SeleniumRunnerParameters(args[0]);
} catch (IOException e) {
usage("Can't read properties file: " + e.getMessage());
}
if (interactive) {
// TODO hook up the GUI.
throw new RuntimeException("interactive mode not implemented.");
} else {
File logFile = new File(parms.getOutputDirectory(), LOGFILE_NAME);
System.out.println("Log file is '" + logFile.getPath() + "'");
// Run all of the suites.
// For each suite, clean the model and the upload area.
selectAllSuites(parms);
parms.setCleanModel(true);
parms.setCleanUploads(true);
System.out.println(parms);
SeleniumRunner runner = new SeleniumRunner(parms);
success = runner.runSelectedSuites();
}
System.exit(success ? 0 : -1);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
c83f1fe41b509277f8648dc1636112e737da3755
|
20d7a12575ffa0b3b3095a83a16f6c0b6a02e133
|
/src/main/java/cn/gtmap/estateplat/server/core/service/BdcSdService.java
|
fc7044fb5c4227ce0f3c043fb7b933e500e5a677
|
[] |
no_license
|
MrLiJun88/estateplat-service
|
937e52cb81951e411a0bc4c8317d93a3455227f8
|
0ba27a9251ce2cd712efe76f8cbe0b769b970cc9
|
refs/heads/master
| 2022-12-07T13:32:32.727808
| 2020-08-13T04:07:12
| 2020-08-13T04:07:12
| 287,170,568
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,374
|
java
|
package cn.gtmap.estateplat.server.core.service;
import cn.gtmap.estateplat.model.server.core.BdcBdcZsSd;
import cn.gtmap.estateplat.model.server.core.BdcXm;
import cn.gtmap.estateplat.model.server.core.GdBdcSd;
import cn.gtmap.estateplat.model.server.core.Project;
import java.util.List;
import java.util.Map;
/**
* @author <a href="mailto:xinghuajian@gtmap.cn">xinghuajian</a>
* @version 1.0, 2018-08-07
* @description 锁定服务
*/
public interface BdcSdService {
/**
* @author <a href="mailto:xinghuajian@gtmap.cn">xinghuajian</a>
* @param project
* @description 冻结流程根据project插入更新锁定信息
*/
void handleSdxxThroughWorkflow(final Project project,final String sqlxdm);
/**
* @author <a href="mailto:xinghuajian@gtmap.cn">xinghuajian</a>
* @param queryMap
* @description 查询不动产锁定的信息
*/
List<BdcBdcZsSd> queryBdcZsSdByMap(Map<String,Object> queryMap);
/**
* @author <a href="mailto:xinghuajian@gtmap.cn">xinghuajian</a>
* @param queryMap
* @description 查询过渡锁定的信息
*/
List<GdBdcSd> queryGdBdcSdByMap(Map<String,Object> queryMap);
/**
* @author <a href="mailto:xinghuajian@gtmap.cn">xinghuajian</a>
* @param bdcXm
* @description 根据proid去改变锁定状态
*/
void changeSdZt(BdcXm bdcXm);
/**
* @author <a href="mailto:xinghuajian@gtmap.cn">xinghuajian</a>
* @param project
* @description 处理不动产的锁定信息
*/
void handleBdcSdxx(final Project project,final String sdrName,final String sqlxdm);
/**
* @author <a href="mailto:xinghuajian@gtmap.cn">xinghuajian</a>
* @param project
* @description 处理过渡的锁定信息
*/
void handleGdSdxx(final Project project,final String sdrName,final String sqlxdm);
/**
* @author <a href="mailto:xinghuajian@gtmap.cn">xinghuajian</a>
* @param wiid
* @description 锁定流程删除流程就删除锁定数据
*/
void deleteSdxx(final String wiid);
/**
* @author <a href="mailto:xinghuajian@gtmap.cn">xinghuajian</a>
* @param wiid
* @description 解冻流程删除项目将信息还原成冻结状态
*/
void backSdStatus(final String wiid);
}
|
[
"1424146780@qq.com"
] |
1424146780@qq.com
|
6320f1019b8dfb9605943dac9cdb883950978681
|
7ce60ae831a4afcefe30b149ad5aa2a01c61280d
|
/Test Data/Comp401F16/Assignment12/Correct, Skeleton(skeleton)/Submission attachment(s)/Assignment12Skeleton/Assignment12Skeleton/src/grail/scanner/commands/DefineCommand.java
|
284709508ebdfb4a4bdc7c92a039a24bb7a77c33
|
[] |
no_license
|
pdewan/Comp401AllChecks
|
ed967cb535f1bf8c6d7777b7ca53bd6e810e5ba1
|
86d995defcdde2766329a6db37fdb7a54c70da4a
|
refs/heads/master
| 2023-06-26T13:01:27.009697
| 2023-06-12T06:05:01
| 2023-06-12T06:05:01
| 66,742,312
| 0
| 0
| null | 2022-06-30T14:43:42
| 2016-08-28T00:49:37
|
Java
|
UTF-8
|
Java
| false
| false
| 299
|
java
|
package grail.scanner.commands;
import grail.interfaces.BridgeSceneInterface;
import grail.interfaces.CommandThread;
import grail.interfaces.Table;
import util.annotations.Tags;
import util.misc.ThreadSupport;
@Tags({"DefineCommandObject"})
public class DefineCommand implements CommandThread{
}
|
[
"avitkus7@gmail.com"
] |
avitkus7@gmail.com
|
29efae0ffbd7a48aa7e68a572c5b62c66b147c0d
|
b6cb55c0dc6dd775805ff393b18daefa70c88c0f
|
/Express/src/kyle/leis/ds/report/finance/test/FinancereportTest.java
|
ceea76f98b7ce73712d1d5a83bf31d2f781dd282
|
[] |
no_license
|
haha541514/Express
|
d12ec127df2c6137792ef2724ac2239a27f0dd86
|
72e59fdea51fdba395f52575918ef1972e357cec
|
refs/heads/master
| 2021-04-03T06:50:28.984407
| 2018-03-08T09:04:09
| 2018-03-08T09:06:50
| 124,365,014
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,324
|
java
|
package kyle.leis.ds.report.finance.test;
import java.util.List;
import java.util.ArrayList;
import kyle.leis.ds.report.finance.da.FeegroupbyonylcoColumns;
import kyle.leis.ds.report.finance.da.FeegroupbyonylcoCondition;
import kyle.leis.ds.report.finance.dax.FinancereportDemand;
public class FinancereportTest {
public static void main(String[] args) {
try {
// System.out.println(queryFeegroupbyCo());
testIf();
// queryFeegroupbyCo();
} catch (Exception ex) {
ex.printStackTrace();
System.out.println(ex.getMessage());
}
}
public static void testIf() throws Exception {
List<String> list = new ArrayList<String>();
list.add("abc");
List<String> list2 = new ArrayList<String>();
list2.add("aaa");
for (int i = 0; i < list2.size(); i++) {
for (String str : list)
list2.add(str);
}
System.out.println("sss");
}
public static String queryFeegroupbyCo() throws Exception {
FeegroupbyonylcoCondition objFGCCondition = new FeegroupbyonylcoCondition();
//objFGCCondition.setEndadddate("2010-02-01");
List objList = FinancereportDemand.queryFeegroupOnlybyCo(objFGCCondition);
FeegroupbyonylcoColumns objColumns = (FeegroupbyonylcoColumns) objList.get(0);
System.out.println("=-============"+objColumns.getCoco_labelcode());
return objList.toString();
}
}
|
[
"541514716@qq.com"
] |
541514716@qq.com
|
c47b3726432b9d7700d83d4be128b14f28e8ee7a
|
7c754ae0a3eedc78e222fb5c57e52ba14e13d75b
|
/src/test/java/com/unittest/QuickBeforeAfterTest.java
|
ff3f6398aace87193fa4529f4d0bc72de6730e87
|
[] |
no_license
|
lakith/Handson---Mockito-and-JUnit
|
de3310313e2659e3335797288ddf29e09c05731b
|
8880716a728b9f2b58e88d676c9db136eaab24ec
|
refs/heads/main
| 2023-01-14T18:05:36.973668
| 2020-11-12T09:10:28
| 2020-11-12T09:10:28
| 304,235,525
| 1
| 1
| null | 2020-11-09T07:35:28
| 2020-10-15T06:50:04
|
Java
|
UTF-8
|
Java
| false
| false
| 792
|
java
|
package com.unittest;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
public class QuickBeforeAfterTest {
@BeforeClass
public static void beforeClass(){
System.out.println("Before Class");
}
@Before
public void setup(){
System.out.println("Before Test");
}
@Test
public void test1() {
System.out.println("test1 executed");
}
@Test
public void test2() {
System.out.println("test2 executed");
}
@After
public void teardown() {
System.out.println("After test");
}
@AfterClass
public static void afterClass(){
System.out.println("After Class");
}
}
|
[
"lakith1995@gmail.com"
] |
lakith1995@gmail.com
|
41640cc4c4d3e112b490fc245708142c9b8c1c55
|
1e9c3de13e09f00abd0c13f6df2acea38f7af872
|
/gatling-http-client/src/main/java/io/gatling/http/client/body/multipart/FileLikePart.java
|
b6f28e4746363c6a4ea9837411848ced4b696c33
|
[
"Apache-2.0",
"GPL-2.0-only",
"BSD-2-Clause",
"EPL-1.0",
"BSD-3-Clause",
"MIT",
"MPL-2.0"
] |
permissive
|
zengruitester/gatling
|
ddfc38812290639b0f0a34e8774e2c44b14ccb50
|
ff2fcd02802302e3d4ec6206f87c1a001dbccedc
|
refs/heads/master
| 2020-09-14T09:06:51.878624
| 2019-11-29T07:02:12
| 2019-11-29T07:02:12
| 223,084,628
| 0
| 0
|
Apache-2.0
| 2019-11-21T03:59:56
| 2019-11-21T03:59:53
| null |
UTF-8
|
Java
| false
| false
| 2,084
|
java
|
/*
* Copyright 2011-2019 GatlingCorp (https://gatling.io)
*
* 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 io.gatling.http.client.body.multipart;
import io.gatling.http.client.Param;
import io.gatling.http.client.util.MiscUtils;
import javax.activation.MimetypesFileTypeMap;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.List;
public abstract class FileLikePart<T> extends Part<T> {
private static final MimetypesFileTypeMap MIME_TYPES_FILE_TYPE_MAP;
static {
try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("gatling-mime.types")) {
MIME_TYPES_FILE_TYPE_MAP = new MimetypesFileTypeMap(is);
} catch (IOException e) {
throw new ExceptionInInitializerError(e);
}
}
private final String fileName;
FileLikePart(String name, T content, Charset charset, String transferEncoding, String contentId, String dispositionType, String contentType, List<Param> customHeaders, String fileName) {
super(name,
content,
charset,
transferEncoding,
contentId,
dispositionType,
computeContentType(contentType, fileName),
customHeaders
);
this.fileName = fileName;
}
private static String computeContentType(String contentType, String fileName) {
return contentType != null ? contentType : MIME_TYPES_FILE_TYPE_MAP.getContentType(MiscUtils.withDefault(fileName, ""));
}
public String getFileName() {
return fileName;
}
}
|
[
"slandelle@gatling.io"
] |
slandelle@gatling.io
|
4affd464fc847add795b3b2a152f47fead246078
|
af8f2d1b600d794aea496f5f8005a20ed016960b
|
/basedata/trunk/src/java/net/zdsoft/basedata/remote/dao/BaseRemoteFeedbackDao.java
|
06f8b44efc4b7a4d9b76451c64b13fbe68645a70
|
[] |
no_license
|
thyjxcf/learn
|
46c033f8434c0b0b0809e2a6b1d5601910b36c0d
|
99b9e04aa9c0e7ee00571dffb8735283cf33b1c1
|
refs/heads/master
| 2021-01-06T20:43:53.071081
| 2017-09-15T10:11:53
| 2017-09-15T10:11:53
| 99,546,817
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 174
|
java
|
package net.zdsoft.basedata.remote.dao;
import net.zdsoft.eis.base.common.entity.Feedback;
public interface BaseRemoteFeedbackDao {
void addFeedback(Feedback... fb);
}
|
[
"1129820421@qq.com"
] |
1129820421@qq.com
|
444901f1e6ebde97867cc926c9c80a280e8b14d5
|
608a0c57191d90fb49dffa8eae3bd67b3a4d03a3
|
/SpringMVCProject2/src/main/java/com/sist/myapp/BoardController.java
|
2f2cc37dac648f5c213fe5f4a7e3cf5af322c911
|
[] |
no_license
|
JaeHyukSim/spring
|
322cdb739dedb706e894790e870a9c6afd04d665
|
ae7201441c682f69a40f37953770bc4e0674ba13
|
refs/heads/master
| 2022-07-23T13:50:32.398488
| 2020-05-20T07:51:18
| 2020-05-20T07:51:18
| null | 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,147
|
java
|
package com.sist.myapp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.*;
import com.sist.dao.*;
@Controller
public class BoardController {
@Autowired
private BoardDAO dao;
@GetMapping("board/list.do")
public String board_list(Model model,String page)
{
// 매개변수 => 사용자의 요청값을 받는다
if(page==null)
page="1";
int curpage=Integer.parseInt(page);
//int curpage=page;
int rowSize=10;
int start=(rowSize*curpage)-(rowSize-1);
int end=rowSize*curpage;
Map map=new HashMap();
map.put("start", start);
map.put("end", end);
List<BoardVO> list=dao.boardListData(map);
int totalpage=dao.boardTotalPage();
//////// 요청에 대한 처리
model.addAttribute("list", list);
model.addAttribute("curpage", curpage);
model.addAttribute("totalpage", totalpage);
//// 처리된 결과값 전송
return "board/list";
}
// http://localhost/myapp/board/insert.do
@GetMapping("board/insert.do")
public String board_insert()
{
return "board/insert";
}
@PostMapping("board/insert_ok.do")
public String board_insert_ok(BoardVO vo)
{
// dao연결
dao.boardInsert(vo);
return "redirect:../board/list.do";
}
@GetMapping("board/detail.do")
public String board_detail(Model model,int no)
{
BoardVO vo=dao.boardDetailData(no);
model.addAttribute("vo", vo);
return "board/detail";
}
@GetMapping("board/update.do")
public String board_update(Model model,int no)
{
BoardVO vo=dao.boardUpdateData(no);
model.addAttribute("vo", vo);
return "board/update";
}
@GetMapping("board/delete.do")
public String board_delete(Model model,int no)
{
model.addAttribute("no", no);
return "board/delete";
}
}
|
[
"vcandjava@nate.com"
] |
vcandjava@nate.com
|
067e8506f7c11eae0e133cdc948ab8716607db39
|
9ed918fac39f617d38194b96a3476c3a64b3bd4f
|
/JavaLab/Java/Exer/src/Exer2/C3.java
|
ae9b1631e366e2b19f01beb8d0257f1e0c2adb43
|
[] |
no_license
|
quanghuynguyen2412/FPTU
|
e1a85cb4632ec8cea8e86568a0cf1b1bf45211c1
|
d9f6f8a613b42148f5a4ea37d6dc224434e78cbd
|
refs/heads/master
| 2022-04-17T10:51:36.203986
| 2020-04-17T10:22:51
| 2020-04-17T10:22:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,082
|
java
|
package Exer2;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.StringTokenizer;
public class C3 {
static class Computer {
String name;
String configuration;
double price;
public Computer() {
}
public Computer(String name, String configuration, double price) {
this.name = name;
this.configuration = configuration;
this.price = price;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getConfiguration() {
return configuration;
}
public void setConfiguration(String configuration) {
this.configuration = configuration;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
@Override
public String toString() {
return name + " " + configuration.replace("+", " ") + " " + price;
}
}
static class myComputer implements iComputer {
@Override
public void f1(List<Computer> a, double price) {
for (int i = 0; i < a.size(); i++) {
double temp = a.get(i).getPrice();
if (temp < price) {
temp = temp + temp * 10 / 100;
System.out.println(a.get(i).getName() + " " + temp);
}
}
}
@Override
public String f2(List<Computer> a, String configuration) {
String name = a.get(0).getName();
int[] x = new int[4];
int[] y = new int[4];
deCoding(configuration, x);
deCoding(a.get(0).getConfiguration(), y);
boolean update = false;
int position = 0;
int minChip = Math.abs(y[0] - x[0]);
int minRam = Math.abs(y[1] - x[1]);
int minHDD = Math.abs(y[2] - x[2]);
int minVga = Math.abs(y[3] - x[3]);
for (int i = 0; i < a.size(); i++) {
deCoding(a.get(i).getConfiguration(), y);
if (Math.abs(y[0] - x[0]) < minChip) {
update = true;
} else if (Math.abs(y[0] - x[0]) == minChip) {
if (Math.abs(y[1] - x[1]) < minRam) {
update = true;
} else if (Math.abs(y[1] - x[1]) == minRam) {
if (Math.abs(y[2] - x[2]) < minHDD) {
update = true;
} else if (Math.abs(y[2] - x[2]) == minHDD) {
if (Math.abs(y[3] - x[3]) < minVga) {
update = true;
} else if (Math.abs(y[3] - x[3]) == minVga) {
update = true;// Tim cau hinh cuoi cung trong list gan voi cau hinh dua vao
}
}
}
}
if (update) {
minChip = Math.abs(y[0] - x[0]);
minRam = Math.abs(y[1] - x[1]);
minHDD = Math.abs(y[2] - x[2]);
minVga = Math.abs(y[3] - x[3]);
position = i;
name = a.get(i).getName();
}
}
return name;
}
private void deCoding(String configuration, int[] x) {
String[] s1 = configuration.split("\\+");
// StringTokenizer st = new StringTokenizer(configuration, "+");
for (int i = 0; i < s1.length; i++) {
x[i] = Integer.parseInt(s1[i].trim());
}
}
}
public static void main(String[] args) {
System.out.print("Enter number of computer: ");
Scanner sc = new Scanner(System.in);
ArrayList<Computer> v = new ArrayList();
int n = Integer.parseInt(sc.nextLine());
for (int i = 0; i < n; i++) {
System.out.print("Enter name: ");
String name = sc.nextLine();
System.out.print("Enter configuration: ");
String configuration = sc.nextLine();
System.out.print("Enter price: ");
double price = Double.parseDouble(sc.nextLine());
v.add(new Computer(name, configuration, price));
}
System.out.print("Enter price1");
double price1 = Integer.parseInt(sc.nextLine());
System.out.print("Enter type: ");
int c = Integer.parseInt(sc.nextLine());
iComputer i = new myComputer();
System.out.print("Enter configuration: ");
String configuration1 = sc.nextLine();
if (c == 1) {
System.out.print("OUTPUT of f1:");
i.f1(v, price1);
} else if (c == 2) {
System.out.print("OUTPUT of f2: ");
System.out.println(i.f2(v, configuration1));
}
}
}
|
[
"="
] |
=
|
4d97f31ad82c361a69cdcb0aa48def9678f26e25
|
a7ce44e1c5c621335069921bd5f6b83616189ea7
|
/src/main/java/com/irurueta/navigation/inertial/wmm/WMMLoader.java
|
53a7c02305261557493845997c704504fdf4db59
|
[
"Apache-2.0"
] |
permissive
|
yxw027/irurueta-navigation-inertial
|
3f9c88a0b32fb7d315d209b77faa0cf4ed492332
|
78952c3bb49af90cd538a394aefa00b9202bb798
|
refs/heads/master
| 2023-03-26T16:17:48.305336
| 2021-03-25T08:53:53
| 2021-03-25T08:53:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,280
|
java
|
/*
* Copyright (C) 2020 Alberto Irurueta Carro (alberto@irurueta.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 com.irurueta.navigation.inertial.wmm;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StreamTokenizer;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* Loads a WWM from a file of coefficients.
* The file of coefficients is updated every 5 years and can be obtained
* at: https://www.ngdc.noaa.gov/geomag/WMM/
*
* @see WorldMagneticModel
*/
public class WMMLoader {
/**
* Maximum allowed value within file of coefficients.
*/
private static final double MAX_VAL = 9999.0;
/**
* Number of coefficients.
*/
private static final int N = WorldMagneticModel.N;
/**
* Loads World Magnetic Model from provided resource name.
* Resource will be resolved an loaded using current class loader.
*
* @param resource a resource name.
* @return a World Magnetic Model containing all required coefficients.
* @throws IOException if an I/O error occurs.
*/
public static WorldMagneticModel loadFromResource(final String resource) throws IOException {
try(final InputStream stream = WMMLoader.class
.getResourceAsStream(resource)) {
return load(stream);
}
}
/**
* Loads World Magnetic Model from provided URL.
* Data will be requested with a "GET" method without additional headers.
*
* @param url URL to request data from.
* @return a World Magnetic Model containing all required coefficients.
* @throws IOException if an I/O error occurs.
*/
public static WorldMagneticModel loadFromUrl(final String url)
throws IOException {
return load(new URL(url));
}
/**
* Loads World Magnetic Model from provided file path.
*
* @param filePath a file path.
* @return a World Magnetic Model containing all required coefficients.
* @throws IOException if an I/O error occurs.
*/
public static WorldMagneticModel loadFromFile(final String filePath)
throws IOException {
try (final FileInputStream stream = new FileInputStream(filePath)) {
return load(stream);
}
}
/**
* Loads World Magnetic Model from provided URL.
* Data will be requested with a "GET" method without additional headers.
*
* @param url URL to request data from.
* @return a World Magnetic Model containing all required coefficients.
* @throws IOException if an I/O error occurs.
*/
public static WorldMagneticModel load(final URL url) throws IOException {
final HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
try (final InputStream stream = connection.getInputStream()) {
return load(stream);
}
}
/**
* Loads World Magnetic Model from provided file.
*
* @param file a file.
* @return a World Magnetic Model containing all required coefficients.
* @throws IOException if an I/O error occurs.
*/
public static WorldMagneticModel load(final File file)
throws IOException {
try (final FileInputStream stream = new FileInputStream(file)) {
return load(stream);
}
}
/**
* Loads World Magnetic Model from provided stream of data.
*
* @param stream a stream of data.
* @return a World Magnetic Model containing all required coefficients.
* @throws IOException if an I/O error occurs.
*/
public static WorldMagneticModel load(final InputStream stream)
throws IOException {
try (final Reader reader = new InputStreamReader(stream)) {
WorldMagneticModel result = new WorldMagneticModel();
final StreamTokenizer tokenizer = new StreamTokenizer(reader);
// Read World Magnetic Model spherical harmonic coefficients
result.snorm[0] = 1.0;
result.c[0][0] = 0.0;
result.cd[0][0] = 0.0;
tokenizer.nextToken();
result.epoch = tokenizer.nval;
tokenizer.nextToken();
tokenizer.nextToken();
// loop to get data from file
while (true) {
tokenizer.nextToken();
if (tokenizer.nval >= MAX_VAL) {
// end of file
break;
}
final int n = (int) tokenizer.nval;
tokenizer.nextToken();
final int m = (int) tokenizer.nval;
tokenizer.nextToken();
final double gnm = tokenizer.nval;
tokenizer.nextToken();
final double hnm = tokenizer.nval;
tokenizer.nextToken();
final double dgnm = tokenizer.nval;
tokenizer.nextToken();
final double dhnm = tokenizer.nval;
if (m <= n) {
result.c[m][n] = gnm;
result.cd[m][n] = dgnm;
if (m != 0) {
result.c[n][m - 1] = hnm;
result.cd[n][m - 1] = dhnm;
}
}
}
// convert Schmidt normalized Gauss coefficients to unnormalized
result.snorm[0] = 1.0;
for (int n = 1; n <= WorldMagneticModel.MAX_ORDER; n++) {
result.snorm[n] = result.snorm[n - 1] * (2 * n - 1) / n;
int j = 2;
for (int m = 0, D1 = 1, D2 = (n - m + D1) / D1; D2 > 0; D2--, m += D1) {
result.k[m][n] = (double) (((n - 1) * (n - 1)) - (m * m)) / (double) ((2 * n - 1) * (2 * n - 3));
if (m > 0) {
double flnmj = ((n - m + 1) * j) / (double) (n + m);
result.snorm[n + m * N] = result.snorm[n + (m - 1) * N] * Math.sqrt(flnmj);
j = 1;
result.c[n][m - 1] = result.snorm[n + m * N] * result.c[n][m - 1];
result.cd[n][m - 1] = result.snorm[n + m * N] * result.cd[n][m - 1];
}
result.c[m][n] = result.snorm[n + m * N] * result.c[m][n];
result.cd[m][n] = result.snorm[n + m * N] * result.cd[m][n];
} //for(m...)
result.fn[n] = (n + 1);
result.fm[n] = n;
}
result.k[1][1] = 0.0;
return result;
}
}
}
|
[
"alberto@irurueta.com"
] |
alberto@irurueta.com
|
7dd1a92eca966d5719a1934ba25dc6bfd37d6054
|
b75cc09bda54e7b50aeb66770195cdc541f68314
|
/star-common/src/main/java/com/star/framework/specification/result/v2/ErrorResultMessage.java
|
338acd3f66660c73526f6d32c8f953b512825b45
|
[] |
no_license
|
284288787/px
|
46de9f5c57daaaee2084ca350065910e8164c053
|
f78f88c6c076ef1861e6adf2ace1322c8e271abb
|
refs/heads/master
| 2022-11-22T04:29:55.019609
| 2020-08-27T09:42:14
| 2020-08-27T09:42:14
| 161,508,370
| 0
| 0
| null | 2022-11-16T06:28:23
| 2018-12-12T15:34:49
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,448
|
java
|
/**create by liuhua at 2017年6月1日 下午4:58:45**/
package com.star.framework.specification.result.v2;
import com.star.framework.specification.Constants;
import com.star.framework.specification.FailureCode;
public class ErrorResultMessage extends ResultMessage {
/**
* 当接口访问不能获取想要的正确结果,则用errorCode标识详细错误代码
* 错误代码参考com.huinong.commerce.specification.FailureCode
*/
private String errorCode;
/**
* errorCode有值,则此属性必有值
* 参考 com.huinong.commerce.specification.FailureCode
*/
private String errorMessage;
public ErrorResultMessage(FailureCode failureCode, Object... args){
this.setStatus(Constants.RESULT_ERROR);
this.errorCode = failureCode.getCode();
this.errorMessage = String.format(failureCode.getMessage(), args);
}
/**
* 接口调用异常时,应返回错误状态 及 错误状态码
* @param message
* @param failureCode
* @param args
*/
public ErrorResultMessage(String errorCode, String errorMessage){
this.setStatus(Constants.RESULT_ERROR);
this.errorCode = errorCode;
this.errorMessage = errorMessage;
}
public String getErrorCode() {
return errorCode;
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
}
|
[
"3158459@qq.com"
] |
3158459@qq.com
|
3cd080c9736ef7715bfc35f8cba8f7e62f9a010f
|
3464004c6217bb20907a3ab1372c22635809b011
|
/jms-ws-domain/src/main/java/com/jms/domain/ws/s/WSMrpNo.java
|
28e80e42ac0a71930a1a592fd739e130425e7e93
|
[] |
no_license
|
jmsCompany/jms-server1
|
d675385c22566f6c3b2108aef36d44508924fe95
|
50bef61d1a8929e5d5e71ec4994b23eef9c241ef
|
refs/heads/master
| 2021-01-19T09:29:30.420778
| 2017-08-29T07:03:21
| 2017-08-29T07:03:21
| 87,761,894
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 694
|
java
|
package com.jms.domain.ws.s;
import java.util.ArrayList;
import java.util.List;
public class WSMrpNo {
private List<Long> ids = new ArrayList<Long>();
private List<Long> aqtys = new ArrayList<Long>();
private Long type;
private Long poType;
public List<Long> getIds() {
return ids;
}
public void setIds(List<Long> ids) {
this.ids = ids;
}
public Long getType() {
return type;
}
public void setType(Long type) {
this.type = type;
}
public Long getPoType() {
return poType;
}
public void setPoType(Long poType) {
this.poType = poType;
}
public List<Long> getAqtys() {
return aqtys;
}
public void setAqtys(List<Long> aqtys) {
this.aqtys = aqtys;
}
}
|
[
"h-t-ren@icloud.com"
] |
h-t-ren@icloud.com
|
029abd00cb8a0d8a6cb9f655ba95b7740f9aa2cb
|
14e0386f0abc685f7d8b0a302200469495aedd8c
|
/weixin-qydev/src/main/java/org/jzb/weixin/work/contact/UserSimpleListResponse.java
|
487475a56f5f4700f548a7f741c7ec800e84114e
|
[] |
no_license
|
ixtf/social-sdk
|
8c88694ec23a77badaf5dd23492006e2340fa805
|
dfc853293a3c9dc194ed12bbf5b455664707eeb9
|
refs/heads/master
| 2021-05-12T19:38:48.838951
| 2018-05-26T06:03:41
| 2018-05-26T06:03:41
| 117,099,863
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,256
|
java
|
package org.jzb.weixin.work.contact;
import com.fasterxml.jackson.databind.JsonNode;
import org.jzb.weixin.work.AgentClient;
import org.jzb.weixin.work.contact.AbstractUser;
import org.jzb.weixin.work.contact.User;
import java.util.Optional;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
/**
* 描述:
*
* @author jzb 2017-10-28
*/
public class UserSimpleListResponse {
protected final AgentClient client;
protected final JsonNode node;
public UserSimpleListResponse(AgentClient client, JsonNode node) {
this.client = client;
this.node = node;
}
public Stream<UserSimpleListResponse_User> userlist() {
return Optional.ofNullable(node)
.map(it -> it.get("userlist"))
.map(it -> StreamSupport.stream(it.spliterator(), true)
.map(AbstractUser::userSimple)
)
.orElse(null);
}
public boolean isSuccessed() {
return errcode() == 0;
}
public int errcode() {
return node.get("errcode").asInt();
}
public String errmsg() {
return node.get("errcode").asText();
}
public long msgid() {
return node.get("errcode").asLong();
}
}
|
[
"ixtf1984@gmail.com"
] |
ixtf1984@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.