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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8b2ac36d3af0d58820f3e61457032b02af015e2f | 3610d31563396e62907f7698d3c30eb3aeca5f8b | /example/src/main/java/com/gaoyy/fastec/example/event/TestEvent.java | c55d739b99a253807c367c44e0bce7e999c1fc40 | [
"Apache-2.0"
] | permissive | gaoyuyu/FastEC | 92f5a1a2f6ae77b742efb5611528370832c21fc4 | fb5a21ba3a54847e279e3cb1f32ff23c59bdcf07 | refs/heads/master | 2021-09-06T01:49:05.762336 | 2018-02-01T12:03:46 | 2018-02-01T12:03:46 | 116,829,291 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 754 | java | package com.gaoyy.fastec.example.event;
import android.webkit.WebView;
import android.widget.Toast;
import com.gaoyy.latte.delegates.web.event.Event;
/**
* Created by gaoyy on 2018/1/22 0022.
*/
public class TestEvent extends Event
{
@Override
public String execute(String params)
{
Toast.makeText(getContext(), getAction(), Toast.LENGTH_LONG).show();
if (getAction().equals("test"))
{
final WebView webView = getWebView();
webView.post(new Runnable()
{
@Override
public void run()
{
webView.evaluateJavascript("nativeCall();", null);
}
});
}
return null;
}
}
| [
"740514999@qq.com"
] | 740514999@qq.com |
85089f61f81f58585508ec2230fbe706a7126458 | 69539213d5a1f5eb5b494ea5bf83fd4acc3e762f | /source/src/main/java/com/st/back/pageModel/PageMenuTree.java | 90111cb37bf3a1a413df6fbc93b3d07d9be41479 | [] | no_license | godaner/st | 64459222384e293c554c105408aa6c01e483b569 | 3c7470b194daed3fc42aad1043d797528db1b0d1 | refs/heads/master | 2021-01-19T17:24:50.558580 | 2017-08-23T14:23:55 | 2017-08-23T14:23:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,887 | java | package com.st.back.pageModel;
import java.io.Serializable;
import java.util.Map;
import com.st.pagemodel.BaseReceivePage;
public class PageMenuTree extends BaseReceivePage implements Serializable {
private String parentId;
private String parentText;
private String state;
private String id;
private String text;
private String icon;
private Map<String,Object> attrbutes;
public Map<String, Object> getAttrbutes() {
return attrbutes;
}
public void setAttrbutes(Map<String, Object> attrbutes) {
this.attrbutes = attrbutes;
}
public PageMenuTree() {
super();
// TODO Auto-generated constructor stub
}
@Override
public String toString() {
return "PageMenuTree [parentId=" + parentId + ", parentText="
+ parentText + ", state=" + state + ", id=" + id + ", text="
+ text + ", icon=" + icon + ", attrbutes=" + attrbutes + "]";
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getParentText() {
return parentText;
}
public void setParentText(String parentText) {
this.parentText = parentText;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public PageMenuTree(String parentId, String parentText, String state,
String id, String text, String icon, Map<String, Object> attrbutes) {
super();
this.parentId = parentId;
this.parentText = parentText;
this.state = state;
this.id = id;
this.text = text;
this.icon = icon;
this.attrbutes = attrbutes;
}
}
| [
"1138829222@qq.com"
] | 1138829222@qq.com |
843791ac39fe629d147925c0e57050bb9d8866b6 | ce996d943e3fe61721c679346f34469736276fcd | /springboot/spring-boot-08-data-jdbc/src/main/java/com/xhc/springboot/config/DruidConfig.java | e2b0008975ffdcd26b71f11891568b569faca056 | [] | no_license | xuhongchang2008/javadome | c43117584f1bb9450b335a0ba9999c0bc193bc9e | 3436f971ef14041a4b4d6160c5f6ef61648a9437 | refs/heads/master | 2023-03-02T03:44:10.181467 | 2021-02-02T05:23:01 | 2021-02-02T05:23:01 | 325,902,715 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,319 | java | package com.xhc.springboot.config;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.support.http.StatViewServlet;
import com.alibaba.druid.support.http.WebStatFilter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.Filter;
import javax.sql.DataSource;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* 绑定Druid相关信息
* @Auther: xhc
*/
@Configuration
public class DruidConfig {
@ConfigurationProperties(prefix = "spring.datasource")
@Bean
public DataSource druid() {
return new DruidDataSource();
}
/**
* 配置一个druid的监控
* 1. 配置一个druid的后台 管理servlet
* 2. 配置一个druid的filter
*
*/
// 1. 配置一个druid的后台管理servlet
@Bean
public ServletRegistrationBean statViewServlet() {
//注意:请求是 /druid/*
ServletRegistrationBean<StatViewServlet> bean = new ServletRegistrationBean<>(new StatViewServlet(), "/druid/*");
//设置初始化参数值
Map<String, String> initParam = new HashMap<>();
initParam.put(StatViewServlet.PARAM_NAME_USERNAME, "root");
initParam.put(StatViewServlet.PARAM_NAME_PASSWORD, "123");
//如果不写,则默认所有ip都可以访问
initParam.put(StatViewServlet.PARAM_NAME_ALLOW, "");
initParam.put(StatViewServlet.PARAM_NAME_DENY, "192.168.10.1");
bean.setInitParameters(initParam);
return bean;
}
//2. 配置一个druid的filter
@Bean
public FilterRegistrationBean webStatFilter() {
FilterRegistrationBean<Filter> bean = new FilterRegistrationBean<>();
bean.setFilter(new WebStatFilter());
Map<String, String> initPrams = new HashMap<>();
initPrams.put(WebStatFilter.PARAM_NAME_EXCLUSIONS, "*.js,*.css,/druid/*");
bean.setInitParameters(initPrams);
//设置拦截请求
bean.setUrlPatterns(Arrays.asList("/*"));
return bean;
}
}
| [
"8355853+xhc2008@user.noreply.gitee.com"
] | 8355853+xhc2008@user.noreply.gitee.com |
b93c4751cd4ad7677b09dbfee87eb1f8378476af | 7e90faa78ea37cefb6b01e386b3ed102eec5f704 | /src/minecraft/starcraft/mods/galacticraft/venus/wgen/GCVenusWorldChunkManager.java | a3d74d6f38996407f2bd66775b5b40a56f055918 | [] | no_license | mattulsko111/Galacticraft-Starcraft | 1da573952720a3be640b0e4326108e680114b6c5 | 52acb583cedd385b006901ba3fb473289d7d8bdb | refs/heads/master | 2021-01-17T20:22:00.366867 | 2013-11-09T14:51:11 | 2013-11-09T14:51:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,640 | java | package starcraft.mods.galacticraft.venus.wgen;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.BiomeCache;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.WorldChunkManager;
import net.minecraft.world.gen.layer.GenLayer;
import net.minecraft.world.gen.layer.IntCache;
public class GCVenusWorldChunkManager extends WorldChunkManager
{
private GenLayer genBiomes;
private GenLayer biomeIndexLayer;
private final BiomeCache biomeCache;
private final List biomesToSpawnIn;
private float rainfall;
protected GCVenusWorldChunkManager()
{
this.biomeCache = new BiomeCache(this);
this.biomesToSpawnIn = new ArrayList();
this.biomesToSpawnIn.add(GCVenusBiomeGenBase.VenusFlat);
}
public GCVenusWorldChunkManager(long par1, WorldType par3WorldType)
{
this();
final GenLayer[] var4 = GenLayer.initializeAllBiomeGenerators(par1, par3WorldType);
this.genBiomes = var4[0];
this.biomeIndexLayer = var4[1];
}
public GCVenusWorldChunkManager(World par1World, float par2)
{
this(par1World.getSeed(), par1World.getWorldInfo().getTerrainType());
this.rainfall = par2;
}
@Override
public List getBiomesToSpawnIn()
{
return this.biomesToSpawnIn;
}
@Override
public BiomeGenBase getBiomeGenAt(int par1, int par2)
{
return GCVenusBiomeGenBase.VenusFlat;
}
@Override
public float[] getRainfall(float[] par1ArrayOfFloat, int par2, int par3, int par4, int par5)
{
if (par1ArrayOfFloat == null || par1ArrayOfFloat.length < par4 * par5)
{
par1ArrayOfFloat = new float[par4 * par5];
}
Arrays.fill(par1ArrayOfFloat, 0, par4 * par5, 0);
return par1ArrayOfFloat;
}
@Override
public float getTemperatureAtHeight(float par1, int par2)
{
return par1;
}
@Override
public float[] getTemperatures(float[] par1ArrayOfFloat, int par2, int par3, int par4, int par5)
{
IntCache.resetIntCache();
if (par1ArrayOfFloat == null || par1ArrayOfFloat.length < par4 * par5)
{
par1ArrayOfFloat = new float[par4 * par5];
}
final int[] var6 = this.biomeIndexLayer.getInts(par2, par3, par4, par5);
for (int var7 = 0; var7 < par4 * par5; ++var7)
{
float var8 = BiomeGenBase.biomeList[var6[var7]].getIntTemperature() / 65536.0F;
if (var8 > 1.0F)
{
var8 = 1.0F;
}
par1ArrayOfFloat[var7] = var8;
}
return par1ArrayOfFloat;
}
@Override
public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5)
{
IntCache.resetIntCache();
if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
{
par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
}
final int[] var6 = this.genBiomes.getInts(par2, par3, par4, par5);
for (int var7 = 0; var7 < par4 * par5; ++var7)
{
par1ArrayOfBiomeGenBase[var7] = BiomeGenBase.biomeList[var6[var7]];
}
return par1ArrayOfBiomeGenBase;
}
@Override
public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5)
{
return this.getBiomeGenAt(par1ArrayOfBiomeGenBase, par2, par3, par4, par5, true);
}
@Override
public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5, boolean par6)
{
IntCache.resetIntCache();
if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
{
par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
}
if (par6 && par4 == 16 && par5 == 16 && (par2 & 15) == 0 && (par3 & 15) == 0)
{
final BiomeGenBase[] var9 = this.biomeCache.getCachedBiomes(par2, par3);
System.arraycopy(var9, 0, par1ArrayOfBiomeGenBase, 0, par4 * par5);
return par1ArrayOfBiomeGenBase;
}
else
{
final int[] var7 = this.biomeIndexLayer.getInts(par2, par3, par4, par5);
for (int var8 = 0; var8 < par4 * par5; ++var8)
{
par1ArrayOfBiomeGenBase[var8] = BiomeGenBase.biomeList[var7[var8]];
}
return par1ArrayOfBiomeGenBase;
}
}
@Override
public boolean areBiomesViable(int par1, int par2, int par3, List par4List)
{
final int var5 = par1 - par3 >> 2;
final int var6 = par2 - par3 >> 2;
final int var7 = par1 + par3 >> 2;
final int var8 = par2 + par3 >> 2;
final int var9 = var7 - var5 + 1;
final int var10 = var8 - var6 + 1;
final int[] var11 = this.genBiomes.getInts(var5, var6, var9, var10);
for (int var12 = 0; var12 < var9 * var10; ++var12)
{
final BiomeGenBase var13 = BiomeGenBase.biomeList[var11[var12]];
if (!par4List.contains(var13))
{
return false;
}
}
return true;
}
@Override
public ChunkPosition findBiomePosition(int par1, int par2, int par3, List par4List, Random par5Random)
{
final int var6 = par1 - par3 >> 2;
final int var7 = par2 - par3 >> 2;
final int var8 = par1 + par3 >> 2;
final int var9 = par2 + par3 >> 2;
final int var10 = var8 - var6 + 1;
final int var11 = var9 - var7 + 1;
final int[] var12 = this.genBiomes.getInts(var6, var7, var10, var11);
ChunkPosition var13 = null;
int var14 = 0;
for (int var15 = 0; var15 < var12.length; ++var15)
{
final int var16 = var6 + var15 % var10 << 2;
final int var17 = var7 + var15 / var10 << 2;
final BiomeGenBase var18 = BiomeGenBase.biomeList[var12[var15]];
if (par4List.contains(var18) && (var13 == null || par5Random.nextInt(var14 + 1) == 0))
{
var13 = new ChunkPosition(var16, 0, var17);
++var14;
}
}
return var13;
}
@Override
public void cleanupCache()
{
this.biomeCache.cleanupCache();
}
}
| [
"mattparks5855@gmail.com"
] | mattparks5855@gmail.com |
c97e00992d885883c6a3ea8b3ab4b424966f9c52 | 09832253bbd9c7837d4a380c7410bd116d9d8119 | /Web Based Learning/JavaTPoint/JavaTPoint/src/JavaMultithreading/JavaMethods/NewClass.java | f91bf98943b6f0f04cb8a1664abdf7fdb5372cd6 | [] | no_license | shshetu/Java | d892ae2725f8ad0acb2d98f5fd4e6ca2b1ce171e | 51bddc580432c74e0339588213ef9aa0d384169a | refs/heads/master | 2020-04-11T21:25:12.588859 | 2019-04-02T05:41:00 | 2019-04-02T05:41:00 | 162,104,906 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 285 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package JavaMultithreading.JavaMethods;
/**
*
* @author shshe
*/
public class NewClass {
}
| [
"shshetu2017@gmail.com"
] | shshetu2017@gmail.com |
fd03ba606f7c9cb105043260c2ecc0057f63ddfd | 107cd738109265ec96f7b304640345385a6e8c3e | /vf-client/src/main/java/com/bjshfb/vf/client/ipc/org/onvif/ver20/media/wsdl/GetConfiguration.java | 16da847ef3a1993c9e1f42256078d062482803ba | [] | no_license | cfjgithub/helm-p | 1efef7b7969ce7e45a13ec319e1d8c3de7a0afe2 | 09cf546d3ccd0b9d0350b5defbe79272209e2d09 | refs/heads/master | 2020-07-03T09:44:21.197548 | 2019-02-27T06:35:42 | 2019-02-27T06:35:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,648 | java | //
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 generiert
// Siehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// �nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
// Generiert: 2016.02.05 um 06:25:30 PM CET
//
package com.bjshfb.vf.client.ipc.org.onvif.ver20.media.wsdl;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java-Klasse f�r GetConfiguration complex type.
*
* <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
*
* <pre>
* <complexType name="GetConfiguration">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ConfigurationToken" type="{http://www.onvif.org/ver10/schema}ReferenceToken" minOccurs="0"/>
* <element name="ProfileToken" type="{http://www.onvif.org/ver10/schema}ReferenceToken" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GetConfiguration", propOrder = {
"configurationToken",
"profileToken"
})
public class GetConfiguration {
@XmlElement(name = "ConfigurationToken")
protected String configurationToken;
@XmlElement(name = "ProfileToken")
protected String profileToken;
/**
* Ruft den Wert der configurationToken-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getConfigurationToken() {
return configurationToken;
}
/**
* Legt den Wert der configurationToken-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setConfigurationToken(String value) {
this.configurationToken = value;
}
/**
* Ruft den Wert der profileToken-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfileToken() {
return profileToken;
}
/**
* Legt den Wert der profileToken-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfileToken(String value) {
this.profileToken = value;
}
}
| [
"fuzq@bjshfb.com"
] | fuzq@bjshfb.com |
1ff5f0a4db3fc658348f6148ce278b2c88d2c6c4 | 447520f40e82a060368a0802a391697bc00be96f | /apks/malware/app41/source/com/jeremyfeinstein/slidingmenu/lib/a.java | 27c7814ff89fc1bd184c8ec95a8a835f3c490c32 | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 307 | java | package com.jeremyfeinstein.slidingmenu.lib;
import android.view.animation.Interpolator;
class a
implements Interpolator
{
a() {}
public float getInterpolation(float paramFloat)
{
paramFloat -= 1.0F;
return paramFloat * (paramFloat * paramFloat * paramFloat * paramFloat) + 1.0F;
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
af309510493d964a183eff9b1af87839dd55db69 | 160a34361073a54d39ffa14fdae6ce3cbc7d6e6b | /src/main/java/com/alipay/api/domain/AlipayMarketingToolFengdieSitesSyncModel.java | 246ec37599b277e956d65359dfbfdc4fdb3c8d40 | [
"Apache-2.0"
] | permissive | appbootup/alipay-sdk-java-all | 6a5e55629b9fc77e61ee82ea2c4cdab2091e0272 | 9ae311632a4053b8e5064b83f97cf1503a00147b | refs/heads/master | 2020-05-01T09:45:44.940180 | 2019-03-15T09:52:14 | 2019-03-15T09:52:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,196 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 升级云凤蝶站点
*
* @author auto create
* @since 1.0, 2018-08-19 16:17:26
*/
public class AlipayMarketingToolFengdieSitesSyncModel extends AlipayObject {
private static final long serialVersionUID = 4426979883522466587L;
/**
* 欲升级的站点 ID
*/
@ApiField("activity_id")
private Long activityId;
/**
* 作为当前操作者的空间成员用户名, 值为 origin_user_id(即创建空间成员接口的入参),应确保 operator 是参数 space_id 对应的空间成员
*/
@ApiField("operator")
private String operator;
/**
* 欲升级的站点所归属的空间 ID
*/
@ApiField("space_id")
private String spaceId;
public Long getActivityId() {
return this.activityId;
}
public void setActivityId(Long activityId) {
this.activityId = activityId;
}
public String getOperator() {
return this.operator;
}
public void setOperator(String operator) {
this.operator = operator;
}
public String getSpaceId() {
return this.spaceId;
}
public void setSpaceId(String spaceId) {
this.spaceId = spaceId;
}
}
| [
"liuqun.lq@alibaba-inc.com"
] | liuqun.lq@alibaba-inc.com |
bd24408d63b31d2c011d6e8e50e6dfed8ca01ea4 | 1a305362fc8aa0e592c3c1f1208bed0b6f61af95 | /original/mip/src/main/java/br/edu/utfpr/cp/emater/midmipsystem/service/base/FieldService.java | b47d03f8bc89486fee89f7e1ae73590471e8d919 | [
"MIT"
] | permissive | goulartt/mip-serverless-tcc | bc590a0db7ea71afdf213cdd6939f22e651cf0b7 | bc379a0853268a6975bf96ed760ce8d3ed83683c | refs/heads/master | 2023-01-12T06:26:38.481383 | 2020-05-30T19:57:58 | 2020-05-30T19:57:58 | 225,483,326 | 0 | 0 | MIT | 2023-01-09T22:39:06 | 2019-12-02T22:44:37 | Java | UTF-8 | Java | false | false | 7,144 | java | package br.edu.utfpr.cp.emater.midmipsystem.service.base;
import br.edu.utfpr.cp.emater.midmipsystem.entity.base.City;
import br.edu.utfpr.cp.emater.midmipsystem.entity.base.Farmer;
import br.edu.utfpr.cp.emater.midmipsystem.entity.base.Field;
import br.edu.utfpr.cp.emater.midmipsystem.entity.base.Supervisor;
import br.edu.utfpr.cp.emater.midmipsystem.entity.security.MIPUserPrincipal;
import br.edu.utfpr.cp.emater.midmipsystem.exception.AnyPersistenceException;
import br.edu.utfpr.cp.emater.midmipsystem.exception.EntityAlreadyExistsException;
import br.edu.utfpr.cp.emater.midmipsystem.exception.EntityInUseException;
import br.edu.utfpr.cp.emater.midmipsystem.exception.EntityNotFoundException;
import br.edu.utfpr.cp.emater.midmipsystem.exception.SupervisorNotAllowedInCity;
import br.edu.utfpr.cp.emater.midmipsystem.repository.base.FieldRepository;
import br.edu.utfpr.cp.emater.midmipsystem.service.ICRUDService;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
public class FieldService implements ICRUDService<Field> {
private final FieldRepository fieldRepository;
private final CityService cityService;
private final FarmerService farmerService;
private final SupervisorService supervisorService;
@Override
public List<Field> readAll() {
return List.copyOf(fieldRepository.findAll());
}
public List<City> readAllCities() {
return cityService.readAll();
}
public List<Farmer> readAllFarmers() {
return farmerService.readAll();
}
public List<Supervisor> readAllSupervisors() {
return supervisorService.readAll();
}
@Override
public Field readById(Long anId) throws EntityNotFoundException {
return fieldRepository.findById(anId).orElseThrow(EntityNotFoundException::new);
}
private Set<Supervisor> retrieveSupervisors(Set<Supervisor> someSupervisors) throws EntityNotFoundException {
var result = new HashSet<Supervisor>();
for (Supervisor currentSupervisor : someSupervisors) {
result.add(supervisorService.readById(currentSupervisor.getId()));
}
return result;
}
private boolean isSupervisorIsAllowedInCity(Set<Supervisor> someSupervisors, Long idChosenCity) {
var idsCitiesSupervisors = someSupervisors.stream()
.map(Supervisor::getRegion)
.flatMap(currentRegion -> currentRegion.getCities().stream())
.map(City::getId)
.collect(Collectors.toSet());
return idsCitiesSupervisors.contains(idChosenCity);
}
public void create(Field aField) throws SupervisorNotAllowedInCity, EntityAlreadyExistsException, AnyPersistenceException, EntityNotFoundException {
if (fieldRepository.findAll().stream().anyMatch(currentField -> currentField.equals(aField))) {
throw new EntityAlreadyExistsException();
}
var theCity = cityService.readById(aField.getCityId());
var someSupervisors = this.retrieveSupervisors(aField.getSupervisors());
if (!isSupervisorIsAllowedInCity(someSupervisors, theCity.getId())) {
throw new SupervisorNotAllowedInCity();
}
var theFarmer = farmerService.readById(aField.getFarmerId());
try {
aField.setCity(theCity);
aField.setFarmer(theFarmer);
aField.setSupervisors(someSupervisors);
fieldRepository.save(aField);
} catch (Exception e) {
throw new AnyPersistenceException();
}
}
@Override
public void update(Field aField) throws SupervisorNotAllowedInCity, EntityAlreadyExistsException, EntityNotFoundException, AnyPersistenceException {
var existentField = fieldRepository.findById(aField.getId()).orElseThrow(EntityNotFoundException::new);
var allFieldsWithoutExistentField = new ArrayList<Field>(fieldRepository.findAll());
allFieldsWithoutExistentField.remove(existentField);
if (allFieldsWithoutExistentField.stream().anyMatch(currentField -> currentField.equals(aField))) {
throw new EntityAlreadyExistsException();
}
if (!isSupervisorIsAllowedInCity(aField.getSupervisors(), aField.getCityId()))
throw new SupervisorNotAllowedInCity();
try {
existentField.setName(aField.getName());
existentField.setLocation(aField.getLocation());
var theCity = cityService.readById(aField.getCityId());
var someSupervisors = this.retrieveSupervisors(aField.getSupervisors());
var theFarmer = farmerService.readById(aField.getFarmerId());
existentField.setCity(theCity);
existentField.setFarmer(theFarmer);
existentField.setSupervisors(someSupervisors);
fieldRepository.saveAndFlush(existentField);
} catch (Exception e) {
throw new AnyPersistenceException();
}
}
public void delete(Long anId) throws EntityNotFoundException, EntityInUseException, AnyPersistenceException {
var existentField = fieldRepository.findById(anId).orElseThrow(EntityNotFoundException::new);
var loggedUser = ((MIPUserPrincipal)SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUser();
var createdByName = existentField.getCreatedBy() != null ? existentField.getCreatedBy().getUsername() : "none";
if (!loggedUser.getUsername().equalsIgnoreCase(createdByName))
throw new AccessDeniedException("Usuário não autorizado para essa exclusão!");
try {
fieldRepository.delete(existentField);
} catch (DataIntegrityViolationException cve) {
throw new EntityInUseException();
} catch (Exception e) {
throw new AnyPersistenceException();
}
}
public City readCityById(Long selectedCityId) {
try {
return this.cityService.readById(selectedCityId);
} catch (EntityNotFoundException ex) {
return this.cityService.readAll().get(0);
}
}
public Farmer readFarmerById(Long selectedFarmerId) {
try {
return this.farmerService.readById(selectedFarmerId);
} catch (EntityNotFoundException ex) {
return this.farmerService.readAll().get(0);
}
}
public Set<Supervisor> readSupervisorsByIds(List<Long> selectedSupervisorIds) throws EntityNotFoundException {
var result = new HashSet<Supervisor>();
for (Long id: selectedSupervisorIds)
result.add(supervisorService.readById(id));
return result;
}
}
| [
"jv.goulart.almeida@hotmail.com"
] | jv.goulart.almeida@hotmail.com |
5af3e7b0b1d4f1a87a64f0bad982b21e0dbd6548 | 129f58086770fc74c171e9c1edfd63b4257210f3 | /src/testcases/CWE190_Integer_Overflow/CWE190_Integer_Overflow__byte_max_square_72a.java | 8ba67b71e2310e6d12d637d6ea3489485f6f3cd8 | [] | no_license | glopezGitHub/Android23 | 1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba | 6215d0684c4fbdc7217ccfbedfccfca69824cc5e | refs/heads/master | 2023-03-07T15:14:59.447795 | 2023-02-06T13:59:49 | 2023-02-06T13:59:49 | 6,856,387 | 0 | 3 | null | 2023-02-06T18:38:17 | 2012-11-25T22:04:23 | Java | UTF-8 | Java | false | false | 2,863 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__byte_max_square_72a.java
Label Definition File: CWE190_Integer_Overflow.label.xml
Template File: sources-sinks-72a.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: max Set data to the max value for byte
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: square
* GoodSink: Ensure there will not be an overflow before squaring data
* BadSink : Square data, which can lead to overflow
* Flow Variant: 72 Data flow: data passed in a Vector from one method to another in different source files in the same package
*
* */
package testcases.CWE190_Integer_Overflow;
import testcasesupport.*;
import java.util.Vector;
import java.sql.*;
import javax.servlet.http.*;
public class CWE190_Integer_Overflow__byte_max_square_72a extends AbstractTestCase
{
public void bad() throws Throwable
{
byte data;
/* POTENTIAL FLAW: Use the maximum size of the data type */
data = Byte.MAX_VALUE;
Vector<Byte> data_vector = new Vector<Byte>(5);
data_vector.add(0, data);
data_vector.add(1, data);
data_vector.add(2, data);
(new CWE190_Integer_Overflow__byte_max_square_72b()).bad_sink(data_vector );
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use GoodSource and BadSink */
private void goodG2B() throws Throwable
{
byte data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
Vector<Byte> data_vector = new Vector<Byte>(5);
data_vector.add(0, data);
data_vector.add(1, data);
data_vector.add(2, data);
(new CWE190_Integer_Overflow__byte_max_square_72b()).goodG2B_sink(data_vector );
}
/* goodB2G() - use BadSource and GoodSink */
private void goodB2G() throws Throwable
{
byte data;
/* POTENTIAL FLAW: Use the maximum size of the data type */
data = Byte.MAX_VALUE;
Vector<Byte> data_vector = new Vector<Byte>(5);
data_vector.add(0, data);
data_vector.add(1, data);
data_vector.add(2, data);
(new CWE190_Integer_Overflow__byte_max_square_72b()).goodB2G_sink(data_vector );
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"guillermo.pando@gmail.com"
] | guillermo.pando@gmail.com |
1acda6a40c7be6cc84cda2a0ef25c6345503c327 | 2d5327fb2c4ea8f34bb11d63df42f561af8c4d22 | /src/main/java/org/opengis/cite/cat30/opensearch/OpenSearchDescriptionTests.java | e5aac7b7f35de675f6cfc8405e14cd7973b9b8b6 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | kalxas/ets-cat30 | d90dbfbe816b1bc2ff92b4b83f7f11409bcf8708 | d0236b80be00e5f244d69af50c0e91aa2ef213c9 | refs/heads/master | 2021-01-15T08:40:25.841396 | 2015-01-21T14:38:57 | 2015-01-21T14:38:57 | 29,743,984 | 0 | 0 | null | 2015-01-23T17:25:24 | 2015-01-23T17:25:23 | null | UTF-8 | Java | false | false | 1,059 | java | package org.opengis.cite.cat30.opensearch;
/**
* Verifies the structure and content of the OpenSearch description document
* obtained from the SUT. The document is obtained in response to a GET request
* submitted to the base service endpoint where the <code>Accept</code> request
* header expresses a preference for any of the following media types:
*
* <ul>
* <li><code>application/vnd.a9.opensearchdescription+xml</code></li>
* <li><code>application/opensearchdescription+xml</code></li>
* </ul>
*
* <p>
* <strong>Note:</strong> None of the media types listed above appear in the
* IANA <a href="http://www.iana.org/assignments/media-types/media-types.xhtml"
* target="_blank">media type registry</a>. Registrations in the standards tree
* must be approved by the IESG or originate from a recognized standards body.
* </p>
*
* @see
* <a href="http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_elements"
* target="_blank">OpenSearch description elements</a>
*/
public class OpenSearchDescriptionTests {
}
| [
"rjmartell@computer.org"
] | rjmartell@computer.org |
a6525a47c1d667d013ee0dcdff75cb8ac90c7b7b | 94eaef1f7400bba50a696946154d6d95e68e95bc | /src/main/java/com/example/main/Utility.java | 6e77b52ae859467b69d758db91de0490d39ee6d5 | [] | no_license | Vkvipul91/mockito_assessment | 790f0467aee53d89b54a58e8e9ea735b98e7c1fe | 61fad6d0b4245e557aa2b4d6ae18c2dc3ed26a4f | refs/heads/master | 2021-01-05T13:53:19.350141 | 2020-02-22T07:13:00 | 2020-02-22T07:13:00 | 241,040,678 | 0 | 1 | null | 2020-10-13T19:36:06 | 2020-02-17T07:01:47 | Java | UTF-8 | Java | false | false | 448 | java | package com.example.main;
public class Utility {
public String truncateAInFirst2Positions(String str) {
if(str.length()<=2)
return str.replaceAll("A", " ");
String first2Chars = str.substring(0, 2);
String truncatedStr= str.substring(2);
return first2Chars.replaceAll("A", "") + truncatedStr;
}
public String toUpperCase(String lowerCaseStr) {
String uppercase = lowerCaseStr.toUpperCase();
return uppercase ;
}
}
| [
"="
] | = |
cc6d93c2c0f14e35f1a2f60602c4c67894507905 | 39046f98b04471973b607edc20af7330fe30fec4 | /jadx-decompile/android/support/v4/view/accessibility/AccessibilityManagerCompatIcs.java | 477761d2a60b7858b918f751269e21019af49054 | [] | no_license | riskyend/ThreeSeven | debb62c8f96c26bcd9d1510e60511704c484de92 | 58b1b4d8fc549c3f4c27aea3b1f55c1ac24140f3 | refs/heads/master | 2021-01-16T21:35:05.472707 | 2016-09-11T14:49:22 | 2016-09-11T14:49:22 | 68,145,881 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,238 | java | package android.support.v4.view.accessibility;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener;
import java.util.List;
class AccessibilityManagerCompatIcs {
interface AccessibilityStateChangeListenerBridge {
void onAccessibilityStateChanged(boolean z);
}
/* renamed from: android.support.v4.view.accessibility.AccessibilityManagerCompatIcs.1 */
static class AnonymousClass1 implements AccessibilityStateChangeListener {
final /* synthetic */ AccessibilityStateChangeListenerBridge val$bridge;
AnonymousClass1(AccessibilityStateChangeListenerBridge accessibilityStateChangeListenerBridge) {
this.val$bridge = accessibilityStateChangeListenerBridge;
}
public void onAccessibilityStateChanged(boolean enabled) {
this.val$bridge.onAccessibilityStateChanged(enabled);
}
}
AccessibilityManagerCompatIcs() {
}
public static Object newAccessibilityStateChangeListener(AccessibilityStateChangeListenerBridge bridge) {
return new AnonymousClass1(bridge);
}
public static boolean addAccessibilityStateChangeListener(AccessibilityManager manager, Object listener) {
return manager.addAccessibilityStateChangeListener((AccessibilityStateChangeListener) listener);
}
public static boolean removeAccessibilityStateChangeListener(AccessibilityManager manager, Object listener) {
return manager.removeAccessibilityStateChangeListener((AccessibilityStateChangeListener) listener);
}
public static List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList(AccessibilityManager manager, int feedbackTypeFlags) {
return manager.getEnabledAccessibilityServiceList(feedbackTypeFlags);
}
public static List<AccessibilityServiceInfo> getInstalledAccessibilityServiceList(AccessibilityManager manager) {
return manager.getInstalledAccessibilityServiceList();
}
public static boolean isTouchExplorationEnabled(AccessibilityManager manager) {
return manager.isTouchExplorationEnabled();
}
}
| [
"will748@gmail.com"
] | will748@gmail.com |
9f053b725bedbfcd4c489cca6788213aa297e0aa | 24fec8593856302f73cc1463e96532b67c3d6a4d | /mcp/temp/src/minecraft/net/minecraft/profiler/ProfilerResult.java | b3e9526832227b924b63694b22a3879727972427 | [
"BSD-3-Clause"
] | permissive | theorbtwo/visual-sound | 3cf8fc540728c334e66a39fdf921038c37db2cba | af76f171eddf6759097ea3445a55f18cdf4a86af | refs/heads/master | 2021-01-23T11:48:03.750673 | 2013-06-20T17:20:08 | 2013-06-20T17:20:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 990 | java | package net.minecraft.profiler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public final class ProfilerResult implements Comparable {
public double field_76332_a;
public double field_76330_b;
public String field_76331_c;
public ProfilerResult(String p_i3421_1_, double p_i3421_2_, double p_i3421_4_) {
this.field_76331_c = p_i3421_1_;
this.field_76332_a = p_i3421_2_;
this.field_76330_b = p_i3421_4_;
}
public int func_76328_a(ProfilerResult p_76328_1_) {
return p_76328_1_.field_76332_a < this.field_76332_a?-1:(p_76328_1_.field_76332_a > this.field_76332_a?1:p_76328_1_.field_76331_c.compareTo(this.field_76331_c));
}
@SideOnly(Side.CLIENT)
public int func_76329_a() {
return (this.field_76331_c.hashCode() & 11184810) + 4473924;
}
// $FF: synthetic method
public int compareTo(Object p_compareTo_1_) {
return this.func_76328_a((ProfilerResult)p_compareTo_1_);
}
}
| [
"james@mastros.biz"
] | james@mastros.biz |
48d5e65c98e97094bf2750ddb0844d819278d06a | cea3fe1ae551bf2f81b431876d15563d6347119b | /case 3.6.2 TCC-Transaction/default-springboot-feign-eureka/tcc-demo-capital/src/main/java/com/tcc/demo/capital/model/TradeOrder.java | a2362b44c61499a47eb79b844231943bc70642e2 | [] | no_license | black-ant/case | 2e33cbd74b559924d3a53092a8b070edea4d143d | 589598bb41398b330bc29b2ca61757296b55b579 | refs/heads/master | 2023-07-31T23:22:51.168312 | 2022-07-24T06:15:53 | 2022-07-24T06:15:53 | 137,761,384 | 86 | 26 | null | 2023-07-17T01:03:21 | 2018-06-18T14:22:01 | Java | UTF-8 | Java | false | false | 1,304 | java | package com.tcc.demo.capital.model;
import java.math.BigDecimal;
public class TradeOrder {
private long id;
private long selfUserId;
private long oppositeUserId;
private String merchantOrderNo;
private BigDecimal amount;
private String status = "DRAFT";
private long version = 1l;
public TradeOrder() {
}
public TradeOrder(long selfUserId, long oppositeUserId, String merchantOrderNo, BigDecimal amount) {
this.selfUserId = selfUserId;
this.oppositeUserId = oppositeUserId;
this.merchantOrderNo = merchantOrderNo;
this.amount = amount;
}
public long getId() {
return id;
}
public long getSelfUserId() {
return selfUserId;
}
public long getOppositeUserId() {
return oppositeUserId;
}
public String getMerchantOrderNo() {
return merchantOrderNo;
}
public BigDecimal getAmount() {
return amount;
}
public String getStatus() {
return status;
}
public void confirm() {
this.status = "CONFIRM";
}
public void cancel() {
this.status = "CANCEL";
}
public long getVersion() {
return version;
}
public void updateVersion() {
this.version = version + 1;
}
}
| [
"1016930479@qq.com"
] | 1016930479@qq.com |
8b6d96a697a7ddf09e505b110ca233bf8d9f4fa3 | 49d9a422a3cbc90e29acf10ec92586be6b650f3e | /src/main/java/org/maxgamer/quickshop/Command/SubCommands/SubCommand_Unlimited.java | b7d0dc4955cf8331f00b84260b6d65126ddec00c | [] | no_license | xSepticSidx/QuickShop-Reremake | 670f1c687f783b467e83c2cb97b7b36593b4c8e9 | 11e87bb894cf7540d9d2bfcd913aed9e38dfb820 | refs/heads/master | 2020-09-09T19:35:55.718028 | 2019-11-10T17:47:18 | 2019-11-10T17:47:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,965 | java | package org.maxgamer.quickshop.Command.SubCommands;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.util.BlockIterator;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.maxgamer.quickshop.Command.CommandProcesser;
import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.Shop.Shop;
import org.maxgamer.quickshop.Util.MsgUtil;
import java.util.ArrayList;
import java.util.List;
public class SubCommand_Unlimited implements CommandProcesser {
private QuickShop plugin = QuickShop.instance;
@Override
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
return new ArrayList<>();
}
@Override
public void onCommand(@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
if (sender instanceof Player) {
BlockIterator bIt = new BlockIterator((Player) sender, 10);
if (!bIt.hasNext()) {
sender.sendMessage(MsgUtil.getMessage("not-looking-at-shop",sender));
return;
}
while (bIt.hasNext()) {
Block b = bIt.next();
Shop shop = plugin.getShopManager().getShop(b.getLocation());
if (shop != null) {
shop.setUnlimited(!shop.isUnlimited());
//shop.setSignText();
shop.update();
sender.sendMessage(MsgUtil.getMessage("command.toggle-unlimited",sender,
(shop.isUnlimited() ? "unlimited" : "limited")));
return;
}
}
sender.sendMessage(MsgUtil.getMessage("not-looking-at-shop",sender));
} else {
sender.sendMessage("Only player can run this command.");
}
}
}
| [
"2908803755@qq.com"
] | 2908803755@qq.com |
52b37a348384c952c234dccf2f152acd24847e62 | 31e50022d4c02739ae9f83a9d5139b21f1e00bee | /plugins/org.wso2.developerstudio.visualdatamapper.diagram/src/org/wso2/developerstudio/datamapper/diagram/edit/policies/CeliCanonicalEditPolicy.java | 7f30218e032b28761dae3097f0ea0aadcbabae1f | [
"Apache-2.0"
] | permissive | wso2/devstudio-tooling-esb | d5ebc45a73e7c6090e230f0cb262dbfff5478b7d | a4004db3d576ce9e8f963a031d073508acbe8974 | refs/heads/master | 2023-06-28T18:28:44.267350 | 2021-01-04T06:46:30 | 2021-01-04T06:46:30 | 51,583,372 | 41 | 90 | Apache-2.0 | 2021-03-09T05:02:56 | 2016-02-12T11:25:57 | Java | UTF-8 | Java | false | false | 6,776 | java | package org.wso2.developerstudio.datamapper.diagram.edit.policies;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.wso2.developerstudio.datamapper.DataMapperPackage;
import org.wso2.developerstudio.datamapper.diagram.edit.parts.OperatorBasicContainerEditPart;
import org.wso2.developerstudio.datamapper.diagram.part.DataMapperDiagramUpdater;
import org.wso2.developerstudio.datamapper.diagram.part.DataMapperNodeDescriptor;
import org.wso2.developerstudio.datamapper.diagram.part.DataMapperVisualIDRegistry;
/**
* @generated
*/
public class CeliCanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
protected void refreshOnActivate() {
// Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
List<?> c = getHost().getChildren();
for (int i = 0; i < c.size(); i++) {
((EditPart) c.get(i)).activate();
}
super.refreshOnActivate();
}
/**
* @generated
*/
protected EStructuralFeature getFeatureToSynchronize() {
return DataMapperPackage.eINSTANCE.getOperator_BasicContainer();
}
/**
* @generated
*/
@SuppressWarnings("rawtypes")
protected List getSemanticChildrenList() {
View viewObject = (View) getHost().getModel();
LinkedList<EObject> result = new LinkedList<EObject>();
List<DataMapperNodeDescriptor> childDescriptors = DataMapperDiagramUpdater
.getCeli_2016SemanticChildren(viewObject);
for (DataMapperNodeDescriptor d : childDescriptors) {
result.add(d.getModelElement());
}
return result;
}
/**
* @generated
*/
protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
}
/**
* @generated
*/
private boolean isMyDiagramElement(View view) {
return OperatorBasicContainerEditPart.VISUAL_ID == DataMapperVisualIDRegistry.getVisualID(view);
}
/**
* @generated
*/
protected void refreshSemantic() {
if (resolveSemanticElement() == null) {
return;
}
LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
List<DataMapperNodeDescriptor> childDescriptors = DataMapperDiagramUpdater
.getCeli_2016SemanticChildren((View) getHost().getModel());
LinkedList<View> orphaned = new LinkedList<View>();
// we care to check only views we recognize as ours
LinkedList<View> knownViewChildren = new LinkedList<View>();
for (View v : getViewChildren()) {
if (isMyDiagramElement(v)) {
knownViewChildren.add(v);
}
}
// alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
//
// iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
// iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
// to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
for (Iterator<DataMapperNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator
.hasNext();) {
DataMapperNodeDescriptor next = descriptorsIterator.next();
String hint = DataMapperVisualIDRegistry.getType(next.getVisualID());
LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
for (View childView : getViewChildren()) {
EObject semanticElement = childView.getElement();
if (next.getModelElement().equals(semanticElement)) {
if (hint.equals(childView.getType())) {
perfectMatch.add(childView);
// actually, can stop iteration over view children here, but
// may want to use not the first view but last one as a 'real' match (the way original CEP does
// with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
}
}
}
if (perfectMatch.size() > 0) {
descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
// use only one view (first or last?), keep rest as orphaned for further consideration
knownViewChildren.remove(perfectMatch.getFirst());
}
}
// those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
// or those we have potential matches to, and thus need to be recreated, preserving size/location information.
orphaned.addAll(knownViewChildren);
//
ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(
childDescriptors.size());
for (DataMapperNodeDescriptor next : childDescriptors) {
String hint = DataMapperVisualIDRegistry.getType(next.getVisualID());
IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter,
Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
Command cmd = getCreateViewCommand(request);
if (cmd != null && cmd.canExecute()) {
SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
executeCommand(cmd);
@SuppressWarnings("unchecked")
List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
createdViews.addAll(nl);
}
if (changed || createdViews.size() > 0) {
postProcessRefreshSemantic(createdViews);
}
if (createdViews.size() > 1) {
// perform a layout of the container
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews,
host());
executeCommand(new ICommandProxy(layoutCmd));
}
makeViewsImmutable(createdViews);
}
}
| [
"erandacr@gmail.com"
] | erandacr@gmail.com |
1ee6d52f90916b86237d22e285dcbeb5a368dc92 | 83cd3869b2639af3e54b71d5116d5981100abf86 | /_/src/org/grandtestauto/test/functiontest/PackageNameAbbreviation.java | f3f6891e056a0457a6f0c98e3667b8bd3541ebea | [
"Apache-2.0"
] | permissive | paullewallencom/swing-978-1-8471-9482-4 | 37e7ce050a11309bc78080d90603d12d87007a1b | 49e4ba58aa3db09790a792f242d8d055cb00a1b7 | refs/heads/main | 2023-02-08T03:21:59.007111 | 2021-01-01T03:35:30 | 2021-01-01T03:35:30 | 319,498,894 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,657 | java | package org.grandtestauto.test.functiontest;
import org.grandtestauto.*;
import org.grandtestauto.test.*;
import java.util.*;
import java.io.*;
import jet.testtools.test.org.grandtestauto.*;
/**
* See the GrandTestAuto test specification.
*/
public class PackageNameAbbreviation extends FTBase {
public boolean runTest() {
testsRun = new LinkedList<String>();
Set<String> expectedTestsRun = new HashSet<String>();
expectedTestsRun.add( "a85.mammals.placental.test.UnitTester" );
expectedTestsRun.add( "a85.reptiles.lizards.test.UnitTester" );
expectedTestsRun.add( "a85.reptiles.snakes.test.UnitTester" );
GrandTestAuto gta = Helpers.setupForZip( new File( Grandtestauto.test85_zip ), true, true, true, "a.m.p", "", "", false, false, "", true, null, null,null, null, null, null );
gta.runAllTests();
assert testsRun.size() == 3;
assert testsRun.containsAll( expectedTestsRun );
testsRun = new LinkedList<String>();
expectedTestsRun = new HashSet<String>();
expectedTestsRun.add( "a85.mammals.placental.test.UnitTester" );
expectedTestsRun.add( "a85.reptiles.lizards.test.UnitTester" );
gta = Helpers.setupForZip( new File( Grandtestauto.test85_zip ), true, true, true, "a.m.p", "a.r.l", "", false, false, "", true, null, null,null, null, null, null );
gta.runAllTests();
assert testsRun.size() == 2;
assert testsRun.containsAll( expectedTestsRun );
testsRun = new LinkedList<String>();
expectedTestsRun = new HashSet<String>();
expectedTestsRun.add( "a85.birds.rattites.test.UnitTester" );
expectedTestsRun.add( "a85.birds.songbirds.test.UnitTester" );
expectedTestsRun.add( "a85.mammals.marsupials.test.UnitTester" );
gta = Helpers.setupForZip( new File( Grandtestauto.test85_zip ), true, true, true, null, "a.m.m", "", false, false, "", true, null, null,null, null, null, null );
gta.runAllTests();
assert testsRun.size() == 3;
assert testsRun.containsAll( expectedTestsRun );
testsRun = new LinkedList<String>();
expectedTestsRun = new HashSet<String>();
expectedTestsRun.add( "a85.mammals.monotremes.test.UnitTester" );
gta = Helpers.setupForZip( new File( Grandtestauto.test85_zip ), true, true, true, "a.b.r", "a.r.s", "a.m.mo", false, false, "", true, null, null,null, null, null, null );
gta.runAllTests();
assert testsRun.size() == 1;
assert testsRun.containsAll( expectedTestsRun );
return true;
}
}
| [
"paullewallencom@users.noreply.github.com"
] | paullewallencom@users.noreply.github.com |
2cc2df17cd962b9939598d6fadafed8956171e45 | 3b6aa5a6b93040bca3fa02b38e5278cf0c866250 | /Unidad3/PersonaTCP/src/personatcp/ServidorAlumnos.java | af193bc9067d27d87af67365921435fee0f6ae69 | [
"Apache-2.0"
] | permissive | cmontellanob/SistemasDistribuidos2-2020 | dceecd952e53ef0c73d4ce59e0fe7fd2fc2ce8d8 | 8a3e3b0b38527ca157b6f85e247103dd6c743311 | refs/heads/main | 2023-03-11T01:41:28.453318 | 2021-02-23T21:29:39 | 2021-02-23T21:29:39 | 310,410,701 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,620 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package personatcp;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.ObjectInputStream;
import java.io.PrintStream;
import java.net.ServerSocket;
import java.net.Socket;
/**
*
* @author Carlos
*/
public class ServidorAlumnos {
public static void main(String[] args) throws ClassNotFoundException {
int port = 5001;
try {
while (true) {
ServerSocket server = new ServerSocket(port);
System.out.println("Se inicio el servidor");
Socket client;
PrintStream toClient;
client = server.accept();
ObjectInputStream fromClient = new ObjectInputStream(client.getInputStream());
System.out.println("Cliente se conecto");
Operacion o = (Operacion) fromClient.readObject(); //cast : convertir
{
System.out.println(o.alumno.getApellido());
}
System.out.println(o.alumno.getNombre());
toClient = new PrintStream(client.getOutputStream());
toClient.println("Respuesta");
System.out.println("Cliente se conecto");
}
} catch (IOException e) {
System.out.println(e.getMessage());
}
}
}
| [
"carlosmontellano@gmail.com"
] | carlosmontellano@gmail.com |
a2279b1b8ab1d9a49d37b9f51676b956702d7de2 | 70cbaeb10970c6996b80a3e908258f240cbf1b99 | /WiFi万能钥匙dex1-dex2jar.jar.src/com/wifi/connect/d/e.java | 6057321b18290062d1e5499d983a760012f53a6a | [] | no_license | nwpu043814/wifimaster4.2.02 | eabd02f529a259ca3b5b63fe68c081974393e3dd | ef4ce18574fd7b1e4dafa59318df9d8748c87d37 | refs/heads/master | 2021-08-28T11:11:12.320794 | 2017-12-12T03:01:54 | 2017-12-12T03:01:54 | 113,553,417 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 504 | java | package com.wifi.connect.d;
import android.os.Handler;
import android.os.Looper;
final class e
extends Thread
{
e(d paramd) {}
public final void run()
{
Looper.prepare();
Handler localHandler = new Handler();
localHandler.postDelayed(new f(this, localHandler), 35000L);
Looper.loop();
}
}
/* Location: /Users/hanlian/Downloads/WiFi万能钥匙dex1-dex2jar.jar!/com/wifi/connect/d/e.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"lianh@jumei.com"
] | lianh@jumei.com |
f579e823e68cca5e25e2ccd57daee6543239a344 | 9a52fe3bcdd090a396e59c68c63130f32c54a7a8 | /sources/com/google/android/gms/internal/ads/zzbxs.java | 721c6961e2ad51e2b10d4c59b8b878c376b3f096 | [] | no_license | mzkh/LudoKing | 19d7c76a298ee5bd1454736063bc392e103a8203 | ee0d0e75ed9fa8894ed9877576d8e5589813b1ba | refs/heads/master | 2022-04-25T06:08:41.916017 | 2020-04-14T17:00:45 | 2020-04-14T17:00:45 | 255,670,636 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,453 | java | package com.google.android.gms.internal.ads;
import android.os.RemoteException;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewParent;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.view.ViewTreeObserver.OnScrollChangedListener;
import com.google.android.gms.ads.internal.zzq;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.ObjectWrapper;
import java.util.Collections;
/* compiled from: com.google.android.gms:play-services-ads@@18.2.0 */
public final class zzbxs extends zzage implements OnGlobalLayoutListener, OnScrollChangedListener, zzaav {
private boolean zzegn = false;
private zzwr zzflj;
private View zzflo;
private zzbuj zzfml;
private boolean zzfpi = false;
public zzbxs(zzbuj zzbuj, zzbur zzbur) {
this.zzflo = zzbur.zzaht();
this.zzflj = zzbur.getVideoController();
this.zzfml = zzbuj;
if (zzbur.zzahu() != null) {
zzbur.zzahu().zza((zzaav) this);
}
}
public final void zza(IObjectWrapper iObjectWrapper, zzagh zzagh) throws RemoteException {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
if (this.zzegn) {
zzaug.zzes("Instream ad is destroyed already.");
zza(zzagh, 2);
} else if (this.zzflo == null || this.zzflj == null) {
String str = "Instream internal error: ";
String str2 = this.zzflo == null ? "can not get video view." : "can not get video controller.";
zzaug.zzes(str2.length() != 0 ? str.concat(str2) : new String(str));
zza(zzagh, 0);
} else if (this.zzfpi) {
zzaug.zzes("Instream ad should not be used again.");
zza(zzagh, 1);
} else {
this.zzfpi = true;
zzajc();
((ViewGroup) ObjectWrapper.unwrap(iObjectWrapper)).addView(this.zzflo, new LayoutParams(-1, -1));
zzq.zzlg();
zzayd.zza(this.zzflo, (OnGlobalLayoutListener) this);
zzq.zzlg();
zzayd.zza(this.zzflo, (OnScrollChangedListener) this);
zzajd();
try {
zzagh.zzrc();
} catch (RemoteException e) {
zzaug.zze("#007 Could not call remote method.", e);
}
}
}
public final zzwr getVideoController() throws RemoteException {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
if (!this.zzegn) {
return this.zzflj;
}
zzaug.zzes("getVideoController: Instream ad should not be used after destroyed");
return null;
}
public final void destroy() throws RemoteException {
Preconditions.checkMainThread("#008 Must be called on the main UI thread.");
zzajc();
zzbuj zzbuj = this.zzfml;
if (zzbuj != null) {
zzbuj.destroy();
}
this.zzfml = null;
this.zzflo = null;
this.zzflj = null;
this.zzegn = true;
}
private final void zzajc() {
View view = this.zzflo;
if (view != null) {
ViewParent parent = view.getParent();
if (parent instanceof ViewGroup) {
((ViewGroup) parent).removeView(this.zzflo);
}
}
}
public final void onGlobalLayout() {
zzajd();
}
public final void onScrollChanged() {
zzajd();
}
public final void zzqj() {
zzaul.zzdsu.post(new zzbxv(this));
}
private final void zzajd() {
zzbuj zzbuj = this.zzfml;
if (zzbuj != null) {
View view = this.zzflo;
if (view != null) {
zzbuj.zzb(view, Collections.emptyMap(), Collections.emptyMap(), zzbuj.zzx(this.zzflo));
}
}
}
private static void zza(zzagh zzagh, int i) {
try {
zzagh.zzcj(i);
} catch (RemoteException e) {
zzaug.zze("#007 Could not call remote method.", e);
}
}
/* access modifiers changed from: 0000 */
public final /* synthetic */ void zzaje() {
try {
destroy();
} catch (RemoteException e) {
zzaug.zze("#007 Could not call remote method.", e);
}
}
}
| [
"mdkhnmm@amazon.com"
] | mdkhnmm@amazon.com |
a7bbdf78261f28a96b0f190ff3c1c13b946c3377 | 5c75395617a3b29a0da24c09b20a41cdd8e7e77e | /src/RandomNumberBetweenTwoNumbers.java | 8cf0a72caaa5a03869e087d1a2042f22ed1d17f9 | [] | no_license | mhmmtkkl/project1 | 8fdebf0f413691437155ecb2cdf26dbb098f84ba | 77abdd1e24f29c7b91a75f6fdd14e5a82e8f8ea7 | refs/heads/master | 2021-04-24T06:00:15.835102 | 2020-04-04T05:06:16 | 2020-04-04T05:06:16 | 250,088,932 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 623 | java | import java.util.Random;
import java.util.Scanner;
public class RandomNumberBetweenTwoNumbers {
/*
Given two positive integer numbers
integer 1 is min
integer 2 is max
create a random number between min and max
output should be int
*/
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String s1 = scanner.nextLine();
String[] elements = s1.split(" ");
int min = Integer.parseInt(elements[0]);
int max = Integer.parseInt(elements[1]);
// code Start here don't change before this line
}
}
| [
"makoklu32@gmail.com"
] | makoklu32@gmail.com |
779c3449da2610cec7b43030b3ac707ee27152ee | 0ae8e5de8121fdcf87034011c2466b4997820af4 | /app/src/main/java/ly/pp/addsongs/C1207im.java | 8d30cd27b488b05cdd49dbea3e058854dd824906 | [] | no_license | a252539783/JPapplication | 083d4cd4bfd15ae7f09d7083c45fc83e1d467941 | 6f921c97fba092616b11b1c2e1fae35f086cce01 | refs/heads/master | 2020-05-02T21:37:39.621797 | 2019-03-28T02:24:39 | 2019-03-28T02:24:39 | 178,226,491 | 1 | 0 | null | 2019-03-28T15:00:51 | 2019-03-28T15:00:51 | null | UTF-8 | Java | false | false | 666 | java | package ly.pp.addsongs;
import android.view.View;
import android.view.View.OnClickListener;
/* renamed from: ly.pp.addsongs.im */
final class C1207im implements OnClickListener {
/* renamed from: a */
final /* synthetic */ C1205ik f5662a;
/* renamed from: b */
private final /* synthetic */ int f5663b;
/* renamed from: c */
private final /* synthetic */ byte f5664c;
C1207im(C1205ik c1205ik, int i, byte b) {
this.f5662a = c1205ik;
this.f5663b = i;
this.f5664c = b;
}
public final void onClick(View view) {
this.f5662a.f5657d.mo2826a(this.f5663b, this.f5664c);
}
}
| [
"2431548195@qq.com"
] | 2431548195@qq.com |
e4285c55fbd277b40615d533d839f5cf8f7ce465 | 8db126cab8c6a578604369b86984ce6d2f8057d0 | /domino-ui/src/main/java/org/dominokit/domino/ui/Typography/Strong.java | 51e94e13084785c507109f8e031193293bbb0c4d | [
"Apache-2.0"
] | permissive | sigemp/domino-ui | 8013631ec3e88aa510c30f3147eaa9c079961dd3 | 113e2fb78dd9f2dc9298708e68df9f8a8471ba8b | refs/heads/master | 2020-07-15T11:16:10.112057 | 2019-08-31T08:54:46 | 2019-08-31T08:54:46 | 205,550,216 | 1 | 0 | Apache-2.0 | 2019-08-31T13:47:56 | 2019-08-31T13:47:56 | null | UTF-8 | Java | false | false | 584 | java | package org.dominokit.domino.ui.Typography;
import elemental2.dom.HTMLElement;
import org.dominokit.domino.ui.utils.BaseDominoElement;
import static org.jboss.gwt.elemento.core.Elements.strong;
public class Strong extends BaseDominoElement<HTMLElement, Strong> {
private HTMLElement element = strong().asElement();
public Strong(String text){
element.textContent = text;
init(this);
}
public static Strong of(String text){
return new Strong(text);
}
@Override
public HTMLElement asElement() {
return element;
}
}
| [
"akabme@gmail.com"
] | akabme@gmail.com |
ad3bdf0427dda1872c928b10caa76d8e2b5c47c1 | a0cd546101594e679544d24f92ae8fcc17013142 | /refactorit-core/src/main/java/net/sf/refactorit/loader/CancelSupport.java | 91af9e97b628b4d411da92849a0265d5d59d6f0e | [] | no_license | svn2github/RefactorIT | f65198bb64f6c11e20d35ace5f9563d781b7fe5c | 4b1fc1ebd06c8e192af9ccd94eb5c2d96f79f94c | refs/heads/master | 2021-01-10T03:09:28.310366 | 2008-09-18T10:17:56 | 2008-09-18T10:17:56 | 47,540,746 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,006 | java | /*
* Copyright 2001-2008 Aqris Software AS. All rights reserved.
*
* This program is dual-licensed under both the Common Development
* and Distribution License ("CDDL") and the GNU General Public
* License ("GPL"). You may elect to use one or the other of these
* licenses.
*/
package net.sf.refactorit.loader;
/**
*
*
* @author Tonis Vaga
*/
public final class CancelSupport {
/**
* Checks if interrupted flag is set for current thread
* and stops thread if it is.
*
* @throws {@link CanceledException}
*/
public static final void checkThreadInterrupted() {
// check and clear status
if (Thread.interrupted()) {
// try {
// System.out.println("stopping thread with thread.stop()");
// FIXME: <code>Thread.stop()</code> is deprecated.
// Thread.currentThread().stop();
throw new CanceledException("RIT interrupted");
// } catch(Exception e) {
// DebugInfo.traceException(e);
// }
}
}
}
| [
"l950637@285b47d1-db48-0410-a9c5-fb61d244d46c"
] | l950637@285b47d1-db48-0410-a9c5-fb61d244d46c |
533f3f613e017a43fd535d2809a12291bcc2f497 | 3e4ab592071e8d58fc6867eed9bee1424f89ca27 | /MaterialDesign/src/main/java/com/gc/materialdesign/views/ButtonFlat.java | d26c377c94572eb3e2f7fedfac1c4f2bf9849226 | [] | no_license | Jeffery336699/EMWMatrix | 8e7a2d7ff1866849e7669716bc2ddf75c2c52ba5 | 1a47328cf63fb3b10635de113003d95f23b8df2f | refs/heads/master | 2020-04-13T17:39:37.665204 | 2019-01-09T05:59:26 | 2019-01-09T05:59:26 | 163,353,607 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,089 | java | package com.gc.materialdesign.views;
import com.gc.materialdesign.R;
import com.gc.materialdesign.utils.Utils;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class ButtonFlat extends Button {
TextView textButton;
public ButtonFlat(Context context, AttributeSet attrs) {
super(context, attrs);
}
protected void setDefaultProperties(){
minHeight = 36;
minWidth = 88;
rippleSize = 3;
// Min size
setMinimumHeight(Utils.dpToPx(minHeight, getResources()));
setMinimumWidth(Utils.dpToPx(minWidth, getResources()));
setBackgroundResource(R.drawable.background_transparent);
}
@Override
protected void setAttributes(AttributeSet attrs) {
// Set text button
String text = null;
int textResource = attrs.getAttributeResourceValue(ANDROIDXML,"text",-1);
if(textResource != -1){
text = getResources().getString(textResource);
}else{
text = attrs.getAttributeValue(ANDROIDXML,"text");
}
if(text != null){
textButton = new TextView(getContext());
textButton.setText(text.toUpperCase());
textButton.setTextColor(backgroundColor);
// textButton.setTypeface(null, Typeface.BOLD);
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
params.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
textButton.setLayoutParams(params);
addView(textButton);
}
int bacgroundColor = attrs.getAttributeResourceValue(ANDROIDXML,"background",-1);
if(bacgroundColor != -1){
setBackgroundColor(getResources().getColor(bacgroundColor));
}else{
// Color by hexadecimal
// Color by hexadecimal
background = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
if (background != -1)
setBackgroundColor(background);
}
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (x != -1) {
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(makePressColor());
canvas.drawCircle(x, y, radius, paint);
if(radius > getHeight()/rippleSize)
radius += 50f;
if(radius >= getWidth()){
x = -1;
y = -1;
radius = getHeight()/rippleSize;
if(onClickListener != null&& clickAfterRipple)
onClickListener.onClick(this);
}
invalidate();
}
}
/**
* Make a dark color to ripple effect
* @return
*/
@Override
protected int makePressColor(){
return Color.parseColor("#88DDDDDD");
}
public void setText(String text){
textButton.setText(text.toUpperCase());
}
// Set color of background
public void setBackgroundColor(int color){
backgroundColor = color;
if(isEnabled())
beforeBackground = backgroundColor;
textButton.setTextColor(color);
}
@Override
public TextView getTextView() {
return textButton;
}
public String getText(){
return textButton.getText().toString();
}
}
| [
"912833721@qq.com"
] | 912833721@qq.com |
652fc132691337f3d915987d41db4778ef09240b | 66d19fb59331f32520362c8478c5a7c19000e2ce | /mes-root/mes-auto-core/src/main/java/com/hengyi/japp/mes/auto/interfaces/riamb/dto/RiambSilkDetachEventDTO.java | 7cc903cb0efd31ae8ec067b2329bf870176fad00 | [] | no_license | ixtf/mes | d5008c03e383780b7b3bc85ea3cce7afec4b9d71 | 713c50add9e6cc4ba919a2c5a3a61fe5690d411d | refs/heads/master | 2023-01-07T08:10:16.505287 | 2019-11-11T20:35:12 | 2019-11-11T20:35:12 | 195,050,351 | 1 | 1 | null | 2023-01-07T07:27:21 | 2019-07-03T12:36:28 | Java | UTF-8 | Java | false | false | 550 | java | package com.hengyi.japp.mes.auto.interfaces.riamb.dto;
import com.hengyi.japp.mes.auto.dto.EntityDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @author jzb 2018-06-22
*/
@Data
public class RiambSilkDetachEventDTO implements Serializable {
@NotBlank
private SilkCarInfo silkCarInfo;
@NotBlank
private List<String> silkCodes;
@Data
public static class SilkCarInfo extends EntityDTO {
@NotBlank
private String code;
}
}
| [
"ixtf1984@gmail.com"
] | ixtf1984@gmail.com |
1eb4e6dd7c330c59a93ec1245836bf834420ec67 | 447520f40e82a060368a0802a391697bc00be96f | /apks/malware/app81/source/com/pay/http/APHttpHandle.java | 5a60e1790118a180644c18392f1fa4ddddf058c9 | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 1,530 | java | package com.pay.http;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import java.util.HashMap;
public class APHttpHandle
extends Handler
{
private static APHttpHandle a;
private static Object b = new Object();
private HashMap c = new HashMap();
private APHttpHandle() {}
private void a(Message paramMessage)
{
int i = paramMessage.what;
paramMessage = (APBaseHttpAns)paramMessage.obj;
String str = paramMessage.getHttpReqKey();
IAPHttpAnsObserver localIAPHttpAnsObserver = (IAPHttpAnsObserver)this.c.get(str);
if (localIAPHttpAnsObserver == null)
{
Log.i("HttpHandler", "observer is null");
return;
}
unregister(str);
switch (i)
{
default:
return;
case 3:
localIAPHttpAnsObserver.onFinish(paramMessage);
return;
case 4:
localIAPHttpAnsObserver.onError(paramMessage);
return;
}
localIAPHttpAnsObserver.onStop(paramMessage);
}
public static APHttpHandle getIntanceHandel()
{
synchronized (b)
{
if (a == null) {
a = new APHttpHandle();
}
return a;
}
}
public void handleMessage(Message paramMessage)
{
a(paramMessage);
}
public void register(String paramString, IAPHttpAnsObserver paramIAPHttpAnsObserver)
{
this.c.put(paramString, paramIAPHttpAnsObserver);
}
public void release()
{
a = null;
}
public void unregister(String paramString)
{
this.c.remove(paramString);
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
cb49e5eb7b79d1ca253f19f18a5f34e8a50d01bd | 9b4e1dc34118de4a35c164b797bed84bff040c0e | /src/test/java/org/telscenter/sail/webapp/presentation/web/controllers/student/AddProjectControllerTest.java | 5126032112bb0ce84980c156cbf14fbf64c4cdea | [] | no_license | WISE-Community/WISE-Portal--Deprecated-- | be056cf1d8bf452122eb8c89656fb21f5bb78006 | 60cdf439f5aba2ad68364d7be5a7e913e0d74d86 | refs/heads/master | 2021-01-23T22:15:48.433951 | 2013-10-29T23:28:48 | 2013-10-29T23:28:48 | 2,350,503 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,929 | java | /**
* Copyright (c) 2007 Regents of the University of California (Regents). Created
* by TELS, Graduate School of Education, University of California at Berkeley.
*
* This software is distributed under the GNU Lesser General Public License, v2.
*
* Permission is hereby granted, without written agreement and without license
* or royalty fees, to use, copy, modify, and distribute this software and its
* documentation for any purpose, provided that the above copyright notice and
* the following two paragraphs appear in all copies of this software.
*
* REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE. THE SOFTWAREAND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED
* HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
* SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
* REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.telscenter.sail.webapp.presentation.web.controllers.student;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import java.util.HashSet;
import java.util.Set;
import javax.servlet.http.HttpSession;
import net.sf.sail.webapp.dao.ObjectNotFoundException;
import net.sf.sail.webapp.domain.User;
import net.sf.sail.webapp.domain.group.Group;
import net.sf.sail.webapp.domain.group.impl.PersistentGroup;
import net.sf.sail.webapp.domain.impl.UserImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockHttpSession;
import org.springframework.test.web.AbstractModelAndViewTests;
import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import org.telscenter.sail.webapp.domain.PeriodNotFoundException;
import org.telscenter.sail.webapp.domain.Run;
import org.telscenter.sail.webapp.domain.StudentUserAlreadyAssociatedWithRunException;
import org.telscenter.sail.webapp.domain.impl.AddProjectParameters;
import org.telscenter.sail.webapp.domain.impl.Projectcode;
import org.telscenter.sail.webapp.domain.impl.RunImpl;
import org.telscenter.sail.webapp.service.student.StudentService;
/**
* @author Hiroki Terashima
* @version $Id$
*/
public class AddProjectControllerTest extends AbstractModelAndViewTests {
private static final String RUNCODE = "fly8978";
private static final String PERIODNAME = "3";
private static final String LEGAL_PROJECTCODE = RUNCODE + "-" + PERIODNAME;
private final String RUNCODE_NOT_IN_DB = "abc1234";
private final String PERIODNAME_NOT_IN_DB = "thisperioddoesnotexist";
private static final String SUCCESS = "SUCCESS VIEW";
private static final String FORM = "FORM VIEW";
private AddProjectController addProjectController;
private AddProjectParameters addProjectParameters;
private StudentService mockStudentService;
private ApplicationContext mockApplicationContext;
private MockHttpServletRequest request;
private MockHttpServletResponse response;
private HttpSession mockSession;
private BindException errors;
private Run run;
private Group group;
private User user;
/**
* @throws Exception
* @see junit.framework.TestCase#setUp()
*/
@SuppressWarnings("unchecked")
protected void setUp() throws Exception {
super.setUp();
mockApplicationContext = createMock(ApplicationContext.class);
request = new MockHttpServletRequest();
response = new MockHttpServletResponse();
addProjectParameters = new AddProjectParameters();
addProjectParameters.setProjectcode(LEGAL_PROJECTCODE);
errors = new BindException(addProjectParameters, "");
mockSession = new MockHttpSession();
this.user = new UserImpl();
mockSession.setAttribute(User.CURRENT_USER_SESSION_KEY, this.user);
this.request.setSession(mockSession);
run = new RunImpl();
group = new PersistentGroup();
group.setName(PERIODNAME);
Set<Group> periods = new HashSet<Group>();
periods.add(group);
run.setPeriods(periods);
this.mockStudentService = createMock(StudentService.class);
addProjectController = new AddProjectController();
addProjectController.setApplicationContext(mockApplicationContext);
addProjectController.setStudentService(mockStudentService);
addProjectController.setSuccessView(SUCCESS);
addProjectController.setFormView(FORM);
}
public void testOnSubmit_success() throws Exception {
// test submission of form with correct projectcode info.
// should get ModelAndView back containing success view
mockStudentService.addStudentToRun(user, new Projectcode(LEGAL_PROJECTCODE));
expectLastCall();
replay(mockStudentService);
ModelAndView modelAndView = addProjectController.onSubmit(request, response, addProjectParameters, errors);
assertEquals(SUCCESS, modelAndView.getViewName());
assertTrue(!errors.hasErrors());
verify(mockStudentService);
}
public void testOnSubmit_failure_bad_runcode() throws Exception {
// test submission of form with projectcode that has a runcode
// that does not exist in datastore.
// should get ModelAndView back containing form view
addProjectParameters.setProjectcode(RUNCODE_NOT_IN_DB + "-" + PERIODNAME);
mockStudentService.addStudentToRun(user, new Projectcode(RUNCODE_NOT_IN_DB, PERIODNAME));
expectLastCall().andThrow(new ObjectNotFoundException(RUNCODE_NOT_IN_DB, Run.class));
replay(mockStudentService);
ModelAndView modelAndView = addProjectController.onSubmit(request, response, addProjectParameters, errors);
assertEquals(FORM, modelAndView.getViewName());
assertTrue(errors.hasErrors());
assertEquals(1, errors.getFieldErrorCount());
assertNotNull(errors.getFieldError("projectcode"));
verify(mockStudentService);
}
public void testOnSubmit_failure_bad_periodname() throws Exception {
// test submission of form with projectcode that has a periodname
// that does not exist in datastore.
// should get ModelAndView back containing form view
addProjectParameters.setProjectcode(RUNCODE + "-" + PERIODNAME_NOT_IN_DB);
mockStudentService.addStudentToRun(user, new Projectcode(RUNCODE, PERIODNAME_NOT_IN_DB));
expectLastCall().andThrow(new PeriodNotFoundException(PERIODNAME_NOT_IN_DB + " was not found"));
replay(mockStudentService);
ModelAndView modelAndView = addProjectController.onSubmit(request, response, addProjectParameters, errors);
assertEquals(FORM, modelAndView.getViewName());
assertTrue(errors.hasErrors());
assertEquals(1, errors.getFieldErrorCount());
assertNotNull(errors.getFieldError("projectcode"));
verify(mockStudentService);
}
public void testOnSubmit_failure_student_already_associated_with_run() throws Exception {
// test submission of form with correct projectcode info
// but the student is already associated with the run.
// should get ModelAndView back containing success view
mockStudentService.addStudentToRun(user, new Projectcode(LEGAL_PROJECTCODE));
expectLastCall().andThrow(new StudentUserAlreadyAssociatedWithRunException(
"student user is already associated with this run."));
replay(mockStudentService);
ModelAndView modelAndView = addProjectController.onSubmit(request, response, addProjectParameters, errors);
assertEquals(FORM, modelAndView.getViewName());
assertTrue(errors.hasErrors());
assertEquals(1, errors.getFieldErrorCount());
assertNotNull(errors.getFieldError("projectcode"));
verify(mockStudentService);
}
}
| [
"geoffreykwan@gmail.com"
] | geoffreykwan@gmail.com |
8e2e0004ad9bf0fb69c1109d8c4e89ef83e267ae | 6ef4869c6bc2ce2e77b422242e347819f6a5f665 | /devices/google/Pixel 2/29/QPP6.190730.005/src/core-oj/java/util/RandomAccessSubList.java | 962ed9291ff33ec5c160736e20ec9bc03ab8fd6f | [] | no_license | hacking-android/frameworks | 40e40396bb2edacccabf8a920fa5722b021fb060 | 943f0b4d46f72532a419fb6171e40d1c93984c8e | refs/heads/master | 2020-07-03T19:32:28.876703 | 2019-08-13T03:31:06 | 2019-08-13T03:31:06 | 202,017,534 | 2 | 0 | null | 2019-08-13T03:33:19 | 2019-08-12T22:19:30 | Java | UTF-8 | Java | false | false | 480 | java | /*
* Decompiled with CFR 0.145.
*/
package java.util;
import java.util.AbstractList;
import java.util.List;
import java.util.RandomAccess;
import java.util.SubList;
class RandomAccessSubList<E>
extends SubList<E>
implements RandomAccess {
RandomAccessSubList(AbstractList<E> abstractList, int n, int n2) {
super(abstractList, n, n2);
}
@Override
public List<E> subList(int n, int n2) {
return new RandomAccessSubList<E>(this, n, n2);
}
}
| [
"me@paulo.costa.nom.br"
] | me@paulo.costa.nom.br |
9099e2a70ad8dc8d918b506b2ded81e05f92548f | 31a0206b5ad8166c66209fedca5f3d64b44612da | /sqlquery/src/main/java/com/provys/db/sqlquery/literals/SqlLiteralBigDecimalHandler.java | 044a919b7c97efb7aacc016e74708dae579e9f19 | [] | no_license | nebal77/provysdb | 95d9af6476e1d3db5cf98758fd2f73850d43a6a5 | 6ea5cb53a4e00797cc63cd1feb5d0b09f1fd4316 | refs/heads/master | 2022-09-30T09:22:25.909760 | 2020-06-06T08:52:23 | 2020-06-06T08:52:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,182 | java | package com.provys.db.sqlquery.literals;
import java.math.BigDecimal;
import org.checkerframework.checker.nullness.qual.Nullable;
public class SqlLiteralBigDecimalHandler implements SqlLiteralTypeHandler<BigDecimal> {
private static final SqlLiteralBigDecimalHandler INSTANCE = new SqlLiteralBigDecimalHandler();
private static final long serialVersionUID = 8014175503771492033L;
/**
* Instance of BigDecimal literal handler.
*
* @return instance of this type adapter
*/
public static SqlLiteralBigDecimalHandler getInstance() {
return INSTANCE;
}
/**
* Constructor is published to allow subclassing with potential redefinition of selected
* properties of this type adapter.
*/
protected SqlLiteralBigDecimalHandler() {
}
@Override
public Class<BigDecimal> getType() {
return BigDecimal.class;
}
@Override
public String getLiteral(@Nullable BigDecimal value) {
if (value == null) {
return "TO_NUMBER(NULL)";
}
return value.toPlainString();
}
protected Object readResolve() {
return getInstance();
}
@Override
public String toString() {
return "SqlLiteralBigDecimalHandler{}";
}
}
| [
"michal.stehlik.cz@gmail.com"
] | michal.stehlik.cz@gmail.com |
b9ed5412858b6eb41fa4200719cb9d0a36c00154 | 496dbcde07c5f29872bf94f00a442b837b2d21d4 | /app/src/main/java/com/ityun/cameraand2/opengl/FileUtil.java | 1cad2f947231ae3c8e1b5202903a8b5fe4676715 | [] | no_license | manhaisao/CameraAnd2 | e1666e4514f9823033649d45071b2036e23ec757 | 8d7643641eae4e1a1760d495629b3b94f9b4dacb | refs/heads/master | 2020-04-15T05:07:52.568654 | 2019-01-25T09:14:30 | 2019-01-25T09:14:30 | 164,409,835 | 8 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,355 | java | package com.ityun.cameraand2.opengl;
import android.graphics.Bitmap;
import android.os.Environment;
import android.util.Log;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
public class FileUtil {
private static final String TAG = "FileUtil";
private static final File parentPath = Environment.getExternalStorageDirectory();
private static String storagePath = "";
private static final String DST_FOLDER_NAME = "PlayCamera";
private static String initPath(){
if(storagePath.equals("")){
storagePath = parentPath.getAbsolutePath()+"/" + DST_FOLDER_NAME;
File f = new File(storagePath);
if(!f.exists()){
f.mkdir();
}
}
return storagePath;
}
public static void saveBitmap(Bitmap b){
String path = initPath();
long dataTake = System.currentTimeMillis();
String jpegName = path + "/" + dataTake +".jpg";
Log.i(TAG, "saveBitmap:jpegName = " + jpegName);
try {
FileOutputStream fout = new FileOutputStream(jpegName);
BufferedOutputStream bos = new BufferedOutputStream(fout);
b.compress(Bitmap.CompressFormat.JPEG, 100, bos);
bos.flush();
bos.close();
Log.i(TAG, "saveBitmap�ɹ�");
} catch (IOException e) {
// TODO Auto-generated catch block
Log.i(TAG, "saveBitmap:ʧ��");
e.printStackTrace();
}
}
}
| [
"337675907@qq.com"
] | 337675907@qq.com |
2fd882118e30df57113c8c1e35121a3f1c8e1d07 | d13e5df9e758906d773d1337628f9e35780d0b20 | /maxkey-core/src/main/java/org/maxkey/constants/ConstantsProtocols.java | 61c91307751a86351dfbebe697072dcb5513b6a7 | [
"Apache-2.0",
"CDDL-1.0",
"CPL-1.0",
"Zlib",
"EPL-1.0",
"bzip2-1.0.6",
"LicenseRef-scancode-unknown-license-reference",
"LZMA-exception"
] | permissive | charles-cai/MaxKey | b171f941f34ed2a4d26c4e056c9ac2f9b8df85ae | 585397b9264d39097530bd64e0830202e9b07b2f | refs/heads/master | 2022-11-11T21:31:03.612421 | 2020-07-01T01:57:46 | 2020-07-01T01:57:46 | 276,896,629 | 1 | 0 | Apache-2.0 | 2020-07-03T12:38:37 | 2020-07-03T12:38:36 | null | UTF-8 | Java | false | false | 648 | java | package org.maxkey.constants;
/**
* PROTOCOLS.
* @author Crystal.Sea
*
*/
public final class ConstantsProtocols {
public static final String DESKTOP = "Desktop";
public static final String BASIC = "Basic";
public static final String EXTEND_API = "Extend_API";
public static final String FORMBASED = "Form_Based";
public static final String TOKENBASED = "Token_Based";
// OAuth
public static final String OAUTH20 = "OAuth_v2.0";
// SAML
public static final String SAML20 = "SAML_v2.0";
public static final String OPEN_ID_CONNECT = "OpenID_Connect";
public static final String CAS = "CAS";
}
| [
"shimingxy@163.com"
] | shimingxy@163.com |
02bfd449c78efc0700584120f2337a4887ebd89f | 0597a7f57105f7cb3b62b1273236943c3775e2a4 | /src/main/java/com/chao/cloud/im/ChaoCloudImApplication.java | 3a92affe5d78d97058335017ecc85cedbd3f7ec3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Zhouy2889/chao-cloud-im | 2536144542b0fd9c990c7676fe136c837756cb53 | 6d2cd92addadf2b2e1dd5422a5496215e2157524 | refs/heads/master | 2020-09-09T10:42:04.206234 | 2019-09-10T06:09:37 | 2019-09-10T06:09:37 | 221,425,538 | 1 | 0 | NOASSERTION | 2019-11-13T09:48:34 | 2019-11-13T09:48:34 | null | UTF-8 | Java | false | false | 1,191 | java | package com.chao.cloud.im;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
import com.chao.cloud.common.extra.ftp.annotation.EnableFtp;
import com.chao.cloud.common.extra.mybatis.annotation.EnableMybatisPlus;
import com.chao.cloud.common.web.annotation.EnableGlobalException;
import com.chao.cloud.common.web.annotation.EnableWeb;
/**
*
* @功能:im -> web 聊天系统
* @author: 薛超
* @时间: 2019年6月24日
* @version 1.0.0
*/
@SpringBootApplication
@EnableWeb // web
@EnableGlobalException // 全局异常处理
@EnableMybatisPlus // 数据库插件-乐观锁
@EnableAsync // 异步调用
@EnableFtp
public class ChaoCloudImApplication {
public static void main(String[] args) {
SpringApplication.run(ChaoCloudImApplication.class, args);
}
/**
* 开启WebSocket支持
* @return
*/
@Bean
public ServerEndpointExporter serverEndpointExporter() {
return new ServerEndpointExporter();
}
}
| [
"1521515935@qq.com"
] | 1521515935@qq.com |
444f5100807e5e491b125d612ac419a2d09d7051 | 4de6150f9e4d8ddef09f41f4a4902872b1c3aa3d | /java_practice/src/mi/practice/java/base/exceptions/LoggingExceptions.java | f4c705d40b54d15df076cfec4f21fcd3c366db12 | [] | no_license | yehaote/mi | 91d47ca1fb42ba62c10b8ab862390ee891d4c3a9 | d7835cfa0f38b128ea65f90b33d18e9946e554ea | refs/heads/master | 2016-09-11T05:48:43.750926 | 2013-10-10T06:01:56 | 2013-10-10T06:01:56 | 3,130,168 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 831 | java | package mi.practice.java.base.exceptions;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.logging.Logger;
/**
* logger.server()返回severe级日志
* Logger.getLogger()根据String返回日志对象
*
*/
@SuppressWarnings("serial")
class LoggingException extends Exception{
private static Logger logger = Logger.getLogger("LoggingException");
public LoggingException(){
StringWriter trace = new StringWriter();
printStackTrace(new PrintWriter(trace));
logger.severe(trace.toString());
}
}
public class LoggingExceptions {
public static void main(String[] args){
try{
throw new LoggingException();
}catch(LoggingException e){
System.err.println("Caught "+e);
}
try{
throw new LoggingException();
}catch(LoggingException e){
System.err.println("Caught "+e);
}
}
}
| [
"yehaote@gmail.com"
] | yehaote@gmail.com |
34964b40f1995a489ef83a64b744143c588836f3 | 2bfe57dad107f792ca67c3fa31c5bc6fe2a2d5dd | /mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/AppliedDiscountUrl.java | 8925b11e17c733368bc167bd640baf6eafc4ce67 | [
"MIT"
] | permissive | rfjoseph/mozu-java | 51b0d8cf8679b3d7cb7e3ab6c38cf23bd51cde00 | d44c0cd4bfe78bd5026cbfbc0623215c7725ba16 | refs/heads/master | 2021-01-23T03:22:05.502075 | 2017-03-24T16:07:01 | 2017-03-24T16:07:01 | 86,075,225 | 0 | 0 | null | 2017-03-24T14:11:39 | 2017-03-24T14:11:39 | null | UTF-8 | Java | false | false | 2,159 | java | /**
* This code was auto-generated by a Codezu.
*
* Changes to this file may cause incorrect behavior and will be lost if
* the code is regenerated.
*/
package com.mozu.api.urls.commerce.carts;
import com.mozu.api.MozuUrl;
import com.mozu.api.utils.UrlFormatter;
import org.joda.time.DateTime;
public class AppliedDiscountUrl
{
/**
* Get Resource Url for ApplyCoupon
* @param cartId Identifier of the cart to delete.
* @param couponCode Code associated with the coupon to remove from the cart.
* @param responseFields Use this field to include those fields which are not included by default.
* @return String Resource Url
*/
public static MozuUrl applyCouponUrl(String cartId, String couponCode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/{cartId}/coupons/{couponCode}?responseFields={responseFields}");
formatter.formatUrl("cartId", cartId);
formatter.formatUrl("couponCode", couponCode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
}
/**
* Get Resource Url for RemoveCoupons
* @param cartId Identifier of the cart to delete.
* @return String Resource Url
*/
public static MozuUrl removeCouponsUrl(String cartId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/{cartId}/coupons");
formatter.formatUrl("cartId", cartId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
}
/**
* Get Resource Url for RemoveCoupon
* @param cartId Identifier of the cart to delete.
* @param couponCode Code associated with the coupon to remove from the cart.
* @return String Resource Url
*/
public static MozuUrl removeCouponUrl(String cartId, String couponCode)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/{cartId}/coupons/{couponcode}");
formatter.formatUrl("cartId", cartId);
formatter.formatUrl("couponCode", couponCode);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
}
}
| [
"sanjay_mandadi@volusion.com"
] | sanjay_mandadi@volusion.com |
b2acf7b77df2da537adcc2fb070741136da67e20 | 5fddb9a3f85f50cdefe3bf29ca06b33ad44bcd62 | /src/main/java/com/syncleus/aethermud/game/Abilities/Spells/Spell_Erase.java | f9e3373afa28a18e376b97c4121b781c5f138982 | [
"Apache-2.0"
] | permissive | freemo/AetherMUD-coffee | da315ae8046d06069a058fb38723750a02f72853 | dbc091b3e1108aa6aff3640da4707ace4c6771e5 | refs/heads/master | 2021-01-19T22:34:29.830622 | 2017-08-26T14:01:24 | 2017-08-26T14:06:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,322 | java | /**
* Copyright 2017 Syncleus, Inc.
* with portions copyright 2004-2017 Bo Zimmerman
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.syncleus.aethermud.game.Abilities.Spells;
import com.syncleus.aethermud.game.Abilities.interfaces.Ability;
import com.syncleus.aethermud.game.Common.interfaces.CMMsg;
import com.syncleus.aethermud.game.Items.interfaces.Item;
import com.syncleus.aethermud.game.Items.interfaces.Scroll;
import com.syncleus.aethermud.game.Items.interfaces.Wearable;
import com.syncleus.aethermud.game.MOBS.interfaces.MOB;
import com.syncleus.aethermud.game.core.CMClass;
import com.syncleus.aethermud.game.core.CMLib;
import com.syncleus.aethermud.game.core.interfaces.Physical;
import java.util.List;
public class Spell_Erase extends Spell {
private final static String localizedName = CMLib.lang().L("Erase Scroll");
@Override
public String ID() {
return "Spell_Erase";
}
@Override
public String name() {
return localizedName;
}
@Override
protected int canTargetCode() {
return CAN_ITEMS;
}
@Override
public int classificationCode() {
return Ability.ACODE_SPELL | Ability.DOMAIN_ALTERATION;
}
@Override
public int abstractQuality() {
return Ability.QUALITY_INDIFFERENT;
}
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) {
if ((commands.size() < 1) && (givenTarget == null)) {
mob.tell(L("Erase what?."));
return false;
}
final Item target = getTarget(mob, mob.location(), givenTarget, commands, Wearable.FILTER_ANY);
if (target == null)
return false;
if (!(target instanceof Scroll) && (!target.isReadable())) {
mob.tell(L("You can't erase that."));
return false;
}
if (!super.invoke(mob, commands, givenTarget, auto, asLevel))
return false;
final boolean success = proficiencyCheck(mob, 0, auto);
if (success) {
final CMMsg msg = CMClass.getMsg(mob, target, this, verbalCastCode(mob, target, auto), auto ? L("The words on <T-NAME> fade.") : L("^S<S-NAME> whisper(s), and then rub(s) on <T-NAMESELF>, making the words fade.^?"));
if (mob.location().okMessage(mob, msg)) {
mob.location().send(mob, msg);
if (target instanceof Scroll)
((Scroll) target).setSpellList("");
else
target.setReadableText("");
}
} else
beneficialWordsFizzle(mob, target, L("<S-NAME> whisper(s), and then rub(s) on <T-NAMESELF>, but nothing happens."));
// return whether it worked
return success;
}
}
| [
"jeffrey.freeman@syncleus.com"
] | jeffrey.freeman@syncleus.com |
589adc93689fceb6154ef0c7c03a8e1d01f39da2 | 153f33c1871db7ff237e143cf758f114f1975fce | /src/main/java/org/daniels/samples/webapp/listener/StartupListener.java | 76827d57e4f95b9698c58b7c8f81957b6dd664a6 | [] | no_license | daniels75/SpringMVC | 5dd1186fd56fc39e8b87080fbf4b2b293f48deb1 | 7dd56e4484e647ea603d44adc711d06c48f6ef3d | refs/heads/master | 2020-05-23T14:59:35.214993 | 2014-03-17T10:17:39 | 2014-03-17T10:17:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,397 | java | package org.daniels.samples.webapp.listener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.appfuse.Constants;
import org.appfuse.service.GenericManager;
import org.appfuse.service.LookupManager;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.context.ApplicationContext;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.ProviderManager;
import org.springframework.security.authentication.RememberMeAuthenticationProvider;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.context.support.WebApplicationContextUtils;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
/**
* <p>StartupListener class used to initialize and database settings
* and populate any application-wide drop-downs.
* <p/>
* <p>Keep in mind that this listener is executed outside of OpenSessionInViewFilter,
* so if you're using Hibernate you'll have to explicitly initialize all loaded data at the
* GenericDao or service level to avoid LazyInitializationException. Hibernate.initialize() works
* well for doing this.
*
* @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
*/
public class StartupListener implements ServletContextListener {
private static final Log log = LogFactory.getLog(StartupListener.class);
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
public void contextInitialized(ServletContextEvent event) {
log.debug("Initializing context...");
ServletContext context = event.getServletContext();
// Orion starts Servlets before Listeners, so check if the config
// object already exists
Map<String, Object> config = (HashMap<String, Object>) context.getAttribute(Constants.CONFIG);
if (config == null) {
config = new HashMap<String, Object>();
}
ApplicationContext ctx =
WebApplicationContextUtils.getRequiredWebApplicationContext(context);
PasswordEncoder passwordEncoder = null;
try {
ProviderManager provider = (ProviderManager) ctx.getBean("org.springframework.security.authentication.ProviderManager#0");
for (Object o : provider.getProviders()) {
AuthenticationProvider p = (AuthenticationProvider) o;
if (p instanceof RememberMeAuthenticationProvider) {
config.put("rememberMeEnabled", Boolean.TRUE);
} else if (ctx.getBean("passwordEncoder") != null) {
passwordEncoder = (PasswordEncoder) ctx.getBean("passwordEncoder");
}
}
} catch (NoSuchBeanDefinitionException n) {
log.debug("authenticationManager bean not found, assuming test and ignoring...");
// ignore, should only happen when testing
}
context.setAttribute(Constants.CONFIG, config);
// output the retrieved values for the Init and Context Parameters
if (log.isDebugEnabled()) {
log.debug("Remember Me Enabled? " + config.get("rememberMeEnabled"));
if (passwordEncoder != null) {
log.debug("Password Encoder: " + passwordEncoder.getClass().getSimpleName());
}
log.debug("Populating drop-downs...");
}
setupContext(context);
// Determine version number for CSS and JS Assets
String appVersion = null;
try {
InputStream is = context.getResourceAsStream("/META-INF/MANIFEST.MF");
if (is == null) {
log.warn("META-INF/MANIFEST.MF not found.");
} else {
Manifest mf = new Manifest();
mf.read(is);
Attributes atts = mf.getMainAttributes();
appVersion = atts.getValue("Implementation-Version");
}
} catch (IOException e) {
log.error("I/O Exception reading manifest: " + e.getMessage());
}
// If there was a build number defined in the war, then use it for
// the cache buster. Otherwise, assume we are in development mode
// and use a random cache buster so developers don't have to clear
// their browser cache.
if (appVersion == null || appVersion.contains("SNAPSHOT")) {
appVersion = "" + new Random().nextInt(100000);
}
log.info("Application version set to: " + appVersion);
context.setAttribute(Constants.ASSETS_VERSION, appVersion);
}
/**
* This method uses the LookupManager to lookup available roles from the data layer.
*
* @param context The servlet context
*/
public static void setupContext(ServletContext context) {
ApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(context);
LookupManager mgr = (LookupManager) ctx.getBean("lookupManager");
// get list of possible roles
context.setAttribute(Constants.AVAILABLE_ROLES, mgr.getAllRoles());
log.debug("Drop-down initialization complete [OK]");
// Any manager extending GenericManager will do:
GenericManager manager = (GenericManager) ctx.getBean("userManager");
doReindexing(manager);
log.debug("Full text search reindexing complete [OK]");
}
private static void doReindexing(GenericManager manager) {
manager.reindexAll(false);
}
/**
* Shutdown servlet context (currently a no-op method).
*
* @param servletContextEvent The servlet context event
*/
public void contextDestroyed(ServletContextEvent servletContextEvent) {
//LogFactory.release(Thread.currentThread().getContextClassLoader());
//Commented out the above call to avoid warning when SLF4J in classpath.
//WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
//WARN: Please see http://www.slf4j.org/codes.html for an explanation.
}
}
| [
"daniel.sadowski75@gmail.com"
] | daniel.sadowski75@gmail.com |
0499d4edab4b489b550faf46e0783b6c17c3ba30 | 4cc6fb1fde80a1730b660ba5ec13ad5f3228ea5c | /java-lihongjie/netty-4-user-guide-demos/src/main/java/com/waylau/netty/demo/codec/jackcon/package-info.java | 201209b789633b652bc7e54a055d55a213e7b9b9 | [
"MIT"
] | permissive | lihongjie/tutorials | c598425b085549f5f7a29b1c7bf0c86ae9823c94 | c729ae0eac90564e6366bc4907dcb8a536519956 | refs/heads/master | 2023-08-19T05:03:23.754199 | 2023-08-11T08:25:29 | 2023-08-11T08:25:29 | 124,048,964 | 0 | 0 | MIT | 2018-04-01T06:26:19 | 2018-03-06T08:51:04 | Java | UTF-8 | Java | false | false | 191 | java | /**
*
*/
/**
* 说明:使用 Jackson json 来执行序列化
* @author <a href="http://www.waylau.com">waylau.com</a> 2015年11月8日
*/
package com.waylau.netty.demo.codec.jackcon; | [
"you@example.com"
] | you@example.com |
4b76cec9745335ae98d3b26fd9689300b8382452 | 94c93510289164c59d0b37264206c86405b02c85 | /core/src/com/gempukku/libgdx/graph/ui/pipeline/producer/shader/registry/LoadFileGraphShaderTemplate.java | 311e3f8637cc801de0a546f58213ef5013bfd357 | [
"MIT"
] | permissive | terefang/libgdx-graph | d611f80b2d398e5e4c96e83bcbe07bdc371159ba | 9f6c886795ad1a201e3140fef262ee5a86f0cac1 | refs/heads/master | 2023-06-24T17:39:44.432910 | 2021-07-06T17:44:34 | 2021-07-06T17:44:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,804 | java | package com.gempukku.libgdx.graph.ui.pipeline.producer.shader.registry;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.JsonReader;
import com.badlogic.gdx.utils.JsonValue;
import com.kotcrab.vis.ui.widget.file.FileChooser;
import com.kotcrab.vis.ui.widget.file.FileChooserAdapter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
public class LoadFileGraphShaderTemplate implements GraphShaderTemplate {
private String title;
public LoadFileGraphShaderTemplate(String title) {
this.title = title;
}
@Override
public String getTitle() {
return title;
}
@Override
public void invokeTemplate(Stage stage, final Callback callback) {
FileChooser fileChooser = new FileChooser(FileChooser.Mode.OPEN);
fileChooser.setModal(true);
fileChooser.setSelectionMode(FileChooser.SelectionMode.FILES);
fileChooser.setListener(new FileChooserAdapter() {
@Override
public void selected(Array<FileHandle> file) {
FileHandle selectedFile = file.get(0);
JsonReader parser = new JsonReader();
try {
InputStream is = selectedFile.read();
try {
JsonValue shader = parser.parse(new InputStreamReader(is));
callback.addShader(selectedFile.nameWithoutExtension(), shader);
} finally {
is.close();
}
} catch (IOException exp) {
// Ignored
}
}
});
stage.addActor(fileChooser.fadeIn());
}
}
| [
"marcin.sciesinski"
] | marcin.sciesinski |
2449ebf5fe7aff9c33650d52f3b1e3adc9cccda4 | c7a56dcd958457356d32936be3806746f5269810 | /component-starter-server/src/main/java/org/talend/sdk/component/starter/server/front/js/IndexRedirector.java | e7a0b9954f61d6d920d917277ded43e1d8ac268d | [
"Apache-2.0"
] | permissive | rmannibucau/component-runtime | b623542240304999ce1acf620a45f0567d83d853 | 39261044bdd4217479eaf677fcd039c2d719ab47 | refs/heads/master | 2023-02-28T18:36:07.228500 | 2017-11-21T12:28:09 | 2017-11-21T12:28:09 | 108,391,830 | 0 | 0 | null | 2017-10-26T09:40:56 | 2017-10-26T09:40:56 | null | UTF-8 | Java | false | false | 2,320 | java | /**
* Copyright (C) 2006-2017 Talend Inc. - www.talend.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.talend.sdk.component.starter.server.front.js;
import java.io.IOException;
import java.util.stream.Stream;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
// enforce the server to redirect to the client to handle the 404 to have a nice ui
@WebFilter(asyncSupported = true, urlPatterns = "/*")
public class IndexRedirector implements Filter {
@Override
public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse,
final FilterChain filterChain) throws IOException, ServletException {
final HttpServletRequest httpServletRequest = HttpServletRequest.class.cast(servletRequest);
if (exists(httpServletRequest.getRequestURI())) {
filterChain.doFilter(servletRequest, servletResponse);
} else {
filterChain.doFilter(new HttpServletRequestWrapper(httpServletRequest) {
@Override
public String getPathInfo() {
return "";
}
@Override
public String getServletPath() {
return "/index.html";
}
}, servletResponse);
}
}
private boolean exists(final String requestURI) {
return requestURI.startsWith("/api") || Stream.of(".png", ".html", ".js", ".js.map", ".css", ".css.map", ".json", ".ico")
.anyMatch(requestURI::contains);
}
}
| [
"rmannibucau@gmail.com"
] | rmannibucau@gmail.com |
ba5f7518fe340f046298aee76b71a5d0612cc581 | e760326163cfa14b2779934c9e71a7f7a76dfb35 | /src_acct/com/amarsoft/app/accounting/util/LoanHelper.java | 3803cc0f34a0832fb9075c937bd364a9b62f4ff0 | [] | no_license | gaosy5945/easylifecore | 41e68bba747eb03f28edecf18d9d2ce2755db9d8 | 3fd630be1d990d0e66452735e84841536af5b9ba | refs/heads/master | 2020-05-19T17:25:29.370637 | 2016-09-21T08:29:40 | 2016-09-21T08:29:40 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,819 | java | package com.amarsoft.app.accounting.util;
import java.util.List;
import com.amarsoft.app.accounting.config.impl.AccountCodeConfig;
import com.amarsoft.app.base.businessobject.BusinessObject;
import com.amarsoft.app.base.businessobject.BusinessObjectHelper;
import com.amarsoft.app.base.businessobject.BusinessObjectManager;
import com.amarsoft.app.base.util.BUSINESSOBJECT_CONSTANTS;
/**
* 针对Loan对象进行操作的公用方法集合
*/
public final class LoanHelper {
/**
* 获取主对象关联对应对象执行账务余额
* @param subledgers
* @param parameters
* @return
* @throws Exception
*/
public static double getSubledgerBalance(List<BusinessObject> subledgers,Object... parameters) throws Exception {
BusinessObject subledger = BusinessObjectHelper.getBusinessObjectByAttributes(subledgers,parameters);
if(subledger == null) return 0.0d;
else
{
return AccountCodeConfig.getSubledgerBalance(subledger, AccountCodeConfig.Balance_DateFlag_CurrentDay);
}
}
/**
* 通过对象类型、对象编号、客户账科目好获取贷款账户余额
* @param relativeObjectType
* @param relativeObjectNo
* @param accountCodeNo
* @return
* @throws Exception
*/
public static double getSubledgerBalance(String relativeObjectType,String relativeObjectNo,String accountCodeNo) throws Exception{
BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager();
List<BusinessObject> subledgers = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.subsidiary_ledger, "RelativeObjectType=:RelativeObjectType and RelativeObjectNo=:RelativeObjectNo and Status=:Status", "RelativeObjectType",relativeObjectType,"RelativeObjectNo",relativeObjectNo,"Status","1");
return getSubledgerBalance(subledgers,"AccountCodeNo",accountCodeNo);
}
} | [
"jianbin_wang@139.com"
] | jianbin_wang@139.com |
0b5866f4b3a15cff52bef48b820d12232a4d3f92 | c6aa94983f3c8f82954463af3972ae06b30396a7 | /springcloud_open_cloud/platform/open-cloud-base-client/src/main/java/com/opencloud/base/client/service/IGatewayServiceClient.java | 1e27093302a37aab3629f70ccf6e7a8ce2439d58 | [
"MIT"
] | permissive | dobulekill/jun_springcloud | f01358caacb1b04f57908dccc6432d0a5e17745e | 33248f65301741ed97a24b978a5c22d5d6c052fb | refs/heads/master | 2023-01-24T13:24:59.282130 | 2020-11-25T17:30:47 | 2020-11-25T17:30:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,048 | java | package com.opencloud.base.client.service;
import com.opencloud.base.client.model.IpLimitApi;
import com.opencloud.base.client.model.RateLimitApi;
import com.opencloud.base.client.model.entity.GatewayRoute;
import com.opencloud.common.model.ResultBody;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.List;
/**
* @author Wujun
*/
public interface IGatewayServiceClient {
/**
* 获取接口黑名单列表
*
* @return
*/
@GetMapping("/gateway/api/blackList")
ResultBody<List<IpLimitApi>> getApiBlackList() ;
/**
* 获取接口白名单列表
* @return
*/
@GetMapping("/gateway/api/whiteList")
ResultBody<List<IpLimitApi> > getApiWhiteList();
/**
* 获取限流列表
* @return
*/
@GetMapping("/gateway/api/rateLimit")
ResultBody<List<RateLimitApi> > getApiRateLimitList();
/**
* 获取路由列表
* @return
*/
@GetMapping("/gateway/api/route")
ResultBody<List<GatewayRoute> > getApiRouteList();
}
| [
"wujun728@hotmail.com"
] | wujun728@hotmail.com |
8baf26c1dd80797c38fdba6a35a009f3c305c5a3 | f5f423755e2a318aadba7a123c8d363530de1713 | /src/main/java/org/skife/galaxy/base/MorePredicates.java | fa180e87786d3be92dfc9dddc7c8c1391a988072 | [] | no_license | brianm/sculptor | dd9f759c98706c3362f671c720a5c145b473ea8b | e85214167d11b074a635ef97f63c81184d48087e | refs/heads/master | 2023-07-12T08:10:10.413510 | 2012-04-10T02:48:35 | 2012-04-10T02:48:35 | 3,180,538 | 3 | 0 | null | 2020-10-13T10:06:04 | 2012-01-14T21:41:49 | Java | UTF-8 | Java | false | false | 1,553 | java | package org.skife.galaxy.base;
import com.google.common.base.Objects;
import com.google.common.base.Predicate;
import com.google.common.base.Throwables;
import org.skife.galaxy.rep.Action;
import javax.annotation.Nullable;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
public class MorePredicates
{
public static Predicate<Action> relationShipEquals(final String rel) {
return new Predicate<Action>()
{
@Override
public boolean apply(@Nullable Action input)
{
return input != null && rel.equals(input.getRel());
}
};
}
public static <T> Predicate<T> beanPropertyEquals(final String propertyName, final Object value)
{
return new Predicate<T>()
{
@Override
public boolean apply(@Nullable T input)
{
if (input == null) return false;
try {
for (PropertyDescriptor pd : Introspector.getBeanInfo(input.getClass())
.getPropertyDescriptors())
{
if (propertyName.equals(pd.getName())) {
return Objects.equal(value, pd.getReadMethod().invoke(input));
}
}
return false;
}
catch (Exception e) {
throw Throwables.propagate(e);
}
}
};
}
}
| [
"brianm@skife.org"
] | brianm@skife.org |
f204734664a0062305a4b49f1011417300b3d9ff | e2a99671dc3709beeb406cbdd338b3a20fa231ae | /Hardware/src/main/java/com/qualcomm/hardware/motors/NeveRest20Gearmotor.java | 094aedcdfb7320fe8568b88f6e9fbe20acdbc594 | [] | no_license | RoboNatick3737/2017-18 | f617f43231e8a9eb7244b7b3735abd08537031d0 | 200d077d579593f97a87bab8d342ff7fa8e43796 | refs/heads/master | 2021-05-08T02:38:56.247145 | 2019-03-01T19:19:45 | 2019-03-01T19:19:45 | 108,023,434 | 10 | 6 | null | 2018-02-21T19:25:21 | 2017-10-23T18:35:21 | Java | UTF-8 | Java | false | false | 2,334 | java | /*
Copyright (c) 2017 Robert Atkinson
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted (subject to the limitations in the disclaimer below) 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 Robert Atkinson nor the names of his contributors may be used to
endorse or promote products derived from this software without specific prior
written permission.
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS
LICENSE. 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 FITNESSFOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.qualcomm.hardware.motors;
import com.qualcomm.robotcore.hardware.configuration.DistributorInfo;
import com.qualcomm.robotcore.hardware.configuration.ModernRoboticsMotorControllerParams;
import com.qualcomm.robotcore.hardware.configuration.MotorType;
import org.firstinspires.ftc.robotcore.external.navigation.Rotation;
@MotorType(xmlTag="NeveRest20Gearmotor", name="NeveRest 20 Gearmotor", ticksPerRev=560, gearing=20, maxRPM=315, orientation=Rotation.CW)
@DistributorInfo(distributor="AndyMark", model="am-3102", url="http://www.andymark.com/NeveRest-20-12V-Gearmotor-p/am-3102.htm")
@ModernRoboticsMotorControllerParams(P=160, I=32, D=112, ratio=25)
public interface NeveRest20Gearmotor
{
}
| [
"makiahtbennett@gmail.com"
] | makiahtbennett@gmail.com |
764aebad00fbcdd49c23a227fdf03d506e13239c | 67c2281b7bf6362fd79ab2ab69b331a34b2178a3 | /framework.core.vaadinflow/src/main/java/software/simple/solutions/framework/core/web/components/CCheckBox.java | e16ae769c23d438ae8de72e9c4e661f5805a792a | [] | no_license | yusufnazir/framework_parent | 063f814b83d216bda20e9de2dee2cb16a24ecf78 | 9204c78260ad3601726db141ff599cd4c75174b8 | refs/heads/master | 2022-07-22T12:01:28.144363 | 2020-05-11T01:07:24 | 2020-05-11T01:07:24 | 183,057,473 | 0 | 1 | null | 2022-06-21T02:33:18 | 2019-04-23T16:45:51 | Java | UTF-8 | Java | false | false | 1,450 | java | package software.simple.solutions.framework.core.web.components;
import com.vaadin.flow.component.UI;
import com.vaadin.flow.component.checkbox.Checkbox;
import software.simple.solutions.framework.core.util.PropertyResolver;
import software.simple.solutions.framework.core.util.SortUtils;
import software.simple.solutions.framework.core.web.IField;
public class CCheckBox extends Checkbox implements IField, Comparable<CCheckBox> {
private static final long serialVersionUID = -3572553066835019767L;
public CCheckBox() {
setProperties();
}
@Override
public void setValue(Boolean value) {
super.setValue(value == null ? false : value);
}
/**
* Set the {@link CCheckBox} caption by key. See {@link CheckBox}
*
* @param key
*/
public void setCaptionByKey(String key) {
super.setLabel(PropertyResolver.getPropertyValueByLocale(key, UI.getCurrent().getLocale()));
}
public void setProperties() {
}
@Override
public boolean isThisRequired() {
// TODO Auto-generated method stub
return false;
}
@Override
public void setRequired() {
// TODO Auto-generated method stub
}
@Override
public void setDefault() {
// TODO Auto-generated method stub
}
@Override
public int compareTo(CCheckBox o) {
return SortUtils.compareTo(getValue(), o.getValue());
}
@Override
public void clear() {
if (!isReadOnly()) {
super.clear();
}
}
}
| [
"yusuf.nazir@gmail.com"
] | yusuf.nazir@gmail.com |
0ccf9fd18d53c96fada8ecc3bbdc488b0db0144a | 4134a7d55abc8796d69868578f6585e711d234bc | /src/com/travelport/service/air_v27_0/AirTicketingPortType.java | 6f5c1702ee02eef7fe2d183ce23088a8dc0cad97 | [] | no_license | pboza/shared | 34fe0bd310ccc8b0f737585850bba9d973407bee | 3b6d647df776119001b0c172925baf7351f3a064 | refs/heads/master | 2020-05-20T09:33:31.172505 | 2014-06-23T00:06:30 | 2014-06-23T00:06:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,247 | java | package com.travelport.service.air_v27_0;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
/**
* This class was generated by Apache CXF 3.0.0
* 2014-06-21T13:09:31.787-04:00
* Generated source version: 3.0.0
*
*/
@WebService(targetNamespace = "http://www.travelport.com/service/air_v27_0", name = "AirTicketingPortType")
@XmlSeeAlso({com.travelport.schema.rail_v27_0.ObjectFactory.class, com.travelport.schema.common_v27_0.ObjectFactory.class, com.travelport.schema.air_v27_0.ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface AirTicketingPortType {
@WebResult(name = "AirTicketingRsp", targetNamespace = "http://www.travelport.com/schema/air_v27_0", partName = "result")
@WebMethod(action = "http://localhost:8080/kestrel/AirService")
public com.travelport.schema.air_v27_0.AirTicketingRsp service(
@WebParam(partName = "parameters", name = "AirTicketingReq", targetNamespace = "http://www.travelport.com/schema/air_v27_0")
com.travelport.schema.air_v27_0.AirTicketingReq parameters
) throws AirFaultMessage;
}
| [
"pedro@boza.cl"
] | pedro@boza.cl |
cef54c9108f80aed21cf0f5da62cb123893261c3 | 91945432326100e7b6f069f7a234e21c8d6b18f6 | /workspacepoo/Lab10/src/br/com/lab10/exer1/Adicionar.java | 41d043147d2063b667dc054578e7c02a062350a9 | [
"MIT"
] | permissive | andersonsilvade/workspacejava | 15bd27392f68649fe92df31483f09c441d457e0e | dd85abad734b7d484175c2580fbaad3110653ef4 | refs/heads/master | 2016-09-05T13:03:02.963321 | 2014-09-16T12:49:41 | 2014-09-16T12:49:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 212 | java | package br.com.lab10.exer1;
public class Adicionar extends Thread{
Agenda agenda;
public Adicionar(Agenda agenda){
this.agenda = agenda;
}
@Override
public void run(){
agenda.addContato();
}
}
| [
"andersonsilvade@gmail.com"
] | andersonsilvade@gmail.com |
80d544c7e5897b75412706007d5b6049f233d4da | 7dd73504d783c7ebb0c2e51fa98dea2b25c37a11 | /eaglercraftx-1.8-main/buildtools/src/main/java/net/lax1dude/eaglercraft/v1_8/buildtools/task/init/TaskClean.java | 39a17fb584ca9a4a7aa20b90e5ad6ba74841fb1d | [
"LicenseRef-scancode-proprietary-license"
] | permissive | bagel-man/bagel-man.github.io | 32813dd7ef0b95045f53718a74ae1319dae8c31e | eaccb6c00aa89c449c56a842052b4e24f15a8869 | refs/heads/master | 2023-04-05T10:27:26.743162 | 2023-03-16T04:24:32 | 2023-03-16T04:24:32 | 220,102,442 | 3 | 21 | MIT | 2022-12-14T18:44:43 | 2019-11-06T22:29:24 | C++ | UTF-8 | Java | false | false | 2,641 | java | package net.lax1dude.eaglercraft.v1_8.buildtools.task.init;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import org.apache.commons.io.FileUtils;
import net.lax1dude.eaglercraft.v1_8.buildtools.EaglerBuildToolsConfig;
public class TaskClean {
public static boolean taskClean() {
try {
return taskClean0();
}catch(Throwable t) {
System.err.println();
System.err.println("Exception encountered while running task 'clean'!");
t.printStackTrace();
return false;
}
}
private static boolean taskClean0() throws Throwable {
File buildToolsTmp = EaglerBuildToolsConfig.getTemporaryDirectory();
File pullRequestTo = new File("pullrequest");
boolean btExist = buildToolsTmp.exists();
boolean prExist = pullRequestTo.exists();
if((btExist && !(buildToolsTmp.isDirectory() && buildToolsTmp.list().length == 0)) ||
(prExist && !(pullRequestTo.isDirectory() && pullRequestTo.list().length == 0))) {
System.out.println();
System.out.println("Notice: Clean will delete the init directory and also");
System.out.println("all of the files in the current pull request");
System.out.println();
System.out.println("you must revert all changes in the 'patches' directory of");
System.out.println("this repo back to the main repository's current commits,");
System.out.println("otherwise the 'pullrequest' command wll not work properly");
System.out.println();
System.out.print("Do you want to clean? [Y/n]: ");
String ret = "n";
try {
ret = (new BufferedReader(new InputStreamReader(System.in))).readLine();
}catch(IOException ex) {
// ?
}
ret = ret.toLowerCase();
if(!ret.startsWith("y")) {
System.out.println();
System.out.println("Ok nice, the clean will be cancelled. (thank god)");
return true;
}else {
try {
if(prExist) {
System.out.println();
System.out.println("Deleting pull request...");
FileUtils.deleteDirectory(pullRequestTo);
prExist = false;
}
}catch(IOException ex) {
System.err.println("ERROR: Could not delete \"" + pullRequestTo.getAbsolutePath() + "\"!");
ex.printStackTrace();
return false;
}
try {
if(btExist) {
System.out.println();
System.out.println("Deleting init directory...");
FileUtils.deleteDirectory(buildToolsTmp);
btExist = false;
}
}catch(IOException ex) {
System.err.println("ERROR: Could not delete \"" + buildToolsTmp.getAbsolutePath() + "\"!");
ex.printStackTrace();
return false;
}
}
}
return true;
}
}
| [
"tom@blowmage.com"
] | tom@blowmage.com |
c3252ce82d7d67c906fe8967ba0c6af62662bbab | e83352f5898fa7b49034e0c0af37f62c4eaacc06 | /Concept/src/com/corejava/controlstatements/Lab227.java | c0a1cf63c63a4eebd8e43f2770318363deb958da | [] | no_license | binodjava/Project | 8541bf5d1f23952949b796b9e678e3efdc00aadf | 9c261abe8fd1058957437b95c806141fcad6f9d7 | refs/heads/master | 2021-09-09T14:12:15.536067 | 2018-03-16T21:38:53 | 2018-03-16T21:38:53 | 125,569,126 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 197 | java | package com.corejava.controlstatements;
public class Lab227 {
public static void main(String[] args) {
int a = 10;
if (a == 10)
continue;//continue cannot be used outside of a loop
}
}
| [
"binodk.java@gmail.com"
] | binodk.java@gmail.com |
32a9cf723a16d53b423d25db2d44244a0554b98a | c0c91cba4bd670be5cf65f0840c42d06ce0710fe | /propagation/src/main/java/com/spring/transaction/interceptor/TransactionInterceptor.java | aa6b90aace75e0d6b5a80713dd1d0d2b78aaf2f0 | [] | no_license | gaofeng4623/spring | e36b86f432309a1b1843136018df01026e784e5a | 1e6900b875896672d5a9860cab8b86912c6f3953 | refs/heads/master | 2021-01-22T07:31:46.191097 | 2017-09-20T06:25:45 | 2017-09-20T06:25:45 | 102,304,826 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,980 | java | package com.spring.transaction.interceptor;
import java.lang.reflect.Method;
import java.util.Properties;
import com.spring.beans.aware.BeanFactoryAware;
import com.spring.beans.factory.BeanFactory;
import com.spring.beans.factory.XmlBeanFactory;
import com.spring.transaction.manager.InterfacePlatformTransactionManager;
import com.spring.transaction.manager.JdbcTransactionObjectSupport;
import com.spring.transaction.support.NameMatchTransactionAttributeSource;
import com.spring.transaction.support.TransactionDefinition;
public class TransactionInterceptor implements BeanFactoryAware{
private InterfacePlatformTransactionManager transactionManager;
private Properties transactionAttributes;
private NameMatchTransactionAttributeSource transactionAttributeSource;
private BeanFactory beanFactory;
public InterfacePlatformTransactionManager getTransactionManager() {
return transactionManager;
}
public void setTransactionManager(
InterfacePlatformTransactionManager transactionManager) {
this.transactionManager = transactionManager;
}
public Properties getTransactionAttributes() {
return transactionAttributes;
}
public BeanFactory getBeanFactory() {
return beanFactory;
}
public void setTransactionAttributes(Properties transactionAttributes) {
this.transactionAttributes = transactionAttributes;
}
public NameMatchTransactionAttributeSource getTransactionAttributeSource() {
return transactionAttributeSource;
}
public void setTransactionAttributeSource(
NameMatchTransactionAttributeSource transactionAttributeSource) {
this.transactionAttributeSource = transactionAttributeSource;
}
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
public boolean matchesMethod(Method method) {
TransactionDefinition definition = null;
if (this.transactionAttributes != null) {
definition = JdbcTransactionObjectSupport
.getTransactionDefinition(transactionAttributes, method);
} else if (this.transactionAttributeSource != null) {
definition = JdbcTransactionObjectSupport
.getTransactionDefinition(transactionAttributeSource
.getProperties(), method);
}
return definition != null && definition.getDefinition() != null;
}
//执行点
public Object execute(Method method, Object[] args, Object object) {
Object result = null;
TransactionProxyFactoryBean tpfb = new TransactionProxyFactoryBean();
if (this.transactionAttributes != null) {
tpfb.setTransactionAttributes(transactionAttributes);
} else if (this.transactionAttributeSource != null) {
tpfb.setTransactionAttributeSource(transactionAttributeSource);
}
tpfb.setTransactionManager(this.transactionManager);
tpfb.setProxyTargetClass(this.beanFactory.isAspectCglibable());
tpfb.setTarget(object); // cglib代理
Object proxy = tpfb.getTarget();
try {
result = method.invoke(proxy, args);
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
}
| [
"gaofen_888@163.com"
] | gaofen_888@163.com |
ad473aa681da5a81010143a17f15bffc513cfa0e | e22970aaa2cc78d0694f2ed628758cdada8423ec | /jcip-examples-src/net/jcip/examples/BackgroundTask.java | b9378759b09a7c0b0ea06779a0e45e6d0ad42a35 | [] | no_license | tomekl007/concurrencyJava | 00726d793a448469c6ff66f32ceb2999be56c0e6 | c479e53258ad41be6bffb86b737ec29cb0d82a4b | refs/heads/master | 2021-01-10T02:43:28.569069 | 2013-02-28T12:47:14 | 2013-02-28T12:47:14 | 8,479,002 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,686 | java | package net.jcip.examples;
import java.util.concurrent.*;
/**
* BackgroundTask
* <p/>
* Background task class supporting cancellation, completion notification, and progress notification
*
* @author Brian Goetz and Tim Peierls
*/
public abstract class BackgroundTask <V> implements Runnable, Future<V> {
private final FutureTask<V> computation = new Computation();
private class Computation extends FutureTask<V> {
public Computation() {
super(new Callable<V>() {
public V call() throws Exception {
return BackgroundTask.this.compute();
}
});
}
protected final void done() {
GuiExecutor.instance().execute(new Runnable() {
public void run() {
V value = null;
Throwable thrown = null;
boolean cancelled = false;
try {
value = get();
} catch (ExecutionException e) {
thrown = e.getCause();
} catch (CancellationException e) {
cancelled = true;
} catch (InterruptedException consumed) {
} finally {
onCompletion(value, thrown, cancelled);
}
};
});
}
}
protected void setProgress(final int current, final int max) {
GuiExecutor.instance().execute(new Runnable() {
public void run() {
onProgress(current, max);
}
});
}
// Called in the background thread
protected abstract V compute() throws Exception;
// Called in the event thread
protected void onCompletion(V result, Throwable exception,
boolean cancelled) {
}
protected void onProgress(int current, int max) {
}
// Other Future methods just forwarded to computation
public boolean cancel(boolean mayInterruptIfRunning) {
return computation.cancel(mayInterruptIfRunning);
}
public V get() throws InterruptedException, ExecutionException {
return computation.get();
}
public V get(long timeout, TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException {
return computation.get(timeout, unit);
}
public boolean isCancelled() {
return computation.isCancelled();
}
public boolean isDone() {
return computation.isDone();
}
public void run() {
computation.run();
}
}
| [
"tomekl007@gmail.com"
] | tomekl007@gmail.com |
bcce8799f0d9814cd5cb9fe7a31ba0ca586d6bdb | ee2efdc301aa27b8eb395507535fc614cdd6b85c | /android/app/src/main/java/com/hello_again_world_24206/MainActivity.java | 3581e088edcca335f83d27c80f7590028dd870a1 | [] | no_license | crowdbotics-apps/hello-again-world-24206 | a2bb86e782df1b218d3218036f39b60dfd95c1e4 | 4877b0ee2efe64cfb0bef75b3bdbfd8a4da72d03 | refs/heads/master | 2023-02-26T04:44:21.678778 | 2021-02-02T15:33:46 | 2021-02-02T15:33:46 | 335,334,532 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 388 | java | package com.hello_again_world_24206;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "hello_again_world_24206";
}
}
| [
"team@crowdbotics.com"
] | team@crowdbotics.com |
d5674c1d11020b0fb8f2ba8968b5850609d80d2b | c474b03758be154e43758220e47b3403eb7fc1fc | /apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/google/android/m4b/maps/p115o/C5499s.java | 250d3a658bb9cc9900aeed851614798993842708 | [] | no_license | EstebanDalelR/tinderAnalysis | f80fe1f43b3b9dba283b5db1781189a0dd592c24 | 941e2c634c40e5dbf5585c6876ef33f2a578b65c | refs/heads/master | 2020-04-04T09:03:32.659099 | 2018-11-23T20:41:28 | 2018-11-23T20:41:28 | 155,805,042 | 0 | 0 | null | 2018-11-18T16:02:45 | 2018-11-02T02:44:34 | null | UTF-8 | Java | false | false | 1,781 | java | package com.google.android.m4b.maps.p115o;
import android.location.Location;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.facebook.ads.AdError;
import com.google.android.m4b.maps.p111k.C5466a;
import com.google.android.m4b.maps.p111k.C5466a.C5465a;
import com.google.android.m4b.maps.p111k.C5467b;
import java.util.List;
/* renamed from: com.google.android.m4b.maps.o.s */
public final class C5499s implements Creator<C6746r> {
/* renamed from: a */
static void m23975a(C6746r c6746r, Parcel parcel) {
int a = C5467b.m23795a(parcel);
C5467b.m23815b(parcel, 1, c6746r.m30060a(), false);
C5467b.m23800a(parcel, (int) AdError.NETWORK_ERROR_CODE, c6746r.m30061b());
C5467b.m23796a(parcel, a);
}
public final /* synthetic */ Object[] newArray(int i) {
return new C6746r[i];
}
public final /* synthetic */ Object createFromParcel(Parcel parcel) {
int a = C5466a.m23776a(parcel);
List list = C6746r.f25279a;
int i = 0;
while (parcel.dataPosition() < a) {
int readInt = parcel.readInt();
int i2 = 65535 & readInt;
if (i2 == 1) {
list = C5466a.m23782c(parcel, readInt, Location.CREATOR);
} else if (i2 != AdError.NETWORK_ERROR_CODE) {
C5466a.m23780b(parcel, readInt);
} else {
i = C5466a.m23786f(parcel, readInt);
}
}
if (parcel.dataPosition() == a) {
return new C6746r(i, list);
}
StringBuilder stringBuilder = new StringBuilder(37);
stringBuilder.append("Overread allowed size end=");
stringBuilder.append(a);
throw new C5465a(stringBuilder.toString(), parcel);
}
}
| [
"jdguzmans@hotmail.com"
] | jdguzmans@hotmail.com |
b3996b54fd7d952cfaa3837e9359a43b6273d7cb | 7eb5499f1f78db353b6859eece7645cbd00d538d | /Sparx/java/com/netspective/sparx/util/set/test/Member.java | c9009a02e8ad506ec681c35b6585fbcb5873f446 | [] | no_license | netspective/sparx-2001 | 5b7092abc08be7c263b896f960eec330b4216490 | 5da50a502a83b2e4c06402b4e01213d2eab130c4 | refs/heads/master | 2020-05-18T15:49:20.523051 | 2003-08-07T12:45:59 | 2003-08-07T12:45:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,969 | java | package com.netspective.sparx.util.set.test;
import com.netspective.sparx.util.set.IntSpan;
public class Member
{
boolean ok;
String[] sets = {"-", "(-)", "(-3", "3-)", "3", "3-5", "3-5,7-9"};
int[][] isMember =
{
{0, 0, 0, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1},
{0, 0, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 0, 1},
};
String[][] inserted =
{
{"1 ", "2 ", "3 ", "4 ", "5 ", "6 ", "7 "},
{"(-) ", "(-) ", "(-) ", "(-) ", "(-) ", "(-) ", "(-) "},
{"(-3 ", "(-3 ", "(-3 ", "(-4 ", "(-3,5 ", "(-3,6 ", "(-3,7 "},
{"1,3-) ", "2-) ", "3-) ", "3-) ", "3-) ", "3-) ", "3-) "},
{"1,3 ", "2-3 ", "3 ", "3-4 ", "3,5 ", "3,6 ", "3,7 "},
{"1,3-5 ", "2-5 ", "3-5 ", "3-5 ", "3-5 ", "3-6 ", "3-5,7 "},
{"1,3-5,7-9", "2-5,7-9", "3-5,7-9", "3-5,7-9", "3-5,7-9", "3-9 ", "3-5,7-9"},
};
String[][] removed =
{
{"- ", "- ", "- ", "- ", "- ", "- ", "- "},
{"(-0,2-) ", "(-1,3-)", "(-2,4-)", "(-3,5-)", "(-4,6-)", "(-5,7-)", "(-6,8-)"},
{"(-0,2-3 ", "(-1,3 ", "(-2 ", "(-3 ", "(-3 ", "(-3 ", "(-3 "},
{"3-) ", "3-) ", "4-) ", "3,5-) ", "3-4,6-)", "3-5,7-)", "3-6,8-)"},
{"3 ", "3 ", "- ", "3 ", "3 ", "3 ", "3 "},
{"3-5 ", "3-5 ", "4-5 ", "3,5 ", "3-4 ", "3-5 ", "3-5 "},
{"3-5,7-9 ", "3-5,7-9", "4-5,7-9", "3,5,7-9", "3-4,7-9", "3-5,7-9", "3-5,8-9"},
};
public Member()
{
ok = true;
}
public void run()
{
for (int i = 0; i < sets.length; i++)
{
for (int j = 0; j < 7; j++)
{
int n = j + 1;
member(sets[i], n, isMember[i][j]);
delta(sets[i], n, new Insert(), inserted[i][j]);
delta(sets[i], n, new Remove(), removed[i][j]);
}
}
Object[] args = {ok ? "" : "not "};
String msg = java.text.MessageFormat.format("Member {0}ok", args);
System.out.println(msg);
}
void member(String runList, int n, int isMember)
{
IntSpan s = new IntSpan(runList);
if (s.member(n) ^ isMember == 1)
{
Object[] args = {runList, new Integer(n)};
String problem = java.text.MessageFormat.format("{1} element {0}", args);
System.out.println(problem);
ok = false;
}
}
void delta(String runList, int n, Operable op, String expected)
{
IntSpan s = new IntSpan(runList);
op.delta(s, n);
String actual = s.runList();
if (!expected.trim().equals(actual))
{
Object[] args = {op, s, new Integer(n), actual};
String problem = java.text.MessageFormat.format("{0} {1} {2} -> {3}", args);
System.out.println(problem);
ok = false;
}
}
static interface Operable
{
void delta(IntSpan s, int n);
}
static class Insert implements Operable
{
public void delta(IntSpan s, int n)
{
s.insert(n);
}
public String toString()
{
return "insert";
}
}
static class Remove implements Operable
{
public void delta(IntSpan s, int n)
{
s.remove(n);
}
public String toString()
{
return "remove";
}
}
}
| [
"shahid.shah"
] | shahid.shah |
fb0ddf6376013d897f5bb490d227f02ee6271ed1 | ea5d01b561f659f1348da1ccffb2168c8a4311e0 | /huiget-backend-web/src/main/java/com/huiget/mall/backend/web/form/LoginForm.java | 109575098f34cf886018d1291327f353a2898975 | [] | no_license | ToQuery/HuiGet | 0d28e7ff66d789bbc59124251135893520415372 | 6e295bb38175df8364928459625b566bec9eb6ed | refs/heads/master | 2022-12-15T21:43:39.643030 | 2016-03-17T13:31:34 | 2016-03-17T13:31:34 | 38,356,021 | 0 | 3 | null | 2022-11-25T12:59:58 | 2015-07-01T07:18:23 | JavaScript | UTF-8 | Java | false | false | 329 | java | /**
*
* 惠购 - 惠购网 - www.huiget.com - 特别会购!
* Copyright © 2014 惠购 www.huiget.com 版权所有
*/
package com.huiget.mall.backend.web.form;
/**
*
* @author yaofang
* @version $Id: LoginForm.java, v 0.1 2014年9月24日 上午10:08:15 yaofang Exp $
*/
public class LoginForm extends BaseForm {
}
| [
"863475209@qq.com"
] | 863475209@qq.com |
d4b7cc7624efeb8a32f5176239822cb507b965be | 08169ecd5fbe26887cd3b8b180a25de587cd2660 | /iterative-project/asakusa-iterative-yaess/src/test/java/com/asakusafw/yaess/iterative/ParameterTableHandlerTest.java | 0ac6dd93310ef7d85c854e9a44ae4b1dbc282880 | [
"Apache-2.0"
] | permissive | hishidama/asakusafw | 36467064a5e3257d0dec0c34b183eadf1e3fea62 | 17897dc263bbb76bf5c7bfc0e8d4d9f912954c4e | refs/heads/master | 2020-12-29T02:54:33.634221 | 2017-04-28T10:11:14 | 2017-04-28T10:11:14 | 3,523,380 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,359 | java | /**
* Copyright 2011-2017 Asakusa Framework Team.
*
* 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.asakusafw.yaess.iterative;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.ServiceLoader;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import com.asakusafw.iterative.common.IterativeExtensions;
import com.asakusafw.iterative.common.ParameterSet;
import com.asakusafw.iterative.common.ParameterTable;
import com.asakusafw.yaess.basic.BasicExtension;
import com.asakusafw.yaess.core.Extension;
import com.asakusafw.yaess.core.ExtensionHandler;
/**
* Test for {@link ParameterTableHandler}.
*/
public class ParameterTableHandlerTest {
/**
* temporary folder.
*/
@Rule
public final TemporaryFolder temporary = new TemporaryFolder();
/**
* simple case.
* @throws Exception if failed
*/
@Test
public void simple() throws Exception {
File json = json(new String[] {
"{}",
});
ParameterTable table = ParameterTableHandler.parse(json);
assertThat(table.getRowCount(), is(1));
List<ParameterSet> rows = table.getRows();
assertThat(rows.get(0).toMap(), is(map()));
}
/**
* w/ multiple columns.
* @throws Exception if failed
*/
@Test
public void columns() throws Exception {
File json = json(new String[] {
"{ a: 'A', b: 'B', c: 'C' }",
});
ParameterTable table = ParameterTableHandler.parse(json);
assertThat(table.getRowCount(), is(1));
List<ParameterSet> rows = table.getRows();
assertThat(rows.get(0).toMap(), is(map("a", "A", "b", "B", "c", "C")));
}
/**
* w/ multiple rows.
* @throws Exception if failed
*/
@Test
public void rows() throws Exception {
File json = json(new String[] {
"{ a: 'A' }",
"{ b: 'B' }",
"{ c: 'C' }",
});
ParameterTable table = ParameterTableHandler.parse(json);
assertThat(table.getRowCount(), is(3));
List<ParameterSet> rows = table.getRows();
assertThat(rows.get(0).toMap(), is(map("a", "A")));
assertThat(rows.get(1).toMap(), is(map("b", "B")));
assertThat(rows.get(2).toMap(), is(map("c", "C")));
}
/**
* handle.
* @throws Exception if failed
*/
@Test
public void handle() throws Exception {
File json = json(new String[] {
"{ a: 'A', b: 'B', c: 'C' }",
});
File f;
try (Extension ext = new ParameterTableHandler().handle(ParameterTableHandler.TAG, json.getAbsolutePath())) {
assertThat(ext, is(notNullValue()));
f = ((BasicExtension) ext).getData().getFile();
try (InputStream in = ext.getData().open()) {
ParameterTable table = IterativeExtensions.load(in);
assertThat(table.getRowCount(), is(1));
List<ParameterSet> rows = table.getRows();
assertThat(rows.get(0).toMap(), is(map("a", "A", "b", "B", "c", "C")));
}
}
assertThat("delete on exit", f.exists(), is(false));
}
/**
* handle.
* @throws Exception if failed
*/
@Test
public void handle_other() throws Exception {
File json = json(new String[] {
"{ a: 'A', b: 'B', c: 'C' }",
});
try (Extension ext = new ParameterTableHandler().handle("UNKNOWN", json.getAbsolutePath())) {
assertThat(ext, is(nullValue()));
}
}
/**
* check if {@link ParameterTableHandler} is registered.
*/
@Test
public void spi() {
ServiceLoader<ExtensionHandler> services = ServiceLoader.load(ExtensionHandler.class);
for (ExtensionHandler h : services) {
if (h instanceof ParameterTableHandler) {
return;
}
}
fail("not registered");
}
private Map<String, String> map(String... pairs) {
assertThat(pairs.length % 2, is(0));
Map<String, String> results = new LinkedHashMap<>();
for (int i = 0; i < pairs.length; i += 2) {
results.put(pairs[i + 0], pairs[i + 1]);
}
return results;
}
private File json(String... lines) throws IOException {
File file = temporary.newFile("testing.json");
try (PrintWriter writer = new PrintWriter(file, "UTF-8")) {
for (String s : lines) {
writer.println(s);
}
}
return file;
}
}
| [
"kawaguchi@nautilus-technologies.com"
] | kawaguchi@nautilus-technologies.com |
04ff935648acb42c4999ca54b6270bd0c722028b | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Lang/55/org/apache/commons/lang/math/NumberUtils_compare_1301.java | c76eba18f6bc3fcd6787026cae47033373d36a9f | [] | 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 | 2,513 | java |
org apach common lang math
extra function java number class
author href mailto rand mcneeli yahoo rand neeli mcneeli
author stephen colebourn
author href mailto steve downei netfolio steve downei
author eric pugh
author phil steitz
author matthew hawthorn
author href mailto ggregori seagullsw gari gregori
author href mailto fredrik westermarck fredrik westermarck
version
number util numberutil
compar float order
method comprehens standard java greater
equal oper
return code code
return code code greater
return code code valu equal
order largest smallest
nan
posit infin
maximum
normal posit number
normal neg number
minimum code float max code
neg infin
compar code nan code code nan code
code code
param lh code code
param rh code code
code code lh code code greater
code code equal rh
compar lh rh
lh rh
lh rh
compar bit handl
compar put
nan compar purpos
nan nan
lh bit lhsbit float int bit floattointbit lh
rh bit rhsbit float int bit floattointbit rh
lh bit lhsbit rh bit rhsbit
exot comparison nan
fortun n' nan'
negzero bit poszero
nan
max
negzero 2147483648
lh bit lhsbit rh bit rhsbit
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
7f3bae81c6adfc1d7e7ca8d85418281ee234529e | a33aac97878b2cb15677be26e308cbc46e2862d2 | /data/libgdx/GwtGL20Debug_glCompressedTexImage2D.java | 18604fcdf4525d240bc3fd40b0df952e7dc6a93c | [] | no_license | GabeOchieng/ggnn.tensorflow | f5d7d0bca52258336fc12c9de6ae38223f28f786 | 7c62c0e8427bea6c8bec2cebf157b6f1ea70a213 | refs/heads/master | 2022-05-30T11:17:42.278048 | 2020-05-02T11:33:31 | 2020-05-02T11:33:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 278 | java | @Override
public void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer data) {
super.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
checkError();
}
| [
"bdqnghi@gmail.com"
] | bdqnghi@gmail.com |
7f42bded302526a9ea3b17fcb5781bc3150c65cb | d60e287543a95a20350c2caeabafbec517cabe75 | /LACCPlus/Hadoop/388_1.java | 59b4f6a795b7c0b53aea79174a75cbb3ee0a2e19 | [
"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 | 888 | java | //,temp,TestDistCpViewFs.java,331,352,temp,TestFileBasedCopyListing.java,406,427
//,3
public class xxx {
@Test
public void testGlobTargetMissingSingleLevel() {
try {
Path listFile = new Path("target/tmp1/listing").makeQualified(fs.getUri(),
fs.getWorkingDirectory());
addEntries(listFile, "*");
createFiles("multifile/file3", "multifile/file4", "multifile/file5");
createFiles("singledir/dir2/file6");
runTest(listFile, target, false, false);
checkResult(target, 2, "multifile/file3", "multifile/file4", "multifile/file5",
"singledir/dir2/file6");
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
TestDistCpUtils.delete(fs, "target/tmp1");
}
}
}; | [
"sgholami@uwaterloo.ca"
] | sgholami@uwaterloo.ca |
cac9b4bec925d9f82dd42190a91b3abbd222f5ca | 2b650b68ee3a9680724b29f61691679f29e0a007 | /src/com/android/mzbook/sortview/model/Folder.java | bdd8dc8a4864c3d2ab228fd7e55ce5c944b894d3 | [] | no_license | bluegatar/read-android | db076f9e1242c61a6fd516e60115f4dee0e0fddc | b611092c9886815cc6460586c5974af2678ea6fc | refs/heads/master | 2021-12-15T01:23:49.021013 | 2017-07-11T06:34:43 | 2017-07-11T06:34:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 726 | java | package com.android.mzbook.sortview.model;
/**
* 书架拖动布局
* @author WANGGUODONG
* time:2014 -7 17
*/
public class Folder {
int folderId;
int userid;
String folderName;
double changetime;
public String getFolderName() {
return folderName;
}
public void setFolderName(String folderName) {
this.folderName = folderName;
}
public double getChangetime() {
return changetime;
}
public void setChangetime(double changetime) {
this.changetime = changetime;
}
public int getFolderId() {
return folderId;
}
public void setFolderId(int folderId) {
this.folderId = folderId;
}
public int getUserid() {
return userid;
}
public void setUserid(int userid) {
this.userid = userid;
}
}
| [
"18218724438@163.com"
] | 18218724438@163.com |
316bd7342a216804a785835a52449d1747371ca5 | c885ef92397be9d54b87741f01557f61d3f794f3 | /results/Jsoup-91/org.jsoup.UncheckedIOException/BBC-F0-opt-80/tests/17/org/jsoup/UncheckedIOException_ESTest_scaffolding.java | 21323e1da3cd5f210fb000a15daf7da1dd6090d5 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 3,189 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Oct 20 13:46:53 GMT 2021
*/
package org.jsoup;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class UncheckedIOException_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.jsoup.UncheckedIOException";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UncheckedIOException_ESTest_scaffolding.class.getClassLoader() ,
"org.jsoup.UncheckedIOException"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UncheckedIOException_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.jsoup.UncheckedIOException"
);
}
}
| [
"pderakhshanfar@serg2.ewi.tudelft.nl"
] | pderakhshanfar@serg2.ewi.tudelft.nl |
56ebdaaff3c7699e2df80ed7706ab914fcd2b74c | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/15/15_191af0e6788817e26d9c67e32ec04f0313799939/RunnableMojo/15_191af0e6788817e26d9c67e32ec04f0313799939_RunnableMojo_t.java | b768606b9443fe189ecde2f8f8ab916a1dd3b078 | [] | 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 | 993 | java | package org.apache.maven.plugin.coreit;
import bsh.EvalError;
import bsh.Interpreter;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
/**
* @goal runnable
* @requiresDependencyResolution test
*/
public class RunnableMojo
extends AbstractMojo
{
/**
* @parameter
* @required
*/
private String script;
public void execute() throws MojoExecutionException
{
Interpreter terp = new Interpreter();
try
{
getLog().info( "Executing in java version: " + System.getProperty( "java.version" ) );
Object result = terp.eval( script );
getLog().info( "Result of script evaluation was: " + result + "\nLoaded from: " + result.getClass().getClassLoader() );
}
catch ( EvalError e )
{
throw new MojoExecutionException( "Failed to evaluate script.", e );
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
07ce3b3167df72cbe0e614ce5b09dc56644f9ad8 | ed166738e5dec46078b90f7cca13a3c19a1fd04b | /minor/guice-OOM-error-reproduction/src/main/java/gen/K_Gen184.java | 52768d722fa42a7e6d1d95eeaaca836819cb9fd5 | [] | no_license | michalradziwon/script | 39efc1db45237b95288fe580357e81d6f9f84107 | 1fd5f191621d9da3daccb147d247d1323fb92429 | refs/heads/master | 2021-01-21T21:47:16.432732 | 2016-03-23T02:41:50 | 2016-03-23T02:41:50 | 22,663,317 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 331 | java |
package gen;
public class K_Gen184 {
@com.google.inject.Inject
public K_Gen184(K_Gen185 k_gen185){
System.out.println(this.getClass().getCanonicalName() + " created. " + k_gen185 );
}
@com.google.inject.Inject public void injectInterfaceWithoutImpl(gen.InterfaceWithoutImpl i){} // should expolode :)
}
| [
"michal.radzi.won@gmail.com"
] | michal.radzi.won@gmail.com |
b6626b6956f7f78f14c78045f1803ecc522106e1 | af9098ac5fb364de81ee276c018b8c51b7d01920 | /coffee-common/src/main/java/site/zido/coffee/common/rest/DefaultHttpResponseBodyFactory.java | 24de7cb083fe5f1eb9279f92010fae09a5db5faa | [
"MIT"
] | permissive | zhanglei/coffee-spring-boot-builder | ee80824d2796ad86e41e85576df6032956ceaa4e | d917c2c2879bafc44e30a08b1c029169d7dee02a | refs/heads/master | 2020-07-27T07:13:05.675240 | 2019-09-10T09:35:39 | 2019-09-10T09:35:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 523 | java | package site.zido.coffee.common.rest;
/**
* 默认rest响应体实现类
*/
public class DefaultHttpResponseBodyFactory implements HttpResponseBodyFactory {
@Override
public boolean isExceptedClass(Class<?> clazz) {
return Result.class.isAssignableFrom(clazz);
}
@Override
public Object success(Object data) {
return Result.success(data);
}
@Override
public Object error(int code, String message, Object data) {
return Result.error(code, message, data);
}
}
| [
"wuhongxu1208@gmail.com"
] | wuhongxu1208@gmail.com |
990559c6cacac258affff111d110f5f4e57e1866 | 59269e6549dd6c9d5a752e69591f3d5d11702e07 | /ezyfox-hazelcast-bean/src/main/java/com/tvd12/ezyfox/hazelcast/EzyBeanHazelcastFactory.java | 0821973b7f0e4571ba3d22c501524d6dab91da7c | [
"Apache-2.0"
] | permissive | trungthao1989/ezyfox | 7d51e2eb7fa1de30d1b4185496e618a919ee88d4 | 88885d4ba61c79c6da791aff0b9229dc59ddb271 | refs/heads/master | 2020-05-26T12:25:59.843302 | 2019-05-21T17:14:54 | 2019-05-21T17:14:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 691 | java | package com.tvd12.ezyfox.hazelcast;
import com.tvd12.ezyfox.bean.EzyBeanContext;
import com.tvd12.ezyfox.bean.EzyBeanContextAware;
import com.tvd12.ezyfox.hazelcast.EzyAbstractHazelcastFactory;
import com.tvd12.ezyfox.hazelcast.mapstore.EzyBeanMapstoreCreator;
import com.tvd12.ezyfox.hazelcast.mapstore.EzyMapstoreCreator;
import lombok.Setter;
public class EzyBeanHazelcastFactory
extends EzyAbstractHazelcastFactory
implements EzyBeanContextAware {
@Setter
protected EzyBeanContext context;
@Override
protected EzyMapstoreCreator newMapstoreCreator() {
EzyBeanMapstoreCreator creator = new EzyBeanMapstoreCreator();
creator.setContext(context);
return creator;
}
}
| [
"itprono3@gmail.com"
] | itprono3@gmail.com |
0eab9bcb98770cd295f6d8522ae60c353eb1701a | 58df55b0daff8c1892c00369f02bf4bf41804576 | /src/axr.java | 20657c259da4b564ce04a3f65e5c2b181ef40ea5 | [] | no_license | gafesinremedio/com.google.android.gm | 0b0689f869a2a1161535b19c77b4b520af295174 | 278118754ea2a262fd3b5960ef9780c658b1ce7b | refs/heads/master | 2020-05-04T15:52:52.660697 | 2016-07-21T03:39:17 | 2016-07-21T03:39:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,257 | java | import java.util.ArrayList;
import java.util.Iterator;
public class axr
extends axp
{
public static final axr c = new axs();
public ArrayList<axp> d = new ArrayList();
public final axp a(int paramInt)
{
if (paramInt >= d.size()) {
return axp.a;
}
return (axp)d.get(paramInt);
}
public final axp a(String paramString, boolean paramBoolean)
{
int i = 1;
while (i < d.size())
{
if (a(i - 1, paramString, paramBoolean)) {
return (axp)d.get(i);
}
i += 2;
}
return null;
}
public final StringBuilder a(StringBuilder paramStringBuilder)
{
paramStringBuilder.append('[');
int i = 0;
if (i < d.size())
{
if (i > 0) {
paramStringBuilder.append(',');
}
axp localaxp = a(i);
if (localaxp.a()) {
b(i).a(paramStringBuilder);
}
for (;;)
{
i += 1;
break;
if (localaxp.b()) {
paramStringBuilder.append(c(i).e());
}
}
}
paramStringBuilder.append(']');
return paramStringBuilder;
}
void a(axp paramaxp)
{
if (paramaxp == null) {
throw new RuntimeException("Can't add null");
}
d.add(paramaxp);
}
public final boolean a()
{
return true;
}
public final boolean a(int paramInt, String paramString, boolean paramBoolean)
{
boolean bool = false;
if (!paramBoolean) {
paramBoolean = c(paramInt).a(paramString);
}
Object localObject;
do
{
do
{
return paramBoolean;
localObject = c(paramInt);
paramBoolean = bool;
} while (paramString == null);
localObject = ((axy)localObject).e();
paramBoolean = bool;
} while (((String)localObject).length() < paramString.length());
return ((String)localObject).substring(0, paramString.length()).equalsIgnoreCase(paramString);
}
public final boolean a(String paramString)
{
boolean bool2 = false;
int i = 0;
for (;;)
{
boolean bool1 = bool2;
if (i < d.size())
{
if (c(i).a(paramString)) {
bool1 = true;
}
}
else {
return bool1;
}
i += 1;
}
}
public final axr b(int paramInt)
{
axp localaxp = a(paramInt);
if (localaxp.a()) {
return (axr)localaxp;
}
return c;
}
public final axy b(String paramString, boolean paramBoolean)
{
paramString = a(paramString, paramBoolean);
if (paramString != null) {
return (axy)paramString;
}
return axy.d;
}
public final boolean b()
{
return false;
}
public final axy c(int paramInt)
{
axp localaxp = a(paramInt);
if (localaxp.b()) {
return (axy)localaxp;
}
return axy.d;
}
public void c()
{
if (d != null)
{
Iterator localIterator = d.iterator();
while (localIterator.hasNext()) {
((axp)localIterator.next()).c();
}
d = null;
}
super.c();
}
public final boolean e()
{
return d.size() == 0;
}
public String toString()
{
return d.toString();
}
}
/* Location:
* Qualified Name: axr
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
1bd77fa1ac00c1a86963687ba088bc45dfad5fda | 9a45bff4ac03872a5760ce420869d92e2b5feb98 | /jiaozivideoplayer/src/main/java/cn/jzvd/CustomView/MyJZVideoPlayerStandard.java | 42b07c04ac5e03f9e4783f61a3da285b498a21f9 | [
"Apache-2.0"
] | permissive | chenchongshou/YCVideoPlayer | 926e7a30e9f3a7bb0fa9344c935fe3e8897c6bcb | b28f7f6b7ffef6275c08860018aa2ac0d84f3f70 | refs/heads/master | 2020-03-26T05:42:25.937943 | 2018-08-09T03:40:19 | 2018-08-09T03:40:19 | 144,570,733 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,024 | java | package cn.jzvd.CustomView;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import cn.jzvd.JZVideoPlayerStandard;
/**
* 这里可以监听到视频播放的生命周期和播放状态
* 所有关于视频的逻辑都应该写在这里
* yc补充:也可以自己定义该控件,继承JZVideoPlayerStandard即可
*/
public class MyJZVideoPlayerStandard extends JZVideoPlayerStandard {
public MyJZVideoPlayerStandard(Context context) {
super(context);
}
public MyJZVideoPlayerStandard(Context context, AttributeSet attrs) {
super(context, attrs);
}
/**
* 这是播放控件初始化的时候最先调用的
*/
@Override
public void init(Context context) {
super.init(context);
}
/**
* 这是控件里所有控件的onClick响应函数,比如监听开始按钮点击,全屏按钮点击,空白点击,retry按钮点击等。
* 如果你想拦截这些点击的响应或者继承这些点击的响应,那么复写此函数
*/
@Override
public void onClick(View v) {
super.onClick(v);
}
/**
* 在JCVideoPlayer中此函数主要响应了全屏之后的手势控制音量和进度
*/
@Override
public boolean onTouch(View v, MotionEvent event) {
return super.onTouch(v, event);
}
/**
* 用户触发的视频开始播放
*/
@Override
public void startVideo() {
super.startVideo();
}
/**
* 控件进入普通的未播放状态
*/
@Override
public void onStateNormal() {
super.onStateNormal();
}
/**
* 进入preparing状态,正在初始化视频
*/
@Override
public void onStatePreparing() {
super.onStatePreparing();
}
/**
* preparing之后进入播放状态
*/
@Override
public void onStatePlaying() {
super.onStatePlaying();
}
/**
* 暂停视频,进入暂停状态
*/
@Override
public void onStatePause() {
super.onStatePause();
}
/**
* 进入错误状态
*/
@Override
public void onStateError() {
super.onStateError();
}
/**
* 进入视频自动播放完成状态
*/
@Override
public void onStateAutoComplete() {
super.onStateAutoComplete();
}
/**
* android.media.MediaPlayer回调的info
*/
@Override
public void onInfo(int what, int extra) {
super.onInfo(what, extra);
}
/**
* android.media.MediaPlayer回调的error
*/
@Override
public void onError(int what, int extra) {
super.onError(what, extra);
}
/**
* 进入全屏
*/
@Override
public void startWindowFullscreen() {
super.startWindowFullscreen();
}
/**
* 退出全屏
*/
@Override
public void startWindowTiny() {
super.startWindowTiny();
}
}
| [
"yangchong211@163.com"
] | yangchong211@163.com |
0337d7f235ddeba9256023cfaf4ca2777a9f2301 | cf881a41872117c85c6f440138fa8368f8e5b289 | /seminar-005/src/ro/ase/csie/cts/laborator/prototype/Caracter3D.java | 12dcc3479dbdd62a234c3061a178bbc8ce1125ef | [] | no_license | vladescualexandra/cts-labs | d9f16bad1bab2564a77ec5238eb3eeb5099f8851 | 6d9e783b73dc344e70a30ba4309c30d4abd35883 | refs/heads/master | 2023-05-13T01:51:23.254927 | 2021-06-03T16:40:23 | 2021-06-03T16:40:23 | 341,537,644 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,510 | java | package ro.ase.csie.cts.laborator.prototype;
import java.util.ArrayList;
import java.util.Random;
public class Caracter3D implements Cloneable {
String fisierModel3D;
String culoare;
int inaltime;
ArrayList<Integer> puncte;
private Caracter3D() {
}
public Caracter3D(String fisierModel3D) {
System.out.println("Se incarca modelul 3D din " + fisierModel3D);
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
this.fisierModel3D = fisierModel3D;
Random random = new Random();
puncte = new ArrayList<>();
for (int i = 0; i < 10; i++) {
puncte.add(random.nextInt(1000));
}
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Puncte Caracter3D: ");
for (int punct : this.puncte) {
sb.append(punct + " | ");
}
return sb.toString();
}
@Override
protected Object clone() throws CloneNotSupportedException {
// NU ASA! Nu prin acelasi constructor, deoarece fix asta dorim sa evitam.
// Caracter3D clona = new Caracter3D(this.fisierModel3D);
Caracter3D clona = new Caracter3D();
clona.culoare = this.culoare;
clona.fisierModel3D = this.fisierModel3D;
clona.inaltime = this.inaltime;
clona.puncte = (ArrayList<Integer>) this.puncte.clone();
return clona;
}
}
| [
"vladescualexandra18@stud.ase.ro"
] | vladescualexandra18@stud.ase.ro |
03728452214e3b2b3275d04275cf9be5039bcaad | e9b655aa572d9650a69d5942625ebceb67421373 | /src/main/java/more/desk/yibai/SwingMenuDemo.java | 5487cab9b13c278a12598f6c3a40317a079bca8d | [] | no_license | fmbah/LearningResource | 2d1fdfa9689e8ebd29f4a431efc8cc2a068feb7c | 067b716c56b1ce5244d3a53c73545e08f7a8eacf | refs/heads/master | 2022-07-12T03:58:50.278744 | 2020-08-19T12:14:58 | 2020-08-19T12:14:58 | 154,319,083 | 1 | 1 | null | 2022-06-21T00:53:10 | 2018-10-23T11:49:45 | Java | UTF-8 | Java | false | false | 4,922 | java | package more.desk.yibai;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class SwingMenuDemo {
private JFrame mainFrame;
private JLabel headerLabel;
private JLabel statusLabel;
private JPanel controlPanel;
public SwingMenuDemo(){
prepareGUI();
}
public static void main(String[] args){
SwingMenuDemo swingMenuDemo = new SwingMenuDemo();
swingMenuDemo.showMenuDemo();
}
private void prepareGUI(){
mainFrame = new JFrame("Java SWING Examples");
mainFrame.setSize(400,400);
mainFrame.setLayout(new GridLayout(3, 1));
headerLabel = new JLabel("",JLabel.CENTER );
statusLabel = new JLabel("",JLabel.CENTER);
statusLabel.setSize(350,100);
mainFrame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent windowEvent){
System.exit(0);
}
});
controlPanel = new JPanel();
controlPanel.setLayout(new FlowLayout());
mainFrame.add(headerLabel);
mainFrame.add(controlPanel);
mainFrame.add(statusLabel);
mainFrame.setVisible(true);
}
private void showMenuDemo(){
//create a menu bar
final JMenuBar menuBar = new JMenuBar();
//create menus
JMenu fileMenu = new JMenu("File");
JMenu editMenu = new JMenu("Edit");
final JMenu aboutMenu = new JMenu("About");
final JMenu linkMenu = new JMenu("Links");
//create menu items
JMenuItem newMenuItem = new JMenuItem("New");
newMenuItem.setMnemonic(KeyEvent.VK_N);
newMenuItem.setActionCommand("New");
JMenuItem openMenuItem = new JMenuItem("Open");
openMenuItem.setActionCommand("Open");
JMenuItem saveMenuItem = new JMenuItem("Save");
saveMenuItem.setActionCommand("Save");
JMenuItem exitMenuItem = new JMenuItem("Exit");
exitMenuItem.setActionCommand("Exit");
JMenuItem cutMenuItem = new JMenuItem("Cut");
cutMenuItem.setActionCommand("Cut");
JMenuItem copyMenuItem = new JMenuItem("Copy");
copyMenuItem.setActionCommand("Copy");
JMenuItem pasteMenuItem = new JMenuItem("Paste");
pasteMenuItem.setActionCommand("Paste");
MenuItemListener menuItemListener = new MenuItemListener();
newMenuItem.addActionListener(menuItemListener);
openMenuItem.addActionListener(menuItemListener);
saveMenuItem.addActionListener(menuItemListener);
exitMenuItem.addActionListener(menuItemListener);
cutMenuItem.addActionListener(menuItemListener);
copyMenuItem.addActionListener(menuItemListener);
pasteMenuItem.addActionListener(menuItemListener);
final JCheckBoxMenuItem showWindowMenu =
new JCheckBoxMenuItem("Show About", true);
showWindowMenu.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if(showWindowMenu.getState()){
menuBar.add(aboutMenu);
}else{
menuBar.remove(aboutMenu);
}
}
});
final JRadioButtonMenuItem showLinksMenu =
new JRadioButtonMenuItem("Show Links", true);
showLinksMenu.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if(menuBar.getMenu(3)!= null){
menuBar.remove(linkMenu);
mainFrame.repaint();
}else{
menuBar.add(linkMenu);
mainFrame.repaint();
}
}
});
//add menu items to menus
fileMenu.add(newMenuItem);
fileMenu.add(openMenuItem);
fileMenu.add(saveMenuItem);
fileMenu.addSeparator();
fileMenu.add(showWindowMenu);
fileMenu.addSeparator();
fileMenu.add(showLinksMenu);
fileMenu.addSeparator();
fileMenu.add(exitMenuItem);
editMenu.add(cutMenuItem);
editMenu.add(copyMenuItem);
editMenu.add(pasteMenuItem);
//add menu to menubar
menuBar.add(fileMenu);
menuBar.add(editMenu);
menuBar.add(aboutMenu);
menuBar.add(linkMenu);
//add menubar to the frame
mainFrame.setJMenuBar(menuBar);
mainFrame.setVisible(true);
}
class MenuItemListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
statusLabel.setText(e.getActionCommand()
+ " JMenuItem clicked.");
}
}
class MenuItemListener1 implements ActionListener {
public void actionPerformed(ActionEvent e) {
statusLabel.setText(e.getActionCommand()
+ " JMenuItem clicked.");
}
}
}
| [
"807966224@qq.com"
] | 807966224@qq.com |
d7dab942bf8c1a967d681bebd7814edfee3656d9 | b7f30a0a657039d1c3610f50c60f739a9efbfad8 | /Java/designpatternsbanas/src/observer/StockObserver.java | f3ca9ba973cc13fe51ce082fef2efaf791485a30 | [] | no_license | SDP-SPIII-2020/sample-code | a454fbca21f3d114ded3b7e3131576b9d2fd9741 | 8b7629e76f267c6463857158b5dd9d3378877bfa | refs/heads/master | 2020-12-09T22:29:04.168028 | 2020-04-25T17:33:38 | 2020-04-25T17:33:38 | 233,433,462 | 3 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,334 | java | package observer;
// Represents each Observer that is monitoring changes in the subject
public class StockObserver implements Observer {
private static int observerIDTracker;
private double ibmPrice;
private double aaplPrice;
// Static used as a counter
private double googPrice;
// Used to track the observers
private int observerID;
// Will hold reference to the StockGrabber object
private Subject stockGrabber;
public StockObserver(Subject stockGrabber) {
// Store the reference to the stockGrabber object so
// I can make calls to its methods
this.stockGrabber = stockGrabber;
// Assign an observer ID and increment the static counter
this.observerID = ++observerIDTracker;
// Message notifies user of new observer
System.out.println("New Observer " + this.observerID);
// Add the observer to the Subjects ArrayList
stockGrabber.register(this);
}
// Called to update all observers
public void update(double ibmPrice, double aaplPrice, double googPrice) {
this.ibmPrice = ibmPrice;
this.aaplPrice = aaplPrice;
this.googPrice = googPrice;
printThePrices();
}
public void printThePrices() {
System.out.println(observerID + "\nIBM: " + ibmPrice + "\nAAPL: " +
aaplPrice + "\nGOOG: " + googPrice + "\n");
}
} | [
"keith@dcs.bbk.ac.uk"
] | keith@dcs.bbk.ac.uk |
f5fd7e35219ab767ad5ec5390ae4ebaed2ab6053 | 78f284cd59ae5795f0717173f50e0ebe96228e96 | /factura-negocio/src/cl/stotomas/factura/negocio/formuario_15/copy2/copy/TestingVulnerabilities.java | e91e4e47bfddb531824be63952b5b735f37ef942 | [] | no_license | Pattricio/Factura | ebb394e525dfebc97ee2225ffc5fca10962ff477 | eae66593ac653f85d05071b6ccb97fb1e058502d | refs/heads/master | 2020-03-16T03:08:45.822070 | 2018-05-07T15:29:25 | 2018-05-07T15:29:25 | 132,481,305 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 2,285 | java | package cl.stotomas.factura.negocio.formuario_15.copy2.copy;
import java.applet.Applet;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
//import cl.stomas.factura.negocio.testing.TestingModel.Echo;
public class TestingVulnerabilities {
public static String decryptMessage(final byte[] message, byte[] secretKey)
{
try {
// CÓDIGO VULNERABLE
final SecretKeySpec KeySpec = new SecretKeySpec(secretKey, "DES");
final Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, KeySpec);
// RECOMENDACIÓN VERACODE
// final Cipher cipher = Cipher.getInstance("DES...");
// cipher.init(Cipher.DECRYPT_MODE, KeySpec);
return new String(cipher.doFinal(message));
}
catch(Exception e)
{
e.printStackTrace();
}
return null;
}
// Inclusión de funcionalidades de esfera de control que no es de confianza
// Un atacante puede insertar funcionalidades maliciosas dentro de este programa.
// Las Applet comprometen la seguridad. ya que sus funcionalidades se pueden adaptar a la Web
// Ademas la entrega de acceso de credenciales es engorrosa para el cliente.
public final class WidgetData extends Applet {
private static final long serialVersionUID = 1L;
public float price;
public WidgetData()
{
this.price = LookupPrice("MyWidgetType");
}
private float LookupPrice(String string) {
return 0;
}
}
class Echo {
// Control de Proceso
// Posible reemplazo de librería por una maliciosa
// Donde además s enos muestra el nombre explícito de esta.
public native void runEcho();
{
System.loadLibrary("echo"); // Se carga librería
}
public void main(String[] args)
{
new Echo().runEcho();
}
}
class EchoSecond {
// Control de Proceso
// Posible reemplazo de librería por una maliciosa
// Donde además s enos muestra el nombre explícito de esta.
public native void runEcho();
{
System.loadLibrary("echo"); // Se carga librería
}
public void main(String[] args)
{
new Echo().runEcho();
}
}
}
| [
"Adriana Molano@DESKTOP-GQ96FK8"
] | Adriana Molano@DESKTOP-GQ96FK8 |
1d5081e335f3c56f3d908a4059d45850b0fb7d5a | 0f499ceae729734a0f5a17e4e1e26e393e6ede19 | /ITvKurzeSources/webinar 31/src/sk/itvkurze/swing/_35_spojenie_s_databazou/gui/OsobaTabulkaModel.java | 0acfabc6a350295191e04cabaceaf2830450c109 | [] | no_license | marekpatarak/personal-workspace | 5dbd7f50463c33cc151f8c8a9536949e72c7db58 | 95374b842e925531ea20bd7ff3fb342d9561e0fb | refs/heads/master | 2022-12-23T09:12:02.659254 | 2019-10-02T14:09:29 | 2019-10-02T14:09:29 | 149,508,965 | 0 | 0 | null | 2022-12-16T00:40:38 | 2018-09-19T20:33:44 | Java | UTF-8 | Java | false | false | 1,268 | java | package sk.itvkurze.swing._35_spojenie_s_databazou.gui;
import java.util.List;
import javax.swing.table.AbstractTableModel;
import sk.itvkurze.swing._35_spojenie_s_databazou.model.Osoba;
public class OsobaTabulkaModel extends AbstractTableModel
{
private List<Osoba> db;
private String[] nazvyStlpcov = {
"ID",
"Meno",
"Predosle Zamestnanie",
"Vekova kategoria",
"Zamestnanecky status",
"Cudiznec?",
"Statna prislusnost",
"Pohlavie"
};
public OsobaTabulkaModel()
{
}
@Override
public String getColumnName(int stlpec)
{
return nazvyStlpcov[stlpec];
}
public void setData(List<Osoba> db)
{
this.db = db;
}
@Override
public int getRowCount()
{
return db.size();
}
@Override
public int getColumnCount()
{
return 8;
}
@Override
public Object getValueAt(int riadok, int stlpec)
{
Osoba osoba = db.get(riadok);
switch(stlpec)
{
case 0:
return osoba.getId();
case 1:
return osoba.getMeno();
case 2:
return osoba.getZamestnanie();
case 3:
return osoba.getVekovaKategoria();
case 4:
return osoba.getStatus();
case 5:
return osoba.isJeCudzinec();
case 6:
return osoba.getStatnaPrislusnost();
case 7:
return osoba.getPohlavie();
}
return null;
}
}
| [
"m.patarak@gmail.com"
] | m.patarak@gmail.com |
5df0137738e1273da44d50e5b3569bb645dc5032 | 2c40544be8739e5f0d63adf231c1070d97f25aaf | /SpringProjects/WebContent/ntsp67/DAOProj3-CallbackInterfaces/src/main/java/com/nt/test/TestClient.java | 915b6f599696af4147f916a52262a799fb0fbc65 | [] | no_license | gurunatha/samples | 7ad293750bc351b722dd079f3b8a8b08a4c7d2d4 | 379cc85d521923bf579fc130e35883f1c1e8b947 | refs/heads/master | 2021-08-23T01:52:33.976429 | 2017-12-02T08:37:05 | 2017-12-02T08:37:05 | 112,822,525 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 968 | java | package com.nt.test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import com.nt.service.ListEmployeeService;
public class TestClient {
public static void main(String[] args) {
ApplicationContext ctx=null;
ListEmployeeService service=null;
//create IOC container
ctx=new FileSystemXmlApplicationContext("src/main/java/com/nt/cfgs/applicationContext.xml");
//get Bean
service=ctx.getBean("listEmpService",ListEmployeeService.class);
//call methods
System.out.println("7499 Emp details"+service.listEmployeeByNo(7499));
System.out.println("-----------------------------------------------------------");
System.out.println("CLERK emp details"+service.listEmployeeByDesg("CLERK"));
//close IOC
((AbstractApplicationContext) ctx).close();
}//main
}//class
| [
"gurunathreddy326@gmail.com"
] | gurunathreddy326@gmail.com |
727db5517760303e8ae69c7b7cbd55c64f4e5c11 | 92622e95bddb17abf48bf18280b3f73f535cd3f7 | /src/com/github/cuter44/util/crypto/RSAGenKeyCLI.java | 61b72185f9c103481efc4c2857e92f9b4ab2f57b | [] | no_license | cuter44/paperfly | 217182efe7446f03611739917e4098ada07fdbeb | 97ed9f28606ce0005dbc25979d91fa27ac404272 | refs/heads/master | 2021-01-22T10:21:33.578006 | 2014-09-14T22:45:25 | 2014-09-14T22:45:25 | 22,976,627 | 7 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,385 | java | package com.github.cuter44.util.crypto;
import java.math.BigInteger;
import java.util.Scanner;
import java.util.Arrays;
import java.security.KeyPair;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
//import com.github.cuter44.util.crypto.*;
public class RSAGenKeyCLI
{
public static void main(String[] args)
{
try
{
KeyPair kp = CryptoUtil.generateRSAKey();
byte[] ba;
ba = ((RSAPrivateKey)kp.getPrivate()).getPrivateExponent().toByteArray();
ba = (ba[0]!=0 ? ba : Arrays.copyOfRange(ba, 1, ba.length));
System.out.println("d=");
System.out.println(CryptoUtil.byteToHex(ba));
ba = ((RSAPrivateKey)kp.getPrivate()).getModulus().toByteArray();
ba = (ba[0]!=0 ? ba : Arrays.copyOfRange(ba, 1, ba.length));
System.out.println("m=");
System.out.println(CryptoUtil.byteToHex(ba));
ba = ((RSAPublicKey)kp.getPublic()).getPublicExponent().toByteArray();
ba = (ba[0]!=0 ? ba : Arrays.copyOfRange(ba, 1, ba.length));
System.out.println("e=");
System.out.println(CryptoUtil.byteToHex(ba));
}
catch (Exception ex)
{
ex.printStackTrace();
return;
}
}
}
| [
"cuter44@foxmail.com"
] | cuter44@foxmail.com |
82cda77abb313b0424c1ec4f838f22e99b780436 | 05e5bee54209901d233f4bfa425eb6702970d6ab | /org/bukkit/command/defaults/SaveOnCommand.java | 1c2de7757ae4871c6f6cbbe31e523fdfeb9c765b | [] | no_license | TheShermanTanker/PaperSpigot-1.7.10 | 23f51ff301e7eb05ef6a3d6999dd2c62175c270f | ea9d33bcd075e00db27b7f26450f9dc8e6d18262 | refs/heads/master | 2022-12-24T10:32:09.048106 | 2020-09-25T15:43:22 | 2020-09-25T15:43:22 | 298,614,646 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,760 | java | /* */ package org.bukkit.command.defaults;
/* */
/* */ import com.google.common.collect.ImmutableList;
/* */ import java.util.List;
/* */ import org.apache.commons.lang.Validate;
/* */ import org.bukkit.Bukkit;
/* */ import org.bukkit.World;
/* */ import org.bukkit.command.Command;
/* */ import org.bukkit.command.CommandSender;
/* */
/* */ public class SaveOnCommand
/* */ extends VanillaCommand
/* */ {
/* */ public SaveOnCommand() {
/* 15 */ super("save-on");
/* 16 */ this.description = "Enables server autosaving";
/* 17 */ this.usageMessage = "/save-on";
/* 18 */ setPermission("bukkit.command.save.enable");
/* */ }
/* */
/* */
/* */ public boolean execute(CommandSender sender, String currentAlias, String[] args) {
/* 23 */ if (!testPermission(sender)) return true;
/* */
/* 25 */ for (World world : Bukkit.getWorlds()) {
/* 26 */ world.setAutoSave(true);
/* */ }
/* */
/* 29 */ Command.broadcastCommandMessage(sender, "Enabled level saving..");
/* 30 */ return true;
/* */ }
/* */
/* */
/* */ public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
/* 35 */ Validate.notNull(sender, "Sender cannot be null");
/* 36 */ Validate.notNull(args, "Arguments cannot be null");
/* 37 */ Validate.notNull(alias, "Alias cannot be null");
/* */
/* 39 */ return (List<String>)ImmutableList.of();
/* */ }
/* */ }
/* Location: D:\Paper-1.7.10\PaperSpigot-1.7.10-R0.1-SNAPSHOT-latest.jar!\org\bukkit\command\defaults\SaveOnCommand.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"tanksherman27@gmail.com"
] | tanksherman27@gmail.com |
a9d4c89e4bb3787ae794f4d4da0a688c7fa33440 | 2bc2eadc9b0f70d6d1286ef474902466988a880f | /tags/mule-1.3/mule/core/src/main/java/org/mule/config/SimplePropertyExtractor.java | db78a733bb27cef79b06a74b2e1532f980bbd23d | [] | no_license | OrgSmells/codehaus-mule-git | 085434a4b7781a5def2b9b4e37396081eaeba394 | f8584627c7acb13efdf3276396015439ea6a0721 | refs/heads/master | 2022-12-24T07:33:30.190368 | 2020-02-27T19:10:29 | 2020-02-27T19:10:29 | 243,593,543 | 0 | 0 | null | 2022-12-15T23:30:00 | 2020-02-27T18:56:48 | null | UTF-8 | Java | false | false | 1,003 | java | /*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the MuleSource MPL
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.config;
import java.util.List;
import java.util.Map;
import org.mule.umo.UMOMessage;
import org.mule.util.PropertiesUtils;
/**
* Looks up the property on the message using the name given.
*
* @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
* @version $Revision$
*/
public class SimplePropertyExtractor implements PropertyExtractor {
public Object getProperty(String name, UMOMessage message) {
return message.getProperty(name);
}
public Map getProperties(List names, UMOMessage message) {
return PropertiesUtils.getMessageProperties(names, message);
}
}
| [
"tcarlson@bf997673-6b11-0410-b953-e057580c5b09"
] | tcarlson@bf997673-6b11-0410-b953-e057580c5b09 |
10cd0380c9d6908aaa4dac133cfa77ca2f75600c | 8228efa27043e0a236ca8003ec0126012e1fdb02 | /L2JOptimus_Core/java/net/sf/l2j/gameserver/scripting/quests/Q032_AnObviousLie.java | 0865b928b7a9b4f05499fb47f06bd83f48567b55 | [] | no_license | wan202/L2JDeath | 9982dfce14ae19a22392955b996b42dc0e8cede6 | e0ab026bf46ac82c91bdbd048a0f50dc5213013b | refs/heads/master | 2020-12-30T12:35:59.808276 | 2017-05-16T18:57:25 | 2017-05-16T18:57:25 | 91,397,726 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,657 | java | package net.sf.l2j.gameserver.scripting.quests;
import net.sf.l2j.gameserver.model.actor.Npc;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.scripting.Quest;
import net.sf.l2j.gameserver.scripting.QuestState;
import net.sf.l2j.gameserver.scripting.quests.audio.Sound;
public class Q032_AnObviousLie extends Quest
{
private static final String qn = "Q032_AnObviousLie";
// Items
private static final int SUEDE = 1866;
private static final int THREAD = 1868;
private static final int SPIRIT_ORE = 3031;
private static final int MAP = 7165;
private static final int MEDICINAL_HERB = 7166;
// Rewards
private static final int CAT_EARS = 6843;
private static final int RACOON_EARS = 7680;
private static final int RABBIT_EARS = 7683;
// NPCs
private static final int GENTLER = 30094;
private static final int MAXIMILIAN = 30120;
private static final int MIKI_THE_CAT = 31706;
public Q032_AnObviousLie()
{
super(32, "An Obvious Lie");
setItemsIds(MAP, MEDICINAL_HERB);
addStartNpc(MAXIMILIAN);
addTalkId(MAXIMILIAN, GENTLER, MIKI_THE_CAT);
addKillId(20135); // Alligator
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
String htmltext = event;
QuestState st = player.getQuestState(qn);
if (st == null)
return htmltext;
if (event.equalsIgnoreCase("30120-1.htm"))
{
st.setState(STATE_STARTED);
st.set("cond", "1");
st.playSound(Sound.SOUND_ACCEPT);
}
else if (event.equalsIgnoreCase("30094-1.htm"))
{
st.set("cond", "2");
st.playSound(Sound.SOUND_MIDDLE);
st.giveItems(MAP, 1);
}
else if (event.equalsIgnoreCase("31706-1.htm"))
{
st.set("cond", "3");
st.playSound(Sound.SOUND_MIDDLE);
st.takeItems(MAP, 1);
}
else if (event.equalsIgnoreCase("30094-4.htm"))
{
st.set("cond", "5");
st.playSound(Sound.SOUND_MIDDLE);
st.takeItems(MEDICINAL_HERB, 20);
}
else if (event.equalsIgnoreCase("30094-7.htm"))
{
if (st.getQuestItemsCount(SPIRIT_ORE) < 500)
htmltext = "30094-5.htm";
else
{
st.set("cond", "6");
st.playSound(Sound.SOUND_MIDDLE);
st.takeItems(SPIRIT_ORE, 500);
}
}
else if (event.equalsIgnoreCase("31706-4.htm"))
{
st.set("cond", "7");
st.playSound(Sound.SOUND_MIDDLE);
}
else if (event.equalsIgnoreCase("30094-10.htm"))
{
st.set("cond", "8");
st.playSound(Sound.SOUND_MIDDLE);
}
else if (event.equalsIgnoreCase("30094-13.htm"))
st.playSound(Sound.SOUND_MIDDLE);
else if (event.equalsIgnoreCase("cat"))
{
if (st.getQuestItemsCount(THREAD) < 1000 || st.getQuestItemsCount(SUEDE) < 500)
htmltext = "30094-11.htm";
else
{
htmltext = "30094-14.htm";
st.takeItems(SUEDE, 500);
st.takeItems(THREAD, 1000);
st.giveItems(CAT_EARS, 1);
st.playSound(Sound.SOUND_FINISH);
st.exitQuest(false);
}
}
else if (event.equalsIgnoreCase("racoon"))
{
if (st.getQuestItemsCount(THREAD) < 1000 || st.getQuestItemsCount(SUEDE) < 500)
htmltext = "30094-11.htm";
else
{
htmltext = "30094-14.htm";
st.takeItems(SUEDE, 500);
st.takeItems(THREAD, 1000);
st.giveItems(RACOON_EARS, 1);
st.playSound(Sound.SOUND_FINISH);
st.exitQuest(false);
}
}
else if (event.equalsIgnoreCase("rabbit"))
{
if (st.getQuestItemsCount(THREAD) < 1000 || st.getQuestItemsCount(SUEDE) < 500)
htmltext = "30094-11.htm";
else
{
htmltext = "30094-14.htm";
st.takeItems(SUEDE, 500);
st.takeItems(THREAD, 1000);
st.giveItems(RABBIT_EARS, 1);
st.playSound(Sound.SOUND_FINISH);
st.exitQuest(false);
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
QuestState st = player.getQuestState(qn);
String htmltext = getNoQuestMsg();
if (st == null)
return htmltext;
switch (st.getState())
{
case STATE_CREATED:
htmltext = (player.getLevel() < 45) ? "30120-0a.htm" : "30120-0.htm";
break;
case STATE_STARTED:
int cond = st.getInt("cond");
switch (npc.getNpcId())
{
case MAXIMILIAN:
htmltext = "30120-2.htm";
break;
case GENTLER:
if (cond == 1)
htmltext = "30094-0.htm";
else if (cond == 2 || cond == 3)
htmltext = "30094-2.htm";
else if (cond == 4)
htmltext = "30094-3.htm";
else if (cond == 5)
htmltext = (st.getQuestItemsCount(SPIRIT_ORE) < 500) ? "30094-5.htm" : "30094-6.htm";
else if (cond == 6)
htmltext = "30094-8.htm";
else if (cond == 7)
htmltext = "30094-9.htm";
else if (cond == 8)
htmltext = (st.getQuestItemsCount(THREAD) < 1000 || st.getQuestItemsCount(SUEDE) < 500) ? "30094-11.htm" : "30094-12.htm";
break;
case MIKI_THE_CAT:
if (cond == 2)
htmltext = "31706-0.htm";
else if (cond > 2 && cond < 6)
htmltext = "31706-2.htm";
else if (cond == 6)
htmltext = "31706-3.htm";
else if (cond > 6)
htmltext = "31706-5.htm";
break;
}
break;
case STATE_COMPLETED:
htmltext = getAlreadyCompletedMsg();
break;
}
return htmltext;
}
@Override
public String onKill(Npc npc, Player player, boolean isPet)
{
QuestState st = checkPlayerCondition(player, npc, "cond", "3");
if (st == null)
return null;
if (st.dropItemsAlways(MEDICINAL_HERB, 1, 20))
st.set("cond", "4");
return null;
}
} | [
"wande@DESKTOP-DM71DUV"
] | wande@DESKTOP-DM71DUV |
c967ec3f16c0a46fc2dfdca9b9c0652b072102f0 | d81fd75783d56945382c1382b5f7b6004fe5c309 | /vendor/bonitasoft/bonita-connectors/5.7.2/xwiki/src/main/java/org/bonitasoft/connectors/xwiki/GetMetadataConnector.java | 7c2a9d6c5de3ec6da015d649af856a2501698293 | [] | no_license | sirpentagon/bpm-infufsm | 51fc76013d60e109550aab1998ca3b44ba7e5bb0 | bbcff4ef2d7b4383b41ed37a1e7387c5bbefc6dd | refs/heads/master | 2021-01-25T13:11:48.217742 | 2014-04-28T17:06:02 | 2014-04-28T17:06:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,931 | java | /**
* Copyright (C) 2010 BonitaSoft S.A.
* BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.bonitasoft.connectors.xwiki;
import java.util.List;
import org.bonitasoft.connectors.xwiki.common.XWikiConnector;
import org.bonitasoft.connectors.xwiki.common.XWikiRestClient;
import org.ow2.bonita.connector.core.ConnectorError;
/**
* @author Ludovic Dubost
*/
public class GetMetadataConnector extends XWikiConnector {
private String wikiName;
private String spaceName;
private String pageName;
private String className;
private String propertyName;
private String propertyValue;
@Override
protected List<ConnectorError> validateFunctionParameters() {
return null;
}
@Override
protected void executeFunction(XWikiRestClient xwikiClient) throws Exception {
String value = xwikiClient.getMetadata(getWikiName(), getSpaceName(), getPageName(), getClassName(), getPropertyName(), this);
if (value!=null)
this.propertyValue = value;
}
public String getPropertyValue() {
return propertyValue;
}
public void setWikiName(String wikiName) {
this.wikiName = wikiName;
}
public String getWikiName() {
return wikiName;
}
public void setSpaceName(String spaceName) {
this.spaceName = spaceName;
}
public String getSpaceName() {
return spaceName;
}
public void setPageName(String pageName) {
this.pageName = pageName;
}
public String getPageName() {
return pageName;
}
public void setClassName(String className) {
this.className = className;
}
public String getClassName() {
return className;
}
public void setPropertyName(String propertyName) {
this.propertyName = propertyName;
}
public String getPropertyName() {
return propertyName;
}
public static void main(String[] args) throws Exception {
GetMetadataConnector conn = new GetMetadataConnector();
conn.setHost("localhost");
conn.setPort(8080);
conn.setWikiName("xwiki");
conn.setPageName("Test");
conn.setSpaceName("Test");
conn.setUsername("Admin");
conn.setPassword("admin");
conn.setClassName("XWiki.TagClass");
conn.setPropertyName("tags");
conn.executeConnector();
}
}
| [
"andrea@inf.ufsm.br"
] | andrea@inf.ufsm.br |
80430f4cfa3ce5bd2aadb7aeba9973da00077ecf | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a151/A151405Test.java | f431561ded598d0e6f517d0436b06aec74901a02 | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 256 | java | package irvine.oeis.a151;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A151405Test extends AbstractSequenceTest {
@Override
protected int maxTerms() {
return 10;
}
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
0f9a1f3e94bc1653c7386f3b7275a5c10aa5be35 | 3aa4c0e0af8715c53516193e4643b5325bde1969 | /app/src/main/java/br/com/eshopper/ecommerce/infra/FileSaver.java | fc682f10e7d994efbbcc8b40a80a12f166868112 | [] | no_license | erickbogarin/eshopper | 5353f11d15fea363236b4cf984fdc29044814083 | ebb2b0594d0e72cfc6993de6f8ec1650a65ba01d | refs/heads/master | 2021-06-03T07:10:30.891429 | 2016-09-20T04:19:43 | 2016-09-20T04:19:43 | 64,579,151 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 784 | java | package br.com.eshopper.ecommerce.infra;
import java.io.File;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
@Component
public class FileSaver {
@Autowired
HttpServletRequest request;
public String write(String basePath, MultipartFile file) {
try {
String realPath = request.getServletContext().getRealPath("/" + basePath);
String path = realPath + "/" + file.getOriginalFilename();
file.transferTo(new File(path));
return basePath + "/" + file.getOriginalFilename();
} catch (IllegalStateException | IOException e) {
throw new RuntimeException(e);
}
}
}
| [
"user.email"
] | user.email |
432eb15c1e846d7eda319d244b020fe0811366be | 8c1fc3a28079da66b164a57005a2f3e5ca7e84f1 | /src/main/java/in/ashwanik/dcp/problems/p181_210/p184/Solution.java | fad37af7a9d947446502efee3ffdd7dd379c00c7 | [
"Apache-2.0"
] | permissive | rizmaulana/daily-coding-problems | 56c3377622349cb44243bcb8fdda521fdfc4c5c8 | 1a1655b41a778a6c8f20884cca4bcc0b55d85d13 | refs/heads/master | 2020-07-04T00:28:51.784848 | 2019-08-12T14:25:30 | 2019-08-12T14:25:30 | 202,098,684 | 0 | 1 | null | 2019-08-13T08:24:55 | 2019-08-13T08:24:51 | null | UTF-8 | Java | false | false | 486 | java | package in.ashwanik.dcp.problems.p181_210.p184;
class Solution {
int gcd(int[] array) {
if (array == null || array.length == 0) {
return 1;
}
int result = array[0];
for (int index = 1; index < array.length; index++) {
result = gcd(array[index], result);
}
return result;
}
private int gcd(int a, int b) {
if (a == 0) {
return b;
}
return gcd(b % a, a);
}
} | [
"ashwanikumar04@gmail.com"
] | ashwanikumar04@gmail.com |
72656c2536f6a1c04a67fa2aab314e6d2fe03a10 | d182f1250a8da7df336bb7df0c9b4c9a01d5fa0d | /Java DB Advanced/Exam/Wedding/src/main/java/wedding/dtos/bindings/AgenciesImportFromJsonDto.java | 9ff0c76b4f4e6c91080987e7522692ae4d30faae | [] | no_license | abdullahsalem72/Java | fc4f301ba927a859670951a5f18efcaff4880d65 | 29ad94f841d4f4fca24800b17f5a13f6aabb0184 | refs/heads/master | 2021-05-05T23:24:54.326025 | 2017-11-20T22:20:35 | 2017-11-20T22:20:35 | 116,716,608 | 1 | 0 | null | 2018-01-08T19:07:47 | 2018-01-08T19:07:47 | null | UTF-8 | Java | false | false | 699 | java | package wedding.dtos.bindings;
import com.google.gson.annotations.Expose;
public class AgenciesImportFromJsonDto {
@Expose
private String name;
@Expose
private int employeesCount;
@Expose
private String town;
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public int getEmployeesCount() {
return this.employeesCount;
}
public void setEmployeesCount(int employeesCount) {
this.employeesCount = employeesCount;
}
public String getTown() {
return this.town;
}
public void setTown(String town) {
this.town = town;
}
}
| [
"ico_skipernov@abv.bg"
] | ico_skipernov@abv.bg |
5ea28264fcb3fa712963a8447ca32a2dc50be19e | b63d49dd45087307958dbd875baef0b11b7c227c | /src/main/java/glib/NoteGLib.java | a94ea04f7fb858999d81e6e2a539e0084d8d005b | [] | permissive | afs/jena-workspace | 5fad7409852a8de64c2f92ce408eb74a56776b3d | 21147336aa7694fa5d75d2ee0d733ddcb06773f2 | refs/heads/main | 2023-03-15T05:45:20.325177 | 2023-03-10T10:25:18 | 2023-03-10T10:25:18 | 38,121,320 | 0 | 0 | Apache-2.0 | 2022-06-20T17:34:12 | 2015-06-26T16:25:27 | Java | UTF-8 | Java | false | false | 3,204 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package glib;
public class NoteGLib {
// G == G1 as of 2020-July-10 : from jena-shacl : graph walking
// No direct tests
// G2 = Copy from jena-http. A few operations on graphs
// See also core GraphUtil for bulk and
// GLib : Riot.
// Iterator operations, listSubject etc.
// No direct tests
// Merge with G
// TransitiveX
// Plan.
// [x] Add G2 into G
// [x] Merge GLib into G
// [x] G/G1 to org.apache.jena.graph in jena-core.
// [x] GraphUtils, GraphUtil and G
// Go!
// [ ] test listTypesOfNode, getTypesOfNode, listNodesOfType, getTypesOfNode
// Some bulk AbstractTestGraph
/* TESTS
listSubClasses(Graph, Node)
listSuperClasses(Graph, Node)
subClasses(Graph, Node)
superClasses(Graph, Node)
listTypesOfNodeRDFS(Graph, Node)
listNodesOfTypeRDFS(Graph, Node)
allTypesOfNodeRDFS(Graph, Node)
allNodesOfTypeRDFS(Graph, Node)
*/
// --------
// Tests?
// For list returning operations, if no match return fixed empty list.
// Single class of functions for working with graph/triples/nodes.
// Streaming!
// Mostly in G
// Divide into sections.
// -- basic graph : find, contains, hasProperty
// -- getSP, getPO, getOne, getOneOrZero,
// -- tests: absentOrOne, containsOne
// -- typesOfNode, nodesOfType
// -- subclass, subproperty
// -- Bulk: G2
// -- listSubjects, listObjects, listPredicates: GLib
// -- Quad and Triple transforms.
// Check coverage
// **** rename "setSP" as "allSP" or ? No sets - only iterSP().toSet()
// Categories:
// Bulk operations - copy, delete, clear
// Replace ExtendedIterator with Iter for Graph, not API.
//interface ExtendedIterator<T> extends ClosableIterator<T>
// AutoCloseable
// ExtendedIterator<T>
// ExtendedIterator.removeNext() :: ??
// ExtendedIterator.nextOptional() :: Add to Iter.
// ExtendedIterator.andThen(Iterator<X>) :: Iter.concat
// ExtendedIterator.filterKeep(Predicate<T>) :: Iter.filter
// ExtendedIterator.filterDrop(Predicate<T>) :: Iter:notFilter
// ExtendedIterator.mapWith(Function<T, U>) :: Iter.map
// ExtendedIterator.toList() :: Iter.toList
// ExtendedIterator.toSet() :: Iter.toSet
// Close?
}
| [
"andy@seaborne.org"
] | andy@seaborne.org |
edefd5bb67cb47a0d091cb63c1c5ed132213ba5a | 1074c97cdd65d38c8c6ec73bfa40fb9303337468 | /rda0105-agl-aus-java-a43926f304e3/xms-dto/src/main/java/com/gms/xms/txndb/vo/reports/selfinsurance/WebshipLabelColumnFlagsVo.java | 52238dde880f447bbad271de310ad8caa9410774 | [] | no_license | gahlawat4u/repoName | 0361859254766c371068e31ff7be94025c3e5ca8 | 523cf7d30018b7783e90db98e386245edad34cae | refs/heads/master | 2020-05-17T01:26:00.968575 | 2019-04-29T06:11:52 | 2019-04-29T06:11:52 | 183,420,568 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,810 | java | package com.gms.xms.txndb.vo.reports.selfinsurance;
import com.gms.xms.txndb.vo.BaseVo;
public class WebshipLabelColumnFlagsVo extends BaseVo {
private static final long serialVersionUID = -4155956868885508399L;
private Boolean hasCreateDate;
private Boolean hasShipDate;
private Boolean hasPickupDate;
private Boolean hasPieces;
private Boolean hasDeadWeight;
private Boolean hasDimension;
private Boolean hasWeight;
private Boolean hasQuoted;
private Boolean hasSender;
private Boolean hasReceiver;
public Boolean getHasCreateDate() {
return hasCreateDate;
}
public void setHasCreateDate(Boolean hasCreateDate) {
this.hasCreateDate = hasCreateDate;
}
public Boolean getHasShipDate() {
return hasShipDate;
}
public void setHasShipDate(Boolean hasShipDate) {
this.hasShipDate = hasShipDate;
}
public Boolean getHasPickupDate() {
return hasPickupDate;
}
public void setHasPickupDate(Boolean hasPickupDate) {
this.hasPickupDate = hasPickupDate;
}
public Boolean getHasPieces() {
return hasPieces;
}
public void setHasPieces(Boolean hasPieces) {
this.hasPieces = hasPieces;
}
public Boolean getHasDeadWeight() {
return hasDeadWeight;
}
public void setHasDeadWeight(Boolean hasDeadWeight) {
this.hasDeadWeight = hasDeadWeight;
}
public Boolean getHasDimension() {
return hasDimension;
}
public void setHasDimension(Boolean hasDimension) {
this.hasDimension = hasDimension;
}
public Boolean getHasWeight() {
return hasWeight;
}
public void setHasWeight(Boolean hasWeight) {
this.hasWeight = hasWeight;
}
public Boolean getHasQuoted() {
return hasQuoted;
}
public void setHasQuoted(Boolean hasQuoted) {
this.hasQuoted = hasQuoted;
}
public Boolean getHasSender() {
return hasSender;
}
public void setHasSender(Boolean hasSender) {
this.hasSender = hasSender;
}
public Boolean getHasReceiver() {
return hasReceiver;
}
public void setHasReceiver(Boolean hasReceiver) {
this.hasReceiver = hasReceiver;
}
@Override
public String toString() {
return "WebshipLabelColumnFlagsVo [hasCreateDate=" + hasCreateDate + ", hasShipDate=" + hasShipDate + ", hasPickupDate=" + hasPickupDate + ", hasPieces=" + hasPieces + ", hasDeadWeight=" + hasDeadWeight + ", hasDimension=" + hasDimension + ", hasWeight=" + hasWeight + ", hasQuoted=" + hasQuoted + ", hasSender=" + hasSender + ", hasReceiver=" + hasReceiver + "]";
}
} | [
"sachin.gahlawat19@gmail.com"
] | sachin.gahlawat19@gmail.com |
d0654a67238705dd0974880483d58e18b06f1f44 | 8b31b8ff30862c5383cb92b13db0741142b7eb97 | /src/codingbat/Map_2/Word0.java | 537bd8c4de8dcac6fd4601c35ec5638d8b87b1dc | [] | no_license | RyuChaehyeong/java202009 | bb8777682c811b0fac64dde420d23ab8448bad05 | aa55c321bb0b4692b4991fb5ea772f5c8bbdc4b0 | refs/heads/master | 2023-01-22T01:52:00.246360 | 2020-12-08T01:15:16 | 2020-12-08T01:15:16 | 299,485,595 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 386 | java | package codingbat.Map_2;
import java.util.HashMap;
import java.util.Map;
public class Word0 {
public Map<String, Integer> word0(String[] strings) {
// by using hashMap
Map<String, Integer> map = new HashMap<String, Integer>();
for (String str : strings) {
String s = str;
Integer v = 0;
if (!map.containsKey(str)) {
map.put(str, v);
}
}
return map;
}
}
| [
"fluid15@naver.com"
] | fluid15@naver.com |
0cc8d98ad5cbdac00cd9cc418a370db379b21f84 | b442604a86e5d3695fc060e8fa5d5fdaa2b666d2 | /1/nm-service-ucenter-auth/src/main/java/com/ningmeng/auth/controller/AuthController.java | bda216b3a8fb74828833d4d46d5f8fb7972cd3f4 | [] | no_license | 1704AClass/jiang | c57c4a75a7c002e2599e9c79d654591ec2a87a83 | dbd7b83f3c682f936a14f43297b3ef97b893959a | refs/heads/dev | 2022-12-12T03:26:27.321082 | 2020-03-18T03:10:17 | 2020-03-18T03:10:17 | 240,629,297 | 0 | 0 | null | 2022-11-24T06:27:37 | 2020-02-15T01:52:03 | Java | UTF-8 | Java | false | false | 4,187 | java | package com.ningmeng.auth.controller;
import com.ningmeng.api.auth.AuthControllerApi;
import com.ningmeng.auth.service.AuthService;
import com.ningmeng.framework.domain.ucenter.ext.AuthToken;
import com.ningmeng.framework.domain.ucenter.request.LoginRequest;
import com.ningmeng.framework.domain.ucenter.response.AuthCode;
import com.ningmeng.framework.domain.ucenter.response.JwtResult;
import com.ningmeng.framework.domain.ucenter.response.LoginResult;
import com.ningmeng.framework.exception.CustomExceptionCast;
import com.ningmeng.framework.model.response.CommonCode;
import com.ningmeng.framework.model.response.ResponseResult;
import com.ningmeng.framework.utils.CookieUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
@RestController
public class AuthController implements AuthControllerApi {
@Value("${auth.clientId}")
String clientId;
@Value("${auth.clientSecret}")
String clientSecret;
@Value("${auth.cookieDomain}")
String cookieDomain;
@Value("${auth.cookieMaxAge}")
int cookieMaxAge;
@Autowired
private AuthService authService;
@Autowired
private HttpServletRequest request;
@Autowired
private HttpServletResponse response;
@Override
@PostMapping("/userlogin")
public LoginResult login(LoginRequest loginRequest) {
if(loginRequest==null){
CustomExceptionCast.cast(AuthCode.AUTH_LOGIN_ERROR);
}
//校验账号是否输入
if("".equals(loginRequest.getUsername())){
CustomExceptionCast.cast(AuthCode.AUTH_USERNAME_NONE);
}
//校验密码是否输入
if("".equals(loginRequest.getPassword())){
CustomExceptionCast.cast(AuthCode.AUTH_CREDENTIAL_ERROR);
}
//如果登录成功 保存cookie
AuthToken authToken = authService.login(loginRequest.getUsername(),loginRequest.getPassword(),clientId,clientSecret);
String access_token = authToken.getAccess_token();
//将访问令牌存储到cookie
this.saveCookie(access_token);
return new LoginResult(CommonCode.SUCCESS,access_token);
}
private void saveCookie(String token){
//添加cookie认证令牌,最后一个参数设置为false,表示允许浏览器获取
HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
CookieUtil.addCookie(response, cookieDomain, "/", "uid", token, cookieMaxAge, false);
}
@Override
@PostMapping("/userlogout")
public ResponseResult logout() {
//取出身份令牌
String uid = getTokenFormCookie();
//删除redis中token
authService.delToken(uid);
//清除cookie
clearCookie(uid);
return new ResponseResult(CommonCode.SUCCESS);
}
//清除cookie
private void clearCookie(String token){
CookieUtil.addCookie(response, cookieDomain, "/", "uid", token, 0, false);
}
@Override
@GetMapping("/userjwt")
public JwtResult userjwt() {
//获取cookie中的令牌
String access_token = getTokenFormCookie();
//根据令牌从redis查询jwt
AuthToken authToken = authService.getUserToken(access_token);
if(authToken == null){
return new JwtResult(CommonCode.FAIL,null);
}
return new JwtResult(CommonCode.SUCCESS,authToken.getJwt_token());
}
//从cookie中读取访问令牌
private String getTokenFormCookie(){
Map<String, String> cookieMap = CookieUtil.readCookie(request,"uid");
String access_token = cookieMap.get("uid");
return access_token;
}
}
| [
"you@example.com"
] | you@example.com |
392bfc7c9957a748dfc43e870c6b3aa18760001e | 6d60a8adbfdc498a28f3e3fef70366581aa0c5fd | /codebase/selected/1544119.java | febeeaed3605cb1e9ccaf625b3eadf2e21c83ee1 | [] | no_license | rayhan-ferdous/code2vec | 14268adaf9022d140a47a88129634398cd23cf8f | c8ca68a7a1053d0d09087b14d4c79a189ac0cf00 | refs/heads/master | 2022-03-09T08:40:18.035781 | 2022-02-27T23:57:44 | 2022-02-27T23:57:44 | 140,347,552 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,267 | java | package com.socialnetworkshirts.twittershirts.dataaccess.spreadshirt.hashing;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* @author mbs
*/
public class SHA1 {
private static final Logger log = LoggerFactory.getLogger(SHA1.class);
private static final String SHA_1 = "SHA-1";
public static String getHashAsHex(String text) {
try {
MessageDigest md = MessageDigest.getInstance(SHA_1);
return convertToHex(md.digest(text.getBytes()));
} catch (NoSuchAlgorithmException e) {
log.error("SHA-1 algorithm for signing API data not found!");
return null;
}
}
private static String convertToHex(byte[] data) {
StringBuffer buf = new StringBuffer();
for (int i = 0; i < data.length; i++) {
int halfbyte = (data[i] >>> 4) & 0x0F;
int two_halfs = 0;
do {
if ((0 <= halfbyte) && (halfbyte <= 9)) buf.append((char) ('0' + halfbyte)); else buf.append((char) ('a' + (halfbyte - 10)));
halfbyte = data[i] & 0x0F;
} while (two_halfs++ < 1);
}
return buf.toString();
}
}
| [
"aaponcseku@gmail.com"
] | aaponcseku@gmail.com |
4c46804c2b66bddb9b7d1d2cd6442497873e84ed | 75380c97399ee66e01b678c5f5cec27886f843eb | /web01/src/java/obj/Person.java | e99449bc2677f0be5c5c2769db1718c75142466c | [] | no_license | hendisantika/jdbc-jpa-spring-sample | 960b84c44dc2f9103d4c97b93130213bd8e2133a | 1bdb3445115b3ef8016704d2d3eb9a1b307866e6 | refs/heads/master | 2020-07-10T03:33:10.632429 | 2015-06-18T07:19:28 | 2015-06-18T07:19:28 | 37,646,260 | 0 | 1 | null | 2015-06-18T08:05:23 | 2015-06-18T08:05:23 | null | UTF-8 | Java | false | false | 1,372 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package obj;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author user
*/
public class Person {
private String nama;
private String alamat;
private String jenkel;
private List<String> hobi = new ArrayList<String>();
/**
* @return the nama
*/
public String getNama() {
return nama;
}
/**
* @param nama the nama to set
*/
public void setNama(String nama) {
this.nama = nama;
}
/**
* @return the alamat
*/
public String getAlamat() {
return alamat;
}
/**
* @param alamat the alamat to set
*/
public void setAlamat(String alamat) {
this.alamat = alamat;
}
/**
* @return the jenkel
*/
public String getJenkel() {
return jenkel;
}
/**
* @param jenkel the jenkel to set
*/
public void setJenkel(String jenkel) {
this.jenkel = jenkel;
}
/**
* @return the hobi
*/
public List<String> getHobi() {
return hobi;
}
/**
* @param hobi the hobi to set
*/
public void setHobi(List<String> hobi) {
this.hobi = hobi;
}
}
| [
"hendro.steven@gmail.com"
] | hendro.steven@gmail.com |
17680f7be022c68961404b5f98c1ee393bb40988 | 0d4f05c9909695a166e97b8958680945ea5c1266 | /src/minecraft/io/netty/handler/codec/spdy/SpdyHeaderBlockRawDecoder.java | 1913c03807072e57c3547143f3048be12a51addc | [] | no_license | MertDundar1/ETB-0.6 | 31f3f42f51064ffd7facaa95cf9b50d0c2d71995 | 145d008fed353545157cd0e73daae8bc8d7f50b9 | refs/heads/master | 2022-01-15T08:42:12.762634 | 2019-05-15T23:37:33 | 2019-05-15T23:37:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,294 | java | package io.netty.handler.codec.spdy;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
public class SpdyHeaderBlockRawDecoder
extends SpdyHeaderBlockDecoder
{
private static final int LENGTH_FIELD_SIZE = 4;
private final int maxHeaderSize;
private State state;
private ByteBuf cumulation;
private int headerSize;
private int numHeaders;
private int length;
private String name;
private static enum State
{
READ_NUM_HEADERS,
READ_NAME_LENGTH,
READ_NAME,
SKIP_NAME,
READ_VALUE_LENGTH,
READ_VALUE,
SKIP_VALUE,
END_HEADER_BLOCK,
ERROR;
private State() {} }
public SpdyHeaderBlockRawDecoder(SpdyVersion spdyVersion, int maxHeaderSize) { if (spdyVersion == null) {
throw new NullPointerException("spdyVersion");
}
this.maxHeaderSize = maxHeaderSize;
state = State.READ_NUM_HEADERS;
}
private static int readLengthField(ByteBuf buffer) {
int length = SpdyCodecUtil.getSignedInt(buffer, buffer.readerIndex());
buffer.skipBytes(4);
return length;
}
void decode(ByteBuf headerBlock, SpdyHeadersFrame frame) throws Exception
{
if (headerBlock == null) {
throw new NullPointerException("headerBlock");
}
if (frame == null) {
throw new NullPointerException("frame");
}
if (cumulation == null) {
decodeHeaderBlock(headerBlock, frame);
if (headerBlock.isReadable()) {
cumulation = headerBlock.alloc().buffer(headerBlock.readableBytes());
cumulation.writeBytes(headerBlock);
}
} else {
cumulation.writeBytes(headerBlock);
decodeHeaderBlock(cumulation, frame);
if (cumulation.isReadable()) {
cumulation.discardReadBytes();
} else {
releaseBuffer();
}
}
}
protected void decodeHeaderBlock(ByteBuf headerBlock, SpdyHeadersFrame frame) throws Exception
{
while (headerBlock.isReadable()) { int skipLength;
switch (1.$SwitchMap$io$netty$handler$codec$spdy$SpdyHeaderBlockRawDecoder$State[state.ordinal()]) {
case 1:
if (headerBlock.readableBytes() < 4) {
return;
}
numHeaders = readLengthField(headerBlock);
if (numHeaders < 0) {
state = State.ERROR;
frame.setInvalid();
} else if (numHeaders == 0) {
state = State.END_HEADER_BLOCK;
} else {
state = State.READ_NAME_LENGTH;
}
break;
case 2:
if (headerBlock.readableBytes() < 4) {
return;
}
length = readLengthField(headerBlock);
if (length <= 0) {
state = State.ERROR;
frame.setInvalid();
} else if ((length > maxHeaderSize) || (headerSize > maxHeaderSize - length)) {
headerSize = (maxHeaderSize + 1);
state = State.SKIP_NAME;
frame.setTruncated();
} else {
headerSize += length;
state = State.READ_NAME;
}
break;
case 3:
if (headerBlock.readableBytes() < length) {
return;
}
byte[] nameBytes = new byte[length];
headerBlock.readBytes(nameBytes);
name = new String(nameBytes, "UTF-8");
if (frame.headers().contains(name)) {
state = State.ERROR;
frame.setInvalid();
} else {
state = State.READ_VALUE_LENGTH;
}
break;
case 4:
skipLength = Math.min(headerBlock.readableBytes(), length);
headerBlock.skipBytes(skipLength);
length -= skipLength;
if (length == 0) {
state = State.READ_VALUE_LENGTH;
}
break;
case 5:
if (headerBlock.readableBytes() < 4) {
return;
}
length = readLengthField(headerBlock);
if (length < 0) {
state = State.ERROR;
frame.setInvalid();
} else if (length == 0) {
if (!frame.isTruncated())
{
frame.headers().add(name, "");
}
name = null;
if (--numHeaders == 0) {
state = State.END_HEADER_BLOCK;
} else {
state = State.READ_NAME_LENGTH;
}
}
else if ((length > maxHeaderSize) || (headerSize > maxHeaderSize - length)) {
headerSize = (maxHeaderSize + 1);
name = null;
state = State.SKIP_VALUE;
frame.setTruncated();
} else {
headerSize += length;
state = State.READ_VALUE;
}
break;
case 6:
if (headerBlock.readableBytes() < length) {
return;
}
byte[] valueBytes = new byte[length];
headerBlock.readBytes(valueBytes);
int index = 0;
int offset = 0;
if (valueBytes[0] == 0) {
state = State.ERROR;
frame.setInvalid();
}
else
{
while (index < length) {
while ((index < valueBytes.length) && (valueBytes[index] != 0)) {
index++;
}
if (index < valueBytes.length)
{
if ((index + 1 == valueBytes.length) || (valueBytes[(index + 1)] == 0))
{
state = State.ERROR;
frame.setInvalid();
break;
}
}
String value = new String(valueBytes, offset, index - offset, "UTF-8");
try
{
frame.headers().add(name, value);
}
catch (IllegalArgumentException e) {
state = State.ERROR;
frame.setInvalid();
break;
}
index++;
offset = index;
}
name = null;
if (state != State.ERROR)
{
if (--numHeaders == 0) {
state = State.END_HEADER_BLOCK;
} else
state = State.READ_NAME_LENGTH; }
}
break;
case 7:
skipLength = Math.min(headerBlock.readableBytes(), length);
headerBlock.skipBytes(skipLength);
length -= skipLength;
if (length == 0) {
if (--numHeaders == 0) {
state = State.END_HEADER_BLOCK;
} else {
state = State.READ_NAME_LENGTH;
}
}
break;
case 8:
state = State.ERROR;
frame.setInvalid();
break;
case 9:
headerBlock.skipBytes(headerBlock.readableBytes());
return;
default:
throw new Error("Shouldn't reach here.");
}
}
}
void endHeaderBlock(SpdyHeadersFrame frame) throws Exception
{
if (state != State.END_HEADER_BLOCK) {
frame.setInvalid();
}
releaseBuffer();
headerSize = 0;
name = null;
state = State.READ_NUM_HEADERS;
}
void end()
{
releaseBuffer();
}
private void releaseBuffer() {
if (cumulation != null) {
cumulation.release();
cumulation = null;
}
}
}
| [
"realhcfus@gmail.com"
] | realhcfus@gmail.com |
48f32b6b0775fffaa566e8a7401f56e6fcfa763d | 762899c392847ea2ee7cd1b67ae6d0ad047302d3 | /01-spring-core-demo/src/main/java/course/spring/coredemo/provider/MockArticleProvider.java | 30607aa975af9448c7a6603cc2efdf462a344044 | [] | no_license | iproduct/course-spring5 | 8afdd82c6dbcf214b25511c23127b966d79424ce | eb033719d8d450ec34b93ea655a4b58012f61358 | refs/heads/master | 2023-01-22T07:06:08.607967 | 2023-01-11T18:10:32 | 2023-01-11T18:10:32 | 129,257,573 | 18 | 12 | null | 2023-01-11T18:16:32 | 2018-04-12T13:42:16 | JavaScript | UTF-8 | Java | false | false | 1,697 | java | package course.spring.coredemo.provider;
import course.spring.coredemo.model.Article;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
//@Primary
@Repository("provider")
@Qualifier("mockProvider")
public class MockArticleProvider implements ArticleProvider{
private AtomicInteger nextId = new AtomicInteger(0);
private Map<Integer, Article> articles = new ConcurrentHashMap<>();
public MockArticleProvider() {
Article[] mockArticles = {
new Article("New Spring 5", "WebFlux is here ..."),
new Article("DI Basics", "There are many ways to DI in Spring ..."),
new Article("Reactive Spring", "WebFlux is based on project Ractor ...")
};
Arrays.stream(mockArticles).forEach(this::addArticle);
}
@Override
public List<Article> getAticles() {
return new ArrayList<>(articles.values());
}
@Override
public Article addArticle(Article article) {
article.setId(nextId.incrementAndGet());
return articles.put(article.getId(), article);
}
public static ArticleProvider createProvider() {
MockArticleProvider provider = new MockArticleProvider();
provider.addArticle(new Article("Created by factory method", "Created by factory method content ..."));
return provider;
}
}
| [
"office@iproduct.org"
] | office@iproduct.org |
7195795fe827976005865060d5a1ec5a69186c6e | 50f2a592ea978d19ef7f00f302d0c374abd263b5 | /tensquare_rabbitmqtest/src/main/java/com/tensquare/rabbit/RabbitApplication.java | 220159ea0aa32b9ab64b8a59d9854c8ff13ba165 | [] | no_license | oweson/tensquare_parent | b98479d2f002d8cd3b6c35ef557748b1afb383bd | 27ee46955683f7676e14383c1d4b77f328378389 | refs/heads/master | 2023-01-12T12:11:56.989437 | 2020-11-20T13:48:59 | 2020-11-20T13:48:59 | 287,891,056 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 408 | java | package com.tensquare.rabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
@SpringBootApplication
@EnableAsync
// 开启异步
public class RabbitApplication {
public static void main(String[] args) {
SpringApplication.run(RabbitApplication.class);
}
}
| [
"570347720@qq.com"
] | 570347720@qq.com |
dd5d88fe38d69ea1dbe551cd26af248c5198e9ab | 101d7d16cd1d3eed86b9385bc6d3c6ded50d33d0 | /maven3-plugin/src/test/java/org/hudsonci/maven/plugin/dependencymonitor/internal/ArtifactsExtractorImplTest.java | 522113d359ba1f65e1c078a8e4a7b93962eba7d1 | [] | no_license | hudson3-plugins/maven3-support | 4f38c8b67773291069e71fc031955fc9c3cc9a2d | a850ac707790be6b1a21d7537003b0d087b0d0dc | refs/heads/master | 2023-03-19T13:02:57.621053 | 2016-02-19T18:25:55 | 2016-02-19T18:25:55 | 4,681,919 | 0 | 2 | null | 2015-09-19T02:41:48 | 2012-06-16T02:49:15 | Java | UTF-8 | Java | false | false | 2,221 | java | /**
* The MIT License
*
* Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved.
*
* 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.hudsonci.maven.plugin.dependencymonitor.internal;
import hudson.matrix.MatrixConfiguration;
import hudson.matrix.MatrixRun;
import org.hudsonci.maven.plugin.dependencymonitor.ArtifactsPair;
import org.hudsonci.maven.plugin.dependencymonitor.internal.ArtifactsExtractorImpl;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertNull;
import static org.mockito.Mockito.mock;
/**
* Tests for {@link ArtifactsExtractorImpl}.
*/
public class ArtifactsExtractorImplTest
{
private ArtifactsExtractorImpl extractor;
@Before
public void setUp() throws Exception {
extractor = new ArtifactsExtractorImpl();
}
@Test
public void ensureExtractMatrixConfigurationReturnsNull() {
ArtifactsPair artifacts = extractor.extract(mock(MatrixConfiguration.class));
assertNull(artifacts);
}
@Test
public void ensureExtractMatrixRunReturnsNull() {
ArtifactsPair artifacts = extractor.extract(mock(MatrixRun.class));
assertNull(artifacts);
}
}
| [
"mcculls@gmail.com"
] | mcculls@gmail.com |
d2680d8ca80042d4b4b7e7e9cf4196b51001d6c7 | a65fbeaa1c14b1356b852d08acb73940a98ca3ef | /ph-html/src/test/java/com/helger/html/hc/html/root/HCHtmlTest.java | 67cf8d2ec35d9fa3eed2c403170eed8d8fd03305 | [] | no_license | sgano1/ph-html | 6bcee249c528a37619116aa1936d46ed13831c88 | 998bccb26c0f14de11437e5d18f94d6e1b0ac18c | refs/heads/master | 2021-01-18T06:20:28.783777 | 2016-02-18T17:24:45 | 2016-02-18T17:24:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,105 | java | /**
* Copyright (C) 2014-2016 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.html.hc.html.root;
import static org.junit.Assert.assertEquals;
import org.junit.Rule;
import org.junit.Test;
import com.helger.css.media.ECSSMedium;
import com.helger.html.hc.config.HCSettings;
import com.helger.html.hc.html.metadata.HCMeta;
import com.helger.html.hc.html.metadata.HCStyle;
import com.helger.html.hc.html.script.HCScriptInlineOnDocumentReady;
import com.helger.html.hc.html.sections.HCH1;
import com.helger.html.hc.mock.HCTestRuleOptimized;
import com.helger.html.hc.render.HCRenderer;
import com.helger.html.js.UnparsedJSCodeProvider;
/**
* Test class for class {@link HCHtml}
*
* @author Philip Helger
*/
public final class HCHtmlTest
{
@Rule
public final HCTestRuleOptimized m_aRule = new HCTestRuleOptimized ();
@Test
public void testOutOfBandNodes1 ()
{
final HCHtml aHtml = new HCHtml ();
aHtml.getBody ().addChild (new HCH1 ().addChild ("Test"));
aHtml.getBody ().addChild (new HCStyle ("h1{color:red;}"));
// Must be done for HCHtml separately
HCRenderer.prepareHtmlForConversion (aHtml, HCSettings.getConversionSettings ());
assertEquals ("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\" dir=\"ltr\">" +
"<head><style type=\"text/css\">h1{color:red;}</style></head>" +
"<body><h1>Test</h1></body>" +
"</html>",
HCRenderer.getAsHTMLString (aHtml));
// Do it again and check for node consistency
assertEquals ("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\" dir=\"ltr\">" +
"<head><style type=\"text/css\">h1{color:red;}</style></head>" +
"<body><h1>Test</h1></body>" +
"</html>",
HCRenderer.getAsHTMLString (aHtml));
}
@Test
public void testOutOfBandNodes1WithStyleMedium ()
{
final HCHtml aHtml = new HCHtml ();
aHtml.getBody ().addChild (new HCH1 ().addChild ("Test"));
aHtml.getBody ().addChild (new HCStyle ("h1{color:red;}").addMedium (ECSSMedium.PRINT));
// Must be done for HCHtml separately
HCRenderer.prepareHtmlForConversion (aHtml, HCSettings.getConversionSettings ());
assertEquals ("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\" dir=\"ltr\">" +
"<head><style type=\"text/css\" media=\"print\">h1{color:red;}</style></head>" +
"<body><h1>Test</h1></body>" +
"</html>",
HCRenderer.getAsHTMLString (aHtml));
// Do it again and check for node consistency
assertEquals ("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\" dir=\"ltr\">" +
"<head><style type=\"text/css\" media=\"print\">h1{color:red;}</style></head>" +
"<body><h1>Test</h1></body>" +
"</html>",
HCRenderer.getAsHTMLString (aHtml));
}
@Test
public void testOutOfBandNodes2 ()
{
final HCHtml aHtml = new HCHtml ();
aHtml.getHead ().addMetaElement (new HCMeta ().setName ("foo").setContent ("bar"));
aHtml.getBody ().addChild (new HCH1 ().addChild ("Test"));
aHtml.getBody ().addChild (new HCScriptInlineOnDocumentReady (new UnparsedJSCodeProvider ("a=b;")));
aHtml.getBody ().addChild (new HCScriptInlineOnDocumentReady (new UnparsedJSCodeProvider ("c=d;")));
// Must be done for HCHtml separately
HCRenderer.prepareHtmlForConversion (aHtml, HCSettings.getConversionSettings ());
final String sCRLF = HCSettings.getNewLineMode ().getText ();
assertEquals ("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\" dir=\"ltr\">" +
"<head><meta name=\"foo\" content=\"bar\" /></head>" +
"<body><h1>Test</h1>" +
"<script type=\"text/javascript\"><!--" +
sCRLF +
"$(document).ready(function(){a=b;c=d;});" +
sCRLF +
"//--></script>" +
"</body>" +
"</html>",
HCRenderer.getAsHTMLString (aHtml));
// Do it again and check for node consistency
assertEquals ("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\" dir=\"ltr\">" +
"<head><meta name=\"foo\" content=\"bar\" /></head>" +
"<body><h1>Test</h1>" +
"<script type=\"text/javascript\"><!--" +
sCRLF +
"$(document).ready(function(){a=b;c=d;});" +
sCRLF +
"//--></script>" +
"</body>" +
"</html>",
HCRenderer.getAsHTMLString (aHtml));
}
}
| [
"philip@helger.com"
] | philip@helger.com |
bb32a333b306a65c595f502eef64a55b871d28a4 | 04f9b0f49446bd83a19e6512b2680476112698ca | /artio-ilink3-impl/src/test/java/uk/co/real_logic/artio/library/SequenceNumberCheckingHandler.java | 44d94216d67375b7db2fe65a63e63fd26c1e90b0 | [
"Apache-2.0"
] | permissive | welly87/artio | 3f86ce754ac5667422a17c896560f883104317eb | 81357c23b6af1a4171b92ece598e377f3721a45b | refs/heads/master | 2023-06-20T07:09:33.961185 | 2021-07-20T14:14:48 | 2021-07-20T14:14:48 | 289,016,946 | 0 | 0 | Apache-2.0 | 2020-08-20T13:42:14 | 2020-08-20T13:42:13 | null | UTF-8 | Java | false | false | 3,071 | java | /*
* Copyright 2020 Monotonic 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package uk.co.real_logic.artio.library;
import iLinkBinary.ExecutionReportStatus532Decoder;
import org.agrona.DirectBuffer;
import org.agrona.collections.LongArrayList;
import uk.co.real_logic.artio.fixp.FixPConnection;
import uk.co.real_logic.artio.ilink.ILink3ConnectionHandler;
import uk.co.real_logic.artio.messages.DisconnectReason;
public class SequenceNumberCheckingHandler implements ILink3ConnectionHandler
{
private final ExecutionReportStatus532Decoder executionReportStatus = new ExecutionReportStatus532Decoder();
private final LongArrayList sequenceNumbers = new LongArrayList();
private final LongArrayList uuids = new LongArrayList();
private boolean retransmitTimedOut = false;
public void onBusinessMessage(
final FixPConnection connection,
final int templateId,
final DirectBuffer buffer,
final int offset,
final int blockLength,
final int version,
final boolean possRetrans)
{
if (templateId == ExecutionReportStatus532Decoder.TEMPLATE_ID)
{
executionReportStatus.wrap(buffer, offset, blockLength, version);
final long seqNum = executionReportStatus.seqNum();
final long uuid = executionReportStatus.uUID();
sequenceNumbers.add(seqNum);
uuids.add(uuid);
}
}
public LongArrayList sequenceNumbers()
{
return sequenceNumbers;
}
public LongArrayList uuids()
{
return uuids;
}
public void onNotApplied(
final FixPConnection connection,
final long fromSequenceNumber,
final long msgCount,
final NotAppliedResponse response)
{
}
public void onRetransmitReject(
final FixPConnection connection,
final String reason,
final long requestTimestamp,
final int errorCodes)
{
}
public boolean retransmitTimedOut()
{
return retransmitTimedOut;
}
public void onRetransmitTimeout(final FixPConnection connection)
{
retransmitTimedOut = true;
}
public void resetRetransmitTimedOut()
{
retransmitTimedOut = false;
}
public void onSequence(final FixPConnection connection, final long nextSeqNo)
{
}
public void onError(final FixPConnection connection, final Exception ex)
{
}
public void onDisconnect(final FixPConnection connection, final DisconnectReason reason)
{
}
}
| [
"richard.warburton@gmail.com"
] | richard.warburton@gmail.com |
3d5ccdb1395c1976913e176d76daea8f7963256a | e9ad297da7d998ac7f5e746db0f7b51df6a0db01 | /Kripton/src/test/java/bind/generichierarchy/RestListEntity.java | 1e6cbd5c020613bd1fc37129c166236055267fdc | [
"Apache-2.0"
] | permissive | luizdefranca/kripton | 1211e1ca722455166a6653d7adaaba0c2b8fd2f6 | dac2d849c247cb80bc80d73ad69b5ab20ace4f6b | refs/heads/master | 2020-12-30T14:13:00.357953 | 2017-05-10T23:41:32 | 2017-05-10T23:41:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 497 | java | package bind.generichierarchy;
import java.util.List;
import java.util.Map;
import com.abubusoft.kripton.annotation.BindXml;
public abstract class RestListEntity<E extends UIDObject> extends RestResponse {
private static final long serialVersionUID = -7911782943679996559L;
public E bean;
@BindXml(elementTag="item")
protected List<E> list;
public Map<String, E> map;
public List<E> getList() {
return list;
}
public void setList(List<E> list) {
this.list = list;
}
}
| [
"xcesco@gmail.com"
] | xcesco@gmail.com |
d0850771e4c1e0e2ccf86dfb227f1a3948f785c1 | f3b87bddcd0733f74098a0768ee0bae61a3db70a | /src/main/java/svenhjol/strange/totems/message/ClientTotemUpdate.java | b7940c85ddc097aeced843cc0ffb1c2a39a3361c | [
"MIT"
] | permissive | JokerDima/Strange | 49ea47e12665e1e50f37a4765cdb1dcbc41677fa | 244ab1a390ffa5188ae753c804fc681822d63f6b | refs/heads/master | 2022-07-18T08:24:08.103474 | 2020-05-13T20:59:37 | 2020-05-13T20:59:37 | 264,651,208 | 0 | 0 | MIT | 2020-05-17T11:40:32 | 2020-05-17T11:40:31 | null | UTF-8 | Java | false | false | 1,434 | java | package svenhjol.strange.totems.message;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fml.network.NetworkEvent;
import svenhjol.meson.iface.IMesonMessage;
import svenhjol.strange.base.helper.TotemHelper;
import java.util.function.Supplier;
public class ClientTotemUpdate implements IMesonMessage {
public static final int DAMAGE = 0;
public static final int DESTROY = 1;
private final int status;
private final BlockPos pos;
public ClientTotemUpdate(int status, BlockPos pos) {
this.status = status;
this.pos = pos;
}
public static void encode(ClientTotemUpdate msg, PacketBuffer buf) {
buf.writeInt(msg.status);
buf.writeLong(msg.pos.toLong());
}
public static ClientTotemUpdate decode(PacketBuffer buf) {
return new ClientTotemUpdate(buf.readInt(), BlockPos.fromLong(buf.readLong()));
}
public static class Handler {
public static void handle(final ClientTotemUpdate msg, Supplier<NetworkEvent.Context> ctx) {
ctx.get().enqueueWork(() -> {
if (msg.status == DAMAGE) {
TotemHelper.effectDamageTotem(msg.pos);
} else if (msg.status == DESTROY) {
TotemHelper.effectDestroyTotem(msg.pos);
}
});
ctx.get().setPacketHandled(true);
}
}
}
| [
"sven.hjol@protonmail.com"
] | sven.hjol@protonmail.com |
2e560b05f4de92350ae3aa8d1decb97f62afbeb4 | 05e45581f8b3b147af2f42cff1b701654d7b61d2 | /landsaleOnePrice/suzhuo/common/src/main/java/cn/gtmap/landsale/model/TransResultLog.java | 97cc329924772d9fef59e7c8f8a74716fb840085 | [] | no_license | TimfuDeng/gtfree-bank | 581bdc0478e47e2303296b3b6921ae59f976208f | 48106284af428a449f0a2ccbee1653b57b4bd120 | refs/heads/master | 2020-04-03T05:22:06.031843 | 2018-10-28T06:50:40 | 2018-10-28T06:50:40 | 155,043,209 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,071 | java | package cn.gtmap.landsale.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* Created by trr on 2016/8/14.
*/
public class TransResultLog implements Serializable{
private String PRICEUNIT;
private BigDecimal PRICE;
private Date PRICEDATE;
private String TRANSUSERID;
public String getPRICEUNIT() {
return PRICEUNIT;
}
public void setPRICEUNIT(String PRICEUNIT) {
this.PRICEUNIT = PRICEUNIT;
}
public BigDecimal getPRICE() {
return PRICE;
}
public void setPRICE(BigDecimal PRICE) {
this.PRICE = PRICE;
}
public Date getPRICEDATE() {
return PRICEDATE;
}
public void setPRICEDATE(Date PRICEDATE) {
this.PRICEDATE = PRICEDATE;
}
public String getTRANSUSERID() {
return TRANSUSERID;
}
public void setTRANSUSERID(String TRANSUSERID) {
this.TRANSUSERID = TRANSUSERID;
}
}
| [
"1337343005@qq.com"
] | 1337343005@qq.com |
88a51f92f8d8571fe0b0b0ed1cca935bdf1adf0a | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project76/src/test/java/org/gradle/test/performance76_4/Test76_353.java | 7e12cc0c5a239648bd1b987f5f8413d414e12224 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 292 | java | package org.gradle.test.performance76_4;
import static org.junit.Assert.*;
public class Test76_353 {
private final Production76_353 production = new Production76_353("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
e5c50b77b8cdbccdc2bf880522a0ee722c7093b6 | 167c6226bc77c5daaedab007dfdad4377f588ef4 | /java/ql/test/stubs/google-android-9.0.0/android/view/translation/ViewTranslationResponse.java | ee7fd12ad1ae3ac77749e28606d46ac7f2b38d8e | [
"MIT"
] | permissive | github/codeql | 1eebb449a34f774db9e881b52cb8f7a1b1a53612 | d109637e2d7ab3b819812eb960c05cb31d9d2168 | refs/heads/main | 2023-08-20T11:32:39.162059 | 2023-08-18T14:33:32 | 2023-08-18T14:33:32 | 143,040,428 | 5,987 | 1,363 | MIT | 2023-09-14T19:36:50 | 2018-07-31T16:35:51 | CodeQL | UTF-8 | Java | false | false | 868 | java | // Generated automatically from android.view.translation.ViewTranslationResponse for testing purposes
package android.view.translation;
import android.os.Parcel;
import android.os.Parcelable;
import android.view.autofill.AutofillId;
import android.view.translation.TranslationResponseValue;
import java.util.Set;
public class ViewTranslationResponse implements Parcelable
{
public AutofillId getAutofillId(){ return null; }
public Set<String> getKeys(){ return null; }
public String toString(){ return null; }
public TranslationResponseValue getValue(String p0){ return null; }
public boolean equals(Object p0){ return false; }
public int describeContents(){ return 0; }
public int hashCode(){ return 0; }
public static Parcelable.Creator<ViewTranslationResponse> CREATOR = null;
public void writeToParcel(Parcel p0, int p1){}
}
| [
"atorralba@users.noreply.github.com"
] | atorralba@users.noreply.github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.