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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
04aa50b4c2999c72b7accaf2e9dc0e6d5a03a1b3
|
7b0521dfb4ec76ee1632b614f32ee532f4626ea2
|
/src/main/java/alcoholmod/Mathioks/Jinshuriki/JinshurikiYugitoSpawn.java
|
eecdf997a108b75917016108553db89bcc61a40f
|
[] |
no_license
|
M9wo/NarutoUnderworld
|
6c5be180ab3a00b4664fd74f6305e7a1b50fe9fc
|
948065d8d43b0020443c0020775991b91f01dd50
|
refs/heads/master
| 2023-06-29T09:27:24.629868
| 2021-07-27T03:18:08
| 2021-07-27T03:18:08
| 389,832,397
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,312
|
java
|
package alcoholmod.Mathioks.Jinshuriki;
import alcoholmod.Mathioks.AlcoholMod;
import cpw.mods.fml.common.registry.EntityRegistry;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.world.biome.BiomeGenBase;
public class JinshurikiYugitoSpawn {
public static void mainRegistry() {
registerEntity();
}
public static void registerEntity() {
createEntity(JinshurikiYugito.class, "JinshurikiYugitoModel Mob", 328965, 11207941);
}
public static void createEntity(Class entityClass, String entityName, int solidColor, int spotColor) {
int randomId = EntityRegistry.findGlobalUniqueEntityId();
EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
EntityRegistry.registerModEntity(entityClass, entityName, randomId, AlcoholMod.modInstance, 64, 1, true);
EntityRegistry.addSpawn(entityClass, 1, 0, 1, EnumCreatureType.monster, new BiomeGenBase[] { BiomeGenBase.frozenOcean, BiomeGenBase.ocean, BiomeGenBase.beach, BiomeGenBase.deepOcean });
createEgg(randomId, solidColor, spotColor);
}
private static void createEgg(int randomid, int solidColor, int spotColor) {
EntityList.entityEggs.put(Integer.valueOf(randomid), new EntityList.EntityEggInfo(randomid, solidColor, spotColor));
}
}
|
[
"mrkrank2023@gmail.com"
] |
mrkrank2023@gmail.com
|
2855741107b4d6cdd7c6356e46fb3e4948d5d016
|
f5bec4af2ae7f09c7a229ca89771f2bde95b9ba2
|
/source/第三章代码/TestProject11/common/src/module-info.java
|
6dc935db2fb3c3e906e4936aa97210e9cafa1712
|
[] |
no_license
|
plter/JavaBasicCourse2020
|
63413f686a3ed17739aed35d4263bb6fab05d5e7
|
65a1e084491d41b63891edf8a7300c9a35325d68
|
refs/heads/master
| 2023-02-18T00:42:37.134999
| 2021-01-20T03:05:16
| 2021-01-20T03:05:16
| 284,917,271
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 304
|
java
|
module common {
//编译时期 运行时期 --> exports 表示在这两个时期 都可以对外提供
exports top.yunp.utils;
//只能在 运行时期 通过反射操作 来获取当前类 进行创建对象等操作
// opens top.yunp.domain;
exports top.yunp.javabean;
}
|
[
"xtiqin@163.com"
] |
xtiqin@163.com
|
5545e7ec57a790331be1302cf4f802665f06ddbc
|
e1e5bd6b116e71a60040ec1e1642289217d527b0
|
/H5/L2jSunrise_com/L2jSunrise_com_2019_09_16/L2J_SunriseProject_Core/java/l2r/gameserver/model/VehiclePathPoint.java
|
07b96a2e5aeea71095849aeb0b7f729d6d87ae61
|
[] |
no_license
|
serk123/L2jOpenSource
|
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
|
603e784e5f58f7fd07b01f6282218e8492f7090b
|
refs/heads/master
| 2023-03-18T01:51:23.867273
| 2020-04-23T10:44:41
| 2020-04-23T10:44:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,335
|
java
|
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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 l2r.gameserver.model;
public final class VehiclePathPoint extends Location
{
private final int _moveSpeed;
private final int _rotationSpeed;
public VehiclePathPoint(int x, int y, int z)
{
super(x, y, z);
_moveSpeed = 350;
_rotationSpeed = 4000;
}
public VehiclePathPoint(int x, int y, int z, int moveSpeed, int rotationSpeed)
{
super(x, y, z);
_moveSpeed = moveSpeed;
_rotationSpeed = rotationSpeed;
}
public int getMoveSpeed()
{
return _moveSpeed;
}
public int getRotationSpeed()
{
return _rotationSpeed;
}
}
|
[
"64197706+L2jOpenSource@users.noreply.github.com"
] |
64197706+L2jOpenSource@users.noreply.github.com
|
1b952d74cb364e79a21ea2dd50ad343bc7879e21
|
d115cd847aa60df6fcca8a2cf4af684cf0a5bc47
|
/api-gateway/src/main/java/com/blueskykong/gateway/GatewayApplication.java
|
d59b27d78d920fd0e62091d633b8dc51c1d89214
|
[] |
no_license
|
visionwang/Spring-Boot-Samples
|
ce494702e21051868ea0b82e7171cd39f64d6197
|
6913c82597af9ff780ac35ec11f527cc94b8e771
|
refs/heads/master
| 2021-08-28T11:47:36.651599
| 2017-12-12T04:53:46
| 2017-12-12T04:53:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 551
|
java
|
package com.blueskykong.gateway;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
/**
* @author keets
* @date 2017/11/13
*/
@SpringBootApplication
@EnableDiscoveryClient
@EnableZuulProxy
public class GatewayApplication {
public static void main(String[] args) {
SpringApplication.run(GatewayApplication.class, args);
}
}
|
[
"928420597@qq.com"
] |
928420597@qq.com
|
e2cb972739241506ff7b5e1b3214a08b854646a8
|
7480ac81baf88646e23fb1a493742cf783f82867
|
/src/main/java/com/feed_the_beast/mods/money/net/MessageBuy.java
|
0689ea5557c8e81be14e947bc447ee4af5edfb02
|
[] |
no_license
|
Slowwloriss/FTB-Money
|
75a5f4617aef89b90bffb71363eee2a9689ddb66
|
61d46a733cded264336ad1c4b6b5165cb5d715fa
|
refs/heads/master
| 2020-04-12T22:59:36.983754
| 2018-12-20T01:56:40
| 2018-12-20T01:56:40
| 162,804,828
| 0
| 0
| null | 2018-12-22T11:14:26
| 2018-12-22T11:14:26
| null |
UTF-8
|
Java
| false
| false
| 1,888
|
java
|
package com.feed_the_beast.mods.money.net;
import com.feed_the_beast.ftblib.lib.io.DataIn;
import com.feed_the_beast.ftblib.lib.io.DataOut;
import com.feed_the_beast.ftblib.lib.net.MessageToServer;
import com.feed_the_beast.ftblib.lib.net.NetworkWrapper;
import com.feed_the_beast.mods.money.FTBMoney;
import com.feed_the_beast.mods.money.shop.Shop;
import com.feed_the_beast.mods.money.shop.ShopEntry;
import com.feed_the_beast.mods.money.shop.ShopTab;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.ItemHandlerHelper;
/**
* @author LatvianModder
*/
public class MessageBuy extends MessageToServer
{
private int tab;
private int id;
private int count;
public MessageBuy()
{
}
public MessageBuy(ShopEntry e, int c)
{
tab = e.tab.getIndex();
id = e.getIndex();
count = c;
}
@Override
public NetworkWrapper getWrapper()
{
return FTBMoneyNetHandler.NET;
}
@Override
public void writeData(DataOut data)
{
data.writeVarInt(tab);
data.writeVarInt(id);
data.writeVarInt(count);
}
@Override
public void readData(DataIn data)
{
tab = data.readVarInt();
id = data.readVarInt();
count = data.readVarInt();
}
@Override
public void onMessage(EntityPlayerMP player)
{
ShopTab t = Shop.SERVER.tabs.get(tab);
ShopEntry entry = t.entries.get(id);
long money = FTBMoney.getMoney(player);
if (money >= entry.buy * count && entry.isUnlocked(player))
{
ItemStack stack = entry.stack;
if (stack.getCount() * count <= stack.getMaxStackSize())
{
ItemHandlerHelper.giveItemToPlayer(player, ItemHandlerHelper.copyStackWithSize(stack, stack.getCount() * count));
}
else
{
for (int i = 0; i < count; i++)
{
ItemHandlerHelper.giveItemToPlayer(player, stack.copy());
}
}
FTBMoney.setMoney(player, money - entry.buy * count);
}
}
}
|
[
"latvianmodder@gmail.com"
] |
latvianmodder@gmail.com
|
bba153f4e72391c99ba8ec2f6f88806b32cdd433
|
952789d549bf98b84ffc02cb895f38c95b85e12c
|
/V_2.x/Meta/trunk/it.eng.spagobi.meta.oda/src/it/eng/spagobi/meta/oda/impl/Driver.java
|
5a873e5fbdaf7f07a84103de1af1a525d06ac7ff
|
[] |
no_license
|
emtee40/testingazuan
|
de6342378258fcd4e7cbb3133bb7eed0ebfebeee
|
f3bd91014e1b43f2538194a5eb4e92081d2ac3ae
|
refs/heads/master
| 2020-03-26T08:42:50.873491
| 2015-01-09T16:17:08
| 2015-01-09T16:17:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,640
|
java
|
/**
SpagoBI - The Business Intelligence Free Platform
Copyright (C) 2005-2011 Engineering Ingegneria Informatica S.p.A.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
**/
package it.eng.spagobi.meta.oda.impl;
import org.eclipse.datatools.connectivity.oda.IConnection;
import org.eclipse.datatools.connectivity.oda.IDriver;
import org.eclipse.datatools.connectivity.oda.LogConfiguration;
import org.eclipse.datatools.connectivity.oda.OdaException;
import org.eclipse.datatools.connectivity.oda.util.manifest.DataTypeMapping;
import org.eclipse.datatools.connectivity.oda.util.manifest.ExtensionManifest;
import org.eclipse.datatools.connectivity.oda.util.manifest.ManifestExplorer;
/**
* Implementation class of IDriver for an ODA runtime driver.
*
* @authors Andrea Gioia (andrea.gioia@eng.it)
*/
public class Driver implements IDriver
{
static String ODA_DATA_SOURCE_ID = "it.eng.spagobi.meta.oda"; //$NON-NLS-1$
/*
* @see org.eclipse.datatools.connectivity.oda.IDriver#getConnection(java.lang.String)
*/
public IConnection getConnection( String dataSourceType ) throws OdaException
{
// assumes that this driver supports only one type of data source,
// ignores the specified dataSourceType
return new Connection();
}
/*
* @see org.eclipse.datatools.connectivity.oda.IDriver#setLogConfiguration(org.eclipse.datatools.connectivity.oda.LogConfiguration)
*/
public void setLogConfiguration( LogConfiguration logConfig ) throws OdaException
{
// do nothing; assumes simple driver has no logging
}
/*
* @see org.eclipse.datatools.connectivity.oda.IDriver#getMaxConnections()
*/
public int getMaxConnections() throws OdaException
{
return 0; // no limit
}
/*
* @see org.eclipse.datatools.connectivity.oda.IDriver#setAppContext(java.lang.Object)
*/
public void setAppContext( Object context ) throws OdaException
{
// do nothing; assumes no support for pass-through context
}
/**
* Returns the object that represents this extension's manifest.
* @throws OdaException
*/
static ExtensionManifest getManifest()
throws OdaException
{
return ManifestExplorer.getInstance()
.getExtensionManifest( ODA_DATA_SOURCE_ID );
}
/**
* Returns the native data type name of the specified code, as
* defined in this data source extension's manifest.
* @param nativeTypeCode the native data type code
* @return corresponding native data type name
* @throws OdaException if lookup fails
*/
static String getNativeDataTypeName( int nativeDataTypeCode )
throws OdaException
{
DataTypeMapping typeMapping =
getManifest().getDataSetType( null )
.getDataTypeMapping( nativeDataTypeCode );
if( typeMapping != null )
return typeMapping.getNativeType();
return "Non-defined";
}
}
|
[
"gioia@99afaf0d-6903-0410-885a-c66a8bbb5f81"
] |
gioia@99afaf0d-6903-0410-885a-c66a8bbb5f81
|
e230273efe4a900bbf671983a0ae00f192baaa91
|
0c2e2e06c56ec0e05ddb74679fdfe6c4404274b1
|
/design-patterns/src/main/java/com/sda/patterns/creational/builder3/BrickHouseBuilder.java
|
85731282b41bbfb594e48ed35fd2a56eb9c8db82
|
[] |
no_license
|
cosminbucur/sda-upskill
|
d9ef46237c3cc93a25219b9ecbca60d0b7d5d14b
|
71fcab3705a8fb8c72bfa7dfa33d17fbde6a31fd
|
refs/heads/master
| 2023-08-11T20:19:51.710710
| 2021-09-11T20:16:18
| 2021-09-11T20:16:18
| 333,095,665
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 555
|
java
|
package com.sda.patterns.creational.builder3;
public class BrickHouseBuilder implements HouseBuilder {
private House house;
public BrickHouseBuilder() {
this.house = new House();
}
@Override
public void buildFoundation() {
house.setFoundation("brick");
}
@Override
public void buildStructure() {
house.setStructure("brick");
}
@Override
public void buildRoof() {
house.setRoof("brick");
}
@Override
public House getHouse() {
return this.house;
}
}
|
[
"cosmin.bucur@kambi.com"
] |
cosmin.bucur@kambi.com
|
fd91c2b4b865f1973b5b81db9db87d5bbd92c471
|
0214aadd5265a9a280c73e7e5a0950104e9c5ecb
|
/template-maven/mvc-runtime-core/src/main/java/net/zoneland/mvc/runtime/core/velocity/VelocityToolboxView.java
|
d613261a9931e03653a649e7af563b71a13f2ba4
|
[] |
no_license
|
foodoon-guda/guda
|
d78d7375895cc7e0edfa2496d3f2df986cceaf30
|
df7fd7eaa50b0d610b050d588455aeb120b85aed
|
refs/heads/master
| 2016-09-05T12:25:23.620070
| 2014-07-28T05:14:00
| 2014-07-28T05:14:00
| 21,302,564
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,186
|
java
|
/**
* zoneland.net Inc.
* Copyright (c) 2002-2012 All Rights Reserved.
*/
package net.zoneland.mvc.runtime.core.velocity;
import java.io.InputStream;
import java.util.Iterator;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.zoneland.mvc.runtime.core.uribox.DefaultURIBox;
import net.zoneland.mvc.runtime.core.uribox.URIBox;
import net.zoneland.mvc.runtime.core.uribox.URIBoxManager;
import org.apache.velocity.context.Context;
import org.apache.velocity.tools.Scope;
import org.apache.velocity.tools.ToolManager;
import org.apache.velocity.tools.config.FileFactoryConfiguration;
import org.apache.velocity.tools.config.XmlFactoryConfiguration;
import org.apache.velocity.tools.view.ViewToolContext;
import org.springframework.web.servlet.view.velocity.VelocityLayoutView;
/**
*
* @author ypz
* @version $Id: VelocityToolboxView.java, v 0.1 2012-5-17 下午04:08:08 ypz Exp $
*/
public class VelocityToolboxView extends VelocityLayoutView {
public static final String defaultUrl = "http://localhost";
public static final String defaultServerName = "homeServer";
private DefaultURIBox defaultBox = null;
@Override
protected Context createVelocityContext(Map<String, Object> model, HttpServletRequest request,
HttpServletResponse response) throws Exception {
ViewToolContext ctx;
ctx = new ViewToolContext(getVelocityEngine(), request, response, getServletContext());
ctx.putAll(model);
if (this.getToolboxConfigLocation() != null) {
ToolManager tm = new ToolManager();
tm.setVelocityEngine(getVelocityEngine());
ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
InputStream input = currentClassLoader.getResourceAsStream(getToolboxConfigLocation());
FileFactoryConfiguration config = new XmlFactoryConfiguration(false);
config.read(input);
tm.configure(config);
if (tm.getToolboxFactory().hasTools(Scope.REQUEST)) {
ctx.addToolbox(tm.getToolboxFactory().createToolbox(Scope.REQUEST));
}
if (tm.getToolboxFactory().hasTools(Scope.APPLICATION)) {
ctx.addToolbox(tm.getToolboxFactory().createToolbox(Scope.APPLICATION));
}
if (tm.getToolboxFactory().hasTools(Scope.SESSION)) {
ctx.addToolbox(tm.getToolboxFactory().createToolbox(Scope.SESSION));
}
}
return ctx;
}
/**
* @see org.springframework.web.servlet.view.velocity.VelocityView#exposeHelpers(org.apache.velocity.context.Context, javax.servlet.http.HttpServletRequest)
*/
@Override
protected void exposeHelpers(Context velocityContext, HttpServletRequest request)
throws Exception {
super.exposeHelpers(velocityContext, request);
URIBoxManager uriBoxManager = new URIBoxManager();
Map<String, URIBox> box = uriBoxManager.loadURIBox();
Iterator<String> it = box.keySet().iterator();
velocityContext.put(defaultServerName, getFullContextPath(request));
while (it.hasNext()) {
String key = it.next();
URIBox uri = box.get(key);
if (uri.render().equals(defaultUrl)) {
velocityContext.put(key, getFullContextPath(request));
} else {
velocityContext.put(key, uri);
}
}
}
private DefaultURIBox getFullContextPath(HttpServletRequest request) {
if (defaultBox == null) {
StringBuilder buf = new StringBuilder();
buf.append(request.getScheme()).append("://").append(request.getServerName());
if (request.getServerPort() != 80) {
buf.append(":").append(request.getServerPort());
}
buf.append(request.getContextPath());
defaultBox = new DefaultURIBox(buf.toString());
}
return defaultBox;
}
}
|
[
"foodoon@qq.com"
] |
foodoon@qq.com
|
9639fa6f539802318c06679896b7616acfb9ea88
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/24/24_8146c629528e005c76d8ffe0bb406dd0a6c2f6b3/VisualCellHighlight/24_8146c629528e005c76d8ffe0bb406dd0a6c2f6b3_VisualCellHighlight_s.java
|
7f9950f1f6e481a4ff8f6e5ea722442afa9f7fc8
|
[] |
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,520
|
java
|
package swarm.client.view.cell;
import java.util.logging.Logger;
import swarm.client.app.AppContext;
import swarm.client.entities.BufferCell;
import swarm.client.entities.Camera;
import swarm.client.entities.ClientGrid;
import swarm.client.managers.CellBuffer;
import swarm.client.managers.CellBufferManager;
import swarm.client.navigation.MouseNavigator;
import swarm.client.navigation.U_CameraViewport;
import swarm.client.input.Mouse;
import swarm.client.states.camera.Action_Camera_SetViewSize;
import swarm.client.states.camera.Action_Camera_SnapToPoint;
import swarm.client.states.camera.StateMachine_Camera;
import swarm.client.states.camera.State_CameraSnapping;
import swarm.client.states.camera.State_ViewingCell;
import swarm.client.view.E_ZIndex;
import swarm.client.view.I_UIElement;
import swarm.client.view.S_UI;
import swarm.client.view.U_Css;
import swarm.client.view.ViewConfig;
import swarm.client.view.ViewContext;
import swarm.shared.app.S_CommonApp;
import swarm.shared.debugging.U_Debug;
import swarm.shared.entities.A_Grid;
import swarm.shared.utils.U_Math;
import swarm.shared.statemachine.A_Action;
import swarm.shared.statemachine.StateEvent;
import swarm.shared.structs.GridCoordinate;
import swarm.shared.structs.Point;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Panel;
public class VisualCellHighlight extends FlowPanel implements I_UIElement
{
private static final Logger s_logger = Logger.getLogger(VisualCellHighlight.class.getName());
private final Point m_utilPoint1 = new Point();
private double m_lastScaling = -1;
private final ViewContext m_viewContext;
public VisualCellHighlight(ViewContext viewContext)
{
m_viewContext = viewContext;
this.addStyleName("cell_highlight");
this.getElement().setAttribute("ondragstart", "return false;");
E_ZIndex.CELL_HIGHLIGHT.assignTo(this);
this.setVisible(false);
}
private void update()
{
if( m_viewContext.stateContext.isEntered(State_ViewingCell.class) )
{
this.setVisible(false);
return;
}
MouseNavigator navManager = m_viewContext.mouseNavigator;
boolean isMouseTouchingSnappableCell = navManager.isMouseTouchingSnappableCell();
//--- DRK > TODO: Really minor so might never fix, but this is kinda sloppy.
//--- There should probably be a "panning" state or something that the highlight listens for instead.
Mouse mouse = navManager.getMouse();
boolean isPanning = mouse.isMouseDown() && mouse.hasMouseStrayedWhileDown();
if( isPanning )
{
this.setVisible(false);
return;
}
CellBuffer buffer = m_viewContext.appContext.cellBufferMngr.getBaseDisplayBuffer();
int subCellDim = m_viewContext.appContext.cellBufferMngr.getSubCellCount();
ClientGrid grid = m_viewContext.appContext.gridMngr.getGrid();
Camera camera = m_viewContext.appContext.cameraMngr.getCamera();
Point basePoint = null;
double highlightScaling = camera.calcDistanceRatio();
GridCoordinate mouseCoord = navManager.getMouseGridCoord();
s_logger.severe(mouseCoord+"");
boolean owned = grid.isTaken(mouseCoord, 1);
BufferCell cell = buffer.getCellAtAbsoluteCoord(mouseCoord);
if( !owned )
{
this.setVisible(false);
return;
}
State_CameraSnapping snappingState = m_viewContext.stateContext.getEntered(State_CameraSnapping.class);
if( snappingState != null )
{
if( mouseCoord.isEqualTo(snappingState.getTargetCoord()) )
{
this.setVisible(false);
return;
}
}
basePoint = m_utilPoint1;
//--- DRK > For this case, we have to do all kinds of evil witch hackery to ensure that cell highlight lines up
//--- visually with individual cells in the meta cell images...this technically creates some disagreement
//--- between the highlight and the actual mouse coordinate position for near-cell-boundary cases, but it's zoomed
//--- out enough that it doesn't really matter...you'd really have to look for it to notice a discrepancy.
VisualCellManager cellManager = m_viewContext.cellMngr;
VisualCell visualCell = (VisualCell) (cell != null ? cell.getVisualization() : null);
double lastScaling = cellManager.getLastScaling();
Point lastBasePoint = cellManager.getLastBasePoint();
int bufferM = buffer.getCoordinate().getM() * subCellDim;
int bufferN = buffer.getCoordinate().getN() * subCellDim;
int deltaM = mouseCoord.getM() - bufferM;
int deltaN = mouseCoord.getN() - bufferN;
//TODO: Assuming square cell size.
double apparentCellPixelsX = 0, apparentCellPixelsY = 0;
int defaultCellWidth = grid.getCellWidth();
int defaultCellHeight = grid.getCellHeight();
int visualCellWidth = visualCell != null ? visualCell.getWidth() : defaultCellWidth;
int visualCellHeight = visualCell != null ? visualCell.getHeight() : defaultCellHeight;
if( subCellDim > 1 )
{
apparentCellPixelsX = ((defaultCellWidth / ((double) subCellDim)) * lastScaling);
apparentCellPixelsY = ((defaultCellHeight / ((double) subCellDim)) * lastScaling);
}
else
{
apparentCellPixelsX = (defaultCellWidth + grid.getCellPadding()) * lastScaling;
apparentCellPixelsY = (defaultCellHeight + grid.getCellPadding()) * lastScaling;
}
double deltaPixelsX = apparentCellPixelsX * deltaM;
double deltaPixelsY = apparentCellPixelsY * deltaN;
basePoint.copy(lastBasePoint);
basePoint.inc(deltaPixelsX, deltaPixelsY, 0);
basePoint.incX((visualCell != null ? (double)visualCell.getXOffset() : 0.0)*lastScaling);
basePoint.incY((visualCell != null ? (double)visualCell.getYOffset() : 0.0)*lastScaling);
double y = basePoint.getY();
if( m_viewContext.stateContext.isEntered(State_ViewingCell.class) )
{
Element scrollElement = this.getParent().getParent().getElement();
y += scrollElement.getScrollTop();
}
String width = (visualCellWidth * highlightScaling) + "px";
String height = (visualCellHeight * highlightScaling) + "px";
this.setSize(width, height);
this.getElement().getStyle().setProperty("top", y + "px");
this.getElement().getStyle().setProperty("left", basePoint.getX() + "px");
ViewConfig viewConfig = m_viewContext.config;
if( m_lastScaling != highlightScaling )
{
double scale = Math.sqrt(highlightScaling);
int shadowSize = (int) (((double)viewConfig.cellHighlightMaxSize) * (scale));
shadowSize = (shadowSize < viewConfig.cellHighlightMinSize ? viewConfig.cellHighlightMinSize : shadowSize);
U_Css.setBoxShadow(this.getElement(), "0 0 "+(shadowSize/2)+"px "+(shadowSize/2)+"px " + m_viewContext.config.cellHighlightColor);
}
m_lastScaling = highlightScaling;
this.setVisible(true);
}
public void onStateEvent(StateEvent event)
{
switch(event.getType())
{
case DID_UPDATE:
{
if( event.getState().getParent() instanceof StateMachine_Camera )
{
this.update();
}
break;
}
case DID_PERFORM_ACTION:
{
if( event.getAction() == Action_Camera_SetViewSize.class ||
event.getAction() == Action_Camera_SnapToPoint.class )
{
State_ViewingCell state = event.getContext().getEntered(State_ViewingCell.class);
if( state != null )
{
this.update();
}
}
break;
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
4a5ed5dfbab8f1af4d4d727a97fe96bc6e8e4336
|
4709463257b97bd346882f595faf61b348c753ac
|
/awt/MultipleGradientPaint.java
|
bee4d4480971537638e5c366dc1705bcf5577d06
|
[] |
no_license
|
xiaodaguan/java_1_8_025
|
796f1168b0f47d4d66cef7fc1259f8a360cc5cc8
|
b779328e08f11eddd25cb560d997c1f866b7d531
|
refs/heads/master
| 2020-12-30T15:42:20.078667
| 2017-05-13T10:47:57
| 2017-05-13T10:47:57
| 91,167,508
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,464
|
java
|
/* */ package java.awt;
/* */
/* */ import java.awt.geom.AffineTransform;
/* */ import java.awt.image.ColorModel;
/* */ import java.lang.ref.SoftReference;
/* */ import java.util.Arrays;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public abstract class MultipleGradientPaint
/* */ implements Paint
/* */ {
/* */ final int transparency;
/* */ final float[] fractions;
/* */ final Color[] colors;
/* */ final AffineTransform gradientTransform;
/* */ final CycleMethod cycleMethod;
/* */ final ColorSpaceType colorSpace;
/* */ ColorModel model;
/* */ float[] normalizedIntervals;
/* */ boolean isSimpleLookup;
/* */ SoftReference<int[][]> gradients;
/* */ SoftReference<int[]> gradient;
/* */ int fastGradientArraySize;
/* */
/* */ public static enum CycleMethod
/* */ {
/* 51 */ NO_CYCLE,
/* */
/* */
/* */
/* */
/* */
/* 57 */ REFLECT,
/* */
/* */
/* */
/* */
/* */
/* 63 */ REPEAT;
/* */
/* */
/* */
/* */ private CycleMethod() {}
/* */ }
/* */
/* */
/* */ public static enum ColorSpaceType
/* */ {
/* 73 */ SRGB,
/* */
/* */
/* */
/* */
/* */
/* 79 */ LINEAR_RGB;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private ColorSpaceType() {}
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ MultipleGradientPaint(float[] paramArrayOfFloat, Color[] paramArrayOfColor, CycleMethod paramCycleMethod, ColorSpaceType paramColorSpaceType, AffineTransform paramAffineTransform)
/* */ {
/* 142 */ if (paramArrayOfFloat == null) {
/* 143 */ throw new NullPointerException("Fractions array cannot be null");
/* */ }
/* */
/* 146 */ if (paramArrayOfColor == null) {
/* 147 */ throw new NullPointerException("Colors array cannot be null");
/* */ }
/* */
/* 150 */ if (paramCycleMethod == null) {
/* 151 */ throw new NullPointerException("Cycle method cannot be null");
/* */ }
/* */
/* 154 */ if (paramColorSpaceType == null) {
/* 155 */ throw new NullPointerException("Color space cannot be null");
/* */ }
/* */
/* 158 */ if (paramAffineTransform == null) {
/* 159 */ throw new NullPointerException("Gradient transform cannot be null");
/* */ }
/* */
/* */
/* 163 */ if (paramArrayOfFloat.length != paramArrayOfColor.length) {
/* 164 */ throw new IllegalArgumentException("Colors and fractions must have equal size");
/* */ }
/* */
/* */
/* 168 */ if (paramArrayOfColor.length < 2) {
/* 169 */ throw new IllegalArgumentException("User must specify at least 2 colors");
/* */ }
/* */
/* */
/* */
/* */
/* 175 */ float f1 = -1.0F;
/* 176 */ for (float f2 : paramArrayOfFloat) {
/* 177 */ if ((f2 < 0.0F) || (f2 > 1.0F)) {
/* 178 */ throw new IllegalArgumentException("Fraction values must be in the range 0 to 1: " + f2);
/* */ }
/* */
/* */
/* */
/* 183 */ if (f2 <= f1) {
/* 184 */ throw new IllegalArgumentException("Keyframe fractions must be increasing: " + f2);
/* */ }
/* */
/* */
/* */
/* 189 */ f1 = f2;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* 196 */ int i = 0;
/* 197 */ ??? = 0;
/* 198 */ ??? = paramArrayOfFloat.length;
/* 199 */ int m = 0;
/* */
/* 201 */ if (paramArrayOfFloat[0] != 0.0F)
/* */ {
/* 203 */ i = 1;
/* 204 */ ???++;
/* 205 */ m++;
/* */ }
/* 207 */ if (paramArrayOfFloat[(paramArrayOfFloat.length - 1)] != 1.0F)
/* */ {
/* 209 */ ??? = 1;
/* 210 */ ???++;
/* */ }
/* */
/* 213 */ this.fractions = new float[???];
/* 214 */ System.arraycopy(paramArrayOfFloat, 0, this.fractions, m, paramArrayOfFloat.length);
/* 215 */ this.colors = new Color[???];
/* 216 */ System.arraycopy(paramArrayOfColor, 0, this.colors, m, paramArrayOfColor.length);
/* */
/* 218 */ if (i != 0) {
/* 219 */ this.fractions[0] = 0.0F;
/* 220 */ this.colors[0] = paramArrayOfColor[0];
/* */ }
/* 222 */ if (??? != 0) {
/* 223 */ this.fractions[(??? - 1)] = 1.0F;
/* 224 */ this.colors[(??? - 1)] = paramArrayOfColor[(paramArrayOfColor.length - 1)];
/* */ }
/* */
/* */
/* 228 */ this.colorSpace = paramColorSpaceType;
/* 229 */ this.cycleMethod = paramCycleMethod;
/* */
/* */
/* 232 */ this.gradientTransform = new AffineTransform(paramAffineTransform);
/* */
/* */
/* 235 */ int n = 1;
/* 236 */ for (int i1 = 0; i1 < paramArrayOfColor.length; i1++) {
/* 237 */ n = (n != 0) && (paramArrayOfColor[i1].getAlpha() == 255) ? 1 : 0;
/* */ }
/* 239 */ this.transparency = (n != 0 ? 1 : 3);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public final float[] getFractions()
/* */ {
/* 252 */ return Arrays.copyOf(this.fractions, this.fractions.length);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public final Color[] getColors()
/* */ {
/* 263 */ return (Color[])Arrays.copyOf(this.colors, this.colors.length);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public final CycleMethod getCycleMethod()
/* */ {
/* 272 */ return this.cycleMethod;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public final ColorSpaceType getColorSpace()
/* */ {
/* 283 */ return this.colorSpace;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public final AffineTransform getTransform()
/* */ {
/* 296 */ return new AffineTransform(this.gradientTransform);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public final int getTransparency()
/* */ {
/* 309 */ return this.transparency;
/* */ }
/* */ }
/* Location: /Users/guanxiaoda/Documents/workspace/rt.jar!/java/awt/MultipleGradientPaint.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 0.7.1
*/
|
[
"xiaodaguan@gmail.com"
] |
xiaodaguan@gmail.com
|
d178d44ae1bfabdde88bd93f25d76e9a8d1ea560
|
cee07e9b756aad102d8689b7f0db92d611ed5ab5
|
/src_6/org/benf/cfr/tests/BreakTest1.java
|
184ec027d1dae460ee0f6f05d9b88f5a680f51d5
|
[
"MIT"
] |
permissive
|
leibnitz27/cfr_tests
|
b85ab71940ae13fbea6948a8cc168b71f811abfd
|
b3aa4312e3dc0716708673b90cc0a8399e5f83e2
|
refs/heads/master
| 2022-09-04T02:45:26.282511
| 2022-08-11T06:14:39
| 2022-08-11T06:14:39
| 184,790,061
| 11
| 5
|
MIT
| 2022-02-24T07:07:46
| 2019-05-03T16:49:01
|
Java
|
UTF-8
|
Java
| false
| false
| 912
|
java
|
package org.benf.cfr.tests;
/**
* Created with IntelliJ IDEA.
* User: lee
* Date: 10/07/2013
* Time: 14:56
*/
public class BreakTest1 {
boolean testA(int a, int b) {
return a<b;
}
boolean testB(int a, int b) {
return a<b;
}
boolean testC(int a, int b) {
return a<b;
}
public int doIt(int a, int b) {
boolean x = true;
a: do {
System.out.println("A");
b : do {
System.out.println("B");
c : do {
System.out.println("C");
if (testA(a,b)) break a;
if (testB(a,b)) continue b;
if (testC(a,b)) break b;
break c;
} while (x);
return 3;
} while (x);
System.out.println("Leaving b");
} while (x);
return 1;
}
}
|
[
"lee@benf.org"
] |
lee@benf.org
|
759730bf81f09eb6102b550785585665076c1d64
|
5d7c8d78e72ae3ea6e61154711fdd23248c19614
|
/sources/com/ali/auth/third/offline/iv/SmsVerifyFormView.java
|
b81f3a55ccc02305c1653f668688bd1cde39823e
|
[] |
no_license
|
activeliang/tv.taobao.android
|
8058497bbb45a6090313e8445107d987d676aff6
|
bb741de1cca9a6281f4c84a6d384333b6630113c
|
refs/heads/master
| 2022-11-28T10:12:53.137874
| 2020-08-06T05:43:15
| 2020-08-06T05:43:15
| 285,483,760
| 7
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 324
|
java
|
package com.ali.auth.third.offline.iv;
import com.ali.auth.third.core.model.RpcResponse;
public interface SmsVerifyFormView {
String getPageName();
void onSMSSendFail(RpcResponse rpcResponse);
void onSendSMSSuccess(long j);
void onVerifyFail(int i, String str);
void onVerifySuccess(String str);
}
|
[
"activeliang@gmail.com"
] |
activeliang@gmail.com
|
7065fe6652fe85f9dc070ea327671e9c8689fd0c
|
480d76232ca7293194c69ba57a5039c6507d5bc7
|
/mcp811 1.6.4/temp/src/minecraft/net/minecraft/src/Packet104WindowItems.java
|
69e630f7de0116cdc18f72dc673b87f9d201eb00
|
[] |
no_license
|
interactivenyc/Minecraft_SRC_MOD
|
bee868e7adf9c548ddafd8549a55a759cfa237ce
|
4b311f43fd312521c1df39010b0ae34ed81bc406
|
refs/heads/master
| 2016-09-07T18:33:22.494356
| 2014-01-27T19:10:47
| 2014-01-27T19:10:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,645
|
java
|
package net.minecraft.src;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.List;
import net.minecraft.src.ItemStack;
import net.minecraft.src.NetHandler;
import net.minecraft.src.Packet;
public class Packet104WindowItems extends Packet {
public int field_73427_a;
public ItemStack[] field_73426_b;
public Packet104WindowItems() {}
public Packet104WindowItems(int p_i1425_1_, List p_i1425_2_) {
this.field_73427_a = p_i1425_1_;
this.field_73426_b = new ItemStack[p_i1425_2_.size()];
for(int var3 = 0; var3 < this.field_73426_b.length; ++var3) {
ItemStack var4 = (ItemStack)p_i1425_2_.get(var3);
this.field_73426_b[var3] = var4 == null?null:var4.func_77946_l();
}
}
public void func_73267_a(DataInput p_73267_1_) throws IOException {
this.field_73427_a = p_73267_1_.readByte();
short var2 = p_73267_1_.readShort();
this.field_73426_b = new ItemStack[var2];
for(int var3 = 0; var3 < var2; ++var3) {
this.field_73426_b[var3] = func_73276_c(p_73267_1_);
}
}
public void func_73273_a(DataOutput p_73273_1_) throws IOException {
p_73273_1_.writeByte(this.field_73427_a);
p_73273_1_.writeShort(this.field_73426_b.length);
for(int var2 = 0; var2 < this.field_73426_b.length; ++var2) {
func_73270_a(this.field_73426_b[var2], p_73273_1_);
}
}
public void func_73279_a(NetHandler p_73279_1_) {
p_73279_1_.func_72486_a(this);
}
public int func_73284_a() {
return 3 + this.field_73426_b.length * 5;
}
}
|
[
"steve@speakaboos.com"
] |
steve@speakaboos.com
|
84db33b341753ace510779a8fb2e1579130bd99a
|
b8ee538b0ba4e20da0524cb87c9474cc2b4e5405
|
/Java/com/qtu404/dao/UserDao.java
|
afc100d37b40fb870ad5e466bb9452571727cbeb
|
[] |
no_license
|
Not-Found-404/CloudEase
|
43874693009a9e548903162f8805de97efbb2659
|
904199f177b52adc7b6b54cb4cd4866ac1c34832
|
refs/heads/master
| 2020-04-01T06:17:47.993592
| 2018-05-16T03:05:11
| 2018-05-16T03:05:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,653
|
java
|
package com.qtu404.dao;
import com.qtu404.enetity.User;
import org.hibernate.Session;
import org.hibernate.Query;
import java.util.List;
public class UserDao {
/**
* 通过账户名找到一个用户实体
*
* @param userNo 用户的唯一标识
* @return 一个用户实体
* @author wildhunt_unique
*/
public static User getUserByNo(Session session, String userNo) {
User user = null;
String hql = "select u from " + User.class.getName() + " u where u.userNo = :userNo";
Query<User> query = session.createQuery(hql);
query.setParameter("userNo", userNo);
user = query.getSingleResult();
return user;
}
/**
* 通过邮箱找到一个用户实体
*
* @param Email 用户的邮箱
* @return 一个用户实体
* @author wildhunt_unique
*/
public static User getUserByEmail(Session session, String Email) {
User user = null;
String hql = "select u from " + User.class.getName() + " u where u.userEmail = :userEmail";
Query<User> query = session.createQuery(hql);
query.setParameter("userEmail", Email);
user = query.getSingleResult();
return user;
}
/**
* 通过邮箱和密码匹配用户
*
* @author wildhunt_unique
*/
public static User getUserByLogin(Session session, String userEamil, String userPassword) {
User user = null;
String hql = "select u from " + User.class.getName() + " u where u.userPassword = :userPassword and u.userEmail = :userEmail";
Query<User> query = session.createQuery(hql);
query.setParameter("userPassword", userPassword);
query.setParameter("userEmail", userEamil);
user = query.getSingleResult();
return user;
}
/**
* 找到所有用户
*
* @author wildhunt_unique
*/
public static List<User> findAllUser(Session session) {
List<User> users = null;
String hql = "select u from " + User.class.getName() + " u";
Query<User> query = session.createQuery(hql);
users = query.getResultList();
return users;
}
/**
* 找到当前用户的最大Id值
*
* @author wildhunt_unique
*/
public static long getMaxId(Session session) {
Number maxId = null;
String hql = "select max(u.userId) from " + User.class.getName() + " u";
Query<Number> query = session.createQuery(hql);
maxId = query.getSingleResult();
if (maxId == null){
maxId = 100000L;
}
return maxId.longValue();
}
}
|
[
"wildhunt_geralt@foxmail.com"
] |
wildhunt_geralt@foxmail.com
|
1717f08f8d7a88705d04d5d5524c51df7cd4c7e3
|
63f142347bbd63a41c0c69a646f10747ea9edede
|
/src/main/java/com/crfeb/tbmpt/aqxj/model/AqxjXjdfl.java
|
c288756bfb5f24a7203e0edbe0fddf9ae4af8de9
|
[] |
no_license
|
guoxuhui/Tbmpt_Web
|
c842e500797bc843968a7f683fadeda4047a2031
|
131380902383dc51e6a29a53ddd0f78c74400233
|
refs/heads/master
| 2021-07-10T05:53:02.856913
| 2017-10-10T11:08:21
| 2017-10-10T11:08:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,798
|
java
|
package com.crfeb.tbmpt.aqxj.model;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotations.IdType;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.crfeb.tbmpt.commons.model.BaseModel;
@TableName("ZLXJ_XUNJIAN_FL")
public class AqxjXjdfl extends BaseModel implements Serializable{
/**
*
* 主键id
*/
@TableId(type = IdType.UUID)
private String id;
/**
*
* 分类名称
*/
@TableField(value = "fenlei_mc")
private String fenleiMc;
/**
*
* 备注
*/
@TableField(value = "beizhu")
private String beiZ;
/**
*
* 工程编号
*/
@TableField(value = "gc_bh")
private String gcBh;
/**
*
* 工程项目名称
*/
@TableField(value = "gc_mc")
private String gcMc;
/**
*
* 父id
*/
@TableField(value = "pid")
private String pid;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getFenleiMc() {
return fenleiMc;
}
public void setFenleiMc(String fenleiMc) {
this.fenleiMc = fenleiMc;
}
public String getBeiZ() {
return beiZ;
}
public void setBeiZ(String beiZ) {
this.beiZ = beiZ;
}
public String getGcBh() {
return gcBh;
}
public void setGcBh(String gcBh) {
this.gcBh = gcBh;
}
public String getGcMc() {
return gcMc;
}
public void setGcMc(String gcMc) {
this.gcMc = gcMc;
}
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
}
|
[
"wpisen@163.com"
] |
wpisen@163.com
|
7efa725c90bd839de9b9e97ba9aa22b6e815d434
|
185c7e7c6d26483c583466ba5c4ea789ed01eecd
|
/src/main/java/com/booknara/problem/math/ExpressionAddOperators.java
|
8e903909b332cc64f0bcc917d792920f902f83fa
|
[
"MIT"
] |
permissive
|
booknara/playground
|
49d92d450438f6e7912e85c82e010cc4f1631891
|
60e2097d00097956132688a404c4de3def19c549
|
refs/heads/master
| 2023-08-17T06:30:55.874388
| 2023-08-11T15:16:45
| 2023-08-11T15:16:45
| 226,968,158
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,704
|
java
|
package com.booknara.problem.math;
import java.util.ArrayList;
import java.util.List;
/**
* 282. Expression Add Operators (Hard)
* https://leetcode.com/problems/expression-add-operators/
*/
public class ExpressionAddOperators {
// T:O(n*3^n), S:O(n)
public List<String> addOperators(String num, int target) {
List<String> res = new ArrayList<>();
if (num == null || num.length() == 0) return res;
dfs(num, "", 0, target, 0L, 0L, res);
return res;
}
public void dfs(String num, String path, int index, int target,
long eval, long prev, List<String> res) {
// base case
if (index == num.length()) {
if (eval == target) {
res.add(path);
}
return;
}
for (int i = index; i < num.length(); i++) {
if (i != index && num.charAt(index) == '0') break; // caution 2
long cur = Long.parseLong(num.substring(index, i + 1)); // caution 1
if (index == 0) {
// 0 index value doesn't need to calculate
dfs(num, path + cur, i + 1, target, cur, cur, res);
} else {
// +
dfs(num, path + "+" + cur, i + 1, target, eval + cur, cur, res);
// -
dfs(num, path + "-" + cur, i + 1, target, eval - cur, -cur, res);
// *, caution 3
dfs(num, path + "*" + cur, i + 1, target, eval - prev + (cur * prev), prev * cur, res);
}
}
}
}
/**
Caution 1: Overflow -> long
Caution 2: the number that start with 0 is invalid
Caution 3: handling * as higher priority than +, -
*/
|
[
"bookdori81@gmail.com"
] |
bookdori81@gmail.com
|
84a5337e9bf8f8ca71eba9a3e6a2a048d37f9d1c
|
8afb5afd38548c631f6f9536846039ef6cb297b9
|
/MY_REPOS/INTERVIEW-PREP-COMPLETE/notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/__MY_OPRIGINAL_DS/_Extra-Practice/03_recursion/java/02_greet/src/Greet.java
|
5a6af464304dbb5b361ec053f7e349553f8ac10e
|
[
"MIT"
] |
permissive
|
bgoonz/UsefulResourceRepo2.0
|
d87588ffd668bb498f7787b896cc7b20d83ce0ad
|
2cb4b45dd14a230aa0e800042e893f8dfb23beda
|
refs/heads/master
| 2023-03-17T01:22:05.254751
| 2022-08-11T03:18:22
| 2022-08-11T03:18:22
| 382,628,698
| 10
| 12
|
MIT
| 2022-10-10T14:13:54
| 2021-07-03T13:58:52
| null |
UTF-8
|
Java
| false
| false
| 486
|
java
|
public class Greet {
private static void greet2(String name) {
System.out.println("how are you, " + name + "?");
}
private static void bye() {
System.out.println("ok bye!");
}
private static void greet(String name) {
System.out.println("hello, " + name + "!");
greet2(name);
System.out.println("getting ready to say bye...");
bye();
}
public static void main(String[] args) {
greet("adit");
}
}
|
[
"bryan.guner@gmail.com"
] |
bryan.guner@gmail.com
|
e692415b5e8c76c4ef156e2587175ac292e21504
|
e9a7b7c70a5592bb78efda2ebc9e856180119e75
|
/app_androidx/library-printer/src/main/java/com/gpsdk/demo/ThreadPool.java
|
57deb462ce2b571f15c91a992f5ded1e9bc7f86c
|
[] |
no_license
|
xiao349305433/LSY
|
f34b216e85b8c09d964136d75a28fb58e80801f8
|
56cf6a85456c81e144536f8982210970373c3897
|
refs/heads/master
| 2023-02-09T01:49:08.071297
| 2020-12-29T16:05:49
| 2020-12-29T16:05:49
| 325,332,864
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,885
|
java
|
package com.gpsdk.demo;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* Created by Administrator
*
* @author 猿史森林
* Date: 2017/11/2
* Class description:
*/
public class ThreadPool {
private static ThreadPool threadPool;
/**
* java线程池
*/
private ThreadPoolExecutor threadPoolExecutor;
/**
* 最大线程数
*/
private final static int MAX_POOL_COUNTS = 20;
/**
* 线程存活时间
*/
private final static long ALIVETIME = 200L;
/**
* 核心线程数
*/
private final static int CORE_POOL_SIZE = 20;
/**
* 线程池缓存队列
*/
private BlockingQueue<Runnable> mWorkQueue = new ArrayBlockingQueue<>(CORE_POOL_SIZE);
private ThreadFactory threadFactory = new ThreadFactoryBuilder("ThreadPool");
private ThreadPool() {
threadPoolExecutor = new ThreadPoolExecutor(CORE_POOL_SIZE, MAX_POOL_COUNTS, ALIVETIME, TimeUnit.SECONDS, mWorkQueue, threadFactory);
}
public static ThreadPool getInstantiation() {
if (threadPool == null) {
threadPool = new ThreadPool();
}
return threadPool;
}
public void addTask(Runnable runnable) {
if (runnable == null) {
throw new NullPointerException("addTask(Runnable runnable)传入参数为空");
}
if (threadPoolExecutor != null && threadPoolExecutor.getActiveCount() < MAX_POOL_COUNTS) {
threadPoolExecutor.execute(runnable);
}
}
public void stopThreadPool() {
if (threadPoolExecutor != null) {
threadPoolExecutor.shutdown();
threadPoolExecutor = null;
}
}
}
|
[
"xiao349305433@qq.com"
] |
xiao349305433@qq.com
|
99fe8e24a06eb94ffff7023fd2851a18fbec722c
|
a405049be7cebcb7dcfefc9f770f2bfc021450c6
|
/src/main/java/com/library/service/UserService.java
|
fa2b7d11884e3dd2661bfa503e7c7437833283de
|
[] |
no_license
|
ridermontu/library_webservices
|
379f2085d8ea7f28fcf187eb764f476df32d3d41
|
1e93d7bce20c44afc0aa793622ab6248449a6d91
|
refs/heads/master
| 2021-01-21T19:40:35.243099
| 2017-05-25T05:53:10
| 2017-05-25T05:53:10
| 92,153,375
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 173
|
java
|
package com.library.service;
import java.util.List;
import com.library.model.User;
public interface UserService {
User save(User user);
List<User> getAlluser();
}
|
[
"you@example.com"
] |
you@example.com
|
6e483de4ac571d83f3bf2f0b51cca5909fd23a21
|
5a1d8c3842703f0a54795010297442b0acb8c6ea
|
/javastory.budgetsh.stage3/src/javastory/budgetsh/stage3/budget/da/file/io/TransactionFile.java
|
b2a38d6a1e9e9dd6ae086a16b1c3fa006adf5bfd
|
[] |
no_license
|
ParkSangHyun2/Javastory
|
57706aa7f219c916fc063b729f5bd03e7f783362
|
7dc36eca343af642c4641bebece24be3bfa64351
|
refs/heads/master
| 2021-09-04T14:08:01.189173
| 2018-01-19T09:39:48
| 2018-01-19T09:39:48
| 116,107,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,853
|
java
|
package javastory.budgetsh.stage3.budget.da.file.io;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import javastory.budgetsh.stage3.budget.entity.budget.Transaction;
import javastory.budgetsh.stage3.club.da.file.io.FileConfig;
import javastory.budgetsh.stage3.club.util.FileDbWrapper;
public class TransactionFile {
//
private static String defaultDelimiter = "/";
private FileDbWrapper transactionFile;
private FileDbWrapper transactionTempFile;
private static HashMap<String, Integer> keyIndexMap;
static {
keyIndexMap = new LinkedHashMap<String, Integer>();
keyIndexMap.put("id", 0);
keyIndexMap.put("cashBookId", 1);
}
public TransactionFile(){
//
transactionFile = new FileDbWrapper(
"Budget",
FileConfig.getFileName("Transaction"),
FileConfig.getDelimiter()
);
transactionTempFile = new FileDbWrapper(
"Budget",
FileConfig.getFileName("TransactionTemp"),
FileConfig.getDelimiter()
);
transactionFile.setKeyIndexMap(keyIndexMap);
transactionTempFile.setKeyIndexMap(keyIndexMap);
}
public Transaction read(String id, String cashBookId) {
//
Transaction foundTransaction = null;
BufferedReader reader;
String line;
try {
reader = transactionFile.requestReader();
while(!((line = reader.readLine()) == null)) {
if(transactionFile.hasValueOf("id", id, line) && transactionFile.hasValueOf("cashBookId", cashBookId, line)) {
foundTransaction = this.convertToTransaction(line);
}
}
reader.close();
} catch (IOException e) {
//
e.printStackTrace();
}
return foundTransaction;
}
public void write(Transaction transaction) {
//
PrintWriter writer;
try {
writer = transactionFile.requestPrintWriter();
writer.write(transactionFile.convertFrom(transaction));
writer.write("\r\n");
writer.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public boolean exist(String id) {
//
boolean found = false;
System.out.println("Fild " +id);
BufferedReader reader;
String line;
try {
reader = transactionFile.requestReader();
while(!((line = reader.readLine()) == null)) {
System.out.println("Line : "+line);
System.out.println("Id : " + id);
if(transactionFile.hasValueOf("id", id, line)) {
found = true;
break;
}
}
reader.close();
} catch (IOException e) {
//
e.printStackTrace();
}
return found;
}
public void remove(String id) {
//
BufferedReader reader;
PrintWriter writer;
String line;
try {
reader = transactionFile.requestReader();
writer = transactionTempFile.requestPrintWriter();
while(!((line= reader.readLine()) == null)) {
if(transactionFile.hasValueOf("id", id, line)) {
continue;
}
writer.write(line);
writer.write("\r\n");
}
writer.close();
reader.close();
if(!transactionFile.delete()) {
System.out.println("failure to delete");
}
if(!transactionTempFile.renameTo(transactionFile)) {
System.out.println("Failure to Rename");
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void update(Transaction transaction) {
//
String transactionId = transaction.getId();
BufferedReader reader;
PrintWriter writer;
String line;
try {
reader = transactionFile.requestReader();
writer = transactionTempFile.requestPrintWriter();
while(!((line= reader.readLine()) == null)) {
if(transactionFile.hasValueOf("id", transactionId, line)) {
writer.write(transactionFile.convertFrom(transaction));
writer.write("\r\n");
}else {
writer.write(line);
writer.write("\r\n");
}
}
writer.close();
reader.close();
if(!transactionFile.delete()) {
System.out.println("failure to delete");
}
if(!transactionTempFile.renameTo(transactionFile)) {
System.out.println("Failure to Rename");
}
} catch (IOException e) {
//
e.printStackTrace();
}
}
private Transaction convertToTransaction(String line) {
return (Transaction)transactionFile.convertTo(line,Transaction.class);
}
public Collection<Transaction> retrieveAll(String cashBookId) {
//
List<Transaction> allTransaction = new ArrayList<>();
BufferedReader reader;
String line;
try {
reader = transactionFile.requestReader();
while(!((line = reader.readLine()) == null)) {
if(transactionFile.hasValueOf("cashBookId", cashBookId, line)) {
allTransaction.add(this.convertToTransaction(line));
}
}
} catch (IOException e) {
e.printStackTrace();
}
return allTransaction;
}
}
|
[
"pus5684@gmail.com"
] |
pus5684@gmail.com
|
3606d04306c831af3a80182f662cab673f9da65b
|
0fd3e8f4155c71ebac4e4c120a8c8a21945034fb
|
/hdk/htc/lib1/HtcAccount/src/com/htc/lib1/cs/auth/client/IdentityDefs.java
|
8008d1461ecbdd4a4889dabeef123464d23183fc
|
[] |
no_license
|
foryoung2018/UsageReport
|
f577c02e3236589bde702b81c4f4d126519f1d89
|
eed1a71387ec120713d8febab6fbdc4a577e9dd5
|
refs/heads/master
| 2021-09-13T05:54:27.229906
| 2018-04-25T16:05:13
| 2018-04-25T16:05:13
| 131,033,364
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,649
|
java
|
package com.htc.lib1.cs.auth.client;
import com.htc.lib1.cs.account.HtcAccountDefs;
import java.util.Arrays;
import java.util.List;
/**
* Constant values of identity client related information in addition to common
* constants defined in {@link HtcAccountDefs}.
*/
public class IdentityDefs {
/** The http timeout in seconds used in all identity client REST requests. */
public static final long HTTP_TIMEOUT_SECONDS = 30;
/****************************************************************************************
* ConfirmCredentials options.
****************************************************************************************/
/****************************************************************************************
* OAuth 2 options.
****************************************************************************************/
/** The issue token scopes */
public static final String OAUTH_SCOPE_ISSUETOKEN = "issuetoken";
/** The email scopes */
public static final String OAUTH_SCOPE_EMAIL = "email";
/** The scopes identity needed */
public static final String OAUTH_IDENTITY_SCOPE = OAUTH_SCOPE_ISSUETOKEN + " "
+ OAUTH_SCOPE_EMAIL;
/** The scopes identity needed */
public static final List<String> OAUTH_IDENTITY_SCOPE_LIST = Arrays.asList(
OAUTH_SCOPE_ISSUETOKEN, OAUTH_SCOPE_EMAIL);
/**
* Query string parameter name of grant type.
*/
public static final String PARAM_GRANT_TYPE = "grant_type";
/**
* Query string parameter name of response type.
*/
public static final String PARAM_RESPONSE_TYPE = "response_type";
/**
* Query string parameter name of client id.
*/
public static final String PARAM_CLIENT_ID = "client_id";
/**
* Query string parameter name of client id.
*/
public static final String PARAM_APP_ID = "app_id";
/**
* Query string parameter name of client id.
*/
public static final String PARAM_SIGN_KEY = "sign_key";
/**
* Query string parameter name of scopes.
*/
public static final String PARAM_SCOPES = "scope";
/**
* Query string parameter name of refresh token.
*/
public static final String PARAM_REFRESH_TOKEN = "refresh_token";
/** The signature grant type */
public static final String OAUTH_GRANT_TYPE_SIGNKEY = "android_signkey";
/** The token response type */
public static final String OAUTH_RESPONSE_TYPE_TOKEN = "token";
/** The refresh token grant type */
public static final String OAUTH_GRANT_TYPE_REFRESHTOKEN = "refresh_token";
}
|
[
"1184394624@qq.com"
] |
1184394624@qq.com
|
29abfd3ba5be560f1307f2a5832422dd74384940
|
d6cf28d1b37216c657d23d8e512c15bdd9d3f226
|
/dependencies/api-sdk/src/main/java/com/foreveross/atwork/api/sdk/organization/responseModel/SearchDepartmentResp.java
|
4c6423b197804008cd362dbc1d2ed566661232dd
|
[
"MIT"
] |
permissive
|
AoEiuV020/w6s_lite_android
|
a2ec1ca8acdc848592266b548b9ac6b9a4117cd3
|
1c4ca5bdaea6d5230d851fb008cf2578a23b2ce5
|
refs/heads/master
| 2023-08-22T00:46:03.054115
| 2021-10-27T06:21:32
| 2021-10-27T07:45:41
| 421,650,297
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,287
|
java
|
package com.foreveross.atwork.api.sdk.organization.responseModel;
import android.os.Parcel;
import com.foreveross.atwork.api.sdk.model.BasicResponseJSON;
import com.foreveross.atwork.infrastructure.model.orgization.Department;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
public class SearchDepartmentResp extends BasicResponseJSON {
@SerializedName("result")
public List<Department> mResult;
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeTypedList(this.mResult);
}
public SearchDepartmentResp() {
}
protected SearchDepartmentResp(Parcel in) {
super(in);
this.mResult = in.createTypedArrayList(Department.CREATOR);
}
public static final Creator<SearchDepartmentResp> CREATOR = new Creator<SearchDepartmentResp>() {
@Override
public SearchDepartmentResp createFromParcel(Parcel source) {
return new SearchDepartmentResp(source);
}
@Override
public SearchDepartmentResp[] newArray(int size) {
return new SearchDepartmentResp[size];
}
};
}
|
[
"lingen.liu@gmail.com"
] |
lingen.liu@gmail.com
|
80186dfe61eefe36472af2c3a045796463b60625
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/JacksonDatabind-105/com.fasterxml.jackson.databind.deser.std.JdkDeserializers/BBC-F0-opt-20/tests/19/com/fasterxml/jackson/databind/deser/std/JdkDeserializers_ESTest_scaffolding.java
|
af97b78a2137896c193240a1fdc934e38d7c17f9
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 6,660
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Oct 21 16:51:34 GMT 2021
*/
package com.fasterxml.jackson.databind.deser.std;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class JdkDeserializers_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "com.fasterxml.jackson.databind.deser.std.JdkDeserializers";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(JdkDeserializers_ESTest_scaffolding.class.getClassLoader() ,
"com.fasterxml.jackson.databind.exc.InvalidFormatException",
"com.fasterxml.jackson.databind.exc.MismatchedInputException",
"com.fasterxml.jackson.databind.jsontype.TypeDeserializer",
"com.fasterxml.jackson.core.Versioned",
"com.fasterxml.jackson.databind.util.AccessPattern",
"com.fasterxml.jackson.databind.deser.std.JdkDeserializers",
"com.fasterxml.jackson.databind.util.ByteBufferBackedOutputStream",
"com.fasterxml.jackson.databind.DatabindContext",
"com.fasterxml.jackson.databind.DeserializationFeature",
"com.fasterxml.jackson.core.type.ResolvedType",
"com.fasterxml.jackson.databind.deser.std.StdDeserializer",
"com.fasterxml.jackson.databind.MapperFeature",
"com.fasterxml.jackson.databind.DeserializationConfig",
"com.fasterxml.jackson.databind.deser.std.UUIDDeserializer",
"com.fasterxml.jackson.databind.deser.std.FromStringDeserializer$Std",
"com.fasterxml.jackson.databind.deser.ResolvableDeserializer",
"com.fasterxml.jackson.databind.cfg.MapperConfigBase",
"com.fasterxml.jackson.databind.introspect.AnnotatedMember",
"com.fasterxml.jackson.databind.JavaType",
"com.fasterxml.jackson.databind.JsonDeserializer",
"com.fasterxml.jackson.core.JsonParseException",
"com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase",
"com.fasterxml.jackson.databind.deser.impl.ObjectIdReader",
"com.fasterxml.jackson.databind.util.Named",
"com.fasterxml.jackson.databind.deser.std.ByteBufferDeserializer",
"com.fasterxml.jackson.databind.deser.ContextualDeserializer",
"com.fasterxml.jackson.databind.DeserializationContext",
"com.fasterxml.jackson.core.JsonParser",
"com.fasterxml.jackson.databind.deser.std.FromStringDeserializer",
"com.fasterxml.jackson.databind.deser.NullValueProvider",
"com.fasterxml.jackson.databind.BeanProperty",
"com.fasterxml.jackson.core.JsonProcessingException",
"com.fasterxml.jackson.databind.deser.std.StdDelegatingDeserializer",
"com.fasterxml.jackson.databind.introspect.Annotated",
"com.fasterxml.jackson.databind.cfg.ConfigFeature",
"com.fasterxml.jackson.databind.util.NameTransformer",
"com.fasterxml.jackson.databind.deser.std.StackTraceElementDeserializer",
"com.fasterxml.jackson.databind.cfg.MapperConfig",
"com.fasterxml.jackson.databind.deser.std.AtomicBooleanDeserializer",
"com.fasterxml.jackson.databind.introspect.ClassIntrospector$MixInResolver",
"com.fasterxml.jackson.databind.JsonMappingException",
"com.fasterxml.jackson.databind.deser.SettableBeanProperty",
"com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(JdkDeserializers_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"com.fasterxml.jackson.databind.JsonDeserializer",
"com.fasterxml.jackson.databind.DeserializationFeature",
"com.fasterxml.jackson.databind.deser.std.StdDeserializer",
"com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer",
"com.fasterxml.jackson.databind.deser.std.FromStringDeserializer",
"com.fasterxml.jackson.databind.deser.std.JdkDeserializers",
"com.fasterxml.jackson.databind.deser.std.ByteBufferDeserializer",
"com.fasterxml.jackson.databind.util.AccessPattern",
"com.fasterxml.jackson.databind.deser.std.UUIDDeserializer",
"com.fasterxml.jackson.databind.deser.std.AtomicBooleanDeserializer",
"com.fasterxml.jackson.databind.deser.std.StackTraceElementDeserializer"
);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
e33962520b810f2b4fda3dd79a0824bf34e13b82
|
52c6580a4c187521edbabe255e53b3abec891e6c
|
/app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/CharitableAdapter.java
|
d7f20b1ec7e4201eb5bc4a1f4a3120006025bc80
|
[] |
no_license
|
okhttps-android/androidApp
|
e22428687e6024469dd92d1df57d80773a95180e
|
f0953eb88c770caada7ce80baec8d14bc3949e55
|
refs/heads/master
| 2022-02-14T23:20:21.007718
| 2019-09-04T10:03:39
| 2019-09-04T10:03:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,287
|
java
|
package com.uas.appworks.OA.platform.adapter;
import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.TextView;
import com.common.LogUtil;
import com.common.data.ListUtils;
import com.common.data.StringUtil;
import com.common.data.TextUtil;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.assist.ImageLoadingListener;
import com.uas.appworks.OA.platform.config.ImageConfig;
import com.uas.appworks.OA.platform.model.CharitModel;
import com.uas.appworks.R;
import java.text.DecimalFormat;
import java.util.List;
/**
* Created by Bitlike on 2017/11/7.
*/
public class CharitableAdapter extends BaseAdapter {
private DecimalFormat df = new DecimalFormat(".##");
private Context ct;
private List<CharitModel> models;
private MyClickListener onClickListener;
private String keyWork;
public CharitModel getModels(int i) {
if (ListUtils.getSize(models) > i) {
return models.get(i);
} else {
return null;
}
}
public void setKeyWork(String keyWork) {
this.keyWork = keyWork;
}
public void setModels(List<CharitModel> models) {
this.models = models;
notifyDataSetChanged();
}
public CharitableAdapter(Context ct, List<CharitModel> models, MyClickListener onClickListener) {
this.ct = ct;
this.models = models;
this.onClickListener = onClickListener;
}
@Override
public int getCount() {
return ListUtils.getSize(models);
}
@Override
public Object getItem(int i) {
return models.get(i);
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public View getView(final int i, View view, ViewGroup viewGroup) {
ViewHolder holder;
CharitModel model = models.get(i);
if (view == null) {
holder = new ViewHolder();
view = getLayoutInflater().inflate(R.layout.item_charitable_project, null);
holder.contantImg = (ImageView) view.findViewById(R.id.contantImg);
holder.titleTv = (TextView) view.findViewById(R.id.titleTv);
holder.subTv = (TextView) view.findViewById(R.id.subTv);
holder.targetTv = (TextView) view.findViewById(R.id.targetTv);
holder.typeTv = (TextView) view.findViewById(R.id.typeTv);
holder.giftBtn = (TextView) view.findViewById(R.id.giftBtn);
holder.progressSb = view.findViewById(R.id.progressSb);
holder.defTv = view.findViewById(R.id.defTv);
holder.progressSb.setClickable(false);
holder.progressSb.setEnabled(false);
holder.progressSb.setFocusable(false);
holder.progressSb.setPadding(0,0,0,0);
view.setTag(holder);
} else {
holder = (ViewHolder) view.getTag();
}
holder.targetTv.setText(model.getTarget() + "元");
holder.typeTv.setText(model.getArea());
holder.giftBtn.setTag(i);
if (model.isEnded()) {
holder.giftBtn.setBackgroundResource(R.color.hintColor);
} else {
holder.giftBtn.setBackgroundResource(R.color.indianred);
holder.giftBtn.setOnClickListener(onClickListener);
}
if (StringUtil.isEmpty(keyWork)) {
holder.titleTv.setText(model.getName());
holder.subTv.setText(model.getProSummary());
} else {
TextUtil.create()
.addSection(model.getName())
.tint(keyWork, 0xef613b)
.showIn(holder.titleTv);
TextUtil.create()
.addSection(model.getProSummary())
.tint(keyWork, 0xef613b)
.showIn(holder.subTv);
}
try {
float mTarget = Float.valueOf(model.getTarget());
float mTotalAmount = Float.valueOf(model.getTotalAmount());
holder.progressSb.setMax((int) mTarget);
holder.progressSb.setProgress((int) mTotalAmount);
String defStr = "";
if (mTotalAmount >= mTarget) {
defStr = "筹款已完成";
} else {
float defAmount = mTarget - mTotalAmount;
if (defAmount > 10000) {
float defRMB = defAmount / 10000;
defStr = "还差" + df.format(defRMB) + "万元";
} else {
defStr = "还差" + df.format(defAmount) + "元";
}
}
holder.defTv.setText(defStr);
} catch (Exception e) {
}
final ViewHolder finalHoder = holder;
final String url = model.getListImageUrl();
finalHoder.contantImg.setTag(url);
ImageLoader.getInstance().displayImage(model.getListImageUrl(), finalHoder.contantImg, ImageConfig.getCharitableImageOptions(), new ImageLoadingListener() {
@Override
public void onLoadingStarted(String s, View view) {
LogUtil.i("onLoadingStarted view instanceof ImageView");
finalHoder.contantImg.setImageResource(R.drawable.charitable_def_image);
}
@Override
public void onLoadingFailed(String s, View view, FailReason failReason) {
LogUtil.i("onLoadingFailed view instanceof ImageView");
finalHoder.contantImg.setImageResource(R.drawable.charitable_def_image);
}
@Override
public void onLoadingComplete(String s, View view, Bitmap bitmap) {
LogUtil.i("onLoadingComplete view instanceof ImageView");
if (finalHoder.contantImg.getTag() != null && url.equals(finalHoder.contantImg.getTag())) {
finalHoder.contantImg.setImageBitmap(bitmap);
}
}
@Override
public void onLoadingCancelled(String s, View view) {
LogUtil.i("onLoadingCancelled view instanceof ImageView");
finalHoder.contantImg.setImageResource(R.drawable.charitable_def_image);
}
});
return view;
}
private LayoutInflater inflater;
private LayoutInflater getLayoutInflater() {
return inflater == null ? inflater = LayoutInflater.from(ct) : inflater;
}
private class ViewHolder {
ImageView contantImg;
TextView titleTv;
TextView subTv;
TextView targetTv;
TextView typeTv;
TextView giftBtn;
TextView defTv;
SeekBar progressSb;
}
/**
* 用于回调的抽象类
*
* @author Ivan Xu
* 2014-11-26
*/
public static abstract class MyClickListener implements View.OnClickListener {
@Override
public void onClick(View v) {
myOnClick((Integer) v.getTag(), v);
}
public abstract void myOnClick(int position, View v);
}
}
|
[
"784602719@qq.com"
] |
784602719@qq.com
|
e045542024b30600e7fcb9764b4f4a8ea7384bc7
|
b1b77bb1ed47586f96d8f2554a65bcbd0c7162cc
|
/SPOTIFY/trickle/src/main/java/com/spotify/trickle/Fallbacks.java
|
22d53f44a737adfc13f4cb9de8f8fd2bae481f09
|
[] |
no_license
|
DanHefrman/stuff
|
b3624d7089909972ee806211666374a261c02d08
|
b98a5c80cfe7041d8908dcfd4230cf065c17f3f6
|
refs/heads/master
| 2023-07-10T09:47:04.780112
| 2021-08-13T09:55:17
| 2021-08-13T09:55:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,349
|
java
|
/*
* Copyright 2013-2014 Spotify AB. All rights reserved.
*
* The contents of this file are 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.spotify.trickle;
import com.google.common.util.concurrent.AsyncFunction;
import com.google.common.util.concurrent.ListenableFuture;
import javax.annotation.Nullable;
import static com.google.common.util.concurrent.Futures.immediateFuture;
/**
* Contains utility methods for dealing with fallbacks.
*/
public final class Fallbacks {
private Fallbacks() {
// prevent instantiation
}
public static <T> AsyncFunction<Throwable, T> always(@Nullable final T value) {
return new AsyncFunction<Throwable, T>() {
@Nullable
@Override
public ListenableFuture<T> apply(@Nullable Throwable input) {
return immediateFuture(value);
}
};
}
}
|
[
"bryan.guner@gmail.com"
] |
bryan.guner@gmail.com
|
2c73b40d399ca75e4ca7fb28a647d75832e2a2ed
|
e694a0823c3c915f65a8a25e104866ed916b9193
|
/src/review/acmicpc1092.java
|
65833e26924363d00b81d663f50deff53b8b1d30
|
[] |
no_license
|
chd830/Algorithm
|
2f1f61b8af94bfe02d4b9953ca52d2ebe1963c9f
|
1bfe2cce65d993ab91a705b518e573875359c384
|
refs/heads/master
| 2022-08-18T04:23:06.435408
| 2022-08-05T03:44:25
| 2022-08-05T03:44:25
| 214,943,907
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,677
|
java
|
package review;
import java.util.*;
import java.io.*;
// 배
public class acmicpc1092 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer token = null;
int N = Integer.parseInt(br.readLine());
List<Integer> weight = new ArrayList<>();
token = new StringTokenizer(br.readLine());
for(int i = 0; i < N; i++) {
weight.add(Integer.parseInt(token.nextToken()));
}
int M = Integer.parseInt(br.readLine());
List<Integer> boxes = new ArrayList<>();
token = new StringTokenizer(br.readLine());
for(int i = 0; i < M; i++) {
boxes.add(Integer.parseInt(token.nextToken()));
}
Collections.sort(weight);
Collections.sort(boxes);
// for(int b : boxes) {
// System.out.print(b+"\t");
// }
// System.out.println();
if(weight.get(N-1) < boxes.get(M-1)) {
System.out.println(-1);
System.exit(0);
}
int cnt = 0;
while(boxes.size() != 0) {
int idx = N-1;
for(int i = boxes.size()-1; i >= 0; i--) {
if(idx == -1)
break;
if(weight.get(idx) >= boxes.get(i)) {
idx--;
boxes.remove(i);
}
}
// for(int b : boxes) {
// System.out.print(b+"\t");
// }
// System.out.println();
cnt++;
}
System.out.println(cnt);
}
}
/*
3
6 8 9
9
1 2 3 4 5 6 7 8 9
*/
|
[
"chd830@naver.com"
] |
chd830@naver.com
|
72173d995255bba0ba372d5642e170cea07ac2ae
|
deea0d80bfbe7f83a6aa68c6d10e3a507c527577
|
/src/main/java/net/teamfruit/projectrtm/ngtlib/renderer/model/NGTOModel.java
|
47dfe1f1fea4c62da303295e06fe1fb87fb24cf7
|
[
"MIT"
] |
permissive
|
Team-Fruit/ProjectRTM
|
8e7684821c46dc014cd31e93cf99e40b17a2162d
|
b7524e6da508b76fbe38137a7b00082eba2a68e8
|
refs/heads/master
| 2021-01-17T08:26:31.768830
| 2017-03-04T18:59:11
| 2017-03-04T18:59:11
| 83,915,761
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,369
|
java
|
package net.teamfruit.projectrtm.ngtlib.renderer.model;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.resources.IResource;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.client.model.ModelFormatException;
import net.teamfruit.projectrtm.ngtlib.block.NGTObject;
import net.teamfruit.projectrtm.ngtlib.io.FileType;
import net.teamfruit.projectrtm.ngtlib.renderer.DisplayList;
import net.teamfruit.projectrtm.ngtlib.renderer.GLHelper;
import net.teamfruit.projectrtm.ngtlib.renderer.NGTRenderer;
import net.teamfruit.projectrtm.ngtlib.util.NGTUtil;
import net.teamfruit.projectrtm.ngtlib.util.NGTUtilClient;
import net.teamfruit.projectrtm.ngtlib.world.NGTWorld;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public final class NGTOModel implements IModelNGT {
public static final String GROUP_NAME = "default";
private final NGTObject ngto;
private final float scale;
private DisplayList[] glLists;
private NGTWorld world;
private final ArrayList<GroupObject> parts = new ArrayList<GroupObject>();
private final Map<String, Material> materials = new HashMap<String, Material>();
public NGTOModel(ResourceLocation par1, float par2) {
this.ngto = this.loadModel(par1);
if (this.ngto==null) {
throw new ModelFormatException("Can't load NGTO");
}
this.materials.put(GROUP_NAME, new Material((byte) 0, TextureMap.locationBlocksTexture));
this.scale = par2;
}
private NGTObject loadModel(ResourceLocation par1) {
try {
IResource res = Minecraft.getMinecraft().getResourceManager().getResource(par1);
return NGTObject.load(res.getInputStream());
} catch (IOException e) {
throw new ModelFormatException("IO Exception reading model", e);
}
}
@Override
public void renderAll(boolean smoothing) {
if (this.world==null) {
if (NGTUtil.getClientWorld()==null) {
return;
}
this.world = new NGTWorld(NGTUtil.getClientWorld(), this.ngto);
}
GL11.glPushMatrix();
GL11.glScalef(this.scale, this.scale, this.scale);
float x = (float) this.ngto.xSize*0.5F;
float z = (float) this.ngto.zSize*0.5F;
GL11.glTranslatef(-x, 0.0F, -z);
int pass = MinecraftForgeClient.getRenderPass();
if (pass==-1) {
pass = 0;
}
NGTRenderer.renderTileEntities(this.world, 0.0F, pass);
NGTRenderer.renderEntities(this.world, 0.0F, pass);
this.renderBlocks(pass);
GL11.glPopMatrix();
}
@Override
public void renderOnly(boolean smoothing, String... groupNames) {
if (groupNames.length==1&&groupNames[0].equals(GROUP_NAME)) {
this.renderAll(smoothing);
}
}
@Override
public void renderPart(boolean smoothing, String partName) {
if (partName.equals(GROUP_NAME)) {
this.renderAll(smoothing);
}
}
private void renderBlocks(int pass) {
if (this.glLists==null) {
this.glLists = new DisplayList[2];
}
NGTUtilClient.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
boolean smoothing = NGTUtilClient.getMinecraft().gameSettings.ambientOcclusion!=0;
if (smoothing) {
GL11.glShadeModel(GL11.GL_SMOOTH);
}
if (!GLHelper.isValid(this.glLists[pass])) {
this.glLists[pass] = GLHelper.generateGLList();
GLHelper.startCompile(this.glLists[pass]);
NGTRenderer.renderNGTObject(this.world, this.ngto, true, 0, pass);
GLHelper.endCompile();
} else {
GLHelper.callList(this.glLists[pass]);
}
if (smoothing) {
GL11.glShadeModel(GL11.GL_FLAT);
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderHelper.enableStandardItemLighting();
NGTUtilClient.getMinecraft().entityRenderer.enableLightmap(0.0D);
}
@Override
public int getDrawMode() {
return 0;
}
@Override
public ArrayList<GroupObject> getGroupObjects() {
return this.parts;
}
@Override
public Map<String, Material> getMaterials() {
return this.materials;
}
@Override
public FileType getType() {
return FileType.NGTO;
}
}
|
[
"kamesuta@gmail.com"
] |
kamesuta@gmail.com
|
8dae4fa6431c59fe9984ce5fa4a964dc5d633fae
|
af0048b7c1fddba3059ae44cd2f21c22ce185b27
|
/springframework/src/main/java/org/springframework/web/servlet/view/groovy/GroovyMarkupConfigurer.java
|
240d7377db61fd8e4d5d5848dce744a8da655f61
|
[] |
no_license
|
P79N6A/whatever
|
4b51658fc536887c870d21b0c198738ed0d1b980
|
6a5356148e5252bdeb940b45d5bbeb003af2f572
|
refs/heads/master
| 2020-07-02T19:58:14.366752
| 2019-08-10T14:45:17
| 2019-08-10T14:45:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,853
|
java
|
package org.springframework.web.servlet.view.groovy;
import groovy.text.markup.MarkupTemplateEngine;
import groovy.text.markup.TemplateConfiguration;
import groovy.text.markup.TemplateResolver;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.core.io.Resource;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
public class GroovyMarkupConfigurer extends TemplateConfiguration implements GroovyMarkupConfig, ApplicationContextAware, InitializingBean {
private String resourceLoaderPath = "classpath:";
@Nullable
private MarkupTemplateEngine templateEngine;
@Nullable
private ApplicationContext applicationContext;
public void setResourceLoaderPath(String resourceLoaderPath) {
this.resourceLoaderPath = resourceLoaderPath;
}
public String getResourceLoaderPath() {
return this.resourceLoaderPath;
}
public void setTemplateEngine(MarkupTemplateEngine templateEngine) {
this.templateEngine = templateEngine;
}
public MarkupTemplateEngine getTemplateEngine() {
Assert.state(this.templateEngine != null, "No MarkupTemplateEngine set");
return this.templateEngine;
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
protected ApplicationContext getApplicationContext() {
Assert.state(this.applicationContext != null, "No ApplicationContext set");
return this.applicationContext;
}
@Override
public void setLocale(Locale locale) {
super.setLocale(locale);
}
@Override
public void afterPropertiesSet() throws Exception {
if (this.templateEngine == null) {
this.templateEngine = createTemplateEngine();
}
}
protected MarkupTemplateEngine createTemplateEngine() throws IOException {
if (this.templateEngine == null) {
ClassLoader templateClassLoader = createTemplateClassLoader();
this.templateEngine = new MarkupTemplateEngine(templateClassLoader, this, new LocaleTemplateResolver());
}
return this.templateEngine;
}
protected ClassLoader createTemplateClassLoader() throws IOException {
String[] paths = StringUtils.commaDelimitedListToStringArray(getResourceLoaderPath());
List<URL> urls = new ArrayList<>();
for (String path : paths) {
Resource[] resources = getApplicationContext().getResources(path);
if (resources.length > 0) {
for (Resource resource : resources) {
if (resource.exists()) {
urls.add(resource.getURL());
}
}
}
}
ClassLoader classLoader = getApplicationContext().getClassLoader();
Assert.state(classLoader != null, "No ClassLoader");
return (!urls.isEmpty() ? new URLClassLoader(urls.toArray(new URL[0]), classLoader) : classLoader);
}
protected URL resolveTemplate(ClassLoader classLoader, String templatePath) throws IOException {
MarkupTemplateEngine.TemplateResource resource = MarkupTemplateEngine.TemplateResource.parse(templatePath);
Locale locale = LocaleContextHolder.getLocale();
URL url = classLoader.getResource(resource.withLocale(StringUtils.replace(locale.toString(), "-", "_")).toString());
if (url == null) {
url = classLoader.getResource(resource.withLocale(locale.getLanguage()).toString());
}
if (url == null) {
url = classLoader.getResource(resource.withLocale(null).toString());
}
if (url == null) {
throw new IOException("Unable to load template:" + templatePath);
}
return url;
}
private class LocaleTemplateResolver implements TemplateResolver {
@Nullable
private ClassLoader classLoader;
@Override
public void configure(ClassLoader templateClassLoader, TemplateConfiguration configuration) {
this.classLoader = templateClassLoader;
}
@Override
public URL resolveTemplate(String templatePath) throws IOException {
Assert.state(this.classLoader != null, "No template ClassLoader available");
return GroovyMarkupConfigurer.this.resolveTemplate(this.classLoader, templatePath);
}
}
}
|
[
"heavenlystate@163.com"
] |
heavenlystate@163.com
|
e0e1f615e77f046b9d0a23dcef0e66e49eae8985
|
fc1bf26252525f1dca780f0c26cea165c3b3f531
|
/com/planet_ink/coffee_mud/Abilities/Poisons/Poison_Mindsap.java
|
e8547670ee78ef5472095575eb877b90e3c59d31
|
[
"Apache-2.0"
] |
permissive
|
mikael2/CoffeeMud
|
8ade6ff60022dbe01f55172ba3f86be0de752124
|
a70112b6c67e712df398c940b2ce00b589596de0
|
refs/heads/master
| 2020-03-07T14:13:04.765442
| 2018-03-28T03:59:22
| 2018-03-28T03:59:22
| 127,521,360
| 1
| 0
| null | 2018-03-31T10:11:54
| 2018-03-31T10:11:53
| null |
UTF-8
|
Java
| false
| false
| 3,221
|
java
|
package com.planet_ink.coffee_mud.Abilities.Poisons;
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 2003-2018 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 Poison_Mindsap extends Poison
{
@Override
public String ID()
{
return "Poison_Mindsap";
}
private final static String localizedName = CMLib.lang().L("Mindsap");
@Override
public String name()
{
return localizedName;
}
private static final String[] triggerStrings =I(new String[] {"POISONSAP"});
@Override
public String[] triggerStrings()
{
return triggerStrings;
}
@Override protected int POISON_TICKS(){return 50;} // 0 means no adjustment!
@Override
protected int POISON_DELAY()
{
return 1;
}
@Override
protected String POISON_DONE()
{
return "Your thoughts clear up.";
}
@Override
protected String POISON_START()
{
return "^G<S-NAME> seem(s) confused!^?";
}
@Override
protected String POISON_AFFECT()
{
return "";
}
@Override
protected String POISON_CAST()
{
return "^F^<FIGHT^><S-NAME> poison(s) <T-NAMESELF>!^</FIGHT^>^?";
}
@Override
protected String POISON_FAIL()
{
return "<S-NAME> attempt(s) to poison <T-NAMESELF>, but fail(s).";
}
@Override
protected int POISON_DAMAGE()
{
return 0;
}
@Override
public void affectCharStats(MOB affected, CharStats affectableStats)
{
affectableStats.setStat(CharStats.STAT_CONSTITUTION,affectableStats.getStat(CharStats.STAT_CONSTITUTION)-1);
if(affectableStats.getStat(CharStats.STAT_CONSTITUTION)<=0)
affectableStats.setStat(CharStats.STAT_CONSTITUTION,1);
affectableStats.setStat(CharStats.STAT_INTELLIGENCE,affectableStats.getStat(CharStats.STAT_INTELLIGENCE)-10);
if(affectableStats.getStat(CharStats.STAT_INTELLIGENCE)<=0)
affectableStats.setStat(CharStats.STAT_INTELLIGENCE,1);
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
cf272164a602cca3038080b50895406bd57d5ac2
|
ee3e30a6d5990432657214fedd81b2083c26ab28
|
/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/codesystems/AdverseEventCausalityResult.java
|
c8bd5226bae23e4d62dc49fd9a0f9f5389376b15
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
herimakil/hapi-fhir
|
588938b328e3c83809617b674ff25903c1541bab
|
15cc76600069af8f3d7419575d4cfb9e4b613db0
|
refs/heads/master
| 2021-01-19T20:43:57.911661
| 2017-04-14T15:27:37
| 2017-04-14T15:27:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,189
|
java
|
package org.hl7.fhir.dstu3.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
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 HL7 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 HOLDER 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.
*/
// Generated on Sat, Mar 4, 2017 06:58-0500 for FHIR v1.9.0
import org.hl7.fhir.exceptions.FHIRException;
public enum AdverseEventCausalityResult {
/**
* null
*/
RESULT1,
/**
* null
*/
RESULT2,
/**
* added to help the parsers
*/
NULL;
public static AdverseEventCausalityResult fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("result1".equals(codeString))
return RESULT1;
if ("result2".equals(codeString))
return RESULT2;
throw new FHIRException("Unknown AdverseEventCausalityResult code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case RESULT1: return "result1";
case RESULT2: return "result2";
default: return "?";
}
}
public String getSystem() {
return "http://hl7.org/fhir/adverse-event-causality-result";
}
public String getDefinition() {
switch (this) {
case RESULT1: return "";
case RESULT2: return "";
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case RESULT1: return "placeholder";
case RESULT2: return "placeholder";
default: return "?";
}
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
3f4a12b95c7a932b5bc438c07cab7ae866060501
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-cr/src/main/java/com/aliyuncs/cr/model/v20181201/ListInstanceRegionResponse.java
|
e38cc75b932bee10da824a98846104f880fad246
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,263
|
java
|
/*
* 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.aliyuncs.cr.model.v20181201;
import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.cr.transform.v20181201.ListInstanceRegionResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class ListInstanceRegionResponse extends AcsResponse {
private String code;
private Boolean isSuccess;
private String requestId;
private List<RegionsItem> regions;
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public Boolean getIsSuccess() {
return this.isSuccess;
}
public void setIsSuccess(Boolean isSuccess) {
this.isSuccess = isSuccess;
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public List<RegionsItem> getRegions() {
return this.regions;
}
public void setRegions(List<RegionsItem> regions) {
this.regions = regions;
}
public static class RegionsItem {
private String localName;
private String regionId;
public String getLocalName() {
return this.localName;
}
public void setLocalName(String localName) {
this.localName = localName;
}
public String getRegionId() {
return this.regionId;
}
public void setRegionId(String regionId) {
this.regionId = regionId;
}
}
@Override
public ListInstanceRegionResponse getInstance(UnmarshallerContext context) {
return ListInstanceRegionResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
33093e532ee5b661b3be0701efca5effebd40686
|
2a393556d8812bd873c713374033719740f02af4
|
/src/main/java/io/github/jhipster/application/MayrosKitchenApp.java
|
bac43d6f381e003a97401ac725c6d3477a5d72e5
|
[] |
no_license
|
drgeb/mayros-kitchen-application
|
f6f9eccc7b24bb6b7314accea5150812452fe2f7
|
ee3b5d776de0dc6e4610445b36d941ca18827389
|
refs/heads/master
| 2020-03-29T15:14:59.960010
| 2018-09-24T04:05:40
| 2018-09-24T04:05:40
| 150,052,395
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,034
|
java
|
package io.github.jhipster.application;
import io.github.jhipster.application.config.ApplicationProperties;
import io.github.jhipster.application.config.DefaultProfileUtil;
import io.github.jhipster.config.JHipsterConstants;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.core.env.Environment;
import javax.annotation.PostConstruct;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.Collection;
@SpringBootApplication
@EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class})
public class MayrosKitchenApp {
private static final Logger log = LoggerFactory.getLogger(MayrosKitchenApp.class);
private final Environment env;
public MayrosKitchenApp(Environment env) {
this.env = env;
}
/**
* Initializes MayrosKitchen.
* <p>
* Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile
* <p>
* You can find more information on how profiles work with JHipster on <a href="https://www.jhipster.tech/profiles/">https://www.jhipster.tech/profiles/</a>.
*/
@PostConstruct
public void initApplication() {
Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles());
if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) {
log.error("You have misconfigured your application! It should not run " +
"with both the 'dev' and 'prod' profiles at the same time.");
}
if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) {
log.error("You have misconfigured your application! It should not " +
"run with both the 'dev' and 'cloud' profiles at the same time.");
}
}
/**
* Main method, used to run the application.
*
* @param args the command line arguments
*/
public static void main(String[] args) {
SpringApplication app = new SpringApplication(MayrosKitchenApp.class);
DefaultProfileUtil.addDefaultProfile(app);
Environment env = app.run(args).getEnvironment();
logApplicationStartup(env);
}
private static void logApplicationStartup(Environment env) {
String protocol = "http";
if (env.getProperty("server.ssl.key-store") != null) {
protocol = "https";
}
String serverPort = env.getProperty("server.port");
String contextPath = env.getProperty("server.servlet.context-path");
if (StringUtils.isBlank(contextPath)) {
contextPath = "/";
}
String hostAddress = "localhost";
try {
hostAddress = InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException e) {
log.warn("The host name could not be determined, using `localhost` as fallback");
}
log.info("\n----------------------------------------------------------\n\t" +
"Application '{}' is running! Access URLs:\n\t" +
"Local: \t\t{}://localhost:{}{}\n\t" +
"External: \t{}://{}:{}{}\n\t" +
"Profile(s): \t{}\n----------------------------------------------------------",
env.getProperty("spring.application.name"),
protocol,
serverPort,
contextPath,
protocol,
hostAddress,
serverPort,
contextPath,
env.getActiveProfiles());
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
3f763c0823686045864fe541c72d3a59db40e104
|
e55d6023fdd2639781d00340faa13e0a14fedd6b
|
/service.external.riksdagen/src/test/java/com/hack23/cia/service/external/riksdagen/impl/RiksdagenDateUtilITest.java
|
5d87f1406349c82d194fe6d30e3ade9d1171830c
|
[
"Apache-2.0"
] |
permissive
|
renovate-tests/cia
|
0579594de04b76bc6d23d38622e77bd9b641c7d7
|
4b340ef8afa17cffb5ffe6a5607428a5ce8c70d1
|
refs/heads/master
| 2020-05-24T04:53:39.941847
| 2019-05-16T18:20:25
| 2019-05-16T18:20:25
| 187,101,527
| 0
| 0
|
Apache-2.0
| 2019-05-16T21:14:50
| 2019-05-16T21:08:43
|
Java
|
UTF-8
|
Java
| false
| false
| 7,857
|
java
|
/*
* Copyright 2010-2019 James Pether Sörling
*
* 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.
*
* $Id$
* $HeadURL$
*/
package com.hack23.cia.service.external.riksdagen.impl;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import org.junit.Test;
import com.hack23.cia.model.external.riksdagen.votering.impl.BallotContainer;
import com.hack23.cia.model.external.riksdagen.votering.impl.BallotDocumentData;
import com.hack23.cia.model.external.riksdagen.votering.impl.BallotDocumentElement;
import com.hack23.cia.model.external.riksdagen.votering.impl.VoteDataDto;
import com.hack23.cia.testfoundation.AbstractUnitTest;
/**
* The Class RiksdagenDateUtilITest.
*/
public final class RiksdagenDateUtilITest extends AbstractUnitTest {
/**
* Try to find valid vote date list exist same date success.
*
* @throws Exception
* the exception
*/
@Test
public void tryToFindValidVoteDateListExistSameDateSuccess() throws Exception {
RiksdagenDateUtil riksdagenDateUtil = new RiksdagenDateUtil();
String madePublicBallotDate = "2018-01-01";
BallotContainer ballotContainer = new BallotContainer().withBallotDocumentData(new BallotDocumentData()).withBallotDocumentElement(new BallotDocumentElement().withCreatedDate(madePublicBallotDate));
List<VoteDataDto> voteDataList = new ArrayList<>();
String voteDate = "2002-01-01";
voteDataList.add(new VoteDataDto().withVoteDate(voteDate));
Date tryToFindValidVoteDate = riksdagenDateUtil.tryToFindValidVoteDate(ballotContainer, voteDataList);
SimpleDateFormat dateFormat = new SimpleDateFormat(RiksdagenDateUtil.YYYY_MM_DD,Locale.ENGLISH);
assertEquals(voteDate,dateFormat.format(tryToFindValidVoteDate));
}
/**
* Try to find valid vote date list exist different date success.
*
* @throws Exception
* the exception
*/
@Test
public void tryToFindValidVoteDateListExistDifferentDateSuccess() throws Exception {
RiksdagenDateUtil riksdagenDateUtil = new RiksdagenDateUtil();
String madePublicBallotDate = "2018-01-01";
BallotContainer ballotContainer = new BallotContainer().withBallotDocumentData(new BallotDocumentData()).withBallotDocumentElement(new BallotDocumentElement().withCreatedDate(madePublicBallotDate));
List<VoteDataDto> voteDataList = new ArrayList<>();
String voteDate = "2002-01-01";
voteDataList.add(new VoteDataDto().withVoteDate(voteDate));
voteDataList.add(new VoteDataDto().withVoteDate("2001-01-04"));
Date tryToFindValidVoteDate = riksdagenDateUtil.tryToFindValidVoteDate(ballotContainer, voteDataList);
SimpleDateFormat dateFormat = new SimpleDateFormat(RiksdagenDateUtil.YYYY_MM_DD,Locale.ENGLISH);
assertEquals(madePublicBallotDate,dateFormat.format(tryToFindValidVoteDate));
}
/**
* Try to find valid vote date ballot created day exist success.
*
* @throws Exception
* the exception
*/
@Test
public void tryToFindValidVoteDateBallotCreatedDayExistSuccess() throws Exception {
RiksdagenDateUtil riksdagenDateUtil = new RiksdagenDateUtil();
String ballotDate = "2018-01-01";
BallotContainer ballotContainer = new BallotContainer().withBallotDocumentData(new BallotDocumentData()).withBallotDocumentElement(new BallotDocumentElement().withCreatedDate(ballotDate));
List<VoteDataDto> voteDataList = new ArrayList<>();
Date tryToFindValidVoteDate = riksdagenDateUtil.tryToFindValidVoteDate(ballotContainer, voteDataList);
SimpleDateFormat dateFormat = new SimpleDateFormat(RiksdagenDateUtil.YYYY_MM_DD,Locale.ENGLISH);
assertEquals(ballotDate,dateFormat.format(tryToFindValidVoteDate));
}
/**
* Try to find valid vote date ballot created day invalid fallback to system
* date exist success.
*
* @throws Exception
* the exception
*/
@Test
public void tryToFindValidVoteDateBallotCreatedDayInvalidFallbackToSystemDateExistSuccess() throws Exception {
RiksdagenDateUtil riksdagenDateUtil = new RiksdagenDateUtil();
String ballotDate = "2018-01";
String systemDate = "2018-01-01";
BallotContainer ballotContainer = new BallotContainer().withBallotDocumentData(new BallotDocumentData()).withBallotDocumentElement(new BallotDocumentElement().withCreatedDate(ballotDate).withSystemDate(systemDate));
List<VoteDataDto> voteDataList = new ArrayList<>();
Date tryToFindValidVoteDate = riksdagenDateUtil.tryToFindValidVoteDate(ballotContainer, voteDataList);
SimpleDateFormat dateFormat = new SimpleDateFormat(RiksdagenDateUtil.YYYY_MM_DD,Locale.ENGLISH);
assertEquals(systemDate,dateFormat.format(tryToFindValidVoteDate));
}
/**
* Try to find valid vote date ballot public date exist success.
*
* @throws Exception
* the exception
*/
@Test
public void tryToFindValidVoteDateBallotPublicDateExistSuccess() throws Exception {
RiksdagenDateUtil riksdagenDateUtil = new RiksdagenDateUtil();
String ballotDate = "2017-01-01";
BallotContainer ballotContainer = new BallotContainer().withBallotDocumentData(new BallotDocumentData()).withBallotDocumentElement(new BallotDocumentElement().withMadePublicDate(ballotDate));
List<VoteDataDto> voteDataList = new ArrayList<>();
Date tryToFindValidVoteDate = riksdagenDateUtil.tryToFindValidVoteDate(ballotContainer, voteDataList);
SimpleDateFormat dateFormat = new SimpleDateFormat(RiksdagenDateUtil.YYYY_MM_DD,Locale.ENGLISH);
assertEquals(ballotDate,dateFormat.format(tryToFindValidVoteDate));
}
/**
* Try to find valid vote date system date exist success.
*
* @throws Exception
* the exception
*/
@Test
public void tryToFindValidVoteDateSystemDateExistSuccess() throws Exception {
RiksdagenDateUtil riksdagenDateUtil = new RiksdagenDateUtil();
String ballotDate = "2016-01-01";
BallotContainer ballotContainer = new BallotContainer().withBallotDocumentData(new BallotDocumentData()).withBallotDocumentElement(new BallotDocumentElement().withSystemDate(ballotDate));
List<VoteDataDto> voteDataList = new ArrayList<>();
Date tryToFindValidVoteDate = riksdagenDateUtil.tryToFindValidVoteDate(ballotContainer, voteDataList);
SimpleDateFormat dateFormat = new SimpleDateFormat(RiksdagenDateUtil.YYYY_MM_DD,Locale.ENGLISH);
assertEquals(ballotDate,dateFormat.format(tryToFindValidVoteDate));
}
/**
* Try to find valid vote date system date invalid fallback to public date exist
* success.
*
* @throws Exception
* the exception
*/
@Test
public void tryToFindValidVoteDateSystemDateInvalidFallbackToPublicDateExistSuccess() throws Exception {
RiksdagenDateUtil riksdagenDateUtil = new RiksdagenDateUtil();
String systemDate = "2016-01";
String madePublicDate = "2016-01-01";
BallotContainer ballotContainer = new BallotContainer().withBallotDocumentData(new BallotDocumentData()).withBallotDocumentElement(new BallotDocumentElement().withSystemDate(systemDate).withMadePublicDate(madePublicDate));
List<VoteDataDto> voteDataList = new ArrayList<>();
Date tryToFindValidVoteDate = riksdagenDateUtil.tryToFindValidVoteDate(ballotContainer, voteDataList);
SimpleDateFormat dateFormat = new SimpleDateFormat(RiksdagenDateUtil.YYYY_MM_DD,Locale.ENGLISH);
assertEquals(madePublicDate,dateFormat.format(tryToFindValidVoteDate));
}
}
|
[
"pether.sorling@gmail.com"
] |
pether.sorling@gmail.com
|
3361a6037e0e9f91c456085aa9c6f55a536ebbc4
|
c8ba80de2d95b7094a3496dba2d3240a94b6a712
|
/bookmydoctor/src/main/java/com/javacloud/bookmydoctor/handler/MyAuthenticationSuccessHandler.java
|
4d69700e82a9100ba1a090b0b1451226432fe0e1
|
[] |
no_license
|
KhushbuGithub/JavaCloudBME
|
ecde47c5c192c9a69bf8924e1b9204033c02be0d
|
27e963527d54fc19f24cb88c4c775795a4242294
|
refs/heads/master
| 2022-11-11T05:42:48.029861
| 2020-06-29T14:42:48
| 2020-06-29T14:42:48
| 275,841,286
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,212
|
java
|
package com.javacloud.bookmydoctor.handler;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.http.MediaType;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.javacloud.bookmydoctor.dto.UserResponse;
@Component
public class MyAuthenticationSuccessHandler implements AuthenticationSuccessHandler {
@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) throws IOException, ServletException {
UserResponse userResponse = new UserResponse();
userResponse.setStatusCode(201);
userResponse.setMessage("success");
userResponse.setDescription("Login Successfull");
ObjectMapper mapper = new ObjectMapper();
response.setContentType(MediaType.APPLICATION_JSON_VALUE);
response.getWriter().write(mapper.writeValueAsString(userResponse));
response.setStatus(200);
}
}
|
[
"khushbukumari3031@gmail.com"
] |
khushbukumari3031@gmail.com
|
762595634459d7511153f7817945ef9ec20f2570
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XCOMMONS-928-9-5-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/platform/wiki/creationjob/internal/ExtensionInstaller_ESTest.java
|
493f954c2b3962d81fe1d7197cf2297b20586f25
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 587
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Apr 01 10:57:13 UTC 2020
*/
package org.xwiki.platform.wiki.creationjob.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class ExtensionInstaller_ESTest extends ExtensionInstaller_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
d3e1bb4681ec60e05b6770142e2de70e7871d416
|
f7c5e3f5834206a7b0d1dadd773d1de032f731e7
|
/dmerce3/src/test/com/wanci/dmerce/test/WorkflowBuilderTest.java
|
4ee5caafe33e746a8b24f300447e90a4cfb7ae4c
|
[] |
no_license
|
rbe/dmerce
|
93d601462c50dfbbf62b577803ae697d3abde333
|
3cfcae894c165189cc3ff61e27ca284f09e87871
|
refs/heads/master
| 2021-01-01T17:06:27.872197
| 2012-05-04T07:22:26
| 2012-05-04T07:22:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,165
|
java
|
/*
* Datei angelegt am 20.10.2003
*/
package com.wanci.dmerce.test;
import javax.xml.bind.JAXBException;
import com.wanci.dmerce.exceptions.DmerceException;
import com.wanci.dmerce.exceptions.WorkflowConfigurationException;
import com.wanci.dmerce.workflow.webapp.WebappWorkflowBuilder;
import com.wanci.dmerce.workflow.webapp.WebappWorkflowEngine;
/**
* @author Masanori Fujita
*/
public class WorkflowBuilderTest {
public static void main(String[] args) throws JAXBException, DmerceException, WorkflowConfigurationException {
WebappWorkflowBuilder wb = new WebappWorkflowBuilder();
WebappWorkflowEngine engine = new WebappWorkflowEngine();
wb.readForms(engine);
/*
Iterator it = engine.getFields().iterator();
while (it.hasNext()) {
FormField field = (FormField) it.next();
System.out.println(field.getFormId()+"."+field.getName());
}
*/
wb.readWorkflows(engine);
System.out.println(engine.getWorkflow("einladung").toString()+"\n");
// System.out.println(engine.getWorkflow("register").toString()+"\n");
// System.out.println(engine.getWorkflow("verzweigung").toString()+"\n");
}
}
|
[
"ralf@art-of-coding.eu"
] |
ralf@art-of-coding.eu
|
ee596d0c36b39a1bf7585e2546c570b7f06e890b
|
f86768df46be9f749667f6c4c6602a57fa99493c
|
/Spring_2018/SpringDemo_DI_Map_Key_Value_Ref/SpringDemo/src/main/java/com/ram/core/FruitInfo.java
|
af9a04ce632d44e67a88f8b89a1d4864519df413
|
[] |
no_license
|
Jhon19941211/javaee
|
6a5517630f2e0e21ff30b6cd1e9ce88d8a87c5a6
|
95ca15570b6020d25ec3f3413bcc5348406c4881
|
refs/heads/master
| 2021-10-10T20:49:16.872970
| 2019-01-17T03:27:21
| 2019-01-17T03:27:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,015
|
java
|
package com.ram.core;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import com.ram.model.Fruit;
import com.ram.model.FruitSeller;
public class FruitInfo
{
private Map<FruitSeller, Fruit> mapOfFruitSellerAndFruit;
public FruitInfo(Map<FruitSeller, Fruit> mapOfFruitSellerAndFruit)
{
System.out.println(
"FruitInfo(Map<FruitSeller, Fruit> mapOfFruitSellerAndFruit) "
+ "constructor is called by the Spring container");
this.mapOfFruitSellerAndFruit = mapOfFruitSellerAndFruit;
}
public void displayFruitInfo()
{
System.out.println("FruitInfo [mapOfFruitSellerAndFruit="
+ mapOfFruitSellerAndFruit + "]");
Set<Entry<FruitSeller, Fruit>> set = mapOfFruitSellerAndFruit
.entrySet();
Iterator<Entry<FruitSeller, Fruit>> itr = set.iterator();
while (itr.hasNext())
{
Entry<FruitSeller, Fruit> entry = itr.next();
System.out.println("FruitSeller = " + entry.getKey() + ", Fruit = "
+ entry.getValue());
}
}
}
|
[
"ramram_43210@yahoo.com"
] |
ramram_43210@yahoo.com
|
87300bcbdb2fb9492faf7ef78d15b503be6bdaa3
|
f90b2a22050079eb02c5000ad0fbac4aa8744cee
|
/src/main/java/cn/qs/mapper/baseinfo/OrderMapper.java
|
ec6f96f27d397383e200349162e04471723d33bf
|
[] |
no_license
|
qiao-zhi/bs-pig
|
127cf82e7b5120725f7ff5decc76909d795a1cf9
|
01f618dac090702f6ed2d39aa261901f612e31c8
|
refs/heads/master
| 2022-09-15T22:33:31.650702
| 2019-10-14T10:27:51
| 2019-10-14T10:27:51
| 211,648,474
| 0
| 0
| null | 2022-09-01T23:13:26
| 2019-09-29T10:52:55
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 175
|
java
|
package cn.qs.mapper.baseinfo;
import cn.qs.bean.baseinfo.Order;
import cn.qs.mapper.BaseCRUDMapper;
public interface OrderMapper extends BaseCRUDMapper<Order, Integer>{
}
|
[
"qiao_liqiang@163.com"
] |
qiao_liqiang@163.com
|
df8504b3970b90379f4e93b9970b1f5a8cb0e89d
|
21808641e84984cebd31f2007145afde113c7d41
|
/src/test/java/SchedulerTest.java
|
25aa40dda990003c54e1e955cba68de5c8324869
|
[] |
no_license
|
j112929/moffice
|
002b4042fba0acd9fbc4dd80df073ee2c038250b
|
519f8fc985422b081ef170eca6de85e1c03a320b
|
refs/heads/master
| 2021-01-10T10:27:43.636739
| 2016-03-14T07:33:29
| 2016-03-14T07:33:29
| 53,831,006
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,060
|
java
|
/**
* 宝龙电商
* PACKAGE_NAME
* SchedulerTest.java
* <p/>
* 2016-02-19
* 2016宝龙公司-版权所有
*/
import com.plocc.moffice.entity.UserEntity;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.scheduling.commonj.TimerManagerTaskScheduler;
import org.springframework.scheduling.concurrent.DefaultManagedTaskScheduler;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
/**
* SchedulerTest
*
* @author Zhanggj
* @version 1.0.0
* @time 17:46
* @email zhanggj@powerlong.com
* @description 职责描述
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(loader = AnnotationConfigContextLoader.class)
public class SchedulerTest extends AbstractJUnit4SpringContextTests {
@Autowired
private UserEntity userEntity;
@Autowired
private TaskScheduler taskScheduler;
@Configuration
@EnableScheduling
public static class ContextConfiguration {
@Bean
public UserEntity userEntity() {
return new UserEntity();
}
@Scheduled(fixedDelay = 1000)
public void work() {
System.out.println("work:");
}
}
@Test
public void test() throws InterruptedException {
System.out.println("--------:" + taskScheduler);
Thread.sleep(100000);
}
}
|
[
"1129290218@qq.com"
] |
1129290218@qq.com
|
6be511b9bfa27c92ec62a26c12ed0d9bfb4afafa
|
7a6e973df8c5ff138f973f4ed436b52ee5751fdf
|
/Day17/src/kh/setLotto/controller/LottoController.java
|
24e7d557bc18483d7d4b36d00ba824180f381fc2
|
[] |
no_license
|
ajtwls1256/Eclipse-workspace
|
b0e6c17b49cdf94d46bc4d345851cf65a5f5dc7a
|
b473e632bc232768a9546172784c31f15fbd8680
|
refs/heads/master
| 2020-09-17T10:44:23.830133
| 2019-11-26T08:01:54
| 2019-11-26T08:01:54
| 224,078,431
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,608
|
java
|
package kh.setLotto.controller;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Random;
import java.util.Scanner;
public class LottoController
{
Scanner sc = new Scanner(System.in);
Random r = new Random();
public void main()
{
HashSet<Integer> myLotto = new HashSet<>();
System.out.println("\n===== 로또 프로그램 =====");
while(myLotto.size() < 6)
{
System.out.print((myLotto.size()+1) + "번째 번호 입력 : ");
int sel = sc.nextInt();
if(sel < 1 || sel > 45)
{
System.out.println("1~45 사이의 수만 입력해주세요!");
continue;
}
if(!myLotto.add(sel))
{
System.out.println("중복된 숫자입니다!");
continue;
}
}
int count = 0;
int round = 1;
while(count != 6)
{
count = 0;
HashSet<Integer> comLotto = new HashSet<>();
while(comLotto.size() < 6)
{
int sel = r.nextInt(45) + 1;
if(sel < 1 || sel > 45)
{
System.out.println("컴퓨터 범위 밖 숫자발생 random범위조정");
continue;
}
if(!comLotto.add(sel))
{
// System.out.println("컴퓨터 중복된 숫자발생");
continue;
}
}
ArrayList<Integer> my = new ArrayList<>(myLotto);
ArrayList<Integer> com = new ArrayList<>(comLotto);
for(int i=0; i<com.size(); i++)
{
for(int j=0; j<my.size(); j++)
{
if(com.get(i) == my.get(j))
{
count++;
break;
}
}
}
for(int i =0; i<my.size(); i++)
System.out.print(my.get(i) + " ");
System.out.println();
for(int i =0; i<com.size(); i++)
System.out.print(com.get(i) + " ");
System.out.println(round + "회차 맞은 갯수 : " + count);
round++;
}
}
}
|
[
"ajtwls1256@gmail.com"
] |
ajtwls1256@gmail.com
|
2f146099849a149377034afb8ca438a581d9126d
|
89972779259818d76e3d249a52153e4f42dd9501
|
/old/vnm-selfcare-webapps-mega2-master/vnm-selfcare-core-2.0/src/main/java/com/gnv/vnm/selfcare/core/adapter/rtbs/ws/OfferHistoryRecord.java
|
3a4eb8d7732cb0f6b6fe0ad1f0603635e273018f
|
[] |
no_license
|
SM-Tiwari/Spring-Security
|
5514149eb7e082e04f04dab0cbcbf9fb1df5d84e
|
f0676d3a96748d476c226ba7e724896eab77fa71
|
refs/heads/master
| 2022-12-28T18:07:32.056655
| 2020-01-31T03:31:13
| 2020-01-31T03:31:13
| 237,351,143
| 0
| 0
| null | 2022-12-10T01:04:42
| 2020-01-31T03:10:35
|
Java
|
UTF-8
|
Java
| false
| false
| 8,048
|
java
|
package com.gnv.vnm.selfcare.core.adapter.rtbs.ws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
/**
* <p>Java class for OfferHistoryRecord complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="OfferHistoryRecord">
* <complexContent>
* <extension base="{http://comverse-in.com/prepaid/ccws}OfferBase">
* <sequence>
* <element name="SubscriberID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Identity" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Username" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ServiceProvider" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="GroupID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="AccountType" type="{http://comverse-in.com/prepaid/ccws}SubscriberAccountType"/>
* <element name="Action" type="{http://comverse-in.com/prepaid/ccws}Offer_Action"/>
* <element name="ActionDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
* <element name="Reason" type="{http://comverse-in.com/prepaid/ccws}Offer_Action_Reason"/>
* <element name="Type" type="{http://comverse-in.com/prepaid/ccws}Offer_Type"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OfferHistoryRecord", propOrder = {
"subscriberID",
"identity",
"username",
"serviceProvider",
"groupID",
"accountType",
"action",
"actionDate",
"reason",
"type"
})
public class OfferHistoryRecord
extends OfferBase
{
@XmlElement(name = "SubscriberID")
protected String subscriberID;
@XmlElement(name = "Identity")
protected String identity;
@XmlElement(name = "Username")
protected String username;
@XmlElement(name = "ServiceProvider")
protected String serviceProvider;
@XmlElement(name = "GroupID")
protected String groupID;
@XmlElement(name = "AccountType", required = true)
@XmlSchemaType(name = "string")
protected SubscriberAccountType accountType;
@XmlElement(name = "Action", required = true)
@XmlSchemaType(name = "string")
protected OfferAction action;
@XmlElement(name = "ActionDate", required = true)
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar actionDate;
@XmlElement(name = "Reason", required = true)
@XmlSchemaType(name = "string")
protected OfferActionReason reason;
@XmlElement(name = "Type", required = true)
@XmlSchemaType(name = "string")
protected OfferType type;
/**
* Gets the value of the subscriberID property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSubscriberID() {
return subscriberID;
}
/**
* Sets the value of the subscriberID property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSubscriberID(String value) {
this.subscriberID = value;
}
/**
* Gets the value of the identity property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIdentity() {
return identity;
}
/**
* Sets the value of the identity property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIdentity(String value) {
this.identity = value;
}
/**
* Gets the value of the username property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUsername() {
return username;
}
/**
* Sets the value of the username property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUsername(String value) {
this.username = value;
}
/**
* Gets the value of the serviceProvider property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getServiceProvider() {
return serviceProvider;
}
/**
* Sets the value of the serviceProvider property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setServiceProvider(String value) {
this.serviceProvider = value;
}
/**
* Gets the value of the groupID property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getGroupID() {
return groupID;
}
/**
* Sets the value of the groupID property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setGroupID(String value) {
this.groupID = value;
}
/**
* Gets the value of the accountType property.
*
* @return
* possible object is
* {@link SubscriberAccountType }
*
*/
public SubscriberAccountType getAccountType() {
return accountType;
}
/**
* Sets the value of the accountType property.
*
* @param value
* allowed object is
* {@link SubscriberAccountType }
*
*/
public void setAccountType(SubscriberAccountType value) {
this.accountType = value;
}
/**
* Gets the value of the action property.
*
* @return
* possible object is
* {@link OfferAction }
*
*/
public OfferAction getAction() {
return action;
}
/**
* Sets the value of the action property.
*
* @param value
* allowed object is
* {@link OfferAction }
*
*/
public void setAction(OfferAction value) {
this.action = value;
}
/**
* Gets the value of the actionDate property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getActionDate() {
return actionDate;
}
/**
* Sets the value of the actionDate property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setActionDate(XMLGregorianCalendar value) {
this.actionDate = value;
}
/**
* Gets the value of the reason property.
*
* @return
* possible object is
* {@link OfferActionReason }
*
*/
public OfferActionReason getReason() {
return reason;
}
/**
* Sets the value of the reason property.
*
* @param value
* allowed object is
* {@link OfferActionReason }
*
*/
public void setReason(OfferActionReason value) {
this.reason = value;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link OfferType }
*
*/
public OfferType getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link OfferType }
*
*/
public void setType(OfferType value) {
this.type = value;
}
}
|
[
"siddhesh.mani@infotelgroup.in"
] |
siddhesh.mani@infotelgroup.in
|
aed4ed3fef43a076dbf2358430c3eeea0221a335
|
fa7e89fe2e7ea936ff2634e3c9adf1a6aaf1ad29
|
/jaxb/extract-v5/ch/admin/geo/schemas/v_d/oereb/_1_0/extractdata/LawstatusCode.java
|
5f60ee5f7c5c143779c075592c53cf79886ab531
|
[
"MIT"
] |
permissive
|
edigonzales-archiv/oereb-rahmenmodell-tests
|
b3da73e3f74536b97a132325e78cf05d887924d6
|
292adf552f37bc82d4164b7746884b998fdccc7e
|
refs/heads/master
| 2021-09-07T06:09:57.471579
| 2018-02-18T14:38:22
| 2018-02-18T14:38:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,578
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// 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: 2017.12.24 at 07:38:08 PM CET
//
package ch.admin.geo.schemas.v_d.oereb._1_0.extractdata;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for LawstatusCode.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="LawstatusCode">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="inForce"/>
* <enumeration value="runningModifications"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "LawstatusCode")
@XmlEnum
public enum LawstatusCode {
@XmlEnumValue("inForce")
IN_FORCE("inForce"),
@XmlEnumValue("runningModifications")
RUNNING_MODIFICATIONS("runningModifications");
private final String value;
LawstatusCode(String v) {
value = v;
}
public String value() {
return value;
}
public static LawstatusCode fromValue(String v) {
for (LawstatusCode c: LawstatusCode.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"edi.gonzales@gmail.com"
] |
edi.gonzales@gmail.com
|
7aa2d3a102b5382bb71586f4fa957b685bcbc702
|
834184ae7fb5fc951ec4ca76d0ab4d74224817a0
|
/src/main/java/com/nswt/framework/ssi/SSISet.java
|
d038001dd09b66d79c72ff71e64eba02121b337a
|
[] |
no_license
|
mipcdn/NswtOldPF
|
3bf9974be6ffbc32b2d52ef2e39adbe495185c7e
|
fe7be46f12b3874a7f19967c0808870d8e465f5a
|
refs/heads/master
| 2020-08-09T16:44:47.585700
| 2017-01-11T13:26:37
| 2017-01-11T13:26:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,600
|
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 com.nswt.framework.ssi;
import java.io.PrintWriter;
/**
* Implements the Server-side #set command
*
* @author Paul Speed
* @author Dan Sandberg
* @author David Becker
* @version $Revision: 565195 $, $Date: 2007-08-12 17:00:41 -0600 (Sun, 12 Aug 2007) $
*/
public class SSISet implements SSICommand {
/**
* @see SSICommand
*/
public long process(SSIMediator ssiMediator, String commandName,
String[] paramNames, String[] paramValues, PrintWriter writer)
throws SSIStopProcessingException {
long lastModified = 0;
String errorMessage = ssiMediator.getConfigErrMsg();
String variableName = null;
for (int i = 0; i < paramNames.length; i++) {
String paramName = paramNames[i];
String paramValue = paramValues[i];
if (paramName.equalsIgnoreCase("var")) {
variableName = paramValue;
} else if (paramName.equalsIgnoreCase("value")) {
if (variableName != null) {
String substitutedValue = ssiMediator
.substituteVariables(paramValue);
ssiMediator.setVariableValue(variableName,
substitutedValue);
lastModified = System.currentTimeMillis();
} else {
ssiMediator.log("#set--no variable specified");
writer.write(errorMessage);
throw new SSIStopProcessingException();
}
} else {
ssiMediator.log("#set--Invalid attribute: " + paramName);
writer.write(errorMessage);
throw new SSIStopProcessingException();
}
}
return lastModified;
}
}
|
[
"18611949252@163.como"
] |
18611949252@163.como
|
7f6450101fcf8594d7e123f20a27ae90c9ba9465
|
e4f288d49be110967b27816704ae188aecd4aab4
|
/subprojects/jtrim-property/src/main/java/org/jtrim2/property/CmpToConstProperty.java
|
602b939aeabf08b3d7766033315470965aef9d8a
|
[
"Apache-2.0"
] |
permissive
|
kelemen/JTrim
|
6a37b4d3859120ae72941835d82c98b5d058561a
|
6fb2fc59e8cde6e645c16a38feddcc1777c42d1f
|
refs/heads/master
| 2023-08-22T10:17:23.313463
| 2023-08-13T01:42:26
| 2023-08-13T01:42:26
| 4,034,471
| 8
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,760
|
java
|
package org.jtrim2.property;
import java.util.Objects;
import org.jtrim2.collections.EqualityComparator;
import org.jtrim2.event.ListenerRef;
final class CmpToConstProperty implements PropertySource<Boolean> {
private final Impl<?> impl;
public <ValueType> CmpToConstProperty(
PropertySource<? extends ValueType> property,
ValueType constValue,
EqualityComparator<? super ValueType> comparator) {
this.impl = new Impl<>(property, constValue, comparator);
}
@Override
public Boolean getValue() {
return impl.getValue();
}
@Override
public ListenerRef addChangeListener(Runnable listener) {
return impl.addChangeListener(listener);
}
@Override
public String toString() {
return getValue().toString();
}
private static final class Impl<ValueType> {
private final PropertySource<? extends ValueType> property;
private final ValueType constValue;
private final EqualityComparator<? super ValueType> comparator;
public Impl(
PropertySource<? extends ValueType> property,
ValueType constValue,
EqualityComparator<? super ValueType> comparator) {
Objects.requireNonNull(property, "property");
Objects.requireNonNull(comparator, "comparator");
this.property = property;
this.constValue = constValue;
this.comparator = comparator;
}
public boolean getValue() {
return comparator.equals(property.getValue(), constValue);
}
public ListenerRef addChangeListener(Runnable listener) {
return property.addChangeListener(listener);
}
}
}
|
[
"attila.kelemen85@gmail.com"
] |
attila.kelemen85@gmail.com
|
d240d6c9a80dacb669c8392c0d01a2c66dd96dac
|
85986e4d862e6fd257eb1c3db6f6b9c82bc6c4d5
|
/prjClienteSIC/src/main/java/ec/com/smx/sic/cliente/gestor/proveedor/usuariosproveedor/validacion/IValidacionDatosFuncionarioProveedorGestor.java
|
2eaa005957ddc1c87ef7c880a0fd3056801b7b2c
|
[] |
no_license
|
SebasBenalcazarS/RepoAngularJS
|
1d60d0dec454fe4f1b1a8c434b656d55166f066f
|
5c3e1d5bb4a624e30cba0d518ff0b0cda14aa92c
|
refs/heads/master
| 2016-08-03T23:21:26.639859
| 2015-08-19T16:05:00
| 2015-08-19T16:05:00
| 40,517,374
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 545
|
java
|
/**
*
*/
package ec.com.smx.sic.cliente.gestor.proveedor.usuariosproveedor.validacion;
import java.io.Serializable;
import ec.com.smx.corpv2.dto.FuncionarioDTO;
import ec.com.smx.sic.cliente.exception.SICException;
/**
* @author Mario Braganza
*
*/
public interface IValidacionDatosFuncionarioProveedorGestor extends
Serializable {
/**
*
* @param funcionarioDTO
* @return
* @throws SICException
*/
Boolean validarAsignacionEstablecimientosPorDefectoAFuncionario(FuncionarioDTO funcionarioDTO) throws SICException;
}
|
[
"nbenalcazar@kruger.com.ec"
] |
nbenalcazar@kruger.com.ec
|
0045dd657369472d3ba25c47a3e23f035bdf0f36
|
b280a34244a58fddd7e76bddb13bc25c83215010
|
/scmv6/center-batch/src/main/java/com/smate/center/batch/dao/sns/pub/ProjectReportPubDao.java
|
ed932d2f3170b9f42e023d7cc96e7d1988bb6ddc
|
[] |
no_license
|
hzr958/myProjects
|
910d7b7473c33ef2754d79e67ced0245e987f522
|
d2e8f61b7b99a92ffe19209fcda3c2db37315422
|
refs/heads/master
| 2022-12-24T16:43:21.527071
| 2019-08-16T01:46:18
| 2019-08-16T01:46:18
| 202,512,072
| 2
| 3
| null | 2022-12-16T05:31:05
| 2019-08-15T09:21:04
|
Java
|
UTF-8
|
Java
| false
| false
| 2,660
|
java
|
package com.smate.center.batch.dao.sns.pub;
import java.util.List;
import java.util.Set;
import com.smate.center.batch.model.sns.pub.NsfcPrjRptPub;
import com.smate.center.batch.model.sns.pub.NsfcPrjRptPubId;
import com.smate.center.batch.model.sns.pub.NsfcProjectReport;
/**
* 结题报告成果DAO.
*
* @author LY
*
*/
public interface ProjectReportPubDao {
/**
* 根据结题报告ID 成果列表.
*
* @param rptId @param objectsPerPage @param pageNumber @return @throws
*/
public List<NsfcPrjRptPub> getProjectReportPubsByRptId(Long rptId, int objectsPerPage, int pageNumber);
/**
* 不分页的 成果列表.
*
* @param rptId @return @throws
*/
public List<NsfcPrjRptPub> getProjectReportPubsByRptId(Long rptId);
/**
* 保存更新成果.
*
* @param pub @throws
*/
public void saveProjectReportPub(NsfcPrjRptPub pub);
/**
* 批量保存更新成果.
*
* @param saveList @throws
*/
public void saveProjectReportPub(List<NsfcPrjRptPub> saveList);
/**
* 删除成果.
*
* @param rptId @param pubId @throws
*/
public void removeProjectReportPublication(Long rptId, Long pubId);
/**
* ID查询项目成果.
*
* @param id @return @throws
*/
public NsfcPrjRptPub getProjectReportPub(NsfcPrjRptPubId id);
/**
* 批量删除成果.
*
* @param rptId
* @param pubIds pubIds的长度必须大于0;
*/
public void removeProjectReportPublication(Long rptId, Long[] pubIds);
List<NsfcProjectReport> getProjectReportPubsByPrjId(Long prjId);
Long getCountProjectReportPubsByRptId(Long rptId);
Long getNsfcPrjRptPubMaxSeqNo(Long rptId);
NsfcProjectReport getProjectReportPubsByPrjIdAndYear(Long prjId, Integer year);
public Set<Long> getProjectReportPubsIdByRptId(Long rptId);
/**
* 更新是否标注.
*
* @param isTag @param prjId @param rptId @param pubId @throws
*/
public void saveProjectReportTag(Integer isTag, Long prjId, Long rptId, Long pubId);
/**
* 更新成果的引用情况.
*
* @param listInfo
*/
public void saveProjectReportPubList(String listInfo, Long rptId, Long pubId);
public NsfcPrjRptPub getById(NsfcPrjRptPubId rptPubId);
/**
* 根据PubId查找结题报告成果
*
* @param pubId @return @throws
*/
public List<NsfcPrjRptPub> findPrjPrtPubByPubId(Long pubId);
public List<NsfcPrjRptPub> queryNsfcPrjRptPubByPsnId(Long psnId);
public Long queryNsfcPrjRptPubCount(Long psnId, String title);
public void deleteNsfcPrjRptPub(Long rptId, Long pubId);
public void updateNsfcPrjRptPub(Long rptId, Long pubId, Long savePsnId);
}
|
[
"zhiranhe@irissz.com"
] |
zhiranhe@irissz.com
|
50aa7324b58b6f57455a0afc56d2eb9bb2594158
|
958b13739d7da564749737cb848200da5bd476eb
|
/src/main/java/com/alipay/api/response/AlipayTradePayConsultResponse.java
|
2cf8b8836bd7273af2393f62bb5669b15c561756
|
[
"Apache-2.0"
] |
permissive
|
anywhere/alipay-sdk-java-all
|
0a181c934ca84654d6d2f25f199bf4215c167bd2
|
649e6ff0633ebfca93a071ff575bacad4311cdd4
|
refs/heads/master
| 2023-02-13T02:09:28.859092
| 2021-01-14T03:17:27
| 2021-01-14T03:17:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,938
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.trade.pay.consult response.
*
* @author auto create
* @since 1.0, 2020-08-24 18:16:17
*/
public class AlipayTradePayConsultResponse extends AlipayResponse {
private static final long serialVersionUID = 1683696239558231436L;
/**
* 扩展信息,必须是json格式
*/
@ApiField("extend_infos")
private String extendInfos;
/**
* 参考结果。AVAILABLE:可用;UNAVAILABLE:不可用。针对不关注该字段的商户,返回为空。
*/
@ApiField("refer_result")
private String referResult;
/**
* 结果代码: refer_result为UNAVAILABLE时,非空。
USER_ZHIMA_AUTH_REFUSED:用户芝麻信用未授权给支付宝;
USER_ZHIMA_SCORE_REFUSED:用户芝麻分不准入;
USER_ENJOYPAY_NOT_SIGNED:用户未签约先享后付;
ENJOYPAY_AVAILABLE_AMOUNT_NOT_ENOUGH:先享后付可用额度不足;
USER_CREDIT_HAD_FREEZEN:用户授信额度被冻结
*/
@ApiField("result_code")
private String resultCode;
/**
* 结果信息: refer_result为UNAVAILABLE时,非空。描述信息与result_code对应。
*/
@ApiField("result_msg")
private String resultMsg;
public void setExtendInfos(String extendInfos) {
this.extendInfos = extendInfos;
}
public String getExtendInfos( ) {
return this.extendInfos;
}
public void setReferResult(String referResult) {
this.referResult = referResult;
}
public String getReferResult( ) {
return this.referResult;
}
public void setResultCode(String resultCode) {
this.resultCode = resultCode;
}
public String getResultCode( ) {
return this.resultCode;
}
public void setResultMsg(String resultMsg) {
this.resultMsg = resultMsg;
}
public String getResultMsg( ) {
return this.resultMsg;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
0f14281c640984c4ae319f290b946ecb7d299e1c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/29/29_2f41a99cad2e39d8b5599482263f3468e3a5f6bb/TestLaunch/29_2f41a99cad2e39d8b5599482263f3468e3a5f6bb_TestLaunch_s.java
|
b91ea6561cbfba84eadff7a44aafc2a007629368
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,466
|
java
|
package com.hellblazer.satellite;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.TimeUnit;
import junit.framework.TestCase;
import org.smartfrog.services.anubis.BasicConfiguration;
import org.smartfrog.services.anubis.locator.AnubisListener;
import org.smartfrog.services.anubis.locator.AnubisLocator;
import org.smartfrog.services.anubis.locator.AnubisProvider;
import org.smartfrog.services.anubis.locator.AnubisValue;
import org.smartfrog.services.anubis.partition.PartitionManager;
import org.smartfrog.services.anubis.partition.PartitionNotification;
import org.smartfrog.services.anubis.partition.util.Identity;
import org.smartfrog.services.anubis.partition.views.View;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import com.hellblazer.anubis.satellite.Launch;
public class TestLaunch extends TestCase {
@Configuration
static class node1 extends BasicConfiguration {
@Override
public int getMagic() {
try {
return Identity.getMagicFromLocalIpAddress();
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
@Override
public int heartbeatGroupTTL() {
return 0;
}
@Override
public int node() {
return 1;
}
}
static class Node extends AnubisListener {
CountDownLatch latch;
List<Object> stateValues = new ArrayList<Object>();
public Node(String n, CountDownLatch latch) {
super(n);
this.latch = latch;
}
@Override
public void newValue(AnubisValue value) {
stateValues.add(value.getValue());
latch.countDown();
}
@Override
public void removeValue(AnubisValue value) {
}
}
Launch launch;
@Override
protected void setUp() throws Exception {
launch = new Launch();
launch.setPeriod(3000);
launch.setTimeout(3000);
}
@Override
protected void tearDown() throws Exception {
launch.shutDown();
}
public void testLaunch() throws Exception {
final CyclicBarrier startBarrier = new CyclicBarrier(2);
final CountDownLatch latch = new CountDownLatch(6);
launch.setConfigPackage("com.hellblazer.satellite.test");
AnubisLocator locator0 = launch.getLocator();
assertNotNull(locator0);
ApplicationContext ctx = new AnnotationConfigApplicationContext(
node1.class);
AnubisLocator locator1 = ctx.getBean(AnubisLocator.class);
String stateName = "drink-me";
Node node0 = new Node(stateName, latch);
AnubisProvider provider0 = new AnubisProvider(stateName);
Node node1 = new Node(stateName, latch);
AnubisProvider provider1 = new AnubisProvider(stateName);
locator0.registerListener(node0);
locator1.registerListener(node1);
locator0.registerProvider(provider0);
locator1.registerProvider(provider1);
PartitionManager pm = ctx.getBean(PartitionManager.class);
pm.register(new PartitionNotification() {
@Override
public void partitionNotification(View view, int leader) {
if (view.isStable() && view.cardinality() == 2) {
try {
startBarrier.await();
} catch (InterruptedException e) {
return;
} catch (BrokenBarrierException e) {
return;
}
}
}
@Override
public void objectNotification(Object obj, int sender, long time) {
}
});
startBarrier.await(30, TimeUnit.SECONDS);
provider0.setValue("zero");
provider1.setValue("one");
latch.await(30, TimeUnit.SECONDS);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
528f5a2a72464298e379a41b0523c4c65ca185d1
|
f10dc8fb4181c4865cd4797de9d5a79f2c98af7a
|
/src/yh/core/funcs/doc/data/YHPlugin.java
|
9293e3d84705826f2170279870c3085e3e26897e
|
[] |
no_license
|
DennisAZ/NewtouchOA
|
b9c41cc1f4caac53b453c56952af0f5156b6c4fa
|
881d72d80c83e1f2ad578c92e37a3241498499fc
|
refs/heads/master
| 2020-03-30T05:37:21.900004
| 2018-09-29T02:11:34
| 2018-09-29T02:11:34
| 150,809,685
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 595
|
java
|
//
package yh.core.funcs.doc.data;
public class YHPlugin {
private String pluginName;
private String pluginFile;
private String pluginDesc;
public String getPluginName() {
return pluginName;
}
public void setPluginName(String pluginName) {
this.pluginName = pluginName;
}
public String getPluginFile() {
return pluginFile;
}
public void setPluginFile(String pluginFile) {
this.pluginFile = pluginFile;
}
public String getPluginDesc() {
return pluginDesc;
}
public void setPluginDesc(String pluginDesc) {
this.pluginDesc = pluginDesc;
}
}
|
[
"hao.duan@newtouch.cn"
] |
hao.duan@newtouch.cn
|
8a513af14fcbbe49218731fa221ead5d631a1fbd
|
c39cd76699b393a049b1e924a0cac53f024ba5ad
|
/src/nix/monthlybillsummary/NIXMonthlyBillSummaryByItem.java
|
e70cd9b6bfe5ce6168837ef440f0158219b1659b
|
[] |
no_license
|
duranto2009/btcl-automation
|
402f26dc6d8e745c0e8368c946f74a5eab703015
|
33ffa0b8e488d6a0d13c8f08e6b8058fe1b4764b
|
refs/heads/master
| 2022-02-27T07:38:19.181886
| 2019-09-18T10:42:21
| 2019-09-18T10:42:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,137
|
java
|
package nix.monthlybillsummary;
import annotation.ColumnName;
import annotation.PrimaryKey;
import annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import util.DateUtils;
@Data
@TableName("nix_monthly_bill_summary_item")
@EqualsAndHashCode(callSuper = false)
public class NIXMonthlyBillSummaryByItem {
@PrimaryKey
@ColumnName("id")
Long id;
@ColumnName("monthlyBillSummaryByClientId")
long monthlyBillSummaryByClientId;
@ColumnName("type")
int type;
@ColumnName("grandCost")
double grandCost = 0.0;
@ColumnName("discount")
double discount = 0.0;
@ColumnName("totalCost")
double totalCost = 0.0;
@ColumnName("vatRate")
double vatRate = 0.0;
@ColumnName("vat")
double vat = 0.0;
@ColumnName("netCost")
double netCost = 0.0;
@ColumnName("remark")
String remark = "";
@ColumnName("createdDate")
long createdDate;
String billType = "";
public void setType() {
switch (type) {
case NIXMonthlyBillSummaryType.REGULAR:
billType = "Regular Charge";
break;
case NIXMonthlyBillSummaryType.LOCAL_LOOP:
billType = "Local Loop Charge";
break;
case NIXMonthlyBillSummaryType.PORT:
billType = "Port Charge";
break;
case NIXMonthlyBillSummaryType.LOCAL_LOOP_ADJUSTMENT:
billType = "Adjustment of Local Loop Usage";
break;
case NIXMonthlyBillSummaryType.PORT_ADJUSTMENT:
billType = "Adjustment of Port Usage";
break;
case NIXMonthlyBillSummaryType.DEMAND_NOTE_ADJUSTMENT:
billType = "Demand Note Charge";
break;
default:
billType = "";
break;
}
}
//use this after fetching data from db
void setDataFromDBContent() {
setType();
}
public NIXMonthlyBillSummaryByItem() {
super();
this.createdDate = DateUtils.getCurrentTime();
}
}
|
[
"shariful.bony@gmail.com"
] |
shariful.bony@gmail.com
|
acf82523872581807c1ea42425af800945be0f68
|
b2917c90089432697b0666cab176ac186293e13b
|
/common/src/main/java/io/github/flemmli97/runecraftory/common/inventory/container/ContainerUpgrade.java
|
d8604d7ff6384855605a0b8e322abacf21d293c3
|
[] |
no_license
|
Flemmli97/RuneCraftory
|
42fa7fe440bf20173dea7c35ad90cda99eac28ba
|
9712d5fbe7e4fea6406f215e8f0678d89de715f5
|
refs/heads/1.18
| 2023-09-01T08:00:57.410057
| 2023-08-31T22:52:10
| 2023-08-31T22:52:10
| 118,181,636
| 5
| 0
| null | 2023-01-30T20:26:08
| 2018-01-19T21:42:22
|
Java
|
UTF-8
|
Java
| false
| false
| 5,903
|
java
|
package io.github.flemmli97.runecraftory.common.inventory.container;
import io.github.flemmli97.runecraftory.api.enums.EnumCrafting;
import io.github.flemmli97.runecraftory.common.blocks.tile.UpgradingCraftingBlockEntity;
import io.github.flemmli97.runecraftory.common.inventory.DummyInventory;
import io.github.flemmli97.runecraftory.common.inventory.PlayerContainerInv;
import io.github.flemmli97.runecraftory.common.registry.ModContainer;
import io.github.flemmli97.runecraftory.common.utils.CraftingUtils;
import io.github.flemmli97.runecraftory.common.utils.EntityUtils;
import io.github.flemmli97.runecraftory.platform.Platform;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.Container;
import net.minecraft.world.SimpleContainer;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.DataSlot;
import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity;
public class ContainerUpgrade extends AbstractContainerMenu {
private final PlayerContainerInv craftingInv;
private final EnumCrafting type;
private final DummyInventory outPutInv;
private final DataSlot rpCost;
public ContainerUpgrade(int windowId, Inventory inv, FriendlyByteBuf data) {
this(windowId, inv, getTile(inv.player.level, data));
}
public ContainerUpgrade(int windowId, Inventory playerInv, UpgradingCraftingBlockEntity tile) {
super(ModContainer.upgradeContainer.get(), windowId);
this.outPutInv = new DummyInventory(new SimpleContainer(1));
this.craftingInv = PlayerContainerInv.create(this, tile.getUpgradeInventory(), playerInv.player);
this.type = tile.craftingType();
this.addSlot(new UpgradeOutputSlot(this.outPutInv, this, this.craftingInv, 0, 116, 35));
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 9; ++j) {
this.addSlot(new Slot(playerInv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
}
for (int k = 0; k < 9; ++k) {
this.addSlot(new Slot(playerInv, k, 8 + k * 18, 142));
}
this.addSlot(new Slot(this.craftingInv, 0, 20, 35) {
@Override
public boolean mayPlace(ItemStack stack) {
return this.container.canPlaceItem(0, stack);
}
@Override
public int getMaxStackSize() {
return 1;
}
});
this.addSlot(new Slot(this.craftingInv, 1, 56, 35) {
@Override
public boolean mayPlace(ItemStack stack) {
return this.container.canPlaceItem(1, stack);
}
});
this.addDataSlot(this.rpCost = DataSlot.standalone());
this.updateOutput();
}
public static UpgradingCraftingBlockEntity getTile(Level world, FriendlyByteBuf buffer) {
BlockEntity blockEntity = world.getBlockEntity(buffer.readBlockPos());
if (blockEntity instanceof UpgradingCraftingBlockEntity) {
return (UpgradingCraftingBlockEntity) blockEntity;
}
throw new IllegalStateException("Expected tile entity of type TileCrafting but got " + blockEntity);
}
private void updateOutput() {
if (this.craftingInv.getPlayer().level.isClientSide)
return;
int cost = CraftingUtils.upgradeCost(this.craftingType(), Platform.INSTANCE.getPlayerData(this.craftingInv.getPlayer()).orElseThrow(EntityUtils::playerDataException), this.craftingInv.getItem(0), this.craftingInv.getItem(1));
if (cost >= 0) {
this.outPutInv.setItem(0, CraftingUtils.getUpgradedStack(this.craftingInv.getItem(0), this.craftingInv.getItem(1), this.craftingType()));
} else {
this.outPutInv.setItem(0, ItemStack.EMPTY);
}
this.rpCost.set(cost);
}
public EnumCrafting craftingType() {
return this.type;
}
public int rpCost() {
return this.rpCost.get();
}
@Override
public ItemStack quickMoveStack(Player player, int slotID) {
if (!player.isAlive())
return ItemStack.EMPTY;
ItemStack itemstack = ItemStack.EMPTY;
Slot slot = this.slots.get(slotID);
if (slot != null && slot.hasItem()) {
ItemStack itemstack1 = slot.getItem();
itemstack = itemstack1.copy();
if (slotID == 0) {
itemstack1.onCraftedBy(player.level, player, itemstack1.getCount());
if (!this.moveItemStackTo(itemstack1, 1, 37, false))
return ItemStack.EMPTY;
slot.onQuickCraft(itemstack1, itemstack);
} else if (slotID < 37) {
if (!this.moveItemStackTo(itemstack1, 37, this.slots.size(), false)) {
return ItemStack.EMPTY;
}
} else if (!this.moveItemStackTo(itemstack1, 1, 37, false)) {
return ItemStack.EMPTY;
}
if (itemstack1.isEmpty()) {
slot.set(ItemStack.EMPTY);
} else {
slot.setChanged();
}
if (itemstack1.getCount() == itemstack.getCount()) {
return ItemStack.EMPTY;
}
slot.onTake(player, itemstack1);
if (slotID == 0) {
player.drop(itemstack1, false);
}
}
return itemstack;
}
@Override
public void slotsChanged(Container inv) {
if (inv == this.craftingInv) {
this.updateOutput();
}
super.slotsChanged(inv);
}
@Override
public boolean stillValid(Player player) {
return true;
}
}
|
[
"Flemmli97@users.noreply.github.com"
] |
Flemmli97@users.noreply.github.com
|
d8f682940b7a106be5aac0a2634283a228c8a9aa
|
25587613b4eb203ac093b4b93aefd6c738b2a3d5
|
/LayoutShared/src/main/java/com/bluebrim/layout/impl/shared/layoutmanager/CoDistVerticalIF.java
|
8fa44bbe6c99e790a38220c8c4f94c5b3d91c4e0
|
[
"Apache-2.0"
] |
permissive
|
goranstack/bluebrim
|
80b4f5d2aba0a5cadbda310d673b97ce64d84e6e
|
eb6edbeada72ed7fd1294391396432cb25575fe0
|
refs/heads/master
| 2021-05-02T07:39:42.782432
| 2018-06-19T14:30:14
| 2018-06-19T14:30:14
| 35,280,662
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 343
|
java
|
package com.bluebrim.layout.impl.shared.layoutmanager;
/**
* Insert the type's description here.
* Creation date: (2000-09-06 11:48:18)
* @author:
*/
public interface CoDistVerticalIF extends com.bluebrim.layout.impl.shared.layoutmanager.CoCalculateDistanceIF {
public final static String VERTICAL_DIST_CALC = "VERTICAL_DIST_CALC";
}
|
[
"goran.stack@atg.se"
] |
goran.stack@atg.se
|
c8796a411a62c2181d1a3e6415ab75c6432d518f
|
decae11812669c88f152cd82f01d5d3e556efee3
|
/src/PF04_IndividualProject/IP_04_CSVFile_SplitControllerVersion/Model/Task.java
|
42e3299b49ac8aa35083e8ab138fede66ac80e5d
|
[] |
no_license
|
ac189223/SDA_01_ProgrammingFoundations
|
276b6264f4266a4cacfb97afbf74d433046ae292
|
52d4c85328c444fd80129a54ef3c73a54218b049
|
refs/heads/master
| 2020-07-18T19:48:55.928532
| 2019-12-16T18:51:20
| 2019-12-16T18:51:20
| 206,302,710
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,550
|
java
|
package PF04_IndividualProject.IP_04_CSVFile_SplitControllerVersion.Model;
public class Task {
private String id;
private String title;
private String dueDate;
private boolean done;
private String assignedToProject;
public Task(String title, String dueDate) {
this.setTitle(title);
this.setDueDate(dueDate);
this.setDone(false);
this.setAssignedToProject("");
}
public Task(String id, String title, String dueDate, boolean done) {
this.setId(id);
this.setTitle(title);
this.setDueDate(dueDate);
this.setDone(done);
this.setAssignedToProject("");
}
public Task(String id, String title, String dueDate, boolean done, String assignedToProject) {
this.setId(id);
this.setTitle(title);
this.setDueDate(dueDate);
this.setDone(done);
this.setAssignedToProject(assignedToProject);
}
public String getId() { return id; }
public String getTitle() { return title; }
public String getDueDate() { return dueDate; }
public boolean ifDone() { return done; }
public String getAssignedToProject() { return assignedToProject; }
public void setId(String id) { this.id = id; }
public void setTitle(String title) { this.title = title; }
public void setDueDate(String dueDate) { this.dueDate = dueDate; }
public void setDone(boolean done) { this.done = done; }
public void setAssignedToProject(String assignedToProject) { this.assignedToProject = assignedToProject; }
}
|
[
"ac189223@o2.pl"
] |
ac189223@o2.pl
|
6b902d387bd42a8130048671f68cfc092cf89bc0
|
9966310a034d716656cd7eb78ac5e95b6da72584
|
/DataStructure/src/main/java/aa/PascalTriangleII.java
|
fa7c2c1f8198fc43be33e34ab33862bb3b6413ed
|
[] |
no_license
|
shipengx/ParentModule
|
03d63ecd7e95b9d17f8bcdd30ef77d611f8fb060
|
bb1a90903026074fa2c92099903fe8993135b4a7
|
refs/heads/master
| 2022-12-22T13:58:08.154949
| 2020-02-23T00:35:55
| 2020-02-23T00:35:55
| 73,237,424
| 0
| 0
| null | 2022-12-15T23:30:34
| 2016-11-08T23:52:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,429
|
java
|
package aa;
import java.util.ArrayList;
import java.util.List;
/*
* Pascal's Triangle II
* Given an index k, return the kth row of the Pascal's triangle.
*
* For example, given k = 3,
* return [1,3,3,1].
*
* Note:
* Could you optimize your algorithm to use only O(k) extra space ?
*
* 1000 k = 0
* 1100 k = 1
* 1110
* 1210 k = 2
* 1211
* 1231
* 1331 k = 3
*
*
*/
public class PascalTriangleII {
public List<Integer> getRow(int rowIndex) {
List<Integer> result = new ArrayList<Integer>();
if (rowIndex < 0) {
return result;
}
result.add(1);
for (int i = 1; i <= rowIndex; i++) {
for (int j = result.size() - 2; j >= 0; j--) {
result.set(j + 1, result.get(j) + result.get(j + 1));
}
result.add(1);
}
return result;
}
/* i <===> row
* j <===> column
*
* idea is to get current level from previous level.
* calculate each position from right to left, to get the current level.
*
*/
public List<Integer> getRowI(int rowIndex) {
ArrayList<Integer> result = new ArrayList<Integer>(rowIndex + 1);
for (int i = 0; i <= rowIndex; i++) {
result.add(0);
}
result.set(0, 1);
for (int i = 1; i <= rowIndex; i++) {
result.set(i, 1);
for (int j = i - 1; j > 0; j--) {
result.set(j, result.get(j) + result.get(j - 1));
//set current j column with what we have from previous level j column and j-1 column
}
}
return result;
}
}
|
[
"sxu@Shipeng-Xu.local"
] |
sxu@Shipeng-Xu.local
|
e7cf5040f838c8211397cce9004da46b0555e8c8
|
9552eeea8217e26ac5d2cdf8c197dbec231014fc
|
/src/main/java/com/selectica/Package201506161/definitions/CProcBO/actions/SetDraftStatusActionScript.java
|
a4ae0ed9fb8585c284a09daadd1d4cbe7657d206
|
[] |
no_license
|
epavlovskaya/rcfLenaBaseDemo
|
05db6503c494b71edb4d748a00ef866fd7768ac2
|
3675d57a0fd6c2936e62b64606ad3c0f374e327d
|
refs/heads/master
| 2021-01-25T10:00:38.924510
| 2015-06-16T09:52:21
| 2015-06-16T09:52:21
| 37,266,126
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 324
|
java
|
package com.selectica.Package201506161.definitions.CProcBO.actions;
import com.selectica.Package201506161.eclm.definitions.CProcBO.actions.SetStatusDraftActionAction;
import com.selectica.rcfscripts.AbstractBOWriteScript;
/**#SetDraftStatus*/
public class SetDraftStatusActionScript extends SetStatusDraftActionAction {
}
|
[
"user@rcfproj.aws.selectica.net"
] |
user@rcfproj.aws.selectica.net
|
751a3c7ae4735934d92b496dab8624ef3bd276f1
|
3ce7da2513283c08a27be8daabe5d809c8759e81
|
/src/main/java/com/uifuture/maven/plugins/util/HashUtil.java
|
71ed8c576adc4f145c7b9934f4b1f6c57863af5e
|
[
"Apache-2.0"
] |
permissive
|
Kirsky0/maven-auto-generate-test-plugin
|
75dd69d66020c9c7286ae3037b4f351f8e3f2c49
|
4278ed6bc879d766cd0db1c5e53b0700ddd99dd4
|
refs/heads/master
| 2022-01-16T04:51:19.924100
| 2019-06-21T02:41:14
| 2019-06-21T02:41:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,471
|
java
|
/*
* souche.com
* Copyright (C) 2013-2019 All Rights Reserved.
*/
package com.uifuture.maven.plugins.util;
import java.io.IOException;
import java.io.InputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author chenhx
* @version HashUtil.java, v 0.1 2019-06-10 20:38 chenhx
*/
public class HashUtil {
private static Logger logger =
LoggerFactory.getLogger(HashUtil.class);
private static char hexDigits[] = { '0', '1', '2', '3', '4',
'5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F' };
private static char charDigits[] = {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E',
'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e',
'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z'};
public static String convertToHashStr(long hid, int len) {
StringBuffer sb = new StringBuffer();
for(int i=0; i<len; i++) {
char c = charDigits[(int) ((hid&0xff) % charDigits.length)];
sb.append(c);
hid = hid >> 6;
}
return sb.toString();
}
}
|
[
"uifuture@uifuture.com"
] |
uifuture@uifuture.com
|
63b1adc16b9bda17e4e8a860275968d7e285261a
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/JetBrains--intellij-community/e4edbe9521e640bd3ce720b6dff19a39343a215a/before/HgPushAction.java
|
8acfe3587c498d5b7c90fb203429bd5d1992af3e
|
[] |
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
| 1,105
|
java
|
// Copyright 2008-2010 Victor Iacoban
//
// 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.zmlx.hg4idea.action;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.Nullable;
import org.zmlx.hg4idea.HgPusher;
public class HgPushAction extends HgAction {
public HgPushAction() {
super(AllIcons.Actions.Commit);
}
@Override
public void execute(final Project project, @Nullable final VirtualFile selectedRepo) {
new HgPusher(project).showDialogAndPush(selectedRepo);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
ce13c7df717c7b8e5e33184d760423188ceb2b6c
|
d9f2a66760ae2c9cad3895f995f58cd407f5d1e6
|
/src/main/java/com/github/abigail830/statemachinedemo/StateMachineDemoApplication.java
|
ae0f5851afc9067fa48c1df899c7ac233ee779b8
|
[] |
no_license
|
abigail830/state-machine-demo
|
295c498097b88fb48b419a451582c82f948ebe68
|
a343f3d8bccdc64e95081159c20e3eec8d5d206e
|
refs/heads/master
| 2020-05-20T21:25:23.769690
| 2019-05-09T16:03:54
| 2019-05-09T16:03:54
| 185,761,809
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 351
|
java
|
package com.github.abigail830.statemachinedemo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class StateMachineDemoApplication {
public static void main(String[] args) {
SpringApplication.run(StateMachineDemoApplication.class, args);
}
}
|
[
"abigail830@163.com"
] |
abigail830@163.com
|
31a791050b4960bc1be935abfc4bf72624badc53
|
e2c71b9a8ba3789657738219cab11d47e786a354
|
/de.fhdo.lemma.data.datadsl/src-gen/de/fhdo/lemma/data/DataDslStandaloneSetupGenerated.java
|
0a9dc2f89dc236d9715101027eda3bb3e71d42dc
|
[
"MIT"
] |
permissive
|
frademacher/dissertation-lemma-code
|
9fe8ffdb280b75729ea7d323d664052ff1efd808
|
e5337c251686fae73d6c47575ebc0db044b7cafb
|
refs/heads/main
| 2022-07-31T08:33:21.100843
| 2022-07-31T08:28:10
| 2022-07-31T08:28:10
| 519,718,571
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,196
|
java
|
/*
* generated by Xtext 2.25.0
*/
package de.fhdo.lemma.data;
import com.google.inject.Guice;
import com.google.inject.Injector;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.xtext.ISetup;
import org.eclipse.xtext.common.TerminalsStandaloneSetup;
import org.eclipse.xtext.resource.IResourceFactory;
import org.eclipse.xtext.resource.IResourceServiceProvider;
@SuppressWarnings("all")
public class DataDslStandaloneSetupGenerated implements ISetup {
@Override
public Injector createInjectorAndDoEMFRegistration() {
TerminalsStandaloneSetup.doSetup();
Injector injector = createInjector();
register(injector);
return injector;
}
public Injector createInjector() {
return Guice.createInjector(new DataDslRuntimeModule());
}
public void register(Injector injector) {
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("data", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("data", serviceProvider);
}
}
|
[
"florian.rademacher@fh-dortmund.de"
] |
florian.rademacher@fh-dortmund.de
|
09beca30c5d2a0d2f7133319ebe57d935eda28ee
|
4c8fbf0a8cad2c9390bb31308524a5fd27919068
|
/SpringLearn/src/main/java/com/spring/chapter7/SpitterService.java
|
53ce93a1fcb9c9dd7cf5a52011dba38ad85d2e59
|
[] |
no_license
|
hyperaeon/SpringLearn
|
cbd64d5e0b38fcbeb3b1a4d3d394e5d4541ed2ff
|
2957b94461db34d6dfc96412f3c049c93f2cabfb
|
refs/heads/master
| 2016-08-05T09:39:18.777959
| 2015-05-11T11:50:20
| 2015-05-11T11:50:20
| 35,420,566
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 370
|
java
|
package com.spring.chapter7;
import com.spring.chapter5.Spitter;
public class SpitterService {
public Object getRecentSpittles(int defaultPage) {
return new Object();
}
public Spitter getSpitter(String userName) {
return null;
}
public Object getSpittlesForSpitter(String userName) {
return null;
}
public void saveSpitter(Spitter spitter) {
}
}
|
[
"flyloeswing@163.com"
] |
flyloeswing@163.com
|
8bd8f9ec80183a3ec42b0d0638e449b5b422170a
|
b7f3edb5b7c62174bed808079c3b21fb9ea51d52
|
/components/page_info/android/java/src/org/chromium/components/page_info/CertificateChainHelper.java
|
56b978c1ba098d61ce2e6250478f9971be18c511
|
[
"BSD-3-Clause"
] |
permissive
|
otcshare/chromium-src
|
26a7372773b53b236784c51677c566dc0ad839e4
|
64bee65c921db7e78e25d08f1e98da2668b57be5
|
refs/heads/webml
| 2023-03-21T03:20:15.377034
| 2020-11-16T01:40:14
| 2020-11-16T01:40:14
| 209,262,645
| 18
| 21
|
BSD-3-Clause
| 2023-03-23T06:20:07
| 2019-09-18T08:52:07
| null |
UTF-8
|
Java
| false
| false
| 712
|
java
|
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.components.page_info;
import org.chromium.base.annotations.NativeMethods;
import org.chromium.content_public.browser.WebContents;
/**
* Helper class for obtaining site certificate chain from WebContents.
*/
public class CertificateChainHelper {
public static byte[][] getCertificateChain(WebContents webContents) {
return CertificateChainHelperJni.get().getCertificateChain(webContents);
}
@NativeMethods
interface Natives {
byte[][] getCertificateChain(WebContents webContents);
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
dd3af9802f3760e11f25069073f781384304fd93
|
7c1430c53b4d66ad0e96dd9fc7465a5826fdfb77
|
/uims-support/src/cn/edu/sdu/uims/progress/ProgressBarAndInfoPanel.java
|
39843645f7ac6c3631e42d34e2815824b086e1ad
|
[] |
no_license
|
wang3624270/online-learning-server
|
ef97fb676485f2bfdd4b479235b05a95ad62f841
|
2d81920fef594a2d0ac482efd76669c8d95561f1
|
refs/heads/master
| 2020-03-20T04:33:38.305236
| 2019-05-22T06:31:05
| 2019-05-22T06:31:05
| 137,187,026
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 912
|
java
|
package cn.edu.sdu.uims.progress;
import java.awt.BorderLayout;
import java.awt.Insets;
import javax.swing.BorderFactory;
import javax.swing.JTextArea;
import cn.edu.sdu.uims.base.UScrollPane;
public class ProgressBarAndInfoPanel extends ProgressPanel{
private JTextArea taskOutput;
public ProgressBarAndInfoPanel() {
super();
init();
}
public void init(){
super.init();
taskOutput = new JTextArea(40, 70);
taskOutput.setMargin(new Insets(5, 5, 5, 5));
taskOutput.setEditable(false);
add(new UScrollPane(taskOutput), BorderLayout.CENTER);
setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
}
public void addOutInfo(String str,String spn){
taskOutput.append(str + spn);
}
public void addOutInfo(String str){
taskOutput.append(str+"\n");
}
public void setOutInfo(String str){
taskOutput.setText(str);
}
public void clearText(){
taskOutput.setText("");
}
}
|
[
"3624270@qq.com"
] |
3624270@qq.com
|
eb9a34f98c1ecb04cb92d0cae5265bd281afb72f
|
ce7f089378d817e242793649785b097c9be3f96b
|
/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set17/uruk_hai/Card17_127.java
|
a78628a55ae2a5966f824f4662d419b419653d1a
|
[] |
no_license
|
TheSkyGold/gemp-lotr
|
aaba1f461a3d9237d12ca340a7e899b00e4151e4
|
aab299c87fc9cabd10b284c25b699f10a84fe622
|
refs/heads/master
| 2021-01-11T07:39:27.678795
| 2014-11-21T00:44:25
| 2014-11-21T00:44:25
| 32,382,766
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,768
|
java
|
package com.gempukku.lotro.cards.set17.uruk_hai;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.TakeControlOfASiteEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Rise of Saruman
* Side: Shadow
* Culture: Uruk-hai
* Twilight Cost: 4
* Type: Minion • Uruk-Hai
* Strength: 9
* Vitality: 2
* Site: 5
* Game Text: Damage +1. Each time this minion wins a skirmish, if you do not control a site, you may take control of
* a site.
*/
public class Card17_127 extends AbstractMinion {
public Card17_127() {
super(4, 9, 2, 5, Race.URUK_HAI, Culture.URUK_HAI, "White Hand Intruder");
addKeyword(Keyword.DAMAGE, 1);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, self)
&& !PlayConditions.canSpot(game, Filters.siteControlled(playerId))) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new TakeControlOfASiteEffect(self, playerId));
return Collections.singletonList(action);
}
return null;
}
}
|
[
"marcins78@gmail.com@eb7970ca-0f6f-de4b-2938-835b230b9d1f"
] |
marcins78@gmail.com@eb7970ca-0f6f-de4b-2938-835b230b9d1f
|
4f5d598bc8d33a4a2dbb7d069b9679f9795e2670
|
5954cc34c9e7ad740f322e351bce4663787aaf13
|
/src/main/java/com/baijob/commonTools/db/ds/C3p0Ds.java
|
c63a9edb4ac9f82645e88f9e606b030a6f4358ec
|
[] |
no_license
|
yintaoxue/common-tools
|
ea1ca5de727c1bc734feb969ee71c9f91c191265
|
c59f641b3f0593066cbda51031e98de54b8df8ec
|
refs/heads/master
| 2020-12-24T09:01:16.420330
| 2013-03-03T08:20:37
| 2013-03-03T08:20:37
| 8,559,282
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,006
|
java
|
package com.baijob.commonTools.db.ds;
import java.beans.PropertyVetoException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.baijob.commonTools.LangUtil;
import com.baijob.commonTools.Setting;
import com.baijob.commonTools.Exceptions.ConnException;
import com.baijob.commonTools.Exceptions.SettingException;
import com.baijob.commonTools.db.DbUtil;
import com.baijob.commonTools.db.DsSetting;
import com.baijob.commonTools.net.SSHUtil;
import com.baijob.commonTools.net.SocketUtil;
import com.mchange.v2.c3p0.ComboPooledDataSource;
/**
* 封装Druid数据源
*
* @author Luxiaolei
*
*/
public class C3p0Ds {
private static Logger logger = LoggerFactory.getLogger(C3p0Ds.class);
/*--------------------------私有变量 start-------------------------------*/
/** JDBC配置对象 */
private static Setting dbSetting;
/** 数据源池 */
private static Map<String, ComboPooledDataSource> dsMap;
/*--------------------------私有变量 end-------------------------------*/
static {
try {
init(null);
} catch (Exception e) {
logger.debug("No default DB config file {} found, custom to init it.", DsSetting.DEFAULT_DB_CONFIG_PATH);
}
}
/**
* 初始化数据库连接配置文件
*
* @param db_setting 数据库配置文件
*/
synchronized public static void init(Setting db_setting) {
dsMap = new HashMap<String, ComboPooledDataSource>();
// 初始化数据库连接配置文件
dbSetting = db_setting;
if (dbSetting == null) {
dbSetting = new Setting(DsSetting.DEFAULT_DB_CONFIG_PATH, Setting.DEFAULT_CHARSET, true);
}
}
/**
* 获得一个数据源
*
* @param dsName 数据源名称,若null使用配置文件中的默认连接,此名称在配置文件中定义
* @param sshName 跳板机名称
* @throws ConnException
*/
synchronized public static DataSource getDataSource(String dsName, String sshName) throws ConnException {
if(dbSetting == null) {
throw new ConnException("No setting found, please init it!");
}
DsSetting dsSetting = null;
try {
dsSetting = new DsSetting(dsName, sshName, dbSetting);
} catch (SettingException e) {
throw new ConnException("数据源设定初始化失败!", e);
}
// 如果已经存在已有数据源(连接池)直接返回
ComboPooledDataSource existedDataSource = dsMap.get(dsSetting.getName());
if (existedDataSource != null) {
return existedDataSource;
}
// 基本连接信息
String remoteHost = dsSetting.getString(DsSetting.KEY_DS_HOST);
int port = dsSetting.getInt(DsSetting.KEY_DS_PORT);
String dbName = dsSetting.getString(DsSetting.KEY_DS_DB);
// 验证连接信息的有效性
if (LangUtil.isEmpty(remoteHost) || !SocketUtil.isValidPort(port) || LangUtil.isEmpty(dbName)) {
throw new ConnException("Invalid connection info=>host:" + remoteHost + ", port:" + port + ", database:" + dbName + "】");
}
ComboPooledDataSource cpds = new ComboPooledDataSource();
// 基本连接信息
try {
cpds.setDriverClass(dsSetting.getJdbcDriver());
} catch (PropertyVetoException e) {
throw new ConnException("Set JDBC Driver fail!", e);
}
cpds.setUser(dsSetting.getDsUser());
cpds.setPassword(dsSetting.getDsPass());
if (dsSetting.isEnableSSH()) {
port = SSHUtil.openAndBindPortToLocal(dsSetting.getSSHConnector(), remoteHost, port);
remoteHost = SocketUtil.LOCAL_IP;
}
String jdbcUrl = DbUtil.buildJdbcUrl(dsSetting.getProtocol(), remoteHost, port, dbName, dsSetting.getJdbcUrlParam());
cpds.setJdbcUrl(jdbcUrl);
logger.info("【{}】{}@{}", dsSetting.getName(), cpds.getUser(), jdbcUrl);
// 添加到数据源池中,以备下次使用
dsMap.put(dsSetting.getName(), cpds);
return cpds;
}
/**
* 获得默认数据源(连接池),链接信息来自于配置文件
*
* @return
* @throws ConnException
*/
synchronized public static DataSource getDataSource() throws ConnException {
return getDataSource(null, null);
}
/**
* 获得一个数据库连接池中的连接
*
* @param conn 链接名称,此名称在配置文件中定义
* @param isInSSH 连接是否在已经建立的SSH之上连接
* @return 连接对象
* @throws SQLException
* @throws ConnException
*/
synchronized public static Connection getConnection(String datasource, String sshName) throws SQLException, ConnException {
return getDataSource(datasource, sshName).getConnection();
}
/**
* 获得一个默认连接池中的连接(此默认连接取决于配置文件)
*
* @return 连接对象
* @throws SQLException
* @throws ConnException
*/
synchronized public static Connection getConnection() throws SQLException, ConnException {
return getConnection(null, null);
}
/**
* 关闭数据源
*
* @param dsName 数据源名称
* @param sshName SSH名称
*/
synchronized public static void closeDs(String dsName, String sshName) {
DsSetting dsSetting = null;
try {
dsSetting = new DsSetting(dsName, sshName, dbSetting);
} catch (SettingException e) {
logger.error("Error to init DsSetting.", e);
return;
}
String name = dsSetting.getName();
ComboPooledDataSource ds = dsMap.get(name);
if (ds != null) {
ds.close();
dsMap.remove(name);
}
}
/**
* 关闭默认数据源
*/
synchronized public static void closeDs() {
closeDs(null, null);
}
/**
* 关闭所有连接池
*/
synchronized public static void closeAll() {
Collection<ComboPooledDataSource> values = dsMap.values();
for (ComboPooledDataSource ds : values) {
if (ds != null) {
ds.close();
}
}
dsMap.clear();
SSHUtil.closeAll();
}
}
|
[
"loolly@gmail.com"
] |
loolly@gmail.com
|
20f1083c30ddf049500dd87dd0c7671266272c1a
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/31/31_fe9535658044f3c29b5eee4cb0faf21554f89212/DHCPPacket/31_fe9535658044f3c29b5eee4cb0faf21554f89212_DHCPPacket_s.java
|
7e60b66ea8b020b2b04e61d06ff40a6a2a9f1fa1
|
[] |
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,268
|
java
|
package mnet;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.Random;
import java.util.Vector;
public class DHCPPacket {
private byte op ,
htype ,
hlen ,
hops ;
private byte[] xid , //4 bytes
secs , //2 bytes
flags , //2 bytes (15 bits reserved for later!)
ciaddr, //Client's IP Address (4 bytes)
yiaddr, //your (client's) ip address (4 bytes)
siaddr, //4 bytes
giaddr, //4 bytes
chaddr, //client's hardware address (16 bytes)
sname , //64 bytes
file ; //128 bytes
private int padding = 0;
private Vector<Option> options; //variable number of options
public DHCPPacket(){
options = new Vector<Option>();
}
public DHCPPacket setOp (byte op){
if(op != Constants.BOOTREQUEST && op != Constants.BOOTREPLY)
throw new IllegalArgumentException();
this.op = op;
return this;
}
public DHCPPacket setHtype (byte i) { this.htype = i ; return this; }
public DHCPPacket setHlen (byte hlen) { this.hlen = hlen ; return this; }
public DHCPPacket setHops (byte hops) { this.hops = hops ; return this; }
public DHCPPacket setXid (byte[] xid) { this.xid = xid ; return this; }
public DHCPPacket setXid (int xid) { this.xid = ByteFactory.getIntAsBytes(xid) ; return this; }
public DHCPPacket generateXid(){
this.xid = ByteFactory.getIntAsBytes(new Random().nextInt());
return this;
}
public DHCPPacket setSecs (byte[] secs){ this.secs = secs ; return this; }
public DHCPPacket setSecs (int secs) { this.secs = ByteFactory.getIntAsBytes(secs, 2); return this; }
public DHCPPacket setFlags (byte[] flags){
if(flags[1] != 0 || (flags[0] != 0 && flags[0] != 128))
throw new IllegalArgumentException();
this.flags = flags;
return this;
}
public DHCPPacket setBroadcastFlag(boolean bflag){
flags = new byte[2];
if(bflag)
flags[0] = (byte)128;
else
flags[0] = 0;
flags[1] = 0;
return this;
}
public DHCPPacket setCiaddr (byte[] ciaddr){ this.ciaddr = ciaddr; return this; }
public DHCPPacket setCiaddr (int zero){ if(zero == 0) this.ciaddr = new byte[4]; return this;}
public DHCPPacket setYiaddr (byte[] yiaddr){ this.yiaddr = yiaddr; return this; }
public DHCPPacket setYiaddr (int zero){ if(zero == 0) this.yiaddr = new byte[4]; return this;}
public DHCPPacket setSiaddr (byte[] siaddr){ this.siaddr = siaddr; return this; }
public DHCPPacket setSiaddr (int zero){ if(zero == 0) this.siaddr = new byte[4]; return this;}
public DHCPPacket setGiaddr (byte[] giaddr){ this.giaddr = giaddr; return this; }
public DHCPPacket setGiaddr (int zero){ if(zero == 0) this.giaddr = new byte[4]; return this;}
public DHCPPacket setChaddr (byte[] chaddr){ this.chaddr = chaddr; return this; }
public DHCPPacket setChaddr (int zero){ if(zero == 0) this.chaddr = new byte[4]; return this;}
public DHCPPacket setSname (byte[] sname) { this.sname = sname ; return this; }
public DHCPPacket setSname (int zero){ if(zero == 0) this.sname = new byte[64]; return this;}
public DHCPPacket setFile (byte[] file) { this.file = file ; return this; }
public DHCPPacket setFile (int zero){ if(zero == 0) this.file = new byte[128]; return this;}
public DHCPPacket addOption(byte code, byte len, byte[] data){
if(data.length != len) throw new IllegalArgumentException();
options.add(new Option(code, len, data)); return this;
}
public byte[] getOption(byte code){
for(Option option : options){
if(option.code == code)
return option.data;
}
return null;
}
public byte getOp (){ return op ; }
public byte getHtype (){ return htype ; }
public byte getHlen (){ return hlen ; }
public byte getHops (){ return hops ; }
public byte[] getXid (){ return xid ; }
public byte[] getSecs (){ return secs ; }
public byte[] getCiaddr(){ return ciaddr; }
public byte[] getYiaddr(){ return yiaddr; }
public byte[] getSiaddr(){ return siaddr; }
public byte[] getGiaddr(){ return giaddr; }
public byte[] getChaddr(){ return chaddr; }
public byte[] getSname (){ return sname ; }
public byte[] getFile (){ return file ; }
public byte[] getFlags (){ return flags ; }
public boolean getBroadcastFlag(){ if(flags[0] == 0) return false; else return true; }
public void read (byte[] array){
ByteArrayInputStream in = new ByteArrayInputStream(array);
try {
read(in);
} catch (IOException e) { e.printStackTrace(); }
}
public void read (InputStream in) throws IOException{
byte[] temp = new byte[1];
in.read(temp); op = temp[0];
in.read(temp); htype = temp[0];
in.read(temp); hlen = temp[0];
in.read(temp); hops = temp[0];
xid = new byte[4]; in.read(xid );
secs = new byte[2]; in.read(secs );
flags = new byte[2]; in.read(flags );
ciaddr = new byte[4]; in.read(ciaddr);
yiaddr = new byte[4]; in.read(yiaddr);
siaddr = new byte[4]; in.read(siaddr);
giaddr = new byte[4]; in.read(giaddr);
chaddr = new byte[16]; in.read(chaddr);
sname = new byte[64]; in.read(sname );
file = new byte[128];in.read(file );
byte[] magiccookie = new byte[4];
in.read(magiccookie);
if(!Arrays.equals(magiccookie, Constants.magicCookie))
throw new Error("Bad Input Data. (Packet Data Corrupted)");
while(in.available() > 0){
in.read(temp);
byte code = temp[0];
if(code == -1)
break;
in.read(temp);
byte len = temp[0];
byte[] data = new byte[len];
in.read(data);
options.add(new Option(code, len, data));
}
padding = 0;
while(in.available() > 0){
in.read(temp);
if(temp[0] != 0)
throw new IOException("Wrong padding at end of options.");
padding++;
}
}
public byte[] array(){
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] array = null;
try {
write(out);
array = out.toByteArray();
} catch (IOException e) { e.printStackTrace(); }
return array;
}
public void write(OutputStream out) throws IOException{
out.write(new byte[]{op});
out.write(new byte[]{htype});
out.write(new byte[]{hlen});
out.write(new byte[]{hops});
out.write(xid);
out.write(secs);
out.write(flags);
out.write(ciaddr);
out.write(yiaddr);
out.write(siaddr);
out.write(giaddr);
out.write(chaddr);
out.write(sname);
out.write(file);
int len = 0;
out.write(Constants.magicCookie);
len += 4;
for(Option option : options){
out.write(new byte[]{option.code});
out.write(new byte[]{option.len});
out.write(option.data);
len += option.len + 2;
}
out.write(new byte[]{(byte)255});
len += 1;
while(len % 64 != 0){
out.write(new byte[]{0});
len += 1;
}
}
private class Option{
byte code;
byte len;
byte[] data;
Option(byte code, byte len, byte[] data){
this.code = code;
this.len = len;
this.data = data;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d24cc9be9f7a6f287ac7e1068a06dd5e93fd2164
|
c2e285ad38769cf498769e94687200644811e67e
|
/src/main/java/org/jurassicraft/server/tab/JurassiCraftFoodTab.java
|
feb01d9217964562fe73eb14950ae44211eaa734
|
[
"LicenseRef-scancode-public-domain"
] |
permissive
|
epicslayer999/JurassiCraft2
|
214b1ecf666537f9cd0d04c0814952a98df465f4
|
99dd05b48326d013a4c03ccbb74b9b22a5b1f38f
|
refs/heads/master
| 2021-07-09T05:59:07.424918
| 2017-10-09T08:50:34
| 2017-10-09T08:50:34
| 106,317,640
| 1
| 0
| null | 2017-10-09T18:03:07
| 2017-10-09T18:03:07
| null |
UTF-8
|
Java
| false
| false
| 1,315
|
java
|
package org.jurassicraft.server.tab;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.jurassicraft.JurassiCraft;
import org.jurassicraft.server.dinosaur.Dinosaur;
import org.jurassicraft.server.entity.EntityHandler;
import org.jurassicraft.server.item.ItemHandler;
import java.util.List;
public class JurassiCraftFoodTab extends CreativeTabs {
private int[] metas;
public JurassiCraftFoodTab(String label) {
super(label);
List<Dinosaur> registeredDinosaurs = EntityHandler.getRegisteredDinosaurs();
this.metas = new int[registeredDinosaurs.size()];
int i = 0;
for (Dinosaur dino : registeredDinosaurs) {
if (dino.shouldRegister()) {
this.metas[i] = EntityHandler.getDinosaurId(dino);
i++;
}
}
}
@Override
@SideOnly(Side.CLIENT)
public ItemStack getIconItemStack() {
return new ItemStack(this.getTabIconItem(), 1, this.metas[((int) ((JurassiCraft.timerTicks / 20) % this.metas.length))]);
}
@Override
public Item getTabIconItem() {
return ItemHandler.DINOSAUR_MEAT;
}
}
|
[
"gegy1000@gmail.com"
] |
gegy1000@gmail.com
|
7821fd52eb79560652758b5a72e8e3aab85ab334
|
973cf2c7c2bbe9cfd4e257c9a45af2ea9a1d6ffa
|
/app/src/main/java/com/tck/daggertrain/MainActivity.java
|
c8743c0cf18624f12ead8703da89e6d9951f1831
|
[] |
no_license
|
tck8888/DaggerTrain
|
bd613640654edf45cf3957ba4638906c9f3d9776
|
aa29f8f25ab9852f07fb97c553e40558059f368c
|
refs/heads/master
| 2021-02-28T03:13:59.902629
| 2020-03-08T11:55:56
| 2020-03-08T11:55:56
| 245,657,764
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 648
|
java
|
package com.tck.daggertrain;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.tck.daggertrain.di.DaggerMyComponent;
import com.tck.daggertrain.di.DataBaseObject;
import com.tck.daggertrain.di.HttpObject;
import javax.inject.Inject;
public class MainActivity extends AppCompatActivity {
@Inject
HttpObject httpObject;
@Inject
DataBaseObject dataBaseObject;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
DaggerMyComponent.create().injectMainActivity(this);
}
}
|
[
"l"
] |
l
|
aea77157bc30cae7faa2ccd19ec701697aebb682
|
428d5e19ff14be07de303fdf452cc5ff0ad195ba
|
/src/main/java/vn/com/websockettest/config/Constants.java
|
3c66b79dae81eeb3261b87877e9e206d6d4dcfdd
|
[] |
no_license
|
minhnna/web-socket-test
|
6641626b7be0196da6ba64824c2aa9cb04c44599
|
9829a6fb0ebeb6f8f0e6c9c8a14f13c7fcc6dd09
|
refs/heads/master
| 2020-03-28T17:12:04.978381
| 2018-09-14T09:27:51
| 2018-09-14T09:27:51
| 148,766,747
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 425
|
java
|
package vn.com.websockettest.config;
/**
* Application constants.
*/
public final class Constants {
// Regex for acceptable logins
public static final String LOGIN_REGEX = "^[_.@A-Za-z0-9-]*$";
public static final String SYSTEM_ACCOUNT = "system";
public static final String ANONYMOUS_USER = "anonymoususer";
public static final String DEFAULT_LANGUAGE = "en";
private Constants() {
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
54066354eb2b6a2ad74d1b33fdf61c1519c4919b
|
2cbde65fa8f85232bc953dccdb7c4c1beb892c19
|
/src/util/adibrata/framework/configuration/EmailConfig.java
|
57dfd178856edc57c7f925219b8e8e961af6c188
|
[] |
no_license
|
AdibrataCompany/Smile
|
c02f1489222e27f570eed64d901abb10139b14d6
|
09238a30b9fd0fccc19882ddba02401ff47738d6
|
refs/heads/master
| 2021-01-10T18:23:47.256061
| 2015-09-27T03:57:57
| 2015-11-01T04:08:53
| 39,287,257
| 1
| 1
| null | 2015-07-24T07:37:05
| 2015-07-18T05:00:35
|
HTML
|
UTF-8
|
Java
| false
| false
| 2,458
|
java
|
/**
*
*/
package util.adibrata.framework.configuration;
import java.io.File;
import java.util.Properties;
import util.adibrata.framework.cachehelper.Caching;
import util.adibrata.framework.exceptionhelper.ExceptionEntities;
import util.adibrata.framework.exceptionhelper.ExceptionHelper;
/**
* @author Henry
*
*/
public class EmailConfig {
private Properties symbolmap;
public EmailConfig() throws Exception {
this.symbolmap = new Properties();
File file;
final Caching<String, Properties> cache = new Caching<String, Properties>();
try {
/*
* file = new File("Config/email.config"); symbolmap.loadFromXML(
* file.toURI().toURL().openStream() );
*/
// Populate the symbol map from the XML file
if (cache.get("EmailConfig") == null) {
file = new File("Config/email.config");
this.symbolmap.loadFromXML(file.toURI().toURL().openStream());
cache.put("EmailConfig", this.symbolmap);
} else {
this.symbolmap = cache.get("EmailConfig");
}
} catch (final Exception lExcp) {
final ExceptionEntities lEntExp = new ExceptionEntities();
lEntExp.setJavaClass(Thread.currentThread().getStackTrace()[1]
.getClassName());
lEntExp.setMethodName(Thread.currentThread().getStackTrace()[1]
.getMethodName());
ExceptionHelper.WriteException(lEntExp, lExcp);
} finally {
}
}
// variable length arguments are packed into an array
// which can be accessed and passed just like any array
public String Properties(String symbol, String... variables)
throws Exception {
// Retrieve the value of the associated key
String message = null;
final Caching<String, String> cache = new Caching<String, String>();
try {
if (cache.get(symbol) == null) {
message = this.symbolmap.getProperty(symbol);
cache.put(symbol, message);
} else {
message = cache.get(symbol);
}
if (message == null) {
return "";
}
} catch (final Exception lExcp) {
final ExceptionEntities lEntExp = new ExceptionEntities();
lEntExp.setJavaClass(Thread.currentThread().getStackTrace()[1]
.getClassName());
lEntExp.setMethodName(Thread.currentThread().getStackTrace()[1]
.getMethodName());
ExceptionHelper.WriteException(lEntExp, lExcp);
}
// Interpolate parameters if necessary
// and return the message
finally {
return String.format(message, variables);
}
}
}
|
[
"henry.sudarma@adibrata.co.id"
] |
henry.sudarma@adibrata.co.id
|
c548b7672a745aa38dcd6de451c4f943078e9cd7
|
f66cfb818ab229e4fb19073f29a183ecd48215e9
|
/Chapter05/P108_IncreaseArraySize/src/modern/challenge/ResizableArray.java
|
ff7b270673bbf7d540ee847a5e5d36f3fd5c8c6e
|
[
"MIT"
] |
permissive
|
PacktPublishing/Java-Coding-Problems
|
5a89edc80eb104f14ede519d8969f5e07f3f653a
|
057f7a5e5035ad13e830c326dbd308dea76de976
|
refs/heads/master
| 2023-01-29T04:45:51.618356
| 2023-01-18T09:03:53
| 2023-01-18T09:03:53
| 172,698,162
| 664
| 447
|
MIT
| 2022-11-16T11:35:29
| 2019-02-26T11:25:49
|
Java
|
UTF-8
|
Java
| false
| false
| 2,888
|
java
|
package modern.challenge;
import java.util.Arrays;
public final class ResizableArray {
private ResizableArray() {
throw new AssertionError("Cannot be instantiated");
}
public static int[] add(int[] arr, int item) {
if (arr == null) {
throw new IllegalArgumentException("The given array cannot be null");
}
int[] newArr = Arrays.copyOf(arr, arr.length + 1);
newArr[newArr.length - 1] = item;
// or, using System.arraycopy()
// int[] newArr = new int[arr.length + 1];
// System.arraycopy(arr, 0, newArr, 0, arr.length);
// newArr[newArr.length - 1] = item;
return newArr;
}
public static int[] remove(int[] arr) {
if (arr == null) {
throw new IllegalArgumentException("The given array cannot be null");
}
if (arr.length < 1) {
throw new IllegalArgumentException("The given array length must be greater than 0");
}
int[] newArr = Arrays.copyOf(arr, arr.length - 1);
// or, using System.arraycopy()
// int[] newArr = new int[arr.length - 1];
// System.arraycopy(arr, 0, newArr, 0, arr.length - 1);
return newArr;
}
public static int[] resize(int[] arr, int length) {
if (arr == null) {
throw new IllegalArgumentException("The given array cannot be null");
}
if (length < 0) {
throw new IllegalArgumentException("The given length cannot be smaller than 0");
}
int[] newArr = Arrays.copyOf(arr, arr.length + length);
// or, using System.arraycopy()
// int[] newArr = new int[arr.length + length];
// System.arraycopy(arr, 0, newArr, 0, arr.length);
return newArr;
}
public static <T> T[] addObject(T[] arr, T item) {
if (arr == null) {
throw new IllegalArgumentException("The given array cannot be null");
}
if (item == null) {
throw new IllegalArgumentException("The given item cannot be null");
}
T[] newArr = Arrays.copyOf(arr, arr.length + 1);
newArr[newArr.length - 1] = item;
return newArr;
}
public static <T> T[] removeObject(T[] arr) {
if (arr == null) {
throw new IllegalArgumentException("The given array cannot be null");
}
T[] newArr = Arrays.copyOf(arr, arr.length - 1);
return newArr;
}
public static <T> T[] resize(T[] arr, int length) {
if (arr == null) {
throw new IllegalArgumentException("The given array cannot be null");
}
if (length < 0) {
throw new IllegalArgumentException("The given length cannot be smaller than 0");
}
T[] newArr = Arrays.copyOf(arr, arr.length + length);
return newArr;
}
}
|
[
"leoprivacy@yahoo.com"
] |
leoprivacy@yahoo.com
|
6aae47d87e5358e3d3ab7062946b20189f915ecf
|
2efe0666f2f605e1c2afb5645b105c7e505fd26d
|
/src/main/java/org/silnith/game/chess/Color.java
|
d561ecb64a4405331a49cdf4ef9ad91143253c1a
|
[] |
no_license
|
silnith/chess
|
f2d595fb5afafda4d6211501b9ba113ec713212c
|
e7b572129d526383ff7dd8be054335bb9e5a722d
|
refs/heads/development
| 2021-01-10T03:52:00.183809
| 2020-03-25T16:43:18
| 2020-03-25T16:43:18
| 50,070,716
| 0
| 0
| null | 2020-10-13T04:34:40
| 2016-01-21T00:36:03
|
Java
|
UTF-8
|
Java
| false
| false
| 341
|
java
|
package org.silnith.game.chess;
public enum Color {
BLACK,
WHITE;
@Override
public String toString() {
switch (this) {
case BLACK:
return "Black";
case WHITE:
return "White";
default:
return super.toString();
}
}
}
|
[
"silnith@gmail.com"
] |
silnith@gmail.com
|
d683a1bac2a2159eded6e4fc4a8a878b481acb8a
|
737b0fc040333ec26f50409fc16372f5c64c7df6
|
/bus-health/src/main/java/org/aoju/bus/health/builtin/hardware/AbstractHWDiskStore.java
|
165b67de6c9c1a98dd48902ba70c32d8b09f9451
|
[
"MIT"
] |
permissive
|
sfg11/bus
|
1714cdc6c77f0042e3b80f32e1d9b7483c154e3e
|
d560ba4d3abd2e0a6c5dfda9faf7075da8e8d73e
|
refs/heads/master
| 2022-12-13T02:26:18.533039
| 2020-08-26T02:23:34
| 2020-08-26T02:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,924
|
java
|
/*********************************************************************************
* *
* The MIT License (MIT) *
* *
* Copyright (c) 2015-2020 aoju.org OSHI and other contributors. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy *
* of this software and associated documentation files (the "Software"), to deal *
* in the Software without restriction, including without limitation the rights *
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN *
* THE SOFTWARE. *
********************************************************************************/
package org.aoju.bus.health.builtin.hardware;
import org.aoju.bus.core.annotation.ThreadSafe;
import org.aoju.bus.core.lang.Symbol;
import org.aoju.bus.health.Formats;
/**
* @author Kimi Liu
* @version 6.0.8
* @since JDK 1.8+
*/
@ThreadSafe
public abstract class AbstractHWDiskStore implements HWDiskStore {
private final String name;
private final String model;
private final String serial;
private final long size;
public AbstractHWDiskStore(String name, String model, String serial, long size) {
this.name = name;
this.model = model;
this.serial = serial;
this.size = size;
}
@Override
public String getName() {
return this.name;
}
@Override
public String getModel() {
return this.model;
}
@Override
public String getSerial() {
return this.serial;
}
@Override
public long getSize() {
return this.size;
}
@Override
public String toString() {
boolean readwrite = getReads() > 0 || getWrites() > 0;
StringBuilder sb = new StringBuilder();
sb.append(getName()).append(": ");
sb.append("(model: ").append(getModel());
sb.append(" - S/N: ").append(getSerial()).append(") ");
sb.append("size: ").append(getSize() > 0 ? Formats.formatBytesDecimal(getSize()) : Symbol.QUESTION_MARK).append(", ");
sb.append("reads: ").append(readwrite ? getReads() : Symbol.QUESTION_MARK);
sb.append(" (").append(readwrite ? Formats.formatBytes(getReadBytes()) : Symbol.QUESTION_MARK).append("), ");
sb.append("writes: ").append(readwrite ? getWrites() : Symbol.QUESTION_MARK);
sb.append(" (").append(readwrite ? Formats.formatBytes(getWriteBytes()) : Symbol.QUESTION_MARK).append("), ");
sb.append("xfer: ").append(readwrite ? getTransferTime() : Symbol.QUESTION_MARK);
return sb.toString();
}
}
|
[
"839536@qq.com"
] |
839536@qq.com
|
348ed789483288068381b572d64e07d98c8359ff
|
0d86a98cd6a6477d84152026ffc6e33e23399713
|
/kata/6-kyu/simple-fun-number-319-number-and-ip-address/main/NumberAndIPAddress.java
|
51c0d0374e14608a467aef94f37486153b0eb159
|
[
"MIT"
] |
permissive
|
ParanoidUser/codewars-handbook
|
0ce82c23d9586d356b53070d13b11a6b15f2d6f7
|
692bb717aa0033e67995859f80bc7d034978e5b9
|
refs/heads/main
| 2023-07-28T02:42:21.165107
| 2023-07-27T12:33:47
| 2023-07-27T12:33:47
| 174,944,458
| 224
| 65
|
MIT
| 2023-09-14T11:26:10
| 2019-03-11T07:07:34
|
Java
|
UTF-8
|
Java
| false
| false
| 662
|
java
|
import static java.util.regex.Pattern.compile;
import java.util.function.BiFunction;
import java.util.function.IntToLongFunction;
interface NumberAndIPAddress {
static String numberAndIPaddress(String s) {
var m = compile("(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)").matcher(s);
BiFunction<Integer, Integer, Long> ls = (group, bits) -> Long.parseLong(m.group(group)) << bits;
IntToLongFunction rs = bits -> Long.parseLong(s) >> bits & 0xff;
return m.matches() ? ls.apply(1, 24) + ls.apply(2, 16) + ls.apply(3, 8) + ls.apply(4, 0) + "" :
rs.applyAsLong(24) + "." + rs.applyAsLong(16) + "." + rs.applyAsLong(8) + "." + rs.applyAsLong(0);
}
}
|
[
"5120290+ParanoidUser@users.noreply.github.com"
] |
5120290+ParanoidUser@users.noreply.github.com
|
72b1f2d3d1d22db4b55ee8fba5cbfa0e0c582122
|
a4f94f4701a59cafc7407aed2d525b2dff985c95
|
/workbench/source_gen/jetbrains/mps/ide/actions/AnalyzeStacktraceDialog.java
|
ad7d3808f376691e8286d0652fdc626c649155d6
|
[] |
no_license
|
jamice/code-orchestra-core
|
ffda62860f5b117386aa6455f4fdf61661abbe9e
|
b2bbf8362be2e2173864c294c635badb2e27ecc6
|
refs/heads/master
| 2021-01-15T13:24:53.517854
| 2013-05-09T21:39:28
| 2013-05-09T21:39:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,372
|
java
|
package jetbrains.mps.ide.actions;
/*Generated by MPS */
import jetbrains.mps.ide.dialogs.BaseDialog;
import javax.swing.JComponent;
import javax.swing.JTextArea;
import com.intellij.openapi.project.Project;
import java.awt.Frame;
import jetbrains.mps.smodel.IOperationContext;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.JLabel;
import jetbrains.mps.ide.datatransfer.TextPasteUtil;
import javax.swing.JScrollPane;
import com.intellij.ui.ScrollPaneFactory;
import jetbrains.mps.ide.dialogs.DialogDimensionsSettings;
import jetbrains.mps.plugins.projectplugins.ProjectPluginManager;
public class AnalyzeStacktraceDialog extends BaseDialog {
private JComponent myComponent;
private JTextArea myText;
private Project myProject;
public AnalyzeStacktraceDialog(Frame frame, final IOperationContext context, Project project) {
super(frame, "Analyze Stacktrace");
this.myProject = project;
this.myComponent = this.createPanel();
}
protected JComponent getMainComponent() {
return this.myComponent;
}
public JComponent createPanel() {
JPanel panel = new JPanel(new BorderLayout());
panel.add(new JLabel("Put a stack trace here:"), BorderLayout.NORTH);
this.myText = new JTextArea("");
String str = TextPasteUtil.getStringFromClipboard();
if (str != null) {
this.myText.setText(str);
}
panel.add(this.myText, BorderLayout.CENTER);
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(panel);
scrollPane.getVerticalScrollBar().setBlockIncrement(40);
scrollPane.getVerticalScrollBar().setUnitIncrement(20);
scrollPane.getHorizontalScrollBar().setBlockIncrement(40);
return scrollPane;
}
@Override
public DialogDimensionsSettings.DialogDimensions getDefaultDimensionSettings() {
return new DialogDimensionsSettings.DialogDimensions(100, 200, 700, 600);
}
@BaseDialog.Button(name = "OK", mnemonic = 'O', position = 0, defaultButton = true)
public void onOk() {
AnalyzeStacktrace_Tool tool = this.myProject.getComponent(ProjectPluginManager.class).getTool(AnalyzeStacktrace_Tool.class);
tool.setStackTrace(this.myText.getText());
tool.openToolLater(true);
this.dispose();
}
@BaseDialog.Button(name = "Cancel", mnemonic = 'C', position = 1, defaultButton = false)
public void onCancel() {
this.dispose();
}
}
|
[
"a.a.eliseyev@gmail.com"
] |
a.a.eliseyev@gmail.com
|
021aac2749483d7807597ba8ea50f7774b3f9d25
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14475-1-11-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/wiki/template/internal/DefaultWikiTemplateManager_ESTest.java
|
ee2113ca1ea8df53ea7365d73ca8e522575c659d
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,416
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Jan 18 17:26:58 UTC 2020
*/
package org.xwiki.wiki.template.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import javax.inject.Provider;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.evosuite.runtime.javaee.injection.Injector;
import org.junit.runner.RunWith;
import org.xwiki.query.QueryManager;
import org.xwiki.wiki.descriptor.WikiDescriptor;
import org.xwiki.wiki.descriptor.WikiDescriptorManager;
import org.xwiki.wiki.manager.WikiManager;
import org.xwiki.wiki.properties.WikiPropertyGroup;
import org.xwiki.wiki.properties.WikiPropertyGroupProvider;
import org.xwiki.wiki.provisioning.WikiProvisioningJobExecutor;
import org.xwiki.wiki.template.internal.DefaultWikiTemplateManager;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultWikiTemplateManager_ESTest extends DefaultWikiTemplateManager_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
DefaultWikiTemplateManager defaultWikiTemplateManager0 = new DefaultWikiTemplateManager();
QueryManager queryManager0 = mock(QueryManager.class, new ViolatedAssumptionAnswer());
Injector.inject(defaultWikiTemplateManager0, (Class<?>) DefaultWikiTemplateManager.class, "queryManager", (Object) queryManager0);
WikiPropertyGroupProvider wikiPropertyGroupProvider0 = mock(WikiPropertyGroupProvider.class, new ViolatedAssumptionAnswer());
Injector.inject(defaultWikiTemplateManager0, (Class<?>) DefaultWikiTemplateManager.class, "templateWikiPropertyGroupProvider", (Object) wikiPropertyGroupProvider0);
WikiDescriptor wikiDescriptor0 = mock(WikiDescriptor.class, new ViolatedAssumptionAnswer());
doReturn((WikiPropertyGroup) null).when(wikiDescriptor0).getPropertyGroup(anyString());
WikiDescriptorManager wikiDescriptorManager0 = mock(WikiDescriptorManager.class, new ViolatedAssumptionAnswer());
doReturn(wikiDescriptor0).when(wikiDescriptorManager0).getById(anyString());
Injector.inject(defaultWikiTemplateManager0, (Class<?>) DefaultWikiTemplateManager.class, "wikiDescriptorManager", (Object) wikiDescriptorManager0);
WikiManager wikiManager0 = mock(WikiManager.class, new ViolatedAssumptionAnswer());
Injector.inject(defaultWikiTemplateManager0, (Class<?>) DefaultWikiTemplateManager.class, "wikiManager", (Object) wikiManager0);
WikiProvisioningJobExecutor wikiProvisioningJobExecutor0 = mock(WikiProvisioningJobExecutor.class, new ViolatedAssumptionAnswer());
Injector.inject(defaultWikiTemplateManager0, (Class<?>) DefaultWikiTemplateManager.class, "wikiProvisionerExecutor", (Object) wikiProvisioningJobExecutor0);
Provider<Object> provider0 = (Provider<Object>) mock(Provider.class, new ViolatedAssumptionAnswer());
Injector.inject(defaultWikiTemplateManager0, (Class<?>) DefaultWikiTemplateManager.class, "xcontextProvider", (Object) provider0);
Injector.validateBean(defaultWikiTemplateManager0, (Class<?>) DefaultWikiTemplateManager.class);
// Undeclared exception!
defaultWikiTemplateManager0.setTemplate("/* Programmatic content */", true);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
e8a9ef6dcc7d69be8b9e60257b511a9563e02fce
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/plugin/nearby/ui/NearbySayHiListUI$6.java
|
7748b8242506820b40d59f2640a680df994440b0
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,361
|
java
|
package com.tencent.mm.plugin.nearby.ui;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ai.p;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.nearby.a.c;
import com.tencent.mm.ui.MMActivity;
import com.tencent.mm.ui.q;
final class NearbySayHiListUI$6
implements View.OnClickListener
{
NearbySayHiListUI$6(NearbySayHiListUI paramNearbySayHiListUI)
{
}
public final void onClick(View paramView)
{
AppMethodBeat.i(55500);
NearbySayHiListUI.a(this.oQP, new c(2, 0.0F, 0.0F, 0, 0, "", ""));
g.Rg().a(NearbySayHiListUI.f(this.oQP), 0);
paramView = this.oQP;
AppCompatActivity localAppCompatActivity = this.oQP.mController.ylL;
this.oQP.getString(2131297061);
NearbySayHiListUI.a(paramView, com.tencent.mm.ui.base.h.b(localAppCompatActivity, this.oQP.getString(2131301618), true, new NearbySayHiListUI.6.1(this)));
com.tencent.mm.plugin.report.service.h.pYm.X(11429, "0");
AppMethodBeat.o(55500);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.nearby.ui.NearbySayHiListUI.6
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
4b18f9ab830dc95c63421ce83b46ac78fab6b3c1
|
35a21794e5d3e85519f17387c4f2f4a798804ca4
|
/src/main/java/de/cinovo/cloudconductor/api/model/INamed.java
|
971f0c47c1f833ef6e1ffc23e96258e11ae5b446
|
[
"Apache-2.0"
] |
permissive
|
JaWe09/cloudconductor-api
|
9612f2fa8806ff666c2fdd75cf75f3b3d62d5e19
|
3dae891608d938e62365905ac0d610d57192d172
|
refs/heads/master
| 2020-06-10T16:13:40.906057
| 2017-02-27T09:58:35
| 2017-02-27T09:58:35
| 75,939,952
| 0
| 0
| null | 2016-12-08T13:25:35
| 2016-12-08T13:25:34
| null |
UTF-8
|
Java
| false
| false
| 1,084
|
java
|
package de.cinovo.cloudconductor.api.model;
/*
* #%L
* cloudconductor-api
* %%
* Copyright (C) 2013 - 2014 Cinovo AG
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
/**
* Copyright 2013 Cinovo AG<br>
* <br>
*
* @author psigloch
*
*/
@JsonTypeInfo(include = As.PROPERTY, use = Id.CLASS)
public interface INamed {
/**
* @return the name
*/
public String getName();
}
|
[
"thorsten.hoeger@hoegernet.com"
] |
thorsten.hoeger@hoegernet.com
|
b8f2f3e4c852ac44777b10366a1b9cc80dcfa6e7
|
2f15441222d9408ea0bfb986d668b21e8aaacbef
|
/src/main/java/com/nml/controller/CustomerController.java
|
9294972ebb4f39a256468ef04ba9f4689943a300
|
[] |
no_license
|
maulong305/ThymleafCustomer
|
6343cd65ac75fa9b8f94f008d3f00b4403e67c47
|
4bd597e1075b50fab65a1c1c1b9ae52c3de633f7
|
refs/heads/master
| 2022-12-27T13:38:03.649701
| 2020-10-07T10:18:28
| 2020-10-07T10:18:28
| 301,998,670
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,553
|
java
|
package com.nml.controller;
import com.nml.model.Customer;
import com.nml.service.CustomerService;
import com.nml.service.CustomerServiceImp;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.List;
@Controller
public class CustomerController {
private CustomerService customerService = new CustomerServiceImp();
@RequestMapping("/")
public String index(Model model) {
List customerList = customerService.findAll();
model.addAttribute("customers", customerList);
return "/index";
}
@GetMapping("/customer/create")
public String create(Model model) {
model.addAttribute("customer", new Customer());
return "/create";
}
@PostMapping("/customer/save")
public String save(Customer customer, RedirectAttributes redirect) {
customer.setId((int)(Math.random() * 10000));
customerService.save(customer);
redirect.addFlashAttribute("success", "Saved customer successfully!");
return "redirect:/";
}
@GetMapping("/customer/{id}/edit")
public String edit(@PathVariable int id, Model model) {
model.addAttribute("customer", customerService.findById(id));
return "/edit";
}
@PostMapping("/customer/update")
public String update(Customer customer, RedirectAttributes redirect) {
customerService.update(customer.getId(), customer);
redirect.addFlashAttribute("success", "Modified customer successfully!");
return "redirect:/";
}
@GetMapping("/customer/{id}/delete")
public String delete(@PathVariable int id, Model model) {
model.addAttribute("customer", customerService.findById(id));
return "/delete";
}
@PostMapping("/customer/delete")
public String delete(Customer customer, RedirectAttributes redirect) {
customerService.remove(customer.getId());
redirect.addFlashAttribute("success", "Removed customer successfully!");
return "redirect:/";
}
@GetMapping("/customer/{id}/view")
public String view(@PathVariable int id, Model model) {
model.addAttribute("customer", customerService.findById(id));
return "/view";
}
}
|
[
"maulong305@gmail.com"
] |
maulong305@gmail.com
|
cb5dfecb8b58b623d83692872c8f3bc1fed45066
|
3cdca6e9ea1f58a679703ba544acfaa776fc6e8f
|
/src/test/java/com/rhinoforms/flow/SubmissionTimeKeeperTest.java
|
0fbdf5654ca3c89d5f70ec040e8f01816448e0a4
|
[
"Apache-2.0"
] |
permissive
|
revolutionarysystems/rhinoforms
|
0aa72fa8ff9760e7da8fa5c861eed70be3471781
|
dc3488f72ed4601677b1769481a9ba535d0e09e8
|
refs/heads/master
| 2020-12-25T12:07:51.268295
| 2014-11-14T15:41:54
| 2014-11-14T15:41:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,966
|
java
|
package com.rhinoforms.flow;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SubmissionTimeKeeperTest {
private SubmissionTimeKeeper submissionTimeKeeper;
private static final Logger LOGGER = LoggerFactory.getLogger(SubmissionTimeKeeperTest.class);
@Before
public void setup() {
submissionTimeKeeper = new SubmissionTimeKeeper();
}
@Test
public void test() {
submissionTimeKeeper.recordTimeTaken("one", "next", list(300));
submissionTimeKeeper.recordTimeTaken("two", "next", list(100, 10000));
submissionTimeKeeper.recordTimeTaken("one", "next", list(600));
submissionTimeKeeper.recordTimeTaken("two", "next", list(100, 8000));
submissionTimeKeeper.recordTimeTaken("one", "next", list(600));
submissionTimeKeeper.recordTimeTaken("two", "next", list(100, 9000));
Assert.assertEquals("[466]", submissionTimeKeeper.getEstimate("one", "next").toString());
Assert.assertEquals("[99, 9220]", submissionTimeKeeper.getEstimate("two", "next").toString());
}
@Test
public void threadedTest() throws InterruptedException {
for (int i = 0; i < 100; i++) {
new Thread(new TimeSubmitter(submissionTimeKeeper)).start();
}
Thread.sleep(2000);
Assert.assertEquals("[99]", submissionTimeKeeper.getEstimate("one", "next").toString());
}
private static List<Integer> list(int... i) {
ArrayList<Integer> list = new ArrayList<Integer>();
for (int anInt : i) {
list.add(anInt);
}
return list;
}
private static class TimeSubmitter implements Runnable {
private SubmissionTimeKeeper tk;
public TimeSubmitter(SubmissionTimeKeeper tk) {
this.tk = tk;
}
@Override
public void run() {
try {
for (int i = 0; i < 100; i++) {
tk.recordTimeTaken("one", "next", list(100));
}
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
}
}
|
[
"kaikewley@gmail.com"
] |
kaikewley@gmail.com
|
9165fbc9061879b8a9a088c11a5694f8cec58556
|
affe223efe18ba4d5e676f685c1a5e73caac73eb
|
/clients/webservice/src/main/java/com/vmware/vim25/InsufficientHostCapacityFault.java
|
794364fdae6b427c08e4012cd0c56bb95bfd2dbd
|
[] |
no_license
|
RohithEngu/VM27
|
486f6093e0af2f6df1196115950b0d978389a985
|
f0f4f177210fd25415c2e058ec10deb13b7c9247
|
refs/heads/master
| 2021-01-16T00:42:30.971054
| 2009-08-14T19:58:16
| 2009-08-14T19:58:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,903
|
java
|
/**
* InsufficientHostCapacityFault.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.vmware.vim25;
public class InsufficientHostCapacityFault extends
com.vmware.vim25.InsufficientResourcesFault implements
java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private com.vmware.vim25.ManagedObjectReference host;
public InsufficientHostCapacityFault() {
}
public InsufficientHostCapacityFault(java.lang.String dynamicType,
com.vmware.vim25.DynamicProperty[] dynamicProperty,
com.vmware.vim25.LocalizedMethodFault faultCause,
com.vmware.vim25.LocalizableMessage[] faultMessage,
com.vmware.vim25.ManagedObjectReference host) {
super(dynamicType, dynamicProperty, faultCause, faultMessage);
this.host = host;
}
/**
* Gets the host value for this InsufficientHostCapacityFault.
*
* @return host
*/
public com.vmware.vim25.ManagedObjectReference getHost() {
return host;
}
/**
* Sets the host value for this InsufficientHostCapacityFault.
*
* @param host
*/
public void setHost(com.vmware.vim25.ManagedObjectReference host) {
this.host = host;
}
private java.lang.Object __equalsCalc = null;
@Override
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof InsufficientHostCapacityFault)) {
return false;
}
InsufficientHostCapacityFault other = (InsufficientHostCapacityFault) obj;
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj)
&& ((this.host == null && other.getHost() == null) || (this.host != null && this.host
.equals(other.getHost())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
@Override
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getHost() != null) {
_hashCode += getHost().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
InsufficientHostCapacityFault.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:vim25",
"InsufficientHostCapacityFault"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("host");
elemField
.setXmlName(new javax.xml.namespace.QName("urn:vim25", "host"));
elemField.setXmlType(new javax.xml.namespace.QName("urn:vim25",
"ManagedObjectReference"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return new org.apache.axis.encoding.ser.BeanSerializer(_javaType,
_xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return new org.apache.axis.encoding.ser.BeanDeserializer(_javaType,
_xmlType, typeDesc);
}
/**
* Writes the exception data to the faultDetails
*/
@Override
public void writeDetails(javax.xml.namespace.QName qname,
org.apache.axis.encoding.SerializationContext context)
throws java.io.IOException {
context.serialize(qname, null, this);
}
}
|
[
"sankarachary@intalio.com"
] |
sankarachary@intalio.com
|
f42cd87fc25edfbe42f4ff35d410b05842da69ca
|
29acc5b6a535dfbff7c625f5513871ba55554dd2
|
/aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/model/transform/PredicateJsonUnmarshaller.java
|
e05a81412aacc2010b7cb13e333b34b9f37121f7
|
[
"JSON",
"Apache-2.0"
] |
permissive
|
joecastro/aws-sdk-java
|
b2d25f6a503110d156853836b49390d2889c4177
|
fdbff1d42a73081035fa7b0f172b9b5c30edf41f
|
refs/heads/master
| 2021-01-21T16:52:46.982971
| 2016-01-11T22:55:28
| 2016-01-11T22:55:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,199
|
java
|
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.waf.model.transform;
import java.util.Map;
import java.util.Map.Entry;
import com.amazonaws.services.waf.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* Predicate JSON Unmarshaller
*/
public class PredicateJsonUnmarshaller implements
Unmarshaller<Predicate, JsonUnmarshallerContext> {
public Predicate unmarshall(JsonUnmarshallerContext context)
throws Exception {
Predicate predicate = new Predicate();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.getCurrentToken();
if (token == null)
token = context.nextToken();
if (token == VALUE_NULL)
return null;
while (true) {
if (token == null)
break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("Negated", targetDepth)) {
context.nextToken();
predicate.setNegated(BooleanJsonUnmarshaller.getInstance()
.unmarshall(context));
}
if (context.testExpression("Type", targetDepth)) {
context.nextToken();
predicate.setType(StringJsonUnmarshaller.getInstance()
.unmarshall(context));
}
if (context.testExpression("DataId", targetDepth)) {
context.nextToken();
predicate.setDataId(StringJsonUnmarshaller.getInstance()
.unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null
|| context.getLastParsedParentElement().equals(
currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth)
break;
}
}
token = context.nextToken();
}
return predicate;
}
private static PredicateJsonUnmarshaller instance;
public static PredicateJsonUnmarshaller getInstance() {
if (instance == null)
instance = new PredicateJsonUnmarshaller();
return instance;
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
a6656de06737d0ae69816bfbf1f98942ec0ee116
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/dso/tags/3.7.4/dso-statistics/src/test/java/com/tctest/statistics/retrieval/actions/SRAShutdownTimestampTest.java
|
983cc0794f34cb4ddfb5298e23e312ab0b836448
|
[] |
no_license
|
sirinath/Terracotta
|
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
|
00a7662b9cf530dfdb43f2dd821fa559e998c892
|
refs/heads/master
| 2021-01-23T05:41:52.414211
| 2015-07-02T15:21:54
| 2015-07-02T15:21:54
| 38,613,711
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,053
|
java
|
/*
* All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
*/
package com.tctest.statistics.retrieval.actions;
import com.tc.statistics.StatisticData;
import com.tc.statistics.StatisticRetrievalAction;
import com.tc.statistics.retrieval.actions.SRAShutdownTimestamp;
import java.util.Date;
import junit.framework.TestCase;
public class SRAShutdownTimestampTest extends TestCase {
public void testRetrieval() throws Exception {
StatisticRetrievalAction action = new SRAShutdownTimestamp();
Date before = new Date();
StatisticData data = action.retrieveStatisticData()[0];
Date after = new Date();
assertEquals(SRAShutdownTimestamp.ACTION_NAME, data.getName());
assertNull(data.getAgentIp());
assertNull(data.getAgentDifferentiator());
assertTrue(before.compareTo((Date)data.getData()) <= 0);
assertTrue(after.compareTo((Date)data.getData()) >= 0);
assertNull(data.getElement());
assertNull(data.getMoment());
}
}
|
[
"cruise@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
cruise@7fc7bbf3-cf45-46d4-be06-341739edd864
|
dbd17a7d42a8e69b7595d5b9457b894dea98beeb
|
40f4908483b98fc4f370ff4f2d520e1284d045b3
|
/immortals_repo/knowledge-repo/vocabulary/ontology-vocab-domains/sa/src/main/java/com/securboration/immortals/ontology/functionality/aspects/InitAspectBase.java
|
7fd5844ea3217f5e070a1e26ba4b0293bbc4f4d6
|
[] |
no_license
|
TF-185/bbn-immortals
|
7f70610bdbbcbf649f3d9021f087baaa76f0d8ca
|
e298540f7b5f201779213850291337a8bded66c7
|
refs/heads/master
| 2023-05-31T00:16:42.522840
| 2019-10-24T21:45:07
| 2019-10-24T21:45:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package com.securboration.immortals.ontology.functionality.aspects;
import com.securboration.immortals.ontology.functionality.Input;
import com.securboration.immortals.ontology.functionality.Output;
public class InitAspectBase extends DefaultAspectBase {
public InitAspectBase(final String name){
super(name);
}
public InitAspectBase() {
super();
}
public InitAspectBase(
final String name,
Input[] inputs,
Output[] outputs
){
super(name,inputs,outputs);
}
}
|
[
"austin.wellman@raytheon.com"
] |
austin.wellman@raytheon.com
|
2df3ca83137ffe096fef40c3836d71f07861f8eb
|
20ef0eaaa77093335a0ea254e5e9cf9cffcf4f0c
|
/jingpeng/MixStation/.svn/pristine/90/9028605391ea0c374f63168a7e183f21b68c0cbb.svn-base
|
038ab72fb9e3f561a41b3bf64b927119e27ac295
|
[] |
no_license
|
elaine140626/jingpeng
|
1749830a96352b0c853f148c4808dd67650df8a0
|
2329eb463b4d36bdb4dedf451702b4c73ef87982
|
refs/heads/master
| 2021-03-15T00:29:17.637034
| 2019-08-15T01:35:49
| 2019-08-15T01:35:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,809
|
package com.jingpeng.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jingpeng.dao.DataTablesResponseInfo;
import com.jingpeng.model.AsphaltGrad_DataAnalysis;
import com.jingpeng.model.AsphaltProp_DataAnalysis;
import com.jingpeng.model.Asphalt_ProductionDTO;
import com.jingpeng.model.Asphalt_ProductionData;
import com.jingpeng.model.Core_User_Info;
import com.jingpeng.model.User_Info;
import com.jingpeng.service.Asphalt_ProductionDataService;
import com.jingpeng.service.CommonService;
import com.jingpeng.util.RequestOrgIdUtil;
import com.kdt.base.exception.BusinessException;
import com.kdt.base.support.springsupport.KDController;
/**
* 生产数据Controller
* @author Administrator
*
*/
@Controller
@RequestMapping("/AsphaltProductionData")
public class Asphalt_ProductionDataController extends KDController<Object>{
@Autowired
private Asphalt_ProductionDataService asphalt_ProductionDataService;
@Autowired
private CommonService commonService;
@RequestMapping("/asphaltProductionData.html")
public String asphaltProductionData() {
return "/lq/scgl_2";
}
/**
* 查询生产数据列表
* @param asphalt_ProductionDTO
* @return
*/
@RequestMapping("/getAsphaltProductionData.html")
public @ResponseBody DataTablesResponseInfo getAsphaltProductionData(HttpServletRequest request,@RequestParam Map<String, Object> map) {
DataTablesResponseInfo dtri = new DataTablesResponseInfo();
try {
if(map.get("tag") != null && map.get("tag").toString() != "") {
if(map.get("tag").equals("2")) {
map.put("str_analysis_Result", "2");
}
String[] str;
if(map.get("os") == null || "".equals(map.get("os").toString()) ) {
Core_User_Info user = (Core_User_Info) request.getSession().getAttribute("user");
String str_power_Org_Id = commonService.getCUserOrgId(user);
str_power_Org_Id = str_power_Org_Id.substring(1,str_power_Org_Id.length());
str = str_power_Org_Id.split(",");
} else {
String str_power_Org_Id = map.get("os").toString();
str = str_power_Org_Id.substring(1).split(",");
}
int [] org_Ids = new int[str.length];
for(int i = 0; i < org_Ids.length; i++) {
org_Ids[i] = Integer.parseInt(str[i]);
}
map.put("org_Ids", org_Ids);
} else {
User_Info user = (User_Info) request.getSession().getAttribute("user");
int[] org_Ids = commonService.getUserOrgId(user);
org_Ids = RequestOrgIdUtil.getOrgids(map, org_Ids);
map.put("org_Ids", org_Ids);
}
List<Asphalt_ProductionDTO> list = asphalt_ProductionDataService.getAsphaltProductionData(map);
for(int i = 0; i < list.size(); i++) {
list.get(i).setSerialNumber(i+1);
list.get(i).setStr_collect_Time("<a href='javascript:void(0)' onclick='getInfo(\""+list.get(i).getI_id()+"\")'>"+list.get(i).getStr_collect_Time()+"</a>");
}
dtri.setData(list);
return dtri;
} catch (BusinessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}
/**
* 查询生产数据明细
* @param asphalt_ProductionData
* @return
*/
@RequestMapping("/getAsphaltPropDataAnalysis.html")
public @ResponseBody Map<String, Object> getAsphaltPropDataAnalysis(Asphalt_ProductionDTO asphalt_ProductionDTO) {
Map<String, Object> map = new HashMap();
try {
asphalt_ProductionDTO = asphalt_ProductionDataService.getAsphaltProductionDataByID(asphalt_ProductionDTO).get(0);
map.put("asphalt_ProductionDTO", asphalt_ProductionDTO);
List<AsphaltProp_DataAnalysis> asphaltPropDataAnalysisList = asphalt_ProductionDataService.getAsphaltPropDataAnalysis(asphalt_ProductionDTO);
map.put("asphaltPropDataAnalysisList", asphaltPropDataAnalysisList);
List<AsphaltGrad_DataAnalysis> asphaltGradDataAnalysisList = asphalt_ProductionDataService.asphaltGradDataAnalysis(asphalt_ProductionDTO);
map.put("asphaltGradDataAnalysisList", asphaltGradDataAnalysisList);
List<Map<String, Object>> materialConsumption = asphalt_ProductionDataService.getMaterialConsumption(asphalt_ProductionDTO);
map.put("materialConsumption", materialConsumption);
} catch (BusinessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return map;
}
@RequestMapping("/getAsphaltProductionDataNew.html")
public @ResponseBody DataTablesResponseInfo getAsphaltProductionDataNew(HttpServletRequest request,@RequestParam Map<String, Object> map) {
DataTablesResponseInfo dtri = new DataTablesResponseInfo();
try {
if(map.get("tag") != null && map.get("tag").toString() != "") {
if(map.get("tag").equals("2")) {
map.put("str_analysis_Result", "2");
}
String[] str;
if(map.get("os") == null || "".equals(map.get("os").toString()) ) {
Core_User_Info user = (Core_User_Info) request.getSession().getAttribute("user");
String str_power_Org_Id = commonService.getCUserOrgId(user);
str_power_Org_Id = str_power_Org_Id.substring(1,str_power_Org_Id.length());
str = str_power_Org_Id.split(",");
} else {
String str_power_Org_Id = map.get("os").toString();
str = str_power_Org_Id.substring(1).split(",");
}
int [] org_Ids = new int[str.length];
for(int i = 0; i < org_Ids.length; i++) {
org_Ids[i] = Integer.parseInt(str[i]);
}
map.put("org_Ids", org_Ids);
} else {
User_Info user = (User_Info) request.getSession().getAttribute("user");
int[] org_Ids = commonService.getUserOrgId(user);
org_Ids = RequestOrgIdUtil.getOrgids(map, org_Ids);
map.put("org_Ids", org_Ids);
}
List<Map<String,String>> list = asphalt_ProductionDataService.getAsphaltProductionDataNew(map);
for(int i = 0; i < list.size(); i++) {
/*list.get(i).setSerialNumber(i+1);
list.get(i).setStr_collect_Time("<a href='javascript:void(0)' onclick='getInfo(\""+list.get(i).getI_id()+"\")'>"+list.get(i).getStr_collect_Time()+"</a>");*/
int sum = i+1;
list.get(i).put("serialNumber", String.valueOf(sum));
//String a = "<a href='javascript:void(0)' onclick='getInfo(\""+list.get(i).get("i_id").toString()+"\")'>"+list.get(i).get("str_collect_Time").toString()+"</a>";
list.get(i).put("str_collect_Time", "aaaa");
}
dtri.setData(list);
return dtri;
} catch (BusinessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}
}
|
[
"474296307@qq.com"
] |
474296307@qq.com
|
|
d9c84d39949d68c3f13146980251c3ffd5da480f
|
f28dce60491e33aefb5c2187871c1df784ccdb3a
|
/src/main/java/android/support/v4/app/FragmentState.java
|
7a66ffcb70b036241777d980962c8260501819c2
|
[
"Apache-2.0"
] |
permissive
|
JackChan1999/boohee_v5.6
|
861a5cad79f2bfbd96d528d6a2aff84a39127c83
|
221f7ea237f491e2153039a42941a515493ba52c
|
refs/heads/master
| 2021-06-11T23:32:55.977231
| 2017-02-14T18:07:04
| 2017-02-14T18:07:04
| 81,962,585
| 8
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,019
|
java
|
package android.support.v4.app;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import android.util.Log;
/* compiled from: Fragment */
final class FragmentState implements Parcelable {
public static final Creator<FragmentState> CREATOR = new Creator<FragmentState>() {
public FragmentState createFromParcel(Parcel in) {
return new FragmentState(in);
}
public FragmentState[] newArray(int size) {
return new FragmentState[size];
}
};
final Bundle mArguments;
final String mClassName;
final int mContainerId;
final boolean mDetached;
final int mFragmentId;
final boolean mFromLayout;
final int mIndex;
Fragment mInstance;
final boolean mRetainInstance;
Bundle mSavedFragmentState;
final String mTag;
public FragmentState(Fragment frag) {
this.mClassName = frag.getClass().getName();
this.mIndex = frag.mIndex;
this.mFromLayout = frag.mFromLayout;
this.mFragmentId = frag.mFragmentId;
this.mContainerId = frag.mContainerId;
this.mTag = frag.mTag;
this.mRetainInstance = frag.mRetainInstance;
this.mDetached = frag.mDetached;
this.mArguments = frag.mArguments;
}
public FragmentState(Parcel in) {
boolean z;
boolean z2 = true;
this.mClassName = in.readString();
this.mIndex = in.readInt();
this.mFromLayout = in.readInt() != 0;
this.mFragmentId = in.readInt();
this.mContainerId = in.readInt();
this.mTag = in.readString();
if (in.readInt() != 0) {
z = true;
} else {
z = false;
}
this.mRetainInstance = z;
if (in.readInt() == 0) {
z2 = false;
}
this.mDetached = z2;
this.mArguments = in.readBundle();
this.mSavedFragmentState = in.readBundle();
}
public Fragment instantiate(FragmentHostCallback host, Fragment parent) {
if (this.mInstance != null) {
return this.mInstance;
}
Context context = host.getContext();
if (this.mArguments != null) {
this.mArguments.setClassLoader(context.getClassLoader());
}
this.mInstance = Fragment.instantiate(context, this.mClassName, this.mArguments);
if (this.mSavedFragmentState != null) {
this.mSavedFragmentState.setClassLoader(context.getClassLoader());
this.mInstance.mSavedFragmentState = this.mSavedFragmentState;
}
this.mInstance.setIndex(this.mIndex, parent);
this.mInstance.mFromLayout = this.mFromLayout;
this.mInstance.mRestored = true;
this.mInstance.mFragmentId = this.mFragmentId;
this.mInstance.mContainerId = this.mContainerId;
this.mInstance.mTag = this.mTag;
this.mInstance.mRetainInstance = this.mRetainInstance;
this.mInstance.mDetached = this.mDetached;
this.mInstance.mFragmentManager = host.mFragmentManager;
if (FragmentManagerImpl.DEBUG) {
Log.v("FragmentManager", "Instantiated fragment " + this.mInstance);
}
return this.mInstance;
}
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel dest, int flags) {
int i;
int i2 = 1;
dest.writeString(this.mClassName);
dest.writeInt(this.mIndex);
dest.writeInt(this.mFromLayout ? 1 : 0);
dest.writeInt(this.mFragmentId);
dest.writeInt(this.mContainerId);
dest.writeString(this.mTag);
if (this.mRetainInstance) {
i = 1;
} else {
i = 0;
}
dest.writeInt(i);
if (!this.mDetached) {
i2 = 0;
}
dest.writeInt(i2);
dest.writeBundle(this.mArguments);
dest.writeBundle(this.mSavedFragmentState);
}
}
|
[
"jackychan2040@gmail.com"
] |
jackychan2040@gmail.com
|
4065fc80504642e1adc2df45609e3986dda8875c
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/devops-20210625/src/main/java/com/aliyun/devops20210625/models/UpdateRepositoryMemberResponseBody.java
|
80c5bf5c29fb1d5028902909f3902fd562b06b5f
|
[
"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
| 6,238
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.devops20210625.models;
import com.aliyun.tea.*;
public class UpdateRepositoryMemberResponseBody extends TeaModel {
@NameInMap("errorCode")
public String errorCode;
@NameInMap("errorMessage")
public String errorMessage;
@NameInMap("requestId")
public String requestId;
@NameInMap("result")
public UpdateRepositoryMemberResponseBodyResult result;
@NameInMap("success")
public Boolean success;
public static UpdateRepositoryMemberResponseBody build(java.util.Map<String, ?> map) throws Exception {
UpdateRepositoryMemberResponseBody self = new UpdateRepositoryMemberResponseBody();
return TeaModel.build(map, self);
}
public UpdateRepositoryMemberResponseBody setErrorCode(String errorCode) {
this.errorCode = errorCode;
return this;
}
public String getErrorCode() {
return this.errorCode;
}
public UpdateRepositoryMemberResponseBody setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
return this;
}
public String getErrorMessage() {
return this.errorMessage;
}
public UpdateRepositoryMemberResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public UpdateRepositoryMemberResponseBody setResult(UpdateRepositoryMemberResponseBodyResult result) {
this.result = result;
return this;
}
public UpdateRepositoryMemberResponseBodyResult getResult() {
return this.result;
}
public UpdateRepositoryMemberResponseBody setSuccess(Boolean success) {
this.success = success;
return this;
}
public Boolean getSuccess() {
return this.success;
}
public static class UpdateRepositoryMemberResponseBodyResult extends TeaModel {
@NameInMap("accessLevel")
public Integer accessLevel;
@NameInMap("avatarUrl")
public String avatarUrl;
@NameInMap("email")
public String email;
@NameInMap("expireAt")
public String expireAt;
@NameInMap("id")
public Long id;
@NameInMap("memberName")
public String memberName;
@NameInMap("memberType")
public String memberType;
@NameInMap("name")
public String name;
@NameInMap("sourceId")
public Long sourceId;
@NameInMap("sourceType")
public String sourceType;
@NameInMap("state")
public String state;
@NameInMap("username")
public String username;
/**
* <p>web url</p>
*/
@NameInMap("webUrl")
public String webUrl;
public static UpdateRepositoryMemberResponseBodyResult build(java.util.Map<String, ?> map) throws Exception {
UpdateRepositoryMemberResponseBodyResult self = new UpdateRepositoryMemberResponseBodyResult();
return TeaModel.build(map, self);
}
public UpdateRepositoryMemberResponseBodyResult setAccessLevel(Integer accessLevel) {
this.accessLevel = accessLevel;
return this;
}
public Integer getAccessLevel() {
return this.accessLevel;
}
public UpdateRepositoryMemberResponseBodyResult setAvatarUrl(String avatarUrl) {
this.avatarUrl = avatarUrl;
return this;
}
public String getAvatarUrl() {
return this.avatarUrl;
}
public UpdateRepositoryMemberResponseBodyResult setEmail(String email) {
this.email = email;
return this;
}
public String getEmail() {
return this.email;
}
public UpdateRepositoryMemberResponseBodyResult setExpireAt(String expireAt) {
this.expireAt = expireAt;
return this;
}
public String getExpireAt() {
return this.expireAt;
}
public UpdateRepositoryMemberResponseBodyResult setId(Long id) {
this.id = id;
return this;
}
public Long getId() {
return this.id;
}
public UpdateRepositoryMemberResponseBodyResult setMemberName(String memberName) {
this.memberName = memberName;
return this;
}
public String getMemberName() {
return this.memberName;
}
public UpdateRepositoryMemberResponseBodyResult setMemberType(String memberType) {
this.memberType = memberType;
return this;
}
public String getMemberType() {
return this.memberType;
}
public UpdateRepositoryMemberResponseBodyResult setName(String name) {
this.name = name;
return this;
}
public String getName() {
return this.name;
}
public UpdateRepositoryMemberResponseBodyResult setSourceId(Long sourceId) {
this.sourceId = sourceId;
return this;
}
public Long getSourceId() {
return this.sourceId;
}
public UpdateRepositoryMemberResponseBodyResult setSourceType(String sourceType) {
this.sourceType = sourceType;
return this;
}
public String getSourceType() {
return this.sourceType;
}
public UpdateRepositoryMemberResponseBodyResult setState(String state) {
this.state = state;
return this;
}
public String getState() {
return this.state;
}
public UpdateRepositoryMemberResponseBodyResult setUsername(String username) {
this.username = username;
return this;
}
public String getUsername() {
return this.username;
}
public UpdateRepositoryMemberResponseBodyResult setWebUrl(String webUrl) {
this.webUrl = webUrl;
return this;
}
public String getWebUrl() {
return this.webUrl;
}
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
289a3f55ea9da21f1d563dde57c4e66a35af781c
|
ac72641cacd2d68bd2f48edfc511f483951dd9d6
|
/opscloud-manage/src/main/java/com/baiyi/opscloud/convert/aliyun/dns/AliyunDomainConvert.java
|
252c9df16d74906c3fd295c074bdd28d26d71bfb
|
[] |
no_license
|
fx247562340/opscloud-demo
|
6afe8220ce6187ac4cc10602db9e14374cb14251
|
b608455cfa5270c8c021fbb2981cb8c456957ccb
|
refs/heads/main
| 2023-05-25T03:33:22.686217
| 2021-06-08T03:17:32
| 2021-06-08T03:17:32
| 373,446,042
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,491
|
java
|
package com.baiyi.opscloud.convert.aliyun.dns;
import com.baiyi.opscloud.common.util.BeanCopierUtils;
import com.baiyi.opscloud.common.util.TimeUtils;
import com.baiyi.opscloud.domain.generator.opscloud.OcAliyunDomain;
import com.baiyi.opscloud.domain.vo.cloud.AliyunDomainVO;
import com.google.common.collect.Lists;
import java.util.Date;
import java.util.List;
/**
* @Author <a href="mailto:xiuyuan@xinc818.group">修远</a>
* @Date 2020/12/9 4:30 下午
* @Since 1.0
*/
public class AliyunDomainConvert {
private static AliyunDomainVO.Domain toVO(OcAliyunDomain ocAliyunDomain) {
AliyunDomainVO.Domain domain = BeanCopierUtils.copyProperties(ocAliyunDomain, AliyunDomainVO.Domain.class);
String expirationDate = ocAliyunDomain.getExpirationDate();
Integer expirationCurrDateDiff = TimeUtils.calculateDateDiff4Day(new Date(), TimeUtils.gmtToDate(expirationDate));
domain.setExpirationCurrDateDiff(expirationCurrDateDiff);
String expirationDateStatus = TimeUtils.calculateDateExpired(expirationDate) ? "2" : "1";
domain.setExpirationDateStatus(expirationDateStatus);
return domain;
}
public static List<AliyunDomainVO.Domain> toVOList(List<OcAliyunDomain> ocAliyunDomainList) {
List<AliyunDomainVO.Domain> domainList = Lists.newArrayListWithCapacity(ocAliyunDomainList.size());
ocAliyunDomainList.forEach(vcAliyunDomain -> domainList.add(toVO(vcAliyunDomain)));
return domainList;
}
}
|
[
"fanxin01@longfor.com"
] |
fanxin01@longfor.com
|
5273fd1f8695fb95cd0780a7b4045ac09f8003db
|
99db30cac9ad89c8fc8ffefa819135cebb01d7b1
|
/Glue/ImplementationAdapters/WookieWidgetAdaptor/lib/dep/wookie-connector-framework/src/org/apache/wookie/connector/framework/WidgetInstances.java
|
b2411bf3b0c58d0b72489f5b4733c72b76c18821
|
[
"Apache-2.0"
] |
permissive
|
METIS-Project/ILDE
|
b4bbf52c39fae24b7dafda7f0c3684cb3901f201
|
f6e87f7f08dbe251a26ac78302bc30288142a9dd
|
refs/heads/master
| 2021-01-01T16:30:40.596086
| 2015-02-06T16:45:17
| 2015-02-06T16:45:17
| 7,796,946
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,149
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wookie.connector.framework;
import java.util.HashMap;
/**
* A collection of known widget instances available to a host.
*/
public class WidgetInstances extends HashMap<String, WidgetInstance> {
private static final long serialVersionUID = 1L;
/**
* Record an instance of the given widget.
*
* @param xml description of the instance as returned by the widget server when the widget was instantiated.
* @return the identifier for this instance
*/
public void put(WidgetInstance instance) {
put(instance.getId(), instance);
}
}
|
[
"javierht@gmail.com"
] |
javierht@gmail.com
|
b13411cb9fe983861c7ed1497c23fc48786b60fb
|
8ef2cecd392f43cc670ae8c6f149be6d71d737ba
|
/src/com/google/android/gms/internal/kz.java
|
d4b7ce78689a3fd18234cd3b889c92355c91ab83
|
[] |
no_license
|
NBchitu/AngelEyes2
|
28e563380be6dcf5ba5398770d66ebeb924a033b
|
afea424b70597c7498e9c6da49bcc7b140a383f7
|
refs/heads/master
| 2021-01-16T18:30:51.913292
| 2015-02-15T07:30:00
| 2015-02-15T07:30:00
| 30,744,510
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,628
|
java
|
package com.google.android.gms.internal;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.a.a;
import com.google.android.gms.common.internal.safeparcel.b;
public class kz
implements Parcelable.Creator<ky>
{
static void a(ky paramky, Parcel paramParcel, int paramInt)
{
int i = b.a(paramParcel);
b.a(paramParcel, 1, paramky.d());
b.a(paramParcel, 2, paramky.e(), false);
b.a(paramParcel, 3, paramky.f(), paramInt, false);
b.a(paramParcel, i);
}
public ky a(Parcel paramParcel)
{
kv localkv = null;
int i = a.b(paramParcel);
int j = 0;
Parcel localParcel = null;
while (paramParcel.dataPosition() < i)
{
int k = a.a(paramParcel);
switch (a.a(k))
{
default:
a.b(paramParcel, k);
break;
case 1:
j = a.f(paramParcel, k);
break;
case 2:
localParcel = a.z(paramParcel, k);
break;
case 3:
localkv = (kv)a.a(paramParcel, k, kv.CREATOR);
}
}
if (paramParcel.dataPosition() != i) {
throw new a.a("Overread allowed size end=" + i, paramParcel);
}
return new ky(j, localParcel, localkv);
}
public ky[] a(int paramInt)
{
return new ky[paramInt];
}
}
/* Location: C:\DISKD\fishfinder\apktool-install-windows-r05-ibot\classes_dex2jar.jar
* Qualified Name: com.google.android.gms.internal.kz
* JD-Core Version: 0.7.0.1
*/
|
[
"bjtu2010@hotmail.com"
] |
bjtu2010@hotmail.com
|
67bfd25adf5c91e6d8ec556c6bf02f2b20fa3862
|
ba60c9c5c7728e12f583e5325baa059482937096
|
/Lec49/Key_Pait_InArray.java
|
dbdd3aeefc0075a3f78ab5d9ee492ce839e51b38
|
[] |
no_license
|
antalparth/Parth
|
3a539058601bc25d27ae9b776fe7ac68271aef0e
|
2fe0b38d37188a12c7407eaebd723971f553e734
|
refs/heads/master
| 2023-05-29T08:39:11.158554
| 2023-05-19T11:18:18
| 2023-05-19T11:18:18
| 127,140,173
| 0
| 0
| null | 2023-05-19T11:18:09
| 2018-03-28T12:55:51
|
Java
|
UTF-8
|
Java
| false
| false
| 331
|
java
|
package Lec49;
public class Key_Pait_InArray {
public static void main(String[] args) {
// TODO Auto-generated method stub
Pair[] arr = new Pair[5];
arr[0] = new Pair("Riya", 67);
arr[1] = new Pair("Pawan", 37);
arr[2] = new Pair("Raj", 89);
arr[3] = new Pair("Rahul", 57);
arr[4] = new Pair("Kunal", 87);
}
}
|
[
"monu012as@gmail.com"
] |
monu012as@gmail.com
|
58122d44b23983236607240a4a42dbc8d6eeaa83
|
62cf61afdc375d71d27a23eac750850c8f5279af
|
/1.13.2/spigot/net/minecraft/server/CriterionTriggerKilled.java
|
1f4bad26582c1c36bc147eb7d7a313a82b255eef
|
[] |
no_license
|
Akarin-project/Minecraft
|
8702914cff49dba37e92e57f4fbb1f40a608b67d
|
23fd9297f773b229a31501ffc5b6ce5a9fd29fa6
|
refs/heads/master
| 2021-08-06T17:18:54.483817
| 2020-04-03T06:35:13
| 2020-04-03T06:35:13
| 133,816,032
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,148
|
java
|
package net.minecraft.server;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class CriterionTriggerKilled implements CriterionTrigger<CriterionTriggerKilled.b> {
private final Map<AdvancementDataPlayer, CriterionTriggerKilled.a> a = Maps.newHashMap();
private final MinecraftKey b;
public CriterionTriggerKilled(MinecraftKey minecraftkey) {
this.b = minecraftkey;
}
public MinecraftKey a() {
return this.b;
}
public void a(AdvancementDataPlayer advancementdataplayer, CriterionTrigger.a<CriterionTriggerKilled.b> criteriontrigger_a) {
CriterionTriggerKilled.a criteriontriggerkilled_a = (CriterionTriggerKilled.a) this.a.get(advancementdataplayer);
if (criteriontriggerkilled_a == null) {
criteriontriggerkilled_a = new CriterionTriggerKilled.a(advancementdataplayer);
this.a.put(advancementdataplayer, criteriontriggerkilled_a);
}
criteriontriggerkilled_a.a(criteriontrigger_a);
}
public void b(AdvancementDataPlayer advancementdataplayer, CriterionTrigger.a<CriterionTriggerKilled.b> criteriontrigger_a) {
CriterionTriggerKilled.a criteriontriggerkilled_a = (CriterionTriggerKilled.a) this.a.get(advancementdataplayer);
if (criteriontriggerkilled_a != null) {
criteriontriggerkilled_a.b(criteriontrigger_a);
if (criteriontriggerkilled_a.a()) {
this.a.remove(advancementdataplayer);
}
}
}
public void a(AdvancementDataPlayer advancementdataplayer) {
this.a.remove(advancementdataplayer);
}
public CriterionTriggerKilled.b a(JsonObject jsonobject, JsonDeserializationContext jsondeserializationcontext) {
return new CriterionTriggerKilled.b(this.b, CriterionConditionEntity.a(jsonobject.get("entity")), CriterionConditionDamageSource.a(jsonobject.get("killing_blow")));
}
public void a(EntityPlayer entityplayer, Entity entity, DamageSource damagesource) {
CriterionTriggerKilled.a criteriontriggerkilled_a = (CriterionTriggerKilled.a) this.a.get(entityplayer.getAdvancementData());
if (criteriontriggerkilled_a != null) {
criteriontriggerkilled_a.a(entityplayer, entity, damagesource);
}
}
static class a {
private final AdvancementDataPlayer a;
private final Set<CriterionTrigger.a<CriterionTriggerKilled.b>> b = Sets.newHashSet();
public a(AdvancementDataPlayer advancementdataplayer) {
this.a = advancementdataplayer;
}
public boolean a() {
return this.b.isEmpty();
}
public void a(CriterionTrigger.a<CriterionTriggerKilled.b> criteriontrigger_a) {
this.b.add(criteriontrigger_a);
}
public void b(CriterionTrigger.a<CriterionTriggerKilled.b> criteriontrigger_a) {
this.b.remove(criteriontrigger_a);
}
public void a(EntityPlayer entityplayer, Entity entity, DamageSource damagesource) {
List<CriterionTrigger.a<CriterionTriggerKilled.b>> list = null;
Iterator iterator = this.b.iterator();
CriterionTrigger.a criteriontrigger_a;
while (iterator.hasNext()) {
criteriontrigger_a = (CriterionTrigger.a) iterator.next();
if (((CriterionTriggerKilled.b) criteriontrigger_a.a()).a(entityplayer, entity, damagesource)) {
if (list == null) {
list = Lists.newArrayList();
}
list.add(criteriontrigger_a);
}
}
if (list != null) {
iterator = list.iterator();
while (iterator.hasNext()) {
criteriontrigger_a = (CriterionTrigger.a) iterator.next();
criteriontrigger_a.a(this.a);
}
}
}
}
public static class b extends CriterionInstanceAbstract {
private final CriterionConditionEntity a;
private final CriterionConditionDamageSource b;
public b(MinecraftKey minecraftkey, CriterionConditionEntity criterionconditionentity, CriterionConditionDamageSource criterionconditiondamagesource) {
super(minecraftkey);
this.a = criterionconditionentity;
this.b = criterionconditiondamagesource;
}
public static CriterionTriggerKilled.b a(CriterionConditionEntity.a criterionconditionentity_a) {
return new CriterionTriggerKilled.b(CriterionTriggers.b.b, criterionconditionentity_a.b(), CriterionConditionDamageSource.a);
}
public static CriterionTriggerKilled.b c() {
return new CriterionTriggerKilled.b(CriterionTriggers.b.b, CriterionConditionEntity.a, CriterionConditionDamageSource.a);
}
public static CriterionTriggerKilled.b a(CriterionConditionEntity.a criterionconditionentity_a, CriterionConditionDamageSource.a criterionconditiondamagesource_a) {
return new CriterionTriggerKilled.b(CriterionTriggers.b.b, criterionconditionentity_a.b(), criterionconditiondamagesource_a.b());
}
public static CriterionTriggerKilled.b d() {
return new CriterionTriggerKilled.b(CriterionTriggers.c.b, CriterionConditionEntity.a, CriterionConditionDamageSource.a);
}
public boolean a(EntityPlayer entityplayer, Entity entity, DamageSource damagesource) {
return !this.b.a(entityplayer, damagesource) ? false : this.a.a(entityplayer, entity);
}
public JsonElement b() {
JsonObject jsonobject = new JsonObject();
jsonobject.add("entity", this.a.a());
jsonobject.add("killing_blow", this.b.a());
return jsonobject;
}
}
}
|
[
"i@omc.hk"
] |
i@omc.hk
|
02cf38bd4d58a5e27795f60d80ab4e2f5f8967d4
|
66581bc32744f3a30be77c7638a534f024daddb6
|
/sakai-mini/2.8.0/syllabus/syllabus-api/src/java/org/sakaiproject/api/app/syllabus/SyllabusAttachment.java
|
1ab0c44cb784e68ae7b39321a67627a7f0469f4b
|
[
"ECL-2.0"
] |
permissive
|
lijiangt/sakai
|
087be33a4f20fe199458fe6a4404f37c613f3fa2
|
2647ef7e93617e33d53b1756918e64502522636b
|
refs/heads/master
| 2021-01-10T08:44:39.756518
| 2012-03-05T14:40:08
| 2012-03-05T14:40:08
| 36,716,620
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,091
|
java
|
/**********************************************************************************
* $URL: https://source.sakaiproject.org/svn/syllabus/branches/sakai-2.8.0/syllabus-api/src/java/org/sakaiproject/api/app/syllabus/SyllabusAttachment.java $
* $Id: SyllabusAttachment.java 59687 2009-04-03 23:44:40Z arwhyte@umich.edu $
***********************************************************************************
*
* Copyright (c) 2003, 2004, 2005, 2006, 2008 The Sakai Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.osedu.org/licenses/ECL-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.sakaiproject.api.app.syllabus;
/**
* @author <a href="mailto:cwen.iupui.edu">Chen Wen</a>
* @version $Id: SyllabusAttachment.java 59687 2009-04-03 23:44:40Z arwhyte@umich.edu $
*
*/
public interface SyllabusAttachment
{
public Integer getLockId();
public void setLockId(Integer lockId);
public String getAttachmentId();
public void setAttachmentId(String attachId);
public Long getSyllabusAttachId();
public void setSyllabusAttachId(Long syllabusAttachId);
public String getName();
public void setName(String name);
public String getSize();
public String getType();
public String getCreatedBy();
public String getLastModifiedBy();
public void setSize(String size);
public void setType(String type);
public void setCreatedBy(String createdBy);
public void setLastModifiedBy(String lastMOdifiedBy);
public void setUrl(String url);
public String getUrl();
}
|
[
"lijiangt@gmail.com"
] |
lijiangt@gmail.com
|
79626dcdd4bd7556cdf1e8f7b93ad742058d61d7
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a020/A020272Test.java
|
89d325bb45985b6f62145539c07dbcb5d0c9bec9
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 255
|
java
|
package irvine.oeis.a020;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A020272Test extends AbstractSequenceTest {
@Override
protected int maxTerms() {
return 4;
}
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
f2dea3d90510724fafdfee2d6664ad5c8718a24e
|
64f6b54df29d67b13d7984037ac5f403f8b2bb77
|
/YWPT/ywpt_V1.0/src/com/xiangxun/atms/module/eventalarm/service/impl/WorkorderLogServiceImpl.java
|
6243ddf7997d8c1613ab75ff55607de823aaf2fb
|
[] |
no_license
|
Darlyyuhui/history
|
3e8f3f576180811f0aca1a7576106baaa47ff097
|
6338dc4e9514038b65f12a8f174e49d41ecb71b6
|
refs/heads/master
| 2021-01-22T21:17:43.422744
| 2017-10-10T02:52:02
| 2017-10-10T02:52:02
| 100,677,394
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 942
|
java
|
package com.xiangxun.atms.module.eventalarm.service.impl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xiangxun.atms.framework.base.AbstractBaseService;
import com.xiangxun.atms.framework.base.BaseMapper;
import com.xiangxun.atms.module.eventalarm.domain.WorkorderLog;
import com.xiangxun.atms.module.eventalarm.domain.WorkorderLogSearch;
import com.xiangxun.atms.module.eventalarm.mapper.WorkorderLogMapper;
import com.xiangxun.atms.module.eventalarm.service.WorkorderLogService;
/**
* 工单操作日志业务逻辑接口
* @author kouyunhao
*
*/
@Service("workorderLogService")
public class WorkorderLogServiceImpl extends AbstractBaseService<WorkorderLog, WorkorderLogSearch> implements WorkorderLogService {
@Resource
WorkorderLogMapper workorderLogMapper;
@Override
protected BaseMapper<WorkorderLog, WorkorderLogSearch> getBaseMapper() {
return workorderLogMapper;
}
}
|
[
"598596582@qq.com"
] |
598596582@qq.com
|
94fa5c5c6bd27de286279dedb373a15061da10ba
|
7f789aa041aaca5885ad069b0c9ac01ab1790f4c
|
/src/main/java/org/thymeleaf/processor/templateboundaries/ITemplateBoundariesStructureHandler.java
|
306782ed8ea9488f113597f494af9a930e70a1a3
|
[
"Apache-2.0"
] |
permissive
|
ptahchiev/thymeleaf
|
b7e9b35d62b355d82dda3f6a36d41682de624a06
|
9a767507feaf6a2264b06a161487b1ea1292c5e7
|
refs/heads/3.0-master
| 2021-01-22T06:32:12.719391
| 2018-04-05T22:34:43
| 2018-04-05T22:34:43
| 81,948,899
| 0
| 0
| null | 2017-02-14T13:39:49
| 2017-02-14T13:39:49
| null |
UTF-8
|
Java
| false
| false
| 5,116
|
java
|
/*
* =============================================================================
*
* Copyright (c) 2011-2018, The THYMELEAF team (http://www.thymeleaf.org)
*
* 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.thymeleaf.processor.templateboundaries;
import org.thymeleaf.inline.IInliner;
import org.thymeleaf.model.IModel;
/**
* <p>
* Structure handler class meant to be used by {@link ITemplateBoundariesProcessor} implementations.
* </p>
* <p>
* Structure handlers allow processors to instruct the engine to perform a series of actions that cannot
* be done directly from the processors themselves, usually because these actions are applied or have effects
* on scopes broader than the processed events themselves.
* </p>
*
* @author Daniel Fernández
* @see ITemplateBoundariesProcessor
* @since 3.0.0
*
*/
public interface ITemplateBoundariesStructureHandler {
/**
* <p>
* Resets all actions specified so far for the current processor execution.
* </p>
*/
public void reset();
/**
* <p>
* Instructs the engine to set a new local variable.
* </p>
*
* @param name the name of the variable.
* @param value the value of the variable.
*/
public void setLocalVariable(final String name, final Object value);
/**
* <p>
* Instructs the engine to remove a local variable.
* </p>
*
* @param name the name of the variable.
*/
public void removeLocalVariable(final String name);
/**
* <p>
* Instructs the engine to set a new selection target.
* </p>
* <p>
* The <em>selection target</em> is the object on which selection expressions <tt>(*{...})</tt> are executed.
* In the Standard Dialect, this selection target is usually modified by means of the <tt>th:object</tt>
* attribute, but custom processors can do it too. Note the selection target has the same scope as a local
* variable, and will therefore be accessible only inside the body of the element being processed.
* </p>
* <p>
* See {@link org.thymeleaf.context.ITemplateContext#getSelectionTarget()}
* </p>
*
* @param selectionTarget the selection target to be set.
*/
public void setSelectionTarget(final Object selectionTarget);
/**
* <p>
* Instructs the engine to set a new inliner.
* </p>
* <p>
* Inliners are used for processing all text nodes ({@link org.thymeleaf.model.IText} events) appearing
* in the body of the element being processed. This is the mechanism used by the th:inline attribute to
* enable inlining in any of the specified modes (text, javascript, etc).
* </p>
* <p>
* See {@link org.thymeleaf.context.ITemplateContext#getInliner()}
* </p>
*
* @param inliner the inliner.
*/
public void setInliner(final IInliner inliner);
/**
* <p>
* Instructs the engine to insert the specified text.
* </p>
* <p>
* If the processed event is a {@link org.thymeleaf.model.ITemplateStart} event, then the text will
* be inserted at the beginning of the template (just after the <em>template start</em> event). On the other
* hand, if the processed event is a {@link org.thymeleaf.model.ITemplateEnd} event, then the text
* will be inserted at the end of the template (just before the <em>template end</em> event).
* </p>
*
* @param text the text to be inserted.
* @param processable whether the inserted text should be considered <em>processable</em> or not.
*/
public void insert(final String text, final boolean processable);
/**
* <p>
* Instructs the engine to insert the specified model.
* </p>
* <p>
* If the processed event is a {@link org.thymeleaf.model.ITemplateStart} event, then the model will
* be inserted at the beginning of the template (just after the <em>template start</em> event). On the other
* hand, if the processed event is a {@link org.thymeleaf.model.ITemplateEnd} event, then the model
* will be inserted at the end of the template (just before the <em>template end</em> event).
* </p>
*
* @param model the model to be inserted.
* @param processable whether the inserted text should be considered <em>processable</em> or not.
*/
public void insert(final IModel model, final boolean processable);
}
|
[
"daniel.fernandez@11thlabs.org"
] |
daniel.fernandez@11thlabs.org
|
ab48deac948770d6121b03af6c30a1e10fa21781
|
e94283089810516f048bd58590036c88588112cb
|
/src/S0905SortArrayByParity.java
|
45dff4b0928c3755ee47d9162f11d47640b43db1
|
[] |
no_license
|
camelcc/leetcode
|
e0839e6267ebda5eef57da065d4adaefecb4b557
|
d982b9e71bc475a599df45d66cf2b78cf017594d
|
refs/heads/master
| 2022-07-19T06:24:49.148849
| 2022-07-10T07:00:34
| 2022-07-10T07:00:34
| 135,386,923
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 531
|
java
|
public class S0905SortArrayByParity {
public int[] sortArrayByParity(int[] A) {
int lo = 0, hi = A.length-1;
while (lo < hi) {
while (lo < A.length && A[lo]%2 == 0) {
lo++;
}
while (hi >= 0 && A[hi]%2 == 1) {
hi--;
}
if (lo >= hi) {
break;
}
int t = A[lo];
A[lo] = A[hi];
A[hi] = t;
lo++;
hi--;
}
return A;
}
}
|
[
"camel.young@gmail.com"
] |
camel.young@gmail.com
|
db2cd030b4d00285f81ae9b400b0e0b6888e51da
|
78bedcafc21810f25b869829224a02ac46d91ce4
|
/apm-collector/apm-collector-agentjvm/src/main/java/org/skywalking/apm/collector/agentjvm/worker/cpu/dao/CpuMetricEsDAO.java
|
03b42d7103a110c5552c16c60d78c659a32c1070
|
[
"Apache-2.0"
] |
permissive
|
wu560130911/skywalking
|
7392df95498de83e3ac076e9e9533fbf9d201699
|
a5b5440274231a39b6a3831087402d20ef5274d5
|
refs/heads/master
| 2021-07-20T22:39:49.048948
| 2017-10-26T07:46:20
| 2017-10-26T07:46:20
| 108,503,274
| 0
| 1
| null | 2017-10-27T05:32:10
| 2017-10-27T05:32:09
| null |
UTF-8
|
Java
| false
| false
| 2,332
|
java
|
/*
* Copyright 2017, OpenSkywalking Organization 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.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.agentjvm.worker.cpu.dao;
import java.util.HashMap;
import java.util.Map;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.update.UpdateRequestBuilder;
import org.skywalking.apm.collector.core.stream.Data;
import org.skywalking.apm.collector.storage.define.DataDefine;
import org.skywalking.apm.collector.storage.define.jvm.CpuMetricTable;
import org.skywalking.apm.collector.storage.elasticsearch.dao.EsDAO;
import org.skywalking.apm.collector.stream.worker.impl.dao.IPersistenceDAO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author peng-yongsheng
*/
public class CpuMetricEsDAO extends EsDAO implements ICpuMetricDAO, IPersistenceDAO<IndexRequestBuilder, UpdateRequestBuilder> {
private final Logger logger = LoggerFactory.getLogger(CpuMetricEsDAO.class);
@Override public Data get(String id, DataDefine dataDefine) {
return null;
}
@Override public IndexRequestBuilder prepareBatchInsert(Data data) {
Map<String, Object> source = new HashMap<>();
source.put(CpuMetricTable.COLUMN_INSTANCE_ID, data.getDataInteger(0));
source.put(CpuMetricTable.COLUMN_USAGE_PERCENT, data.getDataDouble(0));
source.put(CpuMetricTable.COLUMN_TIME_BUCKET, data.getDataLong(0));
logger.debug("prepare cpu metric batch insert, id: {}", data.getDataString(0));
return getClient().prepareIndex(CpuMetricTable.TABLE, data.getDataString(0)).setSource(source);
}
@Override public UpdateRequestBuilder prepareBatchUpdate(Data data) {
return null;
}
}
|
[
"8082209@qq.com"
] |
8082209@qq.com
|
04eeb1d2f5db5a4f86538e4a6d418d3bae3a8ae9
|
9e20645e45cc51e94c345108b7b8a2dd5d33193e
|
/L2J_Mobius_02.5_Underground/dist/game/data/scripts/quests/Q00015_SweetWhispers/Q00015_SweetWhispers.java
|
69152d93c9a393036ed5f5dbb8db56e0d1e7e4e4
|
[] |
no_license
|
Enryu99/L2jMobius-01-11
|
2da23f1c04dcf6e88b770f6dcbd25a80d9162461
|
4683916852a03573b2fe590842f6cac4cc8177b8
|
refs/heads/master
| 2023-09-01T22:09:52.702058
| 2021-11-02T17:37:29
| 2021-11-02T17:37:29
| 423,405,362
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,274
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00015_SweetWhispers;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
/**
* Sweet Whispers (15)
* @author nonom
*/
public class Q00015_SweetWhispers extends Quest
{
// NPCs
private static final int VLADIMIR = 31302;
private static final int HIERARCH = 31517;
private static final int M_NECROMANCER = 31518;
// Misc
private static final int MIN_LEVEL = 60;
public Q00015_SweetWhispers()
{
super(15);
addStartNpc(VLADIMIR);
addTalkId(VLADIMIR, HIERARCH, M_NECROMANCER);
addCondMinLevel(MIN_LEVEL, "31302-00a.html");
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return htmltext;
}
switch (event)
{
case "31302-01.html":
{
qs.startQuest();
break;
}
case "31518-01.html":
{
if (qs.isCond(1))
{
qs.setCond(2);
}
break;
}
case "31517-01.html":
{
if (qs.isCond(2))
{
addExpAndSp(player, 714215, 171);
qs.exitQuest(false, true);
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
final int npcId = npc.getId();
switch (qs.getState())
{
case State.CREATED:
{
if (npcId == VLADIMIR)
{
htmltext = "31302-00.htm";
}
break;
}
case State.STARTED:
{
switch (npcId)
{
case VLADIMIR:
{
if (qs.isCond(1))
{
htmltext = "31302-01a.html";
}
break;
}
case M_NECROMANCER:
{
switch (qs.getCond())
{
case 1:
{
htmltext = "31518-00.html";
break;
}
case 2:
{
htmltext = "31518-01a.html";
break;
}
}
break;
}
case HIERARCH:
{
if (qs.isCond(2))
{
htmltext = "31517-00.html";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}
|
[
"MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b"
] |
MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b
|
ee1f772d6c693c828874beac25533435f369b5a3
|
2d4e4709fd9eb663c0e693451b27ad73a0ba3a26
|
/consumer.service.layer/src/main/java/com/iqb/consumer/service/layer/product/service/impl/ProductService.java
|
ae3022549833c1818be39ea1acd5e246cc50abbf
|
[] |
no_license
|
hapylong/consumer.platform
|
0e7c21587e938d5e5a327af4fb1434183c6ac0c8
|
0005bdd447f325396cd48ce0b2b1547f45fec35a
|
refs/heads/master
| 2020-04-11T04:04:13.826338
| 2018-12-19T10:00:42
| 2018-12-19T10:00:42
| 161,500,288
| 4
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,308
|
java
|
package com.iqb.consumer.service.layer.product.service.impl;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.iqb.consumer.data.layer.bean.merchant.PayConfBean;
import com.iqb.consumer.data.layer.bean.plan.PlanBean;
import com.iqb.consumer.data.layer.biz.ProductBiz;
import com.iqb.consumer.service.layer.base.BaseService;
import com.iqb.consumer.service.layer.product.service.IProductService;
import com.iqb.etep.common.exception.IqbException;
import com.iqb.etep.common.exception.IqbSqlException;
@Service
public class ProductService extends BaseService implements IProductService {
@Autowired
ProductBiz productBiz;
/**
* 新增计划
*
* @param id
*/
@Override
public int insertPlan(JSONObject objs) throws IqbException, IqbSqlException {
return productBiz.insertPlan(objs);
}
/**
* 修改计划
*
* @param planBean
* @return
*/
@Override
public int updatePlan(JSONObject objs) throws IqbException, IqbSqlException {
return productBiz.updatePlan(objs);
}
/**
* 根据ID删除计划
*
* @param id
*/
@Override
public void deletePlanByID(JSONObject objs) throws IqbException, IqbSqlException {
productBiz.deletePlan(objs);
}
/**
* 根据计划号查询计划
*
* @param id
* @return
*/
@Override
public PlanBean getPlanByID(JSONObject objs) throws IqbException, IqbSqlException {
return productBiz.getPlanByID(objs);
}
/**
* 根据商户号查询分期计划
*
* @param merchantNo
* @return
*/
@Override
public PageInfo<PlanBean> getPlanByMerNo(JSONObject objs) throws IqbException, IqbSqlException {
return new PageInfo<PlanBean>(productBiz.getPlanByMerNos(objs, true));
}
/**
* 根据商户号列表查询分期计划
*
* @param objs
* @return
*/
@Override
public PageInfo<PlanBean> getPlanByMerNos(JSONObject objs) throws IqbException, IqbSqlException {
// 获取商户权限的Objs
objs = getMerchLimitObject(objs);
if (objs == null) {
return null;
}
List<PlanBean> list = productBiz.getPlanByMerNos(objs, true);
PageInfo<PlanBean> p = new PageInfo<PlanBean>(list);
return p;
}
private static final List<String> STATUS = new ArrayList<String>();
static {
STATUS.add("1");
STATUS.add("2");
}
@Override
public int updateStatus(JSONObject objs, String status) {
List<String> ids = (List<String>) objs.get("id");
if (ids == null || ids.size() == 0 || !STATUS.contains(status)) {
return -1;
}
return productBiz.updateStatus(ids, status);
}
/**
* Description:不同商户配置不同的支付主体,insert操作 2018年1月18日 10:34:23 chengzhen
*/
public int addPayConf(JSONObject objs) throws IqbException, IqbSqlException {
int result = 0;
if (productBiz.getPayConfByMno2(objs) != null) {
return result;
}
return productBiz.addPayConf(objs);
}
/**
* Description:不同商户配置不同的支付主体,del操作 2018年1月18日 11:14:42 chengzhen
*/
public void delPayConf(JSONObject objs) {
productBiz.delPayConf(objs);
}
/**
* Description:不同商户配置不同的支付主体,update操作 2018年1月18日 11:14:42 chengzhen
*/
public void updatePayConf(JSONObject objs) {
productBiz.updatePayConf(objs);
}
/**
* Description:不同商户配置不同的支付主体,单操作 2018年1月18日 11:32:33 chengzhen
*/
public PayConfBean getPayConfByMno(JSONObject objs) {
return productBiz.getPayConfByMno(objs);
}
/**
* Description:不同商户配置不同的支付主体,列表操作 2018年1月18日 11:38:22 chengzhen
*/
public PageInfo<PayConfBean> queryPayConfList(JSONObject objs) {
return new PageInfo<>(productBiz.queryPayConfList(objs));
}
}
|
[
"52418304@qq.com"
] |
52418304@qq.com
|
b22a7f5693382d8014fdaca28231e67f933c9f1e
|
f9abeb8599279abc91ab473ea9fb9ed8c5d5ff4e
|
/src/com/tankers/smile/models/Item.java
|
a8cf027045086b476eb4e0461701c203eec2ab3f
|
[] |
no_license
|
jaydi/Flag-android
|
a73d6cd230fb4b4711e7de98e3240ec1ab2c860f
|
2b083b22ede82c9427b975eb5c5f0cfb0858587f
|
refs/heads/master
| 2016-09-05T18:11:03.767553
| 2015-07-21T19:51:54
| 2015-07-21T19:51:54
| 39,466,042
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,226
|
java
|
package com.tankers.smile.models;
import com.google.api.client.util.Key;
public class Item extends BaseModel {
public static final String EXTRA_ITEM_ID = "com.tankers.smile.models.item.id";
@Key
private long id;
@Key
private long shopId;
@Key
private String name;
@Key
private String thumbnailUrl;
@Key
private String description;
@Key
private int sale;
@Key
private String oldPrice;
@Key
private String price;
@Key
private String barcodeId;
@Key
private int reward;
@Key
private boolean rewardable;
@Key
private boolean rewarded;
@Key
private int likes;
@Key
private boolean liked;
public Item() {
super();
}
public Item(ItemParcelable parcel) {
super();
this.id = parcel.getId();
this.shopId = parcel.getShopId();
this.name = parcel.getName();
this.thumbnailUrl = parcel.getThumbnailUrl();
this.description = parcel.getDescription();
this.sale = parcel.getSale();
this.oldPrice = parcel.getOldPrice();
this.price = parcel.getPrice();
this.barcodeId = parcel.getBarcodeId();
this.reward = parcel.getReward();
this.rewarded = parcel.isRewarded();
this.likes = parcel.getLikes();
this.liked = parcel.isLiked();
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public long getShopId() {
return shopId;
}
public void setShopId(long shopId) {
this.shopId = shopId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getThumbnailUrl() {
return thumbnailUrl;
}
public void setThumbnailUrl(String thumbnailUrl) {
this.thumbnailUrl = thumbnailUrl;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getSale() {
return sale;
}
public void setSale(int sale) {
this.sale = sale;
}
public String getOldPrice() {
return oldPrice;
}
public void setOldPrice(String oldPrice) {
this.oldPrice = oldPrice;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getBarcodeId() {
return barcodeId;
}
public void setBarcodeId(String barcodeId) {
this.barcodeId = barcodeId;
}
public int getReward() {
return reward;
}
public void setReward(int reward) {
this.reward = reward;
}
public boolean isRewardable() {
return rewardable;
}
public void setRewardable(boolean rewardable) {
this.rewardable = rewardable;
}
public boolean isRewarded() {
return rewarded;
}
public void setRewarded(boolean rewarded) {
this.rewarded = rewarded;
}
public int getLikes() {
return likes;
}
public void setLikes(int likes) {
this.likes = likes;
}
public boolean isLiked() {
return liked;
}
public void setLiked(boolean liked) {
this.liked = liked;
}
public ItemParcelable toParcelable() {
return new ItemParcelable(this);
}
@Override
public boolean equals(Object obj) {
try {
Item o = (Item) obj;
if (id == o.getId())
return true;
else
return false;
} catch (ClassCastException e) {
return false;
}
}
public boolean isDummy() {
return id == 0;
}
}
|
[
"jaydi727@gmail.com"
] |
jaydi727@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.