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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c9938dd143d9eefc4c197c4fe5ab2acc20a09b06 | 6af35a63dc96f39ca28a712ef7a8195e6ba5760c | /src/main/java/refinedstorage/tile/TileCrafter.java | 869a5286e097a683aaa9b870d077f6c7e1bb35fb | [
"MIT"
] | permissive | geldorn/refinedstorage | 6230e0c6113aa3557a89c427c697b647fa8d205a | 5480640c4974cb63121bb32d358387225eb20659 | refs/heads/mc1.10 | 2020-05-30T07:12:48.964495 | 2016-10-17T16:57:58 | 2016-10-17T16:57:58 | 70,190,075 | 0 | 0 | null | 2016-10-06T20:23:34 | 2016-10-06T20:23:33 | null | UTF-8 | Java | false | false | 6,308 | java | package refinedstorage.tile;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.datasync.DataSerializers;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
import refinedstorage.RS;
import refinedstorage.RSUtils;
import refinedstorage.api.autocrafting.ICraftingPattern;
import refinedstorage.api.autocrafting.ICraftingPatternContainer;
import refinedstorage.api.autocrafting.ICraftingPatternProvider;
import refinedstorage.api.network.INetworkMaster;
import refinedstorage.api.util.IComparer;
import refinedstorage.inventory.ItemHandlerBasic;
import refinedstorage.inventory.ItemHandlerUpgrade;
import refinedstorage.item.ItemUpgrade;
import refinedstorage.tile.data.ITileDataConsumer;
import refinedstorage.tile.data.ITileDataProducer;
import refinedstorage.tile.data.TileDataParameter;
import java.util.ArrayList;
import java.util.List;
public class TileCrafter extends TileNode implements ICraftingPatternContainer {
public static final TileDataParameter<Boolean> TRIGGERED_AUTOCRAFTING = new TileDataParameter<>(DataSerializers.BOOLEAN, false, new ITileDataProducer<Boolean, TileCrafter>() {
@Override
public Boolean getValue(TileCrafter tile) {
return tile.triggeredAutocrafting;
}
}, new ITileDataConsumer<Boolean, TileCrafter>() {
@Override
public void setValue(TileCrafter tile, Boolean value) {
tile.triggeredAutocrafting = value;
tile.markDirty();
}
});
private static final String NBT_TRIGGERED_AUTOCRAFTING = "TriggeredAutocrafting";
private ItemHandlerBasic patterns = new ItemHandlerBasic(9, this, stack -> stack.getItem() instanceof ICraftingPatternProvider) {
@Override
protected void onContentsChanged(int slot) {
super.onContentsChanged(slot);
if (worldObj != null && !worldObj.isRemote) {
rebuildPatterns();
}
if (network != null) {
network.rebuildPatterns();
}
}
};
private List<ICraftingPattern> actualPatterns = new ArrayList<>();
private ItemHandlerUpgrade upgrades = new ItemHandlerUpgrade(4, this, ItemUpgrade.TYPE_SPEED);
private boolean triggeredAutocrafting = false;
public TileCrafter() {
dataManager.addWatchedParameter(TRIGGERED_AUTOCRAFTING);
}
private void rebuildPatterns() {
actualPatterns.clear();
for (int i = 0; i < patterns.getSlots(); ++i) {
ItemStack patternStack = patterns.getStackInSlot(i);
if (patternStack != null) {
ICraftingPattern pattern = ((ICraftingPatternProvider) patternStack.getItem()).create(worldObj, patternStack, this);
if (pattern.isValid()) {
actualPatterns.add(pattern);
}
}
}
}
@Override
public int getEnergyUsage() {
int usage = RS.INSTANCE.config.crafterUsage + upgrades.getEnergyUsage();
for (int i = 0; i < patterns.getSlots(); ++i) {
if (patterns.getStackInSlot(i) != null) {
usage += RS.INSTANCE.config.crafterPerPatternUsage;
}
}
return usage;
}
@Override
public void update() {
if (!worldObj.isRemote && ticks == 0) {
rebuildPatterns();
}
super.update();
}
@Override
public void updateNode() {
if (triggeredAutocrafting && worldObj.isBlockPowered(pos)) {
for (ICraftingPattern pattern : actualPatterns) {
for (ItemStack output : pattern.getOutputs()) {
network.scheduleCraftingTaskIfUnscheduled(output, 1, IComparer.COMPARE_DAMAGE | IComparer.COMPARE_NBT);
}
}
}
}
@Override
public void onConnectionChange(INetworkMaster network, boolean state) {
if (!state) {
network.getCraftingTasks().stream()
.filter(task -> task.getPattern().getContainer().getPosition().equals(pos))
.forEach(network::cancelCraftingTask);
}
network.rebuildPatterns();
}
@Override
public void read(NBTTagCompound tag) {
super.read(tag);
if (tag.hasKey(NBT_TRIGGERED_AUTOCRAFTING)) {
triggeredAutocrafting = tag.getBoolean(NBT_TRIGGERED_AUTOCRAFTING);
}
RSUtils.readItems(patterns, 0, tag);
RSUtils.readItems(upgrades, 1, tag);
}
@Override
public NBTTagCompound write(NBTTagCompound tag) {
super.write(tag);
tag.setBoolean(NBT_TRIGGERED_AUTOCRAFTING, triggeredAutocrafting);
RSUtils.writeItems(patterns, 0, tag);
RSUtils.writeItems(upgrades, 1, tag);
return tag;
}
@Override
public int getSpeed() {
return 20 - (upgrades.getUpgradeCount(ItemUpgrade.TYPE_SPEED) * 4);
}
@Override
public IItemHandler getFacingInventory() {
return RSUtils.getItemHandler(getFacingTile(), getDirection().getOpposite());
}
@Override
public List<ICraftingPattern> getPatterns() {
return actualPatterns;
}
public IItemHandler getPatternItems() {
return patterns;
}
public IItemHandler getUpgrades() {
return upgrades;
}
@Override
public IItemHandler getDrops() {
return new CombinedInvWrapper(patterns, upgrades);
}
@Override
public boolean hasConnectivityState() {
return true;
}
@Override
public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY && facing != getDirection()) {
return (T) patterns;
}
return super.getCapability(capability, facing);
}
@Override
public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
return (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY && facing != getDirection()) || super.hasCapability(capability, facing);
}
}
| [
"raoulvdberge@gmail.com"
] | raoulvdberge@gmail.com |
796c582666ec95b23e22281fd67b3b7f5c7896bb | 26eeba349653d640edb397f3835a00ed2cfbcc7e | /learn-shop-base/learn-shop-base-email/src/main/java/com/billow/email/service/MailService.java | 358508a47584cd9d46bcd8f3533c738920cde694 | [
"Apache-2.0"
] | permissive | Xiao-Y/learn | c99e94ea14c2f4acadc635c0e777986e1f603f09 | cdf94d1abad71ccf33686b442e4e6d0e55ec872a | refs/heads/master | 2023-03-06T09:08:58.262630 | 2022-08-11T09:53:25 | 2022-08-11T09:53:25 | 119,014,400 | 51 | 32 | Apache-2.0 | 2023-03-01T22:31:32 | 2018-01-26T06:24:18 | Java | UTF-8 | Java | false | false | 1,660 | java | package com.billow.email.service;
import com.billow.email.pojo.vo.MailServiceVo;
import java.util.Map;
/**
* 邮件服务类
*
* @author LiuYongTao
* @date 2019/8/20 19:31
*/
public interface MailService {
/**
* 发送模板邮件
*
* @param toEmails 接收人
* @param subject 主题
* @param id 邮件id
* @param parameter 邮件参数
*/
void sendTemplateMail(String toEmails, String subject, Long id, Map<String, Object> parameter) throws Exception;
/**
* 发送模板邮件
*
* @param toEmails 接收人
* @param subject 主题
* @param mailCode 邮件code
* @param parameter 邮件参数
*/
void sendTemplateMail(String toEmails, String subject, String mailCode, Map<String, Object> parameter) throws Exception;
/**
* 发送简单邮件
*
* @param toEmails 接收人
* @param subject 主题
* @param content 内容
* @return void
* @author LiuYongTao
* @date 2019/8/20 19:31
*/
void sendSimpleMail(String toEmails, String subject, String content) throws Exception;
/**
* 发送HTML邮件
*
* @param toEmails 接收人
* @param subject 主题
* @param content 内容
* @return void
* @author LiuYongTao
* @date 2019/8/20 19:32
*/
void sendHtmlMail(String toEmails, String subject, String content) throws Exception;
/**
* 发送邮件
*
* @param mailServiceVo
* @return void
* @author LiuYongTao
* @date 2020/1/9 14:30
*/
void sendMail(MailServiceVo mailServiceVo) throws Exception;
} | [
"lyongtao123@126.com"
] | lyongtao123@126.com |
7a7103475a2daa598518d3af81a96a285c744675 | 139960e2d7d55e71c15e6a63acb6609e142a2ace | /mobile_app1/module964/src/main/java/module964packageJava0/Foo181.java | 1ee34a8e3dab32d050b0f02b54572c95b313f50c | [
"Apache-2.0"
] | permissive | uber-common/android-build-eval | 448bfe141b6911ad8a99268378c75217d431766f | 7723bfd0b9b1056892cef1fef02314b435b086f2 | refs/heads/master | 2023-02-18T22:25:15.121902 | 2023-02-06T19:35:34 | 2023-02-06T19:35:34 | 294,831,672 | 83 | 7 | Apache-2.0 | 2021-09-24T08:55:30 | 2020-09-11T23:27:37 | Java | UTF-8 | Java | false | false | 334 | java | package module964packageJava0;
import java.lang.Integer;
public class Foo181 {
Integer int0;
public void foo0() {
new module964packageJava0.Foo180().foo4();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
}
| [
"oliviern@uber.com"
] | oliviern@uber.com |
564c6fc155187aa9f9bd9e16f7a71ed81cf26f8e | aabd1a360f11276059bc7bde7435bfa89ba15f34 | /manage_cms/src/main/java/com/yizhishang/plat/domain/Catalog.java | 804c3a1395bd6a7b711f0bccb259d6c0b10c475f | [] | no_license | yizhishang/jhcztech | ff941d8f8062f73b8add1601ac95d3bae51689a3 | a3cb8fd95f835b81909f6994380acfacf38cff44 | refs/heads/master | 2023-04-07T10:36:41.389527 | 2023-03-18T16:53:11 | 2023-03-18T16:53:11 | 54,635,934 | 0 | 1 | null | 2023-03-18T16:53:12 | 2016-03-24T11:09:21 | Java | UTF-8 | Java | false | false | 7,065 | java | package com.yizhishang.plat.domain;
import com.yizhishang.base.domain.DynaModel;
import java.io.Serializable;
import java.util.List;
/**
* 描述:
* 版权: Copyright (c) 2015
* 公司: 285206405@qq.com
* 作者: 袁永君
* 版本: 1.0
* 创建日期: 2015-11-17
* 创建时间: 16:45:31
*/
public class Catalog extends DynaModel implements Serializable
{
private static final long serialVersionUID = 4365773128538542564L;
public int getId()
{
return getInt("catalog_id");
}
public void setId(int id)
{
set("catalog_id", id);
}
public int getParentId()
{
return getInt("parent_id");
}
public void setParentId(int parentId)
{
set("parent_id", parentId);
}
public String getName()
{
return getString("name");
}
public void setName(String name)
{
set("name", name);
}
public String getCatalogNo()
{
return getString("catalog_no");
}
public void setCatalogNo(String catalogNo)
{
set("catalog_no", catalogNo);
}
public String getSiteNo()
{
return getString("siteno");
}
public void setSiteNo(String siteNo)
{
set("siteno", siteNo);
}
public String getDescription()
{
return getString("description");
}
public void setDescription(String description)
{
set("description", description);
}
public int getOrderLine()
{
return getInt("orderline");
}
public void setOrderLine(int orderLine)
{
set("orderline", orderLine);
}
public int getLayer()
{
return getInt("layer");
}
public void setLayer(int layer)
{
set("layer", layer);
}
public String getRoute()
{
return getString("route");
}
public void setRoute(String route)
{
set("route", route);
}
public int getState()
{
return getInt("state");
}
public void setState(int state)
{
set("state", state);
}
public int getNeedPublish()
{
return getInt("need_publish");
}
public void setNeedPublish(int needPublish)
{
set("need_publish", needPublish);
}
public int getNeedApprove()
{
return getInt("need_approve");
}
public void setNeedApprove(int needApprove)
{
set("need_approve", needApprove);
}
public int getInheritMode()
{
return getInt("inherit_mode");
}
public void setInheritMode(int inheritMode)
{
set("inherit_mode", inheritMode);
}
public int getInheritField()
{
return getInt("inherit_field");
}
public void setInheritField(int inheritField)
{
set("inherit_field", inheritField);
}
public int getIsRoot()
{
return getInt("is_root");
}
public void setIsRoot(int isRoot)
{
set("is_root", isRoot);
}
public int getIsSystem()
{
return getInt("is_system");
}
public void setIsSystem(int isSystem)
{
set("is_system", isSystem);
}
public int getPageType()
{
return getInt("page_type");
}
public void setPageType(int pageType)
{
set("page_type", pageType);
}
public String getLinkUrl()
{
return getString("link_url");
}
public void setLinkUrl(String linkUrl)
{
set("link_url", linkUrl);
}
public String getPublishPath()
{
return getString("publish_path");
}
public void setPublishPath(String publishPath)
{
set("publish_path", publishPath);
}
public String getFileType()
{
return getString("file_type");
}
public void setFileType(String fileType)
{
set("file_type", fileType);
}
public String getCreateBy()
{
return getString("create_by");
}
public void setCreateBy(String createBy)
{
set("create_by", createBy);
}
public String getCreateDate()
{
return getString("create_date");
}
public void setCreateDate(String createDate)
{
set("create_date", createDate);
}
public String getModifiedBy()
{
return getString("modified_by");
}
public void setModifiedBy(String modifiedBy)
{
set("modified_by", modifiedBy);
}
public String getModifiedDate()
{
return getString("modified_date");
}
public void setModifiedDate(String modifiedDate)
{
set("modified_date", modifiedDate);
}
public String getSmallImage()
{
return getString("small_image");
}
public void setSmallImage(String smallImage)
{
set("small_image", smallImage);
}
public String getLargeImage()
{
return getString("large_image");
}
public void setLargeImage(String largeImage)
{
set("large_image", largeImage);
}
public int getType()
{
return getInt("type");
}
public void setType(int type)
{
set("type", type);
}
public int getUserRight()
{
return getInt("user_right");
}
public void setUserRight(int userRight)
{
set("user_right", userRight);
}
//栏目星级
public int getColumnLevel()
{
return getInt("column_level");
}
public void setColumnLevel(int columnLevel)
{
set("column_level", columnLevel);
}
public int getChildrennum()
{
return getInt("childrennum");
}
public void setChildrennum(int childrennum)
{
set("childrennum", childrennum);
}
public int getAttribute()
{
return getInt("attribute");
}
public void setAttribute(int attribute)
{
set("attribute", attribute);
}
public int getSourceId()
{
return getInt("source_id");
}
public void setSourceId(int sourceId)
{
set("source_id", sourceId);
}
public String getExtField1()
{
return getString("ext_field1");
}
public void setExtField1(String ext_field1)
{
set("ext_field1", ext_field1);
}
public String getExtField2()
{
return getString("ext_field2");
}
public void setExtField2(String ext_field2)
{
set("ext_field2", ext_field2);
}
@SuppressWarnings("unchecked")
public List<DynaModel> getDataList()
{
return ((List<DynaModel>) getObject("dataList"));
}
public void setDataList(List<DynaModel> dataList)
{
set("dataList", dataList);
}
}
| [
"285206405@qq.com"
] | 285206405@qq.com |
5b2531895cc9a974569dd7fdb2344a8056f2b44d | 6199aa073b3cd2a7680f27e16a924b2ee8afc3a8 | /src/main/java/com/robertx22/mmo_skills/skill_rewards/base/BaseMoreBlockDrops.java | 5a61e1382006070d24b3187e9fdce97b3a7f7196 | [] | no_license | RobertSkalko/MMO-Skills | d32fb5af0beee5fe79630c21726c669efb782a09 | b0dee04122fdfe0c7e8eee520d36e2e3b9490204 | refs/heads/master | 2022-12-05T03:23:33.327145 | 2020-08-19T19:26:51 | 2020-08-19T19:26:51 | 288,779,094 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,230 | java | package com.robertx22.mmo_skills.skill_rewards.base;
import com.robertx22.mmo_skills.config.SkillRewardConfig;
import com.robertx22.mmo_skills.mixin_methods.LootContextDummy;
import com.robertx22.mmo_skills.mixin_methods.LootType;
import com.robertx22.mmo_skills.storage.PlayerSkills;
import com.robertx22.mmo_skills.storage.PlayerSkillsComponent;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.loot.LootTable;
import net.minecraft.loot.context.LootContext;
import net.minecraft.loot.context.LootContextParameters;
import org.apache.commons.lang3.RandomUtils;
import java.util.List;
public abstract class BaseMoreBlockDrops extends SkillReward {
public abstract void modifyStack(PlayerSkillsComponent comp, ItemStack stack);
@Override
public void onLootTableGenItems(PlayerSkillsComponent comp, PlayerSkills skill, SkillRewardConfig config, LootTable table, LootContext context, List<ItemStack> list) {
if (!config.isUnlocked(skill, comp)) {
return;
}
LootContextDummy dummy = (LootContextDummy) context;
if (dummy.MMOSKILLSgetLootType() != LootType.ORE_CROP) {
return;
}
if (context.hasParameter(LootContextParameters.BLOCK_STATE)) {
BlockState state = context.get(LootContextParameters.BLOCK_STATE);
Block block = state.getBlock();
if (list.stream()
.anyMatch(x -> x.getItem() != block
.asItem())) {
if (skill.getConfig().validBlocksConfig
.isValidForSkill(block)) {
if (config.rewardsExp) {
comp.addExp(skill, skill.getConfig().validBlocksConfig
.getExp(block));
}
float chance = config.getValue(skill, comp);
if (chance >= RandomUtils.nextInt(0, 101)) {
comp.player.sendMessage(getChatMessage(), false);
list.stream()
.forEach(x -> modifyStack(comp, x));
}
}
}
}
}
}
| [
"treborx555@gmail.com"
] | treborx555@gmail.com |
ea15ff4f3e0ce9ad36250294ae65589a053acd79 | 6baa09045c69b0231c35c22b06cdf69a8ce227d6 | /modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201602/PlacementServiceInterfaceperformPlacementActionResponse.java | 6d7496227df2b41bd7ec656d46dc91e8dc6edb93 | [
"Apache-2.0"
] | permissive | remotejob/googleads-java-lib | f603b47117522104f7df2a72d2c96ae8c1ea011d | a330df0799de8d8de0dcdddf4c317d6b0cd2fe10 | refs/heads/master | 2020-12-11T01:36:29.506854 | 2016-07-28T22:13:24 | 2016-07-28T22:13:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,614 | java |
package com.google.api.ads.dfp.jaxws.v201602;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for performPlacementActionResponse element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="performPlacementActionResponse">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="rval" type="{https://www.google.com/apis/ads/publisher/v201602}UpdateResult" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"rval"
})
@XmlRootElement(name = "performPlacementActionResponse")
public class PlacementServiceInterfaceperformPlacementActionResponse {
protected UpdateResult rval;
/**
* Gets the value of the rval property.
*
* @return
* possible object is
* {@link UpdateResult }
*
*/
public UpdateResult getRval() {
return rval;
}
/**
* Sets the value of the rval property.
*
* @param value
* allowed object is
* {@link UpdateResult }
*
*/
public void setRval(UpdateResult value) {
this.rval = value;
}
}
| [
"api.cseeley@gmail.com"
] | api.cseeley@gmail.com |
bae947dfbb0dc4d18dfa14558213f7e328964c2b | 5ca3901b424539c2cf0d3dda52d8d7ba2ed91773 | /src_cfr/com/google/common/hash/Hashing$Sha512Holder.java | a363854c169d2487c7edcb67516753b54da092be | [] | no_license | fjh658/bindiff | c98c9c24b0d904be852182ecbf4f81926ce67fb4 | 2a31859b4638404cdc915d7ed6be19937d762743 | refs/heads/master | 2021-01-20T06:43:12.134977 | 2016-06-29T17:09:03 | 2016-06-29T17:09:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 350 | java | /*
* Decompiled with CFR 0_115.
*/
package com.google.common.hash;
import com.google.common.hash.HashFunction;
import com.google.common.hash.MessageDigestHashFunction;
class Hashing$Sha512Holder {
static final HashFunction SHA_512 = new MessageDigestHashFunction("SHA-512", "Hashing.sha512()");
private Hashing$Sha512Holder() {
}
}
| [
"manouchehri@riseup.net"
] | manouchehri@riseup.net |
46123d7cf8782f215c63f99b6f9f7e4bafb9f386 | e4ef8f38104c080892e482a99cee7f2fdb08a7c4 | /orange-demo-activiti/orange-demo-activiti-service/common/common-flow-online/src/main/java/com/orangeforms/common/flow/online/service/FlowOnlineOperationService.java | 87225ebac0bd3f33065f29e22c449cf733ea560f | [
"Apache-2.0"
] | permissive | orange-form/orange-admin | 79f28385658d2635df28fe7a029b987972eb85fb | 13bf4764d13ed32b564e3ea4442c4b6c53557113 | refs/heads/master | 2022-07-27T03:21:03.311959 | 2021-12-26T04:37:09 | 2021-12-26T04:37:09 | 254,990,100 | 234 | 57 | Apache-2.0 | 2022-06-21T04:20:21 | 2020-04-12T01:53:58 | CSS | UTF-8 | Java | false | false | 4,585 | java | package com.orangeforms.common.flow.online.service;
import com.alibaba.fastjson.JSONObject;
import com.orangeforms.common.online.model.OnlineDatasourceRelation;
import com.orangeforms.common.online.model.OnlineTable;
import com.orangeforms.common.online.object.ColumnData;
import com.orangeforms.common.flow.model.FlowTaskComment;
import org.activiti.engine.task.Task;
import java.util.List;
import java.util.Map;
/**
* 流程操作服务接口。
*
* @author Jerry
* @date 2021-06-06
*/
public interface FlowOnlineOperationService {
/**
* 保存在线表单的数据,同时启动流程。如果当前用户是第一个用户任务的Assignee,
* 或者第一个用户任务的Assignee是流程发起人变量,该方法还会自动Take第一个任务。
*
* @param processDefinitionId 流程定义Id。
* @param flowTaskComment 流程审批批注对象。
* @param taskVariableData 流程任务的变量数据。
* @param table 表对象。
* @param columnDataList 表数据。
*/
void saveNewAndStartProcess(
String processDefinitionId,
FlowTaskComment flowTaskComment,
JSONObject taskVariableData,
OnlineTable table,
List<ColumnData> columnDataList);
/**
* 保存在线表单的数据,同时启动流程。如果当前用户是第一个用户任务的Assignee,
* 或者第一个用户任务的Assignee是流程发起人变量,该方法还会自动Take第一个任务。
*
* @param processDefinitionId 流程定义Id。
* @param flowTaskComment 流程审批批注对象。
* @param taskVariableData 流程任务的变量数据。
* @param masterTable 主表对象。
* @param masterColumnDataList 主表数据。
* @param slaveColumnDataListMap 关联从表数据Map。
*/
void saveNewAndStartProcess(
String processDefinitionId,
FlowTaskComment flowTaskComment,
JSONObject taskVariableData,
OnlineTable masterTable,
List<ColumnData> masterColumnDataList,
Map<OnlineDatasourceRelation, List<List<ColumnData>>> slaveColumnDataListMap);
/**
* 保存在线表单的数据,同时Take用户任务。
*
* @param processInstanceId 流程实例Id。
* @param taskId 流程任务Id。
* @param flowTaskComment 流程审批批注对象。
* @param taskVariableData 流程任务的变量数据。
* @param table 表对象。
* @param columnDataList 表数据。
*/
void saveNewAndTakeTask(
String processInstanceId,
String taskId,
FlowTaskComment flowTaskComment,
JSONObject taskVariableData,
OnlineTable table,
List<ColumnData> columnDataList);
/**
* 保存在线表单的数据,同时Take用户任务。
*
* @param processInstanceId 流程实例Id。
* @param taskId 流程任务Id。
* @param flowTaskComment 流程审批批注对象。
* @param taskVariableData 流程任务的变量数据。
* @param masterTable 主表对象。
* @param masterColumnDataList 主表数据。
* @param slaveColumnDataListMap 关联从表数据Map。
*/
void saveNewAndTakeTask(
String processInstanceId,
String taskId,
FlowTaskComment flowTaskComment,
JSONObject taskVariableData,
OnlineTable masterTable,
List<ColumnData> masterColumnDataList,
Map<OnlineDatasourceRelation, List<List<ColumnData>>> slaveColumnDataListMap);
/**
* 保存业务表数据,同时接收流程任务。
*
* @param task 流程任务。
* @param flowTaskComment 流程审批批注对象。
* @param taskVariableData 流程任务的变量数据。
* @param masterTable 主表对象。
* @param masterData 主表数据。
* @param masterDataId 主表数据主键。
* @param slaveData 从表数据。
* @param datasourceId 在线表所属数据源Id。
*/
void updateAndTakeTask(
Task task,
FlowTaskComment flowTaskComment,
JSONObject taskVariableData,
OnlineTable masterTable,
JSONObject masterData,
String masterDataId,
JSONObject slaveData,
Long datasourceId);
}
| [
"707344974@qq.com"
] | 707344974@qq.com |
ac64457c0e7d63c518086803869079976eee99c6 | 56d9543ad398c58c45ff3b723dafd5cd14632c0b | /admin/src/main/java/org/soldier/platform/admin/web/controller/MsgQManage.java | 1a5e94ec0cbf84dd61d6c51b5ed7d4217772fd56 | [] | no_license | xueqiao-codes/soldier-platform | 71bd37a1a756ef3d8929946db68e80c912bac93c | e8c4c348b353f8c43837eed13e4dd3dee80827a3 | refs/heads/main | 2023-04-14T13:08:17.180781 | 2021-04-25T09:51:04 | 2021-04-25T09:51:04 | 361,386,033 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 268 | java | package org.soldier.platform.admin.web.controller;
public class MsgQManage extends WebAuthController {
public void show() throws Exception {
render("msgq/MsgQManage.html");
}
public void showMsgQMenus() throws Exception {
render("msgq/MsgQMenus.html");
}
}
| [
"wangli@authine.com"
] | wangli@authine.com |
5050f53d6e6967ae7ffb64bf175bc0fc8ce94b1c | dc2b2e4afff4fa4cee783a576f4c43d16bc4b23d | /org.kardo.language.aspectj/src-gen/org/kardo/language/aspectj/commons/AspectMember.java | c8a692f5dc87aaa86a686b699bdb1587b0900f4b | [] | no_license | zygote1984/InstancePointcuts | 37d1702293e5b623059cd6bffa627a0f3e74466d | a24f6b68b0454eab57a04b8a02bfccd26c3fd948 | refs/heads/master | 2019-07-29T13:54:48.564066 | 2012-11-08T15:45:37 | 2012-11-08T15:45:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 423 | java | /**
*/
package org.kardo.language.aspectj.commons;
import org.emftext.language.java.members.Member;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Aspect Member</b></em>'.
* <!-- end-user-doc -->
*
*
* @see org.kardo.language.aspectj.commons.CommonsPackage#getAspectMember()
* @model abstract="true"
* @generated
*/
public interface AspectMember extends Member
{
} // AspectMember
| [
"kardelenhatun@gmail.com"
] | kardelenhatun@gmail.com |
4a9fc2e6f1f6d9ab4c9bf113e1ad97b25ef244ac | dd3eec242deb434f76d26b4dc0e3c9509c951ce7 | /2018-work/jiuy-biz/jiuy-biz-core/src/main/java/com/store/dao/mapper/SubscribeOrderMapper.java | 4bbf4c9dc8582c5b150fd9cdd9d10b7475f5c2f3 | [] | no_license | github4n/other_workplace | 1091e6368abc51153b4c7ebbb3742c35fb6a0f4a | 7c07e0d078518bb70399e50b35e9f9ca859ba2df | refs/heads/master | 2020-05-31T10:12:37.160922 | 2019-05-25T15:48:54 | 2019-05-25T15:48:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 302 | java | package com.store.dao.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.store.entity.SubscribeOrder;
/**
* <p>
* 预约订单表 Mapper 接口
* </p>
*
* @author 赵兴林
* @since 2017-07-31
*/
public interface SubscribeOrderMapper extends BaseMapper<SubscribeOrder> {
} | [
"nessary@foxmail.com"
] | nessary@foxmail.com |
969e4cba82ee8ed7d9c786f918a939e414defb37 | 46167791cbfeebc8d3ddc97112764d7947fffa22 | /quarkus/src/main/java/com/justexample/repository/Entity0960Repository.java | abf27f16fd5579e9e8e84c4c77c3ff5c25d7240e | [] | no_license | kahlai/unrealistictest | 4f668b4822a25b4c1f06c6b543a26506bb1f8870 | fe30034b05f5aacd0ef69523479ae721e234995c | refs/heads/master | 2023-08-25T09:32:16.059555 | 2021-11-09T08:17:22 | 2021-11-09T08:17:22 | 425,726,016 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 244 | java | package com.example.repository;
import java.util.List;
import com.example.entity.Entity0960;
import org.springframework.data.jpa.repository.JpaRepository;
public interface Entity0960Repository extends JpaRepository<Entity0960,Long>{
}
| [
"laikahhoe@gmail.com"
] | laikahhoe@gmail.com |
88476188725ebcf3a185160deb78a0fed42848f1 | 4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849 | /aliyun-java-sdk-copyright/src/main/java/com/aliyuncs/copyright/model/v20190123/GetStockDetailResponse.java | f4fdd1395fbaa8c6db8e6c6a37bf01c1e29ddc40 | [
"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 | 5,001 | 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.copyright.model.v20190123;
import java.util.List;
import java.util.Map;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.copyright.transform.v20190123.GetStockDetailResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class GetStockDetailResponse extends AcsResponse {
private String requestId;
private Integer httpStatusCode;
private String dynamicCode;
private String dynamicMessage;
private String errorMsg;
private String errorCode;
private Boolean success;
private Boolean allowRetry;
private String appName;
private List<String> errorArgs;
private Module module;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Integer getHttpStatusCode() {
return this.httpStatusCode;
}
public void setHttpStatusCode(Integer httpStatusCode) {
this.httpStatusCode = httpStatusCode;
}
public String getDynamicCode() {
return this.dynamicCode;
}
public void setDynamicCode(String dynamicCode) {
this.dynamicCode = dynamicCode;
}
public String getDynamicMessage() {
return this.dynamicMessage;
}
public void setDynamicMessage(String dynamicMessage) {
this.dynamicMessage = dynamicMessage;
}
public String getErrorMsg() {
return this.errorMsg;
}
public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
}
public String getErrorCode() {
return this.errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public Boolean getSuccess() {
return this.success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public Boolean getAllowRetry() {
return this.allowRetry;
}
public void setAllowRetry(Boolean allowRetry) {
this.allowRetry = allowRetry;
}
public String getAppName() {
return this.appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public List<String> getErrorArgs() {
return this.errorArgs;
}
public void setErrorArgs(List<String> errorArgs) {
this.errorArgs = errorArgs;
}
public Module getModule() {
return this.module;
}
public void setModule(Module module) {
this.module = module;
}
public static class Module {
private Integer stockId;
private String transactionId;
private String tranHash;
private Integer itemId;
private Integer userId;
private String no;
private String address;
private Long shardId;
private String shardKey;
private Map<Object,Object> detail;
public Integer getStockId() {
return this.stockId;
}
public void setStockId(Integer stockId) {
this.stockId = stockId;
}
public String getTransactionId() {
return this.transactionId;
}
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
}
public String getTranHash() {
return this.tranHash;
}
public void setTranHash(String tranHash) {
this.tranHash = tranHash;
}
public Integer getItemId() {
return this.itemId;
}
public void setItemId(Integer itemId) {
this.itemId = itemId;
}
public Integer getUserId() {
return this.userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getNo() {
return this.no;
}
public void setNo(String no) {
this.no = no;
}
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
public Long getShardId() {
return this.shardId;
}
public void setShardId(Long shardId) {
this.shardId = shardId;
}
public String getShardKey() {
return this.shardKey;
}
public void setShardKey(String shardKey) {
this.shardKey = shardKey;
}
public Map<Object,Object> getDetail() {
return this.detail;
}
public void setDetail(Map<Object,Object> detail) {
this.detail = detail;
}
}
@Override
public GetStockDetailResponse getInstance(UnmarshallerContext context) {
return GetStockDetailResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
c9d12cf1e3817b4d6862cf4017cb6214b9a9238e | c2d8181a8e634979da48dc934b773788f09ffafb | /storyteller/output/mailmag/PostStaticDataDetailForHeaderAndFooterAction.java | df76fa8da9446b09d80a5f692843c4dbd355c24e | [] | no_license | toukubo/storyteller | ccb8281cdc17b87758e2607252d2d3c877ffe40c | 6128b8d275efbf18fd26d617c8503a6e922c602d | refs/heads/master | 2021-05-03T16:30:14.533638 | 2016-04-20T12:52:46 | 2016-04-20T12:52:46 | 9,352,300 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,954 | java | package net.mailmag.web.app;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.mailmag.model.*;
import net.mailmag.beans.*;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.web.context.support.WebApplicationContextUtils;
import net.enclosing.util.HibernateSession;
import net.storyteller.desktop.CopyProperties;
public class PostStaticDataDetailForHeaderAndFooterAction extends Action{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res) throws Exception{
Session session = new HibernateSession().currentSession(this
.getServlet().getServletContext());
StaticData staticData = new StaticDataImpl();
StaticDataForm staticDataform = new StaticDataForm();
Criteria criteria = session.createCriteria(StaticData.class);
if (req.getAttribute("form")== null && req.getParameter("id")!=null){
criteria.add(Restrictions.idEq(Integer.valueOf(req
.getParameter("id"))));
staticData = (StaticData) criteria.uniqueResult();
new CopyProperties(staticData,staticDataform);
} else if(req.getAttribute("form")!=null){
staticDataform = (StaticDataForm)req.getAttribute("form");
criteria.add(Restrictions.idEq(staticDataform.getId()));
staticData = (StaticData) criteria.uniqueResult();
}
req.setAttribute("model",staticData);
req.setAttribute("form",staticDataform);
return mapping.findForward("success");
}
} | [
"toukubo@gmail.com"
] | toukubo@gmail.com |
2a0e28a3aeb3a0c974d24c5810967db198e313b4 | d2ec57598c338498027c2ecbcbb8af675667596b | /src/myfaces-core-module-2.1.10/impl/src/main/java/org/apache/myfaces/component/visit/FullVisitContext.java | b71961568ea3f65461dd93a59a11ecc0fbcf1ee4 | [
"Apache-2.0"
] | permissive | JavaQualitasCorpus/myfaces_core-2.1.10 | abf6152e3b26d905eff87f27109e9de1585073b5 | 10c9f2d038dd91c0b4f78ba9ad9ed44b20fb55c3 | refs/heads/master | 2023-08-12T09:29:23.551395 | 2020-06-02T18:06:36 | 2020-06-02T18:06:36 | 167,005,005 | 0 | 0 | Apache-2.0 | 2022-07-01T21:24:07 | 2019-01-22T14:08:49 | Java | UTF-8 | Java | false | false | 4,509 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.component.visit;
import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.Set;
import javax.faces.component.NamingContainer;
import javax.faces.component.UIComponent;
import javax.faces.component.visit.VisitCallback;
import javax.faces.component.visit.VisitContext;
import javax.faces.component.visit.VisitHint;
import javax.faces.component.visit.VisitResult;
import javax.faces.context.FacesContext;
/**
* <p>A VisitContext implementation that is
* used when performing a full component tree visit.</p>
*
* @author Werner Punz, Blake Sullivan (latest modification by $Author: struberg $)
* @version $Rev: 1188235 $ $Date: 2011-10-24 12:09:33 -0500 (Mon, 24 Oct 2011) $
*/
public class FullVisitContext extends VisitContext
{
/**
* Creates a FullVisitorContext instance.
* @param facesContext the FacesContext for the current request
* @throws NullPointerException if {@code facesContext}
* is {@code null}
*/
public FullVisitContext(FacesContext facesContext)
{
this(facesContext, null);
}
/**
* Creates a FullVisitorContext instance with the specified
* hints.
*
* @param facesContext the FacesContext for the current request
* @param hints a the VisitHints for this visit
* @param phaseId PhaseId, if any that visit is ocurring under
* @throws NullPointerException if {@code facesContext}
* is {@code null}
* @throws IllegalArgumentException if the phaseId is specified and
* hints does not contain VisitHint.EXECUTE_LIFECYCLE
*/
public FullVisitContext(
FacesContext facesContext,
Set<VisitHint> hints)
{
if (facesContext == null)
{
throw new NullPointerException();
}
_facesContext = facesContext;
// Copy and store hints - ensure unmodifiable and non-empty
EnumSet<VisitHint> hintsEnumSet = ((hints == null) || (hints.isEmpty()))
? EnumSet.noneOf(VisitHint.class)
: EnumSet.copyOf(hints);
_hints = Collections.unmodifiableSet(hintsEnumSet);
}
/**
* @see VisitContext#getFacesContext VisitContext.getFacesContext()
*/
@Override
public FacesContext getFacesContext()
{
return _facesContext;
}
/**
* @see VisitContext#getIdsToVisit VisitContext.getIdsToVisit()
*/
@Override
public Collection<String> getIdsToVisit()
{
// We always visits all ids
return ALL_IDS;
}
/**
* @see VisitContext#getSubtreeIdsToVisit VisitContext.getSubtreeIdsToVisit()
*/
@Override
public Collection<String> getSubtreeIdsToVisit(UIComponent component)
{
// Make sure component is a NamingContainer
if (!(component instanceof NamingContainer))
{
throw new IllegalArgumentException("Component is not a NamingContainer: " + component);
}
// We always visits all ids
return ALL_IDS;
}
/**
* @see VisitContext#getHints VisitContext.getHints
*/
@Override
public Set<VisitHint> getHints()
{
return _hints;
}
/**
* @see VisitContext#invokeVisitCallback VisitContext.invokeVisitCallback()
*/
@Override
public VisitResult invokeVisitCallback(
UIComponent component,
VisitCallback callback)
{
// Nothing interesting here - just invoke the callback.
// (PartialVisitContext.invokeVisitCallback() does all of the
// interesting work.)
return callback.visit(this, component);
}
// The FacesContext for this request
private final FacesContext _facesContext;
// Our visit hints
private final Set<VisitHint> _hints;
}
| [
"taibi@sonar-scheduler.rd.tut.fi"
] | taibi@sonar-scheduler.rd.tut.fi |
ece2611a8daca2fe7df0773e2c825fefb52d7899 | 7210c14bf152fb9cc8088fc053fcecde104327d9 | /function-aws-api-proxy/src/test/java/example/StreamLambdaHandler.java | 8ba57dbd77b0d269685afa5aa353a681c0bb727f | [
"Apache-2.0"
] | permissive | musketyr/micronaut-aws | 8323f81a187e0341a995721ca19380bb130ada2f | 7a800f10bbf177d0a9df3018e96fb8174e9221a6 | refs/heads/master | 2022-09-19T03:42:19.382864 | 2022-09-15T05:43:25 | 2022-09-15T05:43:25 | 174,068,278 | 0 | 1 | Apache-2.0 | 2022-09-05T13:29:35 | 2019-03-06T03:59:45 | Java | UTF-8 | Java | false | false | 967 | java | package example;
import com.amazonaws.serverless.exceptions.ContainerInitializationException;
import com.amazonaws.services.lambda.runtime.*;
import io.micronaut.function.aws.proxy.MicronautLambdaContainerHandler;
import java.io.*;
public class StreamLambdaHandler implements RequestStreamHandler {
private MicronautLambdaContainerHandler handler;
public StreamLambdaHandler() {
try {
handler = new MicronautLambdaContainerHandler(); // <1>
} catch (ContainerInitializationException e) {
// if we fail here. We re-throw the exception to force another cold start
e.printStackTrace();
throw new RuntimeException("Could not initialize Micronaut", e);
}
}
@Override
public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context)
throws IOException {
handler.proxyStream(inputStream, outputStream, context); // <2>
}
} | [
"graeme.rocher@gmail.com"
] | graeme.rocher@gmail.com |
4a24da7915e2b9d2bcb55fe2fb780420856fd899 | 2ecee80fa4c2968a0c2184e7f0cbb66f6bb1ef1d | /bitcamp-java-application/v24/src/main/java/com/eomcs/util/Iterator.java | 94d24c154127e55b2218dc6469e88d8916f60949 | [] | no_license | YongJae-L/bitcamp-java-20190527 | a04ee651d8893cbf4333007d880bea0c810b861c | 8276f20d9cc0fc19f13607eb854838c6fdd431c8 | refs/heads/master | 2020-06-14T12:47:42.168020 | 2019-10-14T07:38:53 | 2019-10-14T07:38:53 | 195,007,172 | 0 | 0 | null | 2020-04-30T16:21:42 | 2019-07-03T07:59:59 | Java | UTF-8 | Java | false | false | 858 | java | package com.eomcs.util;
// 컬렉션에서 값을 꺼내는 기능을 객체화시킨다.
// => 컬렉션에서 값을 꺼내는 기능을 클래스로 정의한다.
// => 컬렉션에서 값을 꺼내는 기능을 추상화한다.
// => 컬렉션에서 값을 꺼내는 기능을 캡슐화한다.
//
// 컬렉션에서 값을 꺼내는 객체를 Iterator(반복자) 라 부른다.
// => Iterator를 일관된 방법으로 사용할 수 있도록 다음과 같이 사용 규칙을 정의한다.
// => Iterator의 메서드를 일관된 방법으로 호출할 수 있도록 다음과 같이 메서드 규칙을 정의한다.
public interface Iterator<E> {
// 컬렉션에서 꺼낼 데이터가 있는지 검사할 때 호출할 메서드
boolean hasNext();
// 컬렉션에서 한 개의 데이터를 꺼낼 때 호출할 메서드
E next();
}
| [
"yimsb02@naver.com"
] | yimsb02@naver.com |
8bf047c0de8c9f957dfbe6e608d19d19e27e8695 | a6ac3b940111f1626cadce7fe2042db68c9145f2 | /src/beans/NettingConfig.java | c83e797d0d13589f29bc1d3be33454a5dc03abc4 | [] | no_license | yogi15/development | fee89cb8b9f3cae35c95b6d00c562de303c5078a | d9f38613b6059e7124a3ae80585bcdf9881e790d | refs/heads/master | 2021-01-21T12:58:47.058279 | 2016-04-27T09:18:28 | 2016-04-27T09:18:28 | 55,207,648 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,010 | java | package beans;
import java.io.Serializable;
public class NettingConfig implements Serializable {
int id;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getLeid() {
return leid;
}
public void setLeid(int leid) {
this.leid = leid;
}
public String getProductType() {
return productType;
}
public void setProductType(String productType) {
this.productType = productType;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getEffectiveDate() {
return effectiveDate;
}
public void setEffectiveDate(String effectiveDate) {
this.effectiveDate = effectiveDate;
}
int leid;
String productType;
String currency;
String effectiveDate;
String endEdate;
public String getEndEdate() {
return endEdate;
}
public void setEndEdate(String endEdate) {
this.endEdate = endEdate;
}
}
| [
"yogi.kadam@gmail.com"
] | yogi.kadam@gmail.com |
57f588689c680146791569714eceaab960c0d82f | 2fd9d77d529e9b90fd077d0aa5ed2889525129e3 | /DecompiledViberSrc/app/src/main/java/com/viber/voip/user/more/MorePrefsListener.java | 2f37ae9991d92f0834e3c6955df3bf149f84e3f9 | [] | no_license | cga2351/code | 703f5d49dc3be45eafc4521e931f8d9d270e8a92 | 4e35fb567d359c252c2feca1e21b3a2a386f2bdb | refs/heads/master | 2021-07-08T15:11:06.299852 | 2021-05-06T13:22:21 | 2021-05-06T13:22:21 | 60,314,071 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,076 | java | package com.viber.voip.user.more;
import com.viber.common.b.a;
import com.viber.voip.settings.d;
import com.viber.voip.settings.d.al;
import com.viber.voip.util.dd;
class MorePrefsListener extends d.al
{
private PreferencesChangedListener mPreferencesChangedListener;
MorePrefsListener(a[] paramArrayOfa)
{
super(paramArrayOfa);
}
public void onPreferencesChanged(a parama)
{
dd.a(new MorePrefsListener..Lambda.0(this, parama));
}
void register(PreferencesChangedListener paramPreferencesChangedListener)
{
d.a(this);
this.mPreferencesChangedListener = paramPreferencesChangedListener;
}
void unregister()
{
d.b(this);
this.mPreferencesChangedListener = null;
}
static abstract interface PreferencesChangedListener
{
public abstract void onPreferencesChanged(a parama);
}
}
/* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_4_dex2jar.jar
* Qualified Name: com.viber.voip.user.more.MorePrefsListener
* JD-Core Version: 0.6.2
*/ | [
"yu.liang@navercorp.com"
] | yu.liang@navercorp.com |
e4f22c9a9389d6e8b5f1f5932ed0e92a649f7498 | bf57546b98592a7a89e1298104d1e48807e07244 | /app/src/main/java/com/zan99/guaizhangmen/Activity/Men/MyUpdataActivity.java | 9eaa4ee1a43a9b8f5d7af895fdba7e59bfeec5d0 | [] | no_license | huweidongls/zhangmen | 3e3ba19e7687f2ee8fd1f7024ac1412e4b7649f6 | 02b9c746dd70950feb0359a2a77966a5e47dc84e | refs/heads/master | 2020-03-09T04:20:42.165008 | 2018-04-08T02:12:36 | 2018-04-08T02:12:36 | 128,581,196 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,371 | java | package com.zan99.guaizhangmen.Activity.Men;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import com.squareup.picasso.Picasso;
import com.zan99.guaizhangmen.Adapter.MyUpDataZhangjieAdapter;
import com.zan99.guaizhangmen.BaseActivity;
import com.zan99.guaizhangmen.Model.MenModel;
import com.zan99.guaizhangmen.Model.MyUpDataZhangjieEntity;
import com.zan99.guaizhangmen.R;
import com.zan99.guaizhangmen.SqlUtil.BooksDatabaseHelper;
import com.zan99.guaizhangmen.Util.Consts;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class MyUpdataActivity extends BaseActivity {
@BindView(R.id.button2)
LinearLayout button2;
@BindView(R.id.myupdata_book_play)
ImageView myupdataBookPlay;
private BooksDatabaseHelper booksDatabaseHelper;
private SQLiteDatabase db;
/**
* 书籍名称
*/
private String booksName;
/**
* 书籍图片URL
*/
private String booksImg;
/**
* 书籍作者
*/
private String authorname;
/**
* 书籍创建时间
*/
private String creattime;
/**
* 书籍id
*/
private String bookId;
@BindView(R.id.myupdata_book_date)
TextView createTime;
@BindView(R.id.myupdata_book_yanjiang)
TextView authorName;
@BindView(R.id.myupdata_book)
ImageView bookImg;
@BindView(R.id.myupdata_book_name)
TextView bookName;
@BindView(R.id.back_left)
Button back;
/**
* 章节列表
*/
@BindView(R.id.myupdata_book_zhangjie)
ListView listView;
/**
* 章节数据
*/
private List<MyUpDataZhangjieEntity> data = new ArrayList<>();
/**
* 章节列表适配器
*/
private MyUpDataZhangjieAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my_updata);
ButterKnife.bind(this);
init();
}
private void init() {
Intent intent = getIntent();
bookId = intent.getStringExtra("books_id");
booksName = intent.getStringExtra("books_name");
booksImg = intent.getStringExtra("books_img");
authorname = intent.getStringExtra("author_name");
creattime = intent.getStringExtra("create_time");
Picasso.with(this).load("http://" + booksImg).into(bookImg);
bookName.setText(booksName);
authorName.setText(authorname + " 著");
createTime.setText(creattime);
data = getData();
adapter = new MyUpDataZhangjieAdapter(MyUpdataActivity.this, data);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent();
intent.putExtra("currentPlay", position);
intent.putExtra("bookId", bookId);
intent.putExtra("booksName", booksName);
intent.putExtra("booksImg", booksImg);
intent.putExtra("authorname", authorname);
intent.setClass(MyUpdataActivity.this, MyUpDataMediaPlayerActivity.class);
startActivity(intent);
}
});
}
private List<MyUpDataZhangjieEntity> getData() {
booksDatabaseHelper = new BooksDatabaseHelper(this, Consts.DATABASE_VERSION);
db = booksDatabaseHelper.getWritableDatabase();
String sql = "select * from chapters where member_id=? and bookId=?";
Cursor c = db.rawQuery(sql, new String[]{MenModel.member_id, bookId});
List<MyUpDataZhangjieEntity> data = new ArrayList<>();
for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {
data.add(new MyUpDataZhangjieEntity(c.getString(c.getColumnIndex("chaptreName")), c.getString(c.getColumnIndex("duration"))));
}
c.close();
db.close();
return data;
}
@OnClick({R.id.button2, R.id.back_left, R.id.myupdata_book_play})
public void onClick(View view) {
Intent intent = new Intent();
switch (view.getId()) {
case R.id.myupdata_book_play:
intent.setClass(MyUpdataActivity.this, MyUpDataMediaPlayerActivity.class);
intent.putExtra("currentPlay", 0);
intent.putExtra("bookId", bookId);
intent.putExtra("booksName", booksName);
intent.putExtra("booksImg", booksImg);
intent.putExtra("authorname", authorname);
startActivity(intent);
break;
case R.id.back_left:
MyUpdataActivity.this.finish();
break;
case R.id.button2:
MyUpdataActivity.this.finish();
break;
}
}
@Override
protected void onDestroy() {
super.onDestroy();
}
}
| [
"466463054@qq.com"
] | 466463054@qq.com |
03564cab0eb82d7231fe888d07288b59840da095 | e0c271f609dce516ee3d063c6d7472ea689442ff | /IEDUJava/src/P_0614/Slider_01.java | f293e6ae0a9bc5a7d42a1da874f4d6337cdeed7f | [] | no_license | bym90/Java-Web | d99edb4b61b0daa94abc71f1fcc66e4c9328ce44 | 74cf88a9e78799b5b5f4191b0d58af28474a9d88 | refs/heads/master | 2021-01-12T16:14:26.007241 | 2016-10-26T01:40:01 | 2016-10-26T01:40:01 | 71,954,347 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 539 | java | package P_0614;
import java.awt.*;
import javax.swing.*;
import GUI.*;
public class Slider_01 extends CJFrame{
public Slider_01() {
this.setLayout(new FlowLayout());
JSlider js = new JSlider(JSlider.HORIZONTAL, 0, 100, 0);
js.setPaintTicks(true);
js.setMajorTickSpacing(20);
js.setMinorTickSpacing(10);
js.setPaintLabels(true);
js.setSnapToTicks(true);
this.add(js);
this.setSize(400, 400);
this.setVisible(true);
}
public static void main(String[] args) {
new Slider_01();
}
}
| [
"qodudals90@naver.com"
] | qodudals90@naver.com |
c583638260367822a3382526cf6aebd813bf6392 | 882e77219bce59ae57cbad7e9606507b34eebfcf | /mi2s_securitycenter_miui12/src/main/java/com/miui/common/card/models/FuncGrid9ColorfulCardModel.java | b57eb126923d0272428ed68925f6139edfab1301 | [] | no_license | CrackerCat/XiaomiFramework | 17a12c1752296fa1a52f61b83ecf165f328f4523 | 0b7952df317dac02ebd1feea7507afb789cef2e3 | refs/heads/master | 2022-06-12T03:30:33.285593 | 2020-05-06T11:30:54 | 2020-05-06T11:30:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,131 | java | package com.miui.common.card.models;
import android.view.View;
import b.c.a.b.d;
import com.miui.common.card.BaseViewHolder;
import com.miui.common.card.models.FuncGridBaseCardModel;
import com.miui.securitycenter.R;
import com.miui.securityscan.model.AbsModel;
public class FuncGrid9ColorfulCardModel extends FuncGridBaseCardModel {
public FuncGrid9ColorfulCardModel() {
this((AbsModel) null);
}
public FuncGrid9ColorfulCardModel(AbsModel absModel) {
super(R.layout.card_layout_grid_nine_parent_colorful, absModel);
}
public BaseViewHolder createViewHolder(View view) {
FuncGridBaseCardModel.FuncGridBaseViewHolder funcGridBaseViewHolder = new FuncGridBaseCardModel.FuncGridBaseViewHolder(view);
d.a aVar = new d.a();
aVar.c((int) R.drawable.phone_manage_default_selector);
aVar.b((int) R.drawable.phone_manage_default_selector);
aVar.a((int) R.drawable.phone_manage_default_selector);
aVar.a(true);
aVar.b(true);
aVar.c(true);
funcGridBaseViewHolder.options = aVar.a();
return funcGridBaseViewHolder;
}
}
| [
"sanbo.xyz@gmail.com"
] | sanbo.xyz@gmail.com |
9075c4c1d245f10ace723b8e3b50b936953ef1c1 | e70abc02efbb8a7637eb3655f287b0a409cfa23b | /hyjf-mybatis/src/main/java/com/hyjf/mybatis/model/auto/NifaRepayInfo.java | 9594e76a933597da9cb741bcce66b455109cffd6 | [] | no_license | WangYouzheng1994/hyjf | ecb221560460e30439f6915574251266c1a49042 | 6cbc76c109675bb1f120737f29a786fea69852fc | refs/heads/master | 2023-05-12T03:29:02.563411 | 2020-05-19T13:49:56 | 2020-05-19T13:49:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,694 | java | package com.hyjf.mybatis.model.auto;
import java.io.Serializable;
import java.util.Date;
public class NifaRepayInfo implements Serializable {
private Integer id;
private String platformNo;
private String projectNo;
private Integer paymentNum;
private String paymentDate;
private String paymentPrincipal;
private String paymentInterest;
private Integer paymentSource;
private Integer paymentSituation;
private String paymentPrincipalRest;
private String paymentInterestRest;
private Integer createUserId;
private Integer updateUserId;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getPlatformNo() {
return platformNo;
}
public void setPlatformNo(String platformNo) {
this.platformNo = platformNo == null ? null : platformNo.trim();
}
public String getProjectNo() {
return projectNo;
}
public void setProjectNo(String projectNo) {
this.projectNo = projectNo == null ? null : projectNo.trim();
}
public Integer getPaymentNum() {
return paymentNum;
}
public void setPaymentNum(Integer paymentNum) {
this.paymentNum = paymentNum;
}
public String getPaymentDate() {
return paymentDate;
}
public void setPaymentDate(String paymentDate) {
this.paymentDate = paymentDate == null ? null : paymentDate.trim();
}
public String getPaymentPrincipal() {
return paymentPrincipal;
}
public void setPaymentPrincipal(String paymentPrincipal) {
this.paymentPrincipal = paymentPrincipal == null ? null : paymentPrincipal.trim();
}
public String getPaymentInterest() {
return paymentInterest;
}
public void setPaymentInterest(String paymentInterest) {
this.paymentInterest = paymentInterest == null ? null : paymentInterest.trim();
}
public Integer getPaymentSource() {
return paymentSource;
}
public void setPaymentSource(Integer paymentSource) {
this.paymentSource = paymentSource;
}
public Integer getPaymentSituation() {
return paymentSituation;
}
public void setPaymentSituation(Integer paymentSituation) {
this.paymentSituation = paymentSituation;
}
public String getPaymentPrincipalRest() {
return paymentPrincipalRest;
}
public void setPaymentPrincipalRest(String paymentPrincipalRest) {
this.paymentPrincipalRest = paymentPrincipalRest == null ? null : paymentPrincipalRest.trim();
}
public String getPaymentInterestRest() {
return paymentInterestRest;
}
public void setPaymentInterestRest(String paymentInterestRest) {
this.paymentInterestRest = paymentInterestRest == null ? null : paymentInterestRest.trim();
}
public Integer getCreateUserId() {
return createUserId;
}
public void setCreateUserId(Integer createUserId) {
this.createUserId = createUserId;
}
public Integer getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(Integer updateUserId) {
this.updateUserId = updateUserId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
} | [
"heshuying@hyjf.com"
] | heshuying@hyjf.com |
5117b845c9c69e3ebc9108a84b1e639d08f9b22d | 36fea8025460bd257c753a93dd3f27472892b4bc | /root/prj/sol/projects/renew2.5source/renew2.5/src/Gui/src/de/renew/gui/menu/AttributesMenuExtender.java | 6c728ea1cb3ecb9374316dd65d34c576d597f9e9 | [] | no_license | Glost/db_nets_renew_plugin | ac84461e7779926b7ad70b2c7724138dc0d7242f | def4eaf7e55d79b9093bd59c5266804b345e8595 | refs/heads/master | 2023-05-05T00:02:12.504536 | 2021-05-25T22:36:13 | 2021-05-25T22:36:13 | 234,759,037 | 0 | 0 | null | 2021-05-04T23:37:39 | 2020-01-18T15:59:33 | Java | UTF-8 | Java | false | false | 4,001 | java | /*
* Created on 28.01.2004
*
*/
package de.renew.gui.menu;
import CH.ifa.draw.application.DrawApplication;
import CH.ifa.draw.application.MenuManager;
import CH.ifa.draw.figures.ArrowTip;
import CH.ifa.draw.standard.ChangeAttributeCommand;
import CH.ifa.draw.util.CommandMenu;
import CH.ifa.draw.util.CommandMenuItem;
import de.renew.gui.AssocArrowTip;
import de.renew.gui.CPNTextFigure;
import de.renew.gui.CompositionArrowTip;
import de.renew.gui.DoubleArrowTip;
import de.renew.gui.IsaArrowTip;
import java.util.Collection;
import java.util.Vector;
import javax.swing.JMenuItem;
/**
* This class creates the menu extensions for the Attributes menu.
* <ul>
* <li><em>Arrow Shape</em> lets you choose double tipped arrows </li>
* <li><em>Text Type</em> lets you change the type of a text field (label, inscription, name)</li>
* </ul>
*
* @author Jörn Schumacher
*/
public class AttributesMenuExtender {
public Collection<JMenuItem> createMenus() {
Collection<JMenuItem> result = new Vector<JMenuItem>();
result.add(MenuManager.createSeparator("de.renew.gui.align.sep"));
/*
* TODO: JSC: Move to CH
*/
CommandMenu arrowTipMenu = DrawApplication.createCommandMenu("Arrow Shape");
arrowTipMenu.add(new CommandMenuItem(new ChangeAttributeCommand("normal",
"ArrowTip",
ArrowTip.class
.getName())));
arrowTipMenu.add(new CommandMenuItem(new ChangeAttributeCommand("double",
"ArrowTip",
DoubleArrowTip.class
.getName())));
arrowTipMenu.add(new CommandMenuItem(new ChangeAttributeCommand("lines",
"ArrowTip",
AssocArrowTip.class
.getName())));
arrowTipMenu.add(new CommandMenuItem(new ChangeAttributeCommand("triangle",
"ArrowTip",
IsaArrowTip.class
.getName())));
arrowTipMenu.add(new CommandMenuItem(new ChangeAttributeCommand("diamond",
"ArrowTip",
CompositionArrowTip.class
.getName())));
result.add(arrowTipMenu);
CommandMenu textTypeMenu = DrawApplication.createCommandMenu("Text Type");
textTypeMenu.add(new CommandMenuItem(new ChangeAttributeCommand("Label",
"TextType",
new Integer(CPNTextFigure.LABEL))));
textTypeMenu.add(new CommandMenuItem(new ChangeAttributeCommand("Inscription",
"TextType",
new Integer(CPNTextFigure.INSCRIPTION))));
textTypeMenu.add(new CommandMenuItem(new ChangeAttributeCommand("Name",
"TextType",
new Integer(CPNTextFigure.NAME))));
result.add(textTypeMenu);
return result;
}
} | [
"anton19979@yandex.ru"
] | anton19979@yandex.ru |
e919f93fcb7a162694d14e5534cad0c1f1097f9c | 96f8d42c474f8dd42ecc6811b6e555363f168d3e | /zuiyou/sources/com/tencent/tinker/lib/patch/AbstractPatch.java | 2ae56650be3b83af666e536124388013877ba31b | [] | no_license | aheadlcx/analyzeApk | 050b261595cecc85790558a02d79739a789ae3a3 | 25cecc394dde4ed7d4971baf0e9504dcb7fabaca | refs/heads/master | 2020-03-10T10:24:49.773318 | 2018-04-13T09:44:45 | 2018-04-13T09:44:45 | 129,332,351 | 6 | 2 | null | null | null | null | UTF-8 | Java | false | false | 255 | java | package com.tencent.tinker.lib.patch;
import android.content.Context;
import com.tencent.tinker.lib.service.PatchResult;
public abstract class AbstractPatch {
public abstract boolean tryPatch(Context context, String str, PatchResult patchResult);
}
| [
"aheadlcxzhang@gmail.com"
] | aheadlcxzhang@gmail.com |
288acda5b960724e175a10a18a1496b511a2582f | 8f6b6c6409393adbc3480f3987cbc1b7dda1751b | /src/main/java/crazypants/structures/creator/block/villager/DialogVillagerEditor.java | e051e824d95c96dd6b8cbf4aa69056b90c262291 | [
"CC0-1.0"
] | permissive | SleepyTrousers/StructuresCreator | 26fa1bcc104d7b4d1f2541bea23ab98696f533df | cd7b1162405881210ca1667b39669054860f4789 | refs/heads/master | 2021-01-10T15:47:19.766048 | 2016-01-02T09:06:04 | 2016-01-02T09:06:04 | 43,886,894 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 7,917 | java | package crazypants.structures.creator.block.villager;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPopupMenu;
import org.apache.commons.io.IOUtils;
import crazypants.structures.Log;
import crazypants.structures.api.gen.IVillagerGenerator;
import crazypants.structures.api.util.Point3i;
import crazypants.structures.creator.block.AbstractResourceDialog;
import crazypants.structures.creator.block.AbstractResourceTile;
import crazypants.structures.creator.block.FileControls;
import crazypants.structures.creator.block.tree.EditorTreeControl;
import crazypants.structures.creator.block.tree.Icons;
import crazypants.structures.creator.item.ExportManager;
import crazypants.structures.gen.StructureGenRegister;
import crazypants.structures.gen.io.VillagerParser;
import crazypants.structures.gen.io.resource.StructureResourceManager;
import crazypants.structures.gen.villager.VillagerTemplate;
import net.minecraft.client.Minecraft;
public class DialogVillagerEditor extends AbstractResourceDialog {
private static final long serialVersionUID = 1L;
private static Map<Point3i, DialogVillagerEditor> openDialogs = new HashMap<Point3i, DialogVillagerEditor>();
public static void openDialog(TileVillagerEditor tile) {
Point3i key = new Point3i(tile.xCoord, tile.yCoord, tile.zCoord);
DialogVillagerEditor res = openDialogs.get(key);
if(res == null) {
res = new DialogVillagerEditor(tile);
openDialogs.put(key, res);
}
res.openDialog();
}
private final TileVillagerEditor tile;
private final Point3i position;
private VillagerTemplate curTemplate;
private FileControls fileControls;
private EditorTreeControl treeControl;
public DialogVillagerEditor(TileVillagerEditor tile) {
this.tile = tile;
position = new Point3i(tile.xCoord, tile.yCoord, tile.zCoord);
setIconImage(Icons.GENERATOR.getImage());
setTitle("Generator Editor");
initComponents();
addComponents();
addListeners();
if(tile.getName() != null && tile.getName().trim().length() > 0 && tile.getExportDir() != null) {
try {
curTemplate = loadFromFile(new File(tile.getExportDir(), tile.getName() + StructureResourceManager.VILLAGER_EXT));
} catch (Exception e) {
treeControl.setDirty(false);
createNewResource();
}
} else {
treeControl.setDirty(false);
createNewResource();
}
buildTree();
}
private void buildTree() {
String name = tile.getName();
if(curTemplate == null) {
VillagerTemplate tmpl = new VillagerTemplate();
tmpl.setUid(name);
curTemplate = tmpl;
}
treeControl.buildTree(curTemplate);
}
@Override
protected void createNewResource() {
if(!treeControl.isDirty() || checkClear()) {
tile.setName("NewVillagerGen");
tile.setExportDir(ExportManager.instance.getDefaultDirectory().getAbsolutePath());
sendUpdatePacket();
curTemplate = null;
buildTree();
}
}
@Override
protected boolean checkClear() {
return !treeControl.isDirty() || super.checkClear();
}
@Override
protected void openResource() {
if(treeControl.isDirty() && !checkClear()) {
return;
}
StructureResourceManager resMan = StructureGenRegister.instance.getResourceManager();
List<File> files = resMan.getFilesWithExt(getResourceExtension());
JPopupMenu menu = new JPopupMenu();
for (final File file : files) {
final VillagerTemplate gen = loadFromFile(file);
if(gen != null) {
JMenuItem mi = new JMenuItem(file.getName());
mi.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
openGeneratorFromFile(file, gen);
}
});
menu.add(mi);
} else {
System.out.println("DialogVillagerEditor.openResource: Could not load template from file: " + file.getAbsolutePath());
}
}
JMenuItem mi = new JMenuItem("...");
mi.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
openFromFile();
}
});
menu.add(mi);
menu.show(fileControls.getOpenB(), 0, 0);
}
@Override
public String getResourceUid() {
if(curTemplate == null || curTemplate.getUid() == null) {
return null;
}
return curTemplate.getUid().trim();
}
@Override
public String getResourceExtension() {
return StructureResourceManager.VILLAGER_EXT;
}
@Override
public AbstractResourceTile getTile() {
return tile;
}
@Override
protected void onDialogClose() {
openDialogs.remove(position);
super.onDialogClose();
}
@Override
public void onDirtyChanged(boolean dirty) {
super.onDirtyChanged(dirty);
fileControls.getSaveB().setEnabled(dirty);
}
@Override
protected void writeToFile(File file, String newUid) {
if(ExportManager.writeToFile(file, curTemplate, Minecraft.getMinecraft().thePlayer)) {
Log.info("DialogTemplateEditor.save: Saved template to " + file.getAbsolutePath());
if(!newUid.equals(curTemplate.getUid())) {
curTemplate.setUid(newUid);
tile.setName(newUid);
sendUpdatePacket();
buildTree();
treeControl.setDirty(true);
}
treeControl.setDirty(false);
registerCurrentTemplate();
}
}
private void openGenerator(VillagerTemplate gen) {
if(gen == null) {
return;
}
tile.setName(gen.getUid());
sendUpdatePacket();
curTemplate = gen;
onDirtyChanged(false);
buildTree();
}
private void openFromFile() {
File file = selectFileToOpen();
if(file == null) {
return;
}
VillagerTemplate vilTmp = openGeneratorFromFile(file);
if(vilTmp == null) {
JOptionPane.showMessageDialog(this, "Could not load template.", "Bottoms", JOptionPane.ERROR_MESSAGE);
}
}
private VillagerTemplate openGeneratorFromFile(File file) {
return openGeneratorFromFile(file, loadFromFile(file));
}
private VillagerTemplate openGeneratorFromFile(File file, VillagerTemplate gen) {
tile.setExportDir(file.getParentFile().getAbsolutePath());
sendUpdatePacket();
openGenerator(gen);
registerCurrentTemplate();
return gen;
}
private void registerCurrentTemplate() {
if(curTemplate != null && curTemplate.isValid()) {
IVillagerGenerator gen = curTemplate.createGenerator();
StructureGenRegister.instance.registerVillagerGenerator(gen);
gen.onReload();
}
}
private VillagerTemplate loadFromFile(File file) {
InputStream stream = null;
try {
stream = new FileInputStream(file);
String uid = getUidFromFileName(file);
String json = StructureGenRegister.instance.getResourceManager().loadText(uid, stream);
StructureGenRegister.instance.getResourceManager().addResourceDirectory(file.getParentFile());
return VillagerParser.parseVillagerTemplate(uid, json);
} catch (Exception e) {
e.printStackTrace();
} finally {
IOUtils.closeQuietly(stream);
}
return null;
}
private void initComponents() {
fileControls = new FileControls(this);
treeControl = new EditorTreeControl(this);
}
private void addComponents() {
Container cp = getContentPane();
cp.setLayout(new BorderLayout());
cp.add(fileControls.getPanel(), BorderLayout.NORTH);
cp.add(treeControl.getRoot(), BorderLayout.CENTER);
}
private void addListeners() {
}
}
| [
"crazypants.mc@gmail.com"
] | crazypants.mc@gmail.com |
401ca5a8fe29cd9e1ba5108c05e6b1560f5ebeca | 778da6dbb2eb27ace541338d0051f44353c3f924 | /src/main/java/com/espertech/esper/epl/datetime/calop/CalendarOpWithDate.java | 0c1cd8e920d9389037ca9df4506e44f2ed66d2d6 | [] | no_license | jiji87432/ThreadForEsperAndBenchmark | daf7188fb142f707f9160173d48c2754e1260ec7 | fd2fc3579b3dd4efa18e079ce80d3aee98bf7314 | refs/heads/master | 2021-12-12T02:15:18.810190 | 2016-12-01T12:15:01 | 2016-12-01T12:15:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,423 | java | /*
* *************************************************************************************
* Copyright (C) 2006-2015 EsperTech, Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
* *************************************************************************************
*/
package com.espertech.esper.epl.datetime.calop;
import com.espertech.esper.client.EventBean;
import com.espertech.esper.epl.expression.core.ExprEvaluator;
import com.espertech.esper.epl.expression.core.ExprEvaluatorContext;
import java.util.Calendar;
public class CalendarOpWithDate implements CalendarOp {
private ExprEvaluator year;
private ExprEvaluator month;
private ExprEvaluator day;
public CalendarOpWithDate(ExprEvaluator year, ExprEvaluator month, ExprEvaluator day) {
this.year = year;
this.month = month;
this.day = day;
}
public void evaluate(Calendar cal, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
Integer yearNum = getInt(year, eventsPerStream, isNewData, context);
Integer monthNum = getInt(month, eventsPerStream, isNewData, context);
Integer dayNum = getInt(day, eventsPerStream, isNewData, context);
action(cal, yearNum, monthNum, dayNum);
}
protected static Integer getInt(ExprEvaluator expr, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
Object result = expr.evaluate(eventsPerStream, isNewData, context);
if (result == null) {
return null;
}
return (Integer) result;
}
private static void action(Calendar cal, Integer year, Integer month, Integer day) {
if (year != null) {
cal.set(Calendar.YEAR, year);
}
if (month != null) {
cal.set(Calendar.MONTH, month);
}
if (day != null) {
cal.set(Calendar.DATE, day);
}
}
}
| [
"qinjie2012@163.com"
] | qinjie2012@163.com |
0f5a60eeacc8276be9be349da23bb7ddfa590932 | 68cb536e4961329b290da6d08711426223ea10a3 | /chapter_001/src/main/java/ru/job4j/loop/Mortgage.java | cb31ba583a8e93e7cec96b8ca47e20bce38476f0 | [] | no_license | Dmitriy-77/job4j | 07598eb9f1707a413235adf9276e179d66c485fd | 926a77a88786466dba4f4081223a5f40bf85854e | refs/heads/master | 2021-07-09T09:12:59.842014 | 2020-03-15T07:58:35 | 2020-03-15T07:58:35 | 225,133,423 | 0 | 0 | null | 2021-01-05T18:42:53 | 2019-12-01T09:06:15 | Java | UTF-8 | Java | false | false | 161 | java | package ru.job4j.loop;
public class Mortgage {
public int year(int amount, int salary, double percent) {
int year = 0;
return year;
}
}
| [
"you@example.com"
] | you@example.com |
19c2de37653e9a861f62f29451702ded5132e1b4 | 3f7149eb1efdbeba1f6ae3665a66cbef06411442 | /vbox-app/src/com/kedzie/vbox/api/IPerformanceMetric.java | 8f0ad068794829def7c5907bca756ce10ec2de6e | [] | no_license | zeroyou/VBoxManager | 7aa96915c85102c94e06a99b065d65475fbce7cf | a291b442f6de9ea1f8b8e14f75fbbee3fe96729f | refs/heads/master | 2020-04-16T10:43:43.398965 | 2013-07-19T16:02:56 | 2013-07-19T16:02:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,279 | java | package com.kedzie.vbox.api;
import java.util.HashMap;
import java.util.Map;
import android.os.Parcel;
import android.os.Parcelable;
import com.kedzie.vbox.soap.KSOAP;
import com.kedzie.vbox.soap.VBoxSvc;
@KSOAP(cacheable=true)
public interface IPerformanceMetric extends IManagedObjectRef, Parcelable {
static final ClassLoader LOADER = IPerformanceMetric.class.getClassLoader();
public static Parcelable.Creator<IPerformanceMetric> CREATOR = new Parcelable.Creator<IPerformanceMetric>() {
@Override
public IPerformanceMetric createFromParcel(Parcel in) {
VBoxSvc vmgr = in.readParcelable(LOADER);
String id = in.readString();
Map<String, Object> cache = new HashMap<String, Object>();
in.readMap(cache, LOADER);
return (IPerformanceMetric) vmgr.getProxy(IPerformanceMetric.class, id, cache);
}
@Override
public IPerformanceMetric[] newArray(int size) {
return new IPerformanceMetric[size];
}
};
public String getMetricName();
public String getDescription();
public Integer getMinimumValue();
public Integer getMaximumValue();
public String getUnit();
public String getObject();
}
| [
"mark.kedzierski@gmail.com"
] | mark.kedzierski@gmail.com |
d39fecd60aaf6ab01c5065a756de8a9862b2c70e | 812a8efb9df3766c4540232dad659301ac1fa6df | /service-compre/src/main/java/la/niub/abcapi/servicecompre/model/nosql/HbChartsModel.java | c2002273c3705323c226967821da89d21bbc0732 | [] | no_license | faker-res/comprehensive-search-service | 08ba1578dd51fb8f292f9c41819c6ced13ada6c4 | a0d617477af423c873e4be51f0a96b74a2c2ce8c | refs/heads/master | 2020-09-30T12:04:30.641215 | 2019-12-11T02:44:24 | 2019-12-11T02:44:24 | 227,283,702 | 1 | 0 | null | 2019-12-11T05:28:17 | 2019-12-11T05:28:16 | null | UTF-8 | Java | false | false | 7,159 | java | package la.niub.abcapi.servicecompre.model.nosql;
import la.niub.abcapi.servicecompre.model.bo.ComprehensiveChartGraphChartDataBO;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Document(collection = "hb_charts")
public class HbChartsModel {
private String _id;
private Boolean is_ppt;
private String algorithmCommitTime;
private Long fileId;
private Integer pageIndex;
private String chartType;
private List<Object> subtypes;
private List<Map<String,Object>> legends;
private List<String> vAxisTextL;
private List<Object> vAxisChunksR;
private List<Object> hAxisChunksD;
private List<Object> hAxisChunksU;
private Boolean is_bitmap;
private String file_source;
private String fileUrl;
private Integer chart_version;
private Integer state;
private Date create_time;
private Date last_updated;
private Boolean deleted;
private String title;
private String svgFile;
private String pngFile;
private String confidence;
private String data_file;
private String bitmap_ver;
public String getBitmap_ver() {
return bitmap_ver;
}
public void setBitmap_ver(String bitmap_ver) {
this.bitmap_ver = bitmap_ver;
}
public String getData_file() {
return data_file;
}
public void setData_file(String data_file) {
this.data_file = data_file;
}
public String getConfidence() {
return confidence;
}
public void setConfidence(String confidence) {
this.confidence = confidence;
}
private ComprehensiveChartGraphChartDataBO data;
private Map<String,Float> area;
public String get_id() {
return _id;
}
public void set_id(String _id) {
this._id = _id;
}
public Boolean getIs_ppt() {
return is_ppt;
}
public void setIs_ppt(Boolean is_ppt) {
this.is_ppt = is_ppt;
}
public String getAlgorithmCommitTime() {
return algorithmCommitTime;
}
public void setAlgorithmCommitTime(String algorithmCommitTime) {
this.algorithmCommitTime = algorithmCommitTime;
}
public Long getFileId() {
return fileId;
}
public void setFileId(Long fileId) {
this.fileId = fileId;
}
public Integer getPageIndex() {
return pageIndex;
}
public void setPageIndex(Integer pageIndex) {
this.pageIndex = pageIndex;
}
public String getChartType() {
return chartType;
}
public void setChartType(String chartType) {
this.chartType = chartType;
}
public List<Object> getSubtypes() {
return subtypes;
}
public void setSubtypes(List<Object> subtypes) {
this.subtypes = subtypes;
}
public List<Map<String,Object>> getLegends() {
return legends;
}
public void setLegends(List<Map<String,Object>> legends) {
this.legends = legends;
}
public List<String> getvAxisTextL() {
return vAxisTextL;
}
public void setvAxisTextL(List<String> vAxisTextL) {
this.vAxisTextL = vAxisTextL;
}
public List<Object> getvAxisChunksR() {
return vAxisChunksR;
}
public void setvAxisChunksR(List<Object> vAxisChunksR) {
this.vAxisChunksR = vAxisChunksR;
}
public List<Object> gethAxisChunksD() {
return hAxisChunksD;
}
public void sethAxisChunksD(List<Object> hAxisChunksD) {
this.hAxisChunksD = hAxisChunksD;
}
public List<Object> gethAxisChunksU() {
return hAxisChunksU;
}
public void sethAxisChunksU(List<Object> hAxisChunksU) {
this.hAxisChunksU = hAxisChunksU;
}
public Boolean getIs_bitmap() {
return is_bitmap;
}
public void setIs_bitmap(Boolean is_bitmap) {
this.is_bitmap = is_bitmap;
}
public String getFile_source() {
return file_source;
}
public void setFile_source(String file_source) {
this.file_source = file_source;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
public Integer getChart_version() {
return chart_version;
}
public void setChart_version(Integer chart_version) {
this.chart_version = chart_version;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public Date getCreate_time() {
return create_time;
}
public void setCreate_time(Date create_time) {
this.create_time = create_time;
}
public Date getLast_updated() {
return last_updated;
}
public void setLast_updated(Date last_updated) {
this.last_updated = last_updated;
}
public Boolean getDeleted() {
return deleted;
}
public void setDeleted(Boolean deleted) {
this.deleted = deleted;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getSvgFile() {
return svgFile;
}
public void setSvgFile(String svgFile) {
this.svgFile = svgFile;
}
public String getPngFile() {
return pngFile;
}
public void setPngFile(String pngFile) {
this.pngFile = pngFile;
}
public ComprehensiveChartGraphChartDataBO getData() {
return data;
}
public void setData(ComprehensiveChartGraphChartDataBO data) {
this.data = data;
}
public Map<String,Float> getArea() {
return area;
}
public void setArea(Map<String,Float> area) {
this.area = area;
}
@Override
public String toString() {
return "HbChartsModel{" +
"_id='" + _id + '\'' +
", is_ppt=" + is_ppt +
", algorithmCommitTime='" + algorithmCommitTime + '\'' +
", fileId=" + fileId +
", pageIndex=" + pageIndex +
", chartType='" + chartType + '\'' +
", subtypes=" + subtypes +
", legends=" + legends +
", vAxisTextL=" + vAxisTextL +
", vAxisChunksR=" + vAxisChunksR +
", hAxisChunksD=" + hAxisChunksD +
", hAxisChunksU=" + hAxisChunksU +
", is_bitmap=" + is_bitmap +
", file_source='" + file_source + '\'' +
", fileUrl='" + fileUrl + '\'' +
", chart_version=" + chart_version +
", state=" + state +
", create_time=" + create_time +
", last_updated=" + last_updated +
", deleted=" + deleted +
", title='" + title + '\'' +
", svgFile='" + svgFile + '\'' +
", pngFile='" + pngFile + '\'' +
", data=" + data +
", area=" + area +
'}';
}
}
| [
"zhairp@zhairpdeMacBook-Pro.local"
] | zhairp@zhairpdeMacBook-Pro.local |
b2d5060427b7813e1ce14a51cac57ed50e83fa3b | 6504352f86c2e4f7ef16cea3f5b7cc00bba96a33 | /WmesWeb/src/com/fsll/wmes/chat/pojo/JsonResultType.java | 8204b3c018f2514a057a333a4eb6d8b9ac0802ac | [] | no_license | jedyang/XFAWealth | 1a20c7b4d16c72883b27c4d8aa72d67df4291b9a | 029d45620b3375a86fec8bb1161492325f9f2c6c | refs/heads/master | 2021-05-07T04:53:24.628018 | 2017-08-03T15:25:59 | 2017-08-03T15:25:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 225 | java | package com.fsll.wmes.chat.pojo;
/**
* Created by mjhuang
*/
public enum JsonResultType {
TYPESUCCESS("成功",0), TYPEFAILED("失败",1),TYPEEXCEPTION("异常" ,2);
JsonResultType(String s, int i) {
}
}
| [
"549592047@qq.com"
] | 549592047@qq.com |
64d49a3990b18126c120bc492bfd36db93435c67 | 6482753b5eb6357e7fe70e3057195e91682db323 | /it/unimi/dsi/fastutil/floats/FloatHeapPriorityQueue.java | b062be5f766426c0d042bd39ac72b7a0056fb776 | [] | no_license | TheShermanTanker/Server-1.16.3 | 45cf9996afa4cd4d8963f8fd0588ae4ee9dca93c | 48cc08cb94c3094ebddb6ccfb4ea25538492bebf | refs/heads/master | 2022-12-19T02:20:01.786819 | 2020-09-18T21:29:40 | 2020-09-18T21:29:40 | 296,730,962 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,159 | java | package it.unimi.dsi.fastutil.floats;
import java.util.Comparator;
import java.io.ObjectInputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.NoSuchElementException;
import java.util.Iterator;
import java.util.Collection;
import java.io.Serializable;
public class FloatHeapPriorityQueue implements FloatPriorityQueue, Serializable {
private static final long serialVersionUID = 1L;
protected transient float[] heap;
protected int size;
protected FloatComparator c;
public FloatHeapPriorityQueue(final int capacity, final FloatComparator c) {
this.heap = FloatArrays.EMPTY_ARRAY;
if (capacity > 0) {
this.heap = new float[capacity];
}
this.c = c;
}
public FloatHeapPriorityQueue(final int capacity) {
this(capacity, null);
}
public FloatHeapPriorityQueue(final FloatComparator c) {
this(0, c);
}
public FloatHeapPriorityQueue() {
this(0, null);
}
public FloatHeapPriorityQueue(final float[] a, final int size, final FloatComparator c) {
this(c);
FloatHeaps.makeHeap(this.heap = a, this.size = size, c);
}
public FloatHeapPriorityQueue(final float[] a, final FloatComparator c) {
this(a, a.length, c);
}
public FloatHeapPriorityQueue(final float[] a, final int size) {
this(a, size, null);
}
public FloatHeapPriorityQueue(final float[] a) {
this(a, a.length);
}
public FloatHeapPriorityQueue(final FloatCollection collection, final FloatComparator c) {
this(collection.toFloatArray(), c);
}
public FloatHeapPriorityQueue(final FloatCollection collection) {
this(collection, null);
}
public FloatHeapPriorityQueue(final Collection<? extends Float> collection, final FloatComparator c) {
this(collection.size(), c);
final Iterator<? extends Float> iterator = collection.iterator();
for (int size = collection.size(), i = 0; i < size; ++i) {
this.heap[i] = (float)iterator.next();
}
}
public FloatHeapPriorityQueue(final Collection<? extends Float> collection) {
this(collection, null);
}
public void enqueue(final float x) {
if (this.size == this.heap.length) {
this.heap = FloatArrays.grow(this.heap, this.size + 1);
}
this.heap[this.size++] = x;
FloatHeaps.upHeap(this.heap, this.size, this.size - 1, this.c);
}
public float dequeueFloat() {
if (this.size == 0) {
throw new NoSuchElementException();
}
final float result = this.heap[0];
final float[] heap = this.heap;
final int n = 0;
final float[] heap2 = this.heap;
final int size = this.size - 1;
this.size = size;
heap[n] = heap2[size];
if (this.size != 0) {
FloatHeaps.downHeap(this.heap, this.size, 0, this.c);
}
return result;
}
public float firstFloat() {
if (this.size == 0) {
throw new NoSuchElementException();
}
return this.heap[0];
}
public void changed() {
FloatHeaps.downHeap(this.heap, this.size, 0, this.c);
}
public int size() {
return this.size;
}
public void clear() {
this.size = 0;
}
public void trim() {
this.heap = FloatArrays.trim(this.heap, this.size);
}
public FloatComparator comparator() {
return this.c;
}
private void writeObject(final ObjectOutputStream s) throws IOException {
s.defaultWriteObject();
s.writeInt(this.heap.length);
for (int i = 0; i < this.size; ++i) {
s.writeFloat(this.heap[i]);
}
}
private void readObject(final ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
this.heap = new float[s.readInt()];
for (int i = 0; i < this.size; ++i) {
this.heap[i] = s.readFloat();
}
}
}
| [
"tanksherman27@gmail.com"
] | tanksherman27@gmail.com |
36e2cf589a390dcdf85540552ca912147402bc9d | a9914626c19f4fbcb5758a1953a4efe4c116dfb9 | /L2JTW_DataPack_Ertheia/dist/game/data/scripts/handlers/targethandlers/Servitor.java | f7b391c5769b2406d3ccc6893566d1fac5243346 | [] | no_license | mjsxjy/l2jtw_datapack | ba84a3bbcbae4adbc6b276f9342c248b6dd40309 | c6968ae0475a076080faeead7f94bda1bba3def7 | refs/heads/master | 2021-01-19T18:21:37.381390 | 2015-08-03T00:20:39 | 2015-08-03T00:20:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,573 | java | /*
* Copyright (C) 2004-2014 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack 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 DataPack 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 handlers.targethandlers;
import com.l2jserver.gameserver.handler.ITargetTypeHandler;
import com.l2jserver.gameserver.model.L2Object;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.skills.Skill;
import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
/**
* Target Servitor handler.
* @author Zoey76
*/
public class Servitor implements ITargetTypeHandler
{
@Override
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
{
if (activeChar.hasServitor())
{
return new L2Character[]
{
activeChar.getSummon()
};
}
return EMPTY_TARGET_LIST;
}
@Override
public Enum<L2TargetType> getTargetType()
{
return L2TargetType.SERVITOR;
}
}
| [
"rocknow@9bd44e3e-6552-0410-907e-a6ca40b856b6"
] | rocknow@9bd44e3e-6552-0410-907e-a6ca40b856b6 |
209f939be9ab477eaa36686dd5e75293fd1c363e | 62cc557b43fb928a16f70b01bd83f45429b1103c | /transformation/common/src/main/java/org/jboss/mapper/camel/blueprint/BatchResequencerConfig.java | d88c7e64bbaf7e9d1fa0bdca02c59ed112ef73e0 | [] | no_license | cominvent/fuseide | f40ab291aad7ec7f063659406e019bc4a1b17183 | 6fe7f077743db39a8c7b8e8c0ee1e3b8cac1edaa | refs/heads/master | 2021-01-18T18:48:17.542452 | 2015-03-05T14:00:25 | 2015-03-05T14:04:25 | 31,892,473 | 0 | 1 | null | 2015-03-09T10:38:39 | 2015-03-09T10:38:39 | null | UTF-8 | Java | false | false | 4,539 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// 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: 2015.02.13 at 12:09:41 PM EST
//
package org.jboss.mapper.camel.blueprint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for batchResequencerConfig complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="batchResequencerConfig">
* <complexContent>
* <extension base="{http://camel.apache.org/schema/blueprint}resequencerConfig">
* <sequence>
* </sequence>
* <attribute name="batchSize" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="batchTimeout" type="{http://www.w3.org/2001/XMLSchema}long" />
* <attribute name="allowDuplicates" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* <attribute name="reverse" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* <attribute name="ignoreInvalidExchanges" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "batchResequencerConfig")
public class BatchResequencerConfig
extends ResequencerConfig
{
@XmlAttribute(name = "batchSize")
protected Integer batchSize;
@XmlAttribute(name = "batchTimeout")
protected Long batchTimeout;
@XmlAttribute(name = "allowDuplicates")
protected Boolean allowDuplicates;
@XmlAttribute(name = "reverse")
protected Boolean reverse;
@XmlAttribute(name = "ignoreInvalidExchanges")
protected Boolean ignoreInvalidExchanges;
/**
* Gets the value of the batchSize property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getBatchSize() {
return batchSize;
}
/**
* Sets the value of the batchSize property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setBatchSize(Integer value) {
this.batchSize = value;
}
/**
* Gets the value of the batchTimeout property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getBatchTimeout() {
return batchTimeout;
}
/**
* Sets the value of the batchTimeout property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setBatchTimeout(Long value) {
this.batchTimeout = value;
}
/**
* Gets the value of the allowDuplicates property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isAllowDuplicates() {
return allowDuplicates;
}
/**
* Sets the value of the allowDuplicates property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setAllowDuplicates(Boolean value) {
this.allowDuplicates = value;
}
/**
* Gets the value of the reverse property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isReverse() {
return reverse;
}
/**
* Sets the value of the reverse property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setReverse(Boolean value) {
this.reverse = value;
}
/**
* Gets the value of the ignoreInvalidExchanges property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isIgnoreInvalidExchanges() {
return ignoreInvalidExchanges;
}
/**
* Sets the value of the ignoreInvalidExchanges property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setIgnoreInvalidExchanges(Boolean value) {
this.ignoreInvalidExchanges = value;
}
}
| [
"kbabo@redhat.com"
] | kbabo@redhat.com |
8997e3a577832bacd5f922eb249fef60baf229cf | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/gradle--gradle/5e928c3969e5178c2053f3644ebaf2f0b66cddd3/after/ClientModuleTest.java | 0d8d022f8af89970afdbcd1ee5289098b89e8389 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,643 | java | /*
* Copyright 2007-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.api.dependencies;
import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
import org.gradle.api.InvalidUserDataException;
import org.gradle.api.DependencyManager;
import org.gradle.api.internal.dependencies.*;
import org.gradle.api.internal.dependencies.ivy.DependencyDescriptorFactory;
import org.gradle.api.internal.dependencies.ivy.ClientModuleDescriptorFactory;
import org.gradle.util.HelperUtil;
import org.gradle.util.WrapUtil;
import org.jmock.integration.junit4.JMock;
import org.jmock.integration.junit4.JUnit4Mockery;
import org.jmock.Expectations;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
import org.junit.runner.RunWith;
import org.hamcrest.Matchers;
import java.util.Map;
import java.util.HashMap;
/**
* @author Hans Dockter
*/
@RunWith(JMock.class)
public class ClientModuleTest {
static final String TEST_GROUP = "org.gradle";
static final String TEST_NAME = "gradle-core";
static final String TEST_VERSION = "4.4-beta2";
static final String TEST_CLASSIFIER = "jdk-1.4";
static final String TEST_MODULE_DESCRIPTOR = String.format("%s:%s:%s", TEST_GROUP, TEST_NAME, TEST_VERSION);
static final String TEST_MODULE_DESCRIPTOR_WITH_CLASSIFIER = TEST_MODULE_DESCRIPTOR + ":" + TEST_CLASSIFIER;
protected static final DefaultDependencyConfigurationMappingContainer TEST_CONF_MAPPING =
new DefaultDependencyConfigurationMappingContainer() {{
addMasters(new DefaultConfiguration("someConf", new DefaultConfigurationContainer()));
}};
ClientModule clientModule;
Map<String, ModuleDescriptor> testModuleRegistry = new HashMap<String, ModuleDescriptor>();
DependencyContainerInternal dependencyContainerMock;
DefaultDependencyDescriptor expectedDependencyDescriptor;
private JUnit4Mockery context = new JUnit4Mockery();
private DependencyDescriptorFactory dependencyDescriptorFactoryMock;
@Before
public void setUp() {
dependencyDescriptorFactoryMock = context.mock(DependencyDescriptorFactory.class);
dependencyContainerMock = context.mock(DependencyContainerInternal.class);
clientModule = new ClientModule(TEST_CONF_MAPPING, TEST_MODULE_DESCRIPTOR, dependencyContainerMock);
expectedDependencyDescriptor = HelperUtil.getTestDescriptor();
}
@Test
public void testInitWithoutClassifier() {
checkInit(TEST_MODULE_DESCRIPTOR);
}
@Test
public void testInitWitClassifier() {
clientModule = new ClientModule(TEST_CONF_MAPPING, TEST_MODULE_DESCRIPTOR_WITH_CLASSIFIER, dependencyContainerMock);
checkInit(TEST_MODULE_DESCRIPTOR_WITH_CLASSIFIER);
Artifact artifact = clientModule.getArtifacts().get(0);
assertEquals(TEST_NAME, artifact.getName());
assertEquals(Artifact.DEFAULT_TYPE, artifact.getType());
assertEquals(Artifact.DEFAULT_TYPE, artifact.getExtension());
assertEquals(TEST_CLASSIFIER, artifact.getClassifier());
}
private void checkInit(String id) {
assertEquals(clientModule.getDependencyConfigurationMappings(), TEST_CONF_MAPPING);
assertEquals(clientModule.getDependencyConfigurationMappings(), TEST_CONF_MAPPING);
assertEquals(clientModule.getId(), id);
assertEquals(TEST_GROUP, clientModule.getGroup());
assertEquals(TEST_NAME, clientModule.getName());
assertEquals(TEST_VERSION, clientModule.getVersion());
assertFalse(clientModule.isForce());
assertTrue(clientModule.isTransitive());
}
@Test(expected = InvalidUserDataException.class)
public void testInitWithNull() {
new ClientModule(TEST_CONF_MAPPING, null, dependencyContainerMock);
}
@Test(expected = InvalidUserDataException.class)
public void testInitWithFiveParts() {
new ClientModule(TEST_CONF_MAPPING, "1:2:3:4:5", dependencyContainerMock);
}
@Test(expected = InvalidUserDataException.class)
public void testInitWithTwoParts() {
new ClientModule(TEST_CONF_MAPPING, "1:2", dependencyContainerMock);
}
@Test(expected = InvalidUserDataException.class)
public void testInitWithOneParts() {
new ClientModule(TEST_CONF_MAPPING, "1", dependencyContainerMock);
}
@Test
public void testCreateDependencyDescriptor() {
final ClientModule clientModule = new ClientModule(TEST_CONF_MAPPING, TEST_MODULE_DESCRIPTOR_WITH_CLASSIFIER, dependencyContainerMock);
final ClientModuleDescriptorFactory clientModuleDescriptorFactoryMock = context.mock(ClientModuleDescriptorFactory.class);
clientModule.setClientModuleDescriptorFactory(clientModuleDescriptorFactoryMock);
clientModule.setDependencyDescriptorFactory(dependencyDescriptorFactoryMock);
final ModuleDescriptor parentModuleDescriptorMock = context.mock(ModuleDescriptor.class, "parent");
final ModuleDescriptor clientModuleDescriptorMock = context.mock(ModuleDescriptor.class, "clientModule");
context.checking(new Expectations() {{
allowing(dependencyContainerMock).getClientModuleRegistry();
will(returnValue(testModuleRegistry));
allowing(dependencyDescriptorFactoryMock).createFromClientModule(parentModuleDescriptorMock,
clientModule);
will(returnValue(expectedDependencyDescriptor));
allowing(clientModuleDescriptorFactoryMock).createModuleDescriptor(
expectedDependencyDescriptor.getDependencyRevisionId(), dependencyContainerMock);
will(returnValue(clientModuleDescriptorMock));
}});
assertSame(expectedDependencyDescriptor, clientModule.createDependencyDescriptor(parentModuleDescriptorMock));
assertThat((ModuleDescriptor) testModuleRegistry.get(TEST_MODULE_DESCRIPTOR_WITH_CLASSIFIER), Matchers.sameInstance(clientModuleDescriptorMock));
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
83ce315e247e79e388eef539b126bfc9f3ee2457 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_25772.java | b3078313c68081dc8aea5c9e83a9bf7906f3a6ea | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 259 | java | @Override public void visitNewClass(JCTree.JCNewClass tree){
super.visitNewClass(tree);
Type type=ASTHelpers.getType(tree.clazz);
if (type == null) {
return;
}
if (memberOfEnclosing(owner,state,type.tsym)) {
canPossiblyBeStatic=false;
}
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
ca9bb8e6c1a8e80d2c81d8a0d3ce8606ff3ccc2a | b4878c30306dd2719f137622adc3969cf9ae5766 | /projeeee/src/com/example/projeeee/MainActivity.java | 22056b421473e703d15067e5fb8550cd1951c7b8 | [] | no_license | agarwalmohit43/Android-Older-Projects-2015- | a0004bf7db5c2f2d2e98e6a388040f60304f129d | a7190fd341575113373ec32e2d63035b1d331609 | refs/heads/master | 2021-01-19T17:02:26.058637 | 2017-08-22T08:07:50 | 2017-08-22T08:07:50 | 101,037,677 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,827 | java | package com.example.projeeee;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.TranslateAnimation;
import android.widget.Button;
import android.widget.ImageView;
public class MainActivity extends Activity implements OnClickListener {
ImageView iv;
Button z, x, c, vv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
iv = (ImageView) findViewById(R.id.imageView1);
z = (Button) findViewById(R.id.button1);
x = (Button) findViewById(R.id.button2);
c = (Button) findViewById(R.id.button3);
vv = (Button) findViewById(R.id.button4);
iv.setOnClickListener(this);
}
@Override
public void onClick(View v) {
// iv.setVisibility(View.GONE);
// Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.move);
// iv.startAnimation(animation);
z.setVisibility(View.VISIBLE);
x.setVisibility(View.VISIBLE);
c.setVisibility(View.VISIBLE);
vv.setVisibility(View.VISIBLE);
Animation animation22 = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.bounce);
Animation animation23 = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.blink);
Animation animation24 = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.rotate);
Animation animation25 = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zoom_out);
z.startAnimation(animation22);
x.startAnimation(animation23);
c.startAnimation(animation24);
vv.startAnimation(animation25);
}
}
| [
"agarwalmohit43@gmail.com"
] | agarwalmohit43@gmail.com |
bb8b8eb308445fd112c91e76d9ef1458859ccf0c | 2da87d8ef7afa718de7efa72e16848799c73029f | /ikep4-socialpack/src/main/java/com/lgcns/ikep4/socialpack/socialblog/base/Constant.java | dbc0d031cbbfc116c613f022ecdd6128d263a112 | [] | no_license | haifeiforwork/ehr-moo | d3ee29e2cae688f343164384958f3560255e52b2 | 921ff597b316a9a0111ed4db1d5b63b88838d331 | refs/heads/master | 2020-05-03T02:34:00.078388 | 2018-04-05T00:54:04 | 2018-04-05T00:54:04 | 178,373,434 | 0 | 1 | null | 2019-03-29T09:21:01 | 2019-03-29T09:21:01 | null | UTF-8 | Java | false | false | 1,983 | java | /*
* Copyright (C) 2011 LG CNS Inc.
* All rights reserved.
*
* 모든 권한은 LG CNS(http://www.lgcns.com)에 있으며,
* LG CNS의 허락없이 소스 및 이진형식으로 재배포, 사용하는 행위를 금지합니다.
*/
package com.lgcns.ikep4.socialpack.socialblog.base;
/**
* 소셜 블로그용 Constant
*
* @author 이형운
* @version $Id: Constant.java 16246 2011-08-18 04:48:28Z giljae $
*/
public final class Constant {
/**
* 기본 생성자
*/
private Constant(){}
/**
* 소셜 블로그 Default 포스팅 조회 용 Row Count
*/
public static final Integer SOCIAL_BLOG_DEFAULT_POSTING_ROW_COUNT = 3;
/**
* 소셜 블로그 업로드시 사용 하는 File Buffer Size
*/
public static final long SOCIAL_BLOG_FILE_BUFFER_SIZE = 1024;
/**
* 소셜 블로그 업로드 가능한 이미지 파일 사이즈
*/
public static final long SOCIAL_BLOG_IMAGE_FILE_SIZE = 1000000;
/**
* 소셜 블로그 업로드 가능한 파일 사이즈
*/
public static final long SOCIAL_BLOG_FILE_SIZE = 1000000;
/**
* 소셜 블로그 업로드 불가능 파일 타입 설정
*/
public static final String SOCICAL_BLOG_RESTRICTION_TYPE = "exe^bat^code";
/**
* 소셜 블로그 시스템 사용자 ID 체크 값
*/
public static final String SOCIAL_BLOG_SYSTEM_ID = "SB";
/**
* 소셜 블로그 시스템 사용자 ID 체크 값
*/
public static final Integer SOCIAL_BLOG_TAG_CLOUD_COUNT = 10;
/**
* 블로그 최근 Comment 가져 오는 Default Value
*/
public static final Integer SOCIAL_BLOG_RECENT_COMMENT_COUNT = 5;
/**
* 소셜 블로그 방문자 차트 조회시 기준 WEEK DATE 수
*/
public static final int SOCIAL_BLOG_BASE_WEEK_DATE = 2;
/**
* 소셜 블로그 방문자 차트 조회시 기준일 관련 전날 조회용 DATE 일수
*/
public static final int SOCIAL_BLOG_BASE_REALATIVE_DATE = 6;
}
| [
"haneul9@gmail.com"
] | haneul9@gmail.com |
0e58b9279c4cd77a2e39059933c7b13d26e077cb | cfc9e6b1d923642307c494cfaf31e5d437e8609b | /com/hbm/items/gear/ArmorTest.java | 0a236df194def7791485cca67dec891d2a8992e4 | [
"WTFPL"
] | permissive | erbege/Hbm-s-Nuclear-Tech-GIT | 0553ff447032c6e9bbc5b5d8a3f480bc33aac13d | 043a07d5871568993526928db1457508f6e4c4f3 | refs/heads/master | 2023-08-02T16:32:28.680199 | 2020-09-16T20:53:45 | 2020-09-16T20:53:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 991 | java | package com.hbm.items.gear;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class ArmorTest extends ItemArmor {
private String [] armourTypes = new String [] {"test_helmet", "test_chestplate", "test_leggings", "test_boots"};
public ArmorTest(ArmorMaterial armorMaterial, int renderIndex, int armorType) {
super(armorMaterial, renderIndex, armorType);
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
if(stack.getItem().equals(ModItems.test_helmet) || stack.getItem().equals(ModItems.test_chestplate) || stack.getItem().equals(ModItems.test_boots)) {
return (RefStrings.MODID + ":textures/armor/test_1.png");
}
if(stack.getItem().equals(ModItems.test_leggings)) {
return (RefStrings.MODID + ":textures/armor/test_2.png");
}
else return null;
}
}
| [
"hbmmods@gmail.com"
] | hbmmods@gmail.com |
06b5f9bbe8e7bb52929c194023e79f4d5ec383a4 | 52b219f3fcbb88982bc98b95d27c09cc646cdb1d | /ProductDocKing/trunk/src/main/java/com/xinyunfu/dto/jd/shelf/JDShelfPositionDto.java | 1afe756c0a88cba41ee286081190af5063876fcb | [] | no_license | jiangqiang520/xyfProjects | d65d9f144522bbbbf492dba4a847afd0784b84ac | ab348de96b5c0c6a4f46d609720e189c274a4b26 | refs/heads/master | 2020-09-06T14:12:31.464210 | 2019-09-23T09:52:08 | 2019-09-23T09:52:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 426 | java | package com.xinyunfu.dto.jd.shelf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class JDShelfPositionDto {
private int id;
private long merchant_id; //商户id
private String title; //位置描述
private long create_time; //添加时间
private int father_id; //父id
}
| [
"294442437@qq.com"
] | 294442437@qq.com |
b8b6a65cef5151058b996bd38d94b6c811aac34e | 740137dc8d36b0d1af37455157c52bdd50884cb2 | /Herbert Schildt/Chapter5/src/main/java/SourceCode/SubStr.java | 4b8c09714d0a75b4fab69cb60dce72707ee81222 | [] | no_license | SamoraJourdan/Java | 789f5613820bb16a3d3a6baf9324068ee3293d3b | 999d6e69292868396c0d529713d9024c0db54aa7 | refs/heads/main | 2023-08-17T11:20:14.867890 | 2021-10-11T06:57:55 | 2021-10-11T06:57:55 | 380,950,475 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 545 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package SourceCode;
// Use substring().
class SubStr {
public static void main(String args[]) {
String orgstr = "Java makes the Web move.";
// construct a substring
String substr = orgstr.substring(5, 18);
System.out.println("orgstr: " + orgstr);
System.out.println("substr: " + substr);
}
} | [
"samorajourdan@gmail.com"
] | samorajourdan@gmail.com |
d3a5fce3033411c3c9ea51bf683d036cdb2c302e | 995c1b7c61bbf6e28d69bc36d4721be9c1a3b7c4 | /xxpay-manage/src/main/java/org/xxpay/manage/order/ctrl/MchNotifyController.java | 5ee2d59d847b51686a8cacb6f6da06584bfa704f | [] | no_license | launchfirst2020/xxpay4new | 94bdb9cf3c974ac51214a13dfec279b8c34029d1 | 54247cd9cf64aacfffe84455a7ac1bf61420ffc2 | refs/heads/master | 2023-04-09T21:10:13.344707 | 2021-01-22T09:10:28 | 2021-01-22T09:10:28 | 331,880,197 | 5 | 9 | null | null | null | null | UTF-8 | Java | false | false | 4,188 | java | package org.xxpay.manage.order.ctrl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.xxpay.core.common.annotation.MethodLog;
import org.xxpay.core.common.constant.Constant;
import org.xxpay.core.common.constant.PayConstant;
import org.xxpay.core.common.domain.XxPayPageRes;
import org.xxpay.core.common.domain.XxPayResponse;
import org.xxpay.core.common.util.MyLog;
import org.xxpay.core.common.util.XXPayUtil;
import org.xxpay.core.entity.MchNotify;
import org.xxpay.manage.common.ctrl.BaseController;
import org.xxpay.manage.common.service.RpcCommonService;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@Controller
@RequestMapping(Constant.MGR_CONTROLLER_ROOT_PATH + "/mch_notify")
public class MchNotifyController extends BaseController {
private static final MyLog _log = MyLog.getLog(MchNotifyController.class);
@Autowired
private RpcCommonService rpcCommonService;
/**
* 查询单条商户通知记录
* @return
*/
@RequestMapping("/get")
@ResponseBody
public ResponseEntity<?> get() {
String orderId = getValStringRequired( "orderId");
MchNotify mchNotify = rpcCommonService.rpcMchNotifyService.findByOrderId(orderId);
return ResponseEntity.ok(XxPayResponse.buildSuccess(mchNotify));
}
/**
* 商户通知记录列表
* @return
*/
@RequestMapping("/list")
@ResponseBody
public ResponseEntity<?> list() {
MchNotify mchNotify = getObject( MchNotify.class);
int count = rpcCommonService.rpcMchNotifyService.count(mchNotify);
if(count == 0) return ResponseEntity.ok(XxPayPageRes.buildSuccess());
List<MchNotify> mchNotifyList = rpcCommonService.rpcMchNotifyService.select(
(getPageIndex() -1) * getPageSize(), getPageSize(), mchNotify);
return ResponseEntity.ok(XxPayPageRes.buildSuccess(mchNotifyList, count));
}
/**
* 重发通知
* @return
*/
@RequestMapping("/resend")
@ResponseBody
@MethodLog( remark = "重发商户通知" )
public ResponseEntity<?> resend() {
String orderIdsParam = getValStringRequired( "orderIds");
JSONArray orderIds = JSON.parseArray(orderIdsParam);
JSONObject resultJSON = new JSONObject();
if(orderIds.size() <= 0 ){
resultJSON.put("errMsg", "请选择重发订单!");
return ResponseEntity.ok(XxPayResponse.buildSuccess(resultJSON));
}
if(orderIds.size() > 10 ){
resultJSON.put("errMsg", "批量重发商户通知个数不得大于10个!");
return ResponseEntity.ok(XxPayResponse.buildSuccess(resultJSON));
}
int sendCount = 0 ;
for(Object id: orderIds){
MchNotify mchNotify = rpcCommonService.rpcMchNotifyService.findByOrderId(id.toString());
if(mchNotify.getStatus() == PayConstant.MCH_NOTIFY_STATUS_SUCCESS || StringUtils.isBlank(mchNotify.getNotifyUrl())) continue;
try {
byte updateCount = (byte) (mchNotify.getNotifyCount() + 1);
String result = XXPayUtil.call4Post(mchNotify.getNotifyUrl());
if("success".equalsIgnoreCase(result)){
rpcCommonService.rpcMchNotifyService.updateMchNotifySuccess(mchNotify.getOrderId(), result, updateCount);
}else{
rpcCommonService.rpcMchNotifyService.updateMchNotifyFail(mchNotify.getOrderId(), result, updateCount);
}
sendCount ++;
} catch (Exception e) {
_log.error("重发失败 id={}", id, e);
}
}
resultJSON.put("sendCount", sendCount);
return ResponseEntity.ok(XxPayResponse.buildSuccess(resultJSON));
}
} | [
"launchfirst_baggio@163.com"
] | launchfirst_baggio@163.com |
c6d6cb9fc564c35a5e7f69126f4535d03bb2c190 | dd80a584130ef1a0333429ba76c1cee0eb40df73 | /external/jsilver/src/com/google/clearsilver/jsilver/syntax/node/AVariableExpression.java | 5e9bc4df33cbf04001fa8bf469d8c506c2b00303 | [
"MIT"
] | permissive | karunmatharu/Android-4.4-Pay-by-Data | 466f4e169ede13c5835424c78e8c30ce58f885c1 | fcb778e92d4aad525ef7a995660580f948d40bc9 | refs/heads/master | 2021-03-24T13:33:01.721868 | 2017-02-18T17:48:49 | 2017-02-18T17:48:49 | 81,847,777 | 0 | 2 | MIT | 2020-03-09T00:02:12 | 2017-02-13T16:47:00 | null | UTF-8 | Java | false | false | 1,960 | java | /* This file was generated by SableCC (http://www.sablecc.org/). */
package com.google.clearsilver.jsilver.syntax.node;
import com.google.clearsilver.jsilver.syntax.analysis.*;
@SuppressWarnings("nls")
public final class AVariableExpression extends PExpression
{
private PVariable _variable_;
public AVariableExpression()
{
// Constructor
}
public AVariableExpression(
@SuppressWarnings("hiding") PVariable _variable_)
{
// Constructor
setVariable(_variable_);
}
@Override
public Object clone()
{
return new AVariableExpression(
cloneNode(this._variable_));
}
public void apply(Switch sw)
{
((Analysis) sw).caseAVariableExpression(this);
}
public PVariable getVariable()
{
return this._variable_;
}
public void setVariable(PVariable node)
{
if(this._variable_ != null)
{
this._variable_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._variable_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._variable_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._variable_ == child)
{
this._variable_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._variable_ == oldChild)
{
setVariable((PVariable) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}
| [
"karun.matharu@gmail.com"
] | karun.matharu@gmail.com |
46a49e33a2a54cf182e71d8de46ebb366c0fd41d | 229bea88558ba355856e000f95a71e6491eeae9f | /commons-vfs2-2.0/core/src/main/java/org/apache/commons/vfs/util/RandomAccessMode.java | 0f199b2036ff22057caffab0e0e573c7196efd5b | [
"Apache-2.0"
] | permissive | tpso-src/thirdparty | 1d255893e0149ea2e79395b2bf8154783b0ba3be | 9b033adff45bc7a5dcecd3d5bf13a200e4b6ad67 | refs/heads/master | 2021-01-19T02:57:18.402854 | 2016-07-21T11:35:36 | 2016-07-21T11:35:36 | 44,494,736 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,954 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.vfs.util;
/**
* An enumerated type representing the modes of a random access content.
*
* @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
*/
public enum RandomAccessMode
{
/**
* read.
*/
READ(true, false),
/**
* read/write.
*/
READWRITE(true, true);
private final boolean read;
private final boolean write;
private RandomAccessMode(final boolean read, final boolean write)
{
this.read = read;
this.write = write;
}
public boolean requestRead()
{
return read;
}
public boolean requestWrite()
{
return write;
}
/**
* @return The mode String.
* @since 2.0
* */
public String getModeString()
{
if (requestRead())
{
if (requestWrite())
{
return "rw"; // NON-NLS
}
else
{
return "r"; // NON-NLS
}
}
else if (requestWrite())
{
return "w"; // NON-NLS
}
return "";
}
}
| [
"ms@tpso.com"
] | ms@tpso.com |
3652ce77157e249e34a9cb212611024599fcc6c5 | b7d02e2c41287e4de09091b43145ec7e8239e303 | /src/main/java/org/terasology/kallisti/oc/proxy/OCUserdataProxyMap.java | d39fa436f5408e765ba04a49dd2f362a48ae14c9 | [] | no_license | MovingBlocks/Kallisti | eb62ba3c0bdb2b21241c2c7b03a653ba7d80cca3 | 7a85a0ed8d4b5d5dd3e1a34c883dc902732cac0d | refs/heads/master | 2021-12-15T04:38:52.709013 | 2019-02-04T17:49:56 | 2019-02-04T17:50:20 | 135,256,374 | 22 | 2 | null | 2021-11-27T20:06:51 | 2018-05-29T07:15:02 | Java | UTF-8 | Java | false | false | 969 | java | /*
* Copyright 2018 Adrian Siekierka, MovingBlocks
*
* 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.terasology.kallisti.oc.proxy;
import java.util.Map;
public class OCUserdataProxyMap implements OCUserdataProxy<Map> {
@Override
public Object index(Map object, Object key) {
return object.get(key);
}
@Override
public void newindex(Map object, Object key, Object value) {
object.put(key, value);
}
}
| [
"kontakt@asie.pl"
] | kontakt@asie.pl |
6a4f116140102eba4907cf1342008e9ae3b507bc | 468760efd49edac72fa1a5e77da99f5553113b7a | /src/main/java/com/liujun/pattern/command/project/AbsCommon.java | 99d7744f6d508f0955369b39367f0112a4bcf2b4 | [] | no_license | kkzfl22/demo | 4f2f8d262c418079d901af29ac91d5a402e35fb3 | 0271bc5c5b534399878b109c11c45aca75f3d55a | refs/heads/master | 2022-12-22T07:55:02.200707 | 2019-09-06T11:17:52 | 2019-09-06T11:17:52 | 205,347,807 | 2 | 0 | null | 2022-12-16T01:21:43 | 2019-08-30T09:15:28 | Java | UTF-8 | Java | false | false | 840 | java | package com.liujun.pattern.command.project;
/**
* 基本的命令操作
* @author liujun
*
*/
public abstract class AbsCommon
{
/**
* 需求工程师实现
*/
private EngineerInf demandEnginner;
/**
* 代码工程师
*/
private EngineerInf codeEnginner;
/**
* 美术工程师实现
*/
private EngineerInf artenginner;
/**
* 执行的命令
*/
protected abstract void exec();
public AbsCommon(EngineerInf demandEnginner, EngineerInf codeEnginner, EngineerInf artenginner)
{
this.demandEnginner = demandEnginner;
this.codeEnginner = codeEnginner;
this.artenginner = artenginner;
}
public EngineerInf getDemandEnginner()
{
return demandEnginner;
}
public EngineerInf getCodeEnginner()
{
return codeEnginner;
}
public EngineerInf getArtenginner()
{
return artenginner;
}
}
| [
"422134235@qq.com"
] | 422134235@qq.com |
4e6085981bc83ca289cadbf01bc31f50bcbfddb5 | f7f29b8c8a8b997ecd8ae3009d17bd7cd42317f8 | /09 - IOCProj9-ConstructorInjection-ResolvingParams/src/com/nt/test/ConstructorInjection.java | 8c0e3c0976eab8a9288175ec1ae4d437985fd4f1 | [] | no_license | PraveenJavaWorld/Spring | 802244885ec9f4e5710a5af630e47621c1c6d973 | d4f987b987f2a8b142440c992114ecb66aec3412 | refs/heads/master | 2023-05-29T08:06:25.273785 | 2021-06-11T16:18:35 | 2021-06-11T16:18:35 | 315,967,988 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,061 | java | package com.nt.test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import com.nt.beans.Student;
public class ConstructorInjection {
public static void main(String[] args) {
//Create IOC Container
DefaultListableBeanFactory factory = new DefaultListableBeanFactory();
//Create XmlBeanDefinitionReader obj
XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(factory);
//load and parse spring bean cfg file
reader.loadBeanDefinitions("com/nt/cfgs/applicationContext.xml");
//get Spring bean class obj
Student st = factory.getBean("stud",Student.class);
System.out.println("Object Data::"+st);
System.out.println("========================");
Student st1 = factory.getBean("stud1",Student.class);
System.out.println("Object Data::"+st1);
System.out.println("========================");
Student st2 = factory.getBean("stud2",Student.class);
System.out.println("Object Data::"+st2);
}
}
| [
"praveen97javaworld@gmail.com"
] | praveen97javaworld@gmail.com |
a0d87bf23a9a1f166b0b8b4b0cf2eb9291f5d90c | dfa806c8777cdea0de8bb19af7968320a9a42f66 | /internet-finance-app/src/main/java/com/hc9/web/main/service/RechargesService.java | b9e962ab61afb9781a4dbb74b39f69576ad679db | [] | no_license | jxcpu2008/internet-finance-qhhc | 1ccf6923e08621ee911acfdbb69d7a630068547d | 7f581aec6bdacc761e21d9cfadcbf2f688a59850 | refs/heads/master | 2021-05-16T01:30:17.477342 | 2017-10-16T02:08:57 | 2017-10-16T02:35:47 | 107,069,474 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,359 | java | package com.hc9.web.main.service;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.hc9.web.main.common.hibernate.impl.HibernateSupport;
import com.hc9.web.main.entity.Recharge;
import com.hc9.web.main.util.StringUtil;
import com.hc9.web.main.vo.PageModel;
/** 在线充值的业务处理 */
@Service
public class RechargesService {
@Resource
private HibernateSupport dao;
/**
* 查询充值信息
*
* @param id
* 当前登录账户编号
* @param beginTime
* 开始时间
* @param endTime
* 结束时间
* @return list 返回当前用户的充值信息
*/
public List<Recharge> rechargeList(Long id, String beginTime,
String endTime, Integer search, PageModel page) {
StringBuffer sql = new StringBuffer("SELECT * FROM recharge r where r.user_id="+ id);
StringBuffer sqlCount = new StringBuffer(
"select count(1) from recharge r where r.user_id=" + id);
if (StringUtil.isNotBlank(beginTime)) { // 开始时间
sql.append(" and date_format(r.time,'%Y-%m-%d')>='").append(
beginTime + "'");
sqlCount.append(" and date_format(r.time,'%Y-%m-%d')>='").append(
beginTime + "'");
}
if (StringUtil.isNotBlank(endTime)) { // 结束时间
sql.append(" and date_format(r.time,'%Y-%m-%d')<='").append(
endTime + "'");
sqlCount.append(" and date_format(r.time,'%Y-%m-%d')<='").append(
endTime + "'");
}
if (search != null && !"".equals(search)) { // 最近几个月
sql.append(" and DATE_SUB(now(),INTERVAL " + search
+ " MONTH) <= r.time");
sqlCount.append(" and DATE_SUB(now(),INTERVAL " + search
+ " MONTH) <= r.time");
}
page.setTotalCount(dao.queryNumberSql(sqlCount.toString()).intValue()); // 获取总记录数
sql.append(" ORDER BY r.time DESC LIMIT "+(page.getPageNum() - 1) * page.getNumPerPage())
.append(",").append(page.getNumPerPage());
List<Recharge> list = dao.findBySql(sql.toString(), Recharge.class);
page.setList(list);
return list;
}
/** 根据pId查询充值记录信息 */
public Recharge selRecharge(String rId) {
String sql = "select * from recharge where id=?";
Recharge recharge = dao.findObjectBySql(sql, Recharge.class, rId);
return recharge;
}
} | [
"jxcpu2008@163.com"
] | jxcpu2008@163.com |
0efc875ad608c71ae9e8f05a283fe20536a7f6bb | a1fae3ffef8f88241f0bdb3a2300bee5d2569464 | /app/src/main/java/com/xinlan/meizitu/data/TransCode.java | 52605b384a494a0e0831a049ca8bb222facd4a21 | [] | no_license | kuiwang/Meizitu | 99028bb497f4d9c731972de878e03a1e12484919 | c9e841236d139a36ebb4dc5a06dffc487722bc87 | refs/heads/master | 2023-05-31T01:09:00.935891 | 2021-06-18T13:35:01 | 2021-06-18T13:35:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 170 | java | package com.xinlan.meizitu.data;
/**
* Created by panyi on 2018/1/19.
*/
public final class TransCode {
public static final int CMD_UPDATE = 100;//检测更新
}
| [
"525647740@qq.com"
] | 525647740@qq.com |
b4b015da7b1779f261ba6b0a5f44b9a855d613a3 | 9ad0aa646102f77501efde94d115d4ff8d87422f | /LeetCode/java/src/house_robber_ii/Solution.java | 0be557429bc2c5c1be5655f3a3c6f40d483aeed6 | [] | no_license | xiaotdl/CodingInterview | cb8fc2b06bf587c83a9683d7b2cb80f5f4fd34ee | 514e25e83b0cc841f873b1cfef3fcc05f30ffeb3 | refs/heads/master | 2022-01-12T05:18:48.825311 | 2022-01-05T19:41:32 | 2022-01-05T19:41:32 | 56,419,795 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,889 | java | package house_robber_ii;
/**
* Created by Xiaotian on 7/21/16.
*/
public class Solution {
// tag: dp
// time: O(n), two iterations through A.
// space: O(n), 2 x one dimensional additional space.
public int rob(int[] A) {
if (A == null || A.length == 0) {
return 0;
}
// dp[i]: max money that can be robbed from {} || A[0..i-1]
// rob first house
int[] dp1 = new int[A.length + 1];
dp1[0] = 0;
dp1[1] = A[0];
for (int i = 2; i < A.length + 1; i++) {
int a = dp1[i - 1]; // doesn't rob last house
int b = dp1[i - 2] + A[i - 1]; // rob last house
if (i == A.length) {
dp1[i] = a;
} else {
dp1[i] = Math.max(a, b);
}
}
// doesn't rob first house
int[] dp2 = new int[A.length + 1];
dp2[0] = 0;
dp2[1] = 0;
for (int i = 2; i < A.length + 1; i++) {
int a = dp2[i - 1]; // doesn't rob last house
int b = dp2[i - 2] + A[i - 1]; // rob last house
dp2[i] = Math.max(a, b);
}
return Math.max(dp1[A.length], dp2[A.length]);
}
}
class SolutionII {
// same as SolutionI
public int rob(int[] A) {
if (A == null || A.length == 0) {
return 0;
}
if (A.length == 1) {
return A[0];
}
return Math.max(robHelper(A, 0, A.length - 2), robHelper(A, 1, A.length - 1));
}
private int robHelper(int[] A, int start, int end) {
int length = end - start + 1;
if (A == null || length <= 0) {
return 0;
}
// dp[i]: max money that can be robbed from A[start..i-1]
int[] dp = new int[length + 1];
dp[0] = 0;
for (int i = 1; i < length + 1; i++) {
// rob last house
int a = A[start + i - 1] + (i - 2 >= 0 ? dp[i - 2] : 0);
// doesn't rob last house
int b = dp[i - 1];
dp[i] = Math.max(a, b);
}
return dp[length];
}
}
class SolutionIII {
// same as SolutionI
public int rob(int[] A) {
if (A == null || A.length == 0) {
return 0;
}
if (A.length == 1) {
return A[0];
}
int n = A.length;
// dp[i]: max money robbed from house[0..i], with house[0] robbed, thus house[n - 1] can't be robbed
int[] dp1 = new int[n];
dp1[0] = A[0];
dp1[1] = A[0];
for (int i = 2; i < n - 1; i++) {
dp1[i] = Math.max(dp1[i - 2] + A[i], dp1[i - 1]);
}
// dp[i]: max money robbed from house[0..i], with house[0] not robbed
int[] dp2 = new int[n];
dp2[0] = 0;
dp2[1] = A[1];
for (int i = 2; i < n; i++) {
dp2[i] = Math.max(dp2[i - 2] + A[i], dp2[i - 1]);
}
return Math.max(dp1[n - 2], dp2[n - 1]);
}
}
class SolutionIV {
// tag: dp
// time: O(n)
// space: O(n), space can be improved to O(1) using 滚动优化
/*
* @param nums: An array of non-negative integers.
* @return: The maximum amount of money you can rob tonight
*/
public int houseRobber2(int[] A) {
if (A == null || A.length == 0) return 0;
if (A.length == 1) return A[0];
return Math.max(houseRobber1(A, 0, A.length - 2),
houseRobber1(A, 1, A.length - 1));
}
public int houseRobber1(int[] A, int s, int e) {
int length = e - s + 1;
// dp[i]: houseRobber1 from {} || A[0..i-1]
int[] dp = new int[length + 1];
dp[0] = 0;
dp[1] = A[s];
for (int i = 2; i < length + 1; i++) {
dp[i] = Math.max(dp[i - 1], dp[i - 2] + A[s + i - 1]);
}
return dp[length];
}
}
| [
"xiaotdl@gmail.com"
] | xiaotdl@gmail.com |
e2a08867cce85b8a4f1826cf6342351edd8636e9 | 5122a4619b344c36bfc969283076c12419f198ea | /src/test/java/com/snapwiz/selenium/tests/staf/dummies/apphelper/PostMessageValidate.java | ddb0e070ae403dbb1477e8097045ad1445f5ebc2 | [] | no_license | mukesh89m/automation | 0c1e8ff4e38e8e371cc121e64aacc6dc91915d3a | a0b4c939204af946cf7ca7954097660b2a0dfa8d | refs/heads/master | 2020-05-18T15:30:22.681006 | 2018-06-09T15:14:11 | 2018-06-09T15:14:11 | 32,666,214 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,876 | java | package com.snapwiz.selenium.tests.staf.dummies.apphelper;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
import com.snapwiz.selenium.tests.staf.dummies.Driver;
public class PostMessageValidate {
public boolean postMessageValidate(String postString)
{
boolean postfound = false;
try
{
Thread.sleep(5000);
List<WebElement> posts = Driver.driver.findElements(By.className("ls-stream-share__title"));
for(WebElement post : posts)
{
if(post.getText().trim().equals(postString))
{
postfound = true;
break;
}
}
if(postfound == true)
{
WebElement posttext = Driver.driver.findElement(By.className("ls-stream-post__action"));
if(!posttext.getText().trim().equals("posted a discussion"))
{
postfound = false;
}
}
}
catch(Exception e)
{
Assert.fail("Exception in App Helper PostMessageValidate",e);
}
return postfound;
}
public boolean validateLink(String linktoValidate)
{
boolean linkfound = false;
try
{
Thread.sleep(5000);
List<WebElement> links = Driver.driver.findElements(By.className("ls-stream-share__title"));
for(WebElement linktext : links)
{
if(linktext.getText().trim().equals(linktoValidate))
{
linkfound = true;
break;
}
}
if(linkfound == true)
{
WebElement posttext = Driver.driver.findElement(By.className("ls-stream-post__action"));
if(!posttext.getText().trim().equals("shared a link"))
{
linkfound = false;
}
}
}
catch(Exception e)
{
Assert.fail("Exception in app helper validateLink in class PostMessageValidate",e);
}
return linkfound;
}
public boolean postMessageValidateForInstructor(String postString)
{
boolean postfound = false;
try
{
Thread.sleep(5000);
int index = 0;
List<WebElement> posts = Driver.driver.findElements(By.className("ls-stream-share__title"));
for(WebElement post : posts)
{
if(post.getText().trim().equals(postString))
{
postfound = true;
break;
}
index++;
}
if(postfound == true)
{
WebElement posttext = Driver.driver.findElement(By.className("ls-stream-post__action"));
if(!posttext.getText().trim().equals("posted a discussion"))
{
postfound = false;
}
}
List <WebElement> instructortags = Driver.driver.findElements(By.className("ls-instructor-icon"));
if(!instructortags.get(index).getText().trim().equals("Instructor"))
Assert.fail("Instructor tag not present when an instructor has posted in course stream");
}
catch(Exception e)
{
Assert.fail("Exception in App Helper PostMessageValidate",e);
}
return postfound;
}
}
| [
"mukesh.mandal@github.com"
] | mukesh.mandal@github.com |
da7da33e122d815fa6f9b6ef9f3146fae01f5fbb | 52dd205230ba5ddbe46fa16e8ca6a869ede52096 | /oracle/com-bt-platform-bpm/src/main/java/com/jy/platform/jbpm4/dto/BizCalendarHoliday.java | f1e5ee5a4c7efc94a62291c9677b2d7580f5c031 | [] | no_license | wangshuaibo123/BI | f5bfca6bcc0d3d0d1bec973ae5864e1bca697ac3 | a44f8621a208cfb02e4ab5dc1e576056d62ff37c | refs/heads/master | 2021-05-04T16:20:22.382751 | 2018-01-29T11:02:05 | 2018-01-29T11:02:05 | 120,247,955 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 754 | java | package com.jy.platform.jbpm4.dto;
import com.jy.platform.core.common.BaseDTO;
public class BizCalendarHoliday extends BaseDTO {
private static final long serialVersionUID = -6515117351137352277L;
private long id;
private String holiday;
private String validateState;
public BizCalendarHoliday(String holiday) {
this.holiday = holiday;
this.validateState = "1";
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getHoliday() {
return holiday;
}
public void setHoliday(String holiday) {
this.holiday = holiday;
}
public String getValidateState() {
return validateState;
}
public void setValidateState(String validateState) {
this.validateState = validateState;
}
}
| [
"gangchen1@jieyuechina.com"
] | gangchen1@jieyuechina.com |
1b9c2ceff7b68a0eeb68853d23f1c3c2ffa57b62 | e4498f4c5782e4198aba4743ab7ecdb088547e57 | /src/main/java/knorxx/framework/gettingstarted/client/page/GettingStartedWebPage.java | b27a79bf1143287f194ce19108791e763416c6b4 | [
"MIT"
] | permissive | janScheible/knorxx-getting-started | 428c28234d3466ae949df058c7e055a96f426a51 | 70465b8a596513bd5b593547620b7ae8e72e158a | refs/heads/master | 2016-09-11T02:48:27.544403 | 2015-12-22T21:02:47 | 2015-12-22T21:02:47 | 25,939,430 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 924 | java | package knorxx.framework.gettingstarted.client.page;
import knorxx.framework.generator.web.client.WebPage;
import org.springframework.stereotype.Component;
import static org.stjs.javascript.Global.alert;
import org.stjs.javascript.dom.Element;
import org.stjs.javascript.jquery.Event;
import static org.stjs.javascript.jquery.GlobalJQueryUI.$;
import org.stjs.javascript.jquery.JQuery;
import org.stjs.javascript.jquery.plugins.ButtonOptions;
/**
*
* @author sj
*/
@Component
public class GettingStartedWebPage extends WebPage {
@Override
public void render() {
ButtonOptions buttonOptions = new ButtonOptions();
buttonOptions.label = "Click me";
$(CONTAINER_ID)
.append((JQuery) $("<h1>I'm a Knorxx Framework application!</h1>"))
.append($("<div>").button(buttonOptions).click((Event event, Element elmnt) -> {
alert("Hello Knorxx!");
return true;
}));
}
}
| [
"janScheible@users.noreply.github.com"
] | janScheible@users.noreply.github.com |
f10ffbf7f1f3bcaf7ee857ace4c27ab36521f6f0 | e51de484e96efdf743a742de1e91bce67f555f99 | /Android/triviacrack_src/src/com/etermax/gamescommon/gifting/a$1$1.java | ce6844dce03756723c39ab187b4f3842fb309137 | [] | no_license | adumbgreen/TriviaCrap | b21e220e875f417c9939f192f763b1dcbb716c69 | beed6340ec5a1611caeff86918f107ed6807d751 | refs/heads/master | 2021-03-27T19:24:22.401241 | 2015-07-12T01:28:39 | 2015-07-12T01:28:39 | 28,071,899 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,189 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.etermax.gamescommon.gifting;
import android.view.View;
import android.widget.GridView;
import com.etermax.tools.social.a.c;
import com.etermax.tools.social.a.h;
// Referenced classes of package com.etermax.gamescommon.gifting:
// a, b
class a
implements Runnable
{
final a a;
public void run()
{
com.etermax.gamescommon.gifting.a.b(a.a).setAdapter(new b(a.a, a.a.getActivity()));
a.a.setVisibility(0);
}
( )
{
a = ;
super();
}
// Unreferenced inner class com/etermax/gamescommon/gifting/a$1
/* anonymous class */
class a._cls1
implements h
{
final View a;
final a b;
public void a(c ac[])
{
com.etermax.gamescommon.gifting.a.a(b, ac);
com.etermax.gamescommon.gifting.a.b(b).post(new a._cls1._cls1(this));
}
{
b = a1;
a = view;
super();
}
}
}
| [
"klayderpus@chimble.net"
] | klayderpus@chimble.net |
6b6a4fd725240af806d71ac493e1c707d15f58e3 | c188408c9ec0425666250b45734f8b4c9644a946 | /open-sphere-base/auxiliary/src/main/java/io/opensphere/auxiliary/cache/jdbc/HatboxDeleteAllTask.java | 3020aeee3396ab17446f3a541e261c6e67f5c9f8 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | rkausch/opensphere-desktop | ef8067eb03197c758e3af40ebe49e182a450cc02 | c871c4364b3456685411fddd22414fd40ce65699 | refs/heads/snapshot_5.2.7 | 2023-04-13T21:00:00.575303 | 2020-07-29T17:56:10 | 2020-07-29T17:56:10 | 360,594,280 | 0 | 0 | Apache-2.0 | 2021-04-22T17:40:38 | 2021-04-22T16:58:41 | null | UTF-8 | Java | false | false | 2,241 | java | package io.opensphere.auxiliary.cache.jdbc;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Collection;
import io.opensphere.core.cache.CacheException;
import io.opensphere.core.cache.jdbc.DatabaseTaskFactory;
import io.opensphere.core.cache.jdbc.DeleteAllTask;
import io.opensphere.core.util.lang.Nulls;
/**
* Extension to {@link DeleteAllTask} that removes hatbox triggers and tables.
*/
public class HatboxDeleteAllTask extends DeleteAllTask
{
/**
* Constructor.
*
* @param databaseTaskFactory The database task factory.
* @param tableNamePattern The table name pattern. Null may be used to
* indicate all tables.
*/
public HatboxDeleteAllTask(DatabaseTaskFactory databaseTaskFactory, String tableNamePattern)
{
super(tableNamePattern, databaseTaskFactory);
}
@Override
public Void run(Connection conn, Statement stmt) throws CacheException
{
// Also need to remove triggers so the indices will be rebuilt.
Collection<String> triggerNames = HatboxUtilities.getTriggerNames(getCacheUtilities(), stmt);
for (String trigger : triggerNames)
{
getCacheUtilities().execute(getSQLGenerator().generateDropTrigger(trigger), stmt);
}
// Need to drop hatbox tables so they will be rebuilt.
Collection<String> hatboxTableNames;
try
{
String tableNamePattern = getTableNamePattern();
if (tableNamePattern == null)
{
tableNamePattern = "%";
}
hatboxTableNames = getCacheUtilities().getTableNames(stmt.getConnection(), Nulls.STRING, Nulls.STRING,
tableNamePattern + "_HATBOX");
}
catch (SQLException e)
{
throw new CacheException("Failed to get connection from statement: " + e, e);
}
for (String tableName : hatboxTableNames)
{
String sql = getSQLGenerator().generateDropTable(tableName);
getCacheUtilities().execute(sql, stmt);
}
return super.run(conn, stmt);
}
}
| [
"kauschr@opensphere.io"
] | kauschr@opensphere.io |
7b61d84fe0bbb7a9f1b19b5f67effb429a5b7a3d | d6b6abe73a0c82656b04875135b4888c644d2557 | /sources/com/mikepenz/fastadapter/adapters/a.java | 1edef0783143f977af4924a9453d8f5b17b62ba7 | [] | no_license | chanyaz/and_unimed | 4344d1a8ce8cb13b6880ca86199de674d770304b | fb74c460f8c536c16cca4900da561c78c7035972 | refs/heads/master | 2020-03-29T09:07:09.224595 | 2018-08-30T06:29:32 | 2018-08-30T06:29:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 421 | java | package com.mikepenz.fastadapter.adapters;
import com.mikepenz.fastadapter.FastAdapter;
import com.mikepenz.fastadapter.IItem;
public class a<Item extends IItem> extends FastAdapter<Item> {
private final ItemAdapter<Item> a = new ItemAdapter();
public a() {
this.a.a((FastAdapter) this);
}
public a<Item> a(int i, Item item) {
this.a.set(i, (IItem) item);
return this;
}
}
| [
"khairilirfanlbs@gmail.com"
] | khairilirfanlbs@gmail.com |
35d301a28ae21509bfba0b97d46fdec5c5cc1e9f | 94dafb3bf3b6919bf4fcb3d460173077bfa29676 | /platform/src/main/java/com/wdcloud/lms/business/resources/ResourceEditDataQuery.java | 609fdd1e90f8589f5935363747caef3de29a57db | [] | no_license | Miaosen1202/1126Java | b0fbe58e51b821b1ec8a8ffcfb24b21d578f1b5f | 7c896cffa3c51a25658b76fbef76b83a8963b050 | refs/heads/master | 2022-06-24T12:33:14.369136 | 2019-11-26T05:49:55 | 2019-11-26T05:49:55 | 224,112,546 | 0 | 0 | null | 2021-02-03T19:37:54 | 2019-11-26T05:48:48 | Java | UTF-8 | Java | false | false | 4,684 | java | package com.wdcloud.lms.business.resources;
import com.wdcloud.base.exception.BaseException;
import com.wdcloud.lms.Constants;
import com.wdcloud.lms.WebContext;
import com.wdcloud.lms.base.service.ResourceCommonService;
import com.wdcloud.lms.base.service.RoleValidateService;
import com.wdcloud.lms.business.strategy.StrategyFactory;
import com.wdcloud.lms.business.strategy.query.QueryStrategy;
import com.wdcloud.lms.core.base.dao.*;
import com.wdcloud.lms.core.base.enums.OriginTypeEnum;
import com.wdcloud.lms.core.base.enums.ResourceOperationTypeEnum;
import com.wdcloud.lms.core.base.enums.Status;
import com.wdcloud.lms.core.base.model.ResourceUpdate;
import com.wdcloud.lms.core.base.model.ResourceUpdateLog;
import com.wdcloud.lms.core.base.model.ResourceVersion;
import com.wdcloud.lms.core.base.vo.resource.ResourceVO;
import com.wdcloud.server.frame.exception.ParamErrorException;
import com.wdcloud.server.frame.interfaces.IDataQueryComponent;
import com.wdcloud.server.frame.interfaces.ResourceInfo;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@SuppressWarnings({"JavaDoc", "SpringJavaAutowiredFieldsWarningInspection"})
@ResourceInfo(name = Constants.RESOURCE_TYPE_RES_EDIT_SEARCH, description = "资源编辑查询")
public class ResourceEditDataQuery implements IDataQueryComponent<ResourceVO> {
@Autowired
private ResourceUpdateDao resourceUpdateDao;
@Autowired
private ResourceVersionDao resourceVersionDao;
@Autowired
private RoleValidateService roleValidateService;
@Autowired
private ResourceCommonService resourceCommonService;
/**
* @api {get} /resEditSearch/get 资源编辑详情
* @apiDescription 资源详情
* @apiName resEditSearchGet
* @apiGroup resource
*
* @apiParam {String} data 资源ID
*
* @apiSuccess {Number=200,500} code 响应码,200为处理成功,其他处理失败
* @apiSuccess {String} [message] 响应描述
* @apiSuccess {Object} [entity] 资源信息
* @apiSuccess {Number} entity.id 资源ID
* @apiSuccess {String} entity.name 资源名称
* @apiSuccess {Number=1,2,3,15} entity.originType 类型,1:作业,2:讨论,3:测验,15:课程
* @apiSuccess {String} entity.licence 版权1:Public Domain,2:CC-Attribution,3:CC-Attribution ShareAlike,
* 4:CC-Attribution NoDerivs,5:CC-Attribution NonCommercial,6:CC-Attribution NonCommercial ShareAlike,
* 7:CC-Attribution NonCommercial NoDerivs
* @apiSuccess {String} entity.thumbnailUrl 缩略图url
* @apiSuccess {Number} entity.gradeStart 年级开始
* @apiSuccess {Number} entity.gradeEnd 年级结束
* @apiSuccess {String} entity.description 简介
* @apiSuccess {String} entity.versionNotes 版本信息
* @apiSuccess {String[]} entity.tags 标签
* @apiSuccess {String} entity.shareRange 分享范围
* @apiSuccess {String} entity.operationType 操作类型,5:第一次分享,4:更新
* @apiSuccessExample {json} 响应示例:
* {
* "code": 200,
* "entity": {
* "description": "第一次分享+进行了修改",
* "grade": 2560,
* "gradeEnd": 11,
* "gradeStart": 9,
* "id": 89,
* "licence": 1,
* "name": "111111",
* "operationType": 4,
* "originType": 1,
* "shareRange": 1,
* "tags": [],
* "thumbnailUrl": "group1/M00/00/3F/wKgFFF1NCHiAPc-NAAA_IHLV9_0617.png",
* "versionNotes": "hasNewNote"
* },
* "message": "success"
* }
*/
@Override
public ResourceVO find(String id) {
roleValidateService.teacherAndAdminValid();
Long resourceId = Long.valueOf(id);
ResourceVO resourceVO = resourceUpdateDao.getEditDataByResourceId(resourceId);
if(Objects.isNull(resourceVO)){
throw new BaseException();
}
if(Objects.nonNull(resourceVO.getGrade())){
resourceVO.setGradeStart(resourceCommonService.getGradeStart(resourceVO.getGrade()));
resourceVO.setGradeEnd(resourceCommonService.getGradeEnd(resourceVO.getGrade()));
}
ResourceVersion resourceVersion = ResourceVersion.builder().resourceId(resourceId).build();
int count = resourceVersionDao.count(resourceVersion);
resourceVO.setOperationType(count > 1 ? ResourceOperationTypeEnum.UPDATE.getType() : ResourceOperationTypeEnum.FIRST_SHARE.getType());
return resourceVO;
}
}
| [
"miaosen1202@163.com"
] | miaosen1202@163.com |
c55864ccee2bcda208c9eb73c365f9c1436e94d7 | 2324e5edc2172027ec129af7cc174b2d86d0de20 | /lesson033_preferences_storedata/src/main/java/com/example/lesson033_preferences_storedata/MainActivity.java | 1964d1fbb72bdc11d95f311856211793fcaf6ef9 | [] | no_license | denmariupol/StartAndroid | 4cc9503a8665b690f17d1f2d88b773f61cde68a1 | ec9d66a07c8ab62078b547f7ac866047e9a069de | refs/heads/master | 2021-01-12T06:06:27.763874 | 2017-04-05T11:26:59 | 2017-04-05T11:26:59 | 77,301,535 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,284 | java | package com.example.lesson033_preferences_storedata;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity implements View.OnClickListener{
EditText editText;
Button btnSave,btnLoad;
SharedPreferences preferences;
final String SAVED_TEXT = "saved_text";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
editText = (EditText)findViewById(R.id.etText);
btnSave = (Button)findViewById(R.id.btnSave);
btnLoad = (Button)findViewById(R.id.btnLoad);
btnLoad.setOnClickListener(this);
btnSave.setOnClickListener(this);
load();
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.btnLoad:
load();
break;
case R.id.btnSave:
save();
break;
}
}
private void save(){
//константа MODE_PRIVATE используется для настройки доступа и
// означает, что после сохранения, данные будут видны только этому приложению
preferences = getPreferences(MODE_PRIVATE);
Editor editor = preferences.edit();//чтобы редактировать данные, необходим объект Editor
editor.putString(SAVED_TEXT,editText.getText().toString());
editor.commit();// Чтобы данные сохранились
Toast.makeText(this,"Text Saved",Toast.LENGTH_SHORT).show();
}
private void load(){
preferences = getPreferences(MODE_PRIVATE);
String savedText = preferences.getString(SAVED_TEXT,"");
editText.setText(savedText);
Toast.makeText(this,"Text Loaded",Toast.LENGTH_SHORT).show();
}
@Override
protected void onPause() {
super.onDestroy();
save();
}
}
| [
"denmariupol@mail.ru"
] | denmariupol@mail.ru |
7d216b27bce4003da877ca009814bd35dd259e38 | 27e4db41e594012ee9b09e539dd772c600aad51f | /app/src/main/java/com/shreeyesh/ui/module/LocationModule.java | 214446cac6a351bbc26bdcc78b0321e9182d95b9 | [] | no_license | nikvay/Shree_Yesh | 935fa1159f7f537887279bb9668c4a636152d2f1 | 144b0d03d9c15f3b97ba9008f69a1f926f642389 | refs/heads/master | 2020-05-23T01:30:39.107012 | 2019-05-14T12:58:49 | 2019-05-14T12:58:49 | 186,591,434 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 292 | java | package com.shreeyesh.ui.module;
public class LocationModule {
private boolean locationOnOff=false;
public boolean isLocationOnOff() {
return locationOnOff;
}
public void setLocationOnOff(boolean locationOnOff) {
this.locationOnOff = locationOnOff;
}
}
| [
"socialnikvay@gmail.com"
] | socialnikvay@gmail.com |
aa7ce1c43c9185463f61f8ee17fde3d0e6af52cf | e3fb2b44481f46682fc6bd87df231da2daffeb1e | /client-java-5.0.15_source_from_Procyon/rp/com/google/common/io/ByteArrayDataInput.java | 1e040dceae8ef6fa772662874c5c63f725f5d81f | [] | no_license | sachindwivedi18/Hibernate | 733b2acecff1e0642b540e7382f61459f5abbda7 | d561a342be2fdc6cca91aedebeb1b4dd6e9d8625 | refs/heads/master | 2023-06-11T10:14:09.375468 | 2021-06-29T14:51:36 | 2021-06-29T14:51:36 | 365,769,635 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,097 | java | //
// Decompiled by Procyon v0.5.36
//
package rp.com.google.common.io;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import rp.com.google.common.annotations.GwtIncompatible;
import java.io.DataInput;
@GwtIncompatible
public interface ByteArrayDataInput extends DataInput
{
void readFully(final byte[] p0);
void readFully(final byte[] p0, final int p1, final int p2);
int skipBytes(final int p0);
@CanIgnoreReturnValue
boolean readBoolean();
@CanIgnoreReturnValue
byte readByte();
@CanIgnoreReturnValue
int readUnsignedByte();
@CanIgnoreReturnValue
short readShort();
@CanIgnoreReturnValue
int readUnsignedShort();
@CanIgnoreReturnValue
char readChar();
@CanIgnoreReturnValue
int readInt();
@CanIgnoreReturnValue
long readLong();
@CanIgnoreReturnValue
float readFloat();
@CanIgnoreReturnValue
double readDouble();
@CanIgnoreReturnValue
String readLine();
@CanIgnoreReturnValue
String readUTF();
}
| [
"sachindwivedi18@gmail.com"
] | sachindwivedi18@gmail.com |
1797fe9061e90b9de333208d88f2569d8c0294ea | d6ab38714f7a5f0dc6d7446ec20626f8f539406a | /backend/collecting/dsfj/Java/edited/mail.MailProperties.java | 0517e443a2e5c38ab62f200c00fc6dcd1cfbb337 | [] | no_license | haditabatabaei/webproject | 8db7178affaca835b5d66daa7d47c28443b53c3d | 86b3f253e894f4368a517711bbfbe257be0259fd | refs/heads/master | 2020-04-10T09:26:25.819406 | 2018-12-08T12:21:52 | 2018-12-08T12:21:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,933 | java |
package org.springframework.boot.autoconfigure.mail;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "spring.mail")
public class MailProperties {
private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
private String host;
private Integer port;
private String username;
private String password;
private String protocol = "smtp";
private Charset defaultEncoding = DEFAULT_CHARSET;
private Map<String, String> properties = new HashMap<>();
private String jndiName;
private boolean testConnection;
public String getHost() {
return this.host;
}
public void setHost(String host) {
this.host = host;
}
public Integer getPort() {
return this.port;
}
public void setPort(Integer port) {
this.port = port;
}
public String getUsername() {
return this.username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public String getProtocol() {
return this.protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public Charset getDefaultEncoding() {
return this.defaultEncoding;
}
public void setDefaultEncoding(Charset defaultEncoding) {
this.defaultEncoding = defaultEncoding;
}
public Map<String, String> getProperties() {
return this.properties;
}
public void setJndiName(String jndiName) {
this.jndiName = jndiName;
}
public String getJndiName() {
return this.jndiName;
}
public boolean isTestConnection() {
return this.testConnection;
}
public void setTestConnection(boolean testConnection) {
this.testConnection = testConnection;
}
}
| [
"mahdisadeghzadeh24@gamil.com"
] | mahdisadeghzadeh24@gamil.com |
1d8d6fd2f971a0d94c41ea223ff9ed2740a1f169 | d743e25ebc27da98ceb2f253e1721ed08706b0c3 | /app/src/main/java/org/andstatus/app/service/TimelineDownloaderOther.java | 25fdb6433290220056846d16a835db3c82c6c38f | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | xcorail/andstatus | e7b93eb017f841b5fcf8cd47330620075616421b | 63d53380291b5f46e868b9d604b92008910e09c3 | refs/heads/master | 2020-03-28T03:53:26.402968 | 2018-09-06T13:35:34 | 2018-09-06T13:35:34 | 147,678,659 | 0 | 0 | Apache-2.0 | 2018-09-06T13:35:26 | 2018-09-06T13:35:26 | null | UTF-8 | Java | false | false | 6,890 | java | /*
* Copyright (C) 2013 yvolk (Yuri Volkov), http://yurivolkov.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.andstatus.app.service;
import android.support.annotation.NonNull;
import org.andstatus.app.context.MyPreferences;
import org.andstatus.app.data.DataUpdater;
import org.andstatus.app.data.MyQuery;
import org.andstatus.app.data.OidEnum;
import org.andstatus.app.net.http.ConnectionException;
import org.andstatus.app.net.http.ConnectionException.StatusCode;
import org.andstatus.app.net.social.AActivity;
import org.andstatus.app.net.social.TimelinePosition;
import org.andstatus.app.util.MyLog;
import org.andstatus.app.util.RelativeTime;
import org.andstatus.app.util.StringUtils;
import org.andstatus.app.util.TriState;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
class TimelineDownloaderOther extends TimelineDownloader {
private static final int YOUNGER_NOTES_TO_DOWNLOAD_MAX = 200;
private static final int OLDER_NOTES_TO_DOWNLOAD_MAX = 40;
private static final int LATEST_NOTES_TO_DOWNLOAD_MAX = 20;
TimelineDownloaderOther(CommandExecutionContext execContext) {
super(execContext);
}
@Override
public void download() throws ConnectionException {
if (!getTimeline().isSyncable()) {
throw new IllegalArgumentException("Timeline cannot be synced: " + getTimeline());
}
TimelineSyncTracker syncTracker = new TimelineSyncTracker(getTimeline(), isSyncYounger());
long hours = MyPreferences.getDontSynchronizeOldNotes();
boolean downloadingLatest = false;
if (hours > 0 && RelativeTime.moreSecondsAgoThan(syncTracker.getPreviousSyncedDate(),
TimeUnit.HOURS.toSeconds(hours))) {
downloadingLatest = true;
syncTracker.clearPosition();
} else if (syncTracker.getPreviousPosition().isEmpty()) {
downloadingLatest = true;
}
if (MyLog.isLoggable(this, MyLog.DEBUG)) {
String strLog = "Loading "
+ (downloadingLatest ? "latest " : "")
+ execContext.getCommandData().toCommandSummary(execContext.getMyContext());
if (syncTracker.getPreviousItemDate() > 0) { strLog +=
"; last Timeline item at=" + (new Date(syncTracker.getPreviousItemDate()).toString())
+ "; last time downloaded at=" + (new Date(syncTracker.getPreviousSyncedDate()).toString());
}
MyLog.d(this, strLog);
}
String actorOid = getActorOid();
int toDownload = downloadingLatest ? LATEST_NOTES_TO_DOWNLOAD_MAX :
(isSyncYounger() ? YOUNGER_NOTES_TO_DOWNLOAD_MAX : OLDER_NOTES_TO_DOWNLOAD_MAX);
TimelinePosition previousPosition = syncTracker.getPreviousPosition();
syncTracker.onTimelineDownloaded();
DataUpdater di = new DataUpdater(execContext);
for (int loopCounter=0; loopCounter < 100; loopCounter++ ) {
try {
int limit = getConnection().fixedDownloadLimit(
toDownload, getTimeline().getTimelineType().getConnectionApiRoutine());
List<AActivity> activities;
switch (getTimeline().getTimelineType()) {
case SEARCH:
activities = getConnection().searchNotes(
isSyncYounger() ? previousPosition : TimelinePosition.EMPTY,
isSyncYounger() ? TimelinePosition.EMPTY : previousPosition,
limit, getTimeline().getSearchQuery());
break;
default:
activities = getConnection().getTimeline(
getTimeline().getTimelineType().getConnectionApiRoutine(),
isSyncYounger() ? previousPosition : TimelinePosition.EMPTY,
isSyncYounger() ? TimelinePosition.EMPTY : previousPosition,
limit, actorOid);
break;
}
for (AActivity activity : activities) {
toDownload--;
syncTracker.onNewMsg(activity.getTimelinePosition(), activity.getUpdatedDate());
if (!activity.isSubscribedByMe().equals(TriState.FALSE)
&& activity.getUpdatedDate() > 0
&& execContext.getTimeline().getTimelineType().isSubscribedByMe()
&& execContext.myContext.users().isMe(execContext.getTimeline().actor)
) {
activity.setSubscribedByMe(TriState.TRUE);
}
di.onActivity(activity, false);
}
if (toDownload <= 0 || activities.isEmpty() || previousPosition.equals(syncTracker.getPreviousPosition())) {
break;
}
previousPosition = syncTracker.getPreviousPosition();
} catch (ConnectionException e) {
if (e.getStatusCode() != StatusCode.NOT_FOUND) {
throw e;
}
if (previousPosition.isEmpty()) {
throw ConnectionException.hardConnectionException("No last position", e);
}
MyLog.d(this, "The timeline was not found, last position='" + previousPosition +"'", e);
previousPosition = TimelinePosition.EMPTY;
}
}
di.saveLum();
}
@NonNull
private String getActorOid() throws ConnectionException {
if (getActor().actorId == 0) {
if (getTimeline().myAccountToSync.isValid()) {
return getTimeline().myAccountToSync.getActorOid();
}
} else {
String actorOid = MyQuery.idToOid(OidEnum.ACTOR_OID, getActor().actorId, 0);
if (StringUtils.isEmpty(actorOid)) {
throw new ConnectionException("No ActorOid for " + getActor() + ", timeline:" + getTimeline());
}
return actorOid;
}
if (getTimeline().getTimelineType().isForUser()) {
throw new ConnectionException("No actor for the timeline:" + getTimeline());
}
return "";
}
}
| [
"yvolk@yurivolkov.com"
] | yvolk@yurivolkov.com |
634510fa3eeb519d48f14acd513b83b485181253 | c9bc23ad5b3b2d21dec737c73c1e6c2a1cbe3504 | /app/src/main/java/android/support/v4/c/a/y.java | 6eaf3cc00adbcc24e7143e78a03251a38513c54b | [] | no_license | IamWilliamWang/wolf | 2e68faed4cab5ba5b04ae52bc44550be04f36079 | 6b7ff2b74f0413578a1a34132750e5d79b0c0fe6 | refs/heads/master | 2020-05-27T10:45:18.596136 | 2017-02-20T09:58:02 | 2017-02-20T09:58:02 | 82,542,835 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 668 | java | package android.support.v4.c.a;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
class y extends w
{
y(Drawable paramDrawable)
{
super(paramDrawable);
}
y(s params, Resources paramResources)
{
super(params, paramResources);
}
s b()
{
return new z(this.b, null);
}
public boolean isAutoMirrored()
{
return this.c.isAutoMirrored();
}
public void setAutoMirrored(boolean paramBoolean)
{
this.c.setAutoMirrored(paramBoolean);
}
}
/* Location: C:\Users\Administrator\Desktop\狼王\classes.jar
* Qualified Name: android.support.v4.c.a.y
* JD-Core Version: 0.6.0
*/ | [
"iamjerichoholic@hotmail.com"
] | iamjerichoholic@hotmail.com |
777f468488c44c85f36f840c86f4882135942a0b | f5049214ff99cdd7c37da74619b60ac4a26fc6ba | /runtime/jsf/eu.agno3.runtime.jsf/src/main/java/eu/agno3/runtime/jsf/config/renderkit/HeaderPartialViewContext.java | b25b3769d6ad8e1ed334686a4c58a5312833dc22 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | AgNO3/code | d17313709ee5db1eac38e5811244cecfdfc23f93 | b40a4559a10b3e84840994c3fd15d5f53b89168f | refs/heads/main | 2023-07-28T17:27:53.045940 | 2021-09-17T14:25:01 | 2021-09-17T14:31:41 | 407,567,058 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 5,756 | java | /**
* © 2015 AgNO3 Gmbh & Co. KG
* All right reserved.
*
* Created: 21.07.2015 by mbechler
*/
package eu.agno3.runtime.jsf.config.renderkit;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.context.PartialResponseWriter;
import javax.faces.context.PartialViewContext;
import javax.faces.context.PartialViewContextWrapper;
import org.apache.myfaces.shared.util.StringUtils;
/**
* @author mbechler
*
*/
public class HeaderPartialViewContext extends PartialViewContextWrapper {
private static final String SOURCE_HEADER = "X-JSF-Partial-Source"; //$NON-NLS-1$
private static final String EXECUTE_HEADER = "X-JSF-Partial-Execute"; //$NON-NLS-1$
private static final String RENDER_HEADER = "X-JSF-Partial-Render"; //$NON-NLS-1$
private PartialViewContext wrapped;
private Collection<String> executeClientIds;
private Collection<String> renderClientIds;
/**
* @param wrapped
*/
public HeaderPartialViewContext ( PartialViewContext wrapped ) {
this.wrapped = wrapped;
}
/**
* {@inheritDoc}
*
* @see javax.faces.context.PartialViewContextWrapper#getExecuteIds()
*/
@Override
public Collection<String> getExecuteIds () {
Collection<String> executeIds = super.getExecuteIds();
if ( executeIds.isEmpty() ) {
ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext();
return getHeaderExecuteIds(ctx);
}
return executeIds;
}
/**
* @param ctx
* @return
*/
private Collection<String> getHeaderExecuteIds ( ExternalContext ctx ) {
if ( this.executeClientIds == null ) {
String executeMode = ctx.getRequestHeaderMap().get(EXECUTE_HEADER);
if ( executeMode != null && !executeMode.isEmpty() &&
// !PartialViewContext.NO_PARTIAL_PHASE_CLIENT_IDS.equals(executeMode) &&
!PartialViewContext.ALL_PARTIAL_PHASE_CLIENT_IDS.equals(executeMode) ) {
String[] clientIds = StringUtils.splitShortString(replaceTabOrEnterCharactersWithSpaces(executeMode), ' ');
// The collection must be mutable
List<String> tempList = new ArrayList<>();
for ( String clientId : clientIds ) {
if ( clientId.length() > 0 ) {
tempList.add(clientId);
}
}
// The "javax.faces.source" parameter needs to be added to the list of
// execute ids if missing (otherwise, we'd never execute an action associated
// with, e.g., a button).
String source = ctx.getRequestHeaderMap().get(SOURCE_HEADER);
if ( source != null ) {
source = source.trim();
if ( !tempList.contains(source) ) {
tempList.add(source);
}
}
this.executeClientIds = tempList;
}
else {
this.executeClientIds = new ArrayList<>();
}
}
return this.executeClientIds;
}
/**
* {@inheritDoc}
*
* @see javax.faces.context.PartialViewContextWrapper#getRenderIds()
*/
@Override
public Collection<String> getRenderIds () {
Collection<String> renderIds = super.getRenderIds();
if ( renderIds.isEmpty() ) {
ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext();
return getHeaderRenderIds(ctx);
}
return renderIds;
}
/**
* @param ctx
* @return
*/
private Collection<String> getHeaderRenderIds ( ExternalContext ctx ) {
if ( this.renderClientIds == null ) {
String renderMode = ctx.getRequestHeaderMap().get(RENDER_HEADER);
if ( renderMode != null && !renderMode.isEmpty() &&
// !PartialViewContext.NO_PARTIAL_PHASE_CLIENT_IDS.equals(renderMode) &&
!PartialViewContext.ALL_PARTIAL_PHASE_CLIENT_IDS.equals(renderMode) ) {
String[] clientIds = StringUtils.splitShortString(replaceTabOrEnterCharactersWithSpaces(renderMode), ' ');
// The collection must be mutable
List<String> tempList = new ArrayList<>();
for ( String clientId : clientIds ) {
if ( clientId.length() > 0 ) {
tempList.add(clientId);
}
}
this.renderClientIds = tempList;
}
else {
this.renderClientIds = new ArrayList<>();
if ( PartialViewContext.ALL_PARTIAL_PHASE_CLIENT_IDS.equals(renderMode) ) {
this.renderClientIds.add(PartialResponseWriter.RENDER_ALL_MARKER);
}
}
}
return this.renderClientIds;
}
/**
* {@inheritDoc}
*
* @see javax.faces.context.PartialViewContextWrapper#getWrapped()
*/
@Override
public PartialViewContext getWrapped () {
return this.wrapped;
}
private static String replaceTabOrEnterCharactersWithSpaces ( String mode ) {
StringBuilder builder = new StringBuilder(mode.length());
for ( int i = 0; i < mode.length(); i++ ) {
if ( mode.charAt(i) == '\t' || mode.charAt(i) == '\n' ) {
builder.append(' ');
}
else {
builder.append(mode.charAt(i));
}
}
return builder.toString();
}
}
| [
"bechler@agno3.eu"
] | bechler@agno3.eu |
802babc6247c9b4791df17f02f5066565b8a8cb2 | 1415496f94592ba4412407b71dc18722598163dd | /doc/libjitisi/sources/org/jitsi/impl/neomedia/protocol/PullBufferStreamAdapter.java | 1db79a66fbc8e46f74b376fe680300c788fd2edb | [
"Apache-2.0"
] | permissive | lhzheng880828/VOIPCall | ad534535869c47b5fc17405b154bdc651b52651b | a7ba25debd4bd2086bae2a48306d28c614ce0d4a | refs/heads/master | 2021-07-04T17:25:21.953174 | 2020-09-29T07:29:42 | 2020-09-29T07:29:42 | 183,576,020 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,974 | java | package org.jitsi.impl.neomedia.protocol;
import java.io.IOException;
import javax.media.Buffer;
import javax.media.Format;
import javax.media.format.AudioFormat;
import javax.media.protocol.PullBufferStream;
import javax.media.protocol.PullSourceStream;
public class PullBufferStreamAdapter extends BufferStreamAdapter<PullSourceStream> implements PullBufferStream {
public PullBufferStreamAdapter(PullSourceStream stream, Format format) {
super(stream, format);
}
private static int getFrameSizeInBytes(Format format) {
AudioFormat audioFormat = (AudioFormat) format;
int frameSizeInBits = audioFormat.getFrameSizeInBits();
if (frameSizeInBits <= 0) {
return (audioFormat.getSampleSizeInBits() / 8) * audioFormat.getChannels();
}
return frameSizeInBits <= 8 ? 1 : frameSizeInBits / 8;
}
public void read(Buffer buffer) throws IOException {
Object data = buffer.getData();
byte[] bytes = null;
if (data != null) {
if (data instanceof byte[]) {
bytes = (byte[]) data;
} else if (data instanceof short[]) {
bytes = new byte[(((short[]) data).length * 2)];
} else if (data instanceof int[]) {
bytes = new byte[(((int[]) data).length * 4)];
}
}
if (bytes == null) {
int frameSizeInBytes = getFrameSizeInBytes(getFormat());
if (frameSizeInBytes <= 0) {
frameSizeInBytes = 4;
}
bytes = new byte[(frameSizeInBytes * 1024)];
}
read(buffer, bytes);
}
/* access modifiers changed from: protected */
public int read(byte[] buffer, int offset, int length) throws IOException {
return ((PullSourceStream) this.stream).read(buffer, offset, length);
}
public boolean willReadBlock() {
return ((PullSourceStream) this.stream).willReadBlock();
}
}
| [
"lhzheng@grandstream.cn"
] | lhzheng@grandstream.cn |
cb18e259b7eef340719ebccd8d2c1a2392fb3e15 | 0f78eb1bd70ee3ea0cbd7b795d7e946255366efd | /src_platform/com/qfw/platform/model/loan/CreditReportDetailVO.java | b18f9505015a0d6ad2ca73fc5525a2cd9407c22b | [] | no_license | xie-summer/sjct | b8484bc4ee7d61b3713fa2e88762002f821045a6 | 4674af9a0aa587b5765e361ecaa6a07f966f0edb | refs/heads/master | 2021-06-16T22:06:06.646687 | 2017-05-12T09:24:52 | 2017-05-12T09:24:52 | 92,924,351 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,293 | java | package com.qfw.platform.model.loan;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 信用报告
* @author Think
*
*/
public class CreditReportDetailVO implements Serializable{
private static final long serialVersionUID = 1L;
private BigDecimal creditAmt;// 信用额度
private BigDecimal remainAmt;// 剩余额度
private Integer applyLoanNum;// 申请借款笔数
private Integer approveNum;// 成功借款笔数
private Integer payOffNum;// 还清笔数
private BigDecimal loanTolAmt;// 借款总金额
private BigDecimal loanBal;// 借款余额
private BigDecimal overdueAmt;// 逾期总额
private Integer overdueNum;// 逾期次数
private Integer serOverdueNum;// 严重逾期
public BigDecimal getLoanBal() {
return loanBal;
}
public void setLoanBal(BigDecimal loanBal) {
this.loanBal = loanBal;
}
public BigDecimal getCreditAmt() {
return creditAmt;
}
public void setCreditAmt(BigDecimal creditAmt) {
this.creditAmt = creditAmt;
}
public BigDecimal getRemainAmt() {
return remainAmt;
}
public void setRemainAmt(BigDecimal remainAmt) {
this.remainAmt = remainAmt;
}
public Integer getApplyLoanNum() {
return applyLoanNum;
}
public void setApplyLoanNum(Integer applyLoanNum) {
this.applyLoanNum = applyLoanNum;
}
public Integer getApproveNum() {
return approveNum;
}
public void setApproveNum(Integer approveNum) {
this.approveNum = approveNum;
}
public Integer getPayOffNum() {
return payOffNum;
}
public void setPayOffNum(Integer payOffNum) {
this.payOffNum = payOffNum;
}
public BigDecimal getLoanTolAmt() {
return loanTolAmt;
}
public void setLoanTolAmt(BigDecimal loanTolAmt) {
this.loanTolAmt = loanTolAmt;
}
public BigDecimal getOverdueAmt() {
return overdueAmt;
}
public void setOverdueAmt(BigDecimal overdueAmt) {
this.overdueAmt = overdueAmt;
}
public Integer getOverdueNum() {
return overdueNum;
}
public void setOverdueNum(Integer overdueNum) {
this.overdueNum = overdueNum;
}
public Integer getSerOverdueNum() {
return serOverdueNum;
}
public void setSerOverdueNum(Integer serOverdueNum) {
this.serOverdueNum = serOverdueNum;
}
} | [
"271673805@qq.com"
] | 271673805@qq.com |
db47f3cad9f0f77f09887aaa1cb51a2317f72808 | 8a64a7b7910bf5679daf0f70fd0ac409df5bad72 | /jspackage-service/src/main/java/org/slieb/jspackage/service/resources/ComponentTestResource.java | 965cef28dfb8b086a166acdc7e599de72758da90 | [] | no_license | StefanLiebenberg/jspackage | e87f95ef2a5ba73f379f2a397064c49660a69467 | e52bae1d8f0236ab40cf4b999cf9a6e9379d25d5 | refs/heads/master | 2021-01-20T09:01:39.140173 | 2016-02-27T10:59:31 | 2016-02-27T10:59:31 | 33,916,604 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,837 | java | package org.slieb.jspackage.service.resources;
import org.slieb.closure.javascript.internal.ComponentTestFileBuilder;
import org.slieb.jspackage.dependencies.GoogDependencyCalculator;
import org.slieb.kute.api.Resource;
import org.slieb.kute.resources.ContentResource;
import java.io.Serializable;
import java.util.Objects;
public class ComponentTestResource implements ContentResource, Serializable {
private final String path;
private final Resource.Readable testResource;
private final GoogDependencyCalculator calculator;
public ComponentTestResource(String path,
Readable testResource,
GoogDependencyCalculator calculator) {
this.path = path;
this.testResource = testResource;
this.calculator = calculator;
}
@Override
public String getContent() {
return new ComponentTestFileBuilder(testResource, calculator).getContent();
}
@Override
public String getPath() {
return path;
}
@Override
public boolean equals(Object o) {
if (this == o) { return true; }
if (!(o instanceof ComponentTestResource)) { return false; }
ComponentTestResource that = (ComponentTestResource) o;
return Objects.equals(path, that.path) &&
Objects.equals(testResource, that.testResource) &&
Objects.equals(calculator, that.calculator);
}
@Override
public int hashCode() {
return Objects.hash(path, testResource, calculator);
}
@Override
public String toString() {
return "ComponentTestResource{" +
"path='" + path + '\'' +
", testResource=" + testResource +
", calculator=" + calculator +
"} " + super.toString();
}
}
| [
"siga.fredo@gmail.com"
] | siga.fredo@gmail.com |
df319cd8a95663a50c17abc203be711b59c94a3a | 656ce78b903ef3426f8f1ecdaee57217f9fbc40e | /src/org/spongycastle/pqc/crypto/MessageEncryptor.java | 38abf63383376f534b8d94d36d349f214401f168 | [] | no_license | zhuharev/periscope-android-source | 51bce2c1b0b356718be207789c0b84acf1e7e201 | 637ab941ed6352845900b9d465b8e302146b3f8f | refs/heads/master | 2021-01-10T01:47:19.177515 | 2015-12-25T16:51:27 | 2015-12-25T16:51:27 | 48,586,306 | 8 | 10 | null | null | null | null | UTF-8 | Java | false | false | 252 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package org.spongycastle.pqc.crypto;
public interface MessageEncryptor
{
}
| [
"hostmaster@zhuharev.ru"
] | hostmaster@zhuharev.ru |
d95c31719d24eec6bae1f977775f1a3867432ec2 | 19b0ddc45e90a6d938bacc65648d805a941fc90d | /Server/InstinctSys/src/omni/database/catfish/object/hybrid/RepaymentTableResult.java | 8d514f94c5d4274c46175e30ad3c973e959543fe | [] | no_license | dachengzi-software/ap | bec5371a4004eb318258646a7e34fc0352e641c2 | ccca3d6c4fb86a698a064c3005eba2b405e8d822 | refs/heads/master | 2021-12-23T09:26:24.595456 | 2017-11-10T02:33:18 | 2017-11-10T02:33:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,550 | java | /**
* Copyright (C), 上海秦苍信息科技有限公司
*/
package omni.database.catfish.object.hybrid;
import java.util.List;
import java.util.Map;
/**
* 〈账务接口查询二次贷相关情况〉
*
* @author hwei
* @version RepaymentTableResult.java, V1.0 2016年12月30日 下午3:43:24
*/
public class RepaymentTableResult {
private PaymentDetail principal;
private PaymentDetail interest;
private Map<String, PaymentDetail> extendFees; //服务费
private List<PaymentDetail> penalties; //罚金列表
private Integer instalmentNum; //当前条目的期数
public PaymentDetail getPrincipal() {
return principal;
}
public void setPrincipal(PaymentDetail principal) {
this.principal = principal;
}
public PaymentDetail getInterest() {
return interest;
}
public void setInterest(PaymentDetail interest) {
this.interest = interest;
}
public Map<String, PaymentDetail> getExtendFees() {
return extendFees;
}
public void setExtendFees(Map<String, PaymentDetail> extendFees) {
this.extendFees = extendFees;
}
public List<PaymentDetail> getPenalties() {
return penalties;
}
public void setPenalties(List<PaymentDetail> penalties) {
this.penalties = penalties;
}
public Integer getInstalmentNum() {
return instalmentNum;
}
public void setInstalmentNum(Integer instalmentNum) {
this.instalmentNum = instalmentNum;
}
}
| [
"gum@fenqi.im"
] | gum@fenqi.im |
dc2799126690fb9f7ac88bcba586860b8af019e0 | 45dfa56778943ecc62c06c7fa98db380cda7ceae | /src/main/java/com/dev/withpet/domain/Category.java | 1af24aee925f1f130658c5588b6e9d9b57b81e01 | [] | no_license | Mintwo0408/DUANTOTNGHIEP | 845167b8cdaad61f82c7f36bfb7ffaa1d26aa993 | 689b8d0d1b2041de7bf4032eedbb7b4dd39a9d11 | refs/heads/master | 2023-08-19T15:42:52.466199 | 2021-10-31T13:10:56 | 2021-10-31T13:10:56 | 410,295,430 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 449 | java | package com.dev.withpet.domain;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@SuppressWarnings("serial")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="categories")
public class Category implements Serializable{
@Id
Integer id;
String name;
}
| [
"you@example.com"
] | you@example.com |
0cb8b8184a370d43bbae19b3716c95f125ecf438 | 1c47c4f834ec5f5a89d2262768486da8054d7544 | /src/main/java/mekanism/client/render/lib/QuadUtils.java | 5fd77dad01383813b84146208cb97a4f11175914 | [
"MIT"
] | permissive | Sinmis077/Meka-Guide | d4443cd1ae48929aa6ff5f811e2d00d7caf3ba17 | c42191d9d5a4e8add654a6cf8720abc8af2896c3 | refs/heads/main | 2023-08-07T19:45:42.813342 | 2021-09-26T21:55:10 | 2021-09-26T21:55:10 | 383,550,665 | 1 | 1 | MIT | 2021-09-26T21:55:11 | 2021-07-06T17:34:34 | Java | UTF-8 | Java | false | false | 4,109 | java | package mekanism.client.render.lib;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
public class QuadUtils {
private QuadUtils() {
}
private static final float eps = 1F / 0x100;
public static List<Quad> unpack(List<BakedQuad> quads) {
return quads.stream().map(Quad::new).collect(Collectors.toList());
}
public static List<BakedQuad> bake(List<Quad> quads) {
return quads.stream().map(Quad::bake).collect(Collectors.toList());
}
public static List<Quad> flip(List<Quad> quads) {
return quads.stream().map(Quad::flip).collect(Collectors.toList());
}
public static List<Quad> transformQuads(List<Quad> orig, QuadTransformation transformation) {
List<Quad> list = new ArrayList<>();
for (Quad quad : orig) {
transformation.transform(quad);
list.add(quad);
}
return list;
}
public static List<BakedQuad> transformBakedQuads(List<BakedQuad> orig, QuadTransformation transformation) {
List<BakedQuad> list = new ArrayList<>();
for (BakedQuad bakedQuad : orig) {
Quad quad = new Quad(bakedQuad);
transformation.transform(quad);
list.add(quad.bake());
}
return list;
}
public static List<BakedQuad> transformAndBake(List<Quad> orig, QuadTransformation transformation) {
List<BakedQuad> list = new ArrayList<>();
for (Quad quad : orig) {
transformation.transform(quad);
list.add(quad.bake());
}
return list;
}
public static void remapUVs(Quad quad, TextureAtlasSprite newTexture) {
float uMin = quad.getTexture().getMinU(), uMax = quad.getTexture().getMaxU();
float vMin = quad.getTexture().getMinV(), vMax = quad.getTexture().getMaxV();
for (Vertex v : quad.getVertices()) {
float newU = (v.getTexU() - uMin) * 16F / (uMax - uMin);
float newV = (v.getTexV() - vMin) * 16F / (vMax - vMin);
v.texRaw(newTexture.getInterpolatedU(newU), newTexture.getInterpolatedV(newV));
}
}
// this is an adaptation of fry's original UV contractor (pulled from BakedQuadBuilder).
// ultimately this fixes UVs bleeding over the edge slightly when dealing with smaller models or tight UV bounds
public static void contractUVs(Quad quad) {
TextureAtlasSprite texture = quad.getTexture();
float sizeX = texture.getWidth() / (texture.getMaxU() - texture.getMinU());
float sizeY = texture.getHeight() / (texture.getMaxV() - texture.getMinV());
float ep = 1F / (Math.max(sizeX, sizeY) * 0x100);
float[] newUs = contract(quad, Vertex::getTexU, ep);
float[] newVs = contract(quad, Vertex::getTexV, ep);
for (int i = 0; i < quad.getVertices().length; i++) {
quad.getVertices()[i].texRaw(newUs[i], newVs[i]);
}
}
private static float[] contract(Quad quad, Function<Vertex, Float> uvf, float ep) {
float center = 0;
float[] ret = new float[4];
for (int v = 0; v < 4; v++) {
center += uvf.apply(quad.getVertices()[v]);
}
center /= 4;
for (int v = 0; v < 4; v++) {
float orig = uvf.apply(quad.getVertices()[v]);
float shifted = orig * (1 - eps) + center * eps;
float delta = orig - shifted;
if (Math.abs(delta) < ep) { // not moving a fraction of a pixel
float centerDelta = Math.abs(orig - center);
if (centerDelta < 2 * ep) { // center is closer than 2 fractions of a pixel, don't move too close
shifted = (orig + center) / 2;
} else { // move at least by a fraction
shifted = orig + (delta < 0 ? ep : -ep);
}
}
ret[v] = shifted;
}
return ret;
}
}
| [
"llelga8@gmail.com"
] | llelga8@gmail.com |
6d5baa9f82a01d7e3d3414ad77ae6689b1384231 | b7cac4e062aa5ba15c315adfd3763cb49676afc9 | /inception/inception-ui-dashboard/src/main/java/de/tudarmstadt/ukp/inception/ui/core/dashboard/settings/ProjectSettingsPageMenuItem.java | 63e81ae37ba466b2c3206b2de8c097cdfa5bcc96 | [
"Apache-2.0"
] | permissive | XiaofengZhu/inception | cd98f77fd300932eb7c651e549d6991dd283dee4 | 719f10c07c79e3c9ce4b660f72b1573ff57a9434 | refs/heads/master | 2023-06-13T21:48:29.018115 | 2021-07-07T21:18:07 | 2021-07-07T21:18:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,739 | java | /*
* Licensed to the Technische Universität Darmstadt under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The Technische Universität Darmstadt
* 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.
*
* 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 de.tudarmstadt.ukp.inception.ui.core.dashboard.settings;
import org.apache.wicket.Page;
import org.springframework.beans.factory.annotation.Autowired;
import de.agilecoders.wicket.core.markup.html.bootstrap.image.IconType;
import de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesome5IconType;
import de.tudarmstadt.ukp.clarin.webanno.api.ProjectService;
import de.tudarmstadt.ukp.clarin.webanno.model.Project;
import de.tudarmstadt.ukp.clarin.webanno.security.UserDao;
import de.tudarmstadt.ukp.clarin.webanno.security.model.User;
import de.tudarmstadt.ukp.clarin.webanno.ui.core.menu.ProjectMenuItem;
import de.tudarmstadt.ukp.clarin.webanno.ui.project.ProjectSettingsPage;
import de.tudarmstadt.ukp.inception.ui.core.dashboard.config.DashboardAutoConfiguration;
/**
* <p>
* This class is exposed as a Spring Component via
* {@link DashboardAutoConfiguration#projectSettingsPageMenuItem()}.
* </p>
*/
@Deprecated
public class ProjectSettingsPageMenuItem
implements ProjectMenuItem
{
private @Autowired UserDao userRepo;
private @Autowired ProjectService projectService;
@Override
public String getPath()
{
return "/settings";
}
@Override
public IconType getIcon()
{
return FontAwesome5IconType.cogs_s;
}
@Override
public String getLabel()
{
return "Settings";
}
/**
* Only project admins and annotators can see this page
*/
@Override
public boolean applies(Project aProject)
{
if (aProject == null) {
return false;
}
// Visible if the current user is a project manager or global admin
User user = userRepo.getCurrentUser();
return userRepo.isAdministrator(user) || projectService.isManager(aProject, user);
}
@Override
public Class<? extends Page> getPageClass()
{
return ProjectSettingsPage.class;
}
}
| [
"richard.eckart@gmail.com"
] | richard.eckart@gmail.com |
8f8d5e8255dc9333ad7584f73a54127311549ce2 | ac96b5dee28e248c73f20f16c3074b7e07a62b25 | /src/main/java/br/com/transpetro/sistema_apoio_operacional/repository/search/UserSearchRepository.java | c6f06e5ec47693aab5c3f271f6e8b7244970f4a4 | [] | no_license | Dicommunitas/sistema-apoio-operacional | 7ef72ff3b1df31b723e60ad6849facb77b648739 | 0c1ac43913e672aed5e705c5eb6f03d78390fd6f | refs/heads/main | 2023-03-28T07:54:47.824085 | 2021-03-26T05:30:29 | 2021-03-26T05:30:29 | 351,671,595 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 373 | java | package br.com.transpetro.sistema_apoio_operacional.repository.search;
import br.com.transpetro.sistema_apoio_operacional.domain.User;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
/**
* Spring Data Elasticsearch repository for the User entity.
*/
public interface UserSearchRepository extends ElasticsearchRepository<User, Long> {}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
501f4288ad4397158e731be8a9e6881216560dda | 395e11531a072ac3f84ab6283a60a2ec9cb0e54f | /src/main/java/com/mob/commons/c.java | e058d58d0c45df5586003d19c22173d0519dc31b | [] | no_license | subdiox/senkan | c2b5422064735c8e9dc93907d613d2e7c23f62e4 | cbe5bce08abf2b09ea6ed5da09c52c4c1cde3621 | refs/heads/master | 2020-04-01T20:20:01.021143 | 2017-07-18T10:24:01 | 2017-07-18T10:24:01 | 97,585,160 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 348 | java | package com.mob.commons;
import android.content.Context;
final class c implements Runnable {
final /* synthetic */ Context a;
final /* synthetic */ long b;
c(Context context, long j) {
this.a = context;
this.b = j;
}
public void run() {
if (a.t(this.a)) {
a.b = this.b;
}
}
}
| [
"subdiox@gmail.com"
] | subdiox@gmail.com |
06e85991cea648dd1a82069b2cedddd566c1e43e | 60542134d2bcbd2e2f99bc7ac0913569c58ecc70 | /src/main/java/com/jeesite/common/service/CrudService.java | d7a4b1c189e3da00a839c63a2950e33f6b984325 | [
"Apache-2.0"
] | permissive | kindergartenso/jeesite_student | 5b76f6ae0dd81d5d10ae2fa8e85d750f8ee5bab5 | 3fe2afb4cd74b1648f725725d83f747acbbd2604 | refs/heads/master | 2021-06-13T15:06:29.038614 | 2017-03-24T03:16:17 | 2017-03-24T03:16:17 | 86,445,328 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,720 | java | /**
* Copyright © 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.jeesite.common.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.persistence.CrudDao;
import com.jeesite.common.persistence.DataEntity;
import com.jeesite.common.persistence.Page;
/**
* Service基类
* @author ThinkGem
* @version 2014-05-16
*/
@Transactional(readOnly = true)
public abstract class CrudService<D extends CrudDao<T>, T extends DataEntity<T>> extends BaseService {
/**
* 持久层对象
*/
@Autowired
protected D dao;
/**
* 获取单条数据
* @param id
* @return
*/
public T get(String id) {
return dao.get(id);
}
/**
* 获取单条数据
* @param entity
* @return
*/
public T get(T entity) {
return dao.get(entity);
}
/**
* 查询列表数据
* @param entity
* @return
*/
public List<T> findList(T entity) {
return dao.findList(entity);
}
/**
* 查询分页数据
* @param page 分页对象
* @param entity
* @return
*/
public Page<T> findPage(Page<T> page, T entity) {
entity.setPage(page);
page.setList(dao.findList(entity));
return page;
}
/**
* 保存数据(插入或更新)
* @param entity
*/
@Transactional(readOnly = false)
public void save(T entity) {
if (entity.getIsNewRecord()){
entity.preInsert();
dao.insert(entity);
}else{
entity.preUpdate();
dao.update(entity);
}
}
/**
* 删除数据
* @param entity
*/
@Transactional(readOnly = false)
public void delete(T entity) {
dao.delete(entity);
}
}
| [
"3311247533@qq.com"
] | 3311247533@qq.com |
6bffe8a5e16c6fb755ea7b3f7f334e6548a00b2c | 57d9528778441ccc4c4cbe37df8a908a9eaf15c5 | /src/com/book/JPRGerbertShildt/example/patterns/behavioral/chain_of_responsibility/chain_of_responsibility2/Notifier.java | c8ffb928bc2dbafebb6fecdbf2468db8a7ead63d | [] | no_license | Sergei-JD/bookExample | fa7b566a7551f780df2d0fbebe296a8dfa1fe106 | 33a8c573faf2b9c74b9ffdefc159478812ea447a | refs/heads/master | 2023-08-07T10:19:00.428421 | 2021-10-06T19:40:33 | 2021-10-06T19:40:33 | 410,612,439 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 680 | java | package com.book.JPRGerbertShildt.example.patterns.behavioral.chain_of_responsibility.chain_of_responsibility2;
public abstract class Notifier {
private int priority;
private Notifier nextNotifier;
public Notifier(int priority) {
this.priority = priority;
}
public void setNextNotifier(Notifier nextNotifier) {
this.nextNotifier = nextNotifier;
}
public void notifiManager(String message, int level) {
if (level >= priority) {
write(message);
}
if (nextNotifier != null) {
nextNotifier.notifiManager(message, level);
}
}
public abstract void write(String message);
}
| [
"sergshlyazhko@gmail.com"
] | sergshlyazhko@gmail.com |
b733009e4c6a0d36a0c583df53effecc690dc86c | 367f8bc0eddec958ca67b253b5b6ccde167ba980 | /benchmarks/github/PropertyComparator.java | 6c02df857cb4fb21c7e5fff62f42929cfba77cf4 | [] | no_license | lmpick/synonym | bafc6c165a79c3fac4d8d5558a076a5b0587bdb8 | 44cd2270ba43f9793dd6aba6b7a602dab6230341 | refs/heads/master | 2020-03-20T20:15:31.458764 | 2018-12-15T16:31:02 | 2018-12-15T16:31:02 | 137,677,878 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,980 | java | /* ./liferay-liferay-portal-b66e4b4/util-java/src/com/liferay/util/PropertyComparator.java */
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.util;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import java.lang.reflect.InvocationTargetException;
import java.util.Comparator;
import org.apache.commons.beanutils.PropertyUtils;
/**
* @author Patrick Brady
* @author Raymond Augé
*/
public class PropertyComparator implements Comparator<Object> {
public PropertyComparator(String propertyName) {
this(new String[] {propertyName}, true, false);
}
public PropertyComparator(
String propertyName, boolean ascending, boolean caseSensitive) {
this(new String[] {propertyName}, ascending, caseSensitive);
}
public PropertyComparator(String[] propertyNames) {
this(propertyNames, true, false);
}
public PropertyComparator(
String[] propertyNames, boolean ascending, boolean caseSensitive) {
_propertyNames = propertyNames;
_ascending = ascending;
_caseSensitive = caseSensitive;
}
@Override
public int compare(Object obj1, Object obj2) {
try {
for (String propertyName : _propertyNames) {
Object property1 = PropertyUtils.getProperty(
obj1, propertyName);
Object property2 = PropertyUtils.getProperty(
obj2, propertyName);
if (!_ascending) {
Object temp = property1;
property1 = property2;
property2 = temp;
}
if (property1 instanceof String) {
int value = 0;
if (_caseSensitive) {
value = property1.toString().compareTo(
property2.toString());
}
else {
value = property1.toString().compareToIgnoreCase(
property2.toString());
}
if (value != 0) {
return value;
}
}
if (property1 instanceof Comparable<?>) {
int value = ((Comparable<Object>)property1).compareTo(
property2);
if (value != 0) {
return value;
}
}
}
}
catch (IllegalAccessException iae) {
_log.error(iae.getMessage());
}
catch (InvocationTargetException ite) {
_log.error(ite.getMessage());
}
catch (NoSuchMethodException nsme) {
_log.error(nsme.getMessage());
}
return -1;
}
private static final Log _log = LogFactoryUtil.getLog(
PropertyComparator.class);
private final boolean _ascending;
private final boolean _caseSensitive;
private final String[] _propertyNames;
} | [
"mihirthegenius@gmail.com"
] | mihirthegenius@gmail.com |
28addac3447374de828c09959ae8f7a17782f07f | 33638d0ff45db09cc50a53830b80277695ff6900 | /core/src/test/java/se/fearless/salix/SalixTest.java | 2da2dee476aaaa8ff5a79c1781c2637fe42b4424 | [] | no_license | thehiflyer/salix | 5afca6906783d68003f42d242cfa5e4d784fec44 | b02de4c8be8c61bcce0a79723e3f009c97676e80 | refs/heads/master | 2020-12-03T02:04:19.953396 | 2017-09-08T19:56:33 | 2017-09-08T19:56:33 | 95,902,439 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,755 | java | package se.fearless.salix;
import com.google.common.collect.Iterables;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import se.fearless.salix.metrics.CountingMetrics;
import java.util.Collection;
import java.util.Random;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class SalixTest {
private Salix<String> salix;
private CountingMetrics metrics;
@Before
public void setUp() throws Exception {
metrics = new CountingMetrics();
salix = new Salix<>(-1024, -1024, -1024, 1024, 1024, 1024, 30, metrics, 256);
}
@Test
public void searchEmptyTreeForIntersectionFindsNothing() throws Exception {
Iterable<String> iterable = salix.findIntersecting(0, 0, 0, 100);
assertTrue(Iterables.isEmpty(iterable));
}
@Test
public void addingEntryAtOrigoAndThenSearchingThereFindsIt() throws Exception {
String element = "foo";
salix.add(element, 0, 0, 0, 10);
Iterable<String> iterable = salix.findIntersecting(0, 0, 0, 100);
assertTrue(Iterables.contains(iterable, element));
}
@Test
public void addingFiveElementsCloseAndFiveFarAwayOnlyFindsTheCloseOnes() throws Exception {
salix.add("c1", 105, 97, 102, 2);
salix.add("c2", 95, 97, 102, 2);
salix.add("c3", 105, 104, 102, 2);
salix.add("c4", 105, 100, 93, 2);
salix.add("c5", 101, 97, 96, 2);
salix.add("f1", -201, -106, 96, 2);
salix.add("f2", -201, -100, 102, 2);
salix.add("f3", -200, -96, 100, 2);
salix.add("f4", -201, -102, 98, 2);
salix.add("f5", 401, -207, -196, 2);
Iterable<String> intersecting = salix.findIntersecting(100, 100, 100, 20);
assertThat(intersecting).hasSize(5).contains("c1", "c2", "c3", "c4", "c5");
}
@Test
public void addOneElementAndThenMoveItAwayWillFindNothing() throws Exception {
salix.add("waldo", 100, 100, 100, 5);
salix.move("waldo", 0, -100, 0);
Iterable<String> intersecting = salix.findIntersecting(100, 100, 100, 20);
assertThat(intersecting).isEmpty();
}
@Test
public void addOneElementAndThenMoveItWillMakeItBeFoundAtTheNewPosition() throws Exception {
salix.add("waldo", 100, 100, 100, 5);
salix.move("waldo", 0, -100, 0);
Collection<String> intersecting = salix.findIntersecting(0, -105, 0, 20);
assertThat(intersecting).hasSize(1).contains("waldo");
}
@Test
public void addFiveElementsAndThenMoveAwayOneWillResultInFourFoundAtTheOldLocation() throws Exception {
salix.add("c1", 105, 97, 102, 2);
salix.add("c2", 95, 97, 102, 2);
salix.add("c3", 105, 104, 102, 2);
salix.add("c4", 105, 100, 93, 2);
salix.add("c5", 101, 97, 96, 2);
salix.move("c4", -100, -100, -100);
Collection<String> intersecting = salix.findIntersecting(100, 100, 100, 20);
assertThat(intersecting).hasSize(4).doesNotContain("c4");
}
@Test
public void addFiveElementsAndThenMoveAwayOneWillResultInOneFoundAtTheNewLocation() throws Exception {
salix.add("c1", 105, 97, 102, 2);
salix.add("c2", 95, 97, 102, 2);
salix.add("c3", 105, 104, 102, 2);
salix.add("c4", 105, 100, 93, 2);
salix.add("c5", 101, 97, 96, 2);
salix.move("c4", -100, -100, -100);
Collection<String> intersecting = salix.findIntersecting(-100, -100, -100, 20);
assertThat(intersecting).hasSize(1).contains("c4");
}
@Test
public void movingAnEntryThroughAWorldFullOfStaticEntriesFindsItAllTheWay() throws Exception {
long seed = System.currentTimeMillis();
Random random = new Random(seed);
for (int i = 0; i < 100000; i++) {
salix.add("" + i, getRandom(random), getRandom(random), getRandom(random), 10);
}
System.out.println("1 - " + (System.currentTimeMillis() - seed));
System.out.println(salix.getNumberOfChildNodes());
int halfExtent = 1000;
salix.add("waldo", -halfExtent, -halfExtent, -halfExtent, 10);
for (int i = 0; i < halfExtent * 2; i++) {
salix.move("waldo", -halfExtent + i, -halfExtent + i, -halfExtent + i);
Collection<String> intersecting = salix.findIntersecting(-halfExtent + i, -halfExtent + i, -halfExtent + i, 50);
assertThat(intersecting).contains("waldo").withFailMessage("Seed: " + seed);
}
System.out.println("2 - " + (System.currentTimeMillis() - seed));
System.out.println(salix.getNumberOfChildNodes());
}
@Test
@Ignore("slow test")
public void populateComplexity() throws Exception {
long init = System.nanoTime();
Random random = new Random(1234);
for (int i = 0; i < 100000; i++) {
long start = System.nanoTime();
salix.add("" + i, getRandom(random), getRandom(random), getRandom(random), 10);
}
System.out.println(salix.getNumberOfChildNodes());
System.out.println(metrics);
}
private int getRandom(Random random) {
return random.nextInt(2000) - 1000;
}
} | [
"per.malmen@gmail.com"
] | per.malmen@gmail.com |
ac1a0dfb922080073f3bb3a98ef3620e7e5bb707 | 8133d6d1cc0819a7fc35a2e7142b7bad84867350 | /content/manual/source/gui/dialogs/gui_input_dialog_1.java | b104a15fb95dd468948b454aa18565d15ff935db | [
"LicenseRef-scancode-unknown-license-reference",
"CC-BY-4.0"
] | permissive | Andrew-Archer/documentation | 6038ad7d39bfb60041f2e6d43caab131f0bf79dd | 2430e0d5e96b122079dc3fb05a1cf98aebfc608b | refs/heads/master | 2020-12-30T05:53:18.965497 | 2020-02-05T08:43:34 | 2020-02-05T08:43:34 | 238,880,944 | 0 | 0 | CC-BY-4.0 | 2020-02-07T08:57:23 | 2020-02-07T08:57:22 | null | UTF-8 | Java | false | false | 1,344 | java | @Inject
private Dialogs dialogs;
@Subscribe("showDialogBtn")
private void onShowDialogBtnClick(Button.ClickEvent event) {
dialogs.createInputDialog(this)
.withCaption("Enter some values")
.withParameters(
InputParameter.stringParameter("name")
.withCaption("Name").withRequired(true), // <1>
InputParameter.doubleParameter("quantity")
.withCaption("Quantity").withDefaultValue(1.0), // <2>
InputParameter.entityParameter("customer", Customer.class)
.withCaption("Customer"), // <3>
InputParameter.enumParameter("status", Status.class)
.withCaption("Status") // <4>
)
.withActions(DialogActions.OK_CANCEL) // <5>
.withCloseListener(closeEvent -> {
if (closeEvent.closedWith(DialogOutcome.OK)) { // <6>
String name = closeEvent.getValue("name"); // <7>
Double quantity = closeEvent.getValue("quantity");
Customer customer = closeEvent.getValue("customer");
Status status = closeEvent.getValue("status");
// process entered values...
}
})
.show();
}
| [
"krivopustov@haulmont.com"
] | krivopustov@haulmont.com |
778f872e42e13bbf5ff97b39c5dac9fb296403bc | 867bb3414c183bc19cf985bb6d3c55f53bfc4bfd | /mall-pay/src/main/java/com/cjcx/pay/framework/web/MyDateFormat.java | 5f8c6f7f993179afee1c9c34e66434cbd4255ff8 | [] | no_license | easonstudy/cloud-dev | 49d02fa513df3c92c5ed03cec61844d10890b80b | fe898cbfb746232fe199e83969b89cb83e85dfaf | refs/heads/master | 2020-03-29T05:39:36.279494 | 2018-10-22T10:55:14 | 2018-10-22T10:55:32 | 136,574,935 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,442 | java | package com.cjcx.pay.framework.web;
import java.text.*;
import java.util.Date;
public class MyDateFormat extends DateFormat {
private DateFormat dateFormat;
private SimpleDateFormat format1 = new SimpleDateFormat("yyy-MM-dd HH:mm:ss");
public MyDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
}
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
return dateFormat.format(date, toAppendTo, fieldPosition);
}
@Override
public Date parse(String source, ParsePosition pos) {
Date date = null;
try {
date = format1.parse(source, pos);
} catch (Exception e) {
date = dateFormat.parse(source, pos);
}
return date;
}
// 主要还是装饰这个方法
@Override
public Date parse(String source) throws ParseException {
Date date = null;
try {
// 先按我的规则来
date = format1.parse(source);
} catch (Exception e) {
// 不行,那就按原先的规则吧
date = dateFormat.parse(source);
}
return date;
}
// 这里装饰clone方法的原因是因为clone方法在jackson中也有用到
@Override
public Object clone() {
Object format = dateFormat.clone();
return new MyDateFormat((DateFormat) format);
}
}
| [
"11"
] | 11 |
a9c53cabed49968021c8fbac061d62f358e77cb3 | b0d5bc5244fd6e70c16cb78aab6b9b99d05cb245 | /src/main/java/io/github/bigbio/pgatk/utilities/obo/OBOMapper.java | ef134e70dcde71a1f5af94bf1d6553bec06daea1 | [] | no_license | bigbio/pgatk-utilities | 51fde07d6a93777e264ac06b2ce3565acf90b560 | 5277cf6eec28d7db34e65af0442ea471919aacd6 | refs/heads/master | 2023-04-22T04:23:38.728052 | 2021-04-30T14:24:57 | 2021-04-30T14:24:57 | 284,158,103 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,578 | java | package io.github.bigbio.pgatk.utilities.obo;
import lombok.extern.slf4j.Slf4j;
import org.obolibrary.oboformat.model.Frame;
import org.obolibrary.oboformat.model.OBODoc;
import org.obolibrary.oboformat.parser.OBOFormatParser;
import java.io.*;
import java.util.*;
/**
* Parser for the MS-OBO ontology of the HUPO-PSI.
*
* @author ypriverol
*
*/
@Slf4j
public class OBOMapper {
private OBODoc oboDoc = null;
InputStream source;
private HashMap<String, OboCvTerm> termMap;
public OBOMapper(File source) {
OBOFormatParser oboReader = new OBOFormatParser();
try{
this.source = new FileInputStream(source);
BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(this.source));
oboDoc = oboReader.parse(bufferedReader);
oboDoc.getInstanceFrames();
initMapper();
} catch (IOException e) {
log.error("The File can't be open --" + source.getAbsolutePath() + e.getMessage());
}
}
public OBOMapper(InputStream source) {
this.source = source;
OBOFormatParser oboReader = new OBOFormatParser();
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(source))) {
oboDoc = oboReader.parse(bufferedReader);
oboDoc.getInstanceFrames();
initMapper();
} catch (IOException e) {
log.error("The File can't be open --" + source.toString() + e.getMessage());
}
}
private void initMapper() {
termMap = new HashMap<>();
for(Frame frame: oboDoc.getTermFrames()){
String id = frame.getId();
String NAME_TAG = "name";
String name = (String) frame.getTagValue(NAME_TAG);
String DEF_TAG = "def";
String description = (String) frame.getTagValue(DEF_TAG);
termMap.put(id, new OboCvTerm(oboDoc.getHeaderFrame().getTagValue("default-namespace").toString(),name, id));
}
}
public static OBOMapper getPSIMSInstance() {
return new OBOMapper(OBOMapper.class.getClassLoader().getResourceAsStream("obo/psi-ms.obo"));
}
public Set<OboCvTerm> getTerms() {
return new HashSet<>(termMap.values());
}
/**
* Gets the entry in the OBO with the given name. If none is found, returns
* null.
* @return
*/
public OboCvTerm getTermByAccession(String accession) {
if(termMap.containsKey(accession))
return termMap.get(accession);
return null;
}
}
| [
"ypriverol@gmail.com"
] | ypriverol@gmail.com |
03e987c0b4adcf033d387bbd5a881fa926b07bf0 | 1eb60fc43004ce4c133306221e60624ecfc97256 | /src/main/java/com/anbang/qipai/daboluo/web/vo/CommonVO.java | 827be8a2d5e7ff46f43699fefd660d15316971db | [] | no_license | hangzhouanbang/qipai_daboluo | 45826f180381e08ac1b08e6bd9b742e3b01071dc | cba8966da8035b74f013e7dc51adc58b6a448420 | refs/heads/master | 2020-05-02T19:27:43.691647 | 2019-05-15T07:02:41 | 2019-05-15T07:02:41 | 178,159,999 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 571 | java | package com.anbang.qipai.daboluo.web.vo;
/**
* 一般的view obj
*
* @author neo
*
*/
public class CommonVO {
private boolean success = true;
private String msg;
private Object data;
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
}
| [
"林少聪 @PC-20180515PRDG"
] | 林少聪 @PC-20180515PRDG |
9fe4ad78faad4f215673975f5ff54fb25b8348b1 | 18c70f2a4f73a9db9975280a545066c9e4d9898e | /mirror-composite/composite-basic/src/main/java/com/migu/tsg/microservice/atomicservice/composite/dao/po/ConfigDict.java | 73b97cc9dea23527263dd635b9edfb535ff9c038 | [] | no_license | iu28igvc9o0/cmdb_aspire | 1fe5d8607fdacc436b8a733f0ea44446f431dfa8 | 793eb6344c4468fe4c61c230df51fc44f7d8357b | refs/heads/master | 2023-08-11T03:54:45.820508 | 2021-09-18T01:47:25 | 2021-09-18T01:47:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,277 | java | package com.migu.tsg.microservice.atomicservice.composite.dao.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 项目名称:
* 包: com.aspire.ums.cmdb.dict.entity
* 类名称:
* 类描述:
* 创建人: PJX
* 创建时间: 2019/4/15 09:49
* 版本: v1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ConfigDict implements Serializable {
/**
* 标签ID
*/
private String id;
/**
* 标签名称
*/
private String name;
/**
* 标签类型
*/
private String type;
/**
* 标签值
*/
private String value;
/**
* 父标签ID
*/
private Integer pid;
/**
* 描述
*/
private String description;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date create_date;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date update_date;
/**
* 父标签名
*/
private String pname;
private List<ConfigDict> subList;
}
| [
"jiangxuwen7515@163.com"
] | jiangxuwen7515@163.com |
90bf265037d6db79dd0d029a0234b1bd1d25fb6d | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5646553574277120_0/java/hassan88/C.java | eff2030aca61eaf25f3e08db797e746028087bc7 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,975 | java | import java.io.*;
import java.util.*;
public class C {
static int V, best = Integer.MAX_VALUE;
public static void main(String[] args) throws IOException {
BufferedInputStream bis = new BufferedInputStream(new FileInputStream("C-small-attempt1.in"));
BufferedReader br = new BufferedReader(new InputStreamReader(bis));
PrintWriter out = new PrintWriter(new File("C-small.out"));
StringTokenizer st;
int cases = Integer.parseInt(br.readLine().trim()), C, D;
for (int c = 1; c <= cases; c++) {
best = Integer.MAX_VALUE;
st = new StringTokenizer(br.readLine());
C = Integer.parseInt(st.nextToken());
D = Integer.parseInt(st.nextToken());
V = Integer.parseInt(st.nextToken());
TreeSet <Integer> coins = new TreeSet<Integer>();
st = new StringTokenizer(br.readLine());
for(int i = 0;i < D;i++)coins.add(Integer.parseInt(st.nextToken()));
boolean [] possible = new boolean[V+1];
possible [0] = true;
for(int x:coins) {
for(int i = possible.length-1;i >= x;i--)
if(possible[i-x])possible[i] = true;
}
solve(possible, coins, 0, 0);
out.println("Case #" + c + ": " + best);
}
out.close();
}
public static int solve(boolean [] possible, TreeSet <Integer> coinsUsed, int added, int last) {
boolean solved = true;
for(int i = 0;i < possible.length && solved;i++)
solved &= possible[i];
if(added >= best)return 1000000;
if(solved) {
best = Math.min(best, added);
return added;
}
int res = Integer.MAX_VALUE;
for(int x = last+1;x <= V;x++) {
if(!coinsUsed.contains(x)) {
coinsUsed.add(x);
boolean [] possible2 = new boolean[possible.length];
for(int i = 0;i < possible2.length;i++)possible2[i] = possible[i];
for(int i = possible2.length-1;i >= x;i--)
if(possible2[i-x])
possible2[i] = true;
res = Math.min(res, solve(possible2, coinsUsed, added+1, x));
coinsUsed.remove(x);
}
}
return res;
}
} | [
"eewestman@gmail.com"
] | eewestman@gmail.com |
5364807f888abcb61f4dcd9958671452349e8d0c | 991223dfa128137e64d0de1e17c30699f9dfb41e | /src/main/java/com/lottery/common/contains/lottery/TerminalType.java | 356128697415c1ef14b9cecaecffb06c55c16cd6 | [] | no_license | soon14/lottery-mumu | 454180203b2ed030ab836086a3f37222647103e3 | 48141dd2308287c3fb29bcf4e9868b049d227d91 | refs/heads/master | 2020-03-24T11:17:15.326087 | 2016-06-22T08:10:59 | 2016-06-22T08:10:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,610 | java | package com.lottery.common.contains.lottery;
import java.util.Arrays;
import java.util.List;
public enum TerminalType {
T_DYJ(1,"大赢家"),
T_TJFC(2,"天津福彩"),
T_FCBY(3,"丰彩博雅"),
T_NXFC(4,"宁夏福彩"),
T_ZCH(5,"中彩汇"),
T_HY(6,"华阳"),
T_YM(7,"饮马"),
T_YX(8,"银溪"),
T_HLJFC(9,"黑龙江福彩"),
T_TJFC_CENTER(10,"天津福彩中心"),
T_GXFC(11,"广西福彩"),
T_QH(12,"齐汇"),
T_XCS(13,"小财神"),
T_ARUI(14,"安瑞"),
T_GZCP(15,"广州出票"),
T_GX(16,"国信出票"),
T_ZHONGYING(17,"默认出票"),
T_OWN_CENTER(18,"出票中心"),
T_HUAI(19,"互爱科技"),
T_ZY(20,"掌奕"),
T_SDHC(21,"山东宏彩"),
T_XMAC(22,"厦门爱彩"),
T_JINRUO(23,"金诺"),
T_JYDP(24,"嘉优打票"),
T_SHCP(25,"上海出票"),
T_GAODE(26,"高德出票"),
T_HUANCAI(27,"环彩出票"),
T_RUIYING(28,"瑞盈出票"),
T_Virtual(-1,"虚拟出票"),
all(0,"全部");
public int value;
public String name;
TerminalType(int value,String name){
this.value=value;
this.name=name;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static TerminalType get(int value){
TerminalType[] type=values();
for(TerminalType terminalType:type){
if(terminalType.value==value){
return terminalType;
}
}
return null;
}
public String toString(){
return "[name="+name+",value="+value+"]";
}
public static List<TerminalType> get(){
return Arrays.asList(values());
}
}
| [
"stringmumu@gmail.com"
] | stringmumu@gmail.com |
d3e08b7a47451f2df4210e4a6d4bbf729e591899 | 323c723bdbdc9bdf5053dd27a11b1976603609f5 | /nssicc/nssicc_dao/src/main/java/biz/belcorp/ssicc/dao/spusicc/let/ibatis/ProcesoLETCalculoObjetivosRetencionesDAOiBatis.java | 951998e631fe903bf9b860d52af99cee58e570c2 | [] | no_license | cbazalar/PROYECTOS_PROPIOS | adb0d579639fb72ec7871334163d3fef00123a1c | 3ba232d1f775afd07b13c8246d0a8ac892e93167 | refs/heads/master | 2021-01-11T03:38:06.084970 | 2016-10-24T01:33:00 | 2016-10-24T01:33:00 | 71,429,267 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,324 | java | package biz.belcorp.ssicc.dao.spusicc.let.ibatis;
import java.util.Map;
import org.springframework.stereotype.Repository;
import biz.belcorp.ssicc.dao.framework.ibatis.BaseDAOiBatis;
import biz.belcorp.ssicc.dao.spusicc.let.ProcesoLETCalculoObjetivosRetencionesDAO;
/**
* Proceso que realiza el calculo de Objetivos de Retenciones
*
* <p>
* <a href="ProcesoLETCalculoObjetivosRetencionesDAOiBatis.java.html"> <i>View Source </i> </a>
* </p>
*
* @author Danny Amaro
*
*/
@Repository("spusicc.procesoLETCalculoObjetivosRetencionesDAO")
public class ProcesoLETCalculoObjetivosRetencionesDAOiBatis extends BaseDAOiBatis implements ProcesoLETCalculoObjetivosRetencionesDAO{
/* (non-Javadoc)
* @see biz.belcorp.ssicc.spusicc.let.dao.ProcesoLETCalculoObjetivosRetencionesDAO#executeProcesoLETCalculoObjetivosRetenciones(java.util.Map)
*/
public void executeProcesoLETCalculoObjetivosRetenciones(Map params) {
log.info("Entro a ProcesoLETCalculoObjetivosRetencionesDAOiBatis - executeProcesoLETCalculoObjetivosRetenciones(java.util.Map)");
getSqlMapClientTemplate().update("spusicc.let.ProcesosLETSQL.executeProcesoLETCalculoObjetivosRetenciones", params);
log.info("Salio a ProcesoLETCalculoObjetivosRetencionesDAOiBatis - executeProcesoLETCalculoObjetivosRetenciones(java.util.Map)");
}
}
| [
"cbazalarlarosa@gmail.com"
] | cbazalarlarosa@gmail.com |
bf943bddac9791522c5e3fb077ef3bd2a11213ea | e4b45ef336874596a98d225169fe15748724f22a | /排序算法/QuickSort.java | c13de5505f5aa8b19a2454a28c9adae8f05555e9 | [] | no_license | Jamofl/myLeetCode | 1459be44655a54d246dca6a4875fc77a190b1f95 | 572216f676499b305415bf0acc6afed6bcfaf59d | refs/heads/main | 2023-06-29T20:24:53.054332 | 2021-07-13T07:44:29 | 2021-07-13T07:44:29 | 382,751,469 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,030 | java | package 排序算法;
public class QuickSort {
private int[] swap(int[] nums, int i, int j){
if (i == j)
return nums;
int temp = nums[i];
nums[i] = nums[j];
nums[j] = temp;
return nums;
}
public void quickSort(int[] nums, int start, int end){
if (end <= start)
return;
int pivot = nums[start];
int i = start + 1;
int j = end;
while (i <= j){
if (nums[i] < pivot)
i ++;
else if(nums[j] > pivot)
j --;
else{
swap(nums, i, j);
i ++;
j --;
}
}
swap(nums, start, j); // swap pivot and element at j
quickSort(nums, start, j - 1);
quickSort(nums, j + 1, end);
}
public static void main(String[] args){
// QuickSort q = new QuickSort();
// int[] nums = new int[]{5,1,1,2,0,0};
// q.quickSort(nums, 0 , nums.length - 1);
}
}
| [
"568920979@qq.com"
] | 568920979@qq.com |
5c06816aa5178fc36913aa9a0171270054e2ffd2 | 3efecbdce5edf4aea349ba92a06066ec87f5bc41 | /src/org/ddogleg/optimization/lm/UnconLeastSqLevenbergMarquardtSchur_F64.java | a1bc37d7a131c4eec56b1d4762ee2ecd13a15da0 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | lessthanoptimal/ddogleg | c15065f15d7256d2a43c364ab67714e202e69b7e | 58c50b359e7cb44753d852ea38132d7f84228d77 | refs/heads/SNAPSHOT | 2023-09-03T17:32:38.366931 | 2023-04-22T14:48:30 | 2023-04-22T14:49:22 | 6,781,936 | 51 | 15 | null | 2023-02-15T01:47:47 | 2012-11-20T17:23:48 | Java | UTF-8 | Java | false | false | 3,076 | java | /*
* Copyright (c) 2012-2020, Peter Abeles. All Rights Reserved.
*
* This file is part of DDogleg (http://ddogleg.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.ddogleg.optimization.lm;
import org.ddogleg.optimization.UnconstrainedLeastSquaresSchur;
import org.ddogleg.optimization.functions.FunctionNtoM;
import org.ddogleg.optimization.functions.SchurJacobian;
import org.ddogleg.optimization.math.HessianSchurComplement;
import org.ddogleg.optimization.math.MatrixMath;
import org.ejml.data.DMatrix;
import org.ejml.data.DMatrixRMaj;
/**
* Implementation of {@link LevenbergMarquardt_F64} for {@link UnconstrainedLeastSquaresSchur}.
*
* @author Peter Abeles
*/
@SuppressWarnings("NullAway.Init")
public class UnconLeastSqLevenbergMarquardtSchur_F64<S extends DMatrix>
extends LevenbergMarquardt_F64<S,HessianSchurComplement<S>>
implements UnconstrainedLeastSquaresSchur<S>
{
// Left and right side of the jacobian matrix
public S jacLeft;
public S jacRight;
public FunctionNtoM functionResiduals;
public SchurJacobian<S> functionJacobian;
public UnconLeastSqLevenbergMarquardtSchur_F64(MatrixMath<S> math,
HessianSchurComplement<S> hessian )
{
super(math,hessian);
this.jacLeft = math.createMatrix();
this.jacRight = math.createMatrix();
}
@Override
public void setFunction(FunctionNtoM function, SchurJacobian<S> jacobian) {
this.functionResiduals = function;
this.functionJacobian = jacobian;
}
@Override
public void initialize(double[] initial, double ftol, double gtol) {
config.ftol = ftol;
config.gtol = gtol;
super.initialize(initial, functionResiduals.getNumOfInputsN(), functionResiduals.getNumOfOutputsM());
}
@Override
public double[] getParameters() {
return x.data;
}
@Override
public double getFunctionValue() {
return fx;
}
@Override
public boolean isUpdated() {
return mode == Mode.COMPUTE_DERIVATIVES;
}
@Override
public boolean isConverged() {
return mode == Mode.CONVERGED;
}
@Override
protected void functionGradientHessian(DMatrixRMaj x, boolean sameStateAsResiduals,
DMatrixRMaj gradient, HessianSchurComplement<S> hessian) {
if( !sameStateAsResiduals )
functionResiduals.process(x.data,residuals.data);
functionJacobian.process(x.data,jacLeft,jacRight);
hessian.computeHessian(jacLeft,jacRight);
hessian.computeGradient(jacLeft,jacRight,residuals,gradient);
}
@Override
protected void computeResiduals(DMatrixRMaj x, DMatrixRMaj residuals) {
functionResiduals.process(x.data,residuals.data);
}
}
| [
"peter.abeles@gmail.com"
] | peter.abeles@gmail.com |
6ce7756ed367585a4ada84927d086c71531aa6e1 | 5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1 | /Code Snippet Repository/Hibernate/Hibernate3806.java | c17772d7fa1c5708318902a3b82af5bfe28b7c73 | [] | no_license | saber13812002/DeepCRM | 3336a244d4852a364800af3181e03e868cf6f9f5 | be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9 | refs/heads/master | 2023-03-16T00:08:06.473699 | 2018-04-18T05:29:50 | 2018-04-18T05:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,153 | java | private void renderJoin(Join join, JoinFragment joinFragment) {
if ( CompositeQuerySpace.class.isInstance( join.getRightHandSide() ) ) {
handleCompositeJoin( join, joinFragment );
}
else if ( EntityQuerySpace.class.isInstance( join.getRightHandSide() ) ) {
// do not render the entity join for a one-to-many association, since the collection join
// already joins to the associated entity table (see doc in renderCollectionJoin()).
if ( join.getLeftHandSide().getDisposition() == QuerySpace.Disposition.COLLECTION ) {
if ( CollectionQuerySpace.class.cast( join.getLeftHandSide() ).getCollectionPersister().isManyToMany() ) {
renderManyToManyJoin( join, joinFragment );
}
else if ( JoinDefinedByMetadata.class.isInstance( join ) &&
CollectionPropertyNames.COLLECTION_INDICES.equals( JoinDefinedByMetadata.class.cast( join ).getJoinedPropertyName() ) ) {
renderManyToManyJoin( join, joinFragment );
}
}
else {
renderEntityJoin( join, joinFragment );
}
}
else if ( CollectionQuerySpace.class.isInstance( join.getRightHandSide() ) ) {
renderCollectionJoin( join, joinFragment );
}
}
| [
"Qing.Mi@my.cityu.edu.hk"
] | Qing.Mi@my.cityu.edu.hk |
ebb9c826bdd21bef5d83718a973e34dc92fbb496 | d71e879b3517cf4fccde29f7bf82cff69856cfcd | /ExtractedJars/PACT_com.pactforcure.app/javafiles/com/itextpdf/text/pdf/parser/RenderFilter.java | de9247e13dc31f3e2f992e9ff1bc5ad818176d7a | [
"MIT"
] | permissive | Andreas237/AndroidPolicyAutomation | b8e949e072d08cf6c6166c3f15c9c63379b8f6ce | c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a | refs/heads/master | 2020-04-10T02:14:08.789751 | 2019-05-16T19:29:11 | 2019-05-16T19:29:11 | 160,739,088 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 780 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.itextpdf.text.pdf.parser;
// Referenced classes of package com.itextpdf.text.pdf.parser:
// ImageRenderInfo, TextRenderInfo
public abstract class RenderFilter
{
public RenderFilter()
{
// 0 0:aload_0
// 1 1:invokespecial #8 <Method void Object()>
// 2 4:return
}
public boolean allowImage(ImageRenderInfo imagerenderinfo)
{
return true;
// 0 0:iconst_1
// 1 1:ireturn
}
public boolean allowText(TextRenderInfo textrenderinfo)
{
return true;
// 0 0:iconst_1
// 1 1:ireturn
}
}
| [
"silenta237@gmail.com"
] | silenta237@gmail.com |
58e5a8b272703a4d71375363370b5f81d483b822 | a8378b15a6907870056c1696ae463e950a46fbe5 | /src/alg0619/test3/Main.java | cb7b4661b81b6f69ef2d94daeb23475846efbf13 | [] | no_license | CourageDz/LeetCodePro | 38a90ad713d46911b64c893c7fcae04fb0b20791 | d0dfeab630357c8172395ff8533e38b5fb9498c5 | refs/heads/master | 2020-03-28T14:18:58.656373 | 2020-03-18T05:00:12 | 2020-03-18T05:00:12 | 148,476,780 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 788 | java | package alg0619.test3;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
System.out.println(getInvalid(n));
}
private static long getInvalid(int n) {
boolean[] ifSkip=new boolean[n+1];
long sum=1;
int mod=1000000007;
for (int i = 2; i <=n ; i++) {
if(ifSkip[i])
continue;
int k=i+i;
while (k<=n){
ifSkip[k]=true;
k+=i;
}
int count=0;
long mi=i;
while (mi<=n){
mi*=i;
count++;
}
sum*=(count+1)%mod;
}
return sum;
}
}
| [
"39013348@qq.com"
] | 39013348@qq.com |
f86d8fd9d97ef500759aa86b5454b8c236eb856b | 62e334192393326476756dfa89dce9f0f08570d4 | /tk_code/spring-boot-starters/spring-boot-starter-dubbo/src/main/java/com/huatu/springboot/dubbo/annotation/DubboConsumer.java | 63c3be61dcdfd18b76d5aef8585563abd04ad274 | [] | no_license | JellyB/code_back | 4796d5816ba6ff6f3925fded9d75254536a5ddcf | f5cecf3a9efd6851724a1315813337a0741bd89d | refs/heads/master | 2022-07-16T14:19:39.770569 | 2019-11-22T09:22:12 | 2019-11-22T09:22:12 | 223,366,837 | 1 | 2 | null | 2022-06-30T20:21:38 | 2019-11-22T09:15:50 | Java | UTF-8 | Java | false | false | 1,121 | java | package com.huatu.springboot.dubbo.annotation;
import java.lang.annotation.*;
/**
* dubbo consumer
*
* @author xionghui
* @email xionghui.xh@alibaba-inc.com
* @since 1.0.0
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DubboConsumer {
// 版本
String version() default "";
// 远程调用超时时间(毫秒)
int timeout() default 0;
// 注册中心
String registry() default "";
// 服务分组
String group() default "";
// 客户端类型
String client() default "";
// 点对点直连服务提供地址
String url() default "";
String protocol() default "";
// 检查服务提供者是否存在
boolean check() default true;
// lazy create connection
boolean lazy() default false;
// 重试次数
int retries() default 0;
// 最大并发调用
int actives() default 0;
// 负载均衡
String loadbalance() default "";
// 是否异步
boolean async() default false;
// 异步发送是否等待发送成功
boolean sent() default false;
}
| [
"jelly_b@126.com"
] | jelly_b@126.com |
695ac3c6d473f9844cfc36204b2d7c82df849294 | 4df6986a5966f45d5110784990729e0e78389c22 | /src/test/java/org/jusecase/bitnet/samples/chat/Chat.java | 20503ec6bd5de4dc6b99dc0c666f18396fa36ec3 | [] | no_license | casid/jusecase-bitnet | 18ca3b4f5418fca51f3ced467ca46112522451cf | 19613c3f4f2af2da56d2f82da983548d496859bf | refs/heads/master | 2023-08-08T00:56:01.669473 | 2023-08-01T18:10:16 | 2023-08-01T18:21:28 | 143,055,823 | 0 | 0 | null | 2020-10-13T04:03:31 | 2018-07-31T19:03:49 | Java | UTF-8 | Java | false | false | 4,064 | java | package org.jusecase.bitnet.samples.chat;
import org.jusecase.bitnet.message.BitMessage;
import org.jusecase.bitnet.message.BitMessageReader;
import org.jusecase.bitnet.message.BitMessageWriter;
import org.jusecase.bitnet.message.InvalidBitMessageException;
import org.jusecase.bitnet.network.NetworkReceiver;
import org.jusecase.bitnet.network.NetworkReceiverListener;
import org.jusecase.bitnet.network.NetworkSender;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Chat implements NetworkReceiverListener {
public static InetSocketAddress ADDRESS1 = new InetSocketAddress("localhost", 60387);
public static InetSocketAddress ADDRESS2 = new InetSocketAddress("localhost", 60388);
private final InetSocketAddress address;
private final int playerId;
private final ChatProtocol protocol = new ChatProtocol();
private final BitMessageReader reader = new BitMessageReader(protocol, 0x12340001);
private final BitMessageWriter writer = new BitMessageWriter(protocol, 0x12340001);
private NetworkReceiver networkReceiver;
private NetworkSender networkSender;
private List<InetSocketAddress> addresses = Arrays.asList(ADDRESS1, ADDRESS2);
public Chat(InetSocketAddress address, int playerId) {
this.address = address;
this.playerId = playerId;
}
public void start() {
try {
networkReceiver = new NetworkReceiver(address, ChatProtocol.MAX_PACKET_BYTES, this);
networkReceiver.start();
networkSender = new NetworkSender();
} catch (IOException e) {
System.err.println("Failed to start chat, will terminate now");
e.printStackTrace();
return;
}
System.out.println("Welcome to the test chat. Type a message to send it, or 'exit' to terminate");
Scanner scanner = new Scanner(System.in);
while (true) {
String message = scanner.nextLine();
if ("exit".equals(message)) {
System.out.println("Shutting down");
stop();
return;
}
ChatMessage chatMessage = new ChatMessage();
chatMessage.text = message;
chatMessage.playerId = playerId;
System.out.println(chatMessage);
sendToOtherPlayers(chatMessage);
}
}
public void stop() {
try {
networkSender.close();
} catch (IOException e) {
System.err.println("IO error while closing network sender");
e.printStackTrace();
}
try {
networkReceiver.stop();
} catch (IOException e) {
System.err.println("IO error while stopping network receiver");
e.printStackTrace();
}
}
@Override
public void onPacketReceived(ByteBuffer packet, InetSocketAddress address) {
try {
BitMessage message = reader.read(packet);
if (message == null) {
return;
}
System.out.println(message.toString());
} catch (InvalidBitMessageException e) {
System.err.println("invalid bit message received");
e.printStackTrace();
}
}
@Override
public void onErrorReceived(IOException e) {
System.err.println("IO error while listening for incoming packets");
e.printStackTrace();
}
public void sendToOtherPlayers(BitMessage message) {
List<ByteBuffer> packets = writer.write(message);
for (InetSocketAddress address : addresses) {
if (!address.equals(this.address)) {
try {
networkSender.send(address, packets);
} catch (IOException e) {
System.out.println("IO error while sending message to " + address);
e.printStackTrace();
}
}
}
}
}
| [
"andy@mazebert.com"
] | andy@mazebert.com |
29d69cd54ceb81e3da7f42b9d4695d13159a4864 | c57ef8d3782d2f1d4c39b557ec0dcefc7af34b3d | /app/src/main/java/afkt/project/ui/activity/WrapActivity.java | 14b7c5707b4225e4785ba336990e4472066e5649 | [
"Apache-2.0"
] | permissive | JackLavey/DevUtils | d2093d8d1939700161c3f015c9181c086232b101 | 9bca025ae1f08a999935e2323ce7e39b53818d4a | refs/heads/master | 2022-11-29T17:08:30.484297 | 2020-08-10T18:30:09 | 2020-08-10T18:30:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,408 | java | package afkt.project.ui.activity;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import afkt.project.R;
import afkt.project.base.app.BaseToolbarActivity;
import afkt.project.ui.widget.BaseTextView;
import butterknife.BindView;
import dev.utils.app.ResourceUtils;
import dev.utils.app.ShapeUtils;
import dev.utils.app.helper.QuickHelper;
import dev.utils.common.ChineseUtils;
import dev.utils.common.RandomUtils;
import dev.widget.ui.WrapView;
/**
* detail: 自动换行 View
* @author Ttt
*/
public class WrapActivity extends BaseToolbarActivity {
@BindView(R.id.vid_aw_wrapview)
WrapView vid_aw_wrapview;
@Override
public int getLayoutId() {
return R.layout.activity_wrap;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 刷新按钮
View view = QuickHelper.get(new BaseTextView(this))
.setText("刷新")
.setBold()
.setTextColor(ResourceUtils.getColor(R.color.red))
.setTextSizeBySp(15.0f)
.setPaddingLeft(30)
.setPaddingRight(30)
.setOnClicks(new View.OnClickListener() {
@Override
public void onClick(View v) {
initValue();
}
}).getView();
vid_bt_toolbar.addView(view);
}
@Override
public void initValue() {
super.initValue();
vid_aw_wrapview
// 设置最大行数
// .setMaxLine(RandomUtils.getRandom(10, 30))
// 设置每一行向上的边距 ( 行间隔 )
.setRowTopMargin(30)
// 设置每个 View 之间的 Left 边距
.setViewLeftMargin(30)
// 快捷设置两个边距
.setRowViewMargin(30, 30)
.removeAllViews();
// LayoutParams
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
// 设置点击效果
GradientDrawable drawable = ShapeUtils.newShape(30f, ResourceUtils.getColor(R.color.color_88)).getDrawable();
for (int i = 1; i <= 20; i++) {
// 随机字符串
String text = ChineseUtils.randomWord(RandomUtils.getRandom(7)) + RandomUtils.getRandomLetters(RandomUtils.getRandom(5));
String randomText = i + "." + RandomUtils.getRandom(text.toCharArray(), text.length());
vid_aw_wrapview.addView(createView(randomText, layoutParams, drawable));
}
}
private BaseTextView createView(String text, ViewGroup.LayoutParams layoutParams, GradientDrawable drawable) {
return QuickHelper.get(new BaseTextView(this))
.setLayoutParams(layoutParams)
.setPadding(30, 15, 30, 15)
.setBackground(drawable)
.setMaxLines(1)
.setEllipsize(TextUtils.TruncateAt.END)
.setTextColor(Color.WHITE)
.setTextSizeBySp(15f)
.setBold(RandomUtils.nextBoolean())
.setText(text)
.getView();
}
} | [
"13798405957@163.com"
] | 13798405957@163.com |
0625a7539db77efbd9eb84698daef2dad2f13fd4 | 7e0312b60279c3ed7cdea485bb3518ef1627a3bc | /kurumi/src/kurumi/StreamProxy.java | 57ba5460c1334724e8b3fb421a205ede52f27c03 | [] | no_license | weimingtom/KuukoBack | 96be953eb2b09b3692ed5136f5049c999ec1b4b8 | 77d17af0a6659cc8ba3f82d75c59090af1a0983d | refs/heads/master | 2021-01-23T12:58:29.533678 | 2018-04-07T11:44:24 | 2018-04-07T11:44:24 | 93,216,266 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,915 | java | package kurumi;
import java.io.*;
public class StreamProxy {
private final static int TYPE_FILE = 0;
private final static int TYPE_STDOUT = 1;
private final static int TYPE_STDIN = 2;
private final static int TYPE_STDERR = 3;
public int type = TYPE_FILE;
public boolean isOK = false;
private RandomAccessFile _file = null;
private StreamProxy() {
this.isOK = false;
}
public StreamProxy(String path, String modeStr) {
this.isOK = false;
try {
if (modeStr != null) {
modeStr = modeStr.replace("b", "");
if (modeStr.contains("w")) {
modeStr = "rw";
}
}
this._file = new RandomAccessFile(path, modeStr);
this.isOK = true;
} catch (FileNotFoundException e) {
e.printStackTrace();
}
this.type = TYPE_FILE;
}
public final void Flush() {
if (this.type == TYPE_STDOUT) {
//RandomAccessFile flush not need ?
}
}
public final void Close() {
if (this.type == TYPE_STDOUT) {
if (this._file != null) {
try {
this._file.close();
} catch (IOException e) {
e.printStackTrace();
}
this._file = null;
}
}
}
public final void Write(byte[] buffer, int offset, int count) {
if (this.type == TYPE_STDOUT) {
System.out.print(new String(buffer, offset, count));
} else if (this.type == TYPE_STDERR) {
System.err.print(new String(buffer, offset, count));
} else if (this.type == TYPE_FILE) {
if (this._file != null) {
try {
this._file.write(buffer, offset, count); //FIXME:don't use writeBytes(String s)
} catch (IOException e) {
e.printStackTrace();
}
}
} else {
//FIXME:TODO
}
}
public final int Read(byte[] buffer, int offset, int count) {
if (type == TYPE_FILE) {
if (this._file != null) {
try {
int result = this._file.read(buffer, offset, count);
return result < 0 ? 0 : result;
} catch (IOException e) {
e.printStackTrace();
}
}
} else if (this.type == TYPE_STDIN) {
//don't use System.in.read(), windows seem eat \r if use pipe redirect input
// int size = 0;
// try {
// for (int i = offset; i < offset + count; ++i) {
// int result = System.in.read();
// if (result < 0) {
// break;
// }
// buffer[offset + i] = (byte)result;
// size++;
// }
// }
// catch (IOException e) {
// e.printStackTrace();
// }
// return size;
try {
int result = System.in.read(buffer, offset, count);
return result < 0 ? 0 : result;
} catch (IOException e) {
e.printStackTrace();
}
}
return 0;
}
public final int Seek(long offset, int origin) {
if (type == TYPE_FILE) {
if (this._file != null) {
//CLib.SEEK_SET,
//CLib.SEEK_CUR,
//CLib.SEEK_END
long pos = -1;
if (origin == CLib.SEEK_CUR) {
pos = offset;
} else if (origin == CLib.SEEK_CUR) {
try {
pos = this._file.getFilePointer() + offset;
} catch (IOException e) {
e.printStackTrace();
}
} else if (origin == CLib.SEEK_END) {
try {
pos = this._file.length() + offset;
} catch (IOException e) {
e.printStackTrace();
}
}
try {
this._file.seek(pos);
} catch (IOException e) {
e.printStackTrace();
}
}
}
return 0;
}
public final int ReadByte() {
if (type == TYPE_STDIN) {
try {
return System.in.read();
} catch (IOException e) {
e.printStackTrace();
}
return 0;
} else if (type == TYPE_FILE) {
if (this._file != null) {
try {
return this._file.read();
} catch (IOException e) {
e.printStackTrace();
}
}
return -1;
} else {
return 0;
}
}
public final void ungetc(int c) {
if (type == TYPE_FILE) {
if (this._file != null) {
try {
this._file.seek(this._file.getFilePointer() - 1);
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
public final long getPosition() {
if (type == TYPE_FILE) {
if (this._file != null) {
try {
return this._file.getFilePointer();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return 0;
}
public final boolean isEof() {
if (type == TYPE_FILE) {
if (this._file != null) {
try {
return this._file.getFilePointer() >= this._file.length();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return true;
}
//--------------------------------------
public static StreamProxy tmpfile() {
StreamProxy result = new StreamProxy();
return result;
}
public static StreamProxy OpenStandardOutput() {
StreamProxy result = new StreamProxy();
result.type = TYPE_STDOUT;
result.isOK = true;
return result;
}
public static StreamProxy OpenStandardInput() {
StreamProxy result = new StreamProxy();
result.type = TYPE_STDIN;
result.isOK = true;
return result;
}
public static StreamProxy OpenStandardError() {
StreamProxy result = new StreamProxy();
result.type = TYPE_STDERR;
result.isOK = true;
return result;
}
public static String GetCurrentDirectory() {
File directory = new File("");
return directory.getAbsolutePath();
}
public static void Delete(String path) {
new File(path).delete();
}
public static void Move(String path1, String path2) {
new File(path1).renameTo(new File(path2));
}
public static String GetTempFileName() {
try {
return File.createTempFile("abc", ".tmp").getAbsolutePath();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public static String ReadLine() {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
try {
return in.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public static void Write(String str) {
System.out.print(str);
}
public static void WriteLine() {
System.out.println();
}
public static void ErrorWrite(String str) {
System.err.print(str);
System.err.flush();
}
}
| [
"weimingtom@qq.com"
] | weimingtom@qq.com |
1188f7490fb4b469c9cb03c9c89e13f6b0f92572 | 146a30bee123722b5b32c0022c280bbe7d9b6850 | /depsWorkSpace/bc-java-master/pkix/src/main/jdk1.3/org/mightyfish/cert/ocsp/jcajce/JcaRespID.java | 8d77a39f645618a7e2cf0bc21b14785b5cdb5b50 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | GLC-Project/java-experiment | 1d5aa7b9974c8ae572970ce6a8280e6a65417837 | b03b224b8d5028dd578ca0e7df85d7d09a26688e | refs/heads/master | 2020-12-23T23:47:57.341646 | 2016-02-13T16:20:45 | 2016-02-13T16:20:45 | 237,313,620 | 0 | 1 | null | 2020-01-30T21:56:54 | 2020-01-30T21:56:53 | null | UTF-8 | Java | false | false | 539 | java | package org.mightyfish.cert.ocsp.jcajce;
import java.security.PublicKey;
import org.mightyfish.asn1.x500.X500Name;
import org.mightyfish.asn1.x509.SubjectPublicKeyInfo;
import org.mightyfish.cert.ocsp.OCSPException;
import org.mightyfish.cert.ocsp.RespID;
import org.mightyfish.operator.DigestCalculator;
public class JcaRespID
extends RespID
{
public JcaRespID(PublicKey pubKey, DigestCalculator digCalc)
throws OCSPException
{
super(SubjectPublicKeyInfo.getInstance(pubKey.getEncoded()), digCalc);
}
}
| [
"a.eslampanah@live.com"
] | a.eslampanah@live.com |
4c06b3810fd29c3672f523b24915aa719cebfa1a | fa93c9be2923e697fb8a2066f8fb65c7718cdec7 | /sources/com/avito/android/bundles/vas_union/di/Closable.java | 6e97640b9cacec6743c0727330153445d3dd5ba4 | [] | no_license | Auch-Auch/avito_source | b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b | 76fdcc5b7e036c57ecc193e790b0582481768cdc | refs/heads/master | 2023-05-06T01:32:43.014668 | 2021-05-25T10:19:22 | 2021-05-25T10:19:22 | 370,650,685 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 614 | java | package com.avito.android.bundles.vas_union.di;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.inject.Qualifier;
import kotlin.Metadata;
@Qualifier
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u001b\n\u0002\b\u0003\b\u0002\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/avito/android/bundles/vas_union/di/Closable;", "", "<init>", "()V", "vas-bundles_release"}, k = 1, mv = {1, 4, 2})
@Retention(RetentionPolicy.RUNTIME)
@kotlin.annotation.Retention
public @interface Closable {
}
| [
"auchhunter@gmail.com"
] | auchhunter@gmail.com |
48d9f48f15e9edc48ab1144cffc3413ba5f01677 | de3eb812d5d91cbc5b81e852fc32e25e8dcca05f | /branches/crux/4.1.0/Crux/src/core/org/cruxframework/crux/core/server/InitializerListener.java | f555bf5d1aafeffb0ef47c51eb9ffceb25448276 | [] | no_license | svn2github/crux-framework | 7dd52a951587d4635112987301c88db23325c427 | 58bcb4821752b405a209cfc21fb83e3bf528727b | refs/heads/master | 2016-09-06T13:33:41.975737 | 2015-01-22T08:03:25 | 2015-01-22T08:03:25 | 13,135,398 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,405 | java | /*
* Copyright 2011 cruxframework.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.cruxframework.crux.core.server;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.cruxframework.crux.core.config.ConfigurationFactory;
import org.cruxframework.crux.core.server.classpath.ClassPathResolverInitializer;
import org.cruxframework.crux.core.server.dispatch.ServiceFactoryInitializer;
import org.cruxframework.crux.core.server.rest.core.registry.RestServiceScanner;
/**
* When the application starts, register clientHandlers
* and widgets into this module.
*
* @author Thiago
*
*/
public class InitializerListener implements ServletContextListener
{
private static ServletContext context;
private static final Log logger = LogFactory.getLog(InitializerListener.class);
/**
* @return
*/
public static ServletContext getContext()
{
return context;
}
/**
* @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
*/
public void contextDestroyed(ServletContextEvent contextEvent)
{
}
/**
* @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
*/
public void contextInitialized(ServletContextEvent contextEvent)
{
try
{
context = contextEvent.getServletContext();
if (Environment.isProduction())
{
CruxBridge.getInstance().setSingleVM(true);
}
else
{
//TODO - Thiago documentar isso no wiki
//TODO - Thiago remover quebras de linha e espacos antes de gravar....
String classScannerAllowedPackages = contextEvent.getServletContext().getInitParameter("classScannerAllowedPackages");
if (classScannerAllowedPackages != null && classScannerAllowedPackages.length() > 0)
{
CruxBridge.getInstance().registerScanAllowedPackages(classScannerAllowedPackages);
}
else
{
CruxBridge.getInstance().registerScanAllowedPackages("");
}
String classScannerIgnoredPackages = contextEvent.getServletContext().getInitParameter("classScannerIgnoredPackages");
if (classScannerIgnoredPackages != null && classScannerIgnoredPackages.length() > 0)
{
CruxBridge.getInstance().registerScanIgnoredPackages(classScannerIgnoredPackages);
}
else
{
CruxBridge.getInstance().registerScanIgnoredPackages("");
}
ConfigurationFactory.getConfigurations();
ClassPathResolverInitializer.getClassPathResolver().initialize();
}
ServiceFactoryInitializer.initialize(context);
RestServiceScanner.initialize(context);
}
catch (Throwable e)
{
logger.error(e.getMessage(), e);
}
}
}
| [
"thiago@cruxframework.org@a5d2bbaa-053c-11de-b17c-0f1ef23b492c"
] | thiago@cruxframework.org@a5d2bbaa-053c-11de-b17c-0f1ef23b492c |
af6e95984d292a900d1ae667d93d041bf67d83d5 | cc5cd6a72287dd00f33ff7dfe7010b0e74610c9f | /src/main/java/com/syncleus/dann/graph/search/pathfinding/PathFinder.java | bfbe953cd31a5d6717313fd7fee6da684927875e | [] | no_license | automenta/java_dann_2.0.seh__-old- | 6cffb69354be25d9bfe85be662555f0960813eb5 | 206df692da525299f40ee1346edcc493fc1c3c57 | refs/heads/master | 2020-12-02T21:37:58.474634 | 2013-08-04T16:21:33 | 2013-08-04T16:21:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,787 | java | /******************************************************************************
* *
* Copyright: (c) Syncleus, Inc. *
* *
* You may redistribute and modify this source code under the terms and *
* conditions of the Open Source Community License - Type C version 1.0 *
* or any later version as published by Syncleus, Inc. at www.syncleus.com. *
* There should be a copy of the license included with this file. If a copy *
* of the license is not included you are granted no right to distribute or *
* otherwise use this file except through a legal and valid license. You *
* should also contact Syncleus, Inc. at the information below if you cannot *
* find a license: *
* *
* Syncleus, Inc. *
* 2604 South 12th Street *
* Philadelphia, PA 19148 *
* *
******************************************************************************/
package com.syncleus.dann.graph.search.pathfinding;
import java.util.List;
import com.syncleus.dann.graph.Edge;
// TODO implement optimizer approach
public interface PathFinder<N, E extends Edge<? extends N>>
{
List<E> getBestPath(N begin, N end);
boolean isReachable(N begin, N end);
boolean isConnected(N begin, N end);
}
| [
"seh999@gmail.com"
] | seh999@gmail.com |
7f65e3ca5dd6f3c4ea8e2b4af4d7f812b44b8a15 | 55d06f44263557aafc6b252fd0bb01c6a380b7ee | /java110-bean/src/main/java/com/java110/dto/repair/RepairUserDto.java | 3245c63c692dc5c58e36ad8d7a55866df7f7e2d9 | [
"Apache-2.0"
] | permissive | long0419/MicroCommunity | f8a4a454deac257a5ba89c372bcb4ab6030ece28 | 0479ac4eba8e0ebfcbbd2ae8891d345672e668b1 | refs/heads/master | 2020-11-29T06:17:34.783718 | 2020-06-01T05:22:49 | 2020-06-01T05:22:49 | 230,040,118 | 0 | 0 | Apache-2.0 | 2020-06-01T05:22:50 | 2019-12-25T04:16:32 | null | UTF-8 | Java | false | false | 2,161 | java | package com.java110.dto.repair;
import com.java110.dto.PageDto;
import java.io.Serializable;
import java.util.Date;
/**
* @ClassName FloorDto
* @Description 报修派单数据层封装
* @Author wuxw
* @Date 2019/4/24 8:52
* @Version 1.0
* add by wuxw 2019/4/24
**/
public class RepairUserDto extends PageDto implements Serializable {
private String context;
private String repairId;
private String[] repairIds;
private String ruId;
private String state;
private String communityId;
private String userId;
private String userName;
private Date createTime;
private String statusCd = "0";
public String getContext() {
return context;
}
public void setContext(String context) {
this.context = context;
}
public String getRepairId() {
return repairId;
}
public void setRepairId(String repairId) {
this.repairId = repairId;
}
public String getRuId() {
return ruId;
}
public void setRuId(String ruId) {
this.ruId = ruId;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getCommunityId() {
return communityId;
}
public void setCommunityId(String communityId) {
this.communityId = communityId;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getStatusCd() {
return statusCd;
}
public void setStatusCd(String statusCd) {
this.statusCd = statusCd;
}
public String[] getRepairIds() {
return repairIds;
}
public void setRepairIds(String[] repairIds) {
this.repairIds = repairIds;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
| [
"928255095@qq.com"
] | 928255095@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.