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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9c4ec330bc8d3e044c1cd24820a369f7559d113e | 736b03e0b176dbcbb62018fdf706e0b58c70149c | /src/main/java/tconstruct/modifiers/tools/ModExtraModifier.java | 02436a4a76556f17333b5d430a1e915a73494f9f | [
"CC-BY-3.0",
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | progwml6/TinkersConstruct | b0c5d4727a214bbb8878c09915276f2535057a63 | 4236d537b0c560f1a1cee63f5f60822d705e1fe5 | refs/heads/master | 2021-01-16T20:50:33.038446 | 2014-07-04T00:15:36 | 2014-07-04T00:15:36 | 21,371,897 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,137 | java | package tconstruct.modifiers.tools;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import tconstruct.library.modifier.IModifyable;
import tconstruct.library.modifier.ItemModifier;
public class ModExtraModifier extends ItemModifier
{
public ModExtraModifier(ItemStack[] items, String dataKey)
{
super(items, 0, dataKey);
}
@Override
protected boolean canModify (ItemStack tool, ItemStack[] recipe)
{
if (tool != null && tool.getItem() instanceof IModifyable)
{
NBTTagCompound tags = this.getModifierTag(tool);
if (tags.getBoolean(key))
{
return false;
}
return true;
}
return false;
}
@Override
public void modify (ItemStack[] recipe, ItemStack input)
{
NBTTagCompound tags = this.getModifierTag(input);
tags.setBoolean(key, true);
int modifiers = tags.getInteger("Modifiers");
modifiers += 1;
tags.setInteger("Modifiers", modifiers);
}
public void addMatchingEffect (ItemStack tool)
{
}
}
| [
"merdiwendiyo@gmail.com"
] | merdiwendiyo@gmail.com |
7a6e9521a94fa87cd60bb09bff1cf08881e76be1 | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/wallet/pwd/ui/WalletSecuritySettingUI$g.java | b23902cca06cf0bec59fcc21f71399965ecabf10 | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 525 | java | package com.tencent.mm.plugin.wallet.pwd.ui;
final class WalletSecuritySettingUI$g
{
String desc;
String oRi;
int status;
String title;
String ttl;
boolean ttm;
private WalletSecuritySettingUI$g(WalletSecuritySettingUI paramWalletSecuritySettingUI)
{
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes3-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.wallet.pwd.ui.WalletSecuritySettingUI.g
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
e65890b58db5686c312d61f829b8c00a9df7c0d9 | e390f178c3bd3c8460649ee4514e6178f8d709f4 | /officeHourse/stringMethod/emailPractice.java | 75b54e1febe16c27cd29cbea4a685766ed4836f6 | [] | no_license | Nasratullahsarabi/UltimateJavaPrograming_B23 | 353d9c25a3b65c27376b88f8009870f2c63ff91e | e401107d947d94ae2e8b7a395575668f24bf44a3 | refs/heads/master | 2023-06-25T04:18:41.233004 | 2021-07-27T16:14:38 | 2021-07-27T16:14:38 | 387,659,984 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,102 | java | package stringMethod;
import java.util.Scanner;
public class emailPractice {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter your first name");
String word = scan.nextLine();
if (word.length()<6){
System.out.println("Invalid Data");
}else if (word.length()>=6){
}
}
}
/*
Ask user to enter fullname. FirstName and lastName should be at least 6 character long.
If they are shorter than that print “Invalid data” and program should end.
If the information provided is valid, you will take the first 4 characters of
first string and combine them with the last three characters of the second string.
At the end of your combined string add “@cybertek.com” and print the final string
as your created email.
The final email should be in all lowercase.
input: JamesBond Secret
output: jameret@cybertek.com
*/ | [
"Nasratullah_sarabi@yahoo.com"
] | Nasratullah_sarabi@yahoo.com |
8db3a7e4b4ac26c1114a377f73830e50f0b0c6cd | df755f1ad9f30e2968faaf65d5f203ac9de8dcf1 | /mftcc-platform-web-master/src/main/java/app/base/cacheinterface/CacheInterface.java | f6cded173907533442b624a69664dd9c026a8603 | [] | no_license | gaoqiang9399/eclipsetogit | afabf761f77fe542b3da1535b15d4005274b8db7 | 03e02ef683929ea408d883ea35cbccf07a4c43e6 | refs/heads/master | 2023-01-22T16:42:32.813383 | 2020-11-23T07:31:23 | 2020-11-23T07:31:23 | 315,209,391 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 733 | java | package app.base.cacheinterface;
import java.util.Collection;
import java.util.List;
import org.springframework.data.redis.core.RedisTemplate;
public interface CacheInterface {
public void setList(RedisTemplate redisTemplate,Object key,Collection<Object> collection) throws Exception;
public void setObject(RedisTemplate redisTemplate,Object key,Object object) throws Exception;
public List<Object> getList(RedisTemplate redisTemplate,Object key) throws Exception;
public Object getObject(RedisTemplate redisTemplate,Object key) throws Exception;
public void removeObject(RedisTemplate redisTemplate,Object key) throws Exception;
public void refreshDbSelected(RedisTemplate redisTemplate) throws Exception;
}
| [
"gaoqiang1@chenbingzhu.zgcGuaranty.net"
] | gaoqiang1@chenbingzhu.zgcGuaranty.net |
9032429981cad33a657969d014b4241538462722 | 4dd8e1c81838b6c657b686a960afcc8cffff5d63 | /app/src/main/java/zenghao/com/study/PullFresh/method1/AcFunFooter.java | 2146ade526d15ab559cfd643f6529e1a6e01459b | [] | no_license | darrennight/AndroidPhoneStudyDemo | 5da817641370599e449770ee09fc9bca8bbf91cf | 67889cf34aa88b1338d77e71756bd9e5b428a4a2 | refs/heads/master | 2022-11-02T17:34:54.229943 | 2022-10-20T10:06:05 | 2022-10-20T10:06:05 | 63,564,914 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,598 | java | package zenghao.com.study.PullFresh.method1;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import zenghao.com.study.R;
import zenghao.com.study.util.DensityUtil;
/**
* Created by Administrator on 2016/3/23.
*/
public class AcFunFooter extends BaseFooter {
private Context context;
private int imgSrc;
private ImageView acfun_footer_img;
public AcFunFooter(Context context,int imgSrc){
this.context = context;
this.imgSrc = imgSrc;
}
@Override
public View getView(LayoutInflater inflater, ViewGroup viewGroup) {
View view = inflater.inflate(R.layout.acfun_footer, viewGroup, true);
acfun_footer_img = (ImageView) view.findViewById(R.id.acfun_footer_img);
acfun_footer_img.setImageResource(imgSrc);
return view;
}
@Override
public int getDragLimitHeight(View rootView) {
return DensityUtil.dip2px(context,70);
}
@Override
public int getDragMaxHeight(View rootView) {
return rootView.getMeasuredHeight();
}
@Override
public int getDragSpringHeight(View rootView) {
return DensityUtil.dip2px(context,70);
}
@Override
public void onPreDrag(View rootView) {
}
@Override
public void onDropAnim(View rootView, int dy) {
}
@Override
public void onLimitDes(View rootView, boolean upORdown) {
}
@Override
public void onStartAnim() {
}
@Override
public void onFinishAnim() {
}
}
| [
"zenghao@breadtrip.com"
] | zenghao@breadtrip.com |
f8e2ca38bb46f9218c62d24792c588f38245624e | b61c0384b67fb1a5c48630ba44a9e7e8ce410b59 | /vieagr-webserver/trunk/vieagr-webserver/src/main/java/com/vieagr/distribution/controller/SysUserController.java | 56c22ce792ecc7ed2565bd30df6c9263d829f997 | [] | no_license | zhihuihu/svn-old-project | 2fc8a33eca8ac685151ef48e2249a7a3ad34cd72 | 13de6b664c1001155611bc22c181a2f3b5a20d30 | refs/heads/master | 2021-04-30T14:04:25.929881 | 2018-03-02T02:54:15 | 2018-03-02T02:54:15 | 121,209,439 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,582 | java | package com.vieagr.distribution.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.vieagr.distribution.base.config.Constant;
import com.vieagr.distribution.base.config.EnumConfig;
import com.vieagr.distribution.base.util.Base64FileUtils;
import com.vieagr.distribution.base.util.PropertiesUtils;
import com.vieagr.distribution.base.util.ReturnUtils;
import com.vieagr.distribution.base.util.Utils;
import com.vieagr.distribution.entity.SysUser;
import com.vieagr.distribution.service.inter.ISysUserService;
/**
* 登录用户控制层
* @author master
*
*/
@RestController
@RequestMapping(value = "sysUser")
public class SysUserController {
@Autowired
private ISysUserService sysUserService;
/**
* 增加一个系统用户
* @param jsonStr
* @return
* @throws Exception
* @throws JsonMappingException
* @throws JsonParseException
*/
@RequestMapping(value="addOneSysUser",method=RequestMethod.POST)
public Object addOneSysUser(String jsonStr) throws Exception{
SysUser sysUser = Utils.jsonStrToObject(jsonStr, SysUser.class);
return sysUserService.addOneSysUser(sysUser);
}
/**
* 系统用户列表查询
* @param jsonStr
* @return
* @throws Exception
*/
@RequestMapping(value="selectSysUserList",method=RequestMethod.POST)
public Object selectSysUserList(String jsonStr) throws Exception{
SysUser sysUser = Utils.jsonStrToObject(jsonStr, SysUser.class);
return sysUserService.selectSysUserList(sysUser);
}
/**
* 系统用户--启用--禁用
* @Title: updateSysUserState
* @Description:
* @param jsonStr
* @return
* @throws Exception
* @return Object
* @author huzhihui_c@qq.com
* @date 2016年10月28日 下午2:49:53
*/
@RequestMapping(value="updateSysUserState",method=RequestMethod.POST)
public Object updateSysUserState(String jsonStr) throws Exception{
SysUser sysUser = Utils.jsonStrToObject(jsonStr, SysUser.class);
SysUser sysUserCheck = sysUserService.selectByPrimaryKey(sysUser.getSysUserId());
String msg = "";
if(sysUserCheck.getSysUserState().equals(EnumConfig.SYSTEM_UNIFIED_STATE_START_USING.getIndex())){//如果是启用则禁用
sysUser.setSysUserState(EnumConfig.SYSTEM_UNIFIED_STATE_END_USING.getIndex());
msg = Constant.FORBIDDEN_USER_SUCCESS;
}else{
sysUser.setSysUserState(EnumConfig.SYSTEM_UNIFIED_STATE_START_USING.getIndex());
msg = Constant.START_USER_SUCCESS;
}
sysUserService.updateByPrimaryKeySelective(sysUser);
return ReturnUtils.forNoraml(Constant.RESPONSE_CODE_SUCCESS, msg);
}
@RequestMapping(value="selectByPrimaryKey",method=RequestMethod.POST)
public Object selectByPrimaryKey(String sysUserId) throws Exception{
SysUser sysUser = sysUserService.selectByPrimaryKey(sysUserId);
return ReturnUtils.forNoraml(Constant.RESPONSE_CODE_SUCCESS, sysUser);
}
/**
* 更新用户信息
* @Title: updateSysUser
* @Description:
* @param jsonStr
* @return
* @throws Exception
* @return Object
* @author huzhihui_c@qq.com
* @date 2016年10月28日 下午4:56:38
*/
@RequestMapping(value="updateSysUser",method=RequestMethod.POST)
public Object updateSysUser(String jsonStr) throws Exception{
SysUser sysUser = Utils.jsonStrToObject(jsonStr, SysUser.class);
/*if(sysUser.getSysUserName().trim().equals("")){
return ReturnUtils.forNoraml("111111", "用户名格式错误,请重新填写");
}*/
if(!Utils.isMobile(sysUser.getSysUserMobileNumber())){
return ReturnUtils.forNoraml(Constant.RESPONSE_CODE_ERROR, "手机号码格式错误,请重新填写");
}
if(null == sysUser.getSysUserPassword() || sysUser.getSysUserPassword().trim().length() < 6){
return ReturnUtils.forNoraml(Constant.RESPONSE_CODE_ERROR, "密码格式错误,请重新填写");
}
sysUser.setSysUserImgUrl(Base64FileUtils.base64ToImageFile(sysUser.getSysUserImgUrl(), PropertiesUtils.getProperties(Constant.SERVER_FILE_IMAGE_PHYSICAL_URL_PRE), Utils.getImageName()));
int flg = sysUserService.updateByPrimaryKeySelective(sysUser);
if(flg > 0){
return ReturnUtils.forNoraml(Constant.RESPONSE_CODE_SUCCESS, "用户信息修改成功");
}
return ReturnUtils.forNoraml(Constant.RESPONSE_CODE_ERROR, "用户信息修改失败,请重试");
}
}
| [
"huzhihui_c@qq.com"
] | huzhihui_c@qq.com |
43e10d8260970de6d6263f03edf16f09feff5e84 | eca4a253fe0eba19f60d28363b10c433c57ab7a1 | /apps/jacob.shorti/java/de/shorti/baseknowledge/objects/SystemAlias.java | 14da8d7812e663c58fe17ec87f07d9250be6a6c3 | [] | no_license | freegroup/Open-jACOB | 632f20575092516f449591bf6f251772f599e5fc | 84f0a6af83876bd21c453132ca6f98a46609f1f4 | refs/heads/master | 2021-01-10T11:08:03.604819 | 2015-05-25T10:25:49 | 2015-05-25T10:25:49 | 36,183,560 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 318 | java | package de.shorti.baseknowledge.objects;
/**
* Title: short-i
* Description: Information retrival System with human language interface
* Copyright: Copyright (c) 2001
* Company: short-i
* @author David Sommer & Andreas Herz
* @version 1.0
*/
public class SystemAlias extends _dbSystemAlias
{
} | [
"a.herz@freegroup.de"
] | a.herz@freegroup.de |
2e63c6880fc99fb46c28a18f8f0a8643b980e7dd | bc2fdf51df559865262b72d1c08039f475f986dd | /wine-cellar/src/main/java/io/renren/modules/cellar/service/impl/CellarConfigDbServiceImpl.java | b274d94c29b289b0c54f37e324208540466fe15b | [
"Apache-2.0"
] | permissive | chenweilong1022/wineCellar | 970a39be06ab5e6fca90801b8067e157cd26c12b | 327ea7b1da581d749bd20e2ece036c8975e0b3dd | refs/heads/master | 2022-11-13T15:15:24.526867 | 2019-06-12T09:09:17 | 2019-06-12T09:09:17 | 168,101,709 | 2 | 0 | null | 2022-11-03T22:49:33 | 2019-01-29T06:26:16 | JavaScript | UTF-8 | Java | false | false | 1,075 | java | package io.renren.modules.cellar.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.cellar.dao.CellarConfigDbDao;
import io.renren.modules.cellar.entity.CellarConfigDbEntity;
import io.renren.modules.cellar.service.CellarConfigDbService;
@Service("cellarConfigDbService")
public class CellarConfigDbServiceImpl extends ServiceImpl<CellarConfigDbDao, CellarConfigDbEntity> implements CellarConfigDbService {
@Override
public PageUtils queryPage(CellarConfigDbEntity cellarConfigDb) {
IPage<CellarConfigDbEntity> page = baseMapper.selectPage(
new Query<CellarConfigDbEntity>(cellarConfigDb).getPage(),
new QueryWrapper<CellarConfigDbEntity>()
);
return new PageUtils(page);
}
}
| [
"chenweilong"
] | chenweilong |
21e31c3d14bb735dc465e8e4edc4aff4bdc4907f | 7e9cb0b3a29dbd7d241640c0dda30b620dae52b9 | /core/src/main/java/com/cts/fasttack/core/data/list/BinSetupListFilter.java | fac2a949dd21e553c223c9706d7727fd71505cfb | [] | no_license | ilemobayo/FASTTACK | f8705ae0b2f5a41487410016756a1b26b0bc5e22 | 85487890b9e5597f9b2b9690713ece2a5c1aff9f | refs/heads/master | 2020-05-26T15:00:06.553982 | 2018-11-30T11:32:39 | 2018-11-30T11:32:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 378 | java | package com.cts.fasttack.core.data.list;
import com.cts.fasttack.common.core.list.ListFilter;
import com.cts.fasttack.core.data.BinSetup;
/**
* @author a.lipavets
*/
public class BinSetupListFilter extends ListFilter<BinSetup> {
private Long bin;
public Long getBin() {
return bin;
}
public void setBin(Long bin) {
this.bin = bin;
}
}
| [
"a.lazarchuk@cartsys.com.ua"
] | a.lazarchuk@cartsys.com.ua |
5a64ba8b5a0368ffb05aade03e8e578b0c6987aa | 5acaf15f493acd0a27873a85c2abb5709fc03e7e | /src/main/java/webmvct/jsontest/ReadJsonTest9.java | 59e2245565f0cb48299481c70c63349f3df99887 | [] | no_license | a1422020484/apidoc | 997db79080ba8e2d9e12bb4bb908ab149b0108cf | d8ee1076fb514e64742cbed527ed62ab29390ad1 | refs/heads/master | 2020-06-13T12:11:12.289620 | 2016-12-03T03:07:00 | 2016-12-03T03:07:00 | 75,382,444 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,192 | java | package webmvct.jsontest;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import org.json.JSONException;
import org.json.JSONObject;
public class ReadJsonTest9 {
public static void main(String[] args) {
String url = "/products";
String address = "src/main/resources/data/swagger4.json";
System.out.println("listJson 最终数据=========="+ReadJsonTest9.tranJson(address, url));
}
private static JSONObject tranJson(String address,String url){
JSONObject dataJson = null;
// 读取原始json文件并进行操作和输出
try {
BufferedReader br = new BufferedReader(new FileReader(address));// 读取原始json文件
String s = null;
while ((s = br.readLine()) != null) {
// System.out.println(s);
dataJson = new JSONObject(s);
try {
// 创建一个包含原始json串的json对象
// //1、从json串中获得key为type所对应的值
// String name = dataJson.getString("paths");//从json串中获得key为type所对应的值
// System.out.println(name);
System.out.println(dataJson);
System.out.println(dataJson.get("definitions"));
//传入jsonmap,返回所有definitionsMap,是没有经过替换引用的
HashMap<String,Object> definitionsMapF = ReadJsonTest9.getDefinitions(dataJson);
//request:dataJson未经修改的源数据。
// definitionsMapF 全部的definitions数据作为一个map。
//return :tranDataJsonAfter中的definitions的引用已经替换了。
JSONObject tranDataJsonAfter = ReadJsonTest9.tranDefinitions(dataJson,definitionsMapF);
//从替换后的tranDataJsonAfter中,获得全部的definitions数据作为一个map。此时definitions的引用已经替换了。
HashMap<String,Object> definitionsMap = ReadJsonTest9.getDefinitions(tranDataJsonAfter);
JSONObject pathsObj = tranDataJsonAfter.getJSONObject("paths");// 找到properties的json对象
String[] pathArray = JSONObject.getNames(pathsObj);
for(String path : pathArray){
System.out.println(path);
if(url.equals(path)){
JSONObject urlObjMap = (JSONObject) pathsObj.get(path);
JSONObject urlF = pathsObj.getJSONObject(path);
String[] methodArray = JSONObject.getNames(urlF);
for(String method : methodArray){
if("get".equals(method)){
JSONObject methodObjMap = (JSONObject) urlF.get(method);
JSONObject methodF = urlF.getJSONObject(method);
JSONObject responsesObjMap = (JSONObject)methodObjMap.get("responses");
String[] responsesArray = JSONObject.getNames(responsesObjMap);
for(String code : responsesArray){
JSONObject codeMap = (JSONObject)responsesObjMap.get(code);
//可能会有异常
if(codeMap.get("schema") instanceof JSONObject){
JSONObject schemaF = (JSONObject)codeMap.get("schema");
String[] schemaArray = JSONObject.getNames(schemaF);
if(schemaArray.length>0){
for(String ref : schemaArray){
if("$ref".equals(ref)){
String imp = schemaF.getString(ref);
System.out.println("$ref==="+imp);
String impName = imp.substring(14);
System.out.println("impName===="+impName);
System.out.println(definitionsMap.get(impName));
codeMap.put("schema", definitionsMap.get(impName));
System.out.println("dataJson from tranJson last======"+dataJson);
}
}
}
}
}
}
}
}
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return dataJson;
}
/**获得所有definitions,返回一个包含所有definitions信息的map
* @author yang
* @time 2016年11月30日上午10:03:39
* @return_type HashMap<String,Object>
* @param dataJson
* @return HashMap<String, Object>
*/
public static HashMap<String, Object> getDefinitions(JSONObject dataJson) {
JSONObject definitionsObj = dataJson.getJSONObject("definitions");// 找到properties的json对象
String[] definitionsArray = JSONObject.getNames(definitionsObj);
for(String definitions : definitionsArray){
JSONObject ActiveObj = definitionsObj.getJSONObject(definitions);
ActiveObj.getJSONObject("properties");
}
HashMap<String, Object> definitionsMap = new HashMap<String, Object>();
for (String definitions : definitionsArray) {
System.out.println(definitions);
JSONObject definitionsResult = definitionsObj.getJSONObject(definitions);
// String[] methodArray = JSONObject.getNames(urlF);
definitionsMap.put(definitions, definitionsResult);
}
return definitionsMap;
}
/**
* 替换definitions中的引用,返回替换后的map
* @author yang
* @time 2016年11月30日上午10:03:15
* @return_type HashMap<String,Object>
* @param dataJson
* @return
*/
public static JSONObject tranDefinitions(JSONObject dataJson,HashMap<String, Object> definitionsMap){
//获得替换前的Definitions
HashMap<String, Object> tranDefBefore = ReadJsonTest9.getDefinitions(dataJson);
JSONObject definitionsObj = dataJson.getJSONObject("definitions");// 找到properties的json对象
String[] definitionsArray = JSONObject.getNames(definitionsObj);
for(String definitions : definitionsArray){
JSONObject ActiveObj = definitionsObj.getJSONObject(definitions);
JSONObject propertiesObj = ActiveObj.getJSONObject("properties");
String[] propertiesNameArray = JSONObject.getNames(propertiesObj);
for(String propertiesName: propertiesNameArray){
//会有异常
if(propertiesObj.getJSONObject(propertiesName) instanceof JSONObject){
JSONObject itemsObj = propertiesObj.getJSONObject(propertiesName);
System.out.println(itemsObj);
System.out.println("itemsObj.keySet()==="+itemsObj.keySet());
Set<String> itemsSet = itemsObj.keySet();
Iterator<String> it = itemsSet.iterator();
while (it.hasNext()) {
String str = it.next();
System.out.println("items set ==="+str);
if("items".equals(str)){
JSONObject refF = (JSONObject)itemsObj.get("items");
String[] schemaArray = JSONObject.getNames(refF);
if(schemaArray.length>0){
for(String ref : schemaArray){
if("$ref".equals(ref)){
String imp = refF.getString(ref);
System.out.println("$ref==="+imp);
String impName = imp.substring(14);
System.out.println("impName===="+impName);
System.out.println(definitionsMap.get(impName));
itemsObj.put("items", definitionsMap.get(impName));
System.out.println("dataJson from tranDefinitions======"+dataJson);
}
}
}
System.out.println(refF);
}
}
}
}
}
return dataJson;
}
}
| [
"1422020484@qq.com"
] | 1422020484@qq.com |
76b337345b73eb0aa4c1243fba8b82694ea8c7f4 | f20af063f99487a25b7c70134378c1b3201964bf | /appengine/src/main/java/com/dereekb/gae/client/api/model/extension/search/query/builder/ClientQueryRequestSender.java | e96e76a320925ed273f69edd64cc6d4e9335bee0 | [] | no_license | dereekb/appengine | d45ad5c81c77cf3fcca57af1aac91bc73106ccbb | d0869fca8925193d5a9adafd267987b3edbf2048 | refs/heads/master | 2022-12-19T22:59:13.980905 | 2020-01-26T20:10:15 | 2020-01-26T20:10:15 | 165,971,613 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,847 | java | package com.dereekb.gae.client.api.model.extension.search.query.builder;
import com.dereekb.gae.client.api.exception.ClientAuthenticationException;
import com.dereekb.gae.client.api.exception.ClientConnectionException;
import com.dereekb.gae.client.api.exception.ClientRequestFailureException;
import com.dereekb.gae.client.api.exception.ClientTooMuchInputException;
import com.dereekb.gae.client.api.model.extension.search.query.response.ClientModelQueryResponse;
import com.dereekb.gae.client.api.model.extension.search.query.response.SerializedClientModelQueryApiResponse;
import com.dereekb.gae.client.api.model.extension.search.query.services.ClientQueryService;
import com.dereekb.gae.client.api.model.shared.builder.SecuredClientModelRequestSender;
import com.dereekb.gae.client.api.service.sender.extension.NotClientApiResponseException;
import com.dereekb.gae.client.api.service.sender.security.ClientRequestSecurity;
import com.dereekb.gae.server.datastore.models.UniqueModel;
import com.dereekb.gae.utilities.model.search.request.SearchRequest;
/**
* {@link ClientQueryService} and {@link SecuredClientModelRequestSender}
* extension interface.
*
* @author dereekb
*
* @param <T>
* model type
*/
public interface ClientQueryRequestSender<T extends UniqueModel>
extends ClientQueryService<T>, SecuredClientModelRequestSender<SearchRequest, ClientModelQueryResponse<T>> {
/**
* {@inheritDoc}
*/
@Override
public SerializedClientModelQueryApiResponse<T> sendRequest(SearchRequest request,
ClientRequestSecurity security)
throws NotClientApiResponseException,
ClientConnectionException,
ClientAuthenticationException,
ClientTooMuchInputException,
ClientRequestFailureException;
}
| [
"dereekb@gmail.com"
] | dereekb@gmail.com |
275183dc81cb718a4164d739d080fd8776acf00f | 349de604fa3b72a9fc4097b749ef7efe8546b71a | /travelagency-wicket/src/main/java/ca/travelagency/components/formheader/ResetButton.java | 264b05b0f05fd8d25a9aaabe1210f3ac8821918a | [
"Apache-2.0"
] | permissive | Intelliware/travelagency-heroku | 347e9d2a28a4918580c7fb1a447304400710b37c | 70252b7d889fcbf2b7536ce09021da9528cfcc44 | refs/heads/master | 2021-01-10T19:50:53.610422 | 2014-01-21T17:05:15 | 2014-01-21T17:05:15 | 16,108,008 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,581 | java | /**
* Copyright (C) 2010 - 2014 VREM Software Development <VREMSoftwareDevelopment@gmail.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 ca.travelagency.components.formheader;
import org.apache.commons.lang3.Validate;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.model.IModel;
import ca.travelagency.components.AjaxButtonCallback;
import ca.travelagency.components.javascript.JSUtils;
import ca.travelagency.persistence.DaoEntity;
public class ResetButton<T extends DaoEntity> extends IndicatingAjaxButton {
private static final long serialVersionUID = 1L;
private boolean resetModel;
private AjaxButtonCallback<T> ajaxButtonCallback;
public ResetButton(String id, Form<T> form, AjaxButtonCallback<T> ajaxButtonCallback) {
super(id, form);
setDefaultFormProcessing(false);
Validate.notNull(ajaxButtonCallback);
this.ajaxButtonCallback = ajaxButtonCallback;
}
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
@SuppressWarnings("unchecked")
Form<T> typedForm = (Form<T>) form;
resetModel(typedForm);
ajaxButtonCallback.onSubmit(target, typedForm);
target.add(typedForm);
target.appendJavaScript(JSUtils.INITIALIZE);
}
@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
target.add(form);
target.appendJavaScript(JSUtils.INITIALIZE);
}
void resetModel(Form<T> form) {
T daoEntity = form.getModelObject();
IModel<T> model = getResetModel(daoEntity);
form.setModel(model);
}
IModel<T> getResetModel(T daoEntity) {
if (resetModel) {
return DaoEntityModelFactory.make(daoEntity.getTrueClass());
}
return DaoEntityModelFactory.make(daoEntity);
}
public void setResetModel(boolean resetModel) {
this.resetModel = resetModel;
}
public boolean isResetModel() {
return resetModel;
}
}
| [
"VREMSoftwareDevelopment@gmail.com"
] | VREMSoftwareDevelopment@gmail.com |
57eb99a33b3f3524a10994933610dc035b72c348 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-422-1-21-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/listener/chaining/EmptyBlockChainingListener_ESTest.java | 340b30148122c03b1442065a22f10b924564328f | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,230 | java | /*
* This file was automatically generated by EvoSuite
* Wed Apr 08 18:48:34 UTC 2020
*/
package org.xwiki.rendering.listener.chaining;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Map;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.xwiki.rendering.listener.Format;
import org.xwiki.rendering.listener.Listener;
import org.xwiki.rendering.listener.chaining.EmptyBlockChainingListener;
import org.xwiki.rendering.listener.chaining.ListenerChain;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class EmptyBlockChainingListener_ESTest extends EmptyBlockChainingListener_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
ListenerChain listenerChain0 = new ListenerChain();
EmptyBlockChainingListener emptyBlockChainingListener0 = new EmptyBlockChainingListener(listenerChain0);
Format format0 = Format.ITALIC;
Map<String, String> map0 = Listener.EMPTY_PARAMETERS;
// Undeclared exception!
emptyBlockChainingListener0.endFormat(format0, map0);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
53a886bd57e5fd7641df4f27e105dc4868fc3e21 | f22d380b3a43f7d6116077699deda4a23487c4c1 | /resource/de.db.osb.osb-parent/client/src/main/java/db/training/bob/service/NachbarbahnService.java | b2d05972d27d83cc34632ada9b568c17dc015217 | [] | no_license | HorstDerPfer/mygitrepo | 93f170a3de3ecc28592b24eeda2b1a2e65e1bcda | 92af0a8d9818239dd7ede2059bb1643aa2dab8cb | refs/heads/master | 2020-05-29T17:34:36.256004 | 2011-04-14T08:30:35 | 2011-04-14T08:30:35 | 1,584,395 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 241 | java | package db.training.bob.service;
import java.io.Serializable;
import db.training.bob.model.Nachbarbahn;
import db.training.easy.common.BasicService;
public interface NachbarbahnService extends BasicService<Nachbarbahn, Serializable> {
}
| [
"felix.michels@accel-gmbh.de"
] | felix.michels@accel-gmbh.de |
9a13c627a9013cb5c77102d704e0ef81dd3fe95e | 5ec06dab1409d790496ce082dacb321392b32fe9 | /clients/java-undertow-server/generated/src/main/java/org/openapitools/model/ComDayCqWcmFoundationFormsImplFormChooserServletInfo.java | ab72fabfd2ea58febec9c2231a85728de59e64e3 | [
"Apache-2.0"
] | permissive | shinesolutions/swagger-aem-osgi | e9d2385f44bee70e5bbdc0d577e99a9f2525266f | c2f6e076971d2592c1cbd3f70695c679e807396b | refs/heads/master | 2022-10-29T13:07:40.422092 | 2021-04-09T07:46:03 | 2021-04-09T07:46:03 | 190,217,155 | 3 | 3 | Apache-2.0 | 2022-10-05T03:26:20 | 2019-06-04T14:23:28 | null | UTF-8 | Java | false | false | 3,962 | java | package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.ComDayCqWcmFoundationFormsImplFormChooserServletProperties;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaUndertowServerCodegen", date = "2019-08-05T00:56:20.785Z[GMT]")
public class ComDayCqWcmFoundationFormsImplFormChooserServletInfo {
private String pid = null;
private String title = null;
private String description = null;
private ComDayCqWcmFoundationFormsImplFormChooserServletProperties properties = null;
/**
**/
public ComDayCqWcmFoundationFormsImplFormChooserServletInfo pid(String pid) {
this.pid = pid;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("pid")
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
/**
**/
public ComDayCqWcmFoundationFormsImplFormChooserServletInfo title(String title) {
this.title = title;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
/**
**/
public ComDayCqWcmFoundationFormsImplFormChooserServletInfo description(String description) {
this.description = description;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
/**
**/
public ComDayCqWcmFoundationFormsImplFormChooserServletInfo properties(ComDayCqWcmFoundationFormsImplFormChooserServletProperties properties) {
this.properties = properties;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("properties")
public ComDayCqWcmFoundationFormsImplFormChooserServletProperties getProperties() {
return properties;
}
public void setProperties(ComDayCqWcmFoundationFormsImplFormChooserServletProperties properties) {
this.properties = properties;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComDayCqWcmFoundationFormsImplFormChooserServletInfo comDayCqWcmFoundationFormsImplFormChooserServletInfo = (ComDayCqWcmFoundationFormsImplFormChooserServletInfo) o;
return Objects.equals(pid, comDayCqWcmFoundationFormsImplFormChooserServletInfo.pid) &&
Objects.equals(title, comDayCqWcmFoundationFormsImplFormChooserServletInfo.title) &&
Objects.equals(description, comDayCqWcmFoundationFormsImplFormChooserServletInfo.description) &&
Objects.equals(properties, comDayCqWcmFoundationFormsImplFormChooserServletInfo.properties);
}
@Override
public int hashCode() {
return Objects.hash(pid, title, description, properties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComDayCqWcmFoundationFormsImplFormChooserServletInfo {\n");
sb.append(" pid: ").append(toIndentedString(pid)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"cliffano@gmail.com"
] | cliffano@gmail.com |
f82eabc9c0b2d35c04c7fbf4166b02a1a26d1bc2 | dd80a584130ef1a0333429ba76c1cee0eb40df73 | /cts/tests/tests/widget/src/android/widget/cts/TabWidgetTest.java | b5c46c5c0bef4e745aea3136733af8ac3a73fe51 | [
"MIT"
] | permissive | karunmatharu/Android-4.4-Pay-by-Data | 466f4e169ede13c5835424c78e8c30ce58f885c1 | fcb778e92d4aad525ef7a995660580f948d40bc9 | refs/heads/master | 2021-03-24T13:33:01.721868 | 2017-02-18T17:48:49 | 2017-02-18T17:48:49 | 81,847,777 | 0 | 2 | MIT | 2020-03-09T00:02:12 | 2017-02-13T16:47:00 | null | UTF-8 | Java | false | false | 8,019 | java | /*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.widget.cts;
import android.app.Activity;
import android.content.Context;
import android.test.ActivityInstrumentationTestCase2;
import android.test.UiThreadTest;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TabWidget;
import android.widget.TextView;
import android.widget.LinearLayout.LayoutParams;
/**
* Test {@link TabWidget}.
*/
public class TabWidgetTest extends ActivityInstrumentationTestCase2<TabHostStubActivity> {
private Activity mActivity;
public TabWidgetTest() {
super("com.android.cts.stub", TabHostStubActivity.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
mActivity = getActivity();
}
public void testConstructor() {
new TabWidget(mActivity);
new TabWidget(mActivity, null);
new TabWidget(mActivity, null, 0);
}
public void testChildDrawableStateChanged() {
MockTabWidget mockTabWidget = new MockTabWidget(mActivity);
TextView tv0 = new TextView(mActivity);
TextView tv1 = new TextView(mActivity);
mockTabWidget.addView(tv0);
mockTabWidget.addView(tv1);
mockTabWidget.setCurrentTab(1);
mockTabWidget.reset();
mockTabWidget.childDrawableStateChanged(tv0);
assertFalse(mockTabWidget.hasCalledInvalidate());
mockTabWidget.reset();
mockTabWidget.childDrawableStateChanged(tv1);
assertTrue(mockTabWidget.hasCalledInvalidate());
mockTabWidget.reset();
mockTabWidget.childDrawableStateChanged(null);
assertFalse(mockTabWidget.hasCalledInvalidate());
}
public void testDispatchDraw() {
// implementation details
}
@UiThreadTest
public void testSetCurrentTab() {
TabHostStubActivity activity = getActivity();
TabWidget tabWidget = activity.getTabWidget();
tabWidget.addView(new TextView(mActivity));
assertTrue(tabWidget.getChildAt(0).isSelected());
assertFalse(tabWidget.getChildAt(1).isSelected());
assertTrue(tabWidget.getChildAt(0).isFocused());
assertFalse(tabWidget.getChildAt(1).isFocused());
tabWidget.setCurrentTab(1);
assertFalse(tabWidget.getChildAt(0).isSelected());
assertTrue(tabWidget.getChildAt(1).isSelected());
assertTrue(tabWidget.getChildAt(0).isFocused());
assertFalse(tabWidget.getChildAt(1).isFocused());
}
@UiThreadTest
public void testFocusCurrentTab() {
TabHostStubActivity activity = getActivity();
TabWidget tabWidget = activity.getTabWidget();
tabWidget.addView(new TextView(mActivity));
assertTrue(tabWidget.getChildAt(0).isSelected());
assertFalse(tabWidget.getChildAt(1).isSelected());
assertEquals(tabWidget.getChildAt(0), tabWidget.getFocusedChild());
assertTrue(tabWidget.getChildAt(0).isFocused());
assertFalse(tabWidget.getChildAt(1).isFocused());
// normal
tabWidget.focusCurrentTab(1);
assertFalse(tabWidget.getChildAt(0).isSelected());
assertTrue(tabWidget.getChildAt(1).isSelected());
assertEquals(tabWidget.getChildAt(1), tabWidget.getFocusedChild());
assertFalse(tabWidget.getChildAt(0).isFocused());
assertTrue(tabWidget.getChildAt(1).isFocused());
tabWidget.focusCurrentTab(0);
assertTrue(tabWidget.getChildAt(0).isSelected());
assertFalse(tabWidget.getChildAt(1).isSelected());
assertEquals(tabWidget.getChildAt(0), tabWidget.getFocusedChild());
assertTrue(tabWidget.getChildAt(0).isFocused());
assertFalse(tabWidget.getChildAt(1).isFocused());
// exceptional
try {
tabWidget.focusCurrentTab(-1);
fail("Should throw NullPointerException");
} catch (NullPointerException e) {
// expected exception
}
try {
tabWidget.focusCurrentTab(tabWidget.getChildCount() + 1);
fail("Should throw NullPointerException");
} catch (NullPointerException e) {
// expected exception
}
}
public void testSetEnabled() {
TabWidget tabWidget = new TabWidget(mActivity);
tabWidget.addView(new TextView(mActivity));
tabWidget.addView(new TextView(mActivity));
assertTrue(tabWidget.isEnabled());
assertTrue(tabWidget.getChildAt(0).isEnabled());
assertTrue(tabWidget.getChildAt(1).isEnabled());
tabWidget.setEnabled(false);
assertFalse(tabWidget.isEnabled());
assertFalse(tabWidget.getChildAt(0).isEnabled());
assertFalse(tabWidget.getChildAt(1).isEnabled());
tabWidget.setEnabled(true);
assertTrue(tabWidget.isEnabled());
assertTrue(tabWidget.getChildAt(0).isEnabled());
assertTrue(tabWidget.getChildAt(1).isEnabled());
}
public void testAddView() {
MockTabWidget mockTabWidget = new MockTabWidget(mActivity);
// normal value
View view1 = new TextView(mActivity);
mockTabWidget.addView(view1);
assertSame(view1, mockTabWidget.getChildAt(0));
LayoutParams defaultLayoutParam = mockTabWidget.generateDefaultLayoutParams();
if (mockTabWidget.getOrientation() == LinearLayout.VERTICAL) {
assertEquals(defaultLayoutParam.height, LayoutParams.WRAP_CONTENT);
assertEquals(defaultLayoutParam.width, LayoutParams.MATCH_PARENT);
} else if (mockTabWidget.getOrientation() == LinearLayout.HORIZONTAL) {
assertEquals(defaultLayoutParam.height, LayoutParams.WRAP_CONTENT);
assertEquals(defaultLayoutParam.width, LayoutParams.WRAP_CONTENT);
} else {
assertNull(defaultLayoutParam);
}
View view2 = new RelativeLayout(mActivity);
mockTabWidget.addView(view2);
assertSame(view2, mockTabWidget.getChildAt(1));
try {
mockTabWidget.addView(new ListView(mActivity));
fail("did not throw RuntimeException when adding invalid view");
} catch (RuntimeException e) {
// issue 1695243
}
try {
mockTabWidget.addView(null);
fail("did not throw NullPointerException when child is null");
} catch (NullPointerException e) {
// issue 1695243
}
}
public void testOnFocusChange() {
// onFocusChange() is implementation details, do NOT test
}
public void testOnSizeChanged() {
// implementation details
}
/*
* Mock class for TabWidget to be used in test cases.
*/
private class MockTabWidget extends TabWidget {
private boolean mCalledInvalidate = false;
public MockTabWidget(Context context) {
super(context);
}
@Override
protected LayoutParams generateDefaultLayoutParams() {
return super.generateDefaultLayoutParams();
}
@Override
public void invalidate() {
super.invalidate();
mCalledInvalidate = true;
}
public boolean hasCalledInvalidate() {
return mCalledInvalidate;
}
public void reset() {
mCalledInvalidate = false;
}
}
}
| [
"karun.matharu@gmail.com"
] | karun.matharu@gmail.com |
af545136aa38b74a11f72a7c733ac9d1b8a409fc | af846ab7ffc148cd3207f3e65cfb2dde6d92c767 | /sparrow-search/sparrow-search-crawl/src/main/java/com/sparrow/collect/orm/ParsedSql.java | ab03007fdef19593f4cab8e47387730819c6e5eb | [
"Apache-2.0"
] | permissive | aniu2002/myself-toolkit | aaf5f71948bb45d331b206d806de85c84bafadcc | aea640b4339ea24d7bfd32311f093560573635d3 | refs/heads/master | 2022-12-24T20:25:43.702167 | 2019-03-11T14:42:14 | 2019-03-11T14:42:14 | 99,811,298 | 1 | 0 | Apache-2.0 | 2022-12-12T21:42:45 | 2017-08-09T13:26:46 | Java | UTF-8 | Java | false | false | 1,291 | java | /**
* Project Name:http-server
* File Name:ParsedSql.java
* Package Name:au.orm.sql
* Date:2013-12-19下午1:28:56
* Copyright (c) 2013, Boco.com All Rights Reserved.
*
*/
package com.sparrow.collect.orm;
public class ParsedSql {
private final String originalSql;
private final String actualSql;
private final String parameters[];
private final int paraIndexes[];
private final int namedSize;
private final int parasSize;
public ParsedSql(String originalSql, String actualSql, String parameters[],
int paraIndexes[], int namedSize, int parasSize) {
this.originalSql = originalSql;
this.actualSql = actualSql;
this.parameters = parameters;
this.paraIndexes = paraIndexes;
this.namedSize = namedSize;
this.parasSize = parasSize;
}
public String getOriginalSql() {
return originalSql;
}
public String getActualSql() {
return actualSql;
}
public String[] getParameters() {
return parameters;
}
public String getParameter(int i) {
return parameters[i];
}
public int[] getParaIndexes() {
return paraIndexes;
}
public boolean hasParas() {
return this.parasSize > 0;
}
public boolean hasNamedParas() {
return this.namedSize > 0;
}
public boolean hasTraditionalParas() {
return this.parasSize > this.namedSize;
}
}
| [
"yuanzhengchu2002@163.com"
] | yuanzhengchu2002@163.com |
70404d1fc2ef55d35ceac6f669529a2f5794d99c | c0fe21b86f141256c85ab82c6ff3acc56b73d3db | /jdfusion/src/main/java/com/jdcloud/sdk/service/jdfusion/model/VpcCollection.java | dec50e80062d0b13923f9e2624c235f5874215da | [
"Apache-2.0"
] | permissive | jdcloud-api/jdcloud-sdk-java | 3fec9cf552693520f07b43a1e445954de60e34a0 | bcebe28306c4ccc5b2b793e1a5848b0aac21b910 | refs/heads/master | 2023-07-25T07:03:36.682248 | 2023-07-25T06:54:39 | 2023-07-25T06:54:39 | 126,275,669 | 47 | 61 | Apache-2.0 | 2023-09-07T08:41:24 | 2018-03-22T03:41:41 | Java | UTF-8 | Java | false | false | 1,657 | java | /*
* Copyright 2018 JDCLOUD.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.
*
*
*
*
*
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.jdfusion.model;
import java.util.List;
import java.util.ArrayList;
/**
* vpcCollection
*/
public class VpcCollection implements java.io.Serializable {
private static final long serialVersionUID = 1L;
/**
* vpcs
*/
private List<VpcInfo> vpcs;
/**
* get vpcs
*
* @return
*/
public List<VpcInfo> getVpcs() {
return vpcs;
}
/**
* set vpcs
*
* @param vpcs
*/
public void setVpcs(List<VpcInfo> vpcs) {
this.vpcs = vpcs;
}
/**
* set vpcs
*
* @param vpcs
*/
public VpcCollection vpcs(List<VpcInfo> vpcs) {
this.vpcs = vpcs;
return this;
}
/**
* add item to vpcs
*
* @param vpc
*/
public void addVpc(VpcInfo vpc) {
if (this.vpcs == null) {
this.vpcs = new ArrayList<>();
}
this.vpcs.add(vpc);
}
} | [
"wangbibo@jd.com"
] | wangbibo@jd.com |
fdc5565d8707e2650866e323e2bf75c58387f42c | e944e4b95308c662ffe1c023ec8cf3dfac2804d3 | /src/main/java/net/hkp/jhipster/application/config/CloudDatabaseConfiguration.java | cb6f5dfcc0a1f35b4d7439c919e8de0c5e173d06 | [] | no_license | develophil/jhipsterOnlineSampleApplication | 6e771ee2422bb416ce6b930d4972225c47b2406a | bbea67fb3f4aaf96ddee4f1e19e6ed63ccf9e6ac | refs/heads/master | 2021-09-02T07:24:17.784491 | 2017-12-31T12:11:46 | 2017-12-31T12:11:46 | 115,861,024 | 0 | 0 | null | 2017-12-31T12:12:40 | 2017-12-31T12:11:41 | Java | UTF-8 | Java | false | false | 703 | java | package net.hkp.jhipster.application.config;
import io.github.jhipster.config.JHipsterConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.config.java.AbstractCloudConfig;
import org.springframework.context.annotation.*;
import javax.sql.DataSource;
@Configuration
@Profile(JHipsterConstants.SPRING_PROFILE_CLOUD)
public class CloudDatabaseConfiguration extends AbstractCloudConfig {
private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class);
@Bean
public DataSource dataSource() {
log.info("Configuring JDBC datasource from a cloud provider");
return connectionFactory().dataSource();
}
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
79d24344d646ef5c6262e2cdcf6675ab296759bf | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/tencent/mm/plugin/backup/c/d$5.java | 49c62919690412a19bf784c4dc4bd8119d0dbf1f | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 350 | java | package com.tencent.mm.plugin.backup.c;
import com.tencent.mm.plugin.backup.c.e.a;
class d$5 implements a {
final /* synthetic */ d gUG;
d$5(d dVar) {
this.gUG = dVar;
}
public final void l(int i, byte[] bArr) {
if (bArr != null) {
this.gUG.bitmapData = bArr;
}
this.gUG.mw(i);
}
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
fb51b8156e9f12e0f075ff7c59058a83517579c4 | d74c2ca437a58670dc8bfbf20a3babaecb7d0bea | /SAP_858310_lines/Source - 963k/js.ume.useradmin.app/dev/src/_tc~sec~ume~useradmin/webm/core/com/sap/security/core/admin/imp/useradminpage.java | e245295d5e98c32d0de24b740962d2e9b03a81a1 | [] | no_license | javafullstackstudens/JAVA_SAP | e848e9e1a101baa4596ff27ce1aedb90e8dfaae8 | f1b826bd8a13d1432e3ddd4845ac752208df4f05 | refs/heads/master | 2023-06-05T20:00:48.946268 | 2021-06-30T10:07:39 | 2021-06-30T10:07:39 | 381,657,064 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,624 | java | package com.sap.security.core.admin.imp;
import java.util.Locale;
import com.sap.security.core.admin.UserAdminLogic;
import com.sap.security.core.admin.SelfRegLogic;
import com.sap.security.core.admin.api.IUserAdminPage;
public class UserAdminPage extends UserAdminAbstractNode implements IUserAdminPage {
public static final String VERSIONSTRING = "$Id: //engine/js.ume.useradmin.app/dev/src/_tc~sec~ume~useradmin/webm/core/com/sap/security/core/admin/imp/UserAdminPage.java#1 $ from $DateTime: 2008/09/17 17:08:55 $ ($Change: 217715 $)";
private String[] pages = {UserAdminLogic.userCreatePage,
UserAdminLogic.userModifyPage,
UserAdminLogic.userProfileViewPage,
UserAdminLogic.userProfileModifyPage,
UserAdminLogic.userSearchPage,
UserAdminLogic.userProfileModifyPortalPage,
SelfRegLogic.applyUserPage,
SelfRegLogic.applyCompanyUserPage};
private String _title;
public UserAdminPage(String uniqueName) {
super.setUniqueName(uniqueName);
}
public boolean hasParent() {
return false;
}
public String[] getParents() {
return null;
}
public boolean isParent(String parentUniqueName) {
return false;
}
public String getTitle() {
return this._title;
}
public void setTitle(String title) {
this._title = title;
}
public void setCategoryOrder(String[] categoryNames) {
}
} // IUserAdminPage | [
"Yalin.Arie@checkmarx.com"
] | Yalin.Arie@checkmarx.com |
d4a262f6de836b2d2279fe4a68b85fee5f597e2b | edfb40afa239b72c94fab9b207ce5035b0dafcaf | /src/com/sinarios/RadioButtons.java | 50fbb78582e60dac29e58cfdf0d8e23671f271a7 | [] | no_license | qamanoj/selenium_WebDriver | b6b66fd5bf9f949bd7f167bb6d12427b25595ab5 | 8a2b19110554e30aea7ccd251322446614350586 | refs/heads/master | 2020-05-01T05:39:12.294174 | 2019-03-23T15:43:16 | 2019-03-23T15:43:16 | 177,307,993 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 836 | java | package com.sinarios;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class RadioButtons
{
public static void main(String[] args)
{
WebDriver driver=new FirefoxDriver();
driver.get("http://www.echoecho.com/htmlforms10.htm");
//driver.findElement(By.xpath("//input[@value='Milk']")).click();
int count =driver.findElements(By.xpath("//input[@name='group1']")).size();
for(int i=0;i<count;i++)
{
//driver.findElements(By.xpath("//input[@name='group1']")).get(i).click();
String text=driver.findElements(By.xpath("//input[@name='group1']")).get(i).getAttribute("value");
System.out.println(text);
if(text.equals("Cheese"))
{
driver.findElements(By.xpath("//input[@name='group1']")).get(i).click();
}
}
}
}
| [
"mail2manoj18@gmail.com"
] | mail2manoj18@gmail.com |
a8be1ee5ba42ca59bff3edb259c3349a8df0da4b | f37a6564e1642c79926be69c7fee13f43b4df76a | /halcon/capa-halcon-portlet/WEB-INF/service/com/ext/portlet/halcon/service/persistence/ConfiguracionProductoPersistence.java | f482ad29671702977716c5d4da4bb9106477d777 | [] | no_license | mshelzr/portlets-business | edc75e3bd5afbf7f51d9df58799bdd4ad4b7be36 | 9cf59a531524d8cafeb415bc6f711db5c4304aae | refs/heads/master | 2021-01-01T06:32:43.719845 | 2014-09-10T06:04:23 | 2014-09-10T06:04:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,335 | java | /**
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.ext.portlet.halcon.service.persistence;
import com.ext.portlet.halcon.model.ConfiguracionProducto;
import com.liferay.portal.service.persistence.BasePersistence;
/**
* The persistence interface for the configuracion producto service.
*
* <p>
* Caching information and settings can be found in <code>portal.properties</code>
* </p>
*
* @author Infonet-Consulting
* @see ConfiguracionProductoPersistenceImpl
* @see ConfiguracionProductoUtil
* @generated
*/
public interface ConfiguracionProductoPersistence extends BasePersistence<ConfiguracionProducto> {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify or reference this interface directly. Always use {@link ConfiguracionProductoUtil} to access the configuracion producto persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
*/
/**
* Caches the configuracion producto in the entity cache if it is enabled.
*
* @param configuracionProducto the configuracion producto
*/
public void cacheResult(
com.ext.portlet.halcon.model.ConfiguracionProducto configuracionProducto);
/**
* Caches the configuracion productos in the entity cache if it is enabled.
*
* @param configuracionProductos the configuracion productos
*/
public void cacheResult(
java.util.List<com.ext.portlet.halcon.model.ConfiguracionProducto> configuracionProductos);
/**
* Creates a new configuracion producto with the primary key. Does not add the configuracion producto to the database.
*
* @param idConfiguracionProducto the primary key for the new configuracion producto
* @return the new configuracion producto
*/
public com.ext.portlet.halcon.model.ConfiguracionProducto create(
long idConfiguracionProducto);
/**
* Removes the configuracion producto with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param idConfiguracionProducto the primary key of the configuracion producto
* @return the configuracion producto that was removed
* @throws com.ext.portlet.halcon.NoSuchConfiguracionProductoException if a configuracion producto with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public com.ext.portlet.halcon.model.ConfiguracionProducto remove(
long idConfiguracionProducto)
throws com.ext.portlet.halcon.NoSuchConfiguracionProductoException,
com.liferay.portal.kernel.exception.SystemException;
public com.ext.portlet.halcon.model.ConfiguracionProducto updateImpl(
com.ext.portlet.halcon.model.ConfiguracionProducto configuracionProducto,
boolean merge)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns the configuracion producto with the primary key or throws a {@link com.ext.portlet.halcon.NoSuchConfiguracionProductoException} if it could not be found.
*
* @param idConfiguracionProducto the primary key of the configuracion producto
* @return the configuracion producto
* @throws com.ext.portlet.halcon.NoSuchConfiguracionProductoException if a configuracion producto with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public com.ext.portlet.halcon.model.ConfiguracionProducto findByPrimaryKey(
long idConfiguracionProducto)
throws com.ext.portlet.halcon.NoSuchConfiguracionProductoException,
com.liferay.portal.kernel.exception.SystemException;
/**
* Returns the configuracion producto with the primary key or returns <code>null</code> if it could not be found.
*
* @param idConfiguracionProducto the primary key of the configuracion producto
* @return the configuracion producto, or <code>null</code> if a configuracion producto with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public com.ext.portlet.halcon.model.ConfiguracionProducto fetchByPrimaryKey(
long idConfiguracionProducto)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns all the configuracion productos.
*
* @return the configuracion productos
* @throws SystemException if a system exception occurred
*/
public java.util.List<com.ext.portlet.halcon.model.ConfiguracionProducto> findAll()
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns a range of all the configuracion productos.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
* </p>
*
* @param start the lower bound of the range of configuracion productos
* @param end the upper bound of the range of configuracion productos (not inclusive)
* @return the range of configuracion productos
* @throws SystemException if a system exception occurred
*/
public java.util.List<com.ext.portlet.halcon.model.ConfiguracionProducto> findAll(
int start, int end)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns an ordered range of all the configuracion productos.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
* </p>
*
* @param start the lower bound of the range of configuracion productos
* @param end the upper bound of the range of configuracion productos (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of configuracion productos
* @throws SystemException if a system exception occurred
*/
public java.util.List<com.ext.portlet.halcon.model.ConfiguracionProducto> findAll(
int start, int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Removes all the configuracion productos from the database.
*
* @throws SystemException if a system exception occurred
*/
public void removeAll()
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns the number of configuracion productos.
*
* @return the number of configuracion productos
* @throws SystemException if a system exception occurred
*/
public int countAll()
throws com.liferay.portal.kernel.exception.SystemException;
} | [
"mshelzr@gmail.com"
] | mshelzr@gmail.com |
18012c43384f18f713eb043d74a89dd20f09d957 | 35b93f7ce1bc4e9340b14f30e6fb1dfdac0816d6 | /eclipse/plugins/org.switchyard.tools.models.switchyard1_0.edit/src/org/switchyard/tools/models/switchyard1_0/spring/provider/RoutesDefinitionItemProvider.java | 3c10883121b8b7b51fed9417e41f10ae3e921d6f | [] | no_license | bbrodt/tools | 4900bc928f1a43f5a3dfd3ebfe79a1b7efec1942 | f310305d47b35ae525108a94bbef9ee46260dc4b | refs/heads/master | 2020-12-25T06:15:28.185409 | 2016-08-16T13:06:42 | 2016-08-16T13:07:56 | 6,600,764 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,380 | java | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.switchyard.tools.models.switchyard1_0.spring.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.switchyard.tools.models.switchyard1_0.spring.RoutesDefinition;
import org.switchyard.tools.models.switchyard1_0.spring.SpringFactory;
import org.switchyard.tools.models.switchyard1_0.spring.SpringPackage;
/**
* This is the item provider adapter for a {@link org.switchyard.tools.models.switchyard1_0.spring.RoutesDefinition} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class RoutesDefinitionItemProvider
extends OptionalIdentifiedDefinitionItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public RoutesDefinitionItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
return itemPropertyDescriptors;
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(SpringPackage.eINSTANCE.getRoutesDefinition_Route());
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* This returns RoutesDefinition.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/RoutesDefinition"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((RoutesDefinition)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_RoutesDefinition_type") :
getString("_UI_RoutesDefinition_type") + " " + label;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(RoutesDefinition.class)) {
case SpringPackage.ROUTES_DEFINITION__ROUTE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(SpringPackage.eINSTANCE.getRoutesDefinition_Route(),
SpringFactory.eINSTANCE.createRouteDefinition()));
}
}
| [
"bfitzpat@redhat.com"
] | bfitzpat@redhat.com |
865f919d16d2c6535d197b31fd0e5ba0df5e38b4 | 5b5f90c99f66587cea981a640063a54b6ea75185 | /src/main/java/com/coxandkings/travel/operations/service/whitelabel/impl/WhiteLabelServiceImpl.java | 55dbcd6370cb1ecc700a3d46a03c23afa28ebdc5 | [] | no_license | suyash-capiot/operations | 02558d5f4c72a895d4a7e7e743495a118b953e97 | b6ad01cbdd60190e3be1f2a12d94258091fec934 | refs/heads/master | 2020-04-02T06:22:30.589898 | 2018-10-26T12:11:11 | 2018-10-26T12:11:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,511 | java | package com.coxandkings.travel.operations.service.whitelabel.impl;
import com.coxandkings.travel.operations.criteria.whitelabel.WhiteLabelCriteria;
import com.coxandkings.travel.operations.exceptions.OperationException;
import com.coxandkings.travel.operations.model.whitelabel.ConfigurationTypeEnumHandler;
import com.coxandkings.travel.operations.model.whitelabel.Currency;
import com.coxandkings.travel.operations.model.whitelabel.Language;
import com.coxandkings.travel.operations.model.whitelabel.WhiteLabel;
import com.coxandkings.travel.operations.repository.whitelabel.ConfigurationTypeRepository;
import com.coxandkings.travel.operations.repository.whitelabel.WhiteLabelRepository;
import com.coxandkings.travel.operations.resource.whitelabel.LandingPageResponse;
import com.coxandkings.travel.operations.resource.whitelabel.WhiteLabelResource;
import com.coxandkings.travel.operations.service.whitelabel.FileSetupService;
import com.coxandkings.travel.operations.service.whitelabel.WhiteLabelService;
import com.coxandkings.travel.operations.utils.Constants;
import com.coxandkings.travel.operations.utils.CopyUtils;
import org.apache.logging.log4j.Logger;import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.*;
@Service("WhiteLabelService")
public class WhiteLabelServiceImpl implements WhiteLabelService {
private static Logger log = LogManager.getLogger(WhiteLabelServiceImpl.class);
@Autowired
WhiteLabelRepository whiteLabelRepository;
@Autowired
ConfigurationTypeRepository configurationTypeRepository;
@Autowired
private FileSetupService fileSetUpService;
public static final int FILE_CONTENT_INDEX = 0;
public static final int FILE_PATH_INDEX = 1;
@Override
public WhiteLabel createOrUpdateWhiteLabel(WhiteLabelResource whiteLabelResource) throws OperationException{
WhiteLabel whiteLabel = null;
try
{
if(!StringUtils.isEmpty(whiteLabelResource.getId())) {
if(log.isDebugEnabled()) {
log.debug("White label Id:" + whiteLabelResource.getId());
}
WhiteLabel existingWhiteLabel = whiteLabelRepository.getWhiteLabelById(whiteLabelResource.getId());
if(log.isDebugEnabled()) {
log.debug("Existing WhiteLabel Details:" + existingWhiteLabel);
}
if(existingWhiteLabel == null) {
throw new OperationException("Driver not found with id" + whiteLabelResource.getId());
}
CopyUtils.copy(whiteLabelResource, existingWhiteLabel);
whiteLabel = existingWhiteLabel;
} else {
whiteLabel = new WhiteLabel();
//TODO : Checking Duplicate but nothing mentioned in doc
CopyUtils.copy(whiteLabelResource, whiteLabel);
}
validateWhiteLabelResource(whiteLabelResource, whiteLabel);
return whiteLabelRepository.saveOrUpdate(whiteLabel);
} catch (OperationException e) {
throw new OperationException(Constants.ER01);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
public List<LandingPageResponse> getAllWhiteLabels() throws OperationException{
List<WhiteLabel> whiteLabelRes = whiteLabelRepository.getAllWhiteLabels();
List<LandingPageResponse> landingPageResponses = new ArrayList<>();
for(WhiteLabel whiteLabel:whiteLabelRes){
LandingPageResponse res = new LandingPageResponse();
res.setId(whiteLabel.getId());
res.setClientMarketId(whiteLabel.getClientMarketId());
res.setConfigurationTypeEnumHandler(whiteLabel.getConfigurationTypeEnumHandler());
res.setLanguage(whiteLabel.getLanguage());
res.setPointOfSale(whiteLabel.getPointOfSales());
landingPageResponses.add(res);
}
return landingPageResponses;
}
@Override
public void deleteWhiteLabel(String id) {
whiteLabelRepository.deleteById(id);
}
@Override
public List<WhiteLabel> sortByCriteria(WhiteLabelCriteria criteria) {
return whiteLabelRepository.getWhiteLabelsByCriteria(criteria);
}
@Override
public WhiteLabel getWhiteLabelId(String id) {
return whiteLabelRepository.getWhiteLabelById(id);
}
public void validateWhiteLabelResource(WhiteLabelResource whiteLabelResource, WhiteLabel whiteLabel){
Set<Language> languageSet = whiteLabel.getLanguage() != null ? whiteLabel.getLanguage() : new HashSet<>();;
Set<String> languageIds = whiteLabelResource.getLanguageIds();
if (languageIds != null) {
for (String languageId : languageIds) {
Optional<Language> language = languageSet.stream().filter(languageMatch -> languageMatch.getLanguageId()
.equalsIgnoreCase(languageId)).findFirst();
if(!(language.isPresent())){
Language lang = new Language();
lang.setLanguageId(languageId);
languageSet.add(lang);
}
}
whiteLabel.setLanguage(languageSet);
}
Set<Currency> currencySet = whiteLabel.getCurrency() != null ? whiteLabel.getCurrency() : new HashSet<>();
Set<String> currencyIds = whiteLabelResource.getLanguageIds();
if (currencyIds != null) {
for (String currencyId : currencyIds) {
Optional<Currency> currency = currencySet.stream().filter(currencyMatch -> currencyMatch.getCurrencyId()
.equalsIgnoreCase(currencyId)).findFirst();
//TODO : Verify Implementation Logic
if(!(currency.isPresent())){
Currency curr = new Currency();
curr.setCurrencyId(currencyId);
currencySet.add(curr);
}
}
whiteLabel.setCurrency(currencySet);
}
String enumId = whiteLabelResource.getWhiteLabelEnumHandlerId();
ConfigurationTypeEnumHandler configType = configurationTypeRepository.getWhiteLabelById(enumId);
whiteLabel.setConfigurationTypeEnumHandler(configType);
}
}
| [
"sahil@capiot.com"
] | sahil@capiot.com |
12056dd7ede77bedc86579e4005ad538ac3ba7f7 | 23458bdfb7393433203985569e68bc1935a022d6 | /NDC-GraphQL-Client/src/generated-sources/java/org/iata/oo/schema/AirShoppingRS/AddressCoreType.java | ff63c5abf49b85cb711d3559784e75b35876265b | [] | no_license | joelmorales/NDC | 7c6baa333c0285b724e6356bd7ae808f1f74e7ec | ebddd30369ec74e078a2c9996da0402f9ac448a1 | refs/heads/master | 2021-06-30T02:49:12.522375 | 2019-06-13T14:55:05 | 2019-06-13T14:55:05 | 171,594,242 | 1 | 0 | null | 2020-10-13T12:03:33 | 2019-02-20T03:29:16 | Java | UTF-8 | Java | false | false | 6,860 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.03.06 at 10:14:17 AM CST
//
package org.iata.oo.schema.AirShoppingRS;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlIDREF;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
/**
* CORE ADDRESS representation.
*
* <p>Java class for AddressCoreType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="AddressCoreType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Address">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.iata.org/IATA/EDIST/2017.2}PaymentAddress"/>
* <element ref="{http://www.iata.org/IATA/EDIST/2017.2}SimpleAddress"/>
* <element ref="{http://www.iata.org/IATA/EDIST/2017.2}StructuredAddress"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <attGroup ref="{http://www.iata.org/IATA/EDIST/2017.2}ObjAssociationAttrGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AddressCoreType", propOrder = {
"address"
})
@XmlSeeAlso({
AddressDetailType.class
})
public class AddressCoreType {
@XmlElement(name = "Address", required = true)
protected AddressCoreType.Address address;
@XmlAttribute(name = "refs")
@XmlIDREF
protected List<Object> refs;
/**
* Gets the value of the address property.
*
* @return
* possible object is
* {@link AddressCoreType.Address }
*
*/
public AddressCoreType.Address getAddress() {
return address;
}
/**
* Sets the value of the address property.
*
* @param value
* allowed object is
* {@link AddressCoreType.Address }
*
*/
public void setAddress(AddressCoreType.Address value) {
this.address = value;
}
/**
* Gets the value of the refs property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the refs property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRefs().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
*
*
*/
public List<Object> getRefs() {
if (refs == null) {
refs = new ArrayList<Object>();
}
return this.refs;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.iata.org/IATA/EDIST/2017.2}PaymentAddress"/>
* <element ref="{http://www.iata.org/IATA/EDIST/2017.2}SimpleAddress"/>
* <element ref="{http://www.iata.org/IATA/EDIST/2017.2}StructuredAddress"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"paymentAddress",
"simpleAddress",
"structuredAddress"
})
public static class Address {
@XmlElement(name = "PaymentAddress", required = true)
protected PaymentAddrType paymentAddress;
@XmlElement(name = "SimpleAddress", required = true)
protected SimpleAddrType simpleAddress;
@XmlElement(name = "StructuredAddress", required = true)
protected StructuredAddrType structuredAddress;
/**
* Gets the value of the paymentAddress property.
*
* @return
* possible object is
* {@link PaymentAddrType }
*
*/
public PaymentAddrType getPaymentAddress() {
return paymentAddress;
}
/**
* Sets the value of the paymentAddress property.
*
* @param value
* allowed object is
* {@link PaymentAddrType }
*
*/
public void setPaymentAddress(PaymentAddrType value) {
this.paymentAddress = value;
}
/**
* Gets the value of the simpleAddress property.
*
* @return
* possible object is
* {@link SimpleAddrType }
*
*/
public SimpleAddrType getSimpleAddress() {
return simpleAddress;
}
/**
* Sets the value of the simpleAddress property.
*
* @param value
* allowed object is
* {@link SimpleAddrType }
*
*/
public void setSimpleAddress(SimpleAddrType value) {
this.simpleAddress = value;
}
/**
* Gets the value of the structuredAddress property.
*
* @return
* possible object is
* {@link StructuredAddrType }
*
*/
public StructuredAddrType getStructuredAddress() {
return structuredAddress;
}
/**
* Sets the value of the structuredAddress property.
*
* @param value
* allowed object is
* {@link StructuredAddrType }
*
*/
public void setStructuredAddress(StructuredAddrType value) {
this.structuredAddress = value;
}
}
}
| [
"joel.moralesmorales@hotmail.com"
] | joel.moralesmorales@hotmail.com |
ef2c3e97c41f8b9d99b679fa99cbb91016e08023 | e17b0d9189fa36f5639da1445bcb7f497bd27843 | /src/main/java/br/com/clincanet/security/DomainUserDetailsService.java | a0327dd14df78c3e5580dfe5e9fd5e92da014fb0 | [] | no_license | BulkSecurityGeneratorProject/clinicaNet | c7c96089618822e4999198e6dca442c34cf71f0c | 317558a34c35af48ecce531001465e7da6d9342a | refs/heads/master | 2022-12-16T20:13:19.205807 | 2018-07-09T18:34:11 | 2018-07-09T18:34:11 | 296,556,839 | 0 | 0 | null | 2020-09-18T08:10:35 | 2020-09-18T08:10:34 | null | UTF-8 | Java | false | false | 2,786 | java | package br.com.clincanet.security;
import br.com.clincanet.domain.User;
import br.com.clincanet.repository.UserRepository;
import org.hibernate.validator.internal.constraintvalidators.hv.EmailValidator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.stream.Collectors;
/**
* Authenticate a user from the database.
*/
@Component("userDetailsService")
public class DomainUserDetailsService implements UserDetailsService {
private final Logger log = LoggerFactory.getLogger(DomainUserDetailsService.class);
private final UserRepository userRepository;
public DomainUserDetailsService(UserRepository userRepository) {
this.userRepository = userRepository;
}
@Override
@Transactional
public UserDetails loadUserByUsername(final String login) {
log.debug("Authenticating {}", login);
if (new EmailValidator().isValid(login, null)) {
Optional<User> userByEmailFromDatabase = userRepository.findOneWithAuthoritiesByEmail(login);
return userByEmailFromDatabase.map(user -> createSpringSecurityUser(login, user))
.orElseThrow(() -> new UsernameNotFoundException("User with email " + login + " was not found in the database"));
}
String lowercaseLogin = login.toLowerCase(Locale.ENGLISH);
Optional<User> userByLoginFromDatabase = userRepository.findOneWithAuthoritiesByLogin(lowercaseLogin);
return userByLoginFromDatabase.map(user -> createSpringSecurityUser(lowercaseLogin, user))
.orElseThrow(() -> new UsernameNotFoundException("User " + lowercaseLogin + " was not found in the database"));
}
private org.springframework.security.core.userdetails.User createSpringSecurityUser(String lowercaseLogin, User user) {
if (!user.getActivated()) {
throw new UserNotActivatedException("User " + lowercaseLogin + " was not activated");
}
List<GrantedAuthority> grantedAuthorities = user.getAuthorities().stream()
.map(authority -> new SimpleGrantedAuthority(authority.getName()))
.collect(Collectors.toList());
return new org.springframework.security.core.userdetails.User(user.getLogin(),
user.getPassword(),
grantedAuthorities);
}
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
be00eeefbf6670acc64f5812306de54a831fd76c | 99da98082348a33a50a1553c0bedbc73565774bf | /StarBattle_Client/src/com/starbattle/client/window/ContentPanel.java | fdd2295f4626c93ea5bda856655a95280408d239 | [] | no_license | geribeer/dhbwStarbattle | 5926f0dafba51f03e59cb57ecc46d2eaa64b4bf2 | baff60ca155306e8f0346042c32efab86a8724a8 | refs/heads/master | 2020-12-11T02:11:50.581519 | 2014-10-12T18:52:27 | 2014-10-12T18:52:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 499 | java | package com.starbattle.client.window;
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JPanel;
public class ContentPanel extends JPanel{
private Image background=null;
public void setBackgroundImage(Image image)
{
background=image;
}
@Override
protected void paintComponent(Graphics g) {
// TODO Auto-generated method stub
super.paintComponent(g);
if(background!=null)
{
g.drawImage(background,0,0,null);
}
}
}
| [
"roll2@web.de"
] | roll2@web.de |
ada56bf378bab5f99c357817a14bfd6a3ea1cee3 | a00326c0e2fc8944112589cd2ad638b278f058b9 | /src/main/java/000/143/506/CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_HashSet_52c.java | b1db9527c66a4a8bb2432d5bfe809e0c04e176eb | [] | no_license | Lanhbao/Static-Testing-for-Juliet-Test-Suite | 6fd3f62713be7a084260eafa9ab221b1b9833be6 | b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68 | refs/heads/master | 2020-08-24T13:34:04.004149 | 2019-10-25T09:26:00 | 2019-10-25T09:26:00 | 216,822,684 | 0 | 1 | null | 2019-11-08T09:51:54 | 2019-10-22T13:37:13 | Java | UTF-8 | Java | false | false | 1,464 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_HashSet_52c.java
Label Definition File: CWE789_Uncontrolled_Mem_Alloc.int.label.xml
Template File: sources-sink-52c.tmpl.java
*/
/*
* @description
* CWE: 789 Uncontrolled Memory Allocation
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: HashSet
* BadSink : Create a HashSet using data as the initial size
* Flow Variant: 52 Data flow: data passed as an argument from one method to another to another in three different classes in the same package
*
* */
import javax.servlet.http.*;
import java.util.HashSet;
public class CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_HashSet_52c
{
public void badSink(int data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
/* POTENTIAL FLAW: Create a HashSet using data as the initial size. data may be very large, creating memory issues */
HashSet intHashSet = new HashSet(data);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(int data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
/* POTENTIAL FLAW: Create a HashSet using data as the initial size. data may be very large, creating memory issues */
HashSet intHashSet = new HashSet(data);
}
}
| [
"anhtluet12@gmail.com"
] | anhtluet12@gmail.com |
3893a93b13feb5f79517d409826bcbcb34336f9d | b1ef3e131d9ecf8071d7ed71fdfd34ebd42c6d6d | /portal/src/main/java/org/efbiz/ability/exam/portal/service/UserService.java | 7eb8190695fc17fd52cdbc39e7ec70f119c22c8b | [
"MIT"
] | permissive | efbiz/ability-exam | 2d72a2c425f78f3cdcef20365aac8d6660de2771 | e6a988fe89439df0d20c714ae0b8a01e55806e5b | refs/heads/master | 2020-03-21T07:21:02.035363 | 2018-06-22T10:42:24 | 2018-06-22T10:42:24 | 138,275,351 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,072 | java | package org.efbiz.ability.exam.portal.service;
import java.util.HashMap;
import java.util.List;
import org.efbiz.ability.exam.common.domain.user.Department;
import org.efbiz.ability.exam.common.domain.user.Group;
import org.efbiz.ability.exam.common.domain.user.Role;
import org.efbiz.ability.exam.common.domain.user.User;
import org.efbiz.ability.exam.common.util.Page;
/**
* @author Joni
* @date 2018年6月8日 下午5:52:55
*/
public interface UserService {
/**
* 添加一个用户,并授权。如果授权为(教师),则groupId无意义,如果授权为(学员),groupId为教师管理的分组之一
*
* @param user
* @param authority
* @param groupId
* @param roleMap
*
* @return
*/
public int addUser(User user, String authority, int groupId, HashMap<String, Role> roleMap);
public void updateUser(User user, String oldPassword);
/**
* 修改用户密码
*
* @param user
* @param oldPwd
*/
public void updateUserPwd(User user, String oldPwd);
/**
* 获取
*
* @param userId
* @param page
*
* @return
*/
public List<Group> getGroupListByUserId(int userId, Page<Group> page);
/**
* 获取所有的角色并生成字典
*
* @return
*/
public HashMap<String, Role> getRoleMap();
/**
* 更新用户状态
*
* @param idList
* @param enabled
*/
public void changeUserStatus(List<Integer> idList, boolean enabled);
/**
* 添加用户到分组
*
* @param userId
* @param groupId
*/
public void addUserGroup(int userId, int groupId);
/**
* 删除分组
*
* @param userId
* @param groupId
* @param managerId 只能删除自己管理的分组中的数据
*/
public void deleteUserGroup(int userId, int groupId, int managerId);
/**
* 获取所有部门信息
*
* @param page
*
* @return
*/
public List<Department> getDepList(Page<Department> page);
/**
* 获取用户
*
* @param userName
*
* @return
*/
public User getUserByName(String userName);
}
| [
"thanos_t@163.com"
] | thanos_t@163.com |
d6ac4f339e35671aca70ed17a84ba4da17170470 | d4fc1df8b91d75fd246edf160ed844ac8edc8946 | /src/test/java/com/yash/party/web/rest/errors/ExceptionTranslatorTestController.java | 85f624938877a327ef81a79816c3fb1efc88280d | [] | no_license | Yash-PradhanYashSharma/party | ac9f967340a764c169a05c9add38023fd3db4b3c | 8248a393dfc241064c73579b1fea450a12ec1c7b | refs/heads/main | 2023-01-30T06:11:00.816634 | 2020-12-11T15:54:40 | 2020-12-11T15:54:40 | 320,618,169 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,064 | java | package com.yash.party.web.rest.errors;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api/exception-translator-test")
public class ExceptionTranslatorTestController {
@GetMapping("/concurrency-failure")
public void concurrencyFailure() {
throw new ConcurrencyFailureException("test concurrency failure");
}
@PostMapping("/method-argument")
public void methodArgument(@Valid @RequestBody TestDTO testDTO) {}
@GetMapping("/missing-servlet-request-part")
public void missingServletRequestPartException(@RequestPart String part) {}
@GetMapping("/missing-servlet-request-parameter")
public void missingServletRequestParameterException(@RequestParam String param) {}
@GetMapping("/access-denied")
public void accessdenied() {
throw new AccessDeniedException("test access denied!");
}
@GetMapping("/unauthorized")
public void unauthorized() {
throw new BadCredentialsException("test authentication failed!");
}
@GetMapping("/response-status")
public void exceptionWithResponseStatus() {
throw new TestResponseStatusException();
}
@GetMapping("/internal-server-error")
public void internalServerError() {
throw new RuntimeException();
}
public static class TestDTO {
@NotNull
private String test;
public String getTest() {
return test;
}
public void setTest(String test) {
this.test = test;
}
}
@ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status")
@SuppressWarnings("serial")
public static class TestResponseStatusException extends RuntimeException {}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
1a0dc3f577dc1eac5ddc231257259c905001674b | 69615a184185604de4d458de6277e9d19ee0b62f | /rds/src/main/java/com/jdcloud/sdk/service/rds/model/ChangeToMasterRequest.java | 2c554a14b51c3203b217eadf8cfbe3dbe7a038b5 | [
"Apache-2.0"
] | permissive | maxiaoshan/jdcloud-sdk-java | d6fb1b99b3714784a67a1818696c8fc5f90dd3da | a9efbbb16e7d7f54a701f74d2d8078aa3aa20b93 | refs/heads/master | 2023-01-13T15:56:13.658982 | 2020-11-19T10:46:42 | 2020-11-19T10:46:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,195 | java | /*
* Copyright 2018 JDCLOUD.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.
*
* 实例管理
* 实例管理相关接口
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.rds.model;
import com.jdcloud.sdk.annotation.Required;
import com.jdcloud.sdk.service.JdcloudRequest;
/**
* 将RDS灾备实例提升为主实例,需要重启实例才能生效。可以结合主备切换的功能,轮流重启备机,降低对业务的影响<br>**注意:如果实例正在进行备份,那么重启主实例将会终止备份操作。**可以查看备份策略中的备份开始时间确认是否有备份正在运行。如果确实需要在实例备份时重启主实例,建议重启后,手工进行一次实例的全备。
*/
public class ChangeToMasterRequest extends JdcloudRequest implements java.io.Serializable {
private static final long serialVersionUID = 1L;
/**
* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)
* Required:true
*/
@Required
private String regionId;
/**
* RDS 实例ID,唯一标识一个RDS实例
* Required:true
*/
@Required
private String instanceId;
/**
* get 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)
*
* @return
*/
public String getRegionId() {
return regionId;
}
/**
* set 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)
*
* @param regionId
*/
public void setRegionId(String regionId) {
this.regionId = regionId;
}
/**
* get RDS 实例ID,唯一标识一个RDS实例
*
* @return
*/
public String getInstanceId() {
return instanceId;
}
/**
* set RDS 实例ID,唯一标识一个RDS实例
*
* @param instanceId
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
/**
* set 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)
*
* @param regionId
*/
public ChangeToMasterRequest regionId(String regionId) {
this.regionId = regionId;
return this;
}
/**
* set RDS 实例ID,唯一标识一个RDS实例
*
* @param instanceId
*/
public ChangeToMasterRequest instanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
} | [
"tancong@jd.com"
] | tancong@jd.com |
531658d70b7744fe73678c7017fe795cf689961a | 2e0a82eed674b7800467c53913034d3916e218c9 | /slides_and_javacode/s18_list_of_references/Dog.java | cb2f0d194401ac9e4d9fdc8be6ac1d8386316f58 | [] | no_license | tfbninja/Slides | 77e89ae0600bacb49c42dacb689e7d2e04160037 | e426c06397a108f6468f172ef069eb0f4f1d44f3 | refs/heads/master | 2020-04-09T09:44:01.810701 | 2019-04-22T19:07:40 | 2019-04-22T19:07:40 | 160,244,500 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 481 | java | package s18_list_of_references;
// A+ Computer Science
// www.apluscompsci.com
//List of references - Dog
import java.util.List;
import java.util.ArrayList;
import static java.lang.System.*;
public class Dog
{
private int age;
private String name;
public Dog( String n, int a )
{
age = a;
name = n;
}
public int getAge()
{
return age;
}
public String getName()
{
return name;
}
public String toString()
{
return "Dog - " + name + " " + age;
}
}
| [
"tfbninja@users.noreply.github.com"
] | tfbninja@users.noreply.github.com |
e12044733b249a03bad918201a5bd24140a5ad82 | 5483eb988acf28a9b3d3ead2b3fd1464b212b5fc | /src/dao/com/vriche/adrm/dao/ibatis/ProFinanceDaoiBatis.java | 1c482f3a986b89cc67bf9aea548d8b828d217790 | [] | no_license | vriche/adrm | 0bcce806716bdc7aa1adc12c20d590e9c37356df | c5e83dc91b831d430962a7079e9a54b7e82b7fa8 | refs/heads/master | 2020-04-06T23:42:19.947104 | 2016-07-14T01:31:31 | 2017-04-01T03:58:15 | 24,831,175 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,615 | java |
package com.vriche.adrm.dao.ibatis;
import java.util.List;
import java.util.Map;
import com.vriche.adrm.dao.ibatis.BaseDaoiBATIS;
import com.vriche.adrm.model.ProFinance;
import com.vriche.adrm.model.ProOrder;
import com.vriche.adrm.model.ProPublishPlan;
import com.vriche.adrm.dao.ProFinanceDao;
import org.springframework.orm.ObjectRetrievalFailureException;
public class ProFinanceDaoiBatis extends BaseDaoiBATIS implements ProFinanceDao {
/**
* @see com.vriche.adrm.dao.ProFinanceDao#getProFinances(com.vriche.adrm.model.ProFinance)
*/
public List getProFinance(final ProFinance proFinance) {
return getSqlMapClientTemplate().queryForList("getProFinance", proFinance);
}
/**
* @see com.vriche.adrm.dao.ProFinanceDao#getProFinancesByIdList(com.vriche.adrm.model.ProFinance)
*/
public List getProFinancesByMap(final Map mp) {
return getSqlMapClientTemplate().queryForList("getProFinancesByMap", mp);
}
/**
* @see com.vriche.adrm.dao.ProFinanceDao#getProFinances(com.vriche.adrm.model.ProFinance)
*/
public Integer getProFinanceCount(final Long id) {
return (Integer)getSqlMapClientTemplate().queryForObject("getProFinanceCount",id);
}
/**
* @see com.vriche.adrm.dao.ProFinanceDao#saveProFinance(ProFinance proFinance)
*/
public Long saveProFinance(final ProFinance proFinance) {
Long id = proFinance.getId();
// check for new record
if (id == null || id.toString().equals("0")) {
id = (Long) getSqlMapClientTemplate().insert("addProFinance", proFinance);
} else {
getSqlMapClientTemplate().update("updateProFinance", proFinance);
}
if( id == null ) {
throw new ObjectRetrievalFailureException(ProFinance.class, id);
}
return id;
}
/**
* @see com.vriche.adrm.dao.ProFinanceDao#removeProFinance(Long id)
*/
public void removeProFinance(final Long id) {
getSqlMapClientTemplate().update("deleteProFinance", id);
}
/**
* @see com.vriche.adrm.dao.ProFinanceDao#removeProFinanceByOrderId(Long id)
*/
public void removeProFinanceByOrderId(Long id) {
getSqlMapClientTemplate().update("deleteProFinanceByOrderId", id);
}
/**
* @see com.vriche.adrm.dao.ProFinanceDAO#removeProFinances(String ids)
*/
public void removeProFinances(final Map idList) {
getSqlMapClientTemplate().update("deleteProFinances", idList);
}
}
| [
"46430212@qq.com"
] | 46430212@qq.com |
04bc62d9ab5b2917946c6cdf898e307cbaccfc7d | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project70/src/main/java/org/gradle/test/performance70_3/Production70_298.java | 1f5147f4e2c24e5ff056723883fb37f0689a59ab | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 305 | java | package org.gradle.test.performance70_3;
public class Production70_298 extends org.gradle.test.performance16_3.Production16_298 {
private final String property;
public Production70_298() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
42669ab3557ffd836d43bd1dbe82dbfff8e60069 | 5dea5ca1e725a09c46f3f128a54e97b4353f7c9e | /src/com/rhb/sas/evaluate/selector/Selector.java | c3d5f5980af2da21579b13e01a5e93aee44d866d | [] | no_license | dofoyo/sas | 9c20f3df50ceec5e310aca700cf7f94f1ff46fac | e20683c7af6f6fe7df808d84a520f166b99275e9 | refs/heads/master | 2021-06-18T10:41:55.819557 | 2017-06-22T06:17:06 | 2017-06-22T06:17:06 | 13,361,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 155 | java | package com.rhb.sas.evaluate.selector;
import java.util.List;
import com.rhb.sas.firm.Firm;
public interface Selector {
public List<Firm> select();
}
| [
"dofoyo@sina.cn"
] | dofoyo@sina.cn |
591d1be980939df8f9f29113fdf7d4864da557a0 | c501583b9b998984eb52229b9d3c38cd8f93d86e | /src/main/java/com/tencentcloudapi/dts/v20180330/models/CompleteMigrateJobResponse.java | b5597358658a7cc91ba94a862383f20b82423479 | [
"Apache-2.0"
] | permissive | CoolLittle/tencentcloud-sdk-java | 20cf19d0648edda1a92d90e55b023a7c9774ffd4 | 9ed1f3da70a1e01df441ec23ca56973dc8c7f634 | refs/heads/master | 2020-03-25T20:36:42.081853 | 2018-08-06T03:11:32 | 2018-08-06T03:11:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,356 | java | package com.tencentcloudapi.dts.v20180330.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class CompleteMigrateJobResponse extends AbstractModel{
/**
* 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
*/
@SerializedName("RequestId")
@Expose
private String RequestId;
/**
* 获取唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
* @return RequestId 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
*/
public String getRequestId() {
return this.RequestId;
}
/**
* 设置唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
* @param RequestId 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
*/
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
/**
* 内部实现,用户禁止调用
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
| [
"tencentcloudapi@tencent.com"
] | tencentcloudapi@tencent.com |
b5fa3c444ad1b6f4f70589320f89ecdffb3132b3 | d8fa20ee1f009ee250049a65b71b9603bc7ce31f | /src/main/java/com/brandon3055/draconicevolution/client/model/tool/BowModelOverrideList.java | 4b2085121fd564347d97366fcc7edc1287922684 | [
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | OHQSaucey/Draconic-Evolution | 2de5ef21d70645b793862189a7e979e77dacae8a | fd2fcedd4378cf489fd15bab9669c9233cc86a6f | refs/heads/master | 2021-01-25T00:56:24.886963 | 2017-06-10T04:14:11 | 2017-06-10T04:14:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,572 | java | package com.brandon3055.draconicevolution.client.model.tool;
import codechicken.lib.model.loader.CCBakedModelLoader;
import codechicken.lib.util.ItemNBTUtils;
import com.brandon3055.draconicevolution.handlers.BowHandler;
import com.google.common.collect.ImmutableList;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ItemOverride;
import net.minecraft.client.renderer.block.model.ItemOverrideList;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
/**
* Created by brandon3055 on 28/07/2016.
*/
public class BowModelOverrideList extends ItemOverrideList {
public BowModelOverrideList() {
super(ImmutableList.<ItemOverride>of());
}
@Override
public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity) {
ItemStack copy = stack.copy();
if (entity instanceof EntityPlayer && entity.getActiveItemStack() == stack && entity.getItemInUseMaxCount() > 0) {
BowHandler.BowProperties bowProperties = new BowHandler.BowProperties(copy, (EntityPlayer) entity);
ItemNBTUtils.setInteger(copy, "DrawStage", (int)Math.min(((double)entity.getItemInUseMaxCount() / bowProperties.getDrawTicks() * 3D), 3));
}
IBakedModel model = CCBakedModelLoader.getModel(copy);
if (model == null) {
return originalModel;
}
return model;
}
}
| [
"brandon4261@gmail.com"
] | brandon4261@gmail.com |
1d261ec480ed85e4284615fc0a136a508d8c405a | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /single-large-project/src/main/java/org/gradle/test/performancenull_332/Productionnull_33107.java | eb2ffa1262cdb2033d048200b45ff6c6297fef93 | [] | 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 | 588 | java | package org.gradle.test.performancenull_332;
public class Productionnull_33107 {
private final String property;
public Productionnull_33107(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
56f93a441abfe7a5201fe41094a3333363f664ad | 0506a31f60a64df4740479f96d2cfb646335b4a4 | /work-common-utils/src/main/java/cn/chenyilei/work/commonutils/MapUtils.java | 2659e02cbe05f1d84f2adabcc0ec326198080112 | [
"Apache-2.0"
] | permissive | ChenYilei2016/WorkingTraining | b311720ceb09e4fe6fc010b5f17515d404ccabbb | 7d864e7f90e9d18b913e7ee5c50d5caa880e2863 | refs/heads/master | 2022-06-23T10:22:05.190660 | 2019-11-02T12:29:20 | 2019-11-02T12:29:20 | 206,450,439 | 0 | 0 | Apache-2.0 | 2022-06-21T01:52:31 | 2019-09-05T01:42:52 | Java | UTF-8 | Java | false | false | 886 | java | package cn.chenyilei.work.commonutils;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 注释
*
* @author chenyilei
* @email 705029004@qq.com
* @date 2019/09/26 14:49
*/
public class MapUtils {
public static <K,V> Map<K,V> toMap(List<K> keyList, List<V> valueList){
System.err.println(keyList);
System.err.println(valueList);
if(null == keyList || valueList == null){
throw new NullPointerException("MapUtils toMap 参数错误,不能为null!");
}
if(keyList.size() != valueList.size()){
throw new RuntimeException("MapUtils toMap 参数错误,数量不相等!");
}
Map map = new HashMap();
for (int i = 0; i < keyList.size(); i++) {
map.put(keyList.get(i),valueList.get(i));
}
return map;
}
}
| [
"705029004@qq.com"
] | 705029004@qq.com |
79c901fc6f5a9a971399edee30f313027bf2c3d7 | d04f1e1d63ca803ef90a757e6c029f4fc0e1d217 | /src/cn/edu/buaa/act/service4all/core/samanager/app/undeployment/AppUndeploymentFeedbackBusinessUnit.java | fd5fde4d30b4873091e8e0908ed4bed00d8ebf5b | [] | no_license | winstone/Service4All | e7c08286c3704892798f91eb70a8247b20748856 | a190a95a2599e75ae533699c62c494923f6660ac | refs/heads/master | 2021-01-01T17:28:09.499684 | 2014-08-04T07:59:58 | 2014-08-04T07:59:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,644 | java | /*
*
* Service4All: A Service-oriented Cloud Platform for All about Software Development
* Copyright (C) Institute of Advanced Computing Technology, Beihang University
* Contact: service4all@act.buaa.edu.cn
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
*/
package cn.edu.buaa.act.service4all.core.samanager.app.undeployment;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import cn.edu.buaa.act.service4all.core.component.messaging.ExchangeContext;
import cn.edu.buaa.act.service4all.core.component.transaction.exception.MessageExchangeInvocationException;
import cn.edu.buaa.act.service4all.core.samanager.SAManagerBusinessUnit;
import cn.edu.buaa.act.service4all.core.samanager.exception.AppException;
import cn.edu.buaa.act.service4all.core.samanager.listener.AppListener;
import cn.edu.buaa.act.service4all.core.samanager.listener.AppUndeploymentEvent;
public class AppUndeploymentFeedbackBusinessUnit extends SAManagerBusinessUnit {
private final Log logger = LogFactory
.getLog( AppUndeploymentFeedbackBusinessUnit.class );
protected final static String SERVICE_ID = "serviceID";
protected final static String TYPE = "queryType";
protected final static String SERVICE_NAME = "serviceName";
protected final static String UNDEPLOY_RESULTS = "undeployResults";
protected final static String IS_SUCCE = "isSuccessful";
// protected final static String DEPLOYED_REPS = "deployedRepetitions";
// protected final static String SERVICE_NAME = "serviceName";
@Override
public void dispatch( ExchangeContext context ) {
AppUndeploymentEvent event = createAppUndeploymentEvent( context );
List<AppListener> listeners = this.getAppListeners();
for (AppListener l : listeners) {
try {
l.undeployAppFeedback( event );
} catch (AppException e) {
logger.error(
"Failed to update the deployment result: "
+ e.getMessage(), e );
try {
this.getReceiver().sendResponseMessage( context );
} catch (MessageExchangeInvocationException e1) {
this.handleInvocationException( e1 );
}
}
}
// send the message
sendResponse( event, context );
}
protected void sendResponse( AppUndeploymentEvent event,
ExchangeContext context ) {
// String serviceName = (String)event.getTargetServiceName();
// List<AppRepetition> reps =
// (List<AppRepetition>)event.getDeployedRepetitions();
//
// context.storeData(SERVICE_NAME, serviceName);
// context.storeData(DEPLOYED_REPS, reps);
doSend( context );
}
protected void doSend( ExchangeContext context ) {
try {
getReceiver().sendResponseMessage( context );
} catch (MessageExchangeInvocationException e) {
this.handleInvocationException( e );
}
}
protected AppUndeploymentEvent createAppUndeploymentEvent(
ExchangeContext context ) {
AppUndeploymentEvent event = new AppUndeploymentEvent();
// context.storeData(AppUndeploymentFeedbackBusinessUnit.SERVICE_ID,
// serviceID);
// context.storeData(AppUndeploymentFeedbackBusinessUnit.SERVICE_NAME,
// name);
// context.storeData(AppUndeploymentFeedbackBusinessUnit.UNDEPLOY_RESULTS,
// undeployedmaps);
// context.storeData(AppUndeploymentFeedbackBusinessUnit.TYPE,
// deployType);
// context.storeData(AppUndeploymentFeedbackBusinessUnit.IS_SUCCE,
// String.valueOf(isSuccessful));
String serviceId = (String) context.getData( SERVICE_ID );
String serviceName = (String) context.getData( SERVICE_NAME );
boolean isSuccessful = Boolean.valueOf( (String) context
.getData( IS_SUCCE ) );
@SuppressWarnings("unchecked")
List<String> undeployResults = (List<String>) context
.getData( UNDEPLOY_RESULTS );
event.setSuccessful( isSuccessful );
event.setTargetServiceID( serviceId );
event.setUndeployedResults( undeployResults );
event.setTargetServiceName( serviceName );
return event;
}
@Override
public void onReceiveResponse( ExchangeContext context ) {
}
}
| [
"yzdxtyatbj@sina.cn"
] | yzdxtyatbj@sina.cn |
b5353f338ac7ae307bcc4133a5d36ceb2ac301e0 | b11248eb8d38355e10861c6c19750c55b4530e38 | /src/main/java/hu/akarnokd/rxjava2/joins/Pattern1.java | d197edab3c8d4017664b599f4518ae4705bf9114 | [
"Apache-2.0"
] | permissive | tomdotbradshaw/RxJava2Extensions | 2d50d14aff39a1ddb4fe6a32352aebecc4e8d68d | 254fead58021bb8304aa1c343cc776e7b5a3168d | refs/heads/master | 2020-04-06T16:48:30.122024 | 2018-11-15T03:29:15 | 2018-11-15T03:30:42 | 157,635,134 | 0 | 0 | Apache-2.0 | 2018-11-15T01:36:50 | 2018-11-15T01:36:50 | null | UTF-8 | Java | false | false | 1,649 | java | /*
* Copyright 2016-2018 David Karnok
*
* 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 hu.akarnokd.rxjava2.joins;
import io.reactivex.Observable;
import io.reactivex.functions.Function;
/**
* Represents a join pattern over Observable sequences.
* @param <T1> the first value type
*/
public final class Pattern1<T1> {
private final Observable<T1> o1;
public Pattern1(Observable<T1> o1) {
this.o1 = o1;
}
Observable<T1> o1() {
return o1;
}
/**
* Matches when all observable sequences have an available
* element and projects the elements by invoking the selector function.
*
* @param <R> the result type
* @param selector
* the function that will be invoked for elements in the source sequences.
* @return the plan for the matching
* @throws NullPointerException
* if selector is null
*/
public <R> Plan<R> then(Function<? super T1, ? extends R> selector) {
if (selector == null) {
throw new NullPointerException();
}
return new Plan1<T1, R>(this, selector);
}
}
| [
"akarnokd@gmail.com"
] | akarnokd@gmail.com |
a05be3a759ccec0d823b7c36761ae47ac3f0f8a1 | a251aed53871b298acd436dd023504d28f2bbe16 | /chapter19/src/main/java/com/smart/oxm/xmlbeans/XmlbeansSample.java | a8b2ac7569dbb8abbd6fa72dc945345db9c7f935 | [] | no_license | landy8530/masterspring | 266f3a55dc8cdbe846d4f398c37cba63ad87a097 | 1298080a6621f6b2192c4e13d5255c5fb0e985ae | refs/heads/master | 2021-08-24T15:55:50.890900 | 2017-12-10T09:46:30 | 2017-12-10T09:46:30 | 113,738,741 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,751 | java | package com.smart.oxm.xmlbeans;
import java.io.File;
import java.util.Calendar;
import com.smart.oxm.xmlbeans.UserType.Logs;
public class XmlbeansSample {
/**
* JAVA对象转化为XML
*/
public static void objectToXml()throws Exception{
try {
//通过UsersDocument工厂类创建实例
UsersDocument doc = UsersDocument.Factory.newInstance();
//创建一个新用户
UserType user = doc.addNewUsers().addNewUser();
user.setUserName("xmlbeans");
Logs logs =user.addNewLogs();
LogType log1 = logs.addNewLoginLog();
log1.setIp("192.168.1.91");
log1.setLoginDate(Calendar.getInstance());
LogType log2 = logs.addNewLoginLog();
log2.setIp("192.168.1.92");
log2.setLoginDate(Calendar.getInstance());
LogType log3 = logs.addNewLoginLog();
log3.setIp("192.168.1.93");
log3.setLoginDate(Calendar.getInstance());
File file = new File("XmlbeansSample.xml");
doc.save(file);
} catch (Exception ex) {
ex.printStackTrace();
}
}
/**
* XML转化为JAVA对象
*/
public static UserType[] xmlToObject()throws Exception{
try {
File xmlFile = new File("XmlbeansSample.xml");
UsersDocument doc = UsersDocument.Factory.parse(xmlFile);
UserType[] users = doc.getUsers().getUserArray();
for (int i = 0; i < users.length; i++) {
UserType user = users[i];
Logs userlog = user.getLogs();
LogType[] logs = userlog.getLoginLogArray();
for(LogType log : logs){
System.out.println("访问IP:" + log.getIp());
System.out.println("访问时间:" + log.getLoginDate());
}
}
return users;
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
public static void main(String[] args)throws Exception {
objectToXml();
xmlToObject();
}
}
| [
"landy8530@hotmail.com"
] | landy8530@hotmail.com |
daad1a08abc3fb61846deb1bd9cec4fccb9615de | e1ed5f410bba8c05310b6a7dabe65b7ef62a9322 | /src/main/java/com/sda/javabyd3/migr/designpattern/adapter/BaseAdapter.java | e5f46c78780488ef05af3b6f6e8f9600af09c12c | [] | no_license | pmkiedrowicz/javabyd3 | 252f70e70f0fc71e8ef9019fdd8cea5bd05ca90b | 7ff8e93c041f27383b3ad31b43f014c059ef53e3 | refs/heads/master | 2022-01-01T08:56:08.747392 | 2019-07-26T19:02:50 | 2019-07-26T19:02:50 | 199,065,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 186 | java | package com.sda.javabyd3.migr.designpattern.adapter;
public abstract class BaseAdapter {
protected String msg = "Prosze o rezerwacje stolika w dniu %s na %s osob na nazwisko %s";
}
| [
"pmkiedrowicz@gmail.com"
] | pmkiedrowicz@gmail.com |
4cf1a4ecc17489b731a88b76212ad4ef5d122a20 | 5372d2c6e52dd51ca7ab557988e4ad372d45252e | /08-SpringBootMongoRestApi/src/main/java/com/aman/springboot/rest/api/repository/EmployeeRepository.java | dab48fbdda6f53529706d22adcf90cd3561c70b9 | [
"MIT"
] | permissive | ravikumar99/Sample | 676e54e08b714ede0d8c3ddeef4abf71388cb083 | 9538b9215e9e328df418086f607f04709f1e3814 | refs/heads/master | 2020-03-31T02:12:00.264992 | 2018-10-05T07:39:37 | 2018-10-05T07:39:37 | 151,812,667 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 358 | java | package com.aman.springboot.rest.api.repository;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;
import com.aman.springboot.rest.api.bean.EmployeeBean;
/**
* @author aman.verma
*
*/
@Repository
public interface EmployeeRepository extends MongoRepository<EmployeeBean, String> {
}
| [
"aman.verma@sysbiz.org"
] | aman.verma@sysbiz.org |
2236e1a0d99c2f2856ca0d736e11fa19ddebc134 | d3a3f32b6e0bd2eeb3e19fc104ed8f1717ede1f6 | /src/concurrency/CountDownLatchDemo.java | e75eba3907961171dd33489c142c2d810dc23799 | [] | no_license | Cowerling/ThinkingInJava | 2ead12fc1845cc2ae594cb9a0a0985af8846fc72 | f8e12948b62772f79a20592170c34db5eff538e5 | refs/heads/master | 2021-01-10T17:59:14.899381 | 2016-04-28T15:28:36 | 2016-04-28T15:28:36 | 47,770,416 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,032 | java | package concurrency;
import java.util.concurrent.*;
import java.util.*;
/**
* Created by dell on 2016/4/12.
*/
class TaskPortion implements Runnable {
private static int counter = 0;
private final int id = counter++;
private static Random random = new Random(47);
private final CountDownLatch countDownLatch;
TaskPortion(CountDownLatch countDownLatch) {
this.countDownLatch = countDownLatch;
}
public void run() {
try {
doWork();
countDownLatch.countDown();
} catch (InterruptedException e) {
}
}
public void doWork() throws InterruptedException {
TimeUnit.MILLISECONDS.sleep(2000);
System.out.println(this + "completed");
}
public String toString() {
return String.format("%1$-3d ", id);
}
}
class WaitingTask implements Runnable {
private static int counter = 0;
private final int id = counter++;
private final CountDownLatch countDownLatch;
WaitingTask(CountDownLatch countDownLatch) {
this.countDownLatch = countDownLatch;
}
public void run() {
try {
countDownLatch.await();
System.out.println("Latch barrier passed for " + this);
} catch (InterruptedException e) {
System.out.println(this + " interrupted");
}
}
public String toString() {
return String.format("WaitingTask %1$-3d ", id);
}
}
public class CountDownLatchDemo {
static final int SIZE = 100;
public static void main(String[] args) throws Exception {
ExecutorService executorService = Executors.newCachedThreadPool();
CountDownLatch countDownLatch = new CountDownLatch(SIZE);
for(int i = 0; i < 10; i++)
executorService.execute(new WaitingTask(countDownLatch));
for(int i = 0; i < SIZE; i++)
executorService.execute(new TaskPortion(countDownLatch));
System.out.println("Launched all tasks");
executorService.shutdown();
}
}
| [
"Cowerling@gmail.com"
] | Cowerling@gmail.com |
49794437c753ad6c875ac05d44cc4cbc4753ad59 | 448396ee748a9c40aeeff4895ce0c0563a7b2ab4 | /bboxdb-server/src/main/java/org/bboxdb/distribution/partitioner/SpacePartitionerContext.java | 5c31a3cf21bb1cc8185d8c212d809e0bfc127d03 | [
"CC-BY-SA-2.0",
"Apache-2.0"
] | permissive | jnidzwetzki/bboxdb | f5fe59678136fb2faccaec35f1fd9d9ec37e4a86 | 47d3da97e605cb2b8f6fb4a004596b458a024da2 | refs/heads/master | 2023-09-06T03:00:48.554009 | 2023-08-09T18:34:04 | 2023-08-09T18:34:04 | 45,732,002 | 52 | 10 | Apache-2.0 | 2023-09-08T04:30:48 | 2015-11-07T10:28:59 | Java | UTF-8 | Java | false | false | 2,524 | java | /*******************************************************************************
*
* Copyright (C) 2015-2022 the BBoxDB project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*******************************************************************************/
package org.bboxdb.distribution.partitioner;
import java.util.Objects;
import java.util.Set;
import org.bboxdb.distribution.region.DistributionRegionCallback;
import org.bboxdb.distribution.region.DistributionRegionIdMapper;
import org.bboxdb.distribution.zookeeper.ZookeeperClient;
public class SpacePartitionerContext {
/**
* The space partitioner configuration
*/
private String spacePartitionerConfig;
/**
* The distribution group name
*/
private String distributionGroupName;
/**
* The zookeeper client
*/
private ZookeeperClient zookeeperClient;
/**
* The callbacks
*/
private Set<DistributionRegionCallback> callback;
/**
* The mapper
*/
private DistributionRegionIdMapper mapper;
public SpacePartitionerContext(final String spacePartitionerConfig, final String distributionGroupName,
final ZookeeperClient zookeeperClient, final Set<DistributionRegionCallback> callback,
final DistributionRegionIdMapper mapper) {
this.spacePartitionerConfig = Objects.requireNonNull(spacePartitionerConfig);
this.distributionGroupName = Objects.requireNonNull(distributionGroupName);
this.zookeeperClient = Objects.requireNonNull(zookeeperClient);
this.callback = Objects.requireNonNull(callback);
this.mapper = Objects.requireNonNull(mapper);
}
public String getSpacePartitionerConfig() {
return spacePartitionerConfig;
}
public String getDistributionGroupName() {
return distributionGroupName;
}
public ZookeeperClient getZookeeperClient() {
return zookeeperClient;
}
public Set<DistributionRegionCallback> getCallbacks() {
return callback;
}
public DistributionRegionIdMapper getDistributionRegionMapper() {
return mapper;
}
} | [
"jnidzwetzki@gmx.de"
] | jnidzwetzki@gmx.de |
970c5a019482d945a28ee33dce5ec3e970e0e392 | 2f4a058ab684068be5af77fea0bf07665b675ac0 | /app/com/facebook/katana/platform/TokenRefreshService.java | 4cbd3c6091eb5bf7ee887040f0145ae59b9df109 | [] | no_license | cengizgoren/facebook_apk_crack | ee812a57c746df3c28fb1f9263ae77190f08d8d2 | a112d30542b9f0bfcf17de0b3a09c6e6cfe1273b | refs/heads/master | 2021-05-26T14:44:04.092474 | 2013-01-16T08:39:00 | 2013-01-16T08:39:00 | 8,321,708 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,026 | java | package com.facebook.katana.platform;
import android.app.Service;
import android.content.Intent;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import com.facebook.katana.Constants.URL;
import com.facebook.katana.binding.AppSession;
import com.facebook.katana.model.FacebookSessionInfo;
import com.facebook.katana.net.HttpOperation;
import com.facebook.katana.net.HttpOperation.Method;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.message.BasicNameValuePair;
public class TokenRefreshService extends Service
{
final Messenger a = new Messenger(new TokenRefreshService.1(this));
private URI a(String paramString)
{
ArrayList localArrayList = new ArrayList();
AppSession localAppSession = AppSession.b(this, true);
URI localURI = null;
if (localAppSession == null);
while (true)
{
return localURI;
String str = localAppSession.b().oAuthToken;
localURI = null;
if (str == null)
continue;
localArrayList.add(new BasicNameValuePair("access_token", paramString));
localArrayList.add(new BasicNameValuePair("fb_access_token", str));
localArrayList.add(new BasicNameValuePair("format", "json"));
localURI = new URI(Constants.URL.f(this) + "?" + URLEncodedUtils.format(localArrayList, "UTF-8"));
}
}
private void a(Message paramMessage)
{
String str = paramMessage.getData().getString("access_token");
if (str == null)
a(paramMessage, "access_token parameter not found.");
while (true)
{
return;
try
{
URI localURI = a(str);
if (localURI == null)
continue;
new HttpOperation(getApplicationContext(), HttpOperation.Method.GET, localURI.toString(), new TokenRefreshService.TokenRefreshOperationListener(this, paramMessage), false).b();
}
catch (URISyntaxException localURISyntaxException)
{
a(paramMessage, "internal error (invalid parameters?)");
}
}
}
private void a(Message paramMessage, Bundle paramBundle)
{
Message localMessage = Message.obtain();
localMessage.setData(paramBundle);
try
{
paramMessage.replyTo.send(localMessage);
return;
}
catch (RemoteException localRemoteException)
{
while (true)
localRemoteException.printStackTrace();
}
}
private void a(Message paramMessage, String paramString)
{
Bundle localBundle = new Bundle();
localBundle.putString("error", paramString);
a(paramMessage, localBundle);
}
public IBinder onBind(Intent paramIntent)
{
return this.a.getBinder();
}
}
/* Location: /data1/software/jd-gui/com.facebook.katana_2.0_liqucn.com-dex2jar.jar
* Qualified Name: com.facebook.katana.platform.TokenRefreshService
* JD-Core Version: 0.6.0
*/ | [
"macluz@msn.com"
] | macluz@msn.com |
3d31f7816ea41310a9ba14c649cbdb12d1fb9597 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /src/irvine/oeis/a028/A028470.java | a7ff00b2121b6b82b772f95892afc29b5c320b78 | [] | 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 | 569 | java | package irvine.oeis.a028;
// Generated by gen_pattern.pl - DO NOT EDIT here!
import irvine.oeis.GeneratingFunctionSequence;
/**
* A028470 Number of perfect matchings in graph <code>P_{8} X P_{n}</code>.
* @author Georg Fischer
*/
public class A028470 extends GeneratingFunctionSequence {
/** Construct the sequence. */
public A028470() {
super(1, new long[] {1, 0, -43, -26, 360, 110, -1033, 0, 1033, -110, -360, 26, 43,
0, -1},
new long[] {1, -1, -76, -69, 921, 584, -4019, -829, 7012, -829, -4019, 584,
921, -69, -76, -1, 1});
}
}
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
1d9311a75d83503dfefd6fecb592edc61d5b6fef | f6b90fae50ea0cd37c457994efadbd5560a5d663 | /android/nut-dex2jar.src/com/nut/blehunter/rxApi/l.java | d312cd747b69d9d71116d1d6d8552a89b7268244 | [] | no_license | dykdykdyk/decompileTools | 5925ae91f588fefa7c703925e4629c782174cd68 | 4de5c1a23f931008fa82b85046f733c1439f06cf | refs/heads/master | 2020-01-27T09:56:48.099821 | 2016-09-14T02:47:11 | 2016-09-14T02:47:11 | 66,894,502 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 328 | java | package com.nut.blehunter.rxApi;
import okhttp3.bb;
import retrofit2.Converter;
final class l
implements Converter<bb, String>
{
l(j paramj)
{
}
}
/* Location: C:\crazyd\work\ustone\odm2016031702\baidu\android\nut-dex2jar.jar
* Qualified Name: com.nut.blehunter.rxApi.l
* JD-Core Version: 0.6.2
*/ | [
"819468107@qq.com"
] | 819468107@qq.com |
48e7b4786e3c1b7d28a18861c87b3acd4164ea7f | b1f5e5160f64c0c158692a5da95b1ab10088fd37 | /chapter_01_04/src/main/java/ch3/annotated/Singer.java | de7ce192254d7ecb213e330a0bf39201450d301d | [] | no_license | antey1988/SpringLearn | 6e480e2639aa10dbc7f7ced23e5ce19e0f80dad1 | 442433e876bcd6d6f1ac7d10e3a460408f1adb87 | refs/heads/master | 2023-03-13T18:05:59.944291 | 2021-03-07T13:16:49 | 2021-03-07T13:17:29 | 312,569,842 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 447 | java | package ch3.annotated;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@Component("singer")
@Scope("prototype")
public class Singer {
private String name = "unknow";
public Singer(@Value("John Mayer") String name) {
this.name = name;
}
@Override
public String toString() {
return name;
}
}
| [
"antey1988@gmail.com"
] | antey1988@gmail.com |
c1ec6e5cbfae050fa9badac4136611a83fa2bd7a | 64b47f83d313af33804b946d0613760b8ff23840 | /tags/dev-3-3-3/weka/filters/unsupervised/attribute/TimeSeriesTranslate.java | 7b80526ff6c81d32cb4e5546267426df5622a292 | [] | no_license | hackerastra/weka | afde1c7ab0fbf374e6d6ac6d07220bfaffb9488c | c8366c454e9718d0e1634ddf4a72319dac3ce559 | refs/heads/master | 2021-05-28T08:25:33.811203 | 2015-01-22T03:12:18 | 2015-01-22T03:12:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,676 | java | /*
* 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 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, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* TimeSeriesTranslate.java
* Copyright (C) 1999 Len Trigg
*
*/
package weka.filters.unsupervised.attribute;
import weka.filters.*;
import java.io.*;
import java.util.*;
import weka.core.*;
/**
* An instance filter that assumes instances form time-series data and
* replaces attribute values in the current instance with the equivalent
* attribute attribute values of some previous (or future) instance. For
* instances where the desired value is unknown either the instance may
* be dropped, or missing values used.<p>
*
* Valid filter-specific options are:<p>
*
* -R index1,index2-index4,...<br>
* Specify list of columns to calculate new values for.
* First and last are valid indexes.
* (default none)<p>
*
* -V <br>
* Invert matching sense (i.e. calculate for all non-specified columns)<p>
*
* -I num <br>
* The number of instances forward to translate values between.
* A negative number indicates taking values from a past instance.
* (default -1) <p>
*
* -M <br>
* For instances at the beginning or end of the dataset where the translated
* values are not known, use missing values (default is to remove those
* instances). <p>
*
* @author Len Trigg (trigg@cs.waikato.ac.nz)
* @version $Revision: 1.1 $
*/
public class TimeSeriesTranslate extends AbstractTimeSeries {
/**
* Sets the format of the input instances.
*
* @param instanceInfo an Instances object containing the input instance
* structure (any instances contained in the object are ignored - only the
* structure is required).
* @return true if the outputFormat may be collected immediately
* @exception UnsupportedAttributeTypeException if selected
* attributes are not numeric or nominal.
*/
public boolean setInputFormat(Instances instanceInfo) throws Exception {
super.setInputFormat(instanceInfo);
// Create the output buffer
Instances outputFormat = new Instances(instanceInfo, 0);
for(int i = 0; i < instanceInfo.numAttributes(); i++) {
if (m_SelectedCols.isInRange(i)) {
if (outputFormat.attribute(i).isNominal()
|| outputFormat.attribute(i).isNumeric()) {
outputFormat.renameAttribute(i, outputFormat.attribute(i).name()
+ (m_InstanceRange < 0 ? '-' : '+')
+ Math.abs(m_InstanceRange));
} else {
throw new UnsupportedAttributeTypeException("Only numeric and nominal attributes may be "
+ " manipulated in time series.");
}
}
}
setOutputFormat(outputFormat);
return true;
}
/**
* Creates a new instance the same as one instance (the "destination")
* but with some attribute values copied from another instance
* (the "source")
*
* @param source the source instance
* @param dest the destination instance
* @return the new merged instance
*/
protected Instance mergeInstances(Instance source, Instance dest) {
Instances outputFormat = outputFormatPeek();
double[] vals = new double[outputFormat.numAttributes()];
for(int i = 0; i < vals.length; i++) {
if (m_SelectedCols.isInRange(i)) {
if (source != null) {
vals[i] = source.value(i);
}
} else {
vals[i] = dest.value(i);
}
}
Instance inst = null;
if (dest instanceof SparseInstance) {
inst = new SparseInstance(dest.weight(), vals);
} else {
inst = new Instance(dest.weight(), vals);
}
inst.setDataset(dest.dataset());
return inst;
}
/**
* Main method for testing this class.
*
* @param argv should contain arguments to the filter: use -h for help
*/
public static void main(String [] argv) {
try {
if (Utils.getFlag('b', argv)) {
Filter.batchFilterFile(new TimeSeriesTranslate(), argv);
} else {
Filter.filterFile(new TimeSeriesTranslate(), argv);
}
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
}
}
| [
"(no author)@e0a1b77d-ad91-4216-81b1-defd5f83fa92"
] | (no author)@e0a1b77d-ad91-4216-81b1-defd5f83fa92 |
cf72cdcc29af1534a3af12677a7683f94c664b48 | 36073e09d6a12a275cc85901317159e7fffa909e | /bborbe_java/modifiedFiles/18/fix/TaskContextComparator.java | 59a2fe237da195d408c5c5b2797e992ebc8613b3 | [] | no_license | monperrus/bug-fixes-saner16 | a867810451ddf45e2aaea7734d6d0c25db12904f | 9ce6e057763db3ed048561e954f7aedec43d4f1a | refs/heads/master | 2020-03-28T16:00:18.017068 | 2018-11-14T13:48:57 | 2018-11-14T13:48:57 | 148,648,848 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 356 | java | package de.benjaminborbe.task.gui.util;
import de.benjaminborbe.task.api.TaskContext;
import de.benjaminborbe.tools.util.ComparatorBase;
public class TaskContextComparator extends ComparatorBase<TaskContext, String> {
@Override
public String getValue(final TaskContext o) {
return o.getName() != null ? o.getName().toLowerCase() : o.getName();
}
}
| [
"martin.monperrus@gnieh.org"
] | martin.monperrus@gnieh.org |
5c976045ebccd36c2395cfaa1c4692cd13d43195 | 689cdf772da9f871beee7099ab21cd244005bfb2 | /classes/com/android/dazhihui/ui/screen/stock/offlinecapital/m.java | 550c7755261fdfb04702b3f7312b495e62054c3d | [] | no_license | waterwitness/dazhihui | 9353fd5e22821cb5026921ce22d02ca53af381dc | ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3 | refs/heads/master | 2020-05-29T08:54:50.751842 | 2016-10-08T08:09:46 | 2016-10-08T08:09:46 | 70,314,359 | 2 | 4 | null | null | null | null | UTF-8 | Java | false | false | 549 | java | package com.android.dazhihui.ui.screen.stock.offlinecapital;
import android.widget.TableLayout;
import android.widget.TextView;
class m
{
TableLayout a;
TextView b;
TextView c;
TextView d;
TextView e;
TextView f;
TextView g;
TextView h;
TextView i;
private m(OfflineCapitalDetailActivity paramOfflineCapitalDetailActivity) {}
}
/* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\android\dazhihui\ui\screen\stock\offlinecapital\m.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"1776098770@qq.com"
] | 1776098770@qq.com |
420915af3f0bd6646fc793fc53a870d3c7eea5c5 | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-ws/results/MATH-103b-3-15-Single_Objective_GGA-WeightedSum/org/apache/commons/math/distribution/NormalDistributionImpl_ESTest.java | a85ccaf08ffc3ab3713b4463cb6bc0b0c84f8295 | [
"MIT",
"CC-BY-4.0"
] | permissive | STAMP-project/Botsing-basic-block-coverage-application | 6c1095c6be945adc0be2b63bbec44f0014972793 | 80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da | refs/heads/master | 2022-07-28T23:05:55.253779 | 2022-04-20T13:54:11 | 2022-04-20T13:54:11 | 285,771,370 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 587 | java | /*
* This file was automatically generated by EvoSuite
* Tue Mar 31 10:22:24 UTC 2020
*/
package org.apache.commons.math.distribution;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class NormalDistributionImpl_ESTest extends NormalDistributionImpl_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
ee85a5ee3dd49a87bbb379086c8f1abbc0ec68a1 | eb4c4fd08e8011251b73904b938c6396aba0db39 | /ieanalysis/src/main/java/com/huishu/ieanalysis/mysql/service/impl/KingBaseDgapServiceImpl.java | de198ece6393964ff85988140073feb581561cab | [] | no_license | tianguantang/Java | 74ba775334a8f2096d3df1da92b0ac1b3df4e361 | 891286e9f14e86fd575bce3582004a3f81a2c304 | refs/heads/master | 2020-03-20T01:12:37.712486 | 2018-06-09T03:53:44 | 2018-06-09T03:53:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 811 | java | package com.huishu.ieanalysis.mysql.service.impl;
import com.huishu.ieanalysis.mysql.entity.KingBaseDgap;
import com.huishu.ieanalysis.mysql.resposity.KingBaseDgapRepository;
import com.huishu.ieanalysis.mysql.service.KingBaseDgapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author wangjianchun
*/
@Service
public class KingBaseDgapServiceImpl implements KingBaseDgapService {
@Autowired
private KingBaseDgapRepository kingBaseDgapRepository;
@Override
public synchronized void saveList(List<KingBaseDgap> list) {
kingBaseDgapRepository.save(list);
}
@Override
public synchronized void save(KingBaseDgap dgap) {
kingBaseDgapRepository.save(dgap);
}
}
| [
"214095883@qq.com"
] | 214095883@qq.com |
b78afad73d2774e24274835cacaf6c5e1d891998 | f7b239e5100078db4256af70d91ffcc297ef0cd0 | /connections/mongo/src/main/java/org/keycloak/connections/mongo/api/MongoIndexes.java | 7f0a3f5f9982832c0c47a110a96cd4ec79e1c1f0 | [
"Apache-2.0"
] | permissive | WhiteSourceE/keycloak-unsafe | ec848c459cf10a05f22b0a1a73711db7c6e978b4 | 63f96029f4675f4a0140462995b7b21a44995847 | refs/heads/master | 2023-06-25T22:58:46.262569 | 2021-07-25T11:21:47 | 2021-07-25T11:21:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 513 | java | package org.keycloak.connections.mongo.api;
import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/
@Target({TYPE})
@Documented
@Retention(RUNTIME)
@Inherited
public @interface MongoIndexes {
MongoIndex[] value();
}
| [
"shuki.avraham@whitesourcesoftware.com"
] | shuki.avraham@whitesourcesoftware.com |
3a29ca9b7d78ef12f6fce820185432521a442213 | 3d6e1091400929e563fba143b91d4d16d867991d | /account-service/src/test/java/com/splendid/account/AccountServiceApplicationTests.java | 10fb5f0f7e15959748ddba19c20c7525540a665c | [
"MIT"
] | permissive | mliyz/carnvial-purchase | aa566c0bf41e581b15bcc1ee736ff6e6cbb0682d | 415ab7911aab91bfabd3d902e19947b33e36c6fd | refs/heads/master | 2020-03-23T23:59:24.015169 | 2018-07-25T07:56:37 | 2018-07-25T07:56:37 | 142,267,180 | 8 | 1 | null | null | null | null | UTF-8 | Java | false | false | 784 | java | package com.splendid.account;
import org.jasypt.encryption.StringEncryptor;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@SpringBootTest(classes = AccountServiceApplication.class)
public class AccountServiceApplicationTests {
@Autowired
StringEncryptor encryptor;
@Test
public void contextLoads() {
String result = encryptor.encrypt("root");
System.out.println(result);
}
}
| [
"35205889+mliyz@users.noreply.github.com"
] | 35205889+mliyz@users.noreply.github.com |
7cabdcf86d0db460a4a57bd60c27d08863d51027 | 7c87a85b35e47d4640283d12c40986e7b8a78e6f | /moneyfeed-integration/moneyfeed-integration-api/src/main/java/com/newhope/moneyfeed/integration/api/vo/request/ebs/order/sendRequestToEbs/EbsOrderPayOrChargeReq.java | f2e4d67707826ace95a8a6744df04a4d9f1b1a81 | [] | no_license | newbigTech/moneyfeed | 191b0bd4c98b49fa6be759ed16817b96c6e853b3 | 2bd8bdd10ddfde3f324060f7b762ec3ed6e25667 | refs/heads/master | 2020-04-24T13:05:44.308618 | 2019-01-15T07:59:03 | 2019-01-15T07:59:03 | 171,975,920 | 0 | 3 | null | 2019-02-22T01:53:12 | 2019-02-22T01:53:12 | null | UTF-8 | Java | false | false | 4,321 | java | package com.newhope.moneyfeed.integration.api.vo.request.ebs.order.sendRequestToEbs;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* Created by yuyanlin on 2018/12/18
*/
@XmlRootElement(name = "inv:P_REQUEST_LINE_ITEM")
public class EbsOrderPayOrChargeReq implements Serializable {
private static final long serialVersionUID = 5331357924576004627L;
// 商城订单ID
private String moneyfeedOrderId;
// EBS订单编号
private String ebsOrderNo;
// 币种
private String currency;
// 客户编码
private String customerNo;
// 支付或者充值类型
private String payOrChargeType;
// 支付日期字符串格式(YYYY-MM-DD)
private String payDateString;
// 余额支付金额
private BigDecimal totalBalanceAmount;
// 折扣支付金额
private BigDecimal discountAmount;
// 银行卡支付金额
private BigDecimal totalBankAmount;
// 商城支付号
private String moneyfeedPayNo;
// 银行支付流水号
private String accNo;
// 收款方法,预留字段,后期可能需要
private String collectionMethod;
// EBS需要org_id这个字段
private String orgId;
@XmlElement(name = "inv:VALUE1")
public String getMoneyfeedOrderId() {
return moneyfeedOrderId;
}
public void setMoneyfeedOrderId(String moneyfeedOrderId) {
this.moneyfeedOrderId = moneyfeedOrderId;
}
@XmlElement(name = "inv:VALUE2")
public String getEbsOrderNo() {
return ebsOrderNo;
}
public void setEbsOrderNo(String ebsOrderNo) {
this.ebsOrderNo = ebsOrderNo;
}
@XmlElement(name = "inv:VALUE3")
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
@XmlElement(name = "inv:VALUE4")
public String getCustomerNo() {
return customerNo;
}
public void setCustomerNo(String customerNo) {
this.customerNo = customerNo;
}
@XmlElement(name = "inv:VALUE5")
public String getPayOrChargeType() {
return payOrChargeType;
}
public void setPayOrChargeType(String payOrChargeType) {
this.payOrChargeType = payOrChargeType;
}
@XmlElement(name = "inv:VALUE6")
public String getPayDateString() {
return payDateString;
}
public void setPayDateString(String payDateString) {
this.payDateString = payDateString;
}
@XmlElement(name = "inv:VALUE7")
public BigDecimal getTotalBalanceAmount() {
return totalBalanceAmount;
}
public void setTotalBalanceAmount(BigDecimal totalBalanceAmount) {
this.totalBalanceAmount = totalBalanceAmount;
}
@XmlElement(name = "inv:VALUE8")
public BigDecimal getDiscountAmount() {
return discountAmount;
}
public void setDiscountAmount(BigDecimal discountAmount) {
this.discountAmount = discountAmount;
}
@XmlElement(name = "inv:VALUE9")
public BigDecimal getTotalBankAmount() {
return totalBankAmount;
}
public void setTotalBankAmount(BigDecimal totalBankAmount) {
this.totalBankAmount = totalBankAmount;
}
@XmlElement(name = "inv:VALUE10")
public String getMoneyfeedPayNo() {
return moneyfeedPayNo;
}
public void setMoneyfeedPayNo(String moneyfeedPayNo) {
this.moneyfeedPayNo = moneyfeedPayNo;
}
@XmlElement(name = "inv:VALUE11")
public String getAccNo() {
return accNo;
}
public void setAccNo(String accNo) {
this.accNo = accNo;
}
@XmlElement(name = "inv:VALUE12")
public String getCollectionMethod() {
return collectionMethod;
}
public void setCollectionMethod(String collectionMethod) {
this.collectionMethod = collectionMethod;
}
@XmlElement(name = "inv:VALUE13")
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
}
| [
"505235893@qq.com"
] | 505235893@qq.com |
678b27791de3884ee1bf26349e976807a79b3de5 | a33aac97878b2cb15677be26e308cbc46e2862d2 | /data/libgdx/btGeneric6DofSpringConstraintData_getSpringEnabled.java | cdcdfdc04d6ab557554ffb697a62b763d517f9eb | [] | 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 | 128 | java | public int[] getSpringEnabled() {
return DynamicsJNI.btGeneric6DofSpringConstraintData_springEnabled_get(swigCPtr, this);
}
| [
"bdqnghi@gmail.com"
] | bdqnghi@gmail.com |
97ab751dac3c553a3f6481366889eff6a0422f04 | f40963db754f4c3bb6e838cc0d6f45edf329c0ae | /s2struts-smartdeploy-example/src/org/seasar/struts/examples/web/CrudType.java | 57eb4d64b82fca699d54f3c7672dde2a7b1315c3 | [] | no_license | seasarorg/s2struts | a48f74c3a4e143fcb98cc37f62d7586afa233ddc | 7a6e90586a193734eeebfd644a12e56e12a1c398 | refs/heads/master | 2021-01-10T19:20:33.380902 | 2016-11-11T03:51:04 | 2016-11-11T03:51:04 | 13,407,289 | 1 | 2 | null | 2016-02-10T04:50:20 | 2013-10-08T08:07:54 | Java | UTF-8 | Java | false | false | 938 | java | /*
* Copyright 2004-2008 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.struts.examples.web;
/**
* @author taedium
*
*/
public class CrudType {
public static final String CREATE = "c";
public static final String READ = "r";
public static final String UPDATE = "u";
public static final String DELETE = "d";
}
| [
"toshihiro.nakamura@gmail.com"
] | toshihiro.nakamura@gmail.com |
f84a814304461b0c0799fa4d75d51f8fd11a1211 | ee46681e5a830796201ad0764ce046a5ea377991 | /vpm/src/main/java/com/adt/vpm/videoplayer/source/common/upstream/DataSourceException.java | 652160c725892831aae0132d22d70662ddf82b42 | [] | no_license | muthurajasoptisol/vpm | 9291d73b6eb6c58efa41ca4bad6adfa4f1d5d662 | 696e2c104d2ae735a47e02c7c6cfb120a24270ac | refs/heads/main | 2023-01-02T03:39:49.532652 | 2020-10-29T07:35:33 | 2020-10-29T07:35:33 | 308,247,905 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,874 | java | /*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.adt.vpm.videoplayer.source.common.upstream;
import androidx.annotation.Nullable;
import java.io.IOException;
/**
* Used to specify reason of a DataSource error.
*/
public final class DataSourceException extends IOException {
/**
* Returns whether the given {@link IOException} was caused by a {@link DataSourceException} whose
* {@link #reason} is {@link #POSITION_OUT_OF_RANGE} in its cause stack.
*/
public static boolean isCausedByPositionOutOfRange(IOException e) {
@Nullable Throwable cause = e;
while (cause != null) {
if (cause instanceof DataSourceException) {
int reason = ((DataSourceException) cause).reason;
if (reason == DataSourceException.POSITION_OUT_OF_RANGE) {
return true;
}
}
cause = cause.getCause();
}
return false;
}
public static final int POSITION_OUT_OF_RANGE = 0;
/**
* The reason of this {@link DataSourceException}. It can only be {@link #POSITION_OUT_OF_RANGE}.
*/
public final int reason;
/**
* Constructs a DataSourceException.
*
* @param reason Reason of the error. It can only be {@link #POSITION_OUT_OF_RANGE}.
*/
public DataSourceException(int reason) {
this.reason = reason;
}
}
| [
"muthuraja.s@optisolbusiness.com"
] | muthuraja.s@optisolbusiness.com |
d667b774ca7b429ed1f650e6b6f93ff024edadef | 60a6a97e33382fd1d19ca74c2c17700122f9d2ff | /nuts/src/uk/dangrew/nuts/persistence/weighins/WeightRecordingParseModel.java | 7eaa1963cf9a6de82aa20e0d5a213c7ba3b3c7f7 | [
"Apache-2.0"
] | permissive | DanGrew/Nuts | 19b946672a00651c1b36b4dc4b99dbedc6c08786 | e0f6835f376dc911c630122c2b21c7130c437bfd | refs/heads/master | 2021-06-03T08:23:02.295355 | 2021-02-10T08:04:59 | 2021-02-10T08:04:59 | 97,559,046 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,044 | java | /*
* ----------------------------------------
* Nutrient Usage Tracking System
* ----------------------------------------
* Produced by Dan Grew
* 2017
* ----------------------------------------
*/
package uk.dangrew.nuts.persistence.weighins;
import uk.dangrew.nuts.progress.weight.WeightRecording;
import uk.dangrew.nuts.store.Database;
/**
* {@link WeightRecordingParseModel} provides the handles for the {@link uk.dangrew.jupa.json.parse.JsonParser} when
* parsing {@link WeightRecording}s.
*/
class WeightRecordingParseModel {
private final Database database;
private String date;
private Double morningWeight;
private Double morningBodyFat;
private Double morningLeanMass;
private Double eveningWeight;
private Double eveningBodyFat;
private Double eveningLeanMass;
/**
* Constructs a new {@link WeightRecordingParseModel}.
* @param database the {@link Database}.
*/
WeightRecordingParseModel( Database database ) {
this.database = database;
}//End Constructor
/**
* Triggered when starting a new {@link WeightRecording}.
* @param key the parsed key.
*/
void startWeighIn( String key ) {
this.date = null;
this.morningWeight = null;
this.morningBodyFat = null;
this.morningLeanMass = null;
this.eveningWeight = null;
this.eveningBodyFat = null;
this.eveningLeanMass = null;
}//End Method
/**
* Triggered when all values of a {@link WeightRecording} have been parsed.
* @param key the parsed key.
*/
void finishWeighIn( String key ) {
WeightRecording recording = database.weightProgress().records().stream()
.filter( r -> r.date().toString().equalsIgnoreCase( date ) )
.findFirst()
.orElse( null );
if ( recording == null ) {
System.out.println( "Cannot find recording for: " + date );
return;
}
recording.morningWeighIn().weight().set( morningWeight );
recording.morningWeighIn().bodyFat().set( morningBodyFat );
recording.morningWeighIn().leanMass().set( morningLeanMass );
recording.eveningWeighIn().weight().set( eveningWeight );
recording.eveningWeighIn().bodyFat().set( eveningBodyFat );
recording.eveningWeighIn().leanMass().set( eveningLeanMass );
}//End Method
/**
* Sets the {@link WeightRecording#date()} for the current {@link WeightRecording}.
* @param key the parsed key.
* @param value the parsed value.
*/
void setDate( String key, String value ) {
this.date = value;
}//End Method
/**
* Sets the {@link WeightRecording#morningWeighIn()} {@link uk.dangrew.nuts.progress.WeighIn#weight()} for the current {@link WeightRecording}.
* @param key the parsed key.
* @param value the parsed value.
*/
void setMorningWeight( String key, Double value ) {
this.morningWeight = extractWrittenValue( value );
}//End Method
/**
* Sets the {@link WeightRecording#morningWeighIn()} {@link uk.dangrew.nuts.progress.WeighIn#bodyFat()} for the current {@link WeightRecording}.
* @param key the parsed key.
* @param value the parsed value.
*/
void setMorningBodyFat( String key, Double value ) {
this.morningBodyFat = extractWrittenValue( value );
}//End Method
/**
* Sets the {@link WeightRecording#morningWeighIn()} {@link uk.dangrew.nuts.progress.WeighIn#leanMass()} for the current {@link WeightRecording}.
* @param key the parsed key.
* @param value the parsed value.
*/
void setMorningLeanMass( String key, Double value ) {
this.morningLeanMass = extractWrittenValue( value );
}//End Method
/**
* Sets the {@link WeightRecording#eveningWeighIn()} {@link uk.dangrew.nuts.progress.WeighIn#weight()} for the current {@link WeightRecording}.
* @param key the parsed key.
* @param value the parsed value.
*/
void setEveningWeight( String key, Double value ) {
this.eveningWeight = extractWrittenValue( value );
}//End Method
/**
* Sets the {@link WeightRecording#eveningWeighIn()} {@link uk.dangrew.nuts.progress.WeighIn#bodyFat()} for the current {@link WeightRecording}.
* @param key the parsed key.
* @param value the parsed value.
*/
void setEveningBodyFat( String key, Double value ) {
this.eveningBodyFat = extractWrittenValue( value );
}//End Method
/**
* Sets the {@link WeightRecording#eveningWeighIn()} {@link uk.dangrew.nuts.progress.WeighIn#leanMass()} for the current {@link WeightRecording}.
* @param key the parsed key.
* @param value the parsed value.
*/
void setEveningLeanMass( String key, Double value ) {
this.eveningLeanMass = extractWrittenValue( value );
}//End Method
private Double extractWrittenValue( Double value ) {
if ( value == 0.0 ) {
return null;
} else {
return value;
}
}//End Method
}//End Class
| [
"danielanthonygrew@gmail.com"
] | danielanthonygrew@gmail.com |
416bc437b4a3f81a9babf45c372d3aac216e919d | d20dd387023aaf6a896e34c6090ea3858a185611 | /darwinoperformance/darwinoperformance-robovm-hybrid/src/org/darwino/performance/app/AppHybridApplication.java | 65de9abc4f7388d9fc38c571494b73cb7785bfe6 | [] | no_license | darwino-org/Darwino-Performance | 42eaf9e11c0247d6924141a47543966dd580bd8e | f456a15d512ef4c9fe1d8bfb24474f2a030257ff | refs/heads/master | 2021-01-19T10:25:54.565249 | 2016-05-17T09:41:22 | 2016-05-17T09:41:22 | 82,181,630 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,185 | java | /*!COPYRIGHT HEADER!
*
*/
package org.darwino.performance.app;
import com.darwino.commons.json.JsonException;
import com.darwino.commons.services.HttpServerContext;
import com.darwino.ios.platform.hybrid.DarwinoIOSHybridApplication;
import com.darwino.mobile.hybrid.platform.DarwinoMobileHttpServer;
import com.darwino.mobile.platform.DarwinoMobileApplication;
import com.darwino.platform.DarwinoManifest;
public class AppHybridApplication extends DarwinoIOSHybridApplication {
static {
// Make sure that some classes are referenced and thus loaded
@SuppressWarnings("unused")
Class<?> c = AppPlugin.class;
}
public static AppHybridApplication create() throws JsonException {
if(!DarwinoMobileApplication.isInitialized()) {
AppHybridApplication app = new AppHybridApplication(
new AppManifest(new AppMobileManifest(AppManifest.MOBILE_PATHINFO)));
app.init();
}
return (AppHybridApplication)AppHybridApplication.get();
}
public AppHybridApplication(DarwinoManifest manifest) {
super(manifest);
}
@Override
protected DarwinoMobileHttpServer createHttpServer(HttpServerContext context) {
return new AppServiceDispatcher(context);
}
}
| [
"christian.guedemann@webgate.biz"
] | christian.guedemann@webgate.biz |
0bf8a54457436920a67fe5943b47f5af63c9e71b | 68102394ed601826c92384977465d4f7d911d95a | /crm-reactive-microservice/src/main/java/com/example/crm/controller/CrmRestController.java | c767ea5a2cfa6bf1e46521d3f86c9a548415639c | [
"MIT"
] | permissive | deepcloudlabs/dcl350-2021-jun-07 | b34724f20fec751e9a31fde95297b89390aa9cf0 | 05332025909e49b8067657d02eed1bef08c03a92 | refs/heads/main | 2023-05-21T01:14:28.843633 | 2021-06-11T13:35:40 | 2021-06-11T13:35:40 | 374,163,769 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,888 | java | package com.example.crm.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.example.crm.domain.Customer;
import com.example.crm.service.CrmService;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@RestController
@RequestMapping("/customers")
@Validated
@CrossOrigin
public class CrmRestController {
@Autowired
private CrmService crmService;
@GetMapping("{identity}")
public Mono<Customer> findByIdentity(@PathVariable String identity) {
return crmService.findCustomerByIdentity(identity);
}
@GetMapping
public Flux<Customer> findAllByPage(@RequestParam int page,@RequestParam int size) {
return crmService.findCustomersByPage(page,size);
}
@PostMapping
public Mono<Customer> acquireCustomer(@RequestBody Customer customer){
return crmService.addCustomer(customer);
}
@PutMapping("{identity}")
public Mono<Customer> acquireCustomer(@PathVariable String identity,@RequestBody Customer customer){
return crmService.updateCustomer(identity, customer);
}
@DeleteMapping("{identity}")
public Mono<Customer> releaseCustomerByIdentity(@PathVariable String identity) {
return crmService.releaseCustomerByIdentity(identity);
}
}
| [
"deepcloudlabs@gmail.com"
] | deepcloudlabs@gmail.com |
d83e1f07fefc0b94b97277cfc9bcb745fd04acd3 | 00f13802a6f6923ace91beefb0632fa70f89a0b2 | /01-teach-spring/src/main/java/com/imooc/spring/aop/schema/advisors/ConcurrentOperationExecutor.java | 8cbda29dd99579b9cef83da3929b74c4fe34146b | [] | no_license | wxzt-IT/study-imooc | 90d6bfcc02b1485314e9dfd6772476be73c5cc4f | 07e166cd636693e5841289e729cefadc993d681b | refs/heads/master | 2021-01-01T04:46:43.998293 | 2017-07-13T15:07:43 | 2017-07-13T15:07:43 | 97,240,953 | 2 | 0 | null | 2017-07-14T14:13:24 | 2017-07-14T14:13:24 | null | UTF-8 | Java | false | false | 1,078 | java | package com.imooc.spring.aop.schema.advisors;
import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.core.Ordered;
import org.springframework.dao.PessimisticLockingFailureException;
public class ConcurrentOperationExecutor implements Ordered {
private static final int DEFAULT_MAX_RETRIES = 2;
private int maxRetries = DEFAULT_MAX_RETRIES;
private int order = 1;
public void setMaxRetries(int maxRetries) {
this.maxRetries = maxRetries;
}
public int getOrder() {
return this.order;
}
public void setOrder(int order) {
this.order = order;
}
public Object doConcurrentOperation(ProceedingJoinPoint pjp) throws Throwable {
int numAttempts = 0;
PessimisticLockingFailureException lockFailureException;
do {
numAttempts++;
System.out.println("Try times : " + numAttempts);
try {
return pjp.proceed();
} catch (PessimisticLockingFailureException ex) {
lockFailureException = ex;
}
} while (numAttempts <= this.maxRetries);
System.out.println("Try error : " + numAttempts);
throw lockFailureException;
}
}
| [
"zccoder@aliyun.com"
] | zccoder@aliyun.com |
0be4a6d53ea12fe9de1b4d6d55b611dbb0810c90 | 7adccbf5947ff5b6f2760a037ff000d272830c60 | /src/main/java/org/basseme/salamtek/web/rest/errors/InvalidPasswordException.java | b7bd61560f6d70f93f698282422c353b5868aab3 | [] | no_license | basseme/salamtek | 95dc97da1dd6196658ef397f44c0faeb3aea7827 | 336949d9efc7e150517293a4b77c578ed1136ba7 | refs/heads/master | 2020-03-12T22:12:40.984464 | 2018-04-24T11:24:00 | 2018-04-24T11:24:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 353 | java | package org.basseme.salamtek.web.rest.errors;
import org.zalando.problem.AbstractThrowableProblem;
import org.zalando.problem.Status;
public class InvalidPasswordException extends AbstractThrowableProblem {
public InvalidPasswordException() {
super(ErrorConstants.INVALID_PASSWORD_TYPE, "Incorrect password", Status.BAD_REQUEST);
}
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
dbf078983b652efb495f50a1fe4100ad554dcd9d | ae9a22e74eefddd55ad71e51f9625af02b06e464 | /app/src/main/java/com/kingja/zsqs/net/api/ApiException.java | 2e22f178b998f1a4b59b3d5220b605c1e79259e9 | [] | no_license | KingJA/zsqs | 458cf633a96e7d18586039402dc76549d1897d00 | 47ba4e5463b373b2c80a48b6b9ca3e50d980ac06 | refs/heads/master | 2020-12-10T09:40:49.083264 | 2020-04-18T00:58:09 | 2020-04-18T00:58:09 | 233,558,432 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 427 | java | package com.kingja.zsqs.net.api;
/**
* Description:TODO
* Create Time:2019/11/20 0020 下午 4:56
* Author:KingJA
* Email:kingjavip@gmail.com
*/
public class ApiException extends RuntimeException {
private int status_code;
public ApiException(int errorCode, String errorMessage) {
super(errorMessage);
status_code = errorCode;
}
public int getCode() {
return status_code;
}
} | [
"kingjavip@gmail.com"
] | kingjavip@gmail.com |
317724463fc62ed86daee3fc92015293c561484d | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a016/A016628Test.java | e628f9cd4542afbf8229216a011080f1ad9b7920 | [] | 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 | 195 | java | package irvine.oeis.a016;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A016628Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
8f6a0f4a691cd832c6a1e801f93fc426c579621d | 31b7d2067274728a252574b2452e617e45a1c8fb | /icom-bean/icom/OccurrenceParticipant.java | 541bc31c985a9d9d3ee88e6a061b2196c39fafff | [] | no_license | ericschan/open-icom | c83ae2fa11dafb92c3210a32184deb5e110a5305 | c4b15a2246d1b672a8225cbb21b75fdec7f66f22 | refs/heads/master | 2020-12-30T12:22:48.783144 | 2017-05-28T00:51:44 | 2017-05-28T00:51:44 | 91,422,338 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,080 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
*
* Copyright (c) 2010, Oracle Corporation All Rights Reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License ("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can obtain
* a copy of the License at http://openjdk.java.net/legal/gplv2+ce.html.
* See the License for the specific language governing permission and
* limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at openICOM/bootstrap/legal/LICENSE.txt.
* Oracle designates this particular file as subject to the "Classpath" exception
* as provided by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the License
* Header, with the fields enclosed by brackets [ ] replaced by your own
* identifying information: "Portions Copyrighted [year]
* [name of copyright owner].
*
* Contributor(s): Oracle Corporation
*
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package icom;
import java.net.URI;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
@javax.persistence.Embeddable
@XmlType(name="OccurrenceParticipant", namespace="http://docs.oasis-open.org/ns/icom/calendar/201008")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(namespace="http://docs.oasis-open.org/ns/icom/calendar/201008")
public class OccurrenceParticipant extends Participant {
static final long serialVersionUID = 1L;
/**
* @$clientQualifier participantStatus
* @associates OccurrenceParticipantStatus
* @clientNavigability NAVIGABLE
*/
@XmlElement(type=OccurrenceParticipantStatusEnum.class)
OccurrenceParticipantStatus participantStatus;
protected OccurrenceParticipant() {
}
public OccurrenceParticipant(Addressable participant) {
super(participant);
}
public OccurrenceParticipant(URI address, String name) {
super(address, name);
}
public OccurrenceParticipantStatus getParticipantStatus() {
return participantStatus;
}
}
| [
"eric.sn.chan@gmail.com"
] | eric.sn.chan@gmail.com |
8de0d205e0a647f7b77b3d1710180dcc487d2887 | 7312ff00a32daebcaae32caef6812005318b704a | /src/main/java/org/telegram/api/document/attribute/TLDocumentAttributeHasStickers.java | 19fba8eae9f3cd7fb6c177be5586676650de2eae | [
"MIT"
] | permissive | onixred/TelegramApi | fa194e83d42bfa4a321636c040bc7ca4fa0619ac | 093483533db583eeafb07bfa20aeec897bb91e58 | refs/heads/master | 2021-04-15T04:38:41.773587 | 2018-08-12T14:08:03 | 2018-08-12T14:08:03 | 126,354,440 | 7 | 4 | MIT | 2018-07-31T01:14:24 | 2018-03-22T15:16:58 | Java | UTF-8 | Java | false | false | 857 | java | /*
* This is the source code of bot v. 2.0
* It is licensed under GNU GPL v. 3 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Ruben Bermudez, 9/01/15.
*/
package org.telegram.api.document.attribute;
/**
* Indates that a document has stickers
* @author Ruben Bermudez
* @version 2.0
*/
public class TLDocumentAttributeHasStickers extends TLAbsDocumentAttribute {
/**
* The constant CLASS_ID.
*/
public static final int CLASS_ID = 0x9801d2f7;
/**
* Instantiates a new TL document attribute animated.
*/
public TLDocumentAttributeHasStickers() {
super();
}
@Override
public int getClassId() {
return CLASS_ID;
}
@Override
public String toString() {
return "documentAttributeHasStickers#9801d2f7";
}
}
| [
"rberlopez@gmail.com"
] | rberlopez@gmail.com |
47518b2f7aabacbd96a295ffb6e0449ad37e449e | cb90c674a9d7c27ebe0c2ad1fd6658150d92fe75 | /app/src/main/java/com/beyond/popscience/module/home/fragment/view/QQTipItem.java | a638166201e31dec2f2d6433ae2ccde1c3e9d281 | [
"Apache-2.0"
] | permissive | sunhaiteng2016/iknow-android | b5ad49e8bf14cf3a22b72d9da3c6757a7abc41cf | b1aeec07a70953b776d0c113384b04cef3b36869 | refs/heads/master | 2020-07-16T09:59:34.249095 | 2019-09-02T02:33:43 | 2019-09-02T02:34:14 | 205,760,878 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 671 | java | package com.beyond.popscience.module.home.fragment.view;
import android.graphics.Color;
public class QQTipItem {
private String title;
private int textColor = Color.WHITE;
public QQTipItem(String title) {
this.title = title;
}
public QQTipItem(String title, int textColor) {
this.title = title;
this.textColor = textColor;
}
public String getTitle() {
return title;
}
public int getTextColor() {
return textColor;
}
public void setTextColor(int textColor) {
this.textColor = textColor;
}
public void setTitle(String title) {
this.title = title;
}
}
| [
"2502410120@qq.com"
] | 2502410120@qq.com |
3998a312a2ea08cf5addf67dc2d2283b99f336bc | d60e287543a95a20350c2caeabafbec517cabe75 | /LACCPlus/Cloudstack/864_1.java | 634de1efa0c0279d9dc53b241443a3777466f6aa | [
"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 | 883 | java | //,temp,VirtualMachineMO.java,537,554,temp,VirtualMachineMO.java,382,393
//,3
public class xxx {
public boolean removeSnapshot(String snapshotName, boolean removeChildren) throws Exception {
ManagedObjectReference morSnapshot = getSnapshotMor(snapshotName);
if (morSnapshot == null) {
s_logger.warn("Unable to find snapshot: " + snapshotName);
return false;
}
ManagedObjectReference morTask = _context.getService().removeSnapshotTask(morSnapshot, removeChildren, true);
boolean result = _context.getVimClient().waitForTask(morTask);
if (result) {
_context.waitForTaskProgressDone(morTask);
return true;
} else {
s_logger.error("VMware removeSnapshot_Task failed due to " + TaskMO.getTaskFailureInfo(_context, morTask));
}
return false;
}
}; | [
"sgholami@uwaterloo.ca"
] | sgholami@uwaterloo.ca |
f42d2a76a84e13c4817407814caf668fc5a6ea6e | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/30/30_6749913b1df530034f8f45cbf681e7a030f54ba3/LinuxTest/30_6749913b1df530034f8f45cbf681e7a030f54ba3_LinuxTest_s.java | 015bfa8afec9525468a77285593454bdf76e1e9d | [] | 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 | 555 | java | import org.hanuna.gitalk.controller.Controller;
import org.hanuna.gitalk.graph.Graph;
import org.hanuna.gitalk.graph.builder.ReaderGraphModel;
import org.hanuna.gitalk.swingui.GitAlkUI;
import java.io.IOException;
/**
* @author erokhins
*/
public class LinuxTest {
public static void main(String[] args) throws IOException {
Graph graph = ReaderGraphModel.read();
Controller controller = new Controller(graph);
controller.prepare();
GitAlkUI ui = new GitAlkUI(controller);
ui.showUi();
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
725b7a3611f039cab766b390bc4062ea62332be0 | d944234f35651bd5a23f8d14b77555390c729926 | /design_pattern/src/main/java/com/option/behavioral/visitor/impl/Keyboard.java | be3291a278242a961d09e53d0fad60cc9e77945f | [] | no_license | LJJ1994/Java-Learn | 4f2d5981c291da24b4be11afa9506e3665d45d6d | 1932dfc8416f7e4498c848671f59e2a816b1316b | refs/heads/master | 2022-11-06T09:34:32.841582 | 2020-08-01T05:00:09 | 2020-08-01T05:00:09 | 247,892,292 | 0 | 0 | null | 2022-10-12T20:44:53 | 2020-03-17T06:06:00 | Java | UTF-8 | Java | false | false | 343 | java | package com.option.behavioral.visitor.impl;
import com.option.behavioral.visitor.ComputerPart;
import com.option.behavioral.visitor.ComputerPartVisitor;
public class Keyboard implements ComputerPart {
@Override
public void accept(ComputerPartVisitor computerPartVisitor) {
computerPartVisitor.visit(this);
}
}
| [
"optionsci111@gmail.com"
] | optionsci111@gmail.com |
3ca84097864457cc488393b87b7d76fc5e743061 | 58e555e306f41d1a1d06f7c5e30db13eee2c1eed | /src/java/nio/channels/Channel.java | b22119d98c791675c750af4d2d91363beb61b8d1 | [] | no_license | SmartTalk/jdk8-source-reading | 33db15399d1b0de5c3062b2a2ec2d2ae3bbbaa4d | 0682559ef6c84a73addd8375253755dfb9e647fd | refs/heads/master | 2020-05-17T17:08:28.390691 | 2018-10-27T13:01:48 | 2018-10-27T13:01:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,114 | java | /*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.nio.channels;
import java.io.Closeable;
import java.io.IOException;
/**
* A nexus for I/O operations.
*
* <p> A channel represents an open connection to an entity such as a hardware
* device, a file, a network socket, or a program component that is capable of
* performing one or more distinct I/O operations, for example reading or
* writing.
*
* <p> A channel is either open or closed. A channel is open upon creation,
* and once closed it remains closed. Once a channel is closed, any attempt to
* invoke an I/O operation upon it will cause a {@link ClosedChannelException}
* to be thrown. Whether or not a channel is open may be tested by invoking
* its {@link #isOpen isOpen} method.
*
* <p> Channels are, in general, intended to be safe for multithreaded access
* as described in the specifications of the interfaces and classes that extend
* and implement this interface.
*
* @author Mark Reinhold
* @author JSR-51 Expert Group
* @since 1.4
*/
public interface Channel extends Closeable {
/**
* Tells whether or not this channel is open.
*
* @return <tt>true</tt> if, and only if, this channel is open
*/
public boolean isOpen();
/**
* Closes this channel.
*
* <p> After a channel is closed, any further attempt to invoke I/O
* operations upon it will cause a {@link ClosedChannelException} to be
* thrown.
*
* <p> If this channel is already closed then invoking this method has no
* effect.
*
* <p> This method may be invoked at any time. If some other thread has
* already invoked it, however, then another invocation will block until
* the first invocation is complete, after which it will return without
* effect. </p>
*
* @throws IOException
* If an I/O error occurs
*/
public void close() throws IOException;
}
| [
"charpty@gmail.com"
] | charpty@gmail.com |
6d3399adbcb1f711f114f618cf4c6ff87665df99 | 3f2a61d5ecc1f974785e837258da29c899ee33d2 | /oop/src/main/java/com/bvan/jc/oop/rectangle/Rectangles.java | 1d67f2a747bdea95524cbfc4c746a405afd4cad3 | [] | no_license | bohdanvan/bvan-java-community | 5a770060507b11f6abc72c1b676dd9586643cf58 | d3f6d3d9f153d98e0b418fe094bbf73bda665768 | refs/heads/master | 2021-01-12T16:27:28.173650 | 2016-12-25T15:41:10 | 2016-12-25T15:44:24 | 69,152,199 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 954 | java | package com.bvan.jc.oop.rectangle;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.StringJoiner;
/**
* @author bvanchuhov
*/
public class Rectangles implements Iterable<Rectangle> {
private final List<Rectangle> rectangles = new ArrayList<>();
public void add(Rectangle rectangle) {
rectangles.add(rectangle);
}
public double getArea() {
double area = 0;
for (Rectangle rectangle : rectangles) {
area += rectangle.getArea();
}
return area;
}
@Override
public Iterator<Rectangle> iterator() {
return rectangles.iterator();
}
@Override
public String toString() {
StringJoiner stringJoiner = new StringJoiner("\n");
for (Rectangle rectangle : rectangles) {
stringJoiner.add(rectangle.toString());
}
return "Rectangles:\n" + stringJoiner.toString();
}
}
| [
"bodya.van@gmail.com"
] | bodya.van@gmail.com |
5a4fca64f55ad60793f9f419e5a6491a921793dd | 03bcf39c35b6f0ada8701b85298db27b5c40b1d0 | /src/xt/java/com/blnz/xsl/tr/MultiLevelNumberAction.java | 79f4a719b8d023fa0f9a29c2e36cfcf198de5141 | [
"MIT"
] | permissive | blnz/xt | 72ec72b0fb980d5fc24649ffa58fd1ca8eaa507c | 8db763a4c00ac180716098c878bd1717b408197c | refs/heads/master | 2021-01-17T13:49:27.000858 | 2016-08-01T15:34:27 | 2016-08-01T15:34:27 | 998,935 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,584 | java | // $Id: MultiLevelNumberAction.java 99 2005-02-28 21:37:53Z blindsey $
package com.blnz.xsl.tr;
import com.blnz.xsl.om.*;
import com.blnz.xsl.expr.Pattern;
import com.blnz.xsl.conv.NumberListFormat;
/**
*
*/
class MultiLevelNumberAction implements Action
{
private Pattern count;
private Pattern from;
private NumberListFormatTemplate formatTemplate;
/**
*
*/
static final class CacheEntry
{
Node parent; // a node that matches count
Node child; // a child of parent that matches count
int n; // child is the n-th such chil
}
/**
*
*/
static final class Cache
{
static final int SPARE = 4;
CacheEntry[] entries;
CacheEntry get(int level) {
if (entries == null) {
entries = new CacheEntry[level + 1 + SPARE];
}
else if (level >= entries.length) {
CacheEntry[] old = entries;
entries = new CacheEntry[level + 1 + SPARE];
System.arraycopy(old, 0, entries, 0, old.length);
}
if (entries[level] == null) {
entries[level] = new CacheEntry();
}
return entries[level];
}
}
/**
*
*/
MultiLevelNumberAction(Pattern count, Pattern from,
NumberListFormatTemplate formatTemplate)
{
this.count = count;
this.from = from;
this.formatTemplate = formatTemplate;
}
/**
*
*/
public void invoke(ProcessContext context, Node node,
Result result)
throws XSLException
{
NumberListFormat format = formatTemplate.instantiate(context, node);
int n;
if (count == null) {
if (node.getType() == Node.ELEMENT) {
n = numberUp(node.getName(), format, context, node, result);
} else {
n = 0;
}
} else {
Cache cache = (Cache)context.get(this);
if (cache == null) {
cache = new Cache();
context.put(this, cache);
}
n = numberUp(format, context, cache, node, result);
}
if (n == 0) {
result.characters(format.getPrefix(0));
}
result.characters(format.getSuffix());
}
/**
*
*/
private int numberUp(NumberListFormat format,
ProcessContext context,
Cache cache,
Node node,
Result result) throws XSLException
{
do {
Node parent = node.getParent();
if (from != null && from.matches(node, context)) {
break;
}
if (count.matches(node, context)) {
int level = numberUp(format, context, cache, parent, result);
CacheEntry entry = cache.get(level);
int n;
if (parent == null) {
n = 1;
} else if (node.equals(entry.child)) {
n = entry.n;
} else if (parent.equals(entry.parent)
&& entry.child.compareTo(node) < 0) {
n = entry.n;
for (NodeIterator iter = entry.child.getFollowingSiblings();;) {
Node tem = iter.next();
if (count.matches(tem, context)) {
++n;
if (tem.equals(node))
break;
}
}
entry.n = n;
entry.child = node;
}
else {
n = 0;
for (NodeIterator iter = parent.getChildren();;) {
Node tem = iter.next();
if (count.matches(tem, context)) {
++n;
if (tem.equals(node)) {
break;
}
}
}
entry.parent = parent;
entry.child = node;
entry.n = n;
}
result.characters(format.getPrefix(level));
result.characters(format.formatNumber(level, n));
return level + 1;
}
node = parent;
} while (node != null);
return 0;
}
/**
*
*/
private int numberUp(Name name,
NumberListFormat format,
ProcessContext context,
Node node,
Result result) throws XSLException
{
int i = 0;
for (Node tem = node.getParent(); tem != null; tem = tem.getParent()) {
if (name.equals(tem.getName())) {
i = numberUp(name, format, context, tem, result);
break;
}
}
int n = 0;
for (NodeIterator iter = node.getParent().getChildren();;) {
Node tem = iter.next();
if (name.equals(tem.getName()) && tem.getType() == Node.ELEMENT) {
n++;
if (tem.equals(node)) {
break;
}
}
}
result.characters(format.getPrefix(i));
result.characters(format.formatNumber(i, n));
return i + 1;
}
}
| [
"bill@blnz.com"
] | bill@blnz.com |
37635c1dc0d0a0f6acad6409d01adf846521c325 | eb5f5353f49ee558e497e5caded1f60f32f536b5 | /sun/reflect/generics/tree/DoubleSignature.java | 17692038b6635e0a8606dee7b8fa5c98c61a8f5b | [] | no_license | mohitrajvardhan17/java1.8.0_151 | 6fc53e15354d88b53bd248c260c954807d612118 | 6eeab0c0fd20be34db653f4778f8828068c50c92 | refs/heads/master | 2020-03-18T09:44:14.769133 | 2018-05-23T14:28:24 | 2018-05-23T14:28:24 | 134,578,186 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 650 | java | package sun.reflect.generics.tree;
import sun.reflect.generics.visitor.TypeTreeVisitor;
public class DoubleSignature
implements BaseType
{
private static final DoubleSignature singleton = new DoubleSignature();
private DoubleSignature() {}
public static DoubleSignature make()
{
return singleton;
}
public void accept(TypeTreeVisitor<?> paramTypeTreeVisitor)
{
paramTypeTreeVisitor.visitDoubleSignature(this);
}
}
/* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\sun\reflect\generics\tree\DoubleSignature.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 0.7.1
*/ | [
"mohit.rajvardhan@ericsson.com"
] | mohit.rajvardhan@ericsson.com |
70349c1a782c824e1deecfb7662b6d1e803200d3 | 4c069e045bed1a130e85462552e6185d8761102f | /martha-lanches/src/main/java/br/com/alinesolutions/marthalanches/rest/ProdutoEndpoint.java | 459208f8969eeadb019b0965e27833cd6c0b8c04 | [
"Apache-2.0"
] | permissive | ggmoura/marthalanches | 1f4705ad21f632c824d04ebadc7718bfdad70dab | 9af2421b7e2e18d5c47c3b0a4d51655ba75a1c10 | refs/heads/master | 2021-01-10T11:24:30.126973 | 2015-06-30T00:17:41 | 2015-06-30T04:03:00 | 36,953,655 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,729 | java | package br.com.alinesolutions.marthalanches.rest;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityExistsException;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.UriBuilder;
import br.com.alinesolutions.marthalanches.model.Produto;
import br.com.alinesolutions.marthalanches.service.produto.ProdutoService;
import br.com.alinesolutions.marthalanches.util.ServiceFactory;
@Stateless
@Path("/produtos")
public class ProdutoEndpoint {
private ProdutoService service;
public ProdutoEndpoint() {
service = ServiceFactory.getService(ProdutoService.class);
}
@POST
@Consumes("application/json")
public Response create(Produto entity) {
try {
Response build = null;
try {
service.persist(entity);
build = Response.created(UriBuilder.fromResource(ProdutoEndpoint.class).path(String.valueOf(entity.getId())).build()).build();
} catch (EntityExistsException e) {
build = Response.status(Status.CONFLICT).build();
}
return build;
} catch (Exception e) {
throw e;
}
}
@DELETE
@Path("/{id:[0-9][0-9]*}")
public Response deleteById(@PathParam("id") Long id) {
Produto entity = service.find(id);
if (entity == null) {
return Response.status(Status.NOT_FOUND).build();
}
service.remove(entity);
return Response.noContent().build();
}
@GET
@Path("/{id:[0-9][0-9]*}")
@Produces("application/json")
public Response findById(@PathParam("id") Long id) {
Produto entity = service.find(id);
if (entity == null) {
return Response.status(Status.NOT_FOUND).build();
}
return Response.ok(entity).build();
}
@GET
@Produces("application/json")
public List<Produto> listAll(@QueryParam("start") Integer startPosition, @QueryParam("max") Integer maxResult) {
final List<Produto> results = service.listAll(startPosition, maxResult);
return results;
}
@PUT
@Path("/{id:[0-9][0-9]*}")
@Consumes("application/json")
public Response update(@PathParam("id") Long id, Produto entity) {
if (entity == null) {
return Response.status(Status.BAD_REQUEST).build();
}
if (!id.equals(entity.getId())) {
return Response.status(Status.CONFLICT).entity(entity).build();
}
if (service.find(id) == null) {
return Response.status(Status.NOT_FOUND).build();
}
service.merge(entity);
return Response.noContent().build();
}
}
| [
"gleidson.gmoura@gmail.com"
] | gleidson.gmoura@gmail.com |
df56d59e91958a4a4143a665147e964fbf43fe91 | dd76d0b680549acb07278b2ecd387cb05ec84d64 | /divestory-CFR/com/google/android/gms/signin/internal/zai.java | fa5d8b7909674215b9c54b5648522fa6b2ae10b3 | [] | no_license | ryangardner/excursion-decompiling | 43c99a799ce75a417e636da85bddd5d1d9a9109c | 4b6d11d6f118cdab31328c877c268f3d56b95c58 | refs/heads/master | 2023-07-02T13:32:30.872241 | 2021-08-09T19:33:37 | 2021-08-09T19:33:37 | 299,657,052 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,517 | java | /*
* Decompiled with CFR <Could not determine version>.
*
* Could not load the following classes:
* android.os.Parcel
* android.os.Parcelable
* android.os.Parcelable$Creator
*/
package com.google.android.gms.signin.internal;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
import com.google.android.gms.signin.internal.zag;
import java.util.ArrayList;
import java.util.List;
public final class zai
implements Parcelable.Creator<zag> {
public final /* synthetic */ Object createFromParcel(Parcel parcel) {
int n = SafeParcelReader.validateObjectHeader(parcel);
ArrayList<String> arrayList = null;
String string2 = null;
do {
if (parcel.dataPosition() >= n) {
SafeParcelReader.ensureAtEnd(parcel, n);
return new zag(arrayList, string2);
}
int n2 = SafeParcelReader.readHeader(parcel);
int n3 = SafeParcelReader.getFieldId(n2);
if (n3 != 1) {
if (n3 != 2) {
SafeParcelReader.skipUnknownField(parcel, n2);
continue;
}
string2 = SafeParcelReader.createString(parcel, n2);
continue;
}
arrayList = SafeParcelReader.createStringList(parcel, n2);
} while (true);
}
public final /* synthetic */ Object[] newArray(int n) {
return new zag[n];
}
}
| [
"ryan.gardner@coxautoinc.com"
] | ryan.gardner@coxautoinc.com |
399fdeca9a49b3073eed184cd96be6ede64aa0a4 | 6252c165657baa6aa605337ebc38dd44b3f694e2 | /org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/TemperatureController4514.java | 0ecf776af1b472bb3435f7db1000b1c13fa3bc27 | [] | no_license | soha500/EglSync | 00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638 | 55101bc781349bb14fefc178bf3486e2b778aed6 | refs/heads/master | 2021-06-23T02:55:13.464889 | 2020-12-11T19:10:01 | 2020-12-11T19:10:01 | 139,832,721 | 0 | 1 | null | 2019-05-31T11:34:02 | 2018-07-05T10:20:00 | Java | UTF-8 | Java | false | false | 371 | java | package syncregions;
public class TemperatureController4514 {
public int execute(int temperature4514, int targetTemperature4514) {
//sync _bfpnFUbFEeqXnfGWlV4514, behaviour
1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0;
//endSync
}
}
| [
"sultanalmutairi@172.20.10.2"
] | sultanalmutairi@172.20.10.2 |
5fe2b738bf1f3b0da55761ad2bdc8846c65e0535 | 52c68263cfb7851f69a79b89499a691cebbf5049 | /core/src/main/java/org/hisp/dhis/android/sdk/core/network/DhisApi.java | 19c148d91692ea50bef0d50615dbe1d68f2b45db | [
"BSD-3-Clause"
] | permissive | nagyist/dhis2-android-sdk | 5cb897ed365cecae1c937b0d68fd14b8b77837d9 | aa27c6e1f70ec92b9d7931d8650b424be9a1af8f | refs/heads/master | 2023-06-23T04:17:21.789523 | 2015-12-09T14:16:44 | 2015-12-09T14:16:44 | 47,722,247 | 0 | 0 | BSD-3-Clause | 2022-12-16T23:23:45 | 2015-12-09T22:11:15 | Java | UTF-8 | Java | false | false | 3,427 | java | /*
* Copyright (c) 2015, University of Oslo
*
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.hisp.dhis.android.sdk.core.network;
import com.squareup.okhttp.HttpUrl;
import org.hisp.dhis.android.sdk.core.models.Credentials;
import org.hisp.dhis.android.sdk.core.models.Session;
import org.hisp.dhis.android.sdk.core.network.RepositoryManager.ServerEndpoint;
import org.hisp.dhis.android.sdk.core.network.RepositoryManager.AuthInterceptor;
public final class DhisApi {
private final ServerEndpoint endpoint;
private final AuthInterceptor interceptor;
private final IDhisApi dhisApi;
private Session session;
DhisApi(ServerEndpoint endpoint, AuthInterceptor interceptor, IDhisApi dhisApi) {
this.endpoint = endpoint;
this.interceptor = interceptor;
this.dhisApi = dhisApi;
}
public void setSession(Session session) {
this.session = session;
HttpUrl url = null;
Credentials credentials = null;
if (session != null) {
url = session.getServerUrl();
credentials = session.getCredentials();
}
setServerUrl(url);
setCredentials(credentials);
}
public Session getSession() {
return session;
}
private void setServerUrl(HttpUrl httpUrl) {
String url = null;
if (httpUrl != null) {
url = httpUrl.newBuilder()
.addPathSegment("api")
.build().toString();
}
endpoint.setServerUrl(url);
}
private void setCredentials(Credentials credentials) {
String username = null;
String password = null;
if (credentials != null) {
username = credentials.getUsername();
password = credentials.getPassword();
}
interceptor.setUsername(username);
interceptor.setPassword(password);
}
public IDhisApi getApi() {
return dhisApi;
}
}
| [
"araz.abishov.gsoc@gmail.com"
] | araz.abishov.gsoc@gmail.com |
e83e166f1d0974e4ea7b11f104aa43e58f5f843e | a4178e5042f43f94344789794d1926c8bdba51c0 | /iwxxm3Converter/src/schemabindings/schemabindings31/org/isotc211/_2005/gmd/URLPropertyType.java | 5e09a32dadc69d422a749b8ea8162f8bd7733836 | [
"Apache-2.0"
] | permissive | moryakovdv/iwxxmConverter | c6fb73bc49765c4aeb7ee0153cca04e3e3846ab0 | 5c2b57e57c3038a9968b026c55e381eef0f34dad | refs/heads/master | 2023-07-20T06:58:00.317736 | 2023-07-05T10:10:10 | 2023-07-05T10:10:10 | 128,777,786 | 11 | 7 | Apache-2.0 | 2023-07-05T10:03:12 | 2018-04-09T13:38:59 | Java | UTF-8 | Java | false | false | 3,312 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.05.06 at 11:11:25 PM MSK
//
package schemabindings31.org.isotc211._2005.gmd;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for URL_PropertyType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="URL_PropertyType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence minOccurs="0">
* <element ref="{http://www.isotc211.org/2005/gmd}URL"/>
* </sequence>
* <attribute ref="{http://www.isotc211.org/2005/gco}nilReason"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "URL_PropertyType", propOrder = {
"url"
})
public class URLPropertyType {
@XmlElement(name = "URL")
@XmlSchemaType(name = "anyURI")
protected String url;
@XmlAttribute(name = "nilReason", namespace = "http://www.isotc211.org/2005/gco")
protected List<String> nilReason;
/**
* Gets the value of the url property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getURL() {
return url;
}
/**
* Sets the value of the url property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setURL(String value) {
this.url = value;
}
public boolean isSetURL() {
return (this.url!= null);
}
/**
* Gets the value of the nilReason property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the nilReason property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getNilReason().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getNilReason() {
if (nilReason == null) {
nilReason = new ArrayList<String>();
}
return this.nilReason;
}
public boolean isSetNilReason() {
return ((this.nilReason!= null)&&(!this.nilReason.isEmpty()));
}
public void unsetNilReason() {
this.nilReason = null;
}
}
| [
"moryakovdv@gmail.com"
] | moryakovdv@gmail.com |
36aa5a9c859dd17d3223668649f427987c25407e | a1335cfde50e83fb6556a322aef70b2a770c79ad | /src/main/java/noobanidus/mods/miniatures/setup/ClientInit.java | fde6562b35e891218b89741f9e1ab4909814d36d | [
"MIT"
] | permissive | Priddlesaur/miniatures | 32c8564811f4da7df6c7482c1ed1bd2ca95666d1 | 5a558698f6f587f424e2181851cfd0a3062d7e6d | refs/heads/main | 2023-07-15T16:23:03.894005 | 2021-08-20T11:05:58 | 2021-08-20T11:05:58 | 384,593,716 | 0 | 0 | MIT | 2021-07-10T02:31:25 | 2021-07-10T02:31:25 | null | UTF-8 | Java | false | false | 338 | java | package noobanidus.mods.miniatures.setup;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
public class ClientInit {
public static void init() {
IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus();
modBus.addListener(ClientSetup::init);
}
}
| [
"due@wxwhatever.com"
] | due@wxwhatever.com |
115e0d89093529f2a71c53ea11ebdace9ea3b2f7 | a4dbcc4303506c650eee618fdb4249f06fe0b98e | /cjsj-oa/seal/src/main/java/cn/cjsj/im/ui/activity/UpdateLogActivity.java | 7fa7a37d8a463e7c790a97fcb1cd7c05fae92a9b | [
"MIT"
] | permissive | JoshuaRuo/test | 9a03d2779c6d7c36402d851d85c8cfb60d892b3a | 4563d1f195c83da78d2e7e8bc1614c0263dfa579 | refs/heads/master | 2020-04-14T11:35:42.994124 | 2019-02-12T08:57:42 | 2019-02-12T08:57:42 | 163,818,413 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,508 | java | package cn.cjsj.im.ui.activity;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import cn.cjsj.im.R;
@SuppressLint("SetJavaScriptEnabled")
public class UpdateLogActivity extends BaseActivity {
private WebView mWebView = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_update_log);
setTitle(R.string.update_log);
mWebView = (WebView) findViewById(R.id.update_log_webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setUseWideViewPort(true);
mWebView.getSettings().setLoadWithOverviewMode(true);
mWebView.getSettings().setBuiltInZoomControls(true);
mWebView.getSettings().setSupportZoom(true);
MyWebViewClient mMyWebViewClient = new MyWebViewClient();
mMyWebViewClient.onPageFinished(mWebView, "http://www.rongcloud.cn/changelog");
mMyWebViewClient.shouldOverrideUrlLoading(mWebView, "http://www.rongcloud.cn/changelog");
mMyWebViewClient.onPageFinished(mWebView, "http://www.rongcloud.cn/changelog");
mWebView.setWebViewClient(mMyWebViewClient);
}
class MyWebViewClient extends WebViewClient {
ProgressDialog progressDialog;
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {//网页页面开始加载的时候
if (progressDialog == null) {
progressDialog = new ProgressDialog(UpdateLogActivity.this);
progressDialog.setMessage("Please wait...");
progressDialog.show();
mWebView.setEnabled(false);// 当加载网页的时候将网页进行隐藏
}
super.onPageStarted(view, url, favicon);
}
@Override
public void onPageFinished(WebView view, String url) {//网页加载结束的时候
if (progressDialog != null && progressDialog.isShowing()) {
progressDialog.dismiss();
progressDialog = null;
mWebView.setEnabled(true);
}
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) { //网页加载时的连接的网址
view.loadUrl(url);
return false;
}
}
}
| [
"123456"
] | 123456 |
f1eeb89c5321b10ed46d01523605c85f429cae6e | b2686811a65c31a19040562687291f81a11e2179 | /source/core/nl.uva.vlet.vrs.core/source/main/nl/uva/vlet/data/IntegerHolder.java | d05b6fa937c783f7b0ee23685431540dd5a8eef6 | [
"Apache-2.0"
] | permissive | skoulouzis/vlet | 5d98ec5925491ed1149a88d46ae55ea34598784e | a9effed8947723cf0b40182cf8d4175252ed080e | refs/heads/master | 2016-09-06T09:15:37.496823 | 2015-11-30T17:33:00 | 2015-11-30T17:33:00 | 27,225,958 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,762 | java | /*
* Copyright 2006-2011 The Virtual Laboratory for e-Science (VL-e)
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* For details, see the LICENCE.txt file location in the root directory of this
* distribution or obtain the Apache Licence at the following location:
* 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.
*
* See: http://www.vl-e.nl/
* See: LICENCE.txt (located in the root folder of this distribution).
* ---
* $Id: IntegerHolder.java,v 1.5 2011-04-18 12:00:35 ptdeboer Exp $
* $Date: 2011-04-18 12:00:35 $
*/
// source:
package nl.uva.vlet.data;
/**
* Integer holder class for VAR Integer types.
*/
public class IntegerHolder implements VARHolder<Integer>
{
public Integer value=null;
public IntegerHolder(Integer val)
{
this.value=val;
}
public IntegerHolder()
{
}
public int intValue()
{
if (value!=null)
return value;
throw new NullPointerException("Value in IntegerHolder is NULL");
}
/** Returns Holder value or defVal if holder does not contain any value */
public int intValue(int defVal)
{
if (value!=null)
return value;
return defVal;
}
public boolean isSet()
{
return (value!=null);
}
public Integer get()
{
return this.value;
}
public void set(Integer val)
{
this.value=val;
}
}
| [
"devpiter@796de75e-ed0f-4de0-881b-f1dc9bee7bff"
] | devpiter@796de75e-ed0f-4de0-881b-f1dc9bee7bff |
77f5fdd174f3db6f969dcc934eecc32f427a7822 | 656ce78b903ef3426f8f1ecdaee57217f9fbc40e | /src/org/spongycastle/crypto/params/DSAKeyParameters.java | 5d60590f0123cf08814b540ee5908f279d3561c1 | [] | no_license | zhuharev/periscope-android-source | 51bce2c1b0b356718be207789c0b84acf1e7e201 | 637ab941ed6352845900b9d465b8e302146b3f8f | refs/heads/master | 2021-01-10T01:47:19.177515 | 2015-12-25T16:51:27 | 2015-12-25T16:51:27 | 48,586,306 | 8 | 10 | null | null | null | null | UTF-8 | Java | false | false | 565 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package org.spongycastle.crypto.params;
// Referenced classes of package org.spongycastle.crypto.params:
// AsymmetricKeyParameter, DSAParameters
public class DSAKeyParameters extends AsymmetricKeyParameter
{
public DSAParameters axf;
public DSAKeyParameters(boolean flag, DSAParameters dsaparameters)
{
super(flag);
axf = dsaparameters;
}
}
| [
"hostmaster@zhuharev.ru"
] | hostmaster@zhuharev.ru |
96fb88e56c3b3a8458e67e655e6f784f1603fc6a | 957c6953d076dd5fec73f43caa3f5c3b85a05e80 | /src/main/java/com/sztouyun/advertisingsystem/common/operation/BaseOperationService.java | 376216588dab41383ce574c28dcbfd85ae4f4348 | [
"Apache-2.0"
] | permissive | chenhaujing/advertisingsystem | d8e44747ad023018300ef28bdea00b9e7f677423 | 7871c89a604bc64045664be0760d7f14639a2439 | refs/heads/master | 2023-01-20T10:21:05.535808 | 2020-05-14T03:48:33 | 2020-05-14T03:48:33 | 119,918,573 | 0 | 0 | Apache-2.0 | 2023-01-12T09:00:25 | 2018-02-02T02:07:10 | Java | UTF-8 | Java | false | false | 1,100 | java | package com.sztouyun.advertisingsystem.common.operation;
import com.sztouyun.advertisingsystem.service.BaseService;
import org.springframework.transaction.annotation.Transactional;
public abstract class BaseOperationService<TData> extends BaseService implements IOperation<TData>{
protected abstract void onOperating(TData data,IOperationCollection<TData> operationCollection);
protected abstract void onOperated(TData data,IOperationCollection<TData> operationCollection);
@Override
public void operate(TData data) {
operate(data,null);
}
@Transactional
public void operate(TData data,Class<? extends IOperation>... operationClasses) {
IOperationCollection<TData> operationCollection = new OperationCollection<>();
onOperating(data,operationCollection);
onOperated(data,operationCollection);
if(operationClasses != null){
for (Class<? extends IOperation> operation:operationClasses){
operationCollection.remove(operation);
}
}
operationCollection.operate(data);
}
}
| [
"1032291008@qq.com"
] | 1032291008@qq.com |
c150ee7b6f3a760ed1c1daf320aaa42e53a7ff82 | fe969a3a8f9396d001f633880db6ae884e6e943c | /modules/dom/docrendering-freemarker/impl/src/main/java/org/incode/example/docrendering/freemarker/dom/FreemarkerDocRenderingModule.java | 3bfd348c02d944cfd1242bc9e0f30a7c4d73a1a5 | [
"Apache-2.0"
] | permissive | frankydee/incode-platform | 4ca94a816922b15c022fa5f4178a9cf9ebeedd95 | b1f37793fc9362bdb15b444f2c05a4c83fbb8560 | refs/heads/master | 2020-03-17T23:14:14.692206 | 2018-05-13T14:53:38 | 2018-05-13T14:53:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 256 | java | package org.incode.example.docrendering.freemarker.dom;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.isis.applib.ModuleAbstract;
@XmlRootElement(name = "module")
public class FreemarkerDocRenderingModule extends ModuleAbstract {
}
| [
"dan@haywood-associates.co.uk"
] | dan@haywood-associates.co.uk |
cf512557a71e7afb367a190f02f27876d34cb8c9 | a53dc090fe90a46a61bfa70c0d4c0e725572b5b8 | /languages/notation/source_gen/jetbrains/mps/core/notation/behavior/SNotationParentheses_Behavior.java | 88479d0c998079cdf7282fead9effbdc698e4468 | [] | no_license | ttim/mps-core | 3d2a152de288f5e705454db276095496b40ec252 | fcb60381e317412ed07202037a454b5ad181dde2 | refs/heads/master | 2021-01-17T23:14:21.577921 | 2012-07-25T16:42:39 | 2012-07-25T16:42:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,064 | java | package jetbrains.mps.core.notation.behavior;
/*Generated by MPS */
import jetbrains.mps.smodel.SNode;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.internal.collections.runtime.ITranslator2;
import jetbrains.mps.internal.collections.runtime.IWhereFilter;
public class SNotationParentheses_Behavior {
public static void init(SNode thisNode) {
}
public static boolean virtual_isMultiline_3647933405694785195(SNode thisNode) {
return ListSequence.fromList(SLinkOperations.getTargets(thisNode, "alternatives", true)).translate(new ITranslator2<SNode, SNode>() {
public Iterable<SNode> translate(SNode it) {
return SLinkOperations.getTargets(it, "parts", true);
}
}).any(new IWhereFilter<SNode>() {
public boolean accept(SNode it) {
return SNotationPart_Behavior.call_hasNewLineAfter_3647933405694801735(it) || SNotationPart_Behavior.call_hasNewLineBefore_3647933405694801750(it);
}
});
}
}
| [
"egryaznov@gmail.com"
] | egryaznov@gmail.com |
8c54f096d4092b854494e3fed4fd8f952635f050 | 30debfb588d3df553019a29d761f53698564e8c8 | /modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201608/BaseRateError.java | cec97615d38e08e9de7afc621047d8d8d368d610 | [
"Apache-2.0"
] | permissive | jinhyeong/googleads-java-lib | 8f7a5b9cad5189e45b5ddcdc215bbb4776b614f9 | 872c39ba20f30f7e52d3d4c789a1c5cbefaf80fc | refs/heads/master | 2021-01-19T09:35:38.933267 | 2017-04-03T14:12:43 | 2017-04-03T14:12:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,686 | java | // Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* BaseRateError.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.dfp.axis.v201608;
/**
* An error having to do with {@link BaseRate}.
*/
public class BaseRateError extends com.google.api.ads.dfp.axis.v201608.ApiError implements java.io.Serializable {
private com.google.api.ads.dfp.axis.v201608.BaseRateErrorReason reason;
public BaseRateError() {
}
public BaseRateError(
java.lang.String fieldPath,
java.lang.String trigger,
java.lang.String errorString,
com.google.api.ads.dfp.axis.v201608.BaseRateErrorReason reason) {
super(
fieldPath,
trigger,
errorString);
this.reason = reason;
}
/**
* Gets the reason value for this BaseRateError.
*
* @return reason
*/
public com.google.api.ads.dfp.axis.v201608.BaseRateErrorReason getReason() {
return reason;
}
/**
* Sets the reason value for this BaseRateError.
*
* @param reason
*/
public void setReason(com.google.api.ads.dfp.axis.v201608.BaseRateErrorReason reason) {
this.reason = reason;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof BaseRateError)) return false;
BaseRateError other = (BaseRateError) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj) &&
((this.reason==null && other.getReason()==null) ||
(this.reason!=null &&
this.reason.equals(other.getReason())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getReason() != null) {
_hashCode += getReason().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(BaseRateError.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201608", "BaseRateError"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("reason");
elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201608", "reason"));
elemField.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201608", "BaseRateError.Reason"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
| [
"api.cseeley@gmail.com"
] | api.cseeley@gmail.com |
9e9c44ec985b9bbc3c8c4768c450031289173277 | f4d67892b0663091759130e14abc38eacb3a8a7d | /org.celllife.mobilisr.service.gwt/src/main/java/org/celllife/mobilisr/service/impl/gwt/SettingServiceImpl.java | 85eaa8e5f1dbfe5a3fa82b051f25943bfe7efb79 | [] | no_license | cell-life/communicate | 6ab6f86a62866213fc2a5057f83d6c3e0cf3db9a | 454de8d9823fb8d5170987ab72a732b7353fe9ec | refs/heads/master | 2021-05-02T02:07:32.558672 | 2018-02-09T19:19:28 | 2018-02-09T19:19:28 | 120,880,101 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 812 | java | package org.celllife.mobilisr.service.impl.gwt;
import java.util.List;
import javax.servlet.ServletException;
import org.celllife.mobilisr.service.gwt.SettingService;
import org.celllife.mobilisr.service.gwt.SettingViewModel;
public class SettingServiceImpl extends AbstractMobilisrService implements SettingService {
private static final long serialVersionUID = 1783347235337931539L;
private org.celllife.mobilisr.service.SettingService service;
@Override
public void init() throws ServletException {
super.init();
service = (org.celllife.mobilisr.service.SettingService) getBean("settingService");
}
@Override
public List<SettingViewModel> getSettings(){
return service.getSettings();
}
@Override
public void saveSetting(SettingViewModel model){
service.saveSetting(model);
}
}
| [
"dagmar.timler@gmail.com"
] | dagmar.timler@gmail.com |
1f0b186c386710104c3be80eda48b48ad70a08c3 | 4c051311b5ece6ff8991017e5f24c6ffdaf949fc | /src/main/java/com/wk/p3/greenmall/common/persistence/CrudDao.java | 6d3834f3480b093e7009a744a190e1968cc3dc5c | [] | no_license | zhp834158133/GreenMall | d956993ebb02c41a9fd052cfcbad4fc4116232dc | 073fd0d04ce49ea1e15bfcbec3d8c02b2d5c1a3e | refs/heads/master | 2021-01-10T01:47:52.916159 | 2018-10-18T01:31:42 | 2018-10-18T01:31:42 | 52,052,982 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,532 | java | /**
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.wk.p3.greenmall.common.persistence;
import java.util.List;
/**
* DAO支持类实现
* @author ThinkGem
* @version 2014-05-16
* @param <T>
*/
public interface CrudDao<T> extends BaseDao {
/**
* 获取单条数据
* @param id
* @return
*/
public T get(String id);
/**
* 获取单条数据
* @param entity
* @return
*/
public T get(T entity);
/**
* 查询数据列表,如果需要分页,请设置分页对象,如:entity.setPage(new Page<T>());
* @param entity
* @return
*/
public List<T> findList(T entity);
/**
* 查询所有数据列表
* @param entity
* @return
*/
public List<T> findAllList(T entity);
/**
* 查询所有数据列表
* @see public List<T> findAllList(T entity)
* @return
*/
@Deprecated
public List<T> findAllList();
/**
* 插入数据
* @param entity
* @return
*/
public int insert(T entity);
/**
* 更新数据
* @param entity
* @return
*/
public int update(T entity);
/**
* 删除数据(一般为逻辑删除,更新del_flag字段为1)
* @param id
* @see public int delete(T entity)
* @return
*/
@Deprecated
public int delete(String id);
/**
* 删除数据(一般为逻辑删除,更新del_flag字段为1)
* @param entity
* @return
*/
public int delete(T entity);
} | [
"yefengmengluo@163.com"
] | yefengmengluo@163.com |
6853aa672acfb3cb60cf3ee25a55c93a754e0320 | fbd16739b5a5e476916fa22ddcd2157fafff82b9 | /temp/src/minecraft/net/minecraft/entity/ai/EntityAIWatchClosest.java | 88d7f1c74b92c62b8c50efcebfac73c3071b479d | [] | no_license | CodeMajorGeek/lwjgl3-mcp908 | 6b49c80944ab87f1c863ff537417f53f16c643d5 | 2a6d28f2b7541b760ebb8e7a6dc905465f935a64 | refs/heads/master | 2020-06-18T19:53:49.089357 | 2019-07-14T13:14:06 | 2019-07-14T13:14:06 | 196,421,564 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,636 | java | package net.minecraft.entity.ai;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.entity.player.EntityPlayer;
public class EntityAIWatchClosest extends EntityAIBase {
private EntityLiving field_75332_b;
protected Entity field_75334_a;
private float field_75333_c;
private int field_75330_d;
private float field_75331_e;
private Class field_75329_f;
private static final String __OBFID = "CL_00001592";
public EntityAIWatchClosest(EntityLiving p_i1631_1_, Class p_i1631_2_, float p_i1631_3_) {
this.field_75332_b = p_i1631_1_;
this.field_75329_f = p_i1631_2_;
this.field_75333_c = p_i1631_3_;
this.field_75331_e = 0.02F;
this.func_75248_a(2);
}
public EntityAIWatchClosest(EntityLiving p_i1632_1_, Class p_i1632_2_, float p_i1632_3_, float p_i1632_4_) {
this.field_75332_b = p_i1632_1_;
this.field_75329_f = p_i1632_2_;
this.field_75333_c = p_i1632_3_;
this.field_75331_e = p_i1632_4_;
this.func_75248_a(2);
}
public boolean func_75250_a() {
if(this.field_75332_b.func_70681_au().nextFloat() >= this.field_75331_e) {
return false;
} else {
if(this.field_75332_b.func_70638_az() != null) {
this.field_75334_a = this.field_75332_b.func_70638_az();
}
if(this.field_75329_f == EntityPlayer.class) {
this.field_75334_a = this.field_75332_b.field_70170_p.func_72890_a(this.field_75332_b, (double)this.field_75333_c);
} else {
this.field_75334_a = this.field_75332_b.field_70170_p.func_72857_a(this.field_75329_f, this.field_75332_b.field_70121_D.func_72314_b((double)this.field_75333_c, 3.0D, (double)this.field_75333_c), this.field_75332_b);
}
return this.field_75334_a != null;
}
}
public boolean func_75253_b() {
return !this.field_75334_a.func_70089_S()?false:(this.field_75332_b.func_70068_e(this.field_75334_a) > (double)(this.field_75333_c * this.field_75333_c)?false:this.field_75330_d > 0);
}
public void func_75249_e() {
this.field_75330_d = 40 + this.field_75332_b.func_70681_au().nextInt(40);
}
public void func_75251_c() {
this.field_75334_a = null;
}
public void func_75246_d() {
this.field_75332_b.func_70671_ap().func_75650_a(this.field_75334_a.field_70165_t, this.field_75334_a.field_70163_u + (double)this.field_75334_a.func_70047_e(), this.field_75334_a.field_70161_v, 10.0F, (float)this.field_75332_b.func_70646_bf());
--this.field_75330_d;
}
}
| [
"37310498+CodeMajorGeek@users.noreply.github.com"
] | 37310498+CodeMajorGeek@users.noreply.github.com |
4d4fb973b2ae3bcad4132d532d74db68aa08f357 | 5e93b90a0b7c3cee3570de82aec07559576eed13 | /mixin/src/mixin/PrimarySuffix.java | 5702e99c2c19c19f3b2495c19ce55f2f4ec14b62 | [] | no_license | priangulo/BttFTestProjects | a6f37c83b52273f8b5f3d7cbb7116c85a0fd4ef2 | cc2294d24f9b0fed46110b868bd3a8f6c8794475 | refs/heads/master | 2021-03-27T10:30:10.316285 | 2017-10-25T21:39:55 | 2017-10-25T21:39:55 | 64,432,711 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 169 | java | // Automatically generated code. Edit at your own risk!
// Generated by bali2jak v2002.09.03.
package mixin;
abstract public class PrimarySuffix extends AstNode {
}
| [
"priangulo@gmail.com"
] | priangulo@gmail.com |
2b8a58c577cd3fc07e951af3eff7f7d0d8553760 | 3568c9772fad54ffe71683de31525464642f3cf9 | /wbemdisp1/src/main/java/eu/doppel_helix/jna/tlb/wbemdisp1/WbemFlagEnum.java | e139015847e49aca6d770b5692c152ab625120ea | [
"MIT"
] | permissive | NoonRightsWarriorBehindHovering/COMTypelibraries | c853c41bb495031702d0ad7a4d215ab894c12bbd | c17acfca689305c0e23d4ff9d8ee437e0ee3d437 | refs/heads/master | 2023-06-21T20:52:51.519721 | 2020-03-13T22:33:48 | 2020-03-13T22:33:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,401 | java |
package eu.doppel_helix.jna.tlb.wbemdisp1;
import com.sun.jna.platform.win32.COM.util.IComEnum;
/**
* Defines behavior of various interface calls
*
* <p>uuid({4A249B73-FC9A-11D1-8B1E-00600806D9B6})</p>
*/
public enum WbemFlagEnum implements IComEnum {
/**
* (16)
*/
wbemFlagReturnImmediately(16),
/**
* (0)
*/
wbemFlagReturnWhenComplete(0),
/**
* (0)
*/
wbemFlagBidirectional(0),
/**
* (32)
*/
wbemFlagForwardOnly(32),
/**
* (64)
*/
wbemFlagNoErrorObject(64),
/**
* (0)
*/
wbemFlagReturnErrorObject(0),
/**
* (128)
*/
wbemFlagSendStatus(128),
/**
* (0)
*/
wbemFlagDontSendStatus(0),
/**
* (256)
*/
wbemFlagEnsureLocatable(256),
/**
* (512)
*/
wbemFlagDirectRead(512),
/**
* (0)
*/
wbemFlagSendOnlySelected(0),
/**
* (131072)
*/
wbemFlagUseAmendedQualifiers(131072),
/**
* (0)
*/
wbemFlagGetDefault(0),
/**
* (1)
*/
wbemFlagSpawnInstance(1),
/**
* (1)
*/
wbemFlagUseCurrentTime(1),
;
private WbemFlagEnum(long value) {
this.value = value;
}
private long value;
public long getValue() {
return this.value;
}
} | [
"mblaesing@doppel-helix.eu"
] | mblaesing@doppel-helix.eu |
03ed59e7f9412e28c447f4f55d7942617652f204 | 30ce31989513fe03ca0736555adf6e8b80b1c093 | /src/com/cisco/axl/api/_8/AddDdiReq.java | 4a3d73e2269416c2afeb40e0f6caa0118eb52b59 | [] | no_license | axenlarde/Woot | 21374d0c29e9d6e0b6f0f91f2cbb455f2e2a875e | 447728a2793f42530884bb0f3f388d33b3708bc1 | refs/heads/master | 2022-04-09T19:19:33.826592 | 2020-02-07T10:36:55 | 2020-02-07T10:36:55 | 115,440,477 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,431 | java |
package com.cisco.axl.api._8;
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 class for AddDdiReq complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="AddDdiReq">
* <complexContent>
* <extension base="{http://www.cisco.com/AXL/API/8.5}APIRequest">
* <sequence>
* <element name="ddi" type="{http://www.cisco.com/AXL/API/8.5}XDdi"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AddDdiReq", propOrder = {
"ddi"
})
public class AddDdiReq
extends APIRequest
{
@XmlElement(required = true)
protected XDdi ddi;
/**
* Gets the value of the ddi property.
*
* @return
* possible object is
* {@link XDdi }
*
*/
public XDdi getDdi() {
return ddi;
}
/**
* Sets the value of the ddi property.
*
* @param value
* allowed object is
* {@link XDdi }
*
*/
public void setDdi(XDdi value) {
this.ddi = value;
}
}
| [
"Alexandre@NANALENO"
] | Alexandre@NANALENO |
4f4a7f81098a27e6a91e7a1fa4fe2f0b37202e3f | 4bbfa242353fe0485fb2a1f75fdd749c7ee05adc | /ims-core/framework/com/ailk/openbilling/persistence/imsintf/entity/SQueryParam.java | ceab83a760c0fbabb574a0ccdd34f1760e554354 | [] | no_license | 859162000/infosystem | 88b23a5b386600503ec49b14f3b4da4df7a6d091 | 96d4d50cd9964e713bb95520d6eeb7e4aa32c930 | refs/heads/master | 2021-01-20T04:39:24.383807 | 2017-04-01T10:59:24 | 2017-04-01T10:59:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,938 | java | package com.ailk.openbilling.persistence.imsintf.entity;
import javax.persistence.Entity;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAccessType;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.ailk.easyframe.web.common.dal.IComplexEntity;
import jef.codegen.support.NotModified;
/**
* This class is generated automatically by Asiainfo-Linkage EasyFrame.
*/
@NotModified
@Entity
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(propOrder={"outer_acct_id","acct_id","user_id","phone_id","product_id","invoice_no","start_date","end_date","owner_type","query_level","new_main_promotion","busi_spec_id","channel","cycle_flag"})
public class SQueryParam implements IComplexEntity{
@XmlElement(name="outer_acct_id")
private String outer_acct_id;
@XmlElement(name="acct_id")
private Long acct_id;
@XmlElement(name="user_id")
private Long user_id;
@XmlElement(name="phone_id")
private String phone_id;
@XmlElement(name="product_id")
private Long product_id;
@XmlElement(name="invoice_no")
private String invoice_no;
@XmlElement(name="start_date")
private String start_date;
@XmlElement(name="end_date")
private String end_date;
@XmlElement(name="owner_type")
private Integer owner_type;
@XmlElement(name="query_level")
private Long query_level;
@XmlElement(name="new_main_promotion")
private Long new_main_promotion;
@XmlElement(name="busi_spec_id")
private Long busi_spec_id;
@XmlElement(name="channel")
private String channel;
@XmlElement(name="cycle_flag")
private Integer cycle_flag;
public void setOuter_acct_id(String obj){
this.outer_acct_id = obj;
}
public String getOuter_acct_id(){
return outer_acct_id;
}
public void setAcct_id(Long obj){
this.acct_id = obj;
}
public Long getAcct_id(){
return acct_id;
}
public void setUser_id(Long obj){
this.user_id = obj;
}
public Long getUser_id(){
return user_id;
}
public void setPhone_id(String obj){
this.phone_id = obj;
}
public String getPhone_id(){
return phone_id;
}
public void setProduct_id(Long obj){
this.product_id = obj;
}
public Long getProduct_id(){
return product_id;
}
public void setInvoice_no(String obj){
this.invoice_no = obj;
}
public String getInvoice_no(){
return invoice_no;
}
public void setStart_date(String obj){
this.start_date = obj;
}
public String getStart_date(){
return start_date;
}
public void setEnd_date(String obj){
this.end_date = obj;
}
public String getEnd_date(){
return end_date;
}
public void setOwner_type(Integer obj){
this.owner_type = obj;
}
public Integer getOwner_type(){
return owner_type;
}
public void setQuery_level(Long obj){
this.query_level = obj;
}
public Long getQuery_level(){
return query_level;
}
public void setNew_main_promotion(Long obj){
this.new_main_promotion = obj;
}
public Long getNew_main_promotion(){
return new_main_promotion;
}
public void setBusi_spec_id(Long obj){
this.busi_spec_id = obj;
}
public Long getBusi_spec_id(){
return busi_spec_id;
}
public void setChannel(String obj){
this.channel = obj;
}
public String getChannel(){
return channel;
}
public void setCycle_flag(Integer obj){
this.cycle_flag = obj;
}
public Integer getCycle_flag(){
return cycle_flag;
}
public boolean equals(final Object rhs0){
if (rhs0 == null)return false;
SQueryParam rhs=(SQueryParam)rhs0;
if(!ObjectUtils.equals(outer_acct_id, rhs.outer_acct_id)) return false;
if(!ObjectUtils.equals(acct_id, rhs.acct_id)) return false;
if(!ObjectUtils.equals(user_id, rhs.user_id)) return false;
if(!ObjectUtils.equals(phone_id, rhs.phone_id)) return false;
if(!ObjectUtils.equals(product_id, rhs.product_id)) return false;
if(!ObjectUtils.equals(invoice_no, rhs.invoice_no)) return false;
if(!ObjectUtils.equals(start_date, rhs.start_date)) return false;
if(!ObjectUtils.equals(end_date, rhs.end_date)) return false;
if(!ObjectUtils.equals(owner_type, rhs.owner_type)) return false;
if(!ObjectUtils.equals(query_level, rhs.query_level)) return false;
if(!ObjectUtils.equals(new_main_promotion, rhs.new_main_promotion)) return false;
if(!ObjectUtils.equals(busi_spec_id, rhs.busi_spec_id)) return false;
if(!ObjectUtils.equals(channel, rhs.channel)) return false;
if(!ObjectUtils.equals(cycle_flag, rhs.cycle_flag)) return false;
return true;
}
public int hashCode(){
return new HashCodeBuilder()
.append(outer_acct_id)
.append(acct_id)
.append(user_id)
.append(phone_id)
.append(product_id)
.append(invoice_no)
.append(start_date)
.append(end_date)
.append(owner_type)
.append(query_level)
.append(new_main_promotion)
.append(busi_spec_id)
.append(channel)
.append(cycle_flag)
.toHashCode();
}
} | [
"ljyshiqian@126.com"
] | ljyshiqian@126.com |
88c60cf3f2bbaf9e52d287d59a346a58ba8c1099 | c0b01fd4327660177551c9fb35a908631f55e795 | /src/main/java/kaptainwutax/seedcracker/cracker/population/EndGatewayData.java | d21b623f71addd6250f7a6d466a843d60efa7210 | [
"MIT"
] | permissive | laxoner/SeedCracker | 15a2be90490bdeae138343434f6f5a94477698a8 | f14b8e81a45f13b7f0e447e7a39437a11aa2f881 | refs/heads/master | 2022-04-24T07:15:31.423393 | 2020-04-21T20:44:08 | 2020-04-21T20:44:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,373 | java | package kaptainwutax.seedcracker.cracker.population;
import kaptainwutax.seedcracker.cracker.storage.DataStorage;
import kaptainwutax.seedcracker.cracker.storage.TimeMachine;
import kaptainwutax.seedcracker.util.Rand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.world.biome.Biome;
public class EndGatewayData extends DecoratorData {
private static final double BITS = Math.log(700 * 16 * 16 * 7) / Math.log(2);
private static final int SALT = 30000;
private int xOffset;
private int zOffset;
private int height;
public EndGatewayData(ChunkPos chunkPos, Biome biome, BlockPos pos, int height) {
super(chunkPos, SALT, biome);
this.xOffset = pos.getX() & 15;
this.zOffset = pos.getZ() & 15;
this.height = height;
}
@Override
public boolean testDecorator(Rand rand) {
if(rand.nextInt(700) != 0)return false;
if(rand.nextInt(16) != this.xOffset)return false;
if(rand.nextInt(16) != this.zOffset)return false;
if(rand.nextInt(7) != this.height - 3)return false;
return true;
}
@Override
public double getBits() {
return BITS;
}
@Override
public void onDataAdded(DataStorage dataStorage) {
dataStorage.getTimeMachine().poke(TimeMachine.Phase.STRUCTURES);
}
}
| [
"kaptainwutax@gmail.com"
] | kaptainwutax@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.