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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9e3e3e0fb10698ce3002cedec1fe12aaf7a4fe65
|
9e8a364ba1c5a93629417eb038b222fc0d0ae3de
|
/src/main/java/com/draco18s/hazards/block/BlockThinVolatileGas.java
|
949ae00d3a399189a22ddc13f48ddae0a85af0ca
|
[] |
no_license
|
Draco18s/HarderStuff
|
df3068363fe96b1efc5b8b8812913cfb6e60fe44
|
9c0392a26798745bbdfd5fd7e064586352d8d941
|
refs/heads/master
| 2020-12-29T02:44:50.179418
| 2016-12-18T05:08:21
| 2016-12-18T05:08:21
| 29,373,510
| 9
| 4
| null | 2016-12-18T05:08:21
| 2015-01-17T00:02:22
|
Java
|
UTF-8
|
Java
| false
| false
| 4,288
|
java
|
package com.draco18s.hazards.block;
import java.util.Random;
import com.draco18s.hazards.StoneRegistry;
import com.draco18s.hazards.UndergroundBase;
import com.draco18s.hazards.block.helper.GasFlowHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityTNTPrimed;
import net.minecraft.entity.monster.EntityBlaze;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.potion.PotionHelper;
import net.minecraft.util.IIcon;
import net.minecraft.util.Vec3;
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fluids.BlockFluidFinite;
import net.minecraftforge.fluids.Fluid;
public class BlockThinVolatileGas extends BlockGas {
public BlockThinVolatileGas(Fluid fluid) {
super(fluid, 1);
setDensity(-100);
setTemperature(285);
setBlockName("ThinVolatileGas");
setCreativeTab(CreativeTabs.tabMisc);
setResistance(0);
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister register) {
stillIcon = register.registerIcon("hazards:thin_volatile_still");
flowingIcon = register.registerIcon("hazards:thin_volatile_flow");
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
int m = world.getBlockMetadata(x, y, z);
Block[] wID = {world.getBlock(x + 1, y, z), world.getBlock(x - 1, y, z), world.getBlock(x, y + 1, z), world.getBlock(x, y - 1, z), world.getBlock(x, y, z + 1), world.getBlock(x, y, z - 1)};
boolean doExplode = false;
boolean isFire = false;
for(int i = 0; i < wID.length; i++) {
if(wID[i] == Blocks.torch || wID[i] == Blocks.lava) {
doExplode = true;
}
if(wID[i] == Blocks.fire) {
doExplode = true;
isFire = true;
}
}
/*EntityPlayer nearby = world.getClosestPlayer(x, y, z, UndergroundBase.catchFireRange);
if(nearby == null && UndergroundBase.catchFireRange >= 0) {
doExplode = false;
isFire = false;
}*/
if(doExplode) {
if(!isFire)
world.setBlock(x, y, z, Blocks.fire, 0, 3);
//perc = -0.0125 m^2 + 0.0844048m + 0.850833
//perc = -0.00852295 m^2 + 0.055607m + 0.879471
//pow = -0.0334524 m^2 + 0.44131m + 0.538333
//pow = -0.034836 m^2 + 0.452168m + 0.526059
if (rand.nextDouble() < ((-0.00852295f*m*m + 0.055607f*m + 0.879471f)/100f)*.1f) {
world.newExplosion(null, x, y, z, (-0.034836f*m*m + 0.452168f*m + 0.526059f)*1.2f, true, true);
}
else if(isFire && rand.nextDouble() < 0.5) {
int meta = world.getBlockMetadata(x, y, z);
if(meta > 0)
world.setBlockMetadataWithNotify(x, y, z, meta-1, 3);
else
world.setBlock(x, y, z, Blocks.air, 0, 3);
}
else {
world.scheduleBlockUpdate(x, y, z, this, 10);
}
}
super.updateTick(world, x, y, z, rand);
}
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
world.scheduleBlockUpdate(x, y, z, this, 10);
}
@Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity ent) {
if(ent instanceof EntityBlaze) {
int m = world.getBlockMetadata(x, y, z);
world.setBlock(x, y, z, Blocks.fire, 0, 3);
if (world.rand.nextDouble() < 0.005 * m) {
world.newExplosion(null, x, y, z, 0.5F*m, true, true);
}
}
}
public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explo) {
if (!world.isRemote) {
world.setBlock(x, y, z, Blocks.fire, 0, 3);
}
}
}
|
[
"draco18s@gmail.com"
] |
draco18s@gmail.com
|
bde16b8cbaeacb9340176cda343879bc5f20420d
|
d9ee259ea531db0b4963caef0e6b1fa4a8c1b74c
|
/exercise-2008/src/main/java/thirdstage/exercise/concurrency/case4/PreProcessor.java
|
960ff8ad5344d6eacc345c5b232483fdca44b425
|
[] |
no_license
|
3rdstage/exercise
|
2c068a6eb83a88afb56d2f61176172907a2654ad
|
8ede271cc9d6ef3eec530544b4bb29cd4b776c47
|
refs/heads/master
| 2022-12-21T08:59:17.189471
| 2022-09-22T23:02:02
| 2022-09-22T23:02:02
| 6,543,754
| 0
| 1
| null | 2022-12-16T04:25:01
| 2012-11-05T12:09:39
|
HTML
|
UTF-8
|
Java
| false
| false
| 188
|
java
|
/**
*
*/
package thirdstage.exercise.concurrency.case4;
/**
* @author 3rdstage
*
*/
public interface PreProcessor {
void execute(Context cntx) throws Exception;
}
|
[
"halfface@chollian.net"
] |
halfface@chollian.net
|
92ebe3fcbf23f56b8408c1b39eba0a38ce293ff3
|
8a5cc02b8c06357d293ffb7658dfb59bcc762e50
|
/app/src/main/java/com/app/fragment/HomeFragment.java
|
ddf6a061e80d9b7191a2e4230524a5ad6f8fc294
|
[] |
no_license
|
dinhdeveloper/Covid
|
0cfa8ee1cd477a2f93f074eb33f2c8a71e25cf36
|
0b699cca3feb5363c478cc6e60fae64f67e9e2a3
|
refs/heads/master
| 2022-11-25T22:16:14.541001
| 2020-08-04T17:43:08
| 2020-08-04T17:43:08
| 285,054,682
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,028
|
java
|
package com.app.fragment;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.app.covid.R;
public class HomeFragment extends Fragment {
// // TODO: Rename parameter arguments, choose names that match
// // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
// private static final String ARG_PARAM1 = "param1";
// private static final String ARG_PARAM2 = "param2";
//
// // TODO: Rename and change types of parameters
// private String mParam1;
// private String mParam2;
//
// public HomeFragment() {
// // Required empty public constructor
// }
//
// /**
// * Use this factory method to create a new instance of
// * this fragment using the provided parameters.
// *
// * @param param1 Parameter 1.
// * @param param2 Parameter 2.
// * @return A new instance of fragment HomeFragment.
// */
// // TODO: Rename and change types and number of parameters
// public static HomeFragment newInstance(String param1, String param2) {
// HomeFragment fragment = new HomeFragment();
// Bundle args = new Bundle();
// args.putString(ARG_PARAM1, param1);
// args.putString(ARG_PARAM2, param2);
// fragment.setArguments(args);
// return fragment;
// }
//
// @Override
// public void onCreate(Bundle savedInstanceState) {
// super.onCreate(savedInstanceState);
// if (getArguments() != null) {
// mParam1 = getArguments().getString(ARG_PARAM1);
// mParam2 = getArguments().getString(ARG_PARAM2);
// }
// }
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = LayoutInflater.from(getContext()).inflate(R.layout.fragment_home, container, false);
return view;
}
}
|
[
"dinhtrancntt@gmail.com"
] |
dinhtrancntt@gmail.com
|
8a8fbf5704489475e6c578c9a6aedfd687d36f1d
|
a7bc3f31cdcb0c8d7c6093f92a3bb36becf4dfa9
|
/src/cn/digitalpublishing/service/CUserService.java
|
020b8e1bf47c8cf99eeed4cc8bdb692c222e0e52
|
[] |
no_license
|
yxxcrtd/EPublishing_m
|
f8f4774a938244e071a46bbfadcc9836ca41646c
|
fce51e50604f1f64cda1a78697b15eec616f2d74
|
refs/heads/master
| 2020-05-31T21:45:10.898715
| 2019-06-06T03:05:27
| 2019-06-06T03:05:27
| 190,504,668
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,572
|
java
|
package cn.digitalpublishing.service;
import java.util.List;
import java.util.Map;
import cn.digitalpublishing.ep.po.CDirectory;
import cn.digitalpublishing.ep.po.CFavourites;
import cn.digitalpublishing.ep.po.CSearchHis;
import cn.digitalpublishing.ep.po.CUser;
public interface CUserService {
/**
* 查询用户列表
*
* @param condition
* @param sort
* @return
* @throws Exception
*/
List<CUser> getUserList(Map<String, Object> condition, String sort) throws Exception;
/**
* 查询收藏夹
*
* @param condition
* @param sort
* @return
* @throws Exception
*/
public List<CFavourites> getFavoutitesList(Map<String, Object> condition, String sort) throws Exception;
/**
* 删除收藏夹
*
* @param condition
* @throws Exception
*/
public void deleteFavorites(Map<String, Object> condition) throws Exception;
/**
* 插入搜索记录
*
* @param searchValue
* @throws Exception
*/
public void addSearchHistory(CSearchHis obj) throws Exception;
/**
* 查询搜索历史列表
*
* @param condition
* @param sort
* @return
* @throws Exception
*/
public List<CSearchHis> getSearchHistoryList(Map<String, Object> condition, String sort) throws Exception;
/**
* 查询文件夹列表
*
* @param object
* @param sort
* @return
* @throws Exception
*/
public List<CDirectory> getDirtoryList(Map<String, Object> condition, String sort) throws Exception;
public List<CDirectory> getDirtoryList1(Map<String, Object> condition, String sort) throws Exception;
/**
* 更新搜索结果保存
*
* @param his
* @param id
* @throws Exception
*/
public void updateSearchHis(CSearchHis his, String id, String[] properties) throws Exception;
/**
* 搜索收藏夹
*
* @param id
* @return
* @throws Exception
*/
public CDirectory getDirtory(String id) throws Exception;
/**
* 更新收藏夹
*
* @param dir
* @param id
* @throws Exception
*/
public void updateDirectory(CDirectory obj, String id, String[] properties) throws Exception;
/**
* 添加收藏夹
*
* @param obj
* @throws Exception
*/
public void addDirectory(CDirectory obj) throws Exception;
/**
* 删除搜索历史
*
* @param id
* @throws Exception
*/
public void deleteSearchHis(String id) throws Exception;
/**
* 根据条件删除搜索历史
*
* @param condition
* @throws Exception
*/
public void deleteSearchHisByCondition(Map<String, Object> condition) throws Exception;
/**
* 删除文件夹
*
* @param id
* @throws Exception
*/
public void deleteDirectory(String id) throws Exception;
/**
* 根据ID查询用户信息
*
* @param id
* @return
* @throws Exception
*/
public CUser getUser(String id) throws Exception;
/**
* 查询分页用户列表
*
* @param condition
* @param sort
* @param pageCount
* @param page
* @return
* @throws Exception
*/
public List<CUser> getUserPagingList(Map<String, Object> condition, String sort, Integer pageCount, Integer page)
throws Exception;
/**
* 获取收藏的分页列表
*
* @param condition
* @param sort
* @return
* @throws Exception
*/
public List<CFavourites> getFavoutitesPagingList(Map<String, Object> condition, String sort, int pageCount,
int curPage) throws Exception;
/**
* 下载excel
*
* @param condition
* @param sort
* @return
* @throws Exception
*/
public List<CFavourites> getfList(Map<String, Object> condition, String sort) throws Exception;
/**
* 获取收藏的总数
*
* @param condition
* @return
* @throws Exception
*/
public int getFavoutitesCount(Map<String, Object> condition) throws Exception;
/**
* 获取收藏夹总数
*
* @param condition
* @return
* @throws Exception
*/
public int getDirtoryCount(Map<String, Object> condition) throws Exception;
/**
* 获取收藏夹分页列表
*
* @param condition
* @param string
* @param pageCount
* @param curpage
* @return
* @throws Exception
*/
public List<CDirectory> getDirtoryPagingList(Map<String, Object> condition, String string, int pageCount,
int curpage) throws Exception;
/**
* 查询搜索历史记录
*
* @param id
* @return
* @throws Exception
*/
public CSearchHis getSearchHistory(String id) throws Exception;
}
|
[
"yxxcrtd@gmail.com"
] |
yxxcrtd@gmail.com
|
6a33ce12bd8434d337606f7f12493984f02eaebe
|
ef1b72abf5554c94661c495a0bf0a6aded89e37c
|
/src/net/minecraft/src/ns.java
|
67ca4dc0a618bd1aea981a2a5be211e365178fc8
|
[] |
no_license
|
JimmyZJX/MC1.8_source
|
ad459b12d0d01db28942b9af87c86393011fd626
|
25f56c7884a320cbf183b23010cccecb5689d707
|
refs/heads/master
| 2016-09-10T04:26:40.951576
| 2014-11-29T06:22:02
| 2014-11-29T06:22:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,768
|
java
|
package net.minecraft.src;
/* 1: */ import com.google.gson.JsonDeserializationContext;
/* 2: */ import com.google.gson.JsonDeserializer;
/* 3: */ import com.google.gson.JsonElement;
/* 4: */ import com.google.gson.JsonObject;
/* 5: */ import com.google.gson.JsonSerializationContext;
/* 6: */ import com.google.gson.JsonSerializer;
/* 7: */ import java.lang.reflect.Type;
/* 8: */
/* 9: */ public class ns
/* 10: */ implements JsonDeserializer<np>, JsonSerializer<np>
/* 11: */ {
/* 12: */ public np deserialize(JsonElement paramJsonElement, Type paramType, JsonDeserializationContext paramJsonDeserializationContext)
/* 13: */ {
/* 14:163 */ JsonObject localJsonObject = uh.l(paramJsonElement, "status");
/* 15:164 */ np localnp = new np();
/* 16:166 */ if (localJsonObject.has("description")) {
/* 17:167 */ localnp.a((ho)paramJsonDeserializationContext.deserialize(localJsonObject.get("description"), ho.class));
/* 18: */ }
/* 19:170 */ if (localJsonObject.has("players")) {
/* 20:171 */ localnp.a((nq)paramJsonDeserializationContext.deserialize(localJsonObject.get("players"), nq.class));
/* 21: */ }
/* 22:174 */ if (localJsonObject.has("version")) {
/* 23:175 */ localnp.a((nt)paramJsonDeserializationContext.deserialize(localJsonObject.get("version"), nt.class));
/* 24: */ }
/* 25:178 */ if (localJsonObject.has("favicon")) {
/* 26:179 */ localnp.a(uh.h(localJsonObject, "favicon"));
/* 27: */ }
/* 28:182 */ return localnp;
/* 29: */ }
/* 30: */
/* 31: */ public JsonElement serialize(np paramnp, Type paramType, JsonSerializationContext paramJsonSerializationContext)
/* 32: */ {
/* 33:187 */ JsonObject localJsonObject = new JsonObject();
/* 34:189 */ if (paramnp.a() != null) {
/* 35:190 */ localJsonObject.add("description", paramJsonSerializationContext.serialize(paramnp.a()));
/* 36: */ }
/* 37:193 */ if (paramnp.b() != null) {
/* 38:194 */ localJsonObject.add("players", paramJsonSerializationContext.serialize(paramnp.b()));
/* 39: */ }
/* 40:197 */ if (paramnp.c() != null) {
/* 41:198 */ localJsonObject.add("version", paramJsonSerializationContext.serialize(paramnp.c()));
/* 42: */ }
/* 43:201 */ if (paramnp.d() != null) {
/* 44:202 */ localJsonObject.addProperty("favicon", paramnp.d());
/* 45: */ }
/* 46:205 */ return localJsonObject;
/* 47: */ }
/* 48: */ }
/* Location: C:\Minecraft1.7.5\.minecraft\versions\1.8\1.8.jar
* Qualified Name: ns
* JD-Core Version: 0.7.0.1
*/
|
[
"604590822@qq.com"
] |
604590822@qq.com
|
633566c88106155918ecd3c33dbba41caee35f49
|
e4ce369ab02a9742b84051c3f6099cf48d1b2b96
|
/client/src/main/java/io/cloudsoft/winrm4j/client/PayloadEncryptionMode.java
|
d68ca391e6c99c5bb381b73ddd2621c9e7de77ba
|
[
"Apache-2.0"
] |
permissive
|
cloudsoft/winrm4j
|
663187cf21a0c475c43ff2960db701215b9dcfcf
|
806a943a3d68f3a6ad23385375c61a53c7fbec43
|
refs/heads/master
| 2023-08-13T17:44:32.481208
| 2022-03-07T14:16:41
| 2022-03-07T14:16:41
| 32,739,623
| 88
| 52
|
Apache-2.0
| 2023-03-21T15:30:57
| 2015-03-23T15:08:35
|
Java
|
UTF-8
|
Java
| false
| false
| 431
|
java
|
package io.cloudsoft.winrm4j.client;
public enum PayloadEncryptionMode {
OFF(false,false), OPTIONAL(true,false), REQUIRED(true,true);
final boolean permitted, required;
PayloadEncryptionMode(boolean permitted, boolean required) {
this.permitted = permitted;
this.required = required;
}
public boolean isPermitted() { return permitted; }
public boolean isRequired() { return required; }
}
|
[
"alex.heneveld@cloudsoftcorp.com"
] |
alex.heneveld@cloudsoftcorp.com
|
ba726cc2de10e166d127cea7a4b24c8e40dcd34d
|
7ad843a5b11df711f58fdb8d44ed50ae134deca3
|
/JDK/JDK1.8/src/javax/print/attribute/standard/PrinterLocation.java
|
f21acb5feb2c0c337c5f4a5bd8d24edc11d0721c
|
[
"MIT"
] |
permissive
|
JavaScalaDeveloper/java-source
|
f014526ad7750ad76b46ff475869db6a12baeb4e
|
0e6be345eaf46cfb5c64870207b4afb1073c6cd0
|
refs/heads/main
| 2023-07-01T22:32:58.116092
| 2021-07-26T06:42:32
| 2021-07-26T06:42:32
| 362,427,367
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,273
|
java
|
/*
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.print.attribute.standard;
import java.util.Locale;
import javax.print.attribute.Attribute;
import javax.print.attribute.TextSyntax;
import javax.print.attribute.PrintServiceAttribute;
/**
* Class PrinterLocation is a printing attribute class, a text attribute, that
* identifies the location of the device. This could include things like:
* <CODE>"in Room 123A, second floor of building XYZ"</CODE>.
* <P>
* <B>IPP Compatibility:</B> The string value gives the IPP name value. The
* locale gives the IPP natural language. The category name returned by
* <CODE>getName()</CODE> gives the IPP attribute name.
* <P>
*
* @author Alan Kaminsky
*/
public final class PrinterLocation extends TextSyntax
implements PrintServiceAttribute {
private static final long serialVersionUID = -1598610039865566337L;
/**
* Constructs a new printer location attribute with the given location and
* locale.
*
* @param location Printer location.
* @param locale Natural language of the text string. null
* is interpreted to mean the default locale as returned
* by <code>Locale.getDefault()</code>
*
* @exception NullPointerException
* (unchecked exception) Thrown if <CODE>location</CODE> is null.
*/
public PrinterLocation(String location, Locale locale) {
super (location, locale);
}
/**
* Returns whether this printer location attribute is equivalent to the
* passed in object. To be equivalent, all of the following conditions
* must be true:
* <OL TYPE=1>
* <LI>
* <CODE>object</CODE> is not null.
* <LI>
* <CODE>object</CODE> is an instance of class PrinterLocation.
* <LI>
* This printer location attribute's underlying string and
* <CODE>object</CODE>'s underlying string are equal.
* <LI>
* This printer location attribute's locale and <CODE>object</CODE>'s
* locale are equal.
* </OL>
*
* @param object Object to compare to.
*
* @return True if <CODE>object</CODE> is equivalent to this printer
* location attribute, false otherwise.
*/
public boolean equals(Object object) {
return (super.equals(object) && object instanceof PrinterLocation);
}
/**
* Get the printing attribute class which is to be used as the "category"
* for this printing attribute value.
* <P>
* For class PrinterLocation, the
* category is class PrinterLocation itself.
*
* @return Printing attribute class (category), an instance of class
* {@link java.lang.Class java.lang.Class}.
*/
public final Class<? extends Attribute> getCategory() {
return PrinterLocation.class;
}
/**
* Get the name of the category of which this attribute value is an
* instance.
* <P>
* For class PrinterLocation, the
* category name is <CODE>"printer-location"</CODE>.
*
* @return Attribute category name.
*/
public final String getName() {
return "printer-location";
}
}
|
[
"panzha@dian.so"
] |
panzha@dian.so
|
da96c9abe68d6bd6571547062c607fe3fc372f57
|
2858d712fca0f0a61756a35196a343232be2e136
|
/XmlJsonParser/src/main/java/parser/MyXmlParser.java
|
ab2647ea74e3aa6ffa2195e04f433ebcccc79743
|
[] |
no_license
|
DenisGladkiy/EpamProject
|
715cc2b04e54b7ab4776624d91c6d92a2caff090
|
b7fa80903dd5153bf14a0fc87f84eb2e71797e06
|
refs/heads/master
| 2021-09-15T20:04:05.094352
| 2018-06-09T20:11:23
| 2018-06-09T20:11:23
| 123,585,927
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,326
|
java
|
package parser;
import entity.Catalog;
import entity.Notebook;
import entity.Person;
import org.w3c.dom.*;
import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
import java.io.IOException;
/**
* Created by Denis on 08.06.2018.
*/
public class MyXmlParser implements DocumentParser<Catalog, String> {
@Override
public Catalog parseDocument(String fileName) {
File file = new File(fileName);
return parseFile(file);
}
private Catalog parseFile(File file){
Catalog catalog = null;
Document domDocument = null;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = null;
try {
docBuilder = factory.newDocumentBuilder();
domDocument = docBuilder.parse(file);
} catch (ParserConfigurationException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Node node = domDocument.getFirstChild();
if(node.getNodeName().equals("catalog")){
catalog = createCatalog(domDocument);
}
return catalog;
}
private Catalog createCatalog(Document domDocument) {
Catalog catalog = new Catalog();
Notebook notebook;
Node node;
NodeList nodeList = domDocument.getElementsByTagName("notebook");
for(int i = 0; i < nodeList.getLength(); i++){
node = nodeList.item(i);
notebook = createNotebook(node);
catalog.setNotebook(notebook);
}
return catalog;
}
private Notebook createNotebook(Node notebookNode) {
Notebook notebook = new Notebook();
Node node;
Person person;
NodeList nodeList = notebookNode.getChildNodes();
for(int i = 0; i < nodeList.getLength(); i++){
node = nodeList.item(i);
if(node.getNodeName().equals("person")) {
person = createPerson(node);
notebook.addPerson(person);
}
}
return notebook;
}
private Person createPerson(Node personNode) {
Person person;
person = new Person();
String personId = personNode.getAttributes().getNamedItem("id").getNodeValue();
person.setId(Integer.parseInt(personId));
NodeList nodeList = personNode.getChildNodes();
for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
String element = node.getNodeName();
switch (element) {
case "name":
person.setName(node.getTextContent());
break;
case "address":
person.setAddress(node.getTextContent());
break;
case "cash":
person.setCash(Integer.valueOf(node.getTextContent()));
break;
case "education":
person.setEducation(node.getTextContent());
break;
}
}
return person;
}
}
|
[
"gladkiy@gmail.com"
] |
gladkiy@gmail.com
|
b8cd74c8c8990aa60c9202b9e652a7220e883548
|
688fc1af6a3e52f734d868f7b6f9038cba15e00c
|
/app/src/main/java/com/yf/aidlmoduledemo/bean/Book.java
|
0b553d188947106e0b7ae967343a69f851ec372e
|
[] |
no_license
|
zhizhongbiao/AidlModuleDemo
|
0a498093d7da1790a762626cffb47a65ad108a1e
|
0310b5f4b76dd86d69421a0a7b74eaca8928a456
|
refs/heads/master
| 2020-03-25T22:37:24.840203
| 2018-08-10T03:30:12
| 2018-08-10T03:30:12
| 144,232,297
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,318
|
java
|
package com.yf.aidlmoduledemo.bean;
import android.os.Parcel;
import android.os.Parcelable;
/**
* FileName : Book
* Author : zhizhongbiao
* Date : 2018/8/10
* Describe :
*/
public class Book implements Parcelable {
public String name;
public String author;
public double price;
public int bookId;
public Book() {
}
@Override
public String toString() {
return "Book{" +
"name='" + name + '\'' +
", author='" + author + '\'' +
", price=" + price +
", bookId=" + bookId +
'}';
}
protected Book(Parcel in) {
name = in.readString();
author = in.readString();
price = in.readDouble();
bookId = in.readInt();
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
dest.writeString(author);
dest.writeDouble(price);
dest.writeInt(bookId);
}
/**
* 但是请注意,这里有一个坑:默认生成的模板类的对象只支持为 in 的定向 Tag 。
* 为什么呢?因为默认生成的类里面只有 writeToParcel() 方法,而如果要支持为 out 或者 inout 的定向 tag 的话
* ,还需要实现 readFromParcel() 方法——而这个方法其实并没有在 Parcelable 接口里面,所以需要我们从头写。
* 当有了该方法之后,我们的Aidl接口文件中的方法的参数Tag就可以定义为out或者inout类型了。
*/
/**
* 参数是一个Parcel,用它来存储与传输数据
*
* @param dest
*/
public void readFromParcel(Parcel dest) {
//注意,此处的读值顺序应当是和writeToParcel()方法中一致的
name = dest.readString();
author = dest.readString();
price = dest.readDouble();
bookId = dest.readInt();
}
@Override
public int describeContents() {
return 0;
}
public static final Creator<Book> CREATOR = new Creator<Book>() {
@Override
public Book createFromParcel(Parcel in) {
return new Book(in);
}
@Override
public Book[] newArray(int size) {
return new Book[size];
}
};
}
|
[
"zhizhongbiao163@163.com"
] |
zhizhongbiao163@163.com
|
ae61bf7bcb49e9c0f58fc6822ca15f4a96bd3019
|
c020d9623083b5d14459a5d1cf38eb7e3ba25207
|
/app/src/main/java/cn/com/stableloan/view/countdownview/SimpleCountDownTimer.java
|
39c654d6f3548a13b1a91ca5320cfb42a3e9beaa
|
[] |
no_license
|
Mexicande/anwenqianbao
|
b221d190825319b340bac45aa53d0857971ac654
|
c4dc2fa06e59642daa5b891ef3b3f22483c69d67
|
refs/heads/master
| 2021-01-21T04:13:41.885521
| 2018-05-07T02:49:19
| 2018-05-07T02:49:19
| 94,964,332
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,886
|
java
|
package cn.com.stableloan.view.countdownview;
import android.graphics.Color;
import android.os.CountDownTimer;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.BackgroundColorSpan;
import android.text.style.ForegroundColorSpan;
import android.widget.TextView;
/**
* 简单 时,分,秒,毫秒倒计时
*
* @author Luo Guowen Email:<a href="#">luoguowen123@qq.com</a>
* <p>
* 精确到毫秒
*/
public class SimpleCountDownTimer extends CountDownTimer {
// 默认倒计时间隔
private static final long DEFAULT_INTERVAL = 100L;
/**
* 秒,分,时对应的毫秒数
*/
private int sec = 1000, min = sec * 60, hr = min * 60;
/**
* 显示时间的视图
*/
private TextView tvDisplay,hour,minutes,second;
/**
* 结束监听
*/
private static OnFinishListener onFinishListener;
/**
* @param millisInFuture 倒计时总时间 单位:毫秒
* The number of millis in the future from the call
* to {@link #start()} until the countdown is done and {@link #onFinish()}
* is called.
* @param countDownInterval 倒计时间隔 单位:毫秒
* The interval along the way to receive
* {@link #onTick(long)} callbacks.
* @param tvDisplay 显示时间的视图
*/
public SimpleCountDownTimer(long millisInFuture, long countDownInterval, TextView tvDisplay) {
super(millisInFuture, countDownInterval);
this.tvDisplay = tvDisplay;
}
/**
* @param millisInFuture 倒计时总时间 单位:毫秒
* The number of millis in the future from the call
* to {@link #start()} until the countdown is done and {@link #onFinish()}
* is called.
*
* @param tvDisplay 显示时间的视图
*/
public SimpleCountDownTimer(long millisInFuture, TextView tvDisplay) {
super(millisInFuture, DEFAULT_INTERVAL);
this.tvDisplay = tvDisplay;
}
/**
* 每一次间隔时间到后调用
*
* @param millisUntilFinished 剩余总时间 单位:毫秒
*/
@Override
public void onTick(long millisUntilFinished) {
// 剩余的小时,分钟,秒,毫秒
long lHr = millisUntilFinished / hr;
long lMin = (millisUntilFinished - lHr * hr) / min;
long lSec = (millisUntilFinished - lHr * hr - lMin * min) / sec;
String strLMs = getMs(millisUntilFinished);
/* String time=lHr+":"+lMin+":"+lSec+":"+strLMs;
// 依次拼接时间 时:分:秒:毫秒
Spannable span = new SpannableString(time);
// span.setSpan(new AbsoluteSizeSpan(58), 11, 16, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new ForegroundColorSpan(Color.BLACK), 2, 3, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new BackgroundColorSpan(Color.WHITE), 2, 3, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new ForegroundColorSpan(Color.WHITE), 0, 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new BackgroundColorSpan(Color.BLACK), 0, 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new ForegroundColorSpan(Color.WHITE), time.lastIndexOf(":"), time.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new BackgroundColorSpan(Color.RED), time.lastIndexOf(":")+1, time.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
// span.setSpan(new BackgroundColorSpan(Color.BLACK), 0, time.lastIndexOf(":")-1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
*/
tvDisplay.setText(strLMs);
}
/**
* 根据毫秒换算成相应单位后是否大于10来返回相应时间
*/
private String getTime(long time) {
return time > 10 ? String.valueOf(time) : "0" + time;
}
/**
* 获取毫秒
*/
private String getMs(long time) {
String strMs = String.valueOf(time);
return time > 100 ? strMs.substring(strMs.length() - 3, strMs.length() - 2)+strMs.substring(strMs.length() - 3, strMs.length() - 2) : "00";
}
/**
* 结束监听,可以在倒计时结束时做一些事
*/
public interface OnFinishListener {
void onFinish();
}
/**
* 设置结束监听
*
* @param onFinishListener 结束监听对象
*/
public SimpleCountDownTimer setOnFinishListener(OnFinishListener onFinishListener) {
SimpleCountDownTimer.onFinishListener = onFinishListener;
return this;
}
/**
* 倒计时结束时调用
*/
@Override
public void onFinish() {
if (onFinishListener != null)
onFinishListener.onFinish();
}
}
|
[
"mexicande@hotmail.com"
] |
mexicande@hotmail.com
|
bffa8c38a209a87b3c2309bc63439761bc4a944b
|
0265e86dbb805b43814aedd9fadacfc3d983240a
|
/src/main/java/io/anuke/starflux/generation/BasicDecorator.java
|
da1766d40aa77e35a27713712a8f5f77aa24bd51
|
[] |
no_license
|
Anuken/Starflux
|
c626d578ff07d2a08721300967281f80f0eb241a
|
1bf77dc1b574877b2c887377b0f8941ef4143d53
|
refs/heads/master
| 2021-01-01T15:35:04.926092
| 2017-02-06T22:07:02
| 2017-02-06T22:07:02
| 77,887,873
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,268
|
java
|
package io.anuke.starflux.generation;
import java.util.ArrayList;
import java.util.Random;
import io.anuke.starflux.objects.ObjectGenerator;
import micdoodle8.mods.galacticraft.api.prefab.world.gen.BiomeDecoratorSpace;
import micdoodle8.mods.galacticraft.core.world.gen.WorldGenMinableMeta;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
public abstract class BasicDecorator extends BiomeDecoratorSpace {
private World world;
private ArrayList<OreGenerator> oregenerators = new ArrayList<OreGenerator>();
private ArrayList<ObjectGenerator> objectgenerators = new ArrayList<ObjectGenerator>();
private boolean locked; //prevents nested decoration
public void addGenerator(Block block, int data, Block replace, int count, int amount, int miny, int maxy) {
WorldGenerator gen = new WorldGenMinableMeta(block, count, data, true, replace, 0);
OreGenerator ore = new OreGenerator();
ore.amount = amount;
ore.miny = miny;
ore.maxy = maxy;
ore.gen = gen;
oregenerators.add(ore);
}
public void addObjectGenerator(ObjectGenerator gen) {
objectgenerators.add(gen);
}
public void addObjectGenerators(Iterable<ObjectGenerator> gens) {
for(ObjectGenerator gen : gens)
objectgenerators.add(gen);
}
@Override
public void decorate(World world, Random random, int chunkX, int chunkZ) {
if(locked) return;
locked = true;
this.setCurrentWorld(world);
this.rand = random;
this.chunkX = chunkX;
this.chunkZ = chunkZ;
this.decorate();
locked = false;
}
@Override
protected void decorate() {
//for (OreGenerator gen : oregenerators)
// generateOre(gen.amount, gen.gen, gen.miny, gen.maxy);
for (ObjectGenerator gen : objectgenerators){
int x = this.chunkX + rand.nextInt(16);
int z = this.chunkZ + rand.nextInt(16);
gen.generate(this.getCurrentWorld(), this.rand, x,
getCurrentWorld().getTopSolidOrLiquidBlock(x, z), z);
}
}
@Override
protected World getCurrentWorld() {
return world;
}
@Override
protected void setCurrentWorld(World w) {
this.world = w;
}
class OreGenerator {
int amount;
int miny, maxy;
WorldGenerator gen;
}
}
|
[
"arnukren@gmail.com"
] |
arnukren@gmail.com
|
549a97c24744efa1613a71fdd39104e9787d1d75
|
3632c9297cd8a75ebfcad71e7543296bab3efcbf
|
/bc2/generated_test/cnaps2/java/com/xml/cnaps2/beps/v39300101/PaymentInstructionReferenceDetails4.java
|
143b25fd78f3bc4683093c0ac8e5999a76f28241
|
[] |
no_license
|
luboid/leontestbed
|
9850500166bd42378ae35f92768a198b1c2dd7c2
|
eb1c704b1ea77a62097375239ecb2c025c7a19dc
|
refs/heads/master
| 2021-01-10T21:48:41.905677
| 2015-09-24T10:28:18
| 2015-09-24T10:28:18
| 41,542,498
| 1
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 7,127
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
// 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: 2011.05.10 at 04:20:34 ÏÂÎç CST
//
package com.xml.cnaps2.beps.v39300101;
import java.math.BigDecimal;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Java class for PaymentInstructionReferenceDetails4 complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="PaymentInstructionReferenceDetails4">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="PmtInstrRef" type="{urn:swift:xsd:camt.005.001.04}Max35Text"/>
* <element name="IntrBkSttlmAmt" type="{urn:swift:xsd:camt.005.001.04}ImpliedCurrencyAndAmount"/>
* <element name="IntrBkValDt" type="{urn:swift:xsd:camt.005.001.04}ISODate"/>
* <element name="PmtMtd" type="{urn:swift:xsd:camt.005.001.04}PaymentOrigin1Choice" minOccurs="0"/>
* <element name="InstgAgtId" type="{urn:swift:xsd:camt.005.001.04}BICIdentifier"/>
* <element name="InstdAgtId" type="{urn:swift:xsd:camt.005.001.04}BICIdentifier"/>
* <element name="NtryTp" type="{urn:swift:xsd:camt.005.001.04}EntryTypeIdentifier" minOccurs="0"/>
* <element name="RltdRef" type="{urn:swift:xsd:camt.005.001.04}Max35Text" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PaymentInstructionReferenceDetails4", propOrder = {
"pmtInstrRef",
"intrBkSttlmAmt",
"intrBkValDt",
"pmtMtd",
"instgAgtId",
"instdAgtId",
"ntryTp",
"rltdRef"
})
public class PaymentInstructionReferenceDetails4 {
@XmlElement(name = "PmtInstrRef", required = true)
protected String pmtInstrRef;
@XmlElement(name = "IntrBkSttlmAmt", required = true)
protected BigDecimal intrBkSttlmAmt;
@XmlElement(name = "IntrBkValDt", required = true, type = String.class)
@XmlJavaTypeAdapter(Adapter1 .class)
protected Date intrBkValDt;
@XmlElement(name = "PmtMtd")
protected PaymentOrigin1Choice pmtMtd;
@XmlElement(name = "InstgAgtId", required = true)
protected String instgAgtId;
@XmlElement(name = "InstdAgtId", required = true)
protected String instdAgtId;
@XmlElement(name = "NtryTp")
protected String ntryTp;
@XmlElement(name = "RltdRef")
protected String rltdRef;
/**
* Gets the value of the pmtInstrRef property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPmtInstrRef() {
return pmtInstrRef;
}
/**
* Sets the value of the pmtInstrRef property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPmtInstrRef(String value) {
this.pmtInstrRef = value;
}
/**
* Gets the value of the intrBkSttlmAmt property.
*
* @return
* possible object is
* {@link BigDecimal }
*
*/
public BigDecimal getIntrBkSttlmAmt() {
return intrBkSttlmAmt;
}
/**
* Sets the value of the intrBkSttlmAmt property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setIntrBkSttlmAmt(BigDecimal value) {
this.intrBkSttlmAmt = value;
}
/**
* Gets the value of the intrBkValDt property.
*
* @return
* possible object is
* {@link String }
*
*/
public Date getIntrBkValDt() {
return intrBkValDt;
}
/**
* Sets the value of the intrBkValDt property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIntrBkValDt(Date value) {
this.intrBkValDt = value;
}
/**
* Gets the value of the pmtMtd property.
*
* @return
* possible object is
* {@link PaymentOrigin1Choice }
*
*/
public PaymentOrigin1Choice getPmtMtd() {
return pmtMtd;
}
/**
* Sets the value of the pmtMtd property.
*
* @param value
* allowed object is
* {@link PaymentOrigin1Choice }
*
*/
public void setPmtMtd(PaymentOrigin1Choice value) {
this.pmtMtd = value;
}
/**
* Gets the value of the instgAgtId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getInstgAgtId() {
return instgAgtId;
}
/**
* Sets the value of the instgAgtId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInstgAgtId(String value) {
this.instgAgtId = value;
}
/**
* Gets the value of the instdAgtId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getInstdAgtId() {
return instdAgtId;
}
/**
* Sets the value of the instdAgtId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInstdAgtId(String value) {
this.instdAgtId = value;
}
/**
* Gets the value of the ntryTp property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNtryTp() {
return ntryTp;
}
/**
* Sets the value of the ntryTp property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNtryTp(String value) {
this.ntryTp = value;
}
/**
* Gets the value of the rltdRef property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRltdRef() {
return rltdRef;
}
/**
* Sets the value of the rltdRef property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRltdRef(String value) {
this.rltdRef = value;
}
}
|
[
"sunhuazhong82@gmail.com"
] |
sunhuazhong82@gmail.com
|
2366d5dde66cb7f0e0186c43f4e426111d81781f
|
37fe7efb0f3f6e266da113a66a8114da3fac88f0
|
/Ver.2/2.00/source/JavaModel/web/SdtB712_SD05_MULTI_SEL_LIST.java
|
4d014509079d5953a2ce9489a1e9a41df3dfa4db
|
[
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
epoc-software-open/SEDC
|
e07d62248e8c2ed020973edd251e79b140b9fb3d
|
6327165f63e448af1b0460f7071d62b5c12c9f09
|
refs/heads/master
| 2021-08-11T05:56:09.625380
| 2021-08-10T03:41:45
| 2021-08-10T03:41:45
| 96,168,280
| 2
| 1
|
BSD-2-Clause
| 2021-08-10T03:41:45
| 2017-07-04T02:42:21
|
Java
|
UTF-8
|
Java
| false
| false
| 6,443
|
java
|
/*
File: SdtB712_SD05_MULTI_SEL_LIST
Description: B712_SD05_MULTI_SEL_LIST
Author: GeneXus Java Generator version 10_3_3-92797
Generated on: July 3, 2017 17:20:58.35
Program type: Callable routine
Main DBMS: mysql
*/
import com.genexus.*;
import com.genexus.xml.*;
import com.genexus.search.*;
import com.genexus.webpanels.*;
import java.util.*;
public final class SdtB712_SD05_MULTI_SEL_LIST extends GXXMLSerializable implements Cloneable, java.io.Serializable
{
public SdtB712_SD05_MULTI_SEL_LIST( )
{
this( new ModelContext(SdtB712_SD05_MULTI_SEL_LIST.class));
}
public SdtB712_SD05_MULTI_SEL_LIST( ModelContext context )
{
super( context, "SdtB712_SD05_MULTI_SEL_LIST");
}
public SdtB712_SD05_MULTI_SEL_LIST( int remoteHandle ,
ModelContext context )
{
super( remoteHandle, context, "SdtB712_SD05_MULTI_SEL_LIST");
}
public SdtB712_SD05_MULTI_SEL_LIST( StructSdtB712_SD05_MULTI_SEL_LIST struct )
{
this();
setStruct(struct);
}
private static java.util.HashMap mapper = new java.util.HashMap();
static
{
}
public String getJsonMap( String value )
{
return (String) mapper.get(value);
}
public short readxml( com.genexus.xml.XMLReader oReader ,
String sName )
{
short GXSoapError = 1 ;
sTagName = oReader.getName() ;
if ( oReader.getIsSimple() == 0 )
{
GXSoapError = oReader.read() ;
nOutParmCount = (short)(0) ;
while ( ( ( GXutil.strcmp(oReader.getName(), sTagName) != 0 ) || ( oReader.getNodeType() == 1 ) ) && ( GXSoapError > 0 ) )
{
readOk = (short)(0) ;
if ( GXutil.strcmp2( oReader.getLocalName(), "SELECT_CODE") )
{
if ( gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code == null )
{
gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code = new GxObjectCollection(String.class, "internal", "");
}
if ( oReader.getIsSimple() == 0 )
{
GXSoapError = gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code.readxmlcollection(oReader, "SELECT_CODE", "Item") ;
}
if ( GXSoapError > 0 )
{
readOk = (short)(1) ;
}
GXSoapError = oReader.read() ;
}
nOutParmCount = (short)(nOutParmCount+1) ;
if ( readOk == 0 )
{
context.globals.sSOAPErrMsg = context.globals.sSOAPErrMsg + "Error reading " + sTagName + GXutil.newLine( ) ;
context.globals.sSOAPErrMsg = context.globals.sSOAPErrMsg + "Message: " + oReader.readRawXML() ;
GXSoapError = (short)(nOutParmCount*-1) ;
}
}
}
return GXSoapError ;
}
public void writexml( com.genexus.xml.XMLWriter oWriter ,
String sName ,
String sNameSpace )
{
writexml(oWriter, sName, sNameSpace, true);
}
public void writexml( com.genexus.xml.XMLWriter oWriter ,
String sName ,
String sNameSpace ,
boolean sIncludeState )
{
if ( (GXutil.strcmp("", sName)==0) )
{
sName = "B712_SD05_MULTI_SEL_LIST" ;
}
if ( (GXutil.strcmp("", sNameSpace)==0) )
{
sNameSpace = "tablet-EDC_GXXEV3U3" ;
}
oWriter.writeStartElement(sName);
if ( GXutil.strcmp(GXutil.left( sNameSpace, 10), "[*:nosend]") != 0 )
{
oWriter.writeAttribute("xmlns", sNameSpace);
}
else
{
sNameSpace = GXutil.right( sNameSpace, GXutil.len( sNameSpace)-10) ;
}
if ( gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code != null )
{
String sNameSpace1 ;
if ( GXutil.strcmp(sNameSpace, "tablet-EDC_GXXEV3U3") == 0 )
{
sNameSpace1 = "[*:nosend]" + "tablet-EDC_GXXEV3U3" ;
}
else
{
sNameSpace1 = "tablet-EDC_GXXEV3U3" ;
}
gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code.writexmlcollection(oWriter, "SELECT_CODE", sNameSpace1, "Item", sNameSpace1);
}
oWriter.writeEndElement();
}
public void tojson( )
{
tojson( true) ;
}
public void tojson( boolean includeState )
{
if ( gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code != null )
{
AddObjectProperty("SELECT_CODE", gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code, false);
}
}
public GxObjectCollection getgxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code( )
{
if ( gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code == null )
{
gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code = new GxObjectCollection(String.class, "internal", "");
}
return gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code ;
}
public void setgxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code( GxObjectCollection value )
{
gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code = value ;
}
public void setgxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code_SetNull( )
{
gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code = null ;
}
public boolean getgxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code_IsNull( )
{
if ( gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code == null )
{
return true ;
}
return false ;
}
public void initialize( int remoteHandle )
{
initialize( ) ;
}
public void initialize( )
{
sTagName = "" ;
}
public SdtB712_SD05_MULTI_SEL_LIST Clone( )
{
return (SdtB712_SD05_MULTI_SEL_LIST)(clone()) ;
}
public void setStruct( StructSdtB712_SD05_MULTI_SEL_LIST struct )
{
setgxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code(new GxObjectCollection(String.class, "internal", "", struct.getSelect_code()));
}
public StructSdtB712_SD05_MULTI_SEL_LIST getStruct( )
{
StructSdtB712_SD05_MULTI_SEL_LIST struct = new StructSdtB712_SD05_MULTI_SEL_LIST ();
struct.setSelect_code(getgxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code().getStruct());
return struct ;
}
protected short readOk ;
protected short nOutParmCount ;
protected String sTagName ;
protected GxObjectCollection gxTv_SdtB712_SD05_MULTI_SEL_LIST_Select_code=null ;
}
|
[
"t-shimotori@weing.co.jp"
] |
t-shimotori@weing.co.jp
|
30555fadb0ac0b16af62061e8f43793d535038c1
|
1636a8747d189bc2a69d24823a42e794e2537e38
|
/px_v65_riaam/riaam/src/client/nc/ui/riaam/privileges/ace/serviceproxy/AcePrivilegesMaintainProxy.java
|
c6b988bfb497ee8f13b0b234c84e9c9f36798945
|
[] |
no_license
|
svipzhangxu/zhangxu
|
9b54c348508ffcc51f91937e7268b06271d5cdd4
|
5ab6bc05e162043464b2e7ec76d1e5be2cfa5579
|
refs/heads/master
| 2020-06-30T06:02:56.751355
| 2019-08-06T03:38:29
| 2019-08-06T03:38:29
| 200,751,526
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 651
|
java
|
package nc.ui.riaam.privileges.ace.serviceproxy;
import nc.bs.framework.common.NCLocator;
import nc.itf.riaam.IPrivilegesMaintain;
import nc.ui.pubapp.uif2app.query2.model.IQueryService;
import nc.ui.querytemplate.querytree.IQueryScheme;
/**
* 示例单据的操作代理
*
* @author author
* @version tempProject version
*/
public class AcePrivilegesMaintainProxy implements IQueryService {
@Override
public Object[] queryByQueryScheme(IQueryScheme queryScheme)
throws Exception {
IPrivilegesMaintain query = NCLocator.getInstance().lookup(
IPrivilegesMaintain.class);
return query.query(queryScheme);
}
}
|
[
"Administrator@windows10.microdone.cn"
] |
Administrator@windows10.microdone.cn
|
c1648b00621160c5b34e321387eaacfd83842c8e
|
4e660ecd8dfea06ba2f530eb4589bf6bed669c0c
|
/src/org/tempuri/GetBqWczJywjzxm.java
|
81425c0aa30cc5eb42c42e72cd49c4145a09c8bb
|
[] |
no_license
|
zhangity/SANMEN
|
58820279f6ae2316d972c1c463ede671b1b2b468
|
3f5f7f48709ae8e53d66b30f9123aed3bcc598de
|
refs/heads/master
| 2020-03-07T14:16:23.069709
| 2018-03-31T15:17:50
| 2018-03-31T15:17:50
| 127,522,589
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,844
|
java
|
/**
* GetBqWczJywjzxm.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.tempuri;
public class GetBqWczJywjzxm implements java.io.Serializable {
private java.lang.String ksdm;
private java.lang.String kssj;
private java.lang.String jssj;
public GetBqWczJywjzxm() {
}
public GetBqWczJywjzxm(
java.lang.String ksdm,
java.lang.String kssj,
java.lang.String jssj) {
this.ksdm = ksdm;
this.kssj = kssj;
this.jssj = jssj;
}
/**
* Gets the ksdm value for this GetBqWczJywjzxm.
*
* @return ksdm
*/
public java.lang.String getKsdm() {
return ksdm;
}
/**
* Sets the ksdm value for this GetBqWczJywjzxm.
*
* @param ksdm
*/
public void setKsdm(java.lang.String ksdm) {
this.ksdm = ksdm;
}
/**
* Gets the kssj value for this GetBqWczJywjzxm.
*
* @return kssj
*/
public java.lang.String getKssj() {
return kssj;
}
/**
* Sets the kssj value for this GetBqWczJywjzxm.
*
* @param kssj
*/
public void setKssj(java.lang.String kssj) {
this.kssj = kssj;
}
/**
* Gets the jssj value for this GetBqWczJywjzxm.
*
* @return jssj
*/
public java.lang.String getJssj() {
return jssj;
}
/**
* Sets the jssj value for this GetBqWczJywjzxm.
*
* @param jssj
*/
public void setJssj(java.lang.String jssj) {
this.jssj = jssj;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof GetBqWczJywjzxm)) return false;
GetBqWczJywjzxm other = (GetBqWczJywjzxm) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.ksdm==null && other.getKsdm()==null) ||
(this.ksdm!=null &&
this.ksdm.equals(other.getKsdm()))) &&
((this.kssj==null && other.getKssj()==null) ||
(this.kssj!=null &&
this.kssj.equals(other.getKssj()))) &&
((this.jssj==null && other.getJssj()==null) ||
(this.jssj!=null &&
this.jssj.equals(other.getJssj())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getKsdm() != null) {
_hashCode += getKsdm().hashCode();
}
if (getKssj() != null) {
_hashCode += getKssj().hashCode();
}
if (getJssj() != null) {
_hashCode += getJssj().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(GetBqWczJywjzxm.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://tempuri.org/", ">GetBqWczJywjzxm"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("ksdm");
elemField.setXmlName(new javax.xml.namespace.QName("http://tempuri.org/", "ksdm"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("kssj");
elemField.setXmlName(new javax.xml.namespace.QName("http://tempuri.org/", "kssj"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("jssj");
elemField.setXmlName(new javax.xml.namespace.QName("http://tempuri.org/", "jssj"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"dzyuting@163.com"
] |
dzyuting@163.com
|
557d51348da6948e36450f4a2c797f689854dde2
|
1043c01b7637098d046fbb9dba79b15eefbad509
|
/entity-view/impl/src/main/java/com/blazebit/persistence/view/impl/collection/CollectionInstantiator.java
|
015e11c8ac9c97470fcbca5768b2f8562ab2b5d7
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
ares3/blaze-persistence
|
45c06a3ec25c98236a109ab55a3205fc766734ed
|
2258e9d9c44bb993d41c5295eccbc894f420f263
|
refs/heads/master
| 2020-10-01T16:13:01.380347
| 2019-12-06T01:24:34
| 2019-12-09T09:29:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,117
|
java
|
/*
* Copyright 2014 - 2019 Blazebit.
*
* 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.blazebit.persistence.view.impl.collection;
import java.util.Collection;
/**
*
* @author Christian Beikov
* @since 1.2.0
*/
public interface CollectionInstantiator {
public boolean allowsDuplicates();
public boolean requiresPostConstruct();
public void postConstruct(Collection<?> collection);
public Collection<?> createCollection(int size);
public Collection<?> createJpaCollection(int size);
public RecordingCollection<?, ?> createRecordingCollection(int size);
}
|
[
"christian.beikov@gmail.com"
] |
christian.beikov@gmail.com
|
0d47d88ce475ebeec84bbdda6ed8f4c214dc69ca
|
e3a37aaf17ec41ddc7051f04b36672db62a7863d
|
/common-service/tenant-service-project/tenant-service/src/test/java/com/iot/user/MpGenerator.java
|
41c8207f21c5a697a500392f0e2024c121f828a6
|
[] |
no_license
|
github4n/cloud
|
68477a7ecf81d1526b1b08876ca12cfe575f7788
|
7974042dca1ee25b433177e2fe6bda1de28d909a
|
refs/heads/master
| 2020-04-18T02:04:33.509889
| 2019-01-13T02:19:32
| 2019-01-13T02:19:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,316
|
java
|
package com.iot.user;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
import com.baomidou.mybatisplus.generator.config.converts.MySqlTypeConvert;
import com.baomidou.mybatisplus.generator.config.rules.DbColumnType;
import com.baomidou.mybatisplus.generator.config.rules.DbType;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
/**
* <p>
* 代码生成器演示
* </p>
*/
public class MpGenerator {
/**
* <p>
* MySQL 生成演示
* </p>
*/
public static void main(String[] args) {
AutoGenerator mpg = new AutoGenerator();
// 全局配置
GlobalConfig gc = new GlobalConfig();
gc.setOutputDir("D://");
gc.setFileOverride(true);
gc.setActiveRecord(true); // 不需要ActiveRecord特性的请改为false
gc.setEnableCache(false); // XML 二级缓存
gc.setBaseResultMap(true); // XML ResultMap
gc.setBaseColumnList(false); // XML columList
// .setKotlin(true) 是否生成 kotlin 代码
gc.setAuthor("lucky");
// 自定义文件命名,注意 %s 会自动填充表实体属性!
gc.setMapperName("%sMapper");
gc.setServiceName("I%sService");
gc.setServiceImplName("%sServiceImpl");
gc.setControllerName("%sController");
mpg.setGlobalConfig(gc);
// 数据源配置
DataSourceConfig dsc = new DataSourceConfig();
dsc.setDbType(DbType.MYSQL);
dsc.setTypeConvert(new MySqlTypeConvert() {
// 自定义数据库表字段类型转换【可选】
@Override
public DbColumnType processTypeConvert(String fieldType) {
System.out.println("转换类型:" + fieldType);
// 注意!!processTypeConvert 存在默认类型转换,如果不是你要的效果请自定义返回、非如下直接返回。
return super.processTypeConvert(fieldType);
}
});
dsc.setDriverName("com.mysql.jdbc.Driver");
dsc.setUsername("root");
dsc.setPassword("Root/123");
dsc.setUrl("jdbc:mysql://192.168.6.106:3306/iot_db_tenant?characterEncoding=utf8");
mpg.setDataSource(dsc);
// 策略配置
StrategyConfig strategy = new StrategyConfig();
// strategy.setCapitalMode(true);// 全局大写命名 ORACLE 注意
// strategy.setTablePrefix(new String[] { "tlog_", "tsys_" });// 此处可以修改为您的表前缀
strategy.setNaming(NamingStrategy.underline_to_camel); // 表名生成策略
// strategy.setInclude(new String[] { "user" }); // 需要生成的表
// strategy.setExclude(new String[]{"test"}); // 排除生成的表
// 自定义实体父类
// strategy.setSuperEntityClass("com.baomidou.demo.TestEntity");
// 自定义实体,公共字段
// strategy.setSuperEntityColumns(new String[] { "test_id", "age" });
// 自定义 mapper 父类
// strategy.setSuperMapperClass("com.baomidou.demo.TestMapper");
// 自定义 service 父类
// strategy.setSuperServiceClass("com.baomidou.demo.TestService");
// 自定义 service 实现类父类
// strategy.setSuperServiceImplClass("com.baomidou.demo.TestServiceImpl");
// 自定义 controller 父类
// strategy.setSuperControllerClass("com.baomidou.demo.TestController");
// 【实体】是否生成字段常量(默认 false)
// public static final String ID = "test_id";
// strategy.setEntityColumnConstant(true);
// 【实体】是否为构建者模型(默认 false)
// public User setName(String name) {this.name = name; return this;}
// strategy.setEntityBuilderModel(true);
mpg.setStrategy(strategy);
// 包配置
PackageConfig pc = new PackageConfig();
pc.setParent("com.iot");
pc.setModuleName("tenant");
mpg.setPackageInfo(pc);
// 执行生成
mpg.execute();
}
}
|
[
"qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL"
] |
qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL
|
3fcd75bc3fbf7fcf438700360d2bc811f1091f9a
|
d9f0033546ffae9b5ca7a37ff6a0e30dd312e4ac
|
/o2o_business_studio/fanwe_o2o_businessclient_23/src/main/java/com/fanwe/MyCaptureActivity.java
|
60afebac6f61e2c039eb67112f43180abd3529b9
|
[] |
no_license
|
aliang5820/o2o_studio_projects
|
f4c69c9558b6a405275b3896669aed00d4ea3d4b
|
7427c5e41406c71147dbbc622e3e4f6f7850c050
|
refs/heads/master
| 2020-04-16T02:12:16.817584
| 2017-05-26T07:44:46
| 2017-05-26T07:44:46
| 63,346,646
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,764
|
java
|
package com.fanwe;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import com.fanwe.businessclient.R;
import com.fanwe.event.EnumEventTag;
import com.fanwe.zxing.CaptureActivity;
import com.google.zxing.Result;
import com.sunday.eventbus.SDEventManager;
/**
*
* 扫描二维码
*
*/
public class MyCaptureActivity extends CaptureActivity
{
/** 是否扫描成功后结束二维码扫描activity,0:否,1:是,值为字符串 */
public static final String EXTRA_IS_FINISH_ACTIVITY = "extra_is_finish_activity";
/** 扫描成功返回码 */
public static final int RESULT_CODE_SCAN_SUCCESS = 10;
/** 扫描成功,扫描activity结束后Intent中取扫描结果的key */
public static final String EXTRA_RESULT_SUCCESS_STRING = "extra_result_success_string";
private ImageView iv_back;
private int mFinishActivityWhenScanFinish = 1;
@Override
protected void init()
{
initIntentData();
setLayoutId(R.layout.include_title_scan);
iv_back = (ImageView) findViewById(R.id.iv_back);
registeClick();
}
private void initIntentData()
{
mFinishActivityWhenScanFinish = getIntent().getIntExtra(EXTRA_IS_FINISH_ACTIVITY, 1);
}
private void registeClick()
{
iv_back.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0)
{
finish();
}
});
}
@Override
protected void onSuccessScanning(Result result)
{
Intent intent = new Intent();
intent.putExtra(EXTRA_RESULT_SUCCESS_STRING, result.getText());
setResult(RESULT_CODE_SCAN_SUCCESS, intent);
SDEventManager.post(result.getText(), EnumEventTag.SCAN_SUCCESS.ordinal());
if (mFinishActivityWhenScanFinish == 1)
{
finish();
}
}
}
|
[
"aliang5820@126.com"
] |
aliang5820@126.com
|
d3cd1123646c103af7e51148df0456c918528369
|
ff443bad5681f9aa8868a2f4000406a1668d1da6
|
/groovy-impl/src/main/java/org/jetbrains/plugins/groovy/impl/dgm/DGMMemberContributor.java
|
4f1e64f97eed5c9046fa4f7f49ae7ab94eebab3b
|
[
"Apache-2.0"
] |
permissive
|
consulo/consulo-groovy
|
db1b6108922e838b40c590ba33b495d2d7084d1d
|
f632985a683dfc6053f5602c50a23f619aca78cf
|
refs/heads/master
| 2023-09-03T19:47:57.655695
| 2023-09-02T11:02:52
| 2023-09-02T11:02:52
| 14,021,532
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,240
|
java
|
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* 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.jetbrains.plugins.groovy.impl.dgm;
import com.intellij.java.language.psi.JavaPsiFacade;
import com.intellij.java.language.psi.PsiClass;
import com.intellij.java.language.psi.PsiType;
import consulo.annotation.component.ExtensionImpl;
import consulo.language.psi.PsiElement;
import consulo.language.psi.resolve.PsiScopeProcessor;
import consulo.language.psi.resolve.ResolveState;
import consulo.language.psi.scope.GlobalSearchScope;
import consulo.project.Project;
import consulo.util.lang.Pair;
import org.jetbrains.plugins.groovy.lang.resolve.NonCodeMembersContributor;
import javax.annotation.Nonnull;
import java.util.List;
/**
* @author Max Medvedev
*/
@ExtensionImpl
public class DGMMemberContributor extends NonCodeMembersContributor {
@Override
public void processDynamicElements(@Nonnull PsiType qualifierType,
PsiClass aClass,
PsiScopeProcessor processor,
PsiElement place,
ResolveState state) {
Project project = place.getProject();
GlobalSearchScope resolveScope = place.getResolveScope();
JavaPsiFacade facade = JavaPsiFacade.getInstance(project);
Pair<List<String>, List<String>> extensions = GroovyExtensionProvider.getInstance(project).collectExtensions(resolveScope);
List<String> instanceCategories = extensions.getFirst();
List<String> staticCategories = extensions.getSecond();
if (!processCategories(qualifierType, processor, state, project, resolveScope, facade, instanceCategories, false)) return;
if (!processCategories(qualifierType, processor, state, project, resolveScope, facade, staticCategories, true)) return;
}
private static boolean processCategories(PsiType qualifierType,
PsiScopeProcessor processor,
ResolveState state,
Project project,
GlobalSearchScope resolveScope,
JavaPsiFacade facade,
List<String> instanceCategories,
boolean isStatic) {
for (String category : instanceCategories) {
PsiClass clazz = facade.findClass(category, resolveScope);
if (clazz != null) {
if (!GdkMethodHolder.getHolderForClass(clazz, isStatic, resolveScope).processMethods(processor, state, qualifierType, project)) {
return false;
}
}
}
return true;
}
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
bc7b6da1393d510c4e204b6b6e6db247f2895f37
|
91787b5fa1ca79cf74b8278125819a2c12796f3c
|
/src/main/java/com/mz/mreal/controller/login/LoginController.java
|
5621d5d8dead4de0e0fdd81df4f5192438e16b31
|
[] |
no_license
|
zaragozamartin91/mreal
|
7869c5899c7a70cf8497f96be201ad8d43e123ed
|
bb8b89af849b852bc7ead06bf1a684741771bbd3
|
refs/heads/master
| 2020-03-23T09:12:12.354824
| 2018-08-19T02:41:00
| 2018-08-19T02:41:00
| 141,373,642
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,221
|
java
|
package com.mz.mreal.controller.login;
import com.mz.mreal.util.jwt.JwtTokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@RestController
@RequestMapping(path = "/login")
@PropertySource("classpath:jwt.properties")
public class LoginController {
private final UserDetailsService userDetailsService;
private final JwtTokenUtil jwtTokenUtil;
@Value("${jwt.expiration}")
private Long expiration;
@Autowired
public LoginController(@Qualifier("jwtUserDetailsService") UserDetailsService userDetailsService, JwtTokenUtil jwtTokenUtil) {
this.userDetailsService = userDetailsService;
this.jwtTokenUtil = jwtTokenUtil;
}
@PostMapping
public @ResponseBody
LoginResponse login(@RequestBody LoginRequest loginRequest, HttpServletResponse response) {
String username = loginRequest.getUsername();
final UserDetails userDetails = userDetailsService.loadUserByUsername(username);
final String token = jwtTokenUtil.generateToken(userDetails);
Cookie tokenCookie = new Cookie("token", token);
tokenCookie.setMaxAge(expiration.intValue());
Cookie usernameCookie = new Cookie("username", username);
usernameCookie.setMaxAge(expiration.intValue());
response.addCookie(tokenCookie);
response.addCookie(usernameCookie);
return new LoginResponse(token, username);
}
@ExceptionHandler(UsernameNotFoundException.class)
public void handleUsernameNotFound(HttpServletResponse response) throws IOException {
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Usuario no encontrado");
}
}
|
[
"zaragozamartin91@gmail.com"
] |
zaragozamartin91@gmail.com
|
9270fd504889b3b719bd49aa99ba938ed6cb340a
|
e42861253ed16162b5e89883ea3b95294ccbf882
|
/Web/test2_1/app/src/main/java/com/example/a1/myapplication/MainActivity.java
|
82b9e6a3db4c2087ec2af715ea287c3a4c89f3af
|
[] |
no_license
|
spspider/TestAndroid
|
c5febcc87eb6a724064f18ec3b48bd1acfb51204
|
7b3d0d41b07237bb84b74b5e3d508c1c29515f49
|
refs/heads/master
| 2023-04-30T11:43:17.729650
| 2022-11-19T15:21:54
| 2022-11-19T15:21:54
| 84,638,955
| 0
| 0
| null | 2023-04-18T07:18:10
| 2017-03-11T09:35:21
|
Java
|
UTF-8
|
Java
| false
| false
| 341
|
java
|
package com.example.a1.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
|
[
"spspider95@gmail.com"
] |
spspider95@gmail.com
|
28c1e389b95ba636b504d6b17a85ceae2b933b7e
|
ba79a3a346cf042fd00862f837b26cce46f02862
|
/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/ITTriggers.java
|
73e0a028232867874d4ef5fd04ae244f540fd4b2
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
cybernetics/jOOQ
|
f11b6fab65bc35d9a7a5d237bdfa4f8e08606454
|
ab29b4a73f5bbe027eeff352be5a75e70db9760a
|
refs/heads/master
| 2021-01-14T10:56:49.403491
| 2014-03-12T19:21:08
| 2014-03-12T19:21:08
| 17,720,222
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,830
|
java
|
/**
* This class is generated by jOOQ
*/
package org.jooq.test.firebird.generatedclasses.tables.interfaces;
/**
* This class is generated by jOOQ.
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
@javax.persistence.Entity
@javax.persistence.Table(name = "T_TRIGGERS")
public interface ITTriggers extends java.io.Serializable {
/**
* Setter for <code>T_TRIGGERS.ID_GENERATED</code>.
*/
public void setIdGenerated(java.lang.Integer value);
/**
* Getter for <code>T_TRIGGERS.ID_GENERATED</code>.
*/
@javax.persistence.Id
@javax.persistence.Column(name = "ID_GENERATED", unique = true, nullable = false, length = 4)
@javax.validation.constraints.NotNull
public java.lang.Integer getIdGenerated();
/**
* Setter for <code>T_TRIGGERS.ID</code>.
*/
public void setId(java.lang.Integer value);
/**
* Getter for <code>T_TRIGGERS.ID</code>.
*/
@javax.persistence.Column(name = "ID", length = 4)
public java.lang.Integer getId();
/**
* Setter for <code>T_TRIGGERS.COUNTER</code>.
*/
public void setCounter(java.lang.Integer value);
/**
* Getter for <code>T_TRIGGERS.COUNTER</code>.
*/
@javax.persistence.Column(name = "COUNTER", length = 4)
public java.lang.Integer getCounter();
// -------------------------------------------------------------------------
// FROM and INTO
// -------------------------------------------------------------------------
/**
* Load data from another generated Record/POJO implementing the common interface ITTriggers
*/
public void from(org.jooq.test.firebird.generatedclasses.tables.interfaces.ITTriggers from);
/**
* Copy data into another generated Record/POJO implementing the common interface ITTriggers
*/
public <E extends org.jooq.test.firebird.generatedclasses.tables.interfaces.ITTriggers> E into(E into);
}
|
[
"lukas.eder@gmail.com"
] |
lukas.eder@gmail.com
|
7dd29ac3c26462973a1967c6f54b43603b9ee99c
|
98102b2fe803ac35d4b80b838cf54b18aa3c5293
|
/src/main/java/org/kitteh/irc/client/library/feature/twitch/messagetag/Slow.java
|
67aaff82545376cdae3e8a66f809402be6e57396
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
lol768/KittehIRCClientLib
|
7940571b31cd0fd1eea44d9d4bba8f0b22672498
|
86cc8c34d14127897a6a993ee43fff608c8ffdfc
|
refs/heads/master
| 2020-04-05T22:53:28.005997
| 2017-10-06T20:35:30
| 2017-10-06T20:35:51
| 32,289,429
| 0
| 0
| null | 2015-03-15T23:12:28
| 2015-03-15T23:12:28
| null |
UTF-8
|
Java
| false
| false
| 2,271
|
java
|
/*
* * Copyright (C) 2013-2017 Matt Baxter http://kitteh.org
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.kitteh.irc.client.library.feature.twitch.messagetag;
import org.kitteh.irc.client.library.Client;
import org.kitteh.irc.client.library.feature.MessageTagManager;
import org.kitteh.irc.client.library.util.TriFunction;
import javax.annotation.Nonnull;
import java.util.Optional;
/**
* Message tag slow, indicating non-moderators have to wait between messages.
*/
public class Slow extends MessageTagManager.DefaultMessageTag {
/**
* Name of this message tag.
*/
public static final String NAME = "slow";
/**
* Function to create this message tag.
*/
public static final TriFunction<Client, String, Optional<String>, Slow> FUNCTION = (client, name, value) -> new Slow(name, value, Integer.parseInt(value.get()));
private final int delay;
private Slow(@Nonnull String name, @Nonnull Optional<String> value, int delay) {
super(name, value);
this.delay = delay;
}
/**
* Gets the delay between messages.
*
* @return time, in seconds, chatters have to wait
*/
public int getDelay() {
return this.delay;
}
}
|
[
"matt@phozop.net"
] |
matt@phozop.net
|
2988a429f1da893aa4574ad126e9e93ca18debd6
|
4ff24fc9d1ca0e04e7f038e2534342f1ef95f81d
|
/dynamo-core/src/main/java/com/github/dynamo/games/model/GamePlatform.java
|
ee06535500156de415634dde43a354c95542a0c5
|
[
"Apache-2.0"
] |
permissive
|
mozvip/dynamo
|
9027b360170afb021ba36b35d7afba85099addd5
|
7306d0eb9d1ac0a4fe6f4bc4dc390080ad099811
|
refs/heads/master
| 2022-05-15T06:42:27.098407
| 2018-02-11T19:48:51
| 2018-02-11T19:48:51
| 40,396,716
| 8
| 1
|
Apache-2.0
| 2022-03-08T21:17:06
| 2015-08-08T08:31:33
|
Java
|
UTF-8
|
Java
| false
| false
| 2,267
|
java
|
package com.github.dynamo.games.model;
import java.nio.file.DirectoryStream.Filter;
import com.github.dynamo.core.ExtensionsFileFilter;
import com.github.dynamo.core.Labelized;
import java.nio.file.Path;
public enum GamePlatform implements Labelized {
PC("PC", null),
PS1("Sony Playstation", new ExtensionsFileFilter(".cue", ".ccd", ".img", ".sub", ".bin", ".iso"), 1.0f, 3000),
PS2("Sony Playstation 2", new ExtensionsFileFilter(".cso", ".iso", ".gz", ".nrg", ".gi", ".mdf"), 0.70f, 10000),
PS3("Sony Playstation 3", null, 0.86f, 40000),
PSP("Sony PSP", new ExtensionsFileFilter(".iso", ".cso"), 0.582f, 3000),
XBOX360("Microsoft Xbox 360", new ExtensionsFileFilter(".iso")),
ANDROID("Android", new ExtensionsFileFilter(".apk")),
NINTENDO_DS("Nintendo DS", new ExtensionsFileFilter(".nds")),
NINTENDO_3DS("Nintendo 3DS", new ExtensionsFileFilter(".3ds")),
NINTENDO_GAMECUBE("Nintendo GameCube", new ExtensionsFileFilter(".gcz", ".wbfs", ".iso"), 0.70f, 6000),
NINTENDO_WII("Nintendo WII", new ExtensionsFileFilter(".gcz", ".wbfs", ".iso"), 0.70f, 10000),
NINTENDO_WIIU("Nintendo WIIU", new ExtensionsFileFilter(".iso"), 0.70f, 10000);
private String label;
private float coverImageRatio = 1.0f;
private Filter<Path> fileFilter = null;
private int maxSizeInMbs = 0; // helps search engine top avoid compilations or obviously wrong results
private GamePlatform( String label, Filter<Path> filter ) {
this.label = label;
this.fileFilter = filter;
this.coverImageRatio = 1.0f;
}
private GamePlatform( String label, Filter<Path> filter, float coverImageRatio, int maxSizeInMbs ) {
this.label = label;
this.fileFilter = filter;
this.coverImageRatio = coverImageRatio;
this.maxSizeInMbs = maxSizeInMbs;
}
@Override
public String getLabel() {
return label;
}
public float getCoverImageRatio() {
return coverImageRatio;
}
public Filter<Path> getFileFilter() {
return fileFilter;
}
public int getMaxSizeInMbs() {
return maxSizeInMbs;
}
public static GamePlatform match( String label ) {
for (GamePlatform platform : values()) {
if (platform.getLabel().equalsIgnoreCase( label )) {
return platform;
}
}
return null;
}
}
|
[
"guillaume.serre@gmail.com"
] |
guillaume.serre@gmail.com
|
d9c943fc21a1488740a3cd5b7610bef0dc277605
|
e4d486136c4b6abf877037b25883822060c8bf9b
|
/core/src/main/java/com/oklib/widget/recyclerview/inter/OnErrorListener.java
|
5d9f057d5f2eff7d7455df5a5f34ff6f0adf2e5b
|
[] |
no_license
|
FastThinking/Oklib
|
e3792c82132abff52e5dc388f32a4d3a34f58f2f
|
bf90a583c7523cd4068699ac16ca238aefaeb15c
|
refs/heads/master
| 2020-04-29T21:15:50.852026
| 2020-03-18T04:31:10
| 2020-03-18T04:31:10
| 176,408,002
| 0
| 0
| null | 2019-03-19T02:35:37
| 2019-03-19T02:35:36
| null |
UTF-8
|
Java
| false
| false
| 562
|
java
|
package com.oklib.widget.recyclerview.inter;
/**
* <pre>
* @author yangchong
* blog : https://github.com/yangchong211
* time : 2017/3/13
* desc : 上拉加载更多异常监听
* revise:
* </pre>
*/
public interface OnErrorListener {
/**
* 上拉加载,加载更多数据异常展示,这个方法可以暂停或者停止加载数据
*/
void onErrorShow();
/**
* 这个方法是点击加载更多数据异常展示布局的操作,比如恢复加载更多等等
*/
void onErrorClick();
}
|
[
"hcjhuanghe@163.com"
] |
hcjhuanghe@163.com
|
c34be179e538bb8aa392e9cd8f318c579574507f
|
1b2685ff6a251c85e38b6701f2540a30eba96322
|
/src/main/java/com/liangxunwang/unimanager/mvc/vo/lxBankApplyVo.java
|
556144037786c427a0f0c4ae6c374f9ef9d71bc4
|
[] |
no_license
|
eryiyi/HuiminJsManager
|
6284edb145c13f7c54c4af7d868aa1015d04beea
|
65ed166e5e910bc8b6db0953d47fb705317aff3b
|
refs/heads/master
| 2021-06-28T17:14:50.647917
| 2017-09-18T04:01:35
| 2017-09-18T04:01:35
| 101,830,920
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,993
|
java
|
package com.liangxunwang.unimanager.mvc.vo;
import com.liangxunwang.unimanager.model.lxBankApply;
/**
* Created by zhl on 2016/10/8.
*/
public class lxBankApplyVo extends lxBankApply {
private String emp_number;
private String emp_mobile;
private String emp_name;
private String emp_cover;
private String bank_emp_name;
private String bank_mobile;
private String bank_kaihu_name;
private String bank_name;
private String bank_card;
public String getBank_emp_name() {
return bank_emp_name;
}
public void setBank_emp_name(String bank_emp_name) {
this.bank_emp_name = bank_emp_name;
}
public String getBank_mobile() {
return bank_mobile;
}
public void setBank_mobile(String bank_mobile) {
this.bank_mobile = bank_mobile;
}
public String getBank_kaihu_name() {
return bank_kaihu_name;
}
public void setBank_kaihu_name(String bank_kaihu_name) {
this.bank_kaihu_name = bank_kaihu_name;
}
public String getBank_name() {
return bank_name;
}
public void setBank_name(String bank_name) {
this.bank_name = bank_name;
}
public String getBank_card() {
return bank_card;
}
public void setBank_card(String bank_card) {
this.bank_card = bank_card;
}
public String getEmp_number() {
return emp_number;
}
public void setEmp_number(String emp_number) {
this.emp_number = emp_number;
}
public String getEmp_mobile() {
return emp_mobile;
}
public void setEmp_mobile(String emp_mobile) {
this.emp_mobile = emp_mobile;
}
public String getEmp_name() {
return emp_name;
}
public void setEmp_name(String emp_name) {
this.emp_name = emp_name;
}
public String getEmp_cover() {
return emp_cover;
}
public void setEmp_cover(String emp_cover) {
this.emp_cover = emp_cover;
}
}
|
[
"826321978@qq.com"
] |
826321978@qq.com
|
76aff4fb196552297adee909ec82861a8f75ab45
|
9d4f5b584690467e05306c11e8191d9cb36b0ec8
|
/src/test/java/com/bczx/fcy/day1011/BowingGameTest.java
|
8e41738d3bdf25b3ac1a4e55abc7401d2a588902
|
[] |
no_license
|
fcy1992/kata-practice
|
2387e05c0e9427afc00ac5c9dda141f83c7d2976
|
63cb14cd9cc71be14acf822bb0691cb55329d389
|
refs/heads/master
| 2021-07-07T13:55:31.729220
| 2019-11-17T17:00:52
| 2019-11-17T17:00:52
| 199,267,947
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,096
|
java
|
package com.bczx.fcy.day1011;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class BowingGameTest {
private Game g;
@Before
public void setUp() throws Exception {
g = new Game();
}
@Test
public void testGetGame() {
rollMany(20, 0);
assertEquals(0, g.score());
}
@Test
public void testAllOnes() {
int n = 20;
int pins = 1;
rollMany(n, pins);
assertEquals(20, g.score());
}
private void rollMany(int n, int pins) {
for (int i = 0; i < n; i++) {
g.roll(pins);
}
}
@Test
public void testOneSpare() {
rollSpare();
g.roll(3);
rollMany(17, 0);
assertEquals(16, g.score());
}
private void rollSpare() {
g.roll(5);
g.roll(5);
}
@Test
public void testOneStrike() {
g.roll(10);
g.roll(3);
g.roll(4);
rollMany(16, 0);
assertEquals(24, g.score());
}
@Test
public void testPerfectGame() {
rollMany(12, 10);
assertEquals(300, g.score());
}
}
|
[
"admin@example.com"
] |
admin@example.com
|
824c8be24205b66e3508f29492c8daaa57aa2789
|
c748264ea5a467a1d8791de9ef594261e34927b5
|
/bctk-manager/src/main/java/ytk/base/dao/mapper/StudentMapperCustom.java
|
e9b33cb2c7e5f249df16a79624bcd1e04e41a78f
|
[] |
no_license
|
Brotherc/testSystem
|
1984bedae28227aa2e896baa3a78f12877e688d6
|
5f91d14bd90badbd8d74e4e7e0b4a8037cd2da29
|
refs/heads/master
| 2021-05-06T23:02:49.294130
| 2018-02-23T13:54:16
| 2018-02-23T13:54:16
| 112,894,658
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 374
|
java
|
package ytk.base.dao.mapper;
import java.util.List;
import ytk.base.pojo.vo.StudentCustom;
import ytk.base.pojo.vo.StudentQueryVo;
public interface StudentMapperCustom {
public int findKsglStudentAddListCount(StudentQueryVo studentQueryVo) throws Exception;
public List<StudentCustom> findKsglStudentAddList(StudentQueryVo studentQueryVo) throws Exception;
}
|
[
"1157730239@qq.com"
] |
1157730239@qq.com
|
0cba3ed1433625294ea803223873280c4b0f6a80
|
8e103ca10a277fe9c2e0e95877d7d1db9911e5b6
|
/sdks/java/http_client/v1/src/test/java/org/openapitools/client/model/V1MPIJobTest.java
|
dc75fe0129f09635cb359420073d025aec344404
|
[
"Apache-2.0"
] |
permissive
|
jcims123/polyaxon
|
82718f31bab575ad176301e1008b7a1b8ff44957
|
158428535af8212591a17dd7780c6d955953ca20
|
refs/heads/master
| 2022-12-13T05:25:44.999364
| 2020-08-25T10:30:28
| 2020-08-25T10:30:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,433
|
java
|
// Copyright 2018-2020 Polyaxon, Inc.
//
// 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.
/*
* Polyaxon SDKs and REST API specification.
* Polyaxon SDKs and REST API specification.
*
* The version of the OpenAPI document: 1.1.8-rc0
* Contact: contact@polyaxon.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.openapitools.client.model.V1CleanPodPolicy;
import org.openapitools.client.model.V1KFReplica;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for V1MPIJob
*/
public class V1MPIJobTest {
private final V1MPIJob model = new V1MPIJob();
/**
* Model tests for V1MPIJob
*/
@Test
public void testV1MPIJob() {
// TODO: test V1MPIJob
}
/**
* Test the property 'kind'
*/
@Test
public void kindTest() {
// TODO: test kind
}
/**
* Test the property 'cleanPodPolicy'
*/
@Test
public void cleanPodPolicyTest() {
// TODO: test cleanPodPolicy
}
/**
* Test the property 'slotsPerWorker'
*/
@Test
public void slotsPerWorkerTest() {
// TODO: test slotsPerWorker
}
/**
* Test the property 'launcher'
*/
@Test
public void launcherTest() {
// TODO: test launcher
}
/**
* Test the property 'worker'
*/
@Test
public void workerTest() {
// TODO: test worker
}
}
|
[
"mouradmourafiq@gmail.com"
] |
mouradmourafiq@gmail.com
|
f81b070d6622ff07040cc59b5d9ca2b8f1eb6447
|
b35bf551b0f0c14b9dfaa89bd1c008ede6285f2b
|
/core/src/main/java/com/froso/ufp/modules/optional/textbot/bureaubot/configuration/SimpleBureauBotModuleConfiguration.java
|
ab537838d8f41861e29f4dc6c4bb81bcf8c82ee0
|
[] |
no_license
|
FrontendSolutionsGmbH/ufp-core-java
|
29347e63598060323d48412c3b292f2023e4a956
|
9b09d61a04453b6d492269c077629965fe9d694b
|
refs/heads/master
| 2022-07-10T16:32:21.887062
| 2019-08-21T11:09:21
| 2019-08-21T11:09:21
| 191,003,665
| 0
| 0
| null | 2021-08-02T17:17:08
| 2019-06-09T12:27:45
|
Java
|
UTF-8
|
Java
| false
| false
| 412
|
java
|
package com.froso.ufp.modules.optional.textbot.bureaubot.configuration;
import org.springframework.context.annotation.*;
/**
* Created by ckleinhuix on 12.11.2015.
*/
@Configuration
@ComponentScan(basePackages = {
"com.froso.ufp.modules.optional.textbot.bureaubot.controller",
"com.froso.ufp.modules.optional.textbot.bureaubot.service"
})
public class SimpleBureauBotModuleConfiguration {
}
|
[
"ck@digitalgott.de"
] |
ck@digitalgott.de
|
14a81b984335d443beac22eec11cc0455abb3a9c
|
f525deacb5c97e139ae2d73a4c1304affb7ea197
|
/gitv-DeObfuscate/src/main/java/com/gala/sdk/player/VideoSurfaceView.java
|
82b4ac377b269edd046aaec92bd08de1761f1983
|
[] |
no_license
|
AgnitumuS/gitv
|
93b2359e1bf9f2b6c945298c61c5c6dbfeea49b3
|
242c9a10a0aeb41b9589de9f254e6ce9f57bd77a
|
refs/heads/master
| 2021-08-08T00:50:10.630301
| 2017-11-09T08:10:33
| 2017-11-09T08:10:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,699
|
java
|
package com.gala.sdk.player;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.SurfaceView;
public class VideoSurfaceView extends SurfaceView implements IVideoSizeable {
public static final int FORCE_VIDEO_SIZE_MODE_DEFAULT = 200;
public static final int FORCE_VIDEO_SIZE_MODE_SCREEN_SIZE = 202;
public static final int FORCE_VIDEO_SIZE_MODE_VIEW_SIZE = 201;
private static final float RATIO_16_BY_9 = 1.7777778f;
private static final float RATIO_4_BY_3 = 1.3333334f;
public static final int SET_VIDEO_SIZE = 101;
public static final int SET_VIEW_SIZE = 100;
private static final String TAG = "PlayerSdk/VideoSurfaceView";
protected int mVideoHeight;
protected int mVideoRatio = 1;
protected int mVideoWidth;
class C01681 implements Runnable {
C01681() {
}
public void run() {
VideoSurfaceView.this.requestLayout();
}
}
class C01692 implements Runnable {
C01692() {
}
public void run() {
VideoSurfaceView.this.requestLayout();
}
}
public VideoSurfaceView(Context context) {
super(context);
}
public VideoSurfaceView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public VideoSurfaceView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
float ratioValue = getRatioValue(this.mVideoRatio);
if (ratioValue > 0.0f) {
measureFixedRatio(widthMeasureSpec, heightMeasureSpec, ratioValue);
return;
}
Log.d(TAG, "onMeasure: super.onMeasure()");
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
private float getRatioValue(int i) {
switch (this.mVideoRatio) {
case 1:
if (this.mVideoWidth <= 0 || this.mVideoHeight <= 0) {
return -1.0f;
}
return ((float) this.mVideoWidth) / ((float) this.mVideoHeight);
case 2:
return RATIO_4_BY_3;
case 3:
return RATIO_16_BY_9;
default:
return -1.0f;
}
}
public void setVideoSize(int width, int height) {
Log.d(TAG, "setVideoSize(width=" + width + ", height=" + height + ")");
this.mVideoWidth = width;
this.mVideoHeight = height;
post(new C01681());
}
public void setVideoRatio(int ratio) {
if (ratio != 0) {
this.mVideoRatio = ratio;
post(new C01692());
}
}
private void measureFixedRatio(int widthMeasureSpec, int heightMeasureSpec, float ratio) {
int defaultSize = getDefaultSize(this.mVideoWidth, widthMeasureSpec);
int defaultSize2 = getDefaultSize(this.mVideoHeight, heightMeasureSpec);
Log.d(TAG, "measureFixedRatio: widthMeasureSpec=" + widthMeasureSpec + ", heightMeasureSpec=" + heightMeasureSpec + ", mVideoWidth=" + this.mVideoWidth + ", mVideoHeight=" + this.mVideoHeight + ", mVideoRatio=" + this.mVideoRatio + ", width=" + defaultSize + ", height=" + defaultSize2);
if (ratio > ((float) defaultSize) / ((float) defaultSize2)) {
defaultSize2 = Math.round(((float) defaultSize) / ratio);
} else if (ratio > 0.0f) {
defaultSize = Math.round(((float) defaultSize2) * ratio);
}
Log.d(TAG, "measureFixedRatio: measured w/h=" + defaultSize + "/" + defaultSize2);
setMeasuredDimension(defaultSize, defaultSize2);
}
}
|
[
"liuwencai@le.com"
] |
liuwencai@le.com
|
158cafe81c43fd52cfeffd09296981167b3fdcbe
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes11.dex_source_from_JADX/com/facebook/feedplugins/musicstory/providers/AuthorizationDialog.java
|
f593f65b3f7c7d14d3c546ac736e84d6c76d573f
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,924
|
java
|
package com.facebook.feedplugins.musicstory.providers;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import android.net.Uri.Builder;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.facebook.content.SafeOAuthUrl;
import com.facebook.content.SecureWebViewHelper;
import com.facebook.feedplugins.musicstory.providers.MusicProviderUtils.C10331;
import com.facebook.feedplugins.musicstory.providers.MusicProviderUtils.C10353;
import com.facebook.feedplugins.musicstory.utils.MusicStoryLogger.ActionType;
import com.facebook.inject.FbInjector;
import com.facebook.loom.logger.LogEntry.EntryType;
import com.facebook.loom.logger.Logger;
import com.facebook.ui.dialogs.FbDialogFragment;
import com.facebook.widget.loadingindicator.LoadingIndicatorView;
import javax.annotation.Nullable;
import javax.inject.Inject;
/* compiled from: com.nttdocomo.android.selection */
public class AuthorizationDialog extends FbDialogFragment {
public static final String am = AuthorizationDialog.class.getSimpleName();
@Inject
public SecureWebViewHelper an;
@Nullable
public C10331 ao;
private WebView ap;
public LoadingIndicatorView aq;
/* compiled from: com.nttdocomo.android.selection */
public class C10301 extends WebViewClient {
String f8345a;
final /* synthetic */ AuthorizationDialog f8346b;
public C10301(AuthorizationDialog authorizationDialog) {
this.f8346b = authorizationDialog;
}
public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
this.f8346b.aq.setVisibility(0);
this.f8346b.aq.a();
}
public void onPageFinished(WebView webView, String str) {
this.f8346b.aq.b();
this.f8346b.aq.setVisibility(8);
}
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
if (!str.startsWith("https://m.facebook.com/spotify_callback")) {
return super.shouldOverrideUrlLoading(webView, str);
}
Uri parse = Uri.parse(str);
C10331 c10331;
if (parse.getQueryParameterNames().contains("code")) {
this.f8345a = parse.getQueryParameter("code");
if (this.f8346b.ao != null) {
c10331 = this.f8346b.ao;
String str2 = this.f8345a;
if (c10331.f8364a != null) {
c10331.f8364a.m9315a(ActionType.auth_success);
c10331.f8365b.m9292a(str2, c10331.f8366c, c10331.f8367d, new C10353(c10331.f8368e));
}
}
this.f8346b.b();
} else if (parse.getQueryParameterNames().contains("error")) {
if (this.f8346b.ao != null) {
c10331 = this.f8346b.ao;
if (c10331.f8364a != null) {
c10331.f8364a.m9315a(ActionType.auth_fail);
}
}
this.f8346b.b();
}
return true;
}
}
public static void m9257a(Object obj, Context context) {
((AuthorizationDialog) obj).an = SecureWebViewHelper.a(FbInjector.get(context));
}
public final void m9259a(Bundle bundle) {
int a = Logger.a(2, EntryType.LIFECYCLE_FRAGMENT_START, 380026272);
super.a(bundle);
Class cls = AuthorizationDialog.class;
m9257a(this, getContext());
a(0, 2131626695);
Logger.a(2, EntryType.LIFECYCLE_FRAGMENT_END, 827887236, a);
}
public final View m9258a(LayoutInflater layoutInflater, @android.support.annotation.Nullable ViewGroup viewGroup, @android.support.annotation.Nullable Bundle bundle) {
int a = Logger.a(2, EntryType.LIFECYCLE_FRAGMENT_START, -1835865864);
View inflate = layoutInflater.inflate(2130903321, viewGroup, false);
this.aq = (LoadingIndicatorView) inflate.findViewById(2131559751);
this.ap = (WebView) inflate.findViewById(2131559752);
this.ap.getSettings().setJavaScriptEnabled(true);
Builder buildUpon = Uri.parse("https://accounts.spotify.com/authorize").buildUpon();
buildUpon.appendQueryParameter("client_id", "9cc4aaeb43f24b098cff096385f00233");
buildUpon.appendQueryParameter("response_type", "code");
buildUpon.appendQueryParameter("show_dialog", Boolean.toString(true));
buildUpon.appendQueryParameter("redirect_uri", "https://m.facebook.com/spotify_callback");
this.ap.setWebViewClient(new C10301(this));
this.ap.loadUrl(new SafeOAuthUrl(buildUpon.toString()).toString());
Logger.a(2, EntryType.LIFECYCLE_FRAGMENT_END, -752482939, a);
return inflate;
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
c2130233c66e1044a6820d6c85c8508739f231aa
|
71cb2dd0404505e891d8d7882163fbc4e30f8d34
|
/cqliving-online/src/main/java/com/cqliving/cloud/online/shopping/manager/impl/ShoppingDiscountManagerImpl.java
|
f8d639a196b629a0c9912bf342d46067e87a6041
|
[] |
no_license
|
cenbow/fuxiaofengfugib
|
eab19ee68051753b338c3380aa499e2a96aa6ee2
|
543b909f7ce394c8f482484a7d35fa2871fecd62
|
refs/heads/master
| 2020-12-02T21:16:17.346107
| 2017-02-13T01:26:13
| 2017-02-13T01:26:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,283
|
java
|
package com.cqliving.cloud.online.shopping.manager.impl;
import java.util.Arrays;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.cqliving.cloud.online.shopping.manager.ShoppingDiscountManager;
import com.cqliving.cloud.online.shopping.dao.ShoppingDiscountDao;
import com.cqliving.cloud.online.shopping.domain.ShoppingDiscount;
import com.cqliving.framework.common.service.EntityServiceImpl;
import org.springframework.stereotype.Service;
@Service("shoppingDiscountManager")
public class ShoppingDiscountManagerImpl extends EntityServiceImpl<ShoppingDiscount, ShoppingDiscountDao> implements ShoppingDiscountManager {
/**
* 逻辑删除
* @param ids
* @return
*/
@Override
@Transactional(value="transactionManager")
public int deleteLogic(Long[] ids){
List<Long> idList = Arrays.asList(ids);
return this.getEntityDao().updateStatus(ShoppingDiscount.STATUS99, idList);
}
/**
* 修改状态
* @param status 状态
* @param ids
* @return
*/
@Override
@Transactional(value="transactionManager")
public int updateStatus(Byte status,Long... ids){
List<Long> idList = Arrays.asList(ids);
return this.getEntityDao().updateStatus(status, idList);
}
}
|
[
"fuxiaofeng1107@163.com"
] |
fuxiaofeng1107@163.com
|
2a36cc5b718945ff67198486ad38a552e4f07e69
|
028cbe18b4e5c347f664c592cbc7f56729b74060
|
/external/modules/weld/core/1.1.0.Beta2/tests-arquillian/src/test/java/org/jboss/weld/tests/proxy/ProxyTest.java
|
279be1c220ba8583910b9ccf7532abcb5fd0f9a0
|
[] |
no_license
|
dmatej/Glassfish-SVN-Patched
|
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
|
269e29ba90db6d9c38271f7acd2affcacf2416f1
|
refs/heads/master
| 2021-05-28T12:55:06.267463
| 2014-11-11T04:21:44
| 2014-11-11T04:21:44
| 23,610,469
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,246
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.weld.tests.proxy;
import javax.enterprise.inject.spi.Bean;
import javax.inject.Inject;
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.BeanArchive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.weld.manager.BeanManagerImpl;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(Arquillian.class)
public class ProxyTest
{
@Deployment
public static Archive<?> deploy()
{
return ShrinkWrap.create(BeanArchive.class)
.addPackage(ProxyTest.class.getPackage());
}
@Inject
private BeanManagerImpl beanManager;
/*
* description = "WBRI-122"
*/
@Test
public void testImplementationClassImplementsSerializable()
{
Bean<?> bean = beanManager.resolve(beanManager.getBeans("foo"));
Assert.assertNotNull(beanManager.getReference(bean, Object.class, beanManager.createCreationalContext(bean)));
}
@Test
public void testProxyInvocations()
{
Bean<?> bean = beanManager.resolve(beanManager.getBeans("foo"));
Foo foo = (Foo) beanManager.getReference(bean, Foo.class, beanManager.createCreationalContext(bean));
Assert.assertEquals(Foo.MESSAGE, foo.getMsg(0, 0L, 0D, false, 'a', 0F, (short) 0));
Assert.assertEquals(Foo.MESSAGE, foo.getRealMsg(0, 0L, 0D, false, 'a', 0F, (short) 0));
}
}
|
[
"sivakumart@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] |
sivakumart@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
|
84ee47f3ff9784cb8bb34da62f8daa6d5fb97400
|
05948ca1cd3c0d2bcd65056d691c4d1b2e795318
|
/classes2/com/xiaoenai/app/net/http/a/c.java
|
81b661e90c6fb3720d14d2b7b853dce37847a38b
|
[] |
no_license
|
waterwitness/xiaoenai
|
356a1163f422c882cabe57c0cd3427e0600ff136
|
d24c4d457d6ea9281a8a789bc3a29905b06002c6
|
refs/heads/master
| 2021-01-10T22:14:17.059983
| 2016-10-08T08:39:11
| 2016-10-08T08:39:11
| 70,317,042
| 0
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,556
|
java
|
package com.xiaoenai.app.net.http.a;
import android.text.TextUtils;
import b.ab;
import b.al;
import b.aq;
import b.as;
import b.g;
import b.h;
import com.xiaoenai.app.net.http.a.a.b;
import java.io.IOException;
class c
implements h
{
c(a parama, com.xiaoenai.app.net.http.base.b.a parama1, com.xiaoenai.app.net.http.base.a.c paramc) {}
public void a(g paramg, aq paramaq)
{
localObject = null;
for (;;)
{
try
{
if (!paramaq.c()) {
continue;
}
com.xiaoenai.app.utils.f.a.c("Http requestUrl:{}\n statusCode={}\n responseStr:\n", new Object[] { paramaq.a().a().toString(), Integer.valueOf(paramaq.b()) });
if ((TextUtils.isEmpty(this.a.b())) || (TextUtils.isEmpty(this.a.a()))) {
continue;
}
paramaq = this.a.a(paramaq);
paramg = paramaq;
}
catch (Exception paramaq)
{
paramaq.printStackTrace();
this.c.a(paramg, paramaq, this.a);
paramg = (g)localObject;
continue;
}
this.c.a(paramg, this.b, this.a);
return;
paramaq = this.a.a(paramaq.g().d());
paramg = paramaq;
continue;
this.c.a(paramaq, new b(paramaq.d()), this.a);
paramg = (g)localObject;
}
}
public void a(g paramg, IOException paramIOException)
{
this.c.a(paramg, paramIOException, this.a);
}
}
/* Location: E:\apk\xiaoenai2\classes2-dex2jar.jar!\com\xiaoenai\app\net\http\a\c.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
fdaff21811cbe3bb54d9f38cf15223895e5abe96
|
c19cb77e3958a194046d6f84ca97547cc3a223c3
|
/pkix/src/main/java/org/bouncycastle/cms/bc/CMSUtils.java
|
8beb36a12387729d600f25532c0058f3ff66b1ba
|
[
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
bcgit/bc-java
|
1b6092bc5d2336ec26ebd6da6eeaea6600b4c70a
|
62b03c0f704ebd243fe5f2d701aef4edd77bba6e
|
refs/heads/main
| 2023-09-04T00:48:33.995258
| 2023-08-30T05:33:42
| 2023-08-30T05:33:42
| 10,416,648
| 1,984
| 1,021
|
MIT
| 2023-08-26T05:14:28
| 2013-06-01T02:38:42
|
Java
|
UTF-8
|
Java
| false
| false
| 631
|
java
|
package org.bouncycastle.cms.bc;
import org.bouncycastle.crypto.CipherParameters;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.operator.GenericKey;
class CMSUtils
{
static CipherParameters getBcKey(GenericKey key)
{
if (key.getRepresentation() instanceof CipherParameters)
{
return (CipherParameters)key.getRepresentation();
}
if (key.getRepresentation() instanceof byte[])
{
return new KeyParameter((byte[])key.getRepresentation());
}
throw new IllegalArgumentException("unknown generic key type");
}
}
|
[
"dgh@cryptoworkshop.com"
] |
dgh@cryptoworkshop.com
|
54a1404d4b986448fccfd3d4fc2882c9a3fd096d
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12667-7-3-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/web/DownloadAction_ESTest.java
|
8d38ff038f0925a891789897bba4ef6fa4c4d543
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 552
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Apr 02 14:45:30 UTC 2020
*/
package com.xpn.xwiki.web;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DownloadAction_ESTest extends DownloadAction_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
571aa7062af6a076258339ccf94f34b427ba63aa
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/CodeJamData/14/42/13.java
|
b1fe276d1ad833b7851b047ba018108235847bbe
|
[] |
no_license
|
Kawser-nerd/CLCDSA
|
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
|
aee32551795763b54acb26856ab239370cac4e75
|
refs/heads/master
| 2022-02-09T11:08:56.588303
| 2022-01-26T18:53:40
| 2022-01-26T18:53:40
| 211,783,197
| 23
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,474
|
java
|
/**
* Created by rubanenko on 31.05.14.
*/
import java.io.*;
import java.util.*;
public class A implements Runnable {
public void solve() throws IOException {
int tc = scanner.nextInt();
for (int tcc = 1; tcc <= tc; tcc++) {
writer.print("Case #" + tcc + ": ");
int n = scanner.nextInt();
int[] a = new int[n + 2];
int num = 1;
for (int i = 1; i <= n; i++) {
a[i] = scanner.nextInt();
if (a[i] > a[num]) num = i;
}
int l = 1, r = n, ans = 0;
for (int iter = 1; iter < n; iter++) {
num = l;
for (int i = l; i <= r; i++) {
if (a[i] < a[num]) num = i;
}
if (r - num < num - l) {
while (num != r) {
int tmp = a[num + 1];
a[num + 1] = a[num];
a[num] = tmp;
num++;
ans++;
}
r--;
}
else {
while (num != l) {
int tmp = a[num - 1];
a[num - 1] = a[num];
a[num] = tmp;
num--;
ans++;
}
l++;
}
}
writer.println(ans);
}
}
public static void main(String[] args) {
// long startTime = System.currentTimeMillis();
new A().run();
// long finishTime = System.currentTimeMillis();
// System.err.println(finishTime - startTime + "ms.");
}
public Scanner scanner;
public PrintWriter writer;
@Override
public void run() {
try {
scanner = new Scanner(new FileInputStream("B-large.in"));
writer = new PrintWriter(new FileOutputStream("output.txt"));
solve();
writer.close();
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
public static class Scanner {
private BufferedReader reader;
private StringTokenizer tokenizer;
public boolean hasMoreTokens() throws IOException{
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
String s = nextLine();
if (s == null) return false;
tokenizer = new StringTokenizer(s);
}
return true;
}
Scanner(InputStream inputStream) {
reader = new BufferedReader(new InputStreamReader(inputStream));
}
public String nextLine() throws IOException {
return reader.readLine();
}
public String nextToken() throws IOException {
while (tokenizer == null || !tokenizer.hasMoreTokens())
tokenizer = new StringTokenizer(nextLine());
return tokenizer.nextToken();
}
public int nextInt() throws NumberFormatException, IOException {
return Integer.parseInt(nextToken());
}
public long nextLong() throws NumberFormatException, IOException {
return Long.parseLong(nextToken());
}
public double nextDouble() throws NumberFormatException, IOException {
return Double.parseDouble(nextToken());
}
}
}
|
[
"kwnafi@yahoo.com"
] |
kwnafi@yahoo.com
|
f36105f5b18650b604cd6c5061cc1d3623d61cb3
|
75950d61f2e7517f3fe4c32f0109b203d41466bf
|
/modules/tags/fabric3-modules-parent-pom-1.4/extension/binding/fabric3-binding-ws-metro/src/main/java/org/fabric3/binding/ws/metro/runtime/core/EndpointConfiguration.java
|
14c6a3927fb9979fc4070acfb362b3de0baa80ce
|
[] |
no_license
|
codehaus/fabric3
|
3677d558dca066fb58845db5b0ad73d951acf880
|
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
|
refs/heads/master
| 2023-07-20T00:34:33.992727
| 2012-10-31T16:32:19
| 2012-10-31T16:32:19
| 36,338,853
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,935
|
java
|
/*
* Fabric3
* Copyright (c) 2009 Metaform Systems
*
* Fabric3 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, with the
* following exception:
*
* Linking this software statically or dynamically with other
* modules is making a combined work based on this software.
* Thus, the terms and conditions of the GNU General Public
* License cover the whole combination.
*
* As a special exception, the copyright holders of this software
* give you permission to link this software with independent
* modules to produce an executable, regardless of the license
* terms of these independent modules, and to copy and distribute
* the resulting executable under terms of your choice, provided
* that you also meet, for each linked independent module, the
* terms and conditions of the license of that module. An
* independent module is a module which is not derived from or
* based on this software. If you modify this software, you may
* extend this exception to your version of the software, but
* you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version.
*
* Fabric3 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 Fabric3.
* If not, see <http://www.gnu.org/licenses/>.
*/
package org.fabric3.binding.ws.metro.runtime.core;
import java.net.URL;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceFeature;
import com.sun.xml.ws.api.BindingID;
import com.sun.xml.ws.api.server.Invoker;
/**
* Configuration for provisioning a service as a web service endpoint.
*
* @version $Rev$ $Date$
*/
public class EndpointConfiguration {
private Class<?> seiClass;
private QName serviceName;
private QName portName;
private String servicePath;
private Invoker invoker;
private WebServiceFeature[] features;
private BindingID bindingId;
private URL generatedWsdl;
private List<URL> generatedSchemas;
private URL wsdlLocation;
/**
* Constructor that takes a WSDL document at a given URL. If the URL is null, a WSDL will be generated from the service endpoint interface.
*
* @param seiClass service endpoint interface.
* @param serviceName service name
* @param portName port name
* @param servicePath Relative path on which the service is provisioned.
* @param wsdlLocation URL to the WSDL document.
* @param invoker Invoker for receiving the web service request.
* @param features Web service features to enable.
* @param bindingId Binding ID to use.
* @param generatedWsdl the generated WSDL used for WSIT configuration or null if no policy is configured
* @param generatedSchemas the handles to schemas (XSDs) imported by the WSDL or null if none exist
*/
public EndpointConfiguration(Class<?> seiClass,
QName serviceName,
QName portName,
String servicePath,
URL wsdlLocation,
Invoker invoker,
WebServiceFeature[] features,
BindingID bindingId,
URL generatedWsdl,
List<URL> generatedSchemas) {
this.seiClass = seiClass;
this.serviceName = serviceName;
this.portName = portName;
this.servicePath = servicePath;
this.wsdlLocation = wsdlLocation;
this.invoker = invoker;
this.features = features;
this.bindingId = bindingId;
this.generatedWsdl = generatedWsdl;
this.generatedSchemas = generatedSchemas;
}
public URL getWsdlLocation() {
return wsdlLocation;
}
public QName getServiceName() {
return serviceName;
}
public QName getPortName() {
return portName;
}
public String getServicePath() {
return servicePath;
}
public Invoker getInvoker() {
return invoker;
}
public WebServiceFeature[] getFeatures() {
return features;
}
public BindingID getBindingId() {
return bindingId;
}
public URL getGeneratedWsdl() {
return generatedWsdl;
}
public List<URL> getGeneratedSchemas() {
return generatedSchemas;
}
public Class<?> getSeiClass() {
return seiClass;
}
}
|
[
"jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf"
] |
jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf
|
320fc7a3f5dadc0af28a2b9177f2a211c03143d1
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/35/org/apache/commons/math3/analysis/function/Abs_value_31.java
|
f30ec49ae0863161114b6ec16d30853041ce1a89
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 174
|
java
|
org apach common math3 analysi function
absolut function
version
ab univari function univariatefunct
inherit doc inheritdoc
fast math fastmath ab
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
e7a67aacb140988c307ebbc6e7e5c0e1e8d134fb
|
2dcc440fa85d07e225104f074bcf9f061fe7a7ae
|
/gameserver/src/main/java/org/mmocore/gameserver/stats/Calculator.java
|
814a61921d5e77bbedc48c84423b7a15280dc045
|
[] |
no_license
|
VitaliiBashta/L2Jts
|
a113bc719f2d97e06db3e0b028b2adb62f6e077a
|
ffb95b5f6e3da313c5298731abc4fcf4aea53fd5
|
refs/heads/master
| 2020-04-03T15:48:57.786720
| 2018-10-30T17:34:29
| 2018-10-30T17:35:04
| 155,378,710
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,843
|
java
|
package org.mmocore.gameserver.stats;
import org.mmocore.commons.lang.ArrayUtils;
import org.mmocore.gameserver.object.Creature;
import org.mmocore.gameserver.skills.SkillEntry;
import org.mmocore.gameserver.stats.funcs.Func;
import org.mmocore.gameserver.stats.funcs.FuncOwner;
/**
* A calculator is created to manage and dynamically calculate the effect of a character property (ex : MAX_HP, REGENERATE_HP_RATE...).
* In fact, each calculator is a table of Func object in which each Func represents a mathematic function : <BR><BR>
* <p/>
* FuncAtkAccuracy -> Math.sqrt(_player.getDEX())*6+_player.getLevel()<BR><BR>
* <p/>
* When the calc method of a calculator is launched, each mathematic function is called according to its priority <B>_order</B>.
* Indeed, Func with lowest priority order is executed firsta and Funcs with the same order are executed in unspecified order.
* <p/>
* Method addFunc and removeFunc permit to add and remove a Func object from a Calculator.<BR><BR>
*/
public final class Calculator {
public final Stats _stat;
public final Creature _character;
private Func[] _functions;
private double _base;
private double _last;
public Calculator(final Stats stat, final Creature character) {
_stat = stat;
_character = character;
_functions = Func.EMPTY_FUNC_ARRAY;
}
/**
* Return the number of Funcs in the Calculator.<BR><BR>
*/
public int size() {
return _functions.length;
}
/**
* Add a Func to the Calculator.<BR><BR>
*/
public void addFunc(final Func f) {
_functions = ArrayUtils.add(_functions, f);
ArrayUtils.eqSort(_functions);
}
/**
* Remove a Func from the Calculator.<BR><BR>
*/
public void removeFunc(final Func f) {
_functions = ArrayUtils.remove(_functions, f);
if (_functions.length == 0) {
_functions = Func.EMPTY_FUNC_ARRAY;
} else {
ArrayUtils.eqSort(_functions);
}
}
/**
* Remove each Func with the specified owner of the Calculator.<BR><BR>
*/
public void removeOwner(final Object owner) {
final Func[] tmp = _functions;
for (final Func element : tmp) {
if (element.owner == owner) {
removeFunc(element);
}
}
}
/**
* Run each Func of the Calculator.<BR><BR>
*/
public double calc(final Creature creature, final Creature target, final SkillEntry skill, final double initialValue) {
final Func[] funcs = _functions;
double value = initialValue;
_base = value;
boolean overrideLimits = false;
for (final Func func : funcs) {
if (func == null) {
continue;
}
if (func.owner instanceof FuncOwner) {
if (!((FuncOwner) func.owner).isFuncEnabled()) {
continue;
}
if (((FuncOwner) func.owner).overrideLimits()) {
overrideLimits = true;
}
}
if (func.getCondition() == null || func.getCondition().test(creature, target, skill, value)) {
value = func.calc(creature, target, skill, value);
}
}
if (!overrideLimits) {
value = _stat.validate(value);
}
if (Math.abs(value - _last) > 0.00001) {
//double last = _last; //TODO [G1ta0] найти приминение в StatsChangeRecorder
_last = value;
}
return value;
}
/**
* Для отладки
*/
public Func[] getFunctions() {
return _functions;
}
public double getBase() {
return _base;
}
public double getLast() {
return _last;
}
}
|
[
"Vitalii.Bashta@accenture.com"
] |
Vitalii.Bashta@accenture.com
|
3b1aac71b08fe09ccad651ad975ae68ae8781580
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/13/13_c4cbf6898225b477fa15d3eaa1b84c8a2920d65c/HTML/13_c4cbf6898225b477fa15d3eaa1b84c8a2920d65c_HTML_s.java
|
70e86d20cab74049f2e0cbbc9ab3d2bde63a2dc7
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,131
|
java
|
/*
* Copyright 2009-2011 Prime Technology.
*
* 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.primefaces.util;
public class HTML {
public static String[] CLICK_EVENT = {"onclick"};
public static String[] BLUR_FOCUS_EVENTS = {
"onblur",
"onfocus"
};
public static String[] CHANGE_SELECT_EVENTS = {
"onchange",
"onselect"
};
public static String[] COMMON_EVENTS = {
"onclick",
"ondblclick",
"onkeydown",
"onkeypress",
"onkeyup",
"onmousedown",
"onmousemove",
"onmouseout",
"onmouseover",
"onmouseup"
};
//StyleClass is omitted
public static String[] IMG_ATTRS_WITHOUT_EVENTS = {
"alt",
"width",
"height",
"title",
"dir",
"lang",
"ismap",
"usemap",
"style"
};
//StyleClass is omitted
public static String[] LINK_ATTRS_WITHOUT_EVENTS = {
"accesskey",
"charset",
"coords",
"dir",
"disabled",
"hreflang",
"rel",
"rev",
"shape",
"tabindex",
"style",
"target",
"title",
"type"
};
//StyleClass is omitted
public static String[] BUTTON_ATTRS_WITHOUT_EVENTS = {
"accesskey",
"alt",
"dir",
"label",
"lang",
"style",
"tabindex",
"title",
"type"
};
//StyleClass is omitted
public static String[] MEDIA_ATTRS = {
"height",
"width",
"style"
};
//disabled, readonly, style, styleClass handles by component renderer
public static String[] INPUT_TEXT_ATTRS_WITHOUT_EVENTS = {
"accesskey",
"alt",
"autocomplete",
"dir",
"lang",
"maxlength",
"size",
"tabindex",
"title"
};
public static String[] SELECT_ATTRS_WITHOUT_EVENTS = {
"accesskey",
"dir",
"disabled",
"lang",
"readonly",
"style",
"tabindex",
"title"
};
public static String[] TEXTAREA_ATTRS = {
"cols",
"rows"
};
public static String[] LINK_EVENTS = ArrayUtils.concat(COMMON_EVENTS, BLUR_FOCUS_EVENTS);
public static String[] BUTTON_EVENTS = ArrayUtils.concat(LINK_EVENTS, CHANGE_SELECT_EVENTS);
public static String[] IMG_ATTRS = ArrayUtils.concat(IMG_ATTRS_WITHOUT_EVENTS, COMMON_EVENTS);
public static String[] LINK_ATTRS = ArrayUtils.concat(LINK_ATTRS_WITHOUT_EVENTS, LINK_EVENTS);
public static String[] BUTTON_ATTRS = ArrayUtils.concat(BUTTON_ATTRS_WITHOUT_EVENTS, BUTTON_EVENTS);
public static final String[] INPUT_TEXT_ATTRS = ArrayUtils.concat(INPUT_TEXT_ATTRS_WITHOUT_EVENTS, COMMON_EVENTS, CHANGE_SELECT_EVENTS, BLUR_FOCUS_EVENTS);
public static final String[] INPUT_TEXTAREA_ATTRS = ArrayUtils.concat(INPUT_TEXT_ATTRS, TEXTAREA_ATTRS);
public static final String[] SELECT_ATTRS = ArrayUtils.concat(SELECT_ATTRS_WITHOUT_EVENTS, COMMON_EVENTS, CHANGE_SELECT_EVENTS, BLUR_FOCUS_EVENTS);
public final static String BUTTON_TEXT_ONLY_BUTTON_CLASS = "ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only";
public final static String BUTTON_ICON_ONLY_BUTTON_CLASS = "ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only";
public final static String BUTTON_TEXT_ICON_LEFT_BUTTON_CLASS = "ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left";
public final static String BUTTON_TEXT_ICON_RIGHT_BUTTON_CLASS = "ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-right";
public final static String BUTTON_LEFT_ICON_CLASS = "ui-button-icon-left ui-icon";
public final static String BUTTON_RIGHT_ICON_CLASS = "ui-button-icon-right ui-icon";
public final static String BUTTON_TEXT_CLASS = "ui-button-text";
public final static String CHECKBOX_CLASS = "ui-chkbox ui-widget";
public final static String CHECKBOX_BOX_CLASS = "ui-chkbox-box ui-widget ui-corner-all ui-state-default";
public final static String CHECKBOX_INPUT_WRAPPER_CLASS = "ui-helper-hidden";
public final static String CHECKBOX_ICON_CLASS = "ui-chkbox-icon";
public final static String CHECKBOX_CHECKED_ICON_CLASS = "ui-icon ui-icon-check";
public final static String CHECKBOX_LABEL_CLASS = "ui-chkbox-label";
public final static String RADIOBUTTON_CLASS = "ui-radiobutton ui-widget";
public final static String RADIOBUTTON_BOX_CLASS = "ui-radiobutton-box ui-widget ui-corner-all ui-radiobutton-relative ui-state-default";
public final static String RADIOBUTTON_INPUT_WRAPPER_CLASS = "ui-helper-hidden";
public final static String RADIOBUTTON_ICON_CLASS = "ui-radiobutton-icon";
public final static String RADIOBUTTON_CHECKED_ICON_CLASS = "ui-icon ui-icon-bullet";
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
f71ca6632f76fd597289a178f7889b4b20c3dee0
|
c8655251bb853a032ab7db6a9b41c13241565ff6
|
/jframe-utils/src/main/java/com/alipay/api/domain/KoubeiAdvertCommissionSpecialadvcontentModifyModel.java
|
c2f7d8abcbfb42768a05e519893c987562eccfdd
|
[] |
no_license
|
jacksonrick/JFrame
|
3b08880d0ad45c9b12e335798fc1764c9b01756b
|
d9a4a9b17701eb698b957e47fa3f30c6cb8900ac
|
refs/heads/master
| 2021-07-22T21:13:22.548188
| 2017-11-03T06:49:44
| 2017-11-03T06:49:44
| 107,761,091
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,854
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 特殊广告内容修改接口
*
* @author auto create
* @since 1.0, 2017-01-17 10:33:46
*/
public class KoubeiAdvertCommissionSpecialadvcontentModifyModel extends AlipayObject {
private static final long serialVersionUID = 2593344141299697887L;
/**
* 广告ID
*/
@ApiField("adv_id")
private String advId;
/**
* 渠道ID(如果修改的是广告的默认主推广的内容,则不传渠道ID;如果修改的是广告的指定投放渠道的内容,则传指定渠道的ID)
*/
@ApiField("channel_id")
private String channelId;
/**
* 创建或者删除广告内容的请求参数List
*/
@ApiListField("content_list")
@ApiField("kb_advert_special_adv_content_request")
private List<KbAdvertSpecialAdvContentRequest> contentList;
/**
* 特殊广告内容的修改枚举类型:
create:表示创建特殊广告内容
delete:表示删除特殊广告内容
*/
@ApiField("modify_type")
private String modifyType;
public String getAdvId() {
return this.advId;
}
public void setAdvId(String advId) {
this.advId = advId;
}
public String getChannelId() {
return this.channelId;
}
public void setChannelId(String channelId) {
this.channelId = channelId;
}
public List<KbAdvertSpecialAdvContentRequest> getContentList() {
return this.contentList;
}
public void setContentList(List<KbAdvertSpecialAdvContentRequest> contentList) {
this.contentList = contentList;
}
public String getModifyType() {
return this.modifyType;
}
public void setModifyType(String modifyType) {
this.modifyType = modifyType;
}
}
|
[
"809573150@qq.com"
] |
809573150@qq.com
|
ed2a2eb7a17b682ef05c0adad9fccac51ec501ee
|
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
|
/database/src/main/java/adila/db/tx201la_tx201la.java
|
923bb68045cd200764b77a2a5b999bdf58cecf93
|
[
"MIT"
] |
permissive
|
karim/adila
|
8b0b6ba56d83f3f29f6354a2964377e6197761c4
|
00f262f6d5352b9d535ae54a2023e4a807449faa
|
refs/heads/master
| 2021-01-18T22:52:51.508129
| 2016-11-13T13:08:04
| 2016-11-13T13:08:04
| 45,054,909
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 239
|
java
|
// This file is automatically generated.
package adila.db;
/*
* Asus Transformer Book Trio
*
* DEVICE: TX201LA
* MODEL: TX201LA
*/
final class tx201la_tx201la {
public static final String DATA = "Asus|Transformer Book Trio|";
}
|
[
"keldeeb@gmail.com"
] |
keldeeb@gmail.com
|
3e25d0a1418eb0a0ff68121f1bd85d9cfc004be3
|
392ad26a2caf641d0925e093a43d7f8c2df6d21e
|
/JiniPrint/src/main/java/net/jini/print/attribute/standard/MaterialAmount.java
|
070477233f75fa0d94699495fa6a1f75a64b3385
|
[
"LicenseRef-scancode-proprietary-license",
"Apache-2.0"
] |
permissive
|
pfirmstone/Jini-Print-API
|
9662d238d8f29e866b51eb1e479c84c96a7ed9dc
|
9277d66c63261bd87b56475f3371b331f670a606
|
refs/heads/master
| 2023-04-13T00:32:45.815260
| 2023-03-16T11:29:08
| 2023-03-16T11:29:08
| 89,661,860
| 3
| 0
|
Apache-2.0
| 2023-03-16T11:29:09
| 2017-04-28T03:01:43
|
Java
|
UTF-8
|
Java
| false
| false
| 3,258
|
java
|
/*
* Copyright 2017 peter.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.jini.print.attribute.standard;
import java.io.InvalidObjectException;
import java.io.ObjectStreamException;
import javax.print.attribute.Attribute;
import javax.print.attribute.IntegerSyntax;
/**
* This RECOMMENDED member attribute provides the estimated amount of material
* that is available ("materials-col-database" and "materials-col-ready"
* values), the estimated amount of material that is required ("materials-col"
* values), or the actual amount of material that has been used
* ("materials-col-actual" values).
*
* @author peter
*/
public class MaterialAmount extends IntegerSyntax implements Attribute {
protected MaterialAmount(int i) {
super(check(i));
}
@Override
public Class<? extends Attribute> getCategory() {
return MaterialAmount.class;
}
@Override
public String getName() {
return "material-amount";
}
@Override
public boolean equals(Object theObject) {
return super.equals(theObject) && this.getClass().isInstance(theObject);
}
private static int check(int i) {
if (i < 0) {
throw new IllegalArgumentException("integer must be positive");
}
return i;
}
/**
* IntegerSyntax can be de-serialized by AtomicMarshalInputStream, since it
* only contains primitive fields, which are not seen as a threat for gadget
* attacks, however this object still has invariants which need to be
* checked. Implementing @AtomicSerial would make this class responsible for
* managing serial form, while implementing readObject() would prevent
* de-serialization with AtomicMarshalInputStream. As such readResolve is
* the only option to validate input in this case, it is protected so that
* all subclasses inherit it, to ensure it is also called for subclass
* instances. It is final to ensure the validation check cannot be bypassed.
*
*
* @serial Checks the value from the stream satisfies the same invariants as
* our constructor.
*
* @return this
* @throws ObjectStreamException
*/
protected final Object readResolve() throws ObjectStreamException {
try {
check(getValue());
validateInvariants();
return this;
} catch (IllegalArgumentException e) {
throw new InvalidObjectException(e.getMessage());
}
}
/**
* Subclasses can override this method to have check their invariants during
* de-serialization.
*
* @throws ObjectStreamException
*/
protected void validateInvariants() throws ObjectStreamException {
}
}
|
[
"jini@zeus.net.au"
] |
jini@zeus.net.au
|
37be3aded97cdafae3e5d9ec406491c813851b41
|
07093a2c5bed2f0e2cddbfb77cc6f04db11a30e4
|
/src/main/java/com/sfl/demo/User.java
|
feb3b2a8186b0dc03f7d3f24f7891241ff01b8e6
|
[] |
no_license
|
caozg007/caocan_springmvc_helloworld
|
f5bf0e4516061ec5dbcd4af06f5f5d1b5e969bae
|
2381bd97147723a924ffc254d9317950077422e4
|
refs/heads/master
| 2020-03-28T20:31:20.423091
| 2018-09-17T06:37:06
| 2018-09-17T06:37:06
| 149,078,463
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 611
|
java
|
package com.sfl.demo;
public class User {
private String loginname;
private String password;
private String username;
public User(){
}
public String getLoginname(){
return loginname;
}
public void setLoginname(String loginname){
this.loginname=loginname;
}
public String getPassword(){
return password;
}
public void setPassword(String password){
this.password=password;
}
public String getUsername(){
return username;
}
public void setUsername(String username){
this.username=username;
}
}
|
[
"admin@example.com"
] |
admin@example.com
|
4e81245f1a845faaed1181ef281461c001a35299
|
8c1b0ed3dadb19573fe34fa19aae29fea654ef52
|
/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-api/src/main/java/org/kie/workbench/common/stunner/bpmn/forms/service/adf/processing/processors/fields/AssigneeFieldInitializer.java
|
641833cba224dc2d8a501a1ee318959392513508
|
[
"Apache-2.0"
] |
permissive
|
pefernan/kie-wb-common
|
d86b1f045c789bf2ac2d915355e1afc67edc2b1b
|
567bf6d1c3d1923af6b4be52276354d16f615f62
|
refs/heads/master
| 2022-01-29T13:27:30.346208
| 2017-02-27T16:35:23
| 2017-02-27T16:35:23
| 47,341,249
| 0
| 1
| null | 2018-02-23T12:08:31
| 2015-12-03T15:35:49
|
Java
|
UTF-8
|
Java
| false
| false
| 2,077
|
java
|
/*
* Copyright 2017 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kie.workbench.common.stunner.bpmn.forms.service.adf.processing.processors.fields;
import javax.enterprise.context.Dependent;
import org.kie.workbench.common.forms.adf.engine.shared.formGeneration.FormGenerationContext;
import org.kie.workbench.common.forms.adf.engine.shared.formGeneration.processing.fields.FieldInitializer;
import org.kie.workbench.common.forms.adf.service.definitions.elements.FieldElement;
import org.kie.workbench.common.forms.model.FieldDefinition;
import org.kie.workbench.common.stunner.bpmn.forms.model.AssigneeEditorFieldDefinition;
import org.kie.workbench.common.stunner.bpmn.forms.model.AssigneeType;
@Dependent
public class AssigneeFieldInitializer implements FieldInitializer<AssigneeEditorFieldDefinition> {
@Override
public boolean supports(FieldDefinition fieldDefinition) {
return fieldDefinition instanceof AssigneeEditorFieldDefinition;
}
@Override
public void initialize(AssigneeEditorFieldDefinition field,
FieldElement fieldElement,
FormGenerationContext context) {
field.setDefaultValue(fieldElement.getParams().getOrDefault("defaultValue",
""));
field.setType(AssigneeType.valueOf(fieldElement.getParams().getOrDefault("type",
"USER")));
}
}
|
[
"christian.sadilek@gmail.com"
] |
christian.sadilek@gmail.com
|
12b88bcf0116812499a998f50678ce1399eed385
|
0529524c95045b3232f6553d18a7fef5a059545e
|
/app/src/androidTest/java/TestCase_com_abvio_meter_cycle_1674603422.java
|
7fe12f5ff69ce6b7792d87719593ba7e672724b7
|
[] |
no_license
|
sunxiaobiu/BasicUnitAndroidTest
|
432aa3e10f6a1ef5d674f269db50e2f1faad2096
|
fed24f163d21408ef88588b8eaf7ce60d1809931
|
refs/heads/main
| 2023-02-11T21:02:03.784493
| 2021-01-03T10:07:07
| 2021-01-03T10:07:07
| 322,577,379
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 558
|
java
|
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import androidx.test.runner.AndroidJUnit4;
import org.easymock.EasyMock;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class TestCase_com_abvio_meter_cycle_1674603422 {
@Test
public void testCase() throws Exception {
Object var2 = EasyMock.createMock(SensorEventListener.class);
Object var1 = EasyMock.createMock(SensorEvent.class);
((SensorEventListener)var2).onSensorChanged((SensorEvent)var1);
}
}
|
[
"sunxiaobiu@gmail.com"
] |
sunxiaobiu@gmail.com
|
2774fb9a26fb15c7716c0ecaa8b4984309b70c81
|
64b008ca7d2f2291e7a0094a3f9f22db48099168
|
/android/versioned-abis/expoview-abi37_0_0/src/main/java/abi37_0_0/host/exp/exponent/modules/api/components/maps/AirMapCircleManager.java
|
6415f49ffc0aa88db9c6f2ca92d9a0631f5a16c0
|
[
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
kojoYeboah53i/expo
|
bb971d566cd54750030dc431030a8d3045adff82
|
75d1b44ed4c4bbd05d7ec109757a017628c43415
|
refs/heads/master
| 2021-05-19T04:19:26.747650
| 2020-03-31T05:05:26
| 2020-03-31T05:05:26
| 251,520,515
| 5
| 0
|
NOASSERTION
| 2020-03-31T06:37:14
| 2020-03-31T06:37:13
| null |
UTF-8
|
Java
| false
| false
| 2,430
|
java
|
package abi37_0_0.host.exp.exponent.modules.api.components.maps;
import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.util.DisplayMetrics;
import android.view.WindowManager;
import abi37_0_0.com.facebook.react.bridge.ReactApplicationContext;
import abi37_0_0.com.facebook.react.bridge.ReadableMap;
import abi37_0_0.com.facebook.react.uimanager.ThemedReactContext;
import abi37_0_0.com.facebook.react.uimanager.ViewGroupManager;
import abi37_0_0.com.facebook.react.uimanager.annotations.ReactProp;
import com.google.android.gms.maps.model.LatLng;
public class AirMapCircleManager extends ViewGroupManager<AirMapCircle> {
private final DisplayMetrics metrics;
public AirMapCircleManager(ReactApplicationContext reactContext) {
super();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
metrics = new DisplayMetrics();
((WindowManager) reactContext.getSystemService(Context.WINDOW_SERVICE))
.getDefaultDisplay()
.getRealMetrics(metrics);
} else {
metrics = reactContext.getResources().getDisplayMetrics();
}
}
@Override
public String getName() {
return "AIRMapCircle";
}
@Override
public AirMapCircle createViewInstance(ThemedReactContext context) {
return new AirMapCircle(context);
}
@ReactProp(name = "center")
public void setCenter(AirMapCircle view, ReadableMap center) {
view.setCenter(new LatLng(center.getDouble("latitude"), center.getDouble("longitude")));
}
@ReactProp(name = "radius", defaultDouble = 0)
public void setRadius(AirMapCircle view, double radius) {
view.setRadius(radius);
}
@ReactProp(name = "strokeWidth", defaultFloat = 1f)
public void setStrokeWidth(AirMapCircle view, float widthInPoints) {
float widthInScreenPx = metrics.density * widthInPoints; // done for parity with iOS
view.setStrokeWidth(widthInScreenPx);
}
@ReactProp(name = "fillColor", defaultInt = Color.RED, customType = "Color")
public void setFillColor(AirMapCircle view, int color) {
view.setFillColor(color);
}
@ReactProp(name = "strokeColor", defaultInt = Color.RED, customType = "Color")
public void setStrokeColor(AirMapCircle view, int color) {
view.setStrokeColor(color);
}
@ReactProp(name = "zIndex", defaultFloat = 1.0f)
public void setZIndex(AirMapCircle view, float zIndex) {
view.setZIndex(zIndex);
}
}
|
[
"eric@expo.io"
] |
eric@expo.io
|
ff4c7cf62d2b84d945b06343831006e58f512faa
|
60fd481d47bdcc768ebae0bd265fa9a676183f17
|
/xinyu-model/src/main/java/com/xinyu/model/base/SampleRule.java
|
47c3c98f7dd72219336874ac914f824369174f98
|
[] |
no_license
|
zilonglym/xinyu
|
3257d2d10187205c4f91efa4fed8e992a9419694
|
8828638b77e3e0f6da099f050476cf634ef84c7b
|
refs/heads/master
| 2020-03-09T16:49:34.758186
| 2018-03-27T06:52:46
| 2018-03-27T06:52:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,217
|
java
|
package com.xinyu.model.base;
import com.xinyu.model.common.Entity;
public class SampleRule extends Entity {
private static final long serialVersionUID = -2502468217457631122L;
private SnSample snSample;
/**
* 规则描述
*/
private String ruleDesc;
/**
* 规则正则表达式
*/
private String ruleRegularExpression;
/**
* 规则对应图面url
*/
private String ruleImgUrl;
/**
* 规则示例
*/
private String ruleSample;
public String getRuleDesc() {
return ruleDesc;
}
public void setRuleDesc(String ruleDesc) {
this.ruleDesc = ruleDesc;
}
public String getRuleRegularExpression() {
return ruleRegularExpression;
}
public void setRuleRegularExpression(String ruleRegularExpression) {
this.ruleRegularExpression = ruleRegularExpression;
}
public String getRuleImgUrl() {
return ruleImgUrl;
}
public void setRuleImgUrl(String ruleImgUrl) {
this.ruleImgUrl = ruleImgUrl;
}
public String getRuleSample() {
return ruleSample;
}
public void setRuleSample(String ruleSample) {
this.ruleSample = ruleSample;
}
public SnSample getSnSample() {
return snSample;
}
public void setSnSample(SnSample snSample) {
this.snSample = snSample;
}
}
|
[
"36021388+zhongcangVip@users.noreply.github.com"
] |
36021388+zhongcangVip@users.noreply.github.com
|
4d132a6e9d98c3c0258600b0f8fd94a01548aa84
|
bc557f4a6bc1f673f6013d20361a000fc7daac11
|
/android/app/src/main/java/com/citywithincity/ecard/discard/activities/DiscardInfoActivity.java
|
0550d5e16a09b300d93c5896cb886f225cbe172f
|
[] |
no_license
|
gxl244642529/ecard_realName
|
6ec14e5feb19dac70e8df1ea2e2fe6111a93b15c
|
23d9fd11d8a78196433681519c7dec479e2a809e
|
refs/heads/master
| 2021-04-09T10:17:42.834082
| 2018-03-16T09:41:04
| 2018-03-16T09:41:04
| 125,492,140
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,989
|
java
|
package com.citywithincity.ecard.discard.activities;
import android.os.Bundle;
import com.citywithincity.ecard.R;
import com.citywithincity.ecard.discard.vos.BookInfo;
import com.citywithincity.ecard.utils.ValidateUtil;
import com.citywithincity.interfaces.DialogListener;
import com.citywithincity.utils.Alert;
import com.citywithincity.utils.MessageUtil;
import com.damai.auto.DMFragmentActivity;
import com.damai.helper.a.InitData;
import com.damai.http.api.a.JobSuccess;
import com.damai.widget.Form;
import com.damai.widget.FormRadioGroup;
import com.damai.widget.OnSubmitListener;
import com.damai.widget.SubmitButton;
import java.util.Map;
/**
* 申请优惠卡信息页面
* @author renxueliang
*
*/
public class DiscardInfoActivity extends DMFragmentActivity implements DialogListener, OnSubmitListener {
private SubmitButton button;
@InitData
private BookInfo info;
/**
*
* @param savedInstanceState
*/
protected void onSetContent(Bundle savedInstanceState) {
setContentView(R.layout.activity_discard_info);
setTitle("填写申请信息");
button = (SubmitButton) findViewById(R.id.submit);
button.setOnSubmitListener(this);
}
/**
* 提交成功之后
*/
@JobSuccess("book/submitInfo")
public void onSubmitSuccess(Object value){
Alert.alert(this, "温馨提示","业务受理成功,请于2个工作日后登录完成办理",this);
}
@Override
public void onDialogButton(int id) {
finish();
}
@Override
public boolean shouldSubmit(Form formView, Map<String, Object> data) {
String name = (String) data.get("name");
if(!ValidateUtil.isChinese(name)){
Alert.alert(this,"请输入中文姓名");
return false;
}
data.put("status", info.getStatus());
data.put("type", info.getType());
data.put("savType", info.getSavType());
data.put("cardId", info.getCardId());
data.put("custNo", info.getCustNo());
data.put("idCardType", 0);
return true;
}
}
|
[
"244642529@qq.com"
] |
244642529@qq.com
|
b0b2cb0d5b873d8485aab53575b350ffe95c0ddc
|
89d1a94dfbf81918b02ffbc90f1d897242b64801
|
/Sea Battle Client/src/main/java/ir/sharif/math/ap99_2/sea_battle/client/controller/MainController.java
|
7ab026acbcac9ab788629723f30a3527ca65615d
|
[] |
no_license
|
MrSalahshour/Sea-Battle
|
d3515050bbedf6ce740b8efab0eadf00c9c8a8eb
|
383c7ca4771f95af66bbd6b0d18806877898523a
|
refs/heads/main
| 2023-07-15T18:05:39.432291
| 2021-08-28T14:47:00
| 2021-08-28T14:47:00
| 400,813,224
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,450
|
java
|
package ir.sharif.math.ap99_2.sea_battle.client.controller;
import ir.sharif.math.ap99_2.sea_battle.client.listener.EventSender;
import ir.sharif.math.ap99_2.sea_battle.client.view.GraphicalAgent;
import ir.sharif.math.ap99_2.sea_battle.client.view.PanelType;
import ir.sharif.math.ap99_2.sea_battle.client.view.panel.GamePanel;
import ir.sharif.math.ap99_2.sea_battle.client.view.panel.LiveGameDetailPanel;
import ir.sharif.math.ap99_2.sea_battle.client.view.panel.LiveGameListPanel;
import ir.sharif.math.ap99_2.sea_battle.shared.events.Event;
import ir.sharif.math.ap99_2.sea_battle.shared.model.Board;
import ir.sharif.math.ap99_2.sea_battle.shared.model.GameDetail;
import ir.sharif.math.ap99_2.sea_battle.shared.response.Response;
import ir.sharif.math.ap99_2.sea_battle.shared.response.ResponseVisitor;
import ir.sharif.math.ap99_2.sea_battle.shared.util.Loop;
import javax.swing.*;
import java.util.*;
public class MainController implements ResponseVisitor {
private final EventSender eventSender;
private final List<Event> events;
private final Loop loop;
private final GraphicalAgent graphicalAgent;
public MainController(EventSender eventSender) {
this.eventSender = eventSender;
this.events = new LinkedList<>();
this.loop = new Loop(10, this::sendEvents);
this.graphicalAgent = new GraphicalAgent(this::addEvent);
}
public void start() {
loop.start();
Loop updater = new Loop(2, this::update);
updater.start();
}
private void addEvent(Event event) {
synchronized (events) {
events.add(event);
}
}
private void sendEvents() {
List<Event> temp;
synchronized (events) {
temp = new LinkedList<>(events);
events.clear();
}
for (Event event : temp) {
Response response = eventSender.send(event);
response.visit(this);
}
}
@Override
public void getProfile(String username, String score, String wins, String loses) {
graphicalAgent.goToProfile(username, score, wins, loses);
}
@Override
public void login(boolean success, String message) {
if(success)
graphicalAgent.goToMainMenu();
else
graphicalAgent.showMessage(message);
}
@Override
public void getScoreBoard(String scoreBoard) {
graphicalAgent.goToScoreBoard(scoreBoard);
}
@Override
public void showMessage(String message) {
graphicalAgent.showMessage(message);
}
@Override
public void visitBoards(Board playerBoard, Board opponentBoard) {
graphicalAgent.gotoGamePanel(playerBoard,opponentBoard);
}
@Override
public void setGameDetail(String playerTimer) {
if (graphicalAgent.getNow() == PanelType.GAME_PANEL){
GamePanel gamePanel = (GamePanel) graphicalAgent.getPanels().get(PanelType.GAME_PANEL);
gamePanel.setTimerLabelText(playerTimer);
gamePanel.revalidate();
gamePanel.repaint();
}
}
@Override
public void BackToMainMenu(String message) {
graphicalAgent.backToMainMenuFromGame();
JOptionPane.showMessageDialog(null,message);
}
@Override
public void setLiveGamesList(LinkedList<GameDetail> gameDetailsList) {
graphicalAgent.goToWatchGameList();
LiveGameListPanel liveGameListPanel = (LiveGameListPanel) graphicalAgent.getPanels().get(PanelType.WATCH_GAME_LIST);
liveGameListPanel.resetPanel();
for (GameDetail gameDetail: gameDetailsList) {
LiveGameDetailPanel liveGameDetailPanel = new LiveGameDetailPanel(graphicalAgent.getEventListener());
liveGameDetailPanel.setPlayer1Name(gameDetail.getPlayer1Name());
liveGameDetailPanel.setPlayer2Name(gameDetail.getPlayer2Name());
liveGameDetailPanel.setPlayer1Moves("Moves: "+gameDetail.getPlayer1Moves());
liveGameDetailPanel.setPlayer2Moves("Moves: "+gameDetail.getPlayer2Moves());
liveGameDetailPanel.setPlayer1HitShips("Hit Ships: "+ gameDetail.getPlayer1HitShips());
liveGameDetailPanel.setPlayer2HitShips("Hit Ships: "+ gameDetail.getPlayer2HitShips());
liveGameDetailPanel.setPlayer1SuccessfulBombs("Successful Bombs: "+gameDetail.getPlayer1SuccessfulBombs());
liveGameDetailPanel.setPlayer2SuccessfulBombs("Successful Bombs: "+gameDetail.getPlayer2SuccessfulBombs());
liveGameDetailPanel.revalidate();
liveGameDetailPanel.repaint();
liveGameListPanel.addToList(liveGameDetailPanel);
}
}
@Override
public void voidAction() {
}
@Override
public void watchGame(String player1Name,String player2Name, Board player1Board, Board player2Board) {
graphicalAgent.setPlayer1NameWatchingGame(player1Name);
graphicalAgent.setPlayer2NameWatchingGame(player2Name);
graphicalAgent.goToWatchGamePanel(player1Board,player2Board,player1Name,player2Name);
}
private void update(){
if (graphicalAgent.getPanels().containsKey(PanelType.GAME_PANEL)){
GamePanel gamePanel = (GamePanel) graphicalAgent.getPanels().get(PanelType.GAME_PANEL);
graphicalAgent.update(gamePanel.getPlayerBoardPanel() != null);
}
else {
graphicalAgent.update(false);
}
}
}
|
[
"salahshour80mahdi@gmail.com"
] |
salahshour80mahdi@gmail.com
|
4513fe33c93b206f82f697b8f8b3ea086d77087c
|
29e6f769e937401e20fbc1f8a7b71dd9f2584339
|
/sssp/src/main/java/com/hfm/server/impl/DepartmentServerImpl.java
|
29eeb89befa3d537aab0f6c2660acaeb6ce83059
|
[] |
no_license
|
hfming/java_ee
|
0dc57d080a43386d4fcaea3de5f770b4b7791cc6
|
e18957c9a69705f2a1f81bd004577dfaafdacd7e
|
refs/heads/master
| 2023-08-31T05:38:21.817110
| 2021-10-24T13:56:15
| 2021-10-24T13:56:15
| 312,496,780
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 741
|
java
|
package com.hfm.server.impl;
import com.hfm.dao.DepartmentDao;
import com.hfm.domain.Department;
import com.hfm.server.DepartmentServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* @author hfming2016@163.com
* @version 1.01 2020-10-17 9:56
* @Description
* @date 2020/10/17
*/
@Service(value = "departmentServer")
public class DepartmentServerImpl implements DepartmentServer {
@Autowired
private DepartmentDao departmentDao;
@Override
@Transactional(readOnly = true)
public List<Department> findAll() {
return departmentDao.findAll();
}
}
|
[
"hfming2016@163.com"
] |
hfming2016@163.com
|
117adfa830f1733f375b50891be0dcf73163c8b4
|
cee07e9b756aad102d8689b7f0db92d611ed5ab5
|
/src_6/org/benf/cfr/tests/Tower6.java
|
a312d8659cb61a72931f1156e77f67bf9e4bff68
|
[
"MIT"
] |
permissive
|
leibnitz27/cfr_tests
|
b85ab71940ae13fbea6948a8cc168b71f811abfd
|
b3aa4312e3dc0716708673b90cc0a8399e5f83e2
|
refs/heads/master
| 2022-09-04T02:45:26.282511
| 2022-08-11T06:14:39
| 2022-08-11T06:14:39
| 184,790,061
| 11
| 5
|
MIT
| 2022-02-24T07:07:46
| 2019-05-03T16:49:01
|
Java
|
UTF-8
|
Java
| false
| false
| 528
|
java
|
package org.benf.cfr.tests;
class Tower6 {
void test(final String[] args) {
if (args.length == 1) {
class Height {
void test() {
System.out.println(args.length);
}
}
;
new Height().test();
} else {
class Height {
void test() {
System.out.println("CHEEEEESE");
}
}
;
new Height().test();
}
}
}
|
[
"lee@benf.org"
] |
lee@benf.org
|
88badec14369b782368802f7148ef9bff32f48b5
|
4277f4cf6dbace9c7743d1cd280e61789f6f96a1
|
/java/com/polis/gameserver/model/events/impl/item/OnItemBypassEvent.java
|
0cc9f8235f89954e6bb77b7e8dd593b328908a77
|
[] |
no_license
|
polis77/polis_server_h5
|
cad220828de29e5b5a2267e2870095145d56179d
|
7e8789baa7255065962b5fdaa1aa7f379d74ff84
|
refs/heads/master
| 2021-01-23T21:53:34.935991
| 2017-02-25T07:35:03
| 2017-02-25T07:35:03
| 83,112,850
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,638
|
java
|
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.polis.gameserver.model.events.impl.item;
import com.polis.gameserver.model.actor.instance.L2PcInstance;
import com.polis.gameserver.model.events.EventType;
import com.polis.gameserver.model.events.impl.IBaseEvent;
import com.polis.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnItemBypassEvent implements IBaseEvent
{
private final L2ItemInstance _item;
private final L2PcInstance _activeChar;
private final String _event;
public OnItemBypassEvent(L2ItemInstance item, L2PcInstance activeChar, String event)
{
_item = item;
_activeChar = activeChar;
_event = event;
}
public L2ItemInstance getItem()
{
return _item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public String getEvent()
{
return _event;
}
@Override
public EventType getType()
{
return EventType.ON_ITEM_BYPASS_EVENT;
}
}
|
[
"policelazo@gmail.com"
] |
policelazo@gmail.com
|
0b7ffe8eac47dbe3a582f803c99256280492dc50
|
97e8970383c75a31a7b35cea202f17809ac9f980
|
/com/google/android/exoplayer2/upstream/PriorityDataSourceFactory.java
|
84186a83219163e77f884ea05db6e0868ca87b94
|
[] |
no_license
|
tgapps/android
|
27116d389c48bd3a55804c86e9a7c2e0cf86a86c
|
d061b97e4bb0f532cc141ac5021e3329f4214202
|
refs/heads/master
| 2018-11-13T20:41:30.297252
| 2018-09-03T16:09:46
| 2018-09-03T16:09:46
| 113,666,719
| 9
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 824
|
java
|
package com.google.android.exoplayer2.upstream;
import com.google.android.exoplayer2.upstream.DataSource.Factory;
import com.google.android.exoplayer2.util.PriorityTaskManager;
public final class PriorityDataSourceFactory implements Factory {
private final int priority;
private final PriorityTaskManager priorityTaskManager;
private final Factory upstreamFactory;
public PriorityDataSourceFactory(Factory upstreamFactory, PriorityTaskManager priorityTaskManager, int priority) {
this.upstreamFactory = upstreamFactory;
this.priorityTaskManager = priorityTaskManager;
this.priority = priority;
}
public PriorityDataSource createDataSource() {
return new PriorityDataSource(this.upstreamFactory.createDataSource(), this.priorityTaskManager, this.priority);
}
}
|
[
"telegram@daniil.it"
] |
telegram@daniil.it
|
ced28a190151c18d27e5ddb7535f0bbbefc4c24c
|
caf5264de3dfe64b0d02736d3608dcbfdb494468
|
/app/src/main/java/org/jboss/hal/client/skeleton/ToastNotifications.java
|
8807b8f51a78ef174ccd605cdc4d0894ca5cc02f
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
spriadka/console
|
284ca236801edd276e20d5cb7180368f13e4f68d
|
0500040a7e554b271c1f7a34473a6971ccb14614
|
refs/heads/master
| 2022-11-26T17:20:13.231332
| 2018-08-13T11:34:20
| 2018-08-13T11:34:20
| 144,987,454
| 0
| 0
|
Apache-2.0
| 2018-08-16T12:53:20
| 2018-08-16T12:53:20
| null |
UTF-8
|
Java
| false
| false
| 4,427
|
java
|
/*
* Copyright 2015-2016 Red Hat, Inc, and individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.hal.client.skeleton;
import java.util.HashMap;
import java.util.Map;
import elemental2.dom.Element;
import elemental2.dom.HTMLElement;
import org.jboss.gwt.elemento.core.Elements;
import org.jboss.gwt.elemento.core.IsElement;
import org.jboss.hal.dmr.dispatch.Dispatcher;
import org.jboss.hal.resources.Ids;
import org.jboss.hal.resources.Resources;
import org.jboss.hal.spi.Message;
import org.jetbrains.annotations.NonNls;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static elemental2.dom.DomGlobal.clearTimeout;
import static elemental2.dom.DomGlobal.document;
import static elemental2.dom.DomGlobal.setTimeout;
import static org.jboss.gwt.elemento.core.Elements.div;
import static org.jboss.gwt.elemento.core.EventType.bind;
import static org.jboss.gwt.elemento.core.EventType.mouseout;
import static org.jboss.gwt.elemento.core.EventType.mouseover;
import static org.jboss.hal.resources.CSS.toastNotificationsListPf;
import static org.jboss.hal.resources.UIConstants.MESSAGE_TIMEOUT;
/**
* A container around the messages / toast notifications which are shown to the user in the upper right corner.
* Prevents overlapping of simultaneous messages and handles the mouse over / out events in order to pause the
* automatic fade out time.
*
* @see <a href="http://www.patternfly.org/pattern-library/communication/toast-notifications/">http://www.patternfly.org/pattern-library/communication/toast-notifications/</a>
*/
class ToastNotifications implements IsElement {
@NonNls private static final Logger logger = LoggerFactory.getLogger(Dispatcher.class);
private final Resources resources;
private final Map<String, Double> messageIds;
private final Map<Long, Message> stickyMessages;
private final HTMLElement root;
ToastNotifications(Resources resources) {
this.resources = resources;
this.messageIds = new HashMap<>();
this.stickyMessages = new HashMap<>();
this.root = div().css(toastNotificationsListPf).asElement();
document.body.appendChild(root);
}
@Override
public HTMLElement asElement() {
return root;
}
void add(Message message) {
if (message.isSticky() && containsStickyMessage(message)) {
logger.debug("Swallow sticky message {}. The same message is already open", message);
} else {
String id = Ids.uniqueId();
HTMLElement element = new ToastNotificationElement(this, message, resources).asElement();
element.id = id;
root.appendChild(element);
if (!message.isSticky()) {
startMessageTimeout(id);
bind(element, mouseover, e1 -> stopMessageTimeout(id));
bind(element, mouseout, e2 -> startMessageTimeout(id));
} else {
stickyMessages.put(message.getId(), message);
}
}
}
void close(Message message) {
if (message.isSticky()) {
stickyMessages.remove(message.getId());
logger.debug("Closed sticky message: {}", message);
}
}
private boolean containsStickyMessage(Message message) {
return stickyMessages.containsKey(message.getId());
}
private void startMessageTimeout(String id) {
double timeoutHandle = setTimeout((o) -> remove(id), MESSAGE_TIMEOUT);
messageIds.put(id, timeoutHandle);
}
private void stopMessageTimeout(String id) {
if (messageIds.containsKey(id)) {
clearTimeout(messageIds.get(id));
messageIds.remove(id);
}
}
private void remove(String id) {
Element element = document.getElementById(id);
Elements.failSafeRemove(root, element);
messageIds.remove(id);
}
}
|
[
"harald.pehl@gmail.com"
] |
harald.pehl@gmail.com
|
50a098d77724627cd32357a49937b050715a9236
|
95bca8b42b506860014f5e7f631490f321f51a63
|
/dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/CategoryOptionComboController.java
|
a2b3fea5d2678680fd9072bb9f292b08200d2ec2
|
[
"BSD-3-Clause"
] |
permissive
|
hispindia/HP-2.7
|
d5174d2c58423952f8f67d9846bec84c60dfab28
|
bc101117e8e30c132ce4992a1939443bf7a44b61
|
refs/heads/master
| 2022-12-25T04:13:06.635159
| 2020-09-29T06:32:53
| 2020-09-29T06:32:53
| 84,940,096
| 0
| 0
|
BSD-3-Clause
| 2022-12-15T23:53:32
| 2017-03-14T11:13:27
|
Java
|
UTF-8
|
Java
| false
| false
| 4,281
|
java
|
package org.hisp.dhis.api.controller;
/*
* Copyright (c) 2004-2011, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import org.hisp.dhis.api.utils.IdentifiableObjectParams;
import org.hisp.dhis.api.utils.WebLinkPopulator;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombos;
import org.hisp.dhis.dataelement.DataElementCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
* @author Morten Olav Hansen <mortenoh@gmail.com>
*/
@Controller
@RequestMapping( value = CategoryOptionComboController.RESOURCE_PATH )
public class CategoryOptionComboController
{
public static final String RESOURCE_PATH = "/categoryOptionCombos";
@Autowired
private DataElementCategoryService dataElementCategoryService;
//-------------------------------------------------------------------------------------------------------
// GET
//-------------------------------------------------------------------------------------------------------
@RequestMapping( method = RequestMethod.GET )
public String getCategoryOptionCombos( IdentifiableObjectParams params, Model model, HttpServletRequest request )
{
DataElementCategoryOptionCombos categoryOptionCombos = new DataElementCategoryOptionCombos();
categoryOptionCombos.setCategoryOptionCombos( new ArrayList<DataElementCategoryOptionCombo>( dataElementCategoryService.getAllDataElementCategoryOptionCombos() ) );
if ( params.hasLinks() )
{
WebLinkPopulator listener = new WebLinkPopulator( request );
listener.addLinks( categoryOptionCombos );
}
model.addAttribute( "model", categoryOptionCombos );
return "categoryOptionCombos";
}
@RequestMapping( value = "/{uid}", method = RequestMethod.GET )
public String getCategoryOptionCombo( @PathVariable( "uid" ) String uid, IdentifiableObjectParams params, Model model, HttpServletRequest request )
{
DataElementCategoryOptionCombo categoryOptionCombo = dataElementCategoryService.getDataElementCategoryOptionCombo( uid );
if ( params.hasLinks() )
{
WebLinkPopulator listener = new WebLinkPopulator( request );
listener.addLinks( categoryOptionCombo );
}
model.addAttribute( "model", categoryOptionCombo );
return "categoryOptionCombo";
}
}
|
[
"mithilesh.hisp@gmail.com"
] |
mithilesh.hisp@gmail.com
|
40c567f7b8ce578b4be66661c0ac7ee13babbbfc
|
f1bdf504e0be626dc3e3001c2de384d993c0fc48
|
/src/test/java/org/contentmine/norma/json/JsonPathTest.java
|
c3f956558c301c8363d8f865ccb7915c878b67c8
|
[
"Apache-2.0"
] |
permissive
|
anjackson/ami3
|
61cae21f2eca6b9906930eff08ca78b4b8246456
|
d58c8420ddd3cee07429738f4495499e1a850207
|
refs/heads/master
| 2021-05-17T23:13:04.884140
| 2020-06-09T21:50:50
| 2020-06-09T21:50:50
| 250,989,085
| 0
| 0
|
Apache-2.0
| 2020-06-09T21:50:51
| 2020-03-29T08:47:06
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,322
|
java
|
package org.contentmine.norma.json;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.FileUtils;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.contentmine.cproject.util.CMineUtil;
import org.contentmine.norma.NormaFixtures;
import org.junit.Test;
import com.jayway.jsonpath.JsonPath;
import com.jayway.jsonpath.ReadContext;
public class JsonPathTest {
private static final Logger LOG = Logger.getLogger(JsonPathTest.class);
static {
LOG.setLevel(Level.DEBUG);
}
@Test
public void testExample0() throws IOException {
String json = FileUtils.readFileToString(new File(NormaFixtures.TEST_JSON_DIR, "jsonpathExample.json"), CMineUtil.UTF8_CHARSET);
ReadContext ctx = JsonPath.parse(json);
List<String> authorsOfBooksWithISBN = ctx.read("$.store.book[?(@.isbn)].author");
for (String author : authorsOfBooksWithISBN) {
LOG.trace("auth >"+author);
}
List<Map<String, Object>> expensiveBooks = (List<Map<String, Object>>) JsonPath
// .using(configuration)
.parse(json)
.read("$.store.book[?(@.price > 10)]", List.class);
for (Map<String, Object> book : expensiveBooks) {
LOG.trace("book "+book);
}
}
}
|
[
"peter.murray.rust@googlemail.com"
] |
peter.murray.rust@googlemail.com
|
72395b633636fab573b58057f7ae3b59b7b1936f
|
1c6fe1c9ad917dc9dacaf03eade82d773ccf3c8a
|
/acm-module-dc1/src/main/java/com/wisdom/acm/dc1/config/WebConfiguration.java
|
6598568b22e86ce39c7dcf4f34118745d408d2d1
|
[
"Apache-2.0"
] |
permissive
|
daiqingsong2021/ord_project
|
332056532ee0d3f7232a79a22e051744e777dc47
|
a8167cee2fbdc79ea8457d706ec1ccd008f2ceca
|
refs/heads/master
| 2023-09-04T12:11:51.519578
| 2021-10-28T01:58:43
| 2021-10-28T01:58:43
| 406,659,566
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,037
|
java
|
package com.wisdom.acm.dc1.config;
import com.wisdom.auth.client.interceptor.ServiceAuthRestInterceptor;
import com.wisdom.auth.client.interceptor.UserAuthRestInterceptor;
import com.wisdom.base.common.handler.GlobalExceptionHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.util.ArrayList;
import java.util.Collections;
/**
*
*
*/
@Configuration("admimWebConfig")
@Primary
public class WebConfiguration implements WebMvcConfigurer {
@Bean
GlobalExceptionHandler getGlobalExceptionHandler() {
return new GlobalExceptionHandler();
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
// registry.addInterceptor(getServiceAuthRestInterceptor()).
// addPathPatterns(getIncludePathPatterns()).addPathPatterns("/api/user/validate");
registry.addInterceptor(getUserAuthRestInterceptor()).
addPathPatterns(getIncludePathPatterns());
}
@Bean
ServiceAuthRestInterceptor getServiceAuthRestInterceptor() {
return new ServiceAuthRestInterceptor();
}
@Bean
UserAuthRestInterceptor getUserAuthRestInterceptor() {
return new UserAuthRestInterceptor();
}
/**
* 需要用户和服务认证判断的路径
* @return
*/
private ArrayList<String> getIncludePathPatterns() {
ArrayList<String> list = new ArrayList<>();
String[] urls = {
// "/element/**",
// "/gateLog/**",
// "/group/**",
// "/groupType/**",
// "/menu/**",
// "/user/**",
"/api/permissions",
"/api/user/un/**"
};
Collections.addAll(list, urls);
return list;
}
}
|
[
"homeli@126.com"
] |
homeli@126.com
|
7110ff2fbac79d7d4a5a72884b74fa7b1f648df9
|
30045fb00c68306841ef742d583ec341b23c3121
|
/iwsc2017/decompile/tomcat/java/org/apache/catalina/valves/ExtendedAccessLogValve$11.java
|
8dc5bb7a1a23b05d5f0f4b4ff25062da39f0eeab
|
[] |
no_license
|
cragkhit/crjk-iwsc17
|
df9132738e88d6fe47c1963f32faa5a100d41299
|
a2915433fd2173e215b8e13e8fa0779bd5ccfe99
|
refs/heads/master
| 2021-01-13T15:12:15.553582
| 2016-12-12T16:13:07
| 2016-12-12T16:13:07
| 76,252,648
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 485
|
java
|
package org.apache.catalina.valves;
import org.apache.catalina.connector.Response;
import org.apache.catalina.connector.Request;
import java.util.Date;
import java.io.CharArrayWriter;
class ExtendedAccessLogValve$11 implements AccessLogElement {
@Override
public void addElement ( final CharArrayWriter buf, final Date date, final Request request, final Response response, final long time ) {
buf.append ( ExtendedAccessLogValve.wrap ( request.getLocale() ) );
}
}
|
[
"ucabagk@ucl.ac.uk"
] |
ucabagk@ucl.ac.uk
|
1c99fe39420714d115500e749aa00ca06c68b327
|
ca85b4da3635bcbea482196e5445bd47c9ef956f
|
/iexhub/src/main/java/org/hl7/v3/ROIOverlayShape.java
|
0d197105946617c92be036059af2ea57e878b101
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
bhits/iexhub-generated
|
c89a3a9bd127140f56898d503bc0c924d0398798
|
e53080ae15f0c57c8111a54d562101d578d6c777
|
refs/heads/master
| 2021-01-09T05:59:38.023779
| 2017-02-01T13:30:19
| 2017-02-01T13:30:19
| 80,863,998
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,816
|
java
|
/*******************************************************************************
* Copyright (c) 2015, 2016 Substance Abuse and Mental Health Services Administration (SAMHSA)
*
* 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.
*
* Contributors:
* Eversolve, LLC - initial IExHub implementation for Health Information Exchange (HIE) integration
* Anthony Sute, Ioana Singureanu
*******************************************************************************/
package org.hl7.v3;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ROIOverlayShape.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="ROIOverlayShape">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="CIRCLE"/>
* <enumeration value="ELLIPSE"/>
* <enumeration value="POINT"/>
* <enumeration value="POLY"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "ROIOverlayShape")
@XmlEnum
public enum ROIOverlayShape {
CIRCLE,
ELLIPSE,
POINT,
POLY;
public String value() {
return name();
}
public static ROIOverlayShape fromValue(String v) {
return valueOf(v);
}
}
|
[
"michael.hadjiosif@feisystems.com"
] |
michael.hadjiosif@feisystems.com
|
537f4aa94b9ffcd4ea4624e6a5167eda0dd957ec
|
022980735384919a0e9084f57ea2f495b10c0d12
|
/src/ext-lltnxp/ext-service/src/com/sgs/portlet/field/service/PmlFieldServiceUtil.java
|
888878d4bb392ab61e7aed8db71a8dc0d02bc947
|
[] |
no_license
|
thaond/nsscttdt
|
474d8e359f899d4ea6f48dd46ccd19bbcf34b73a
|
ae7dacc924efe578ce655ddfc455d10c953abbac
|
refs/heads/master
| 2021-01-10T03:00:24.086974
| 2011-02-19T09:18:34
| 2011-02-19T09:18:34
| 50,081,202
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,067
|
java
|
package com.sgs.portlet.field.service;
/**
* <a href="PmlFieldServiceUtil.java.html"><b><i>View Source</i></b></a>
*
* <p>
* ServiceBuilder generated this class. Modifications in this class will be
* overwritten the next time is generated.
* </p>
*
* <p>
* This class provides static methods for the
* <code>com.sgs.portlet.field.service.PmlFieldService</code>
* bean. The static methods of this class calls the same methods of the bean
* instance. It's convenient to be able to just write one line to call a method
* on a bean instead of writing a lookup call and a method call.
* </p>
*
* @author Brian Wing Shun Chan
*
* @see com.sgs.portlet.field.service.PmlFieldService
*
*/
public class PmlFieldServiceUtil {
private static PmlFieldService _service;
public static PmlFieldService getService() {
if (_service == null) {
throw new RuntimeException("PmlFieldService is not set");
}
return _service;
}
public void setService(PmlFieldService service) {
_service = service;
}
}
|
[
"nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e"
] |
nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e
|
52efc9a2b35f3e506a92f6192b37c3e3f26d0443
|
331b92d356ec368a6217e7aa15724acacd162ff5
|
/src/main/java/com/smalaca/rentalapplication/domain/apartmentoffer/ApartmentOffer.java
|
68b1c6df37c80166d4e4a967a8ce397345908ad1
|
[] |
no_license
|
smalaca/clean-arch-3-6-3
|
90eb01f1dad8cf808ce2f431dc474ec690d51736
|
43a4038bfe9d3f108e5a7a74a85bbb6eaff8a29f
|
refs/heads/master
| 2023-02-11T17:00:25.347930
| 2021-01-08T22:25:09
| 2021-01-08T22:25:09
| 328,379,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,603
|
java
|
package com.smalaca.rentalapplication.domain.apartmentoffer;
import java.math.BigDecimal;
import java.time.LocalDate;
@SuppressWarnings("PMD.UnusedPrivateField")
public class ApartmentOffer {
private final String apartmentId;
private final Money money;
private final ApartmentAvailability availability;
private ApartmentOffer(String apartmentId, Money money, ApartmentAvailability availability) {
this.apartmentId = apartmentId;
this.money = money;
this.availability = availability;
}
public static class Builder {
private String apartmentId;
private BigDecimal price;
private LocalDate start;
private LocalDate end;
private Builder() {}
public static Builder apartmentOffer() {
return new Builder();
}
public Builder withApartmentId(String apartmentId) {
this.apartmentId = apartmentId;
return this;
}
public Builder withPrice(BigDecimal price) {
this.price = price;
return this;
}
public Builder withAvailability(LocalDate start, LocalDate end) {
this.start = start;
this.end = end;
return this;
}
public ApartmentOffer build() {
return new ApartmentOffer(apartmentId, money(), availability());
}
private ApartmentAvailability availability() {
return ApartmentAvailability.of(start, end);
}
private Money money() {
return Money.of(price);
}
}
}
|
[
"ab13.krakow@gmail.com"
] |
ab13.krakow@gmail.com
|
850d6f0f6abadb95d42a71a6d14d5231c8565b30
|
41bc79f00440496ac693e296ccd9fa9d5f2550b8
|
/src/main/java/com/hendisantika/demoonetomany/service/EmployeeService.java
|
31cd567763023be1b8c3f3918fb2f644a6fedc43
|
[] |
no_license
|
dalalsunil1986/demo-one-to-many
|
331a1983b0eacb272819d4245283ca332355d9ed
|
78b6c0f1abeff926a17b805cda30e3ec5df68df4
|
refs/heads/master
| 2020-06-16T14:02:30.591784
| 2018-09-13T00:08:44
| 2018-09-13T00:08:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,943
|
java
|
package com.hendisantika.demoonetomany.service;
import com.hendisantika.demoonetomany.domain.Department;
import com.hendisantika.demoonetomany.domain.Employee;
import com.hendisantika.demoonetomany.repository.DepartmentRepository;
import com.hendisantika.demoonetomany.repository.EmployeeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Created by IntelliJ IDEA.
* Project : demo-one-to-many
* User: hendisantika
* Email: hendisantika@gmail.com
* Telegram : @hendisantika34
* Date: 21/11/17
* Time: 05.43
* To change this template use File | Settings | File Templates.
*/
@Service
public class EmployeeService {
@Autowired
private EmployeeRepository employeeRepository;
@Autowired
private DepartmentRepository departmentRepository;
public Object list() {
return employeeRepository.findAll();
}
public Employee save(Employee employee) {
employee.getAddress().setEmployee(employee);
Department department = departmentRepository.findOne(employee.getDepartment().getId());
employee.setDepartment(department);
return employeeRepository.save(employee);
}
public Employee get(long id) {
return employeeRepository.findById(id);
}
public Employee update(Employee employee) {
Employee old = employeeRepository.findById(employee.getId());
old.setName(employee.getName());
old.setEmail(employee.getEmail());
old.setPassword(employee.getPassword());
old.getAddress().setAddress(employee.getAddress().getAddress());
employee = employeeRepository.save(old);
return employee;
}
public void delete(long id) {
employeeRepository.delete(id);
}
public List<Employee> list(long departmentId) {
return employeeRepository.findByDepartmentId(departmentId);
}
}
|
[
"hendisantika@gmail.com"
] |
hendisantika@gmail.com
|
ff1dec036a1812eb6922200d572a71bc55117c2b
|
dfa46dd73ac209d46a87f49f314614538d209df7
|
/src/main/java/com/lyb/client/processor/impl/Processor_1006_27.java
|
ee24498247b54a545e04efca4db90d1b8363e27c
|
[] |
no_license
|
safziy/lyb_client
|
a580fb596bc9d3b91db9d1d8d2166d480c31e746
|
b2842186f63136309ddd150837352cf63cfb5b9a
|
refs/heads/master
| 2020-12-31T04:28:49.347905
| 2016-01-15T09:28:15
| 2016-01-15T09:28:15
| 45,508,000
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 442
|
java
|
package com.lyb.client.processor.impl;
import com.lyb.client.manager.PlayerManager;
import com.lyb.client.processor.*;
import com.lyb.client.message.protocol.*;
/**
* 返回 卡牌换装信息
*
* @author codeGenerator
*
*/
public class Processor_1006_27 extends IMessageProcessor<Message_1006_27> {
@Override
public void execute(PlayerManager playerManager, Message_1006_27 message) throws Exception {
}
}
|
[
"787395455@qq.com"
] |
787395455@qq.com
|
9ad9641bd970cc9f1673768f9abe798c16352d5e
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2006-12-04/seasar2-2.4.6/s2-framework/src/main/java/org/seasar/framework/unit/UnitClassLoader.java
|
2c3bd5a3d9675d924c389b9aa727233465586a93
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 887
|
java
|
/*
* Copyright 2004-2006 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.framework.unit;
/**
* @author higa
*
*/
public class UnitClassLoader extends ClassLoader {
/**
* @param parent
*/
public UnitClassLoader(ClassLoader parent) {
super(parent);
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
346d460089b1b044e841092953eadb131836479f
|
94a493f23f894087cec59c82b2a153fd10f6d1dc
|
/app/src/main/java/com/tbx/user/SecuraEx/UndeliveredStatusPOJO/UndeliveredBean.java
|
319dea185750209285f5785f855120f1be217882
|
[] |
no_license
|
mukulraw/Wfm
|
dfc375b0a17c691d598eea3f3a3bd821ce7a0769
|
2db564e4e81689e31dc8c9d0ca452f7986bbf010
|
refs/heads/master
| 2021-09-02T04:02:33.987203
| 2017-12-30T06:10:28
| 2017-12-30T06:10:28
| 112,330,902
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 900
|
java
|
package com.tbx.user.SecuraEx.UndeliveredStatusPOJO;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* Created by USER on 11/30/2017.
*/
public class UndeliveredBean {
@SerializedName("status")
@Expose
private String status;
@SerializedName("message")
@Expose
private String message;
@SerializedName("data")
@Expose
private List<Datum> data = null;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public List<Datum> getData() {
return data;
}
public void setData(List<Datum> data) {
this.data = data;
}
}
|
[
"mukulraw199517@gmail.com"
] |
mukulraw199517@gmail.com
|
938fca01128e85e64b80a5ccc3a8f6d02e811f9e
|
f74dda34e6cc6927eda15e1720db189cd6345fc1
|
/src/test/java/week07d03/senior/DateTest.java
|
dd1d9bf84e487408b33749353126f066b9f47ee3
|
[] |
no_license
|
Chris781231/training-solutions
|
fdd350587651c630b7ccdf9f9e0e4e687bcf4dfc
|
2318868503c2d2e01e45723cb66ee29ef6130e28
|
refs/heads/master
| 2023-04-25T04:30:07.158038
| 2021-05-20T10:53:42
| 2021-05-20T10:53:42
| 308,551,398
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 557
|
java
|
package week07d03.senior;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class DateTest {
Date date = Date.of(2020, 12, 31);
@Test
void dateTest() {
assertEquals(2020, date.getYear());
assertEquals(12, date.getMonth());
assertEquals(31, date.getDay());
}
@Test
void withYearTest() {
assertEquals(2021, date.withYear(2021).getYear());
assertEquals(9, date.withMonth(9).getMonth());
assertEquals(1, date.withDay(1).getDay());
}
}
|
[
"ligeti.karoly78@gmail.com"
] |
ligeti.karoly78@gmail.com
|
0a47adae319cf3da37088c74ccc01e5831324906
|
e63363389e72c0822a171e450a41c094c0c1a49c
|
/Mate20_9_0_0/src/main/java/com/android/okhttp/okio/Segment.java
|
6f4fca2dc2444b5fdfe7e4c35754cd558baeba6a
|
[] |
no_license
|
solartcc/HwFrameWorkSource
|
fc23ca63bcf17865e99b607cc85d89e16ec1b177
|
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
|
refs/heads/master
| 2022-12-04T21:14:37.581438
| 2020-08-25T04:30:43
| 2020-08-25T04:30:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,718
|
java
|
package com.android.okhttp.okio;
final class Segment {
static final int SIZE = 8192;
final byte[] data;
int limit;
Segment next;
boolean owner;
int pos;
Segment prev;
boolean shared;
Segment() {
this.data = new byte[SIZE];
this.owner = true;
this.shared = false;
}
Segment(Segment shareFrom) {
this(shareFrom.data, shareFrom.pos, shareFrom.limit);
shareFrom.shared = true;
}
Segment(byte[] data, int pos, int limit) {
this.data = data;
this.pos = pos;
this.limit = limit;
this.owner = false;
this.shared = true;
}
public Segment pop() {
Segment result = this.next != this ? this.next : null;
this.prev.next = this.next;
this.next.prev = this.prev;
this.next = null;
this.prev = null;
return result;
}
public Segment push(Segment segment) {
segment.prev = this;
segment.next = this.next;
this.next.prev = segment;
this.next = segment;
return segment;
}
public Segment split(int byteCount) {
if (byteCount <= 0 || byteCount > this.limit - this.pos) {
throw new IllegalArgumentException();
}
Segment prefix = new Segment(this);
prefix.limit = prefix.pos + byteCount;
this.pos += byteCount;
this.prev.push(prefix);
return prefix;
}
public void compact() {
if (this.prev == this) {
throw new IllegalStateException();
} else if (this.prev.owner) {
int byteCount = this.limit - this.pos;
if (byteCount <= (8192 - this.prev.limit) + (this.prev.shared ? 0 : this.prev.pos)) {
writeTo(this.prev, byteCount);
pop();
SegmentPool.recycle(this);
}
}
}
public void writeTo(Segment sink, int byteCount) {
if (sink.owner) {
if (sink.limit + byteCount > SIZE) {
if (sink.shared) {
throw new IllegalArgumentException();
} else if ((sink.limit + byteCount) - sink.pos <= SIZE) {
System.arraycopy(sink.data, sink.pos, sink.data, 0, sink.limit - sink.pos);
sink.limit -= sink.pos;
sink.pos = 0;
} else {
throw new IllegalArgumentException();
}
}
System.arraycopy(this.data, this.pos, sink.data, sink.limit, byteCount);
sink.limit += byteCount;
this.pos += byteCount;
return;
}
throw new IllegalArgumentException();
}
}
|
[
"lygforbs0@gmail.com"
] |
lygforbs0@gmail.com
|
4630bd5c3f7b9afb79252cdae47917ba91751e11
|
54907a45fd6990adf2029b034d5c1633c7b6cfe7
|
/src/main/java/com/ibaixiong/bbs/dao/BbsFormDao.java
|
c198da7c1bec21624f800148469cb154692963b8
|
[] |
no_license
|
hansq-rokey/h10
|
46b058331b8fb71e2adfeff814a78faca67e7f51
|
02968304636f3556ee971fced5cb4467b3387ac7
|
refs/heads/master
| 2021-01-23T01:46:23.122468
| 2017-03-24T09:52:22
| 2017-03-24T09:52:22
| 85,933,539
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 423
|
java
|
package com.ibaixiong.bbs.dao;
import java.util.List;
import com.ibaixiong.entity.BbsForm;
public interface BbsFormDao {
Long deleteByPrimaryKey(Long id);
Long insertSelective(BbsForm record);
BbsForm selectByPrimaryKey(Long id);
Long updateByPrimaryKeySelective(BbsForm record);
List<BbsForm> getFormByParentId(Long parentId);
List<BbsForm> queryAll();
BbsForm getFormByPerTag(String perTag);
}
|
[
"hanshuaiqi@ibaixiong.com"
] |
hanshuaiqi@ibaixiong.com
|
b7bc572900471809dd41af7dcee27924cb9e2ff7
|
06cb56e1fdd230f6994671297536c733d3993326
|
/app/src/main/java/com/jiang/dlj/dialog/Choose_Run_State_Dialog.java
|
85eca8f139fa62e6bc264e7a48827d87a2474b19
|
[] |
no_license
|
jiangadmin/DLJ
|
040338ef70d54ac818ce67e82bfe3ced1d5b8a24
|
6667bcd360ebd53277b41f775c98c02a3189e277
|
refs/heads/master
| 2020-03-28T20:10:10.083522
| 2018-10-15T15:04:04
| 2018-10-15T15:04:04
| 149,045,971
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,985
|
java
|
package com.jiang.dlj.dialog;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
import com.jiang.dlj.R;
import com.jiang.dlj.utils.LogUtil;
/**
* @author: jiangyao
* @date: 2017/11/30.
* @Email: www.fangmu@qq.com
* @Phone: 186 6120 1018
* TODO: 运行状态
*/
public class Choose_Run_State_Dialog extends Dialog implements View.OnClickListener {
private static final String TAG = "Base_Dialog";
Button state_0, state_1, state_2, esc;
TextView textView;
public Choose_Run_State_Dialog(@NonNull Context context,TextView textView1) {
super(context, R.style.myDialogTheme);
textView =textView1;
try {
show();
} catch (Exception e) {
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}
//把状态栏设置为透明
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
//透明状态栏
window.setStatusBarColor(Color.TRANSPARENT);
}
setContentView(R.layout.dialog_run_state);
initview();
}
private void initview() {
state_0 = findViewById(R.id.dialog_run_state_0);
state_1 = findViewById(R.id.dialog_run_state_1);
state_2 = findViewById(R.id.dialog_run_state_2);
esc = findViewById(R.id.dialog_esc);
esc.setOnClickListener(this);
state_0.setOnClickListener(this);
state_1.setOnClickListener(this);
state_2.setOnClickListener(this);
}
@Override
public void onClick(View view) {
switch (view.getId()){
case R.id.dialog_run_state_0:
textView.setText("运行");
break;
case R.id.dialog_run_state_1:
textView.setText("检修");
break;
case R.id.dialog_run_state_2:
textView.setText("停运");
break;
}
dismiss();
}
}
|
[
"www.fangmu@qq.com"
] |
www.fangmu@qq.com
|
b73580f914fe1c3b90cd48359ef9a39b7ff3f6bd
|
c30d4f174a28aac495463f44b496811ee0c21265
|
/platform/platform-impl/src/com/intellij/openapi/editor/actions/MoveCaretLeftOrRightWithSelectionHandler.java
|
3b71e4ebefabf55a843da5e77dc1dbe69ed74074
|
[
"Apache-2.0"
] |
permissive
|
sarvex/intellij-community
|
cbbf08642231783c5b46ef2d55a29441341a03b3
|
8b8c21f445550bd72662e159ae715e9d944ba140
|
refs/heads/master
| 2023-05-14T14:32:51.014859
| 2023-05-01T06:59:21
| 2023-05-01T06:59:21
| 32,571,446
| 0
| 0
|
Apache-2.0
| 2023-05-01T06:59:22
| 2015-03-20T08:16:17
|
Java
|
UTF-8
|
Java
| false
| false
| 2,518
|
java
|
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* 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.intellij.openapi.editor.actions;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.editor.Caret;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.VisualPosition;
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
import com.intellij.openapi.editor.ex.EditorSettingsExternalizable;
import com.intellij.openapi.keymap.impl.ModifierKeyDoubleClickHandler;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
class MoveCaretLeftOrRightWithSelectionHandler extends EditorActionHandler {
private final boolean myMoveRight;
MoveCaretLeftOrRightWithSelectionHandler(boolean moveRight) {
super(true);
myMoveRight = moveRight;
}
@Override
protected boolean isEnabledForCaret(@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) {
return !ModifierKeyDoubleClickHandler.getInstance().isRunningAction() ||
EditorSettingsExternalizable.getInstance().addCaretsOnDoubleCtrl();
}
@Override
protected void doExecute(Editor editor, @Nullable Caret caret, DataContext dataContext) {
assert caret != null;
VisualPosition currentPosition = caret.getVisualPosition();
if (caret.isAtBidiRunBoundary() && (myMoveRight ^ currentPosition.leansRight)) {
int selectionStartToUse = caret.getLeadSelectionOffset();
VisualPosition selectionStartPositionToUse = caret.getLeadSelectionPosition();
caret.moveToVisualPosition(currentPosition.leanRight(!currentPosition.leansRight));
caret.setSelection(selectionStartPositionToUse, selectionStartToUse, caret.getVisualPosition(), caret.getOffset());
}
else {
editor.getCaretModel().moveCaretRelatively(myMoveRight ? 1 : -1, 0, true, editor.isColumnMode(),
caret == editor.getCaretModel().getPrimaryCaret());
}
}
}
|
[
"Dmitry.Batrak@jetbrains.com"
] |
Dmitry.Batrak@jetbrains.com
|
b8964ae2cd05c51ea0b9840266fe1a088b30a64e
|
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
|
/src_fernflower/org/jfree/chart/labels/AbstractXYItemLabelGenerator.java
|
be1464059c11c4475795fdffc345d78c503edc2b
|
[] |
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
| 4,601
|
java
|
package org.jfree.chart.labels;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.MessageFormat;
import java.text.NumberFormat;
import java.util.Date;
import org.jfree.data.xy.XYDataset;
import org.jfree.util.ObjectUtilities;
public class AbstractXYItemLabelGenerator implements Serializable, Cloneable {
private static final long serialVersionUID = 5869744396278660636L;
private String formatString;
private NumberFormat xFormat;
private DateFormat xDateFormat;
private NumberFormat yFormat;
private DateFormat yDateFormat;
private String nullXString;
private String nullYString;
protected AbstractXYItemLabelGenerator() {
this("{2}", NumberFormat.getNumberInstance(), NumberFormat.getNumberInstance());
}
protected AbstractXYItemLabelGenerator(String var1, NumberFormat var2, NumberFormat var3) {
this.nullXString = "null";
this.nullYString = "null";
if(var1 == null) {
throw new IllegalArgumentException("Null \'formatString\' argument.");
} else if(var2 == null) {
throw new IllegalArgumentException("Null \'xFormat\' argument.");
} else if(var3 == null) {
throw new IllegalArgumentException("Null \'yFormat\' argument.");
} else {
this.formatString = var1;
this.xFormat = var2;
this.yFormat = var3;
}
}
protected AbstractXYItemLabelGenerator(String var1, DateFormat var2, NumberFormat var3) {
this(var1, NumberFormat.getInstance(), var3);
this.xDateFormat = var2;
}
protected AbstractXYItemLabelGenerator(String var1, NumberFormat var2, DateFormat var3) {
this(var1, var2, NumberFormat.getInstance());
this.yDateFormat = var3;
}
protected AbstractXYItemLabelGenerator(String var1, DateFormat var2, DateFormat var3) {
this(var1, NumberFormat.getInstance(), NumberFormat.getInstance());
this.xDateFormat = var2;
this.yDateFormat = var3;
}
public String getFormatString() {
return this.formatString;
}
public NumberFormat getXFormat() {
return this.xFormat;
}
public DateFormat getXDateFormat() {
return this.xDateFormat;
}
public NumberFormat getYFormat() {
return this.yFormat;
}
public DateFormat getYDateFormat() {
return this.yDateFormat;
}
public String generateLabelString(XYDataset var1, int var2, int var3) {
String var4 = null;
Object[] var5 = this.createItemArray(var1, var2, var3);
var4 = MessageFormat.format(this.formatString, var5);
return var4;
}
protected Object[] createItemArray(XYDataset var1, int var2, int var3) {
Object[] var4 = new Object[]{var1.getSeriesKey(var2).toString(), null, null};
double var5 = var1.getXValue(var2, var3);
if(Double.isNaN(var5) && var1.getX(var2, var3) == null) {
var4[1] = this.nullXString;
} else if(this.xDateFormat != null) {
var4[1] = this.xDateFormat.format(new Date((long)var5));
} else {
var4[1] = this.xFormat.format(var5);
}
double var7 = var1.getYValue(var2, var3);
if(Double.isNaN(var7) && var1.getY(var2, var3) == null) {
var4[2] = this.nullYString;
} else if(this.yDateFormat != null) {
var4[2] = this.yDateFormat.format(new Date((long)var7));
} else {
var4[2] = this.yFormat.format(var7);
}
return var4;
}
public boolean equals(Object var1) {
if(var1 == this) {
return true;
} else if(!(var1 instanceof AbstractXYItemLabelGenerator)) {
return false;
} else {
AbstractXYItemLabelGenerator var2 = (AbstractXYItemLabelGenerator)var1;
return !this.formatString.equals(var2.formatString)?false:(!ObjectUtilities.equal(this.xFormat, var2.xFormat)?false:(!ObjectUtilities.equal(this.xDateFormat, var2.xDateFormat)?false:(!ObjectUtilities.equal(this.yFormat, var2.yFormat)?false:ObjectUtilities.equal(this.yDateFormat, var2.yDateFormat))));
}
}
public Object clone() {
AbstractXYItemLabelGenerator var1 = (AbstractXYItemLabelGenerator)super.clone();
if(this.xFormat != null) {
var1.xFormat = (NumberFormat)this.xFormat.clone();
}
if(this.yFormat != null) {
var1.yFormat = (NumberFormat)this.yFormat.clone();
}
if(this.xDateFormat != null) {
var1.xDateFormat = (DateFormat)this.xDateFormat.clone();
}
if(this.yDateFormat != null) {
var1.yDateFormat = (DateFormat)this.yDateFormat.clone();
}
return var1;
}
}
|
[
"manouchehri@riseup.net"
] |
manouchehri@riseup.net
|
093f085bd273b4a3648c527cd03fc2c5448029b7
|
b9a64346604499d64fc479bf28fb0e2bd719739f
|
/DLG_ADNDROID/data/src/main/java/com/dlg/data/common/CommonSource.java
|
d029023f85df90eff31f076daf8f10098742edb3
|
[] |
no_license
|
wjy46925183/xxxx
|
41fcf83baa51c010df508e0bae35182f09cd8b39
|
cdfa27f895282be0f81e382dfaafcafd8153d40d
|
refs/heads/master
| 2020-12-02T21:09:48.997970
| 2017-07-05T01:54:33
| 2017-07-05T01:54:33
| 96,264,381
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,249
|
java
|
package com.dlg.data.common;
import com.dlg.data.cache.ObjectCache;
import com.dlg.data.common.interactor.CommonInteractor;
import com.dlg.data.common.model.ActionButtonsBean;
import com.dlg.data.common.model.ShareDataBean;
import com.dlg.data.common.url.CommonUrl;
import com.http.okgo.OkGo;
import java.util.HashMap;
import java.util.List;
import okhttp.rx.JsonConvert;
import okhttp.rx.JsonResponse;
import okhttp.rx.RxAdapter;
import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action1;
import rx.functions.Func1;
/**
* 作者:wangdakuan
* 主要功能:实现接口
* 创建时间:2017/6/23 10:03
*/
public class CommonSource implements CommonInteractor{
private final ObjectCache objectCache;
/**
*/
public CommonSource(ObjectCache objectCache) {
this.objectCache = objectCache;
}
private Action1<Object> saveToCacheAction(final String key) {
return new Action1<Object>() {
@Override
public void call(Object o) {
if (o != null) {
CommonSource.this.objectCache.put(o, key);
}
}
};
}
@Override
public Observable<ActionButtonsBean> getActionButtons(HashMap<String, String> hashMap) {
return OkGo.post(CommonUrl.GET_ACTION_BUTTONS)//
.params(hashMap)
.getCall(new JsonConvert<JsonResponse<List<ActionButtonsBean>>>() {
}, RxAdapter.<JsonResponse<List<ActionButtonsBean>>>create())
.map(new Func1<JsonResponse<List<ActionButtonsBean>>, ActionButtonsBean>() {
@Override
public ActionButtonsBean call(JsonResponse<List<ActionButtonsBean>> responses) {
if(null != responses && null != responses.getData()
&& responses.getData().size()>0){
return responses.getData().get(0);
}
return null;
}
})
// .doOnNext(saveToCacheAction(HomeUrl.TAB_HOME+ JSON.toJSONString(hashMap)))
.observeOn(AndroidSchedulers.mainThread());
}
@Override
public Observable<ShareDataBean> getShareData(HashMap<String, String> hashMap) {
return OkGo.post(CommonUrl.SHARE_DATA)//
.params(hashMap)
.getCall(new JsonConvert<JsonResponse<List<ShareDataBean>>>() {
}, RxAdapter.<JsonResponse<List<ShareDataBean>>>create())
.map(new Func1<JsonResponse<List<ShareDataBean>>, ShareDataBean>() {
@Override
public ShareDataBean call(JsonResponse<List<ShareDataBean>> responses) {
if(null != responses && null != responses.getData()
&& responses.getData().size()>0){
return responses.getData().get(0);
}
return null;
}
})
// .doOnNext(saveToCacheAction(HomeUrl.TAB_HOME+ JSON.toJSONString(hashMap)))
.observeOn(AndroidSchedulers.mainThread());
}
}
|
[
"you@example.com"
] |
you@example.com
|
547468cb785ced40f2e91c1658c031505e9b5b5c
|
6500848c3661afda83a024f9792bc6e2e8e8a14e
|
/gp_JADX/com/google/android/gms/common/api/internal/bv.java
|
f9053e1d3765e29e835c8ad84468eaa8e1f38d34
|
[] |
no_license
|
enaawy/gproject
|
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
|
91cb88559c60ac741d4418658d0416f26722e789
|
refs/heads/master
| 2021-09-03T03:49:37.813805
| 2018-01-05T09:35:06
| 2018-01-05T09:35:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 899
|
java
|
package com.google.android.gms.common.api.internal;
final class bv implements Runnable {
public /* synthetic */ LifecycleCallback f25777a;
public /* synthetic */ String f25778b;
public /* synthetic */ bu f25779c;
bv(bu buVar, LifecycleCallback lifecycleCallback, String str) {
this.f25779c = buVar;
this.f25777a = lifecycleCallback;
this.f25778b = str;
}
public final void run() {
if (this.f25779c.f25775c > 0) {
this.f25777a.mo4595a(this.f25779c.f25776d != null ? this.f25779c.f25776d.getBundle(this.f25778b) : null);
}
if (this.f25779c.f25775c >= 2) {
this.f25777a.mo4596b();
}
if (this.f25779c.f25775c >= 3) {
this.f25777a.mo4605c();
}
if (this.f25779c.f25775c >= 4) {
this.f25777a.mo4598d();
}
this.f25779c.f25775c;
}
}
|
[
"genius.ron@gmail.com"
] |
genius.ron@gmail.com
|
1e257d28b9debf69be99669da0aeadf0c1290db4
|
d5d9db79ab59fe25713e9acf42b6d4bd545a2edd
|
/src/main/java/io/grpc/examples/helloworld/Request.java
|
e5ce36ad93ba423025e3983fdb7ece152cc44e70
|
[] |
no_license
|
skmbw/grpc-learn
|
f3f15a6d1404700943f476506303d68239b581fb
|
f31d72ec800e06ff475548b95519d83051034dc3
|
refs/heads/master
| 2021-10-26T17:36:34.052343
| 2021-10-13T09:16:41
| 2021-10-13T09:16:41
| 99,093,076
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 269
|
java
|
package io.grpc.examples.helloworld;
/**
* @author yinlei
* @since 2018/8/3 16:19
*/
public class Request {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"tongku2008@126.com"
] |
tongku2008@126.com
|
3f2a284e12f676bbd0ded8d525151b1fb4b79d54
|
91e72ef337a34eb7e547fa96d99fca5a4a6dc89e
|
/subjects/javapoet/results/evosuite/1563902821/0001/evosuite-tests/com/squareup/javapoet/MethodSpec_ESTest.java
|
bc44230393992712e7fe49382b933ad9bcc5a819
|
[] |
no_license
|
STAMP-project/descartes-amplification-experiments
|
deda5e2f1a122b9d365f7c76b74fb2d99634aad4
|
a5709fd78bbe8b4a4ae590ec50704dbf7881e882
|
refs/heads/master
| 2021-06-27T04:13:17.035471
| 2020-10-14T08:17:05
| 2020-10-14T08:17:05
| 169,711,716
| 0
| 0
| null | 2020-10-14T08:17:07
| 2019-02-08T09:32:43
|
Java
|
UTF-8
|
Java
| false
| false
| 619
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Jul 23 17:29:47 GMT 2019
*/
package com.squareup.javapoet;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
public class MethodSpec_ESTest extends MethodSpec_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"oscarlvp@gmail.com"
] |
oscarlvp@gmail.com
|
ada93903c592444f4c9f05a0bebd7ad7c3cec0a2
|
7773ea6f465ffecfd4f9821aad56ee1eab90d97a
|
/platform/vcs-log/api/src/com/intellij/vcs/log/VcsLogBundle.java
|
eb5d3b3475ee1a614f43ecc857438e16ff3599d4
|
[
"Apache-2.0"
] |
permissive
|
aghasyedbilal/intellij-community
|
5fa14a8bb62a037c0d2764fb172e8109a3db471f
|
fa602b2874ea4eb59442f9937b952dcb55910b6e
|
refs/heads/master
| 2023-04-10T20:55:27.988445
| 2020-05-03T22:00:26
| 2020-05-03T22:26:23
| 261,074,802
| 2
| 0
|
Apache-2.0
| 2020-05-04T03:48:36
| 2020-05-04T03:48:35
| null |
UTF-8
|
Java
| false
| false
| 999
|
java
|
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.vcs.log;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class VcsLogBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.VcsLogBundle";
private static final VcsLogBundle INSTANCE = new VcsLogBundle();
private VcsLogBundle() {
super(BUNDLE);
}
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params);
}
@NotNull
public static Supplier<String> messagePointer(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
4bbfef62be33005aac50ce2b78ed0032c9142416
|
db59a5b1e8ca9788edfcf127da5e468acfbed2ff
|
/flash-pay-common/src/main/java/com/flash/common/util/EncryptUtil.java
|
26d89a1c4b215cf7652615a0dbd9145dff127054
|
[
"Apache-2.0"
] |
permissive
|
smadol/flash-pay
|
337f429651fb56aac74c50a3683d92d1e3218085
|
038d5f76a50b421ed7627258b284d4b78cfb4ae1
|
refs/heads/master
| 2023-09-02T14:10:49.035275
| 2021-10-21T06:46:45
| 2021-10-21T06:46:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,394
|
java
|
package com.flash.common.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Base64;
public class EncryptUtil {
private static final Logger logger = LoggerFactory.getLogger(EncryptUtil.class);
/**
* 将字节数组进行base64编码
*
* @param bytes
* @return
*/
public static String encodeBase64(byte[] bytes) {
String encoded = Base64.getEncoder().encodeToString(bytes);
return encoded;
}
/**
* 将字符串进行base64解码
*
* @param str
* @return
*/
public static byte[] decodeBase64(String str) {
byte[] bytes = null;
bytes = Base64.getDecoder().decode(str);
return bytes;
}
/**
* 将字符串str 先使用utf-8符集进行url编码 +转为%2B ?转为%3F 等防止传输过程中出问题, 然后在进行base64编码
*
* @param str
* @return
*/
public static String encodeUTF8StringBase64(String str) {
String encoded = null;
try {
encoded = URLEncoder.encode(str, "utf-8");
encoded = Base64.getEncoder().encodeToString(encoded.getBytes("utf-8"));
} catch (UnsupportedEncodingException e) {
logger.warn("不支持的编码格式", e);
}
return encoded;
}
/**
* 将字符串str 先进行base64解码 然后在使用utf-8字符集进行url解码
*
* @param str
* @return
*/
public static String decodeUTF8StringBase64(String str) {
String decoded = null;
byte[] bytes = Base64.getDecoder().decode(str);
try {
decoded = new String(bytes, "utf-8");
decoded = URLDecoder.decode(decoded, "utf-8");
} catch (UnsupportedEncodingException e) {
logger.warn("不支持的编码格式", e);
}
return decoded;
}
// public static void main(String [] args){
// String str = "www.baidu.com?a=1&b=2+1&c=dfdasaf+%&&d=1";
// String encoded = EncryptUtil.encodeUTF8StringBase64(str);
// String decoded = EncryptUtil.decodeUTF8StringBase64(encoded);
// System.out.println(str);
// System.out.println(encoded);
// System.out.println(decoded);
//
// }
}
|
[
"yueliminvc@outlook.com"
] |
yueliminvc@outlook.com
|
794832adb5e3850e78a1846f2744f43fb8b85340
|
19f7e40c448029530d191a262e5215571382bf9f
|
/decompiled/instagram/sources/com/facebook/fbreact/specs/NativeRelayConfigSpec.java
|
62ff0024166c2f31de876e5bc1403a98c3fcab73
|
[] |
no_license
|
stanvanrooy/decompiled-instagram
|
c1fb553c52e98fd82784a3a8a17abab43b0f52eb
|
3091a40af7accf6c0a80b9dda608471d503c4d78
|
refs/heads/master
| 2022-12-07T22:31:43.155086
| 2020-08-26T03:42:04
| 2020-08-26T03:42:04
| 283,347,288
| 18
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 781
|
java
|
package com.facebook.fbreact.specs;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReactModuleWithSpec;
import java.util.Map;
import p000X.A44;
import p000X.C139155x8;
public abstract class NativeRelayConfigSpec extends ReactContextBaseJavaModule implements ReactModuleWithSpec, C139155x8 {
@ReactMethod
public void getSandbox(Callback callback) {
}
public abstract Map getTypedExportedConstants();
@ReactMethod
public void setSandbox(String str) {
}
public NativeRelayConfigSpec(A44 a44) {
super(a44);
}
public final Map getConstants() {
return getTypedExportedConstants();
}
}
|
[
"stan@rooy.works"
] |
stan@rooy.works
|
b778a74b1a9609b6c83f77e98429ac57d76fbfdc
|
edfe078a1dddca798409943252a4b09a5371c237
|
/app/src/main/java/com/moko/lifex/entity/DeviceInfo.java
|
f45ff51314ec1193f9a119b3c891a06f5ceef7f3
|
[] |
no_license
|
abrahamadebayo/MokoLifeX_Android
|
20d7b37faa7c37c92b7a78790fe0a2ff767aa413
|
af380aca9233941c837c3d166b9027ae324ee5f0
|
refs/heads/master
| 2022-12-03T18:31:05.345810
| 2020-08-19T02:23:25
| 2020-08-19T02:23:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 226
|
java
|
package com.moko.lifex.entity;
public class DeviceInfo {
public String company_name;
public String production_date;
public String product_model;
public String firmware_version;
public String device_mac;
}
|
[
"329541594@qq.com"
] |
329541594@qq.com
|
1f19609d5904a952a053806b9bedd17ba9e88333
|
9d1870a895c63f540937f04a6285dd25ada5e52a
|
/chromecast-app-reverse-engineering/src/from-jd-gui/ws.java
|
7f7ad87b4bf7ea050c76955b9c86c02791b775c5
|
[] |
no_license
|
Churritosjesus/Chromecast-Reverse-Engineering
|
572aa97eb1fd65380ca0549b4166393505328ed4
|
29fae511060a820f2500a4e6e038dfdb591f4402
|
refs/heads/master
| 2023-06-04T10:27:15.869608
| 2015-10-27T10:43:11
| 2015-10-27T10:43:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,157
|
java
|
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.util.AttributeSet;
import android.widget.ListPopupWindow;
import android.widget.Spinner;
import java.lang.reflect.Field;
public final class ws
extends Spinner
{
private static final int[] a = { 16842964, 16843126 };
private te b;
private tf c;
public ws(Context paramContext, AttributeSet paramAttributeSet)
{
this(paramContext, paramAttributeSet, a.P);
}
private ws(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
if (tf.a)
{
paramContext = th.a(getContext(), paramAttributeSet, a, paramInt, 0);
if (paramContext.d(0))
{
paramAttributeSet = paramContext.a().a(paramContext.e(0, -1));
if (paramAttributeSet != null) {
a(paramAttributeSet);
}
}
if (paramContext.d(1))
{
paramAttributeSet = paramContext.a(1);
if (Build.VERSION.SDK_INT < 16) {
break label101;
}
setPopupBackgroundDrawable(paramAttributeSet);
}
}
for (;;)
{
this.c = paramContext.a();
paramContext.a.recycle();
return;
label101:
if (Build.VERSION.SDK_INT >= 11) {
try
{
Object localObject = Spinner.class.getDeclaredField("mPopup");
((Field)localObject).setAccessible(true);
localObject = ((Field)localObject).get(this);
if ((localObject instanceof ListPopupWindow)) {
((ListPopupWindow)localObject).setBackgroundDrawable(paramAttributeSet);
}
}
catch (NoSuchFieldException paramAttributeSet)
{
paramAttributeSet.printStackTrace();
}
catch (IllegalAccessException paramAttributeSet)
{
paramAttributeSet.printStackTrace();
}
}
}
}
private void a()
{
if ((getBackground() != null) && (this.b != null)) {
tf.a(this, this.b);
}
}
private void a(ColorStateList paramColorStateList)
{
if (paramColorStateList != null)
{
if (this.b == null) {
this.b = new te();
}
this.b.a = paramColorStateList;
this.b.b = true;
}
for (;;)
{
a();
return;
this.b = null;
}
}
protected final void drawableStateChanged()
{
super.drawableStateChanged();
a();
}
public final void setBackgroundDrawable(Drawable paramDrawable)
{
super.setBackgroundDrawable(paramDrawable);
a(null);
}
public final void setBackgroundResource(int paramInt)
{
super.setBackgroundResource(paramInt);
if (this.c != null) {}
for (ColorStateList localColorStateList = this.c.a(paramInt);; localColorStateList = null)
{
a(localColorStateList);
return;
}
}
}
/* Location: C:\DEV\android\dex2jar-2.1-SNAPSHOT\classes-dex2jar.jar!\ws.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"v.richomme@gmail.com"
] |
v.richomme@gmail.com
|
fbfb4d3ff6b55f8c468d115233a260cd83ae87d8
|
a89a78310848738f2dcfd766bd471e77ce60e5ec
|
/getty-core/src/main/java/org/getty/core/handler/ssl/sslfacade/Handshaker.java
|
96b5dfda31f248df7844b87d4f4217746f34f7dd
|
[
"Apache-2.0"
] |
permissive
|
7vqinqiwei/getty
|
c4025eb530a66c3b4488aba23a238f57bfc5223c
|
196bc4df765a1770cdbc5f883c4a533528793ac3
|
refs/heads/master
| 2020-09-30T22:50:26.698463
| 2019-12-11T00:29:17
| 2019-12-11T00:29:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,423
|
java
|
package org.getty.core.handler.ssl.sslfacade;
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.SSLException;
class Handshaker
{
/*
The purpose of this class is to conduct a SSL handshake. To do this it
requires a SSLEngine as a provider of SSL knowhow. Byte buffers that are
required by the SSLEngine to execute its wrap and unwrap methods. And a
ITaskHandler callback that is used to delegate the responsibility of
executing long-running/IO tasks to the host application. By providing a
ITaskHandler the host application gains the flexibility of executing
these tasks in compliance with its own compute/IO strategies.
*/
private final static String TAG = "Handshaker";
private final ITaskHandler _taskHandler;
private final Worker _worker;
private boolean _finished;
private IHandshakeCompletedListener _hscl;
private ISessionClosedListener _sessionClosedListener;
private boolean _client;
public Handshaker(boolean client, Worker worker, ITaskHandler taskHandler)
{
_worker = worker;
_taskHandler = taskHandler;
_finished = false;
_client = client;
}
private void debug(final String msg, final String... args)
{
SSLLog.debug(TAG, msg, args);
}
void begin() throws SSLException
{
_worker.beginHandshake();
shakehands();
}
void carryOn() throws SSLException
{
debug("carryOn");
shakehands();
}
void handleUnwrapResult(SSLEngineResult result) throws SSLException
{
debug("handleUnwrapResult");
if (result.getHandshakeStatus().equals(SSLEngineResult.HandshakeStatus.FINISHED)) {
handshakeFinished();
} else {
shakehands();
}
}
void addCompletedListener(IHandshakeCompletedListener hscl)
{
_hscl = hscl;
}
void removeCompletedListener(IHandshakeCompletedListener hscl)
{
_hscl = hscl;
}
boolean isFinished()
{
return _finished;
}
/* Privates */
private void shakehands() throws SSLException
{
debug("shakehands : " + _worker.getHandshakeStatus());
switch (_worker.getHandshakeStatus()) {
case NOT_HANDSHAKING:
/* Occurs after handshake is over */
break;
case FINISHED:
handshakeFinished();
break;
case NEED_TASK:
_taskHandler.process(new Tasks(_worker, this));
break;
case NEED_WRAP:
SSLEngineResult w_result = _worker.wrap(null);
debug("Wrap result " + w_result);
if (w_result.getStatus().equals(SSLEngineResult.Status.CLOSED) && null != _sessionClosedListener) {
_sessionClosedListener.onSessionClosed();
}
if (w_result.getHandshakeStatus().equals(SSLEngineResult.HandshakeStatus.FINISHED)) {
handshakeFinished();
} else {
shakehands();
}
break;
case NEED_UNWRAP:
if (_worker.pendingUnwrap()) {
SSLEngineResult u_result = _worker.unwrap(null);
debug("Unwrap result " + u_result);
if (u_result.getHandshakeStatus().equals(SSLEngineResult.HandshakeStatus.FINISHED)) {
handshakeFinished();
}
if (u_result.getStatus().equals(SSLEngineResult.Status.OK)) {
shakehands();
}
} else {
debug("No pending data to unwrap");
}
break;
}
}
private void handshakeFinished()
{
_finished = true;
_hscl.onComplete();
}
}
|
[
"34082822+gogym@users.noreply.github.com"
] |
34082822+gogym@users.noreply.github.com
|
ee117cd5535ad2ff2f6c6c83414c5dccb3e80a99
|
b3cf6efcfc3bfd03873d9eb71de2ddeeecbc5b51
|
/src/benchmarks/detinfer/jgf/raytracer/Vec.java
|
fe5949b552b4eecb89d930e97a76e33cefd9c4f1
|
[] |
no_license
|
weilinfox/origin_calfuzzer
|
12d9635098f66ca3e1c5ebf24eb058854da90f80
|
f44d25a40701d23474724c59a13888b0c2469891
|
refs/heads/master
| 2023-03-02T04:37:37.273348
| 2021-01-31T08:41:58
| 2021-01-31T08:41:58
| 301,637,748
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,551
|
java
|
/**************************************************************************
* *
* Java Grande Forum Benchmark Suite - Thread Version 1.0 *
* *
* produced by *
* *
* Java Grande Benchmarking Project *
* *
* at *
* *
* Edinburgh Parallel Computing Centre *
* *
* email: epcc-javagrande@epcc.ed.ac.uk *
* *
* Original version of this code by *
* Florian Doyon (Florian.Doyon@sophia.inria.fr) *
* and Wilfried Klauser (wklauser@acm.org) *
* *
* This version copyright (c) The University of Edinburgh, 2001. *
* All rights reserved. *
* *
**************************************************************************/
package benchmarks.detinfer.jgf.raytracer;
/**
* This class reflects the 3d vectors used in 3d computations
*/
public class Vec implements java.io.Serializable {
/**
* The x coordinate
*/
public double x;
/**
* The y coordinate
*/
public double y;
/**
* The z coordinate
*/
public double z;
/**
* Constructor
* @param a the x coordinate
* @param b the y coordinate
* @param c the z coordinate
*/
public Vec(double a, double b, double c) {
x = a;
y = b;
z = c;
}
/**
* Copy constructor
*/
public Vec(Vec a) {
x = a.x;
y = a.y;
z = a.z;
}
/**
* Default (0,0,0) constructor
*/
public Vec() {
x = 0.0;
y = 0.0;
z = 0.0;
}
/**
* Add a vector to the current vector
* @param: a The vector to be added
*/
public final void add(Vec a) {
x+=a.x;
y+=a.y;
z+=a.z;
}
/**
* adds: Returns a new vector such as
* new = sA + B
*/
public static Vec adds(double s, Vec a, Vec b) {
return new Vec(s * a.x + b.x, s * a.y + b.y, s * a.z + b.z);
}
/**
* Adds vector such as:
* this+=sB
* @param: s The multiplier
* @param: b The vector to be added
*/
public final void adds(double s,Vec b){
x+=s*b.x;
y+=s*b.y;
z+=s*b.z;
}
/**
* Substracs two vectors
*/
public static Vec sub(Vec a, Vec b) {
return new Vec(a.x - b.x, a.y - b.y, a.z - b.z);
}
/**
* Substracts two vects and places the results in the current vector
* Used for speedup with local variables -there were too much Vec to be gc'ed
* Consumes about 10 units, whether sub consumes nearly 999 units!!
* cf thinking in java p. 831,832
*/
public final void sub2(Vec a,Vec b) {
this.x=a.x-b.x;
this.y=a.y-b.y;
this.z=a.z-b.z;
}
public static Vec mult(Vec a, Vec b) {
return new Vec(a.x * b.x, a.y * b.y, a.z * b.z);
}
public static Vec cross(Vec a, Vec b) {
return
new Vec(a.y*b.z - a.z*b.y,
a.z*b.x - a.x*b.z,
a.x*b.y - a.y*b.x);
}
public static double dot(Vec a, Vec b) {
return a.x*b.x + a.y*b.y + a.z*b.z;
}
public static Vec comb(double a, Vec A, double b, Vec B) {
return
new Vec(a * A.x + b * B.x,
a * A.y + b * B.y,
a * A.z + b * B.z);
}
public final void comb2(double a,Vec A,double b,Vec B) {
x=a * A.x + b * B.x;
y=a * A.y + b * B.y;
z=a * A.z + b * B.z;
}
public final void scale(double t) {
x *= t;
y *= t;
z *= t;
}
public final void negate() {
x = -x;
y = -y;
z = -z;
}
public final double normalize() {
double len;
len = Math.sqrt(x*x + y*y + z*z);
if (len > 0.0) {
x /= len;
y /= len;
z /= len;
}
return len;
}
public final String toString() {
return "<" + x + "," + y + "," + z + ">";
}
}
|
[
"ksen@cs.berkeley.edu"
] |
ksen@cs.berkeley.edu
|
9a440dffcf8dff2ebc76d32b3dcd580f6b70f270
|
2b43353c358f03935ab6d2725cd82234e2630ef3
|
/src/main/java/de/tekup/ex/services/CinemaServiceImpl.java
|
84e71cfd162671f700948c7a1f8544866af90aaa
|
[] |
no_license
|
Hmida-Rojbani/Ex-Data-A
|
50fa332415efe750389b2fefa1873d156f7e5dd1
|
b3a447b64b67153218c0b7c9f20c790e4a6abafd
|
refs/heads/master
| 2023-01-21T06:57:26.964176
| 2020-11-30T10:32:57
| 2020-11-30T10:32:57
| 313,622,111
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,313
|
java
|
package de.tekup.ex.services;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.stream.Collectors;
import org.springframework.stereotype.Service;
import de.tekup.ex.models.Movie;
import de.tekup.ex.models.Star;
import de.tekup.ex.models.Studio;
import de.tekup.ex.repositories.MovieRepository;
import de.tekup.ex.repositories.StarRepository;
import de.tekup.ex.repositories.StudioRepository;
import lombok.AllArgsConstructor;
@Service
@AllArgsConstructor
public class CinemaServiceImpl implements CinemaService{
private StarRepository reposStar;
private StudioRepository reposStudio;
private MovieRepository reposMovie;
@Override
public List<Studio> getStudiosByStar(String starName) {
Star star = reposStar.findById(starName)
.orElseThrow(()-> new NoSuchElementException("No Star with this name"));
return star.getMovies().stream()
.map(movie -> movie.getStudio())
.distinct()
.collect(Collectors.toList());
}
@Override
public List<Movie> getCloredMovieByStudio(String studioName) {
Studio studio = reposStudio.findById(studioName)
.orElseThrow(()-> new NoSuchElementException("No Studio with this name"));
return studio.getMovies()
.stream()
.filter(movie -> movie.getColor() == 1)
.collect(Collectors.toList());
}
@Override
public Map<Character, Long> getMaleAndFemaleBornInPeriod(LocalDate dateBegin, LocalDate dateEnd) {
/**
List<Star> stars = reposStar.findAll();
List<Star> acceptedStars = new ArrayList<>();
int male=0, female=0;
for (Star star : stars) {
if(star.getBirthDate().isAfter(dateBegin) && star.getBirthDate().isBefore(dateEnd)) {
acceptedStars.add(star);
}
}
for (Star star : acceptedStars) {
if(star.getGendre()=='F' || star.getGendre()=='f') {
female++;
}else {
male++;
}
}
Map<Character, Integer> map = new HashMap<>();
map.put('F', female);
map.put('M', male);
//return map;
*/
return reposStar.findAll()
.stream()
.filter(star -> star.getBirthDate().isAfter(dateBegin) && star.getBirthDate().isBefore(dateEnd))
.collect(Collectors.groupingBy(star-> star.getGendre(), Collectors.counting()));
}
}
|
[
"31728681+Hmida-Rojbani@users.noreply.github.com"
] |
31728681+Hmida-Rojbani@users.noreply.github.com
|
c140d7422c76fdfc929f4082a3c43c308d787500
|
9b9b9b855eba93c8dd9e3c2997d53c6f4728bc5a
|
/src/kr/ac/kopo/day16/note/MultiThreadMain.java
|
63a8c803b796a24e36de62dc51dd609e97c3acf0
|
[] |
no_license
|
jhw-polytech/kopo_java
|
3508569a3021ffe584f107152ad659bd1c1dd9fd
|
191372687bdf78259789f472f8e948b6a91d1b6d
|
refs/heads/master
| 2022-12-06T13:47:35.461835
| 2020-08-17T13:38:32
| 2020-08-17T13:38:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,682
|
java
|
package kr.ac.kopo.day16.note;
class Calculator {
private int count = 0;
/*
* synchronized가 적용되지 않으면 count를 모두 끝내고 난 다음의 값이 20000이 아니라
* 계속 숫자가 손실된 형태로 매번 다른 숫자가 나오는 것을 확인할 수 있다.
* 이유: 스레드가 서로 count 변수의 값을 변경시키고 있는데,
* 값을 저장하기 전에 큐를 뺏기는 경우 다시 큐에 돌아왔을 때 직전에 기억했던 값을 기준으로 저장하고,
* 이 과정에서 수의 손실이 생긴다.
*/
public /* synchronized */ void sum() {
/* synchronized(this) { */
// this를 쓰는 이유는 Object형이 아닌 기본자료형이 오면 에러가 나기 때문 <-????
// this의 의미는, 현재 돌아가고 있는 Calculator 객체를 의미한다.
for (int i = 0; i < 10000; i++) {
/* synchronized(this) { */
count++;
/* } */
}
/* } */
}
public int getCount() {
return count;
}
}
class MultiThread extends Thread {
private Calculator cal;
public MultiThread(Calculator cal) {
this.cal = cal;
}
}
public class MultiThreadMain {
public static void main(String[] args) {
Calculator cal = new Calculator();
MultiThread mt = new MultiThread(cal);
MultiThread mt2 = new MultiThread(cal);
mt.start();
mt2.start();
try {
// join()은 마지막에 cal.getCount()를 찍기 위한 것.
// 만약 join을 쓰지 않으면 main()을 포함한 세 개의 스레드가 함께 돌며 count가 0이 찍힐것임
mt.join();
mt2.join();
} catch (Exception e) {
e.printStackTrace();
}
System.out.println(cal.getCount());
}
}
|
[
"2060340007@office.kopo.ac.kr"
] |
2060340007@office.kopo.ac.kr
|
57aded1bc560b2b2428fa6796551c07bf72758e7
|
f378ddd47c8b7de6e9cf1d4228c84f73e9dc59f1
|
/projetos/DevsmartLib-Android/devsmartlib/src/com/devsmart/android/IOUtils.java
|
f4859215a9ebabe3b6e26b49a3a7c502d80dc197
|
[] |
no_license
|
charles-marques/dataset-375
|
29e2f99ac1ba323f8cb78bf80107963fc180487c
|
51583daaf58d5669c69d8208b8c4ed4e009001a5
|
refs/heads/master
| 2023-01-20T07:23:09.445693
| 2020-11-27T22:35:49
| 2020-11-27T22:35:49
| 283,315,149
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,386
|
java
|
package com.devsmart.android;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import android.os.Handler;
public class IOUtils {
public static final ExecutorService sIOThreads = Executors.newScheduledThreadPool(3);
public static byte[] toByteArray(InputStream in) throws IOException{
ByteArrayOutputStream out = new ByteArrayOutputStream();
pumpStream(in, out, null);
return out.toByteArray();
}
public static void writeByteArrayToFile(File file, byte[] bytes) throws IOException {
FileOutputStream fout = new FileOutputStream(file);
try {
fout.write(bytes);
} finally {
fout.close();
}
}
public static void copyFile(File src, File dest) throws IOException {
InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dest);
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
}
public interface DataProgressCallback {
public void onDataProgress(int bytesWritten);
}
public static void pumpStream(InputStream in, OutputStream out, DataProgressCallback callback) throws IOException {
byte[] buff = new byte[1024];
int bytesRead = 0;
while ((bytesRead = in.read(buff, 0, buff.length)) != -1) {
out.write(buff, 0, bytesRead);
if(callback != null){
callback.onDataProgress(bytesRead);
}
}
out.close();
in.close();
}
public static abstract class BackgroundTask implements Runnable {
public Handler mHandler = new Handler();
public abstract void doInBackground();
public void onFinished() {
}
public final void run() {
doInBackground();
mHandler.post(new Runnable() {
@Override
public void run() {
onFinished();
}
});
}
}
public static InputStream getPhoneLogs() throws IOException, InterruptedException {
ProcessBuilder builder = new ProcessBuilder("logcat", "-d");
builder.redirectErrorStream(true);
Process process = builder.start();
//process.waitFor();
return process.getInputStream();
}
}
|
[
"suporte@localhost.localdomain"
] |
suporte@localhost.localdomain
|
9c2069defca7990e71e8c2d73817e95b682b5a46
|
43fab1e32afccd39b2deb27daf1b62171df016e6
|
/src/com/huachuang/server/entity/WalletBalanceRecord.java
|
2c4b5e698921ee60de6a7068df567954dfe31a33
|
[] |
no_license
|
yanghang8612/AppServer
|
cf47af9d5b578ebe64b01768beab97d1ef0275d4
|
71ab27291125902a8d5f3d64f971be0b41ffa5f0
|
refs/heads/master
| 2021-09-24T18:13:16.790943
| 2017-07-11T05:48:38
| 2017-07-11T05:48:40
| 85,487,637
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,414
|
java
|
package com.huachuang.server.entity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.util.Date;
/**
* Created by Asuka on 2017/4/25.
*/
@Entity
@DynamicInsert
@Table(name = "user_wallet_balance_record")
public class WalletBalanceRecord {
@Id
@Column(name = "id")
@GeneratedValue(generator="increment")
@GenericGenerator(name="increment", strategy = "increment")
private long id;
@Column(name = "user_id", nullable = false)
private long userId;
@Column(name = "type", nullable = false)
private byte type;
@Column(name = "amount", nullable = false)
private double amount;
@Column(name = "time")
private Date time;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public long getUserId() {
return userId;
}
public void setUserId(long userId) {
this.userId = userId;
}
public byte getType() {
return type;
}
public void setType(byte type) {
this.type = type;
}
public double getAmount() {
return amount;
}
public void setAmount(double amount) {
this.amount = amount;
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
}
|
[
"yanghang8612@163.com"
] |
yanghang8612@163.com
|
da83efed9e3de977075c25fce748a41049ef68f4
|
bca2a72098d08e1e79ecdd4a839f90fd4a68e1af
|
/src/com/oucre/quartz/MyQuartz.java
|
72e4e76b84687292e2af54e143f6a91902f2c75c
|
[] |
no_license
|
EvilCodes/MyCruit
|
d121bc0027f1dc2424ef01fadbc6d2f544c03d48
|
de77fc85c1782686bc9102c7f3aa56f895ff5bde
|
refs/heads/master
| 2021-01-19T05:31:31.986945
| 2017-04-06T13:38:34
| 2017-04-06T13:38:34
| 87,433,112
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 904
|
java
|
package com.oucre.quartz;
import java.util.List;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
import com.oucre.pojo.Student;
import com.oucre.service.StudentManagerService;
public class MyQuartz {
private Logger logger = Logger.getLogger(this.getClass());
@Resource
private StudentManagerService studentManagerService;
public void clearimgtemp() {
try {
List<Student> list = studentManagerService.findAllStudents();
for (Student s : list) {
// 审核通过状态 并且是 自己转化 时,开启转化时间倒计时
if ("2".equals(s.getStatus()) && "1".equals(s.getConver())) {
int days = s.getDays() - 1;
if (days == 0) {
s.setConver("0");// 置为人人都可以转化
}
s.setDays(days);
studentManagerService.updStudent(s,null);
}
}
} catch (Exception e) {
logger.error(e);
e.printStackTrace();
}
}
}
|
[
"huangy_tao@126.com"
] |
huangy_tao@126.com
|
06edc1925b56f1c9344ab28f3d2beab42626e530
|
d6ab38714f7a5f0dc6d7446ec20626f8f539406a
|
/backend/collecting/dsfj/Java/edited/java.JavaSerialization.java
|
16d18b59d88d326f10fc611b48f99f9702e7d1e5
|
[] |
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
| 805
|
java
|
package com.alibaba.dubbo.common.serialize.java;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.serialize.ObjectInput;
import com.alibaba.dubbo.common.serialize.ObjectOutput;
import com.alibaba.dubbo.common.serialize.Serialization;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class JavaSerialization implements Serialization {
public byte getContentTypeId() {
return 3;
}
public String getContentType() {
return "x-application/java";
}
public ObjectOutput serialize(URL url, OutputStream out) throws IOException {
return new JavaObjectOutput(out);
}
public ObjectInput deserialize(URL url, InputStream is) throws IOException {
return new JavaObjectInput(is);
}
}
|
[
"mahdisadeghzadeh24@gamil.com"
] |
mahdisadeghzadeh24@gamil.com
|
d35afc3f08be49cd4c7446d5023caec812febf10
|
850d18fcd1f657c9b1a4b5033d8fe340f4449c32
|
/modules/server/src-gen/main/java/br/com/kerubin/api/financeiro/contasreceber/ServerConfig.java
|
b344b80a6ca8dec163fd555792395abbcb867f95
|
[] |
no_license
|
lobokoch/contas-receber
|
9b521166f6a052454af856df9aff4e503a331670
|
792d283732e4ea8e792f7a3de3302ce76ffcd26b
|
refs/heads/master
| 2020-06-12T03:06:50.753533
| 2020-05-03T10:12:43
| 2020-05-03T10:12:43
| 194,177,085
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,095
|
java
|
/**********************************************************************************************
Code generated by MKL Plug-in
Copyright: Kerubin - kerubin.platform@gmail.com
WARNING: DO NOT CHANGE THIS CODE BECAUSE THE CHANGES WILL BE LOST IN THE NEXT CODE GENERATION.
***********************************************************************************************/
package br.com.kerubin.api.financeiro.contasreceber;
import java.util.UUID;
import org.springframework.amqp.core.MessagePostProcessor;
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainerFactoryConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import br.com.kerubin.api.messaging.core.DomainEvent;
@Configuration
public class ServerConfig {
@Bean
public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory(
SimpleRabbitListenerContainerFactoryConfigurer configurer,
ConnectionFactory connectionFactory) {
SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
factory.setPrefetchCount(20); // TODO: Should create a parameter for this.
configurer.configure(factory, connectionFactory);
factory.setConsumerTagStrategy(queue -> {
StringBuilder sb = new StringBuilder(DomainEvent.APPLICATION).append("_")
.append(FinanceiroContasReceberConstants.DOMAIN)
.append("_")
.append(FinanceiroContasReceberConstants.SERVICE)
.append("_")
.append(UUID.randomUUID().toString())
//.append(".to.")
//.append(queue)
;
String tag = sb.toString();
return tag;
});
factory.setAfterReceivePostProcessors(afterReceivePostProcessors());
return factory;
}
@Bean
public MessagePostProcessor afterReceivePostProcessors() {
return new MessageAfterReceivePostProcessors();
}
}
|
[
"lobokoch@gmail.com"
] |
lobokoch@gmail.com
|
85cf9488f57393678da5dac42aed4a494522dded
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/LACCPlus/ActiveMQ/2366_1.java
|
251ccfcdd7472392aa8295be0382d3bdb7dc0e5f
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,911
|
java
|
//,temp,Stomp11Test.java,535,575,temp,Stomp11Test.java,499,533
//,3
public class xxx {
@Test(timeout = 60000)
public void testAckMessageWithNoId() throws Exception {
String connectFrame = "STOMP\n" +
"login:system\n" +
"passcode:manager\n" +
"accept-version:1.1\n" +
"host:localhost\n" +
"\n" + Stomp.NULL;
stompConnection.sendFrame(connectFrame);
String f = stompConnection.receiveFrame();
LOG.debug("Broker sent: " + f);
assertTrue(f.startsWith("CONNECTED"));
String message = "SEND\n" + "destination:/queue/" + getQueueName() +
"\n\n" + "Hello World" + Stomp.NULL;
stompConnection.sendFrame(message);
String subscribe = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" +
"activemq.prefetchSize=1" + "\n" +
"id:12345\n" + "ack:client\n\n" + Stomp.NULL;
stompConnection.sendFrame(subscribe);
StompFrame received = stompConnection.receive();
LOG.info("Received Frame: {}", received);
assertTrue("Expected MESSAGE but got: " + received.getAction(), received.getAction().equals("MESSAGE"));
String ack = "ACK\n" + "message-id:" +
received.getHeaders().get("message-id") + "\n\n" + Stomp.NULL;
stompConnection.sendFrame(ack);
StompFrame error = stompConnection.receive();
LOG.info("Received Frame: {}", error);
assertTrue("Expected ERROR but got: " + error.getAction(), error.getAction().equals("ERROR"));
String unsub = "UNSUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" +
"id:12345\n\n" + Stomp.NULL;
stompConnection.sendFrame(unsub);
}
};
|
[
"SHOSHIN\\sgholamian@shoshin.uwaterloo.ca"
] |
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
|
3bddcc6f401f3f91be4e4251d84ffd0626eb9219
|
af10e43252529568b7e83ee161165f52dc35bb0f
|
/platform/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/repository/rule/InMemSystemRuleStore.java
|
255905453333d66672b9fe9f04c6b653f1ed0cbb
|
[
"MIT"
] |
permissive
|
footprintes/open-platform
|
e7bf80b41128b968846fa28d54d2b8a4b77c03d2
|
affac45dbac7aa03070eec31ca97c3ebf2dca03b
|
refs/heads/master
| 2022-04-10T17:31:03.201219
| 2020-04-03T04:58:28
| 2020-04-03T04:58:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,132
|
java
|
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.csp.sentinel.dashboard.repository.rule;
import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.SystemRuleEntity;
import org.springframework.stereotype.Component;
import java.util.concurrent.atomic.AtomicLong;
/**
* @author leyou
*/
@Component
public class InMemSystemRuleStore extends InMemoryRuleRepositoryAdapter<SystemRuleEntity> {
private static AtomicLong ids = new AtomicLong(0);
@Override
protected long nextId() {
return ids.incrementAndGet();
}
}
|
[
"futustar@qq.com"
] |
futustar@qq.com
|
380102cb05c1eee73deec7f0ea00eb0247912a68
|
8ae32d70fcf6e30e3eccf3859a46ff9fe2182c65
|
/HBooking-master/app/src/main/java/com/nettactic/hotelbooking/bean/OrderBean.java
|
99e50a1275cb0f7b64f7290d0e2eb93e2cfde1fa
|
[] |
no_license
|
heshicaihao/HBooking
|
59f38d1311e7089fcb9964e4475cf6f17f264abf
|
29faee3b4190e7fa3c637187f4e37a0218bb4756
|
refs/heads/master
| 2021-05-05T23:05:35.851176
| 2018-01-05T10:12:55
| 2018-01-05T10:12:55
| 116,369,135
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,861
|
java
|
package com.nettactic.hotelbooking.bean;
import com.nettactic.hotelbooking.base.BaseBean;
public class OrderBean extends BaseBean {
/**
*
*/
private static final long serialVersionUID = 1L;
private String order_id;
private String createtime;
private String time_in;
private String time_out;
private String pay_status;
private String order_status;
private String check_in_status;
private String user_name;
private String room_name;
public OrderBean() {
super();
// TODO Auto-generated constructor stub
}
public String getOrder_id() {
return order_id;
}
public void setOrder_id(String order_id) {
this.order_id = order_id;
}
public String getCreatetime() {
return createtime;
}
public void setCreatetime(String createtime) {
this.createtime = createtime;
}
public String getTime_in() {
return time_in;
}
public void setTime_in(String time_in) {
this.time_in = time_in;
}
public String getTime_out() {
return time_out;
}
public void setTime_out(String time_out) {
this.time_out = time_out;
}
public String getPay_status() {
return pay_status;
}
public void setPay_status(String pay_status) {
this.pay_status = pay_status;
}
public String getOrder_status() {
return order_status;
}
public void setOrder_status(String order_status) {
this.order_status = order_status;
}
public String getCheck_in_status() {
return check_in_status;
}
public void setCheck_in_status(String check_in_status) {
this.check_in_status = check_in_status;
}
public String getUser_name() {
return user_name;
}
public void setUser_name(String user_name) {
this.user_name = user_name;
}
public String getRoom_name() {
return room_name;
}
public void setRoom_name(String room_name) {
this.room_name = room_name;
}
public OrderBean(String order_id, String createtime, String time_in, String time_out, String pay_status, String order_status, String check_in_status, String user_name, String room_name) {
this.order_id = order_id;
this.createtime = createtime;
this.time_in = time_in;
this.time_out = time_out;
this.pay_status = pay_status;
this.order_status = order_status;
this.check_in_status = check_in_status;
this.user_name = user_name;
this.room_name = room_name;
}
@Override
public String toString() {
return "OrderBean{" +
"order_id='" + order_id + '\'' +
", createtime='" + createtime + '\'' +
", time_in='" + time_in + '\'' +
", time_out='" + time_out + '\'' +
", pay_status='" + pay_status + '\'' +
", order_status='" + order_status + '\'' +
", check_in_status='" + check_in_status + '\'' +
", user_name='" + user_name + '\'' +
", room_name='" + room_name + '\'' +
'}';
}
}
|
[
"heshicaihao@163.com"
] |
heshicaihao@163.com
|
cb9be31a2424850a467d585e294b7aaa9206d82d
|
4dc8bb75c419e57f93055d81eea7c8eb74067ab3
|
/baselibrary/src/main/java/com/lr/baselibrary/base/BaseRecycleViewAdapter.java
|
60d4a3f44f11d214d2c065c7990e03f11cba498a
|
[] |
no_license
|
wodx521/Quartet
|
a00141aa599a2bdd510a08ea8c11405d879ca4fe
|
c84524236f861a639e744c1a608e919ad9894f1a
|
refs/heads/master
| 2021-04-04T20:53:27.216471
| 2020-03-24T11:06:21
| 2020-03-24T11:06:21
| 248,486,975
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,375
|
java
|
package com.lr.baselibrary.base;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
public abstract class BaseRecycleViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements
View.OnClickListener, View.OnLongClickListener,View.OnTouchListener {
protected Context mContext;
protected LayoutInflater inflater;
protected int defItem = -1;
private View view;
protected boolean isScrolling = false;
public BaseRecycleViewAdapter(Context context) {
this.mContext = context;
inflater = LayoutInflater.from(mContext);
}
public void setScrolling(boolean scrolling) {
isScrolling = scrolling;
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
view = inflater.inflate(getItemRes(), viewGroup, false);
view.setOnClickListener(this);
view.setOnLongClickListener(this);
return getViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
holder.itemView.setTag(position);
if (defItem != -1) {
if (defItem == position) {
holder.itemView.setSelected(true);
} else {
holder.itemView.setSelected(false);
}
}
bindClickListener(holder, position);
}
// public View getItemView(int position){
//
// return ;
// }
//设置布局文件
protected abstract int getItemRes();
//获取viewholder
protected abstract RecyclerView.ViewHolder getViewHolder(View view);
//绑定点击监听事件
protected abstract void bindClickListener(RecyclerView.ViewHolder viewHolder, int position);
public void setSelect(int position) {
this.defItem = position;
notifyDataSetChanged();
}
public int getSelect() {
return defItem;
}
@Override
public void onClick(View v) {
if (onItemClickListener != null) {
//注意这里使用getTag方法获取数据
onItemClickListener.onItemClickListener(v, (Integer) v.getTag());
}
}
@Override
public boolean onLongClick(View v) {
return onItemLongClickListener != null && onItemLongClickListener.onItemLongClickListener(v, (Integer) v.getTag());
}
private OnItemClickListener onItemClickListener;
private OnItemLongClickListener onItemLongClickListener;
/*设置点击事件*/
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
this.onItemClickListener = onItemClickListener;
}
/*设置长按事件*/
public void setOnItemLongClickListener(OnItemLongClickListener onItemLongClickListener) {
this.onItemLongClickListener = onItemLongClickListener;
}
public interface OnItemClickListener {
void onItemClickListener(View view, int position);
}
public interface OnItemLongClickListener {
boolean onItemLongClickListener(View view, int position);
}
@Override
public boolean onTouch(View v, MotionEvent event) {
return false;
}
}
|
[
"wodx521@163.com"
] |
wodx521@163.com
|
4d3778391e0921a1508d377f1dda1801352626ed
|
50bca699027d6e2da31bf888638533952d70b8a5
|
/src/test/java/org/neo4j/graphql/IDLResourceTest.java
|
b948f4387e915c87742c379d7d15fb29021435d6
|
[
"Apache-2.0"
] |
permissive
|
neo4j-graphql/neo4j-graphql
|
68489ad6579e7edd8486832aed20ca41cb926715
|
a6faeca655a562ca69ac9232ea5ba1c936f238bb
|
refs/heads/3.5
| 2022-11-30T22:41:08.117513
| 2020-10-22T23:04:07
| 2020-10-22T23:04:07
| 71,757,721
| 427
| 77
|
Apache-2.0
| 2022-11-16T00:43:01
| 2016-10-24T06:18:25
|
Kotlin
|
UTF-8
|
Java
| false
| false
| 2,249
|
java
|
package org.neo4j.graphql;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.neo4j.harness.ServerControls;
import org.neo4j.harness.TestServerBuilders;
import org.neo4j.test.server.HTTP;
import java.net.URL;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.neo4j.helpers.collection.MapUtil.map;
/**
* @author mh
* @since 24.10.16
*/
public class IDLResourceTest {
private static ServerControls neo4j;
private static URL serverURI;
@BeforeClass
public static void setUp() throws Exception {
neo4j = TestServerBuilders
.newInProcessBuilder()
.withExtension("/graphql", GraphQLResource.class)
.withProcedure(GraphQLProcedure.class)
.newServer();
serverURI = new URL(neo4j.httpURI().toURL(), "graphql/");
}
@AfterClass
public static void tearDown() throws Exception {
neo4j.close();
}
@Test
public void storeAndUseIdl() throws Exception {
String idlUrl = serverURI.toURI().resolve("idl").toString();
HTTP.Response response = HTTP.withHeaders("Content-Type","text/plain","Accept","text/plain")
.POST(idlUrl, HTTP.RawPayload.rawPayload("type Person { name: String, born: Int }"));
assertEquals(200, response.status());
String result = response.rawContent();
System.out.println("result = " + result);
assertEquals(true, result.contains("\"Person\":{\"type\":\"Person\""));
assertEquals(true, result.contains("\"fieldName\":\"name\",\"type\":{\"name\":\"String\""));
assertEquals(true, result.contains("\"fieldName\":\"born\",\"type\":{\"name\":\"Int\""));
HTTP.Response graphQlResponse = HTTP.POST(serverURI.toString(), map("query", "{ __schema { queryType { fields { name }}}}"));
assertEquals(200, graphQlResponse.status());
Map<String, Map<String,List<Map>>> graphQlResult = graphQlResponse.content();
assertEquals(true, graphQlResult.toString().contains("name=Person"));
HTTP.Response delete = HTTP.request("DELETE", idlUrl, null);
assertEquals(200, delete.status());
}
}
|
[
"github@jexp.de"
] |
github@jexp.de
|
6a4cbbdc630a0a3a32036f398be0fcac66d6709d
|
52d1d35b799ab4c6d4d953b9981ad1b4c411f51e
|
/src/main/java/org/apache/ibatis/annotations/Flush.java
|
94ab5965db59678226891a65c1a6c7524198cee0
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
709248556/mybatis
|
f2e31082f1e301186d3c9eff2ae50743def0a296
|
93661529ae2ab68c0094c06f0eb4e4e4c8baac3c
|
refs/heads/master
| 2022-09-30T02:40:12.877315
| 2019-08-27T03:32:40
| 2019-08-27T03:34:55
| 203,729,514
| 1
| 1
|
NOASSERTION
| 2021-12-14T21:32:44
| 2019-08-22T06:33:41
|
Java
|
UTF-8
|
Java
| false
| false
| 966
|
java
|
/**
* Copyright 2009-2016 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.annotations;
import java.lang.annotation.*;
/**
* Flush 注解
*
* The maker annotation that invoke a flush statements via Mapper interface.
*
* @since 3.3.0
* @author Kazuki Shimizu
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD) // 方法上
public @interface Flush {
}
|
[
"709248556@qq.com"
] |
709248556@qq.com
|
fda71c034d5d78c1a26e849a137767e7ec2b43da
|
d4eff01d8a0c9c38adab22d9e494572973091258
|
/app/src/main/java/com/ns/yc/lifehelper/base/comment/FragmentFactory.java
|
3e6989c16d4d69837ab9bc113fc3e199c0efe445
|
[
"Apache-2.0"
] |
permissive
|
kouhengsheng/LifeHelper
|
64eff0d47cb1187797435f6be4c1ebe05164500f
|
c85a3d6320b832148cdee9e1ca97432cd5e112e1
|
refs/heads/master
| 2020-07-07T07:23:55.382955
| 2019-10-30T12:55:22
| 2019-10-30T12:55:22
| 203,290,784
| 3
| 0
| null | 2019-08-20T03:13:23
| 2019-08-20T03:13:22
| null |
UTF-8
|
Java
| false
| false
| 2,399
|
java
|
package com.ns.yc.lifehelper.base.comment;
import com.ns.yc.lifehelper.ui.data.view.fragment.DataFragment;
import com.ns.yc.lifehelper.ui.find.view.fragment.FindFragment;
import com.ns.yc.lifehelper.ui.home.view.fragment.HomeFragment;
import com.ns.yc.lifehelper.ui.me.view.MeFragment;
/**
* <pre>
* @author 杨充
* blog https://www.jianshu.com/p/53017c3fc75d
* time 2017/12/22
* desc
* revise 看《Android源码设计》一书,学习设计模式并运用
* GitHub https://github.com/yangchong211
* </pre>
*/
public class FragmentFactory {
private static FragmentFactory mInstance;
private HomeFragment mHomeFragment;
private FindFragment mFindFragment;
private DataFragment mDataFragment;
private MeFragment mMeFragment;
private FragmentFactory() {}
public static FragmentFactory getInstance() {
if (mInstance == null) {
synchronized (FragmentFactory.class) {
if (mInstance == null) {
mInstance = new FragmentFactory();
}
}
}
return mInstance;
}
public HomeFragment getHomeFragment() {
if (mHomeFragment == null) {
synchronized (FragmentFactory.class) {
if (mHomeFragment == null) {
mHomeFragment = new HomeFragment();
}
}
}
return mHomeFragment;
}
public FindFragment getFindFragment() {
if (mFindFragment == null) {
synchronized (FragmentFactory.class) {
if (mFindFragment == null) {
mFindFragment = new FindFragment();
}
}
}
return mFindFragment;
}
public DataFragment getDataFragment() {
if (mDataFragment == null) {
synchronized (FragmentFactory.class) {
if (mDataFragment == null) {
mDataFragment = new DataFragment();
}
}
}
return mDataFragment;
}
public MeFragment getMeFragment() {
if (mMeFragment == null) {
synchronized (FragmentFactory.class) {
if (mMeFragment == null) {
mMeFragment = new MeFragment();
}
}
}
return mMeFragment;
}
}
|
[
"yangchong211@163.com"
] |
yangchong211@163.com
|
067e482837d49e173b2909cf12034df392a4eee5
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project26/src/main/java/org/gradle/test/performance26_4/Production26_337.java
|
5fd5e0af82a283bf6f9d7339f515a5f274fc0d01
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package org.gradle.test.performance26_4;
public class Production26_337 extends org.gradle.test.performance11_4.Production11_337 {
private final String property;
public Production26_337() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.