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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b0738b61db5cd77d76b0c4bc4c94b9a82acde97c | 254c8ae3c82a10ae83d32448065ebe53fc50c529 | /src/main/java/net/duckling/dhome/web/InstitutionMemberController.java | dd846a8029f00f67ef3adebd2a2c498f4788ef4a | [
"Apache-2.0"
] | permissive | dkai/dhome | 4742711af9bd3d44c3cd2838471a83e9b35160e4 | e006d68bc3ea04bcd046f1338fd2d3a220d90d54 | refs/heads/master | 2021-05-31T23:14:01.544469 | 2016-06-24T12:55:26 | 2016-06-24T12:55:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,857 | java | /*
* Copyright (c) 2008-2016 Computer Network Information Center (CNIC), Chinese Academy of Sciences.
*
* This file is part of Duckling 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 net.duckling.dhome.web;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import net.duckling.dhome.common.util.SessionUtils;
import net.duckling.dhome.domain.institution.InstitutionHome;
import net.duckling.dhome.domain.institution.Member;
import net.duckling.dhome.service.IInstitutionHomeService;
import net.duckling.dhome.service.IInstitutionPeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
/**
* 机构主页首页展示
*
* @author lvly
* @since 2012-9-18
*/
@Controller
@RequestMapping("/institution/{domain}")
public class InstitutionMemberController {
@Autowired
private IInstitutionHomeService homeService;
@Autowired
private IInstitutionPeopleService peopleService;
@RequestMapping(value = "/members.html")
public ModelAndView index(HttpServletRequest request,@PathVariable("domain") String domain) {
ModelAndView mv = new ModelAndView("institution/instituteMember");
InstitutionHome home= homeService.getInstitutionByDomain(domain);
mv.addObject("home",home);
mv.addObject("isMember", peopleService.isMember(SessionUtils.getUserId(request), home.getInstitutionId()));
return mv;
}
@RequestMapping(value = "getMembers.json")
@ResponseBody
public List<Member> getMembers(@PathVariable("domain") String domain, @RequestParam("offset") int offset,
@RequestParam("size") int size) {
return peopleService.getPeoplesByInstitutionId(homeService.getInstitutionIdByDomain(domain), offset, size);
}
public void setHomeService(IInstitutionHomeService homeService) {
this.homeService = homeService;
}
public void setPeopleService(IInstitutionPeopleService peopleService) {
this.peopleService = peopleService;
}
}
| [
"nankai@cnic.ac.cn"
] | nankai@cnic.ac.cn |
f8bc0096b83829b16626980323f3e4838c8866dc | 62409b25a652c7b8c8186e82dd744147fc4ed6c2 | /ws/th/net/cat/epis/ws/f11_reversewriteoffpos/f11_reversewriteoffsi/F11ReverseWriteOffSI.java | 5324554d0565670f1da20cf473d969540714bb8c | [] | no_license | pipat0924/WebApp | 6e5327f8319f47ab592a839a8741dfe396ef62f7 | af6134fe8e1a34508baefc7269dd69f0a639b360 | refs/heads/master | 2021-05-11T00:58:56.738484 | 2018-01-25T15:17:10 | 2018-01-25T15:17:10 | 118,315,036 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,571 | java | package th.net.cat.epis.ws.f11_reversewriteoffpos.f11_reversewriteoffsi;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
/**
* This class was generated by Apache CXF 3.1.6
* 2017-03-24T17:18:48.189+07:00
* Generated source version: 3.1.6
*
*/
@WebService(targetNamespace = "http://F11_ReverseWriteOffPOS/F11_ReverseWriteOffSI", name = "F11_ReverseWriteOffSI")
@XmlSeeAlso({ObjectFactory.class, th.net.cat.epis.ws.f11_reversewriteoffpos.ObjectFactory.class, th.net.cat.epis.ws.esblibs.cbos.ObjectFactory.class})
public interface F11ReverseWriteOffSI {
@WebResult(name = "reverseWriteOffResponse", targetNamespace = "")
@RequestWrapper(localName = "reverseWriteOff", targetNamespace = "http://F11_ReverseWriteOffPOS/F11_ReverseWriteOffSI", className = "th.net.cat.epis.ws.f11_reversewriteoffpos.f11_reversewriteoffsi.ReverseWriteOff")
@WebMethod
@ResponseWrapper(localName = "reverseWriteOffResponse", targetNamespace = "http://F11_ReverseWriteOffPOS/F11_ReverseWriteOffSI", className = "th.net.cat.epis.ws.f11_reversewriteoffpos.f11_reversewriteoffsi.ReverseWriteOffResponse")
public th.net.cat.epis.ws.f11_reversewriteoffpos.ReverseWriteOffResponse reverseWriteOff(
@WebParam(name = "reverseWriteOffRequest", targetNamespace = "")
th.net.cat.epis.ws.f11_reversewriteoffpos.ReverseWriteOffRequest reverseWriteOffRequest
);
}
| [
"33363766+pipat0924@users.noreply.github.com"
] | 33363766+pipat0924@users.noreply.github.com |
3fbd7f31ffc626c60751b6e1c9e24a698e815ee7 | 60563395b404723b1263bf7abc59ea1612dcab35 | /java-in-action/junit-in-action/junit-in-action-selenium/src/test/java/jjseo/test/selenium/ManagedFormTest.java | ae893322513a288df8f29e2b696f7992ff6d1928 | [] | no_license | jayailluminated/Study | afc58f7715434ece86e9fab226974cba6525401a | 6d078c8815f2f54ec5e51ca19dbe1ea128a0d989 | refs/heads/master | 2020-04-06T09:35:35.596588 | 2012-02-05T12:25:26 | 2012-02-05T12:25:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 419 | java | package jjseo.test.selenium;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
/**
* Runs {@link UnmanagedFormChecker} while managing a Selenium server.
*
* @author <a href="mailto:ggregory@apache.org">Gary Gregory</a>
* @version $Id$
*/
@RunWith(ManagedSeleniumServerSuite.class)
@SuiteClasses( { UnmanagedFormTester.class })
public class ManagedFormTest {
// See annotations.
}
| [
"moretajoo@gmail.com"
] | moretajoo@gmail.com |
10b42692981c91867059f20ad1954846411e21f2 | 6ad87d6f9cf6ef91314a06642cceb9f556a7207b | /spring-bean-factory-demo/src/main/java/com/nguyenphucthienan/BeanFactoryApp.java | 29aacbe034b562f22ad902903d94f7fe8b489cbc | [] | no_license | phucthienan/SpringMasterclass | a4cbb9dcc025fb457ffcf355b769a698f221a3db | 9cffa4818b61c6d3a74dd57d5d165d409aefc5a8 | refs/heads/master | 2020-03-25T20:38:17.580383 | 2018-07-07T01:32:27 | 2018-07-07T01:32:27 | 144,139,545 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 699 | java | package com.nguyenphucthienan;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class BeanFactoryApp {
public static void main(String[] args) {
// Create the application context (container)
ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
// Create the bean
Organization organization = (Organization) context.getBean("secondOrganization");
// Print organization details
System.out.println(organization);
// Close the application context (container)
((ClassPathXmlApplicationContext) context).close();
}
}
| [
"npta97@gmail.com"
] | npta97@gmail.com |
ba0abcbb641d627fb8172ac6db5729325afc458b | 57ee988f58e7dbdeffcbe1ce58b566f71452bcd0 | /app/src/main/java/com/wuxiantao/wxt/utils/IdCardUtils.java | eb51f9f4a9c6dc72bcd5d16ad9cd6948ebdbe8cf | [] | no_license | AndroidLwk/android_unlimited | 52d0e75533f80a8eacb75d368b28f0cf88b1dedc | 67fb33539f75d47cebcaf6cbc5718991a3e5db87 | refs/heads/master | 2022-10-17T10:36:10.593566 | 2020-06-08T01:36:17 | 2020-06-08T01:36:17 | 270,985,317 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,125 | java | package com.wuxiantao.wxt.utils;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Hashtable;
/**
* Company:成都可信网络科技有限责任公司
* FileName:IdCardUtils
* Author:android
* Mail:2898682029@qq.com
* Date:19-5-27 下午4:35
* Description:${DESCRIPTION} 身份证工具类
*/
public class IdCardUtils {
public static final String[] ValCodeArr = { "1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2" };
public static final String[] Wi = { "7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2" };
// 身份证的最小出生日期,1900年1月1日
private final static Date MINIMAL_BIRTH_DATE = new Date(-2209017600000L);
private static final String BIRTH_DATE_FORMAT="yyyyMMdd";
private final static int NEW_CARD_NUMBER_LENGTH = 18;
private final static int OLD_CARD_NUMBER_LENGTH = 15;
private final static String LENGTH_ERROR="身份证长度必须为15或者18位!";
private final static String NUMBER_ERROR="15位身份证都应该为数字,18位身份证都应该前17位应该都为数字!";
private final static String DATE_ERROR="身份证日期验证无效!";
private final static String AREA_ERROR="身份证地区编码错误!";
private final static String CHECKCODE_ERROR="身份证最后一位校验码有误!";
//是否需要返回自动补全成的身份证
private static boolean isNeedReturn_AutoCard=false;
/**
*
* @param idcardNumber 需要验证的身份证
* @param isreturn_AutoCard 验证无误后,是否需要返回自动补全身份证
* @return 身份证无误返回传入的身份证号
*/
public static boolean validate_effective(String idcardNumber,boolean isreturn_AutoCard){
isNeedReturn_AutoCard=isreturn_AutoCard;
return validate_effective(idcardNumber);
}
/**
* 身份证校验
* @param idcardNumber 需要验证的身份证
* @return 身份证无误返回传入的身份证号
*/
public static boolean validate_effective(String idcardNumber){
String Ai=idcardNumber.trim();
System.out.println(Ai.length()!=15);
if(Ai.length()==15|Ai.length()==18){
//如果为15位则自动补全到18位
if(Ai.length()==OLD_CARD_NUMBER_LENGTH){
Ai=contertToNewCardNumber(Ai);
}
}else{
//LENGTH_ERROR
return false;
}
// 身份证号的前15,17位必须是阿拉伯数字
for (int i = 0; i < NEW_CARD_NUMBER_LENGTH - 1; i++) {
char ch = Ai.charAt(i);
if( ch < '0' || ch > '9'){return false;}
}
//校验身份证日期信息是否有效 ,出生日期不能晚于当前时间,并且不能早于1900年
try {
Date birthDate = getBirthDate(Ai);
if(null == birthDate){
//DATE_ERROR
return false;
}
if(!birthDate.before(new Date())){
//DATE_ERROR
return false;
}
if(!birthDate.after(MINIMAL_BIRTH_DATE)){
//DATE_ERROR
return false;
}
/**
* 出生日期中的年、月、日必须正确,比如月份范围是[1,12],日期范围是[1,31],还需要校验闰年、大月、小月的情况时,
* 月份和日期相符合
*/
String birthdayPart = getBirthDayPart(Ai);
String realBirthdayPart =createBirthDateParser().format(birthDate);
if(!birthdayPart.equals(realBirthdayPart)){
//DATE_ERROR
return false;
}
} catch (Exception e) {
//DATE_ERROR
return false;
}
//校验地区码是否正确
Hashtable<String, String> h = GetAreaCode();
if (h.get(Ai.substring(0, 2)) == null) {
//AREA_ERROR
return false;
}
//校验身份证最后一位 身份证校验码
if(!calculateVerifyCode(Ai) .equals(String.valueOf(Ai.charAt(NEW_CARD_NUMBER_LENGTH - 1)))){
//CHECKCODE_ERROR
return false;
}
//通过验证则返回true
return true;
}
/**
* 把15位身份证号码转换到18位身份证号码<br>
* 15位身份证号码与18位身份证号码的区别为:<br>
* 1、15位身份证号码中,"出生年份"字段是2位,转换时需要补入"19",表示20世纪<br>
* 2、15位身份证无最后一位校验码。18位身份证中,校验码根据根据前17位生成
* @return
*/
private static String contertToNewCardNumber(String oldCardNumber) {
StringBuilder buf = new StringBuilder(NEW_CARD_NUMBER_LENGTH);
buf.append(oldCardNumber.substring(0, 6));
buf.append("19");
buf.append(oldCardNumber.substring(6));
buf.append(calculateVerifyCode(buf));
return buf.toString();
}
/**计算最后一位校验码 加权值%11
* (1)十七位数字本体码加权求和公式 S = Sum(Ai * Wi), i = 0, ... , 16 ,先对前17位数字的权求和
* Ai:表示第i位置上的身份证号码数字值 Wi:表示第i位置上的加权因子 Wi: 7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4
* (2)计算模 Y = mod(S, 11)
* (3)通过模得到对应的校验码 Y: 0 1 2 3 4 5 6 7 8 9 10 校验码: 1 0 X 9 8 7 6 5 4 3 2
* @param cardNumber
* @return
*/
private static String calculateVerifyCode(CharSequence cardNumber) {
int sum = 0;
for (int i = 0; i < NEW_CARD_NUMBER_LENGTH - 1; i++) {
char ch = cardNumber.charAt(i);
sum += ((ch - '0')) * Integer.parseInt(Wi[i]);
}
return ValCodeArr[sum % 11];
}
/**
* 功能:设置地区编码
* @return Hashtable 对象
*/
private static Hashtable<String, String> GetAreaCode() {
Hashtable<String, String> hashtable = new Hashtable<String, String>();
hashtable.put("11", "北京");
hashtable.put("12", "天津");
hashtable.put("13", "河北");
hashtable.put("14", "山西");
hashtable.put("15", "内蒙古");
hashtable.put("21", "辽宁");
hashtable.put("22", "吉林");
hashtable.put("23", "黑龙江");
hashtable.put("31", "上海");
hashtable.put("32", "江苏");
hashtable.put("33", "浙江");
hashtable.put("34", "安徽");
hashtable.put("35", "福建");
hashtable.put("36", "江西");
hashtable.put("37", "山东");
hashtable.put("41", "河南");
hashtable.put("42", "湖北");
hashtable.put("43", "湖南");
hashtable.put("44", "广东");
hashtable.put("45", "广西");
hashtable.put("46", "海南");
hashtable.put("50", "重庆");
hashtable.put("51", "四川");
hashtable.put("52", "贵州");
hashtable.put("53", "云南");
hashtable.put("54", "西藏");
hashtable.put("61", "陕西");
hashtable.put("62", "甘肃");
hashtable.put("63", "青海");
hashtable.put("64", "宁夏");
hashtable.put("65", "新疆");
hashtable.put("71", "台湾");
hashtable.put("81", "香港");
hashtable.put("82", "澳门");
hashtable.put("91", "国外");
return hashtable;
}
private static Date getBirthDate(String idcard) {
Date cacheBirthDate=null;
try {
cacheBirthDate = createBirthDateParser().parse(getBirthDayPart(idcard));
} catch (Exception e) {
throw new RuntimeException("身份证的出生日期无效");
}
return new Date(cacheBirthDate.getTime());
}
private static SimpleDateFormat createBirthDateParser() {
return new SimpleDateFormat(BIRTH_DATE_FORMAT);
}
private static String getBirthDayPart(String idcardnumber) {
return idcardnumber.substring(6, 14);
}
}
| [
"jason1985"
] | jason1985 |
4501ace1decf6545ffbaa34a9e16fa775bf02961 | 32776561ec88d0a6c4017afeb01356ebe32aacf5 | /sample/src/main/java/com/just/agentweb/sample/fragment/VasSonicFragment.java | a54a4de7940ae2a52f1bc4de40eed4ec6b99206c | [
"Apache-2.0"
] | permissive | marsyu/AgentWeb | 110814a9ed69e73e91e5181b06b6cc5871828ab7 | 4d7a88e6043a1485666285771ccb773038f8fac1 | refs/heads/master | 2021-04-27T03:00:15.950150 | 2018-02-23T17:23:12 | 2018-02-23T17:23:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,332 | java | package com.just.agentweb.sample.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import com.just.agentweb.MiddlewareWebClientBase;
import com.just.agentweb.sample.sonic.SonicImpl;
import com.just.agentweb.sample.sonic.SonicJavaScriptInterface;
import static com.just.agentweb.sample.sonic.SonicJavaScriptInterface.PARAM_CLICK_TIME;
/**
* Created by cenxiaozhong on 2017/12/18.
*
* If you wanna use VasSonic to fast open first page , please
* follow as sample to update your code;
*/
public class VasSonicFragment extends AgentWebFragment {
private SonicImpl mSonicImpl;
public static VasSonicFragment create(Bundle bundle){
VasSonicFragment mVasSonicFragment =new VasSonicFragment();
if(bundle!=null){
mVasSonicFragment.setArguments(bundle);
}
return mVasSonicFragment;
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
// 1. 首先创建SonicImpl
mSonicImpl = new SonicImpl(this.getArguments().getString(URL_KEY), this.getContext());
// 2. 调用 onCreateSession
mSonicImpl.onCreateSession();
//3. 创建AgentWeb ,注意创建AgentWeb的时候应该使用加入SonicWebViewClient中间件
super.onViewCreated(view, savedInstanceState); // 创建 AgentWeb 注意的 go("") 传入的 url 应该null 或者""
//4. 注入 JavaScriptInterface
mAgentWeb.getJsInterfaceHolder().addJavaObject("sonic", new SonicJavaScriptInterface(mSonicImpl.getSonicSessionClient(), new Intent().putExtra(PARAM_CLICK_TIME,getArguments().getLong(PARAM_CLICK_TIME)).putExtra("loadUrlTime", System.currentTimeMillis())));
//5. 最后绑定AgentWeb
mSonicImpl.bindAgentWeb(mAgentWeb);
}
//在步骤3的时候应该传入给AgentWeb
@Override
public MiddlewareWebClientBase getMiddlewareWebClient() {
return mSonicImpl.createSonicClientMiddleWare();
}
//getUrl 应该为null
@Override
public String getUrl() {
return null;
}
@Override
public void onDestroyView() {
super.onDestroyView();
//销毁SonicSession
if(mSonicImpl !=null){
mSonicImpl.destrory();
}
}
}
| [
"xiaozhongcen@gmail.com"
] | xiaozhongcen@gmail.com |
d4ec72ef18c9ac1b4585018bc771cfc38cc0c8ca | 2b4d9930cea7fd37736f2b539d8da030d9d110ac | /src/main/java/ch/ethz/idsc/tensor/alg/Reverse.java | 13269fed2a3afe3d10c362807fad4a1de553b0e7 | [] | no_license | amodeus-science/tensor | a7540abcf22d93464b04faa18813bf14cf9279c8 | 2c30f929dd3dae10ab813371c1c9748cbe1f2d35 | refs/heads/master | 2022-12-31T10:36:25.815391 | 2020-05-07T09:32:28 | 2020-05-07T09:32:28 | 261,510,649 | 1 | 5 | null | 2020-10-13T21:48:36 | 2020-05-05T15:29:47 | Java | UTF-8 | Java | false | false | 1,134 | java | // code by jph
package ch.ethz.idsc.tensor.alg;
import java.util.stream.IntStream;
import ch.ethz.idsc.tensor.ScalarQ;
import ch.ethz.idsc.tensor.Tensor;
/** inspired by
* <a href="https://reference.wolfram.com/language/ref/Reverse.html">Reverse</a>
*
* @see Transpose
* @see RotateLeft
* @see RotateRight */
public enum Reverse {
;
/** Reverse[{a, b, c}] == {c, b, a}
*
* Implementation consistent with Mathematica:
* Reverse of a scalar is not defined
* Reverse[ 3.14 ] throws an exception
*
* @param tensor
* @return tensor with entries on first level reversed
* @throws Exception if tensor is a scalar */
public static Tensor of(Tensor tensor) {
ScalarQ.thenThrow(tensor);
int last = tensor.length() - 1;
return Tensor.of(IntStream.range(0, tensor.length()) //
.map(index -> last - index) //
.mapToObj(tensor::get));
}
/** @param tensor
* @return tensor with entries on all levels reversed */
public static Tensor all(Tensor tensor) {
return ScalarQ.of(tensor) //
? tensor
: of(Tensor.of(tensor.stream().map(Reverse::all)));
}
}
| [
"jan.hakenberg@gmail.com"
] | jan.hakenberg@gmail.com |
c625ae2971a712c69842930a7f6606d8375f04f9 | b37214739ca178f321d2f9e2529240fcdc42fe5b | /hmbanner/src/main/java/com/hm/banner/transformer/AlphaPageTransformer.java | d25db541d06c113e163bfacd50729b83200cf03a | [] | no_license | humanheima/HmSimpleBanner | 3de8f8ad1648e53a4bb0652327b3e94622bd208a | e62ed62698093c9200e981fb2e520f39154da048 | refs/heads/master | 2021-01-11T08:25:14.608497 | 2019-07-18T14:41:25 | 2019-07-18T14:41:25 | 72,282,669 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,022 | java | package com.hm.banner.transformer;
import android.view.View;
import static android.support.v4.view.ViewCompat.setAlpha;
/**
* 作者:王浩 邮件:bingoogolapple@gmail.com
* 创建时间:15/6/19 上午8:41
* 描述:
*/
public class AlphaPageTransformer extends BGAPageTransformer {
private float mMinScale = 0.4f;
public AlphaPageTransformer() {
}
public AlphaPageTransformer(float minScale) {
setMinScale(minScale);
}
@Override
public void handleInvisiblePage(View view, float position) {
setAlpha(view, 0);
}
@Override
public void handleLeftPage(View view, float position) {
setAlpha(view, mMinScale + (1 - mMinScale) * (1 + position));
}
@Override
public void handleRightPage(View view, float position) {
setAlpha(view, mMinScale + (1 - mMinScale) * (1 - position));
}
public void setMinScale(float minScale) {
if (minScale >= 0.0f && minScale <= 1.0f) {
mMinScale = minScale;
}
}
} | [
"humanheima@gmail.com"
] | humanheima@gmail.com |
4a9a3ce9ad39a111afe62e79be076d1ce9e5bb92 | 6dab4175ee02b328d1215716249c977d1a928144 | /app/src/test/resources/org/jboss/hal/processor/mbui/masterdetail/Mbui_AttributeGroupsView.java | 26cc07cd106b66a3233563b90ffba57504a9c81e | [
"Apache-2.0"
] | permissive | ibaca/hal.next | 9ebc5d608280ae6cdfab66da182f9739536e8a5e | daec90c30e7727ed6a64b56f717c7893ce426c14 | refs/heads/develop | 2021-01-24T06:49:22.121963 | 2017-09-19T18:10:10 | 2017-09-19T18:10:10 | 93,324,074 | 0 | 0 | null | 2017-06-04T15:50:12 | 2017-06-04T15:50:12 | null | UTF-8 | Java | false | false | 3,847 | java | package org.jboss.hal.processor.mbui.masterdetail;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;
import javax.inject.Inject;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
import elemental2.dom.HTMLElement;
import org.jboss.gwt.elemento.core.builder.ElementsBuilder;
import org.jboss.gwt.elemento.core.Elements;
import org.jboss.gwt.elemento.template.TemplateUtil;
import org.jboss.hal.ballroom.form.Form;
import org.jboss.hal.ballroom.table.Scope;
import org.jboss.hal.ballroom.LayoutBuilder;
import org.jboss.hal.ballroom.autocomplete.ReadChildrenAutoComplete;
import org.jboss.hal.core.mbui.dialog.AddResourceDialog;
import org.jboss.hal.core.mbui.form.GroupedForm;
import org.jboss.hal.core.mbui.form.ModelNodeForm;
import org.jboss.hal.core.mbui.table.ModelNodeTable;
import org.jboss.hal.core.mbui.MbuiContext;
import org.jboss.hal.dmr.Operation;
import org.jboss.hal.dmr.ResourceAddress;
import org.jboss.hal.meta.AddressTemplate;
import org.jboss.hal.meta.Metadata;
import org.jboss.hal.meta.security.Constraint;
import org.jboss.hal.resources.Ids;
import org.jboss.hal.spi.Message;
import org.jboss.hal.spi.MessageEvent;
import static java.util.Arrays.asList;
import static org.jboss.gwt.elemento.core.Elements.*;
import static org.jboss.hal.ballroom.LayoutBuilder.column;
import static org.jboss.hal.ballroom.LayoutBuilder.row;
import static org.jboss.hal.dmr.ModelDescriptionConstants.ADD;
import static org.jboss.hal.dmr.ModelDescriptionConstants.READ_RESOURCE_OPERATION;
/*
* WARNING! This class is generated. Do not modify.
*/
@Generated("org.jboss.hal.processor.mbui.MbuiViewProcessor")
public final class Mbui_AttributeGroupsView extends AttributeGroupsView {
private final Metadata metadata0;
private final Map<String, HTMLElement> expressionElements;
@Inject
@SuppressWarnings("unchecked")
public Mbui_AttributeGroupsView(MbuiContext mbuiContext) {
super(mbuiContext);
AddressTemplate metadata0Template = AddressTemplate.of("/subsystem=*");
this.metadata0 = mbuiContext.metadataRegistry().lookup(metadata0Template);
this.expressionElements = new HashMap<>();
form = new GroupedForm.Builder<org.jboss.hal.dmr.NamedNode>("form", metadata0)
.customGroup("group-1", "Group 1")
.include("foo", "bar")
.end()
.customGroup("group-2", "Group 2")
.include("baz", "qux")
.end()
.onSave((form, changedValues) -> {
String name = form.getModel().getName();
saveForm("Form", name, metadata0Template.resolve(mbuiContext.statementContext(), name), changedValues);
})
.prepareReset(form -> {
String name = form.getModel().getName();
resetForm("Form", name, metadata0Template.resolve(mbuiContext.statementContext()), form, metadata0)
})
.build();
table = new ModelNodeTable.Builder<org.jboss.hal.dmr.NamedNode>("table", metadata0)
.columns("name")
.build();
HTMLElement html0;
HTMLElement root = row()
.add(column()
.add(html0 = div()
.innerHtml(SafeHtmlUtils.fromSafeConstant("<h1>Master-Detail</h1>"))
.asElement())
.add(table)
.add(form)
)
.asElement();
expressionElements.put("html0", html0);
registerAttachable(table);
registerAttachable(form);
initElement(root);
}
@Override
public void attach() {
super.attach();
table.bindForm(form);
}
}
| [
"harald.pehl@gmail.com"
] | harald.pehl@gmail.com |
624c711d8e7ada5a1b66b6387bf1f125ad78c3fb | e7cb38a15026d156a11e4cf0ea61bed00b837abe | /groundwork-gw-vijava/vijava/src/main/java/com/doublecloud/vim25/LocalizationManagerMessageCatalog.java | c51401087aa6d7422cecaeedf067dfc3faca3ecd | [
"BSD-3-Clause"
] | permissive | wang-shun/groundwork-trunk | 5e0ce72c739fc07f634aeefc8f4beb1c89f128af | ea1ca766fd690e75c3ee1ebe0ec17411bc651a76 | refs/heads/master | 2020-04-01T08:50:03.249587 | 2018-08-20T21:21:57 | 2018-08-20T21:21:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,096 | java | /*================================================================================
Copyright (c) 2013 Steve Jin. 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 names of copyright holders 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 COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
================================================================================*/
package com.doublecloud.vim25;
import java.util.Calendar;
/**
* @author Steve Jin (http://www.doublecloud.org)
* @version 5.1
*/
@SuppressWarnings("all")
public class LocalizationManagerMessageCatalog extends DynamicData {
public String moduleName;
public String catalogName;
public String locale;
public String catalogUri;
public Calendar lastModified;
public String md5sum;
public String version;
public String getModuleName() {
return this.moduleName;
}
public String getCatalogName() {
return this.catalogName;
}
public String getLocale() {
return this.locale;
}
public String getCatalogUri() {
return this.catalogUri;
}
public Calendar getLastModified() {
return this.lastModified;
}
public String getMd5sum() {
return this.md5sum;
}
public String getVersion() {
return this.version;
}
public void setModuleName(String moduleName) {
this.moduleName=moduleName;
}
public void setCatalogName(String catalogName) {
this.catalogName=catalogName;
}
public void setLocale(String locale) {
this.locale=locale;
}
public void setCatalogUri(String catalogUri) {
this.catalogUri=catalogUri;
}
public void setLastModified(Calendar lastModified) {
this.lastModified=lastModified;
}
public void setMd5sum(String md5sum) {
this.md5sum=md5sum;
}
public void setVersion(String version) {
this.version=version;
}
} | [
"gibaless@gmail.com"
] | gibaless@gmail.com |
72209a2ca5e7cf361c45cb9af2c415c62992728e | 25430934ecd19bb9051d0e8a18033b31f3202090 | /HeadFirstChpt15/src/DailyAdviceServer.java | f3a491774869cd8cb9d9a8ed1db13bf1335faf01 | [] | no_license | contactjw/head-first-solutions | c85080612588a957ea2e7e968224280c6dbf9a5f | da33c8f1bf701f16d2834eca40c93e5347f37730 | refs/heads/master | 2022-10-25T19:06:08.178998 | 2020-06-10T20:46:02 | 2020-06-10T20:46:02 | 266,387,160 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,172 | java | import java.io.*;
import java.net.*;
public class DailyAdviceServer {
String[] adviceList = {"Take smaller bites", "Go for the tight jeans. No they do NOT make you look fat.",
"One word: inappropriate", "Just for today, to be honest. Tell your boss what you *really* think",
"You might want to rethink that haircut."};
public void go() {
try {
ServerSocket serverSock = new ServerSocket(4242);
while(true) {
Socket sock = serverSock.accept();
PrintWriter writer = new PrintWriter(sock.getOutputStream());
String advice = getAdvice();
writer.println(advice);
writer.close();
System.out.println(advice);
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
private String getAdvice() {
int random = (int) (Math.random() * adviceList.length);
return adviceList[random];
}
public static void main(String[] args) {
DailyAdviceServer server = new DailyAdviceServer();
server.go();
}
}
| [
"contactjohnwest@gmail.com"
] | contactjohnwest@gmail.com |
911db43120196ee8b23595d352e210e4a025513a | 963599f6f1f376ba94cbb504e8b324bcce5de7a3 | /sources/p035ru/unicorn/ujin/data/profile/repository/ProfileRemoteRepository$rentRegisterByPhone$1.java | 8d6b0971cc3942b9a68a9cf4d9df40ad53c73b67 | [] | no_license | NikiHard/cuddly-pancake | 563718cb73fdc4b7b12c6233d9bf44f381dd6759 | 3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4 | refs/heads/main | 2023-04-09T06:58:04.403056 | 2021-04-20T00:45:08 | 2021-04-20T00:45:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,472 | java | package p035ru.unicorn.ujin.data.profile.repository;
import kotlin.Metadata;
import p035ru.unicorn.ujin.data.api.response.authorization.RentRegisterByPhoneResponse;
import p035ru.unicorn.ujin.data.profile.event.RegisterEvent;
import p046io.reactivex.functions.Consumer;
@Metadata(mo51341bv = {1, 0, 3}, mo51342d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, mo51343d2 = {"<anonymous>", "", "response", "Lru/unicorn/ujin/data/api/response/authorization/RentRegisterByPhoneResponse;", "kotlin.jvm.PlatformType", "accept"}, mo51344k = 3, mo51345mv = {1, 4, 1})
/* renamed from: ru.unicorn.ujin.data.profile.repository.ProfileRemoteRepository$rentRegisterByPhone$1 */
/* compiled from: ProfileRemoteRepository.kt */
final class ProfileRemoteRepository$rentRegisterByPhone$1<T> implements Consumer<RentRegisterByPhoneResponse> {
final /* synthetic */ ProfileRemoteRepository this$0;
ProfileRemoteRepository$rentRegisterByPhone$1(ProfileRemoteRepository profileRemoteRepository) {
this.this$0 = profileRemoteRepository;
}
public final void accept(RentRegisterByPhoneResponse rentRegisterByPhoneResponse) {
this.this$0.getRentRegisterByPhoneSubject().onNext(new RegisterEvent(rentRegisterByPhoneResponse.getError() == 0, rentRegisterByPhoneResponse.getMessage()));
}
}
| [
"a.amirovv@mail.ru"
] | a.amirovv@mail.ru |
fe8056521201ec936604af4f339217321948a022 | 2fda0a2f1f5f5d4e7d72ff15a73a4d3e1e93abeb | /proFL-plugin-2.0.3/groovy/xml/streamingmarkupsupport/AbstractStreamingBuilder$_closure3.java | 73fab5359dfe0202b415f97d90c8301ebb30ffa6 | [
"MIT"
] | permissive | ycj123/Research-Project | d1a939d99d62dc4b02d9a8b7ecbf66210cceb345 | 08296e0075ba0c13204944b1bc1a96a7b8d2f023 | refs/heads/main | 2023-05-29T11:02:41.099975 | 2021-06-08T13:33:26 | 2021-06-08T13:33:26 | 374,899,147 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,216 | java | //
// Decompiled by Procyon v0.5.36
//
package groovy.xml.streamingmarkupsupport;
import org.codehaus.groovy.runtime.callsite.CallSite;
import org.codehaus.groovy.runtime.callsite.CallSiteArray;
import org.codehaus.groovy.runtime.ScriptBytecodeAdapter;
import groovy.lang.MetaClass;
import groovy.lang.GroovyObject;
import org.codehaus.groovy.runtime.ArrayUtil;
import groovy.lang.Reference;
import java.lang.ref.SoftReference;
import org.codehaus.groovy.reflection.ClassInfo;
import org.codehaus.groovy.runtime.GeneratedClosure;
import groovy.lang.Closure;
class AbstractStreamingBuilder$_closure3 extends Closure implements GeneratedClosure
{
private static /* synthetic */ SoftReference $callSiteArray;
public AbstractStreamingBuilder$_closure3(final Object _outerInstance, final Object _thisObject) {
$getCallSiteArray();
super(_outerInstance, _thisObject);
}
public Object doCall(final Object doc, final Object pendingNamespaces, final Object namespaces, final Object namespaceSpecificTags, final Object prefix, final Object attrs, final Object... rest) {
final Object pendingNamespaces2 = new Reference(pendingNamespaces);
final Object namespaces2 = new Reference(namespaces);
final Object namespaceSpecificTags2 = new Reference(namespaceSpecificTags);
final Object attrs2 = new Reference(attrs);
return $getCallSiteArray()[0].call(((Reference<Object>)attrs2).get(), new AbstractStreamingBuilder$_closure3_closure6(this, this.getThisObject(), (Reference<Object>)pendingNamespaces2, (Reference<Object>)namespaceSpecificTags2, (Reference<Object>)namespaces2));
}
public Object call(final Object doc, final Object pendingNamespaces, final Object namespaces, final Object namespaceSpecificTags, final Object prefix, final Object attrs, final Object... rest) {
final Object pendingNamespaces2 = new Reference(pendingNamespaces);
final Object namespaces2 = new Reference(namespaces);
final Object namespaceSpecificTags2 = new Reference(namespaceSpecificTags);
final Object attrs2 = new Reference(attrs);
return $getCallSiteArray()[1].callCurrent(this, ArrayUtil.createArray(doc, ((Reference<Object>)pendingNamespaces2).get(), ((Reference<Object>)namespaces2).get(), ((Reference<Object>)namespaceSpecificTags2).get(), prefix, ((Reference<Object>)attrs2).get(), rest));
}
private static /* synthetic */ CallSiteArray $createCallSiteArray() {
final String[] names = new String[2];
$createCallSiteArray_1(names);
return new CallSiteArray($get$$class$groovy$xml$streamingmarkupsupport$AbstractStreamingBuilder$_closure3(), names);
}
private static /* synthetic */ CallSite[] $getCallSiteArray() {
CallSiteArray $createCallSiteArray;
if (AbstractStreamingBuilder$_closure3.$callSiteArray == null || ($createCallSiteArray = AbstractStreamingBuilder$_closure3.$callSiteArray.get()) == null) {
$createCallSiteArray = $createCallSiteArray();
AbstractStreamingBuilder$_closure3.$callSiteArray = new SoftReference($createCallSiteArray);
}
return $createCallSiteArray.array;
}
}
| [
"chijiang.yang@student.unimelb.edu.au"
] | chijiang.yang@student.unimelb.edu.au |
6be87647467c674795d98ff8555812bade70798a | 6dbdd5e1a97b5e9768bc0f63915e5ce91e44ffcf | /SampleJava/src/newDynamic/SequencesGivenLengthEveryElementEqualTwicePrevious.java | 2000df4ee652123c900dc4e9355e4bdd3ef27a12 | [] | no_license | narendrachouhan1992/practice_code | 4de8936ace2c13c7646ff774d9a1f84bc2903bf0 | 79f2ffd10ccea44f846d7c649b55ee8fd6db20d7 | refs/heads/master | 2020-03-27T15:48:06.092439 | 2018-08-30T11:40:41 | 2018-08-30T11:40:41 | 146,740,121 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 913 | java | package newDynamic;
public class SequencesGivenLengthEveryElementEqualTwicePrevious {
int getCount(int n, int m)
{
int[][] dp = new int[n+1][m+1];
for(int i=0;i<=n;i++)
{
for(int j=0;j<=m;j++)
{
if (i == 0 || j == 0)
dp[i][j] = 0;
// if length of sequence is more than
// the maximum value, special sequence
// cannot exist
else if (i > j)
dp[i][j] = 0;
else if(i == 1)
dp[i][j] = 1;
else
{
dp[i][j] = dp[i][j-1] + dp[i-1][j/2];
}
}
}
return dp[n][m];
}
public static void main(String[] args) {
SequencesGivenLengthEveryElementEqualTwicePrevious obj = new SequencesGivenLengthEveryElementEqualTwicePrevious();
int m = 10;
int n = 4;
System.out.println(obj.getCount(n, m));
}
}
| [
"narendra.chouhan@oracle.com"
] | narendra.chouhan@oracle.com |
c8f1e84ebb3b90549414a6ab2a95c2c2c620b8ed | 3d553e8ba950a7003903b0463ff80b44a9f6a032 | /app/src/main/java/com/zx/androidffmpegrecoder/songstudio/recording/exception/AudioConfigurationException.java | 38d8ca0a4be6c76dc6007ff32b8f2d4dcf4aea75 | [] | no_license | ShelleyXiao/ffmpepy_video_recoder | 22d70d0ee5283e623e3b071fae5dfe94bbabd996 | a1ddd3da2465e22a832bb8f25f45ed9f234e6164 | refs/heads/master | 2020-03-25T01:54:00.285015 | 2018-08-06T08:37:11 | 2018-08-06T08:37:11 | 143,263,183 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 304 | java | package com.zx.androidffmpegrecoder.songstudio.recording.exception;
public class AudioConfigurationException extends RecordingStudioException {
private static final long serialVersionUID = 491222852782937903L;
public AudioConfigurationException() {
super("没有找到合适的音频配置");
}
}
| [
"xiao244164200@qq.com"
] | xiao244164200@qq.com |
a2528e89d4836d858f09f4fcba6d6fe700faba1f | 803b187e89e7d90f15a1fb175e7631bbf858e5dc | /src/main/java/array/multidimensional_arrays/RaggedArray.java | d7436b3237dc420cd0bc4b008608add2e3a705d5 | [] | no_license | lanaflonPerso/LearnJava_Core | 4c50f647db7e75f3c05fe3d943f7ba188273e901 | f4036383c88049de78c849ee55af409ff4a9234f | refs/heads/master | 2020-12-06T00:39:36.901879 | 2019-10-28T11:33:18 | 2019-10-28T11:33:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 667 | java | package array.multidimensional_arrays;
import java.util.Arrays;
import java.util.Random;
public class RaggedArray {
public static void main(String[] args) {
Random rand = new Random(47);
// 3-D array with varied-length vectors:
int[][][] a = new int[rand.nextInt(7)][][];
for(int i = 0; i < a.length; i++) {
a[i] = new int[rand.nextInt(5)][];
for(int j = 0; j < a[i].length; j++){
a[i][j] = new int[rand.nextInt(5)];
for (int k = 0; k < a[i][j].length; k++) {
}
}
}
System.out.println(Arrays.deepToString(a));
}
}
| [
"tsyupryk.roman.lyubomyrovych@gmail.com"
] | tsyupryk.roman.lyubomyrovych@gmail.com |
afd1129b95734d12b31dd79d512fedc7dc0e46a9 | f4b27a6fe9205451d88e21844d8efe0bddf20c86 | /app/src/com/trovebox/android/app/facebook/FacebookBaseDialogListener.java | aa85e622b79cd186d06453f21bc542d637a1d84c | [
"Apache-2.0"
] | permissive | hussanhijazi/mobile-android | 09700d73cdef61fe6598adf9c62775f1c813128f | 1c8715f2c8eae2d169a97b3f4b0008610bdc2989 | refs/heads/master | 2021-01-13T06:49:13.330337 | 2013-12-10T14:16:02 | 2013-12-10T14:16:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,003 | java |
package com.trovebox.android.app.facebook;
import android.content.Context;
import com.facebook.android.DialogError;
import com.facebook.android.Facebook.DialogListener;
import com.facebook.android.FacebookError;
import com.trovebox.android.app.util.GuiUtils;
/**
* Skeleton base class for RequestListeners, providing default error handling.
* Applications should handle these error conditions.
*/
public abstract class FacebookBaseDialogListener implements DialogListener {
public static final String TAG = FacebookBaseDialogListener.class.getSimpleName();
protected Context context;
public FacebookBaseDialogListener(Context context)
{
this.context = context;
}
@Override
public void onFacebookError(FacebookError e) {
GuiUtils.error(TAG, null, e, context);
}
@Override
public void onError(DialogError e) {
GuiUtils.error(TAG, null, new RuntimeException(e), context);
}
@Override
public void onCancel() {
}
}
| [
"httpdispatch@gmail.com"
] | httpdispatch@gmail.com |
c50beb49d814bbe63576439308d56ba5340d796e | 309cea65123c3d493661590cdf9bbd58c687f4ae | /src/main/java/com/zingwita/myapp/repository/CustomAuditEventRepository.java | fc022e77fa66a606a5cf5cfd4fe1e84837aa2fea | [] | no_license | zingy/zingwita-JHipster-App | bbf39eee1a82f1b57517d3c942ab1f6659c3b21b | 5f5cfbb79d85e3d4b220c13730ebc9b4c43a12e7 | refs/heads/master | 2022-05-14T14:17:01.225148 | 2020-03-14T22:57:35 | 2020-03-14T22:57:35 | 247,366,130 | 0 | 0 | null | 2022-03-08T21:18:44 | 2020-03-14T22:57:18 | Java | UTF-8 | Java | false | false | 3,748 | java | package com.zingwita.myapp.repository;
import com.zingwita.myapp.config.Constants;
import com.zingwita.myapp.config.audit.AuditEventConverter;
import com.zingwita.myapp.domain.PersistentAuditEvent;
import java.time.Instant;
import java.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.boot.actuate.audit.AuditEventRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
/**
* An implementation of Spring Boot's {@link AuditEventRepository}.
*/
@Repository
public class CustomAuditEventRepository implements AuditEventRepository {
private static final String AUTHORIZATION_FAILURE = "AUTHORIZATION_FAILURE";
/**
* Should be the same as in Liquibase migration.
*/
protected static final int EVENT_DATA_COLUMN_MAX_LENGTH = 255;
private final PersistenceAuditEventRepository persistenceAuditEventRepository;
private final AuditEventConverter auditEventConverter;
private final Logger log = LoggerFactory.getLogger(getClass());
public CustomAuditEventRepository(
PersistenceAuditEventRepository persistenceAuditEventRepository,
AuditEventConverter auditEventConverter
) {
this.persistenceAuditEventRepository = persistenceAuditEventRepository;
this.auditEventConverter = auditEventConverter;
}
@Override
public List<AuditEvent> find(String principal, Instant after, String type) {
Iterable<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findByPrincipalAndAuditEventDateAfterAndAuditEventType(
principal,
after,
type
);
return auditEventConverter.convertToAuditEvent(persistentAuditEvents);
}
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void add(AuditEvent event) {
if (!AUTHORIZATION_FAILURE.equals(event.getType()) && !Constants.ANONYMOUS_USER.equals(event.getPrincipal())) {
PersistentAuditEvent persistentAuditEvent = new PersistentAuditEvent();
persistentAuditEvent.setPrincipal(event.getPrincipal());
persistentAuditEvent.setAuditEventType(event.getType());
persistentAuditEvent.setAuditEventDate(event.getTimestamp());
Map<String, String> eventData = auditEventConverter.convertDataToStrings(event.getData());
persistentAuditEvent.setData(truncate(eventData));
persistenceAuditEventRepository.save(persistentAuditEvent);
}
}
/**
* Truncate event data that might exceed column length.
*/
private Map<String, String> truncate(Map<String, String> data) {
Map<String, String> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, String> entry : data.entrySet()) {
String value = entry.getValue();
if (value != null) {
int length = value.length();
if (length > EVENT_DATA_COLUMN_MAX_LENGTH) {
value = value.substring(0, EVENT_DATA_COLUMN_MAX_LENGTH);
log.warn(
"Event data for {} too long ({}) has been truncated to {}. Consider increasing column width.",
entry.getKey(),
length,
EVENT_DATA_COLUMN_MAX_LENGTH
);
}
}
results.put(entry.getKey(), value);
}
}
return results;
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
d48f63772a6afee4b27351fb91a1a861b405730d | c59f24c507d30bbb80f39e9a4f120fec26a43439 | /hbase-src-1.2.1/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/Driver.java | c23fc84e5c3db62ee09451858f4031a88afc6860 | [
"Apache-2.0",
"CC-BY-3.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-protobuf"
] | permissive | fengchen8086/ditb | d1b3b9c8cf3118fb53e7f2720135ead8c8c0829b | d663ecf4a7c422edc4c5ba293191bf24db4170f0 | refs/heads/master | 2021-01-20T01:13:34.456019 | 2017-04-24T13:17:23 | 2017-04-24T13:17:23 | 89,239,936 | 13 | 3 | Apache-2.0 | 2023-03-20T11:57:01 | 2017-04-24T12:54:26 | Java | UTF-8 | Java | false | false | 1,833 | java | /**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.mapred;
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.classification.InterfaceStability;
import org.apache.hadoop.util.ProgramDriver;
import com.google.common.annotations.VisibleForTesting;
/**
* Driver for hbase mapreduce jobs. Select which to run by passing name of job
* to this main.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.TOOLS)
@InterfaceStability.Stable
public class Driver {
private static ProgramDriver pgd = new ProgramDriver();
@VisibleForTesting
static void setProgramDriver(ProgramDriver pgd0) {
pgd = pgd0;
}
/**
* @param args
* @throws Throwable
*/
public static void main(String[] args) throws Throwable {
pgd.addClass(RowCounter.NAME, RowCounter.class, "Count rows in HBase table");
ProgramDriver.class.getMethod("driver", new Class[] { String[].class })
.invoke(pgd, new Object[] { args });
}
}
| [
"fengchen8086@gmail.com"
] | fengchen8086@gmail.com |
c584dce50ad9ab5052d7d603d56b2af526013e3b | 409431babb848b7669ae89aec7af4141bd37d3db | /src/test/java/manage/test/MessageTest.java | a182bd5b4c486fc76e4b3290c9dbacf3aaaab59d | [
"Apache-2.0"
] | permissive | zhaoshiling1017/pms | 70ad383c4d2e4b629ce9b02966ee22a1c7912a63 | 590fef70fb6664a6e76b65e173e60293e099282b | refs/heads/master | 2021-01-12T00:17:39.830450 | 2017-01-12T03:03:29 | 2017-01-12T03:03:29 | 78,702,115 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,265 | java | package manage.test;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import com.alibaba.fastjson.JSON;
import com.ducetech.framework.service.UserService;
import com.ducetech.pms.model.Message;
import com.ducetech.pms.model.MsgRole;
import com.ducetech.pms.service.MessageService;
import com.ducetech.pms.service.MsgRoleService;
@WebAppConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext.xml")
public class MessageTest {
@Autowired
MessageService messageService;
@Autowired
UserService userService;
@Autowired
MsgRoleService msgRoleService;
/*@Test
public void readMessage(){
MsgRole msgRole = msgRoleService.getMsgRoleByMsgId("2");
msgRole.setStatus("1");
msgRole.setReadTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
msgRoleService.updateMsgRole(msgRole);
}*/
@Test
public void delMsgRole(){
MsgRole msgRole = msgRoleService.getMsgRoleById("1");
msgRole.setIsDeleted("1");
msgRole.setDelTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
msgRoleService.deleteMsgRole(msgRole);
}
/**
*
* @Title: delMessage
* @Description: 删除集团消息(假删除)
* @param 设定文件
* @return void 返回类型
* @throws
*/
@Test
public void delMessage(){
Message msg = messageService.getMessageById("1");
System.out.println(JSON.toJSONString(msg));
msg.setIsDeleted("1");
msg.setDelTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
messageService.deleteMessage(msg);
}
/**
*
* @Title: updateMsgRole
* @Description: 更新以读未读状态
* @param 设定文件
* @return void 返回类型
* @throws
*/
//@Test
public void updateMsgRole(){
MsgRole msgRole = msgRoleService.getMsgRoleById("1");
msgRole.setStatus("1");
msgRole.setReadTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
msgRoleService.updateMsgRole(msgRole);
}
/**
*
* @Title: getMessage
* @Description: 获得消息
* @param 设定文件
* @return void 返回类型
* @throws
*/
//@Test
public void getMessage(){
Message message = messageService.getMessageById("1");
System.out.println(JSON.toJSONString(message));
}
/**
*
* @Title: getMsgRole
* @Description: 获得所有人员消息
* @param 设定文件
* @return void 返回类型
* @throws
*/
//@Test
// public void getMsgRole(){
// MsgRole msgRole = new MsgRole();
// List<MsgRole> msgRoles = msgRoleService.getMsgRoles(msgRole);
// System.out.println(JSON.toJSONString(msgRoles));
// }
/**
*
* @Title: saveMessage
* @Description: 增加一条消息
* @param 设定文件
* @return void 返回类型
* @throws
*/
//@Test
public void saveMessage(){
Message message = new Message();
message.setMsgTitle("明天放假 !!!");
message.setContent("因为明天天气好,所以决定放假 一天。");
message.setPublishTime(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
message.setPublisherId("1");
message.setIsDeleted("0");
messageService.addMessage(message);
System.out.println(message.getMsgId());
}
/**
*
* @Title: msgRole
* @Description: 给人员插入消息
* @param 设定文件
* @return void 返回类型
* @throws
*/
//@Test
public void msgRole(){
Message message = new Message();
message.setMsgTitle("明天放假 !!!");
message.setContent("因为明天天气好,所以决定放假 一天。");
message.setPublishTime(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
message.setPublisherId("1");
message.setIsDeleted("0");
messageService.addMessage(message);
List<String> list = new ArrayList<String>();
list.add("1");
list.add("2");
list.add("3");
list.add("4");
list.add("5");
Set<String> users = new HashSet<String>();
// List<User> users = new ArrayList<User>();
for(int i=0;i<list.size();i++){
if(userService.getUsersByRoleId(list.get(i)).size()>0){
for (int j=0;j<userService.getUsersByRoleId(list.get(i)).size();j++) {
System.out.println(userService.getUsersByRoleId(list.get(i)).get(j).getUserId());
users.add(userService.getUsersByRoleId(list.get(i)).get(j).getUserId());
}
}
}
for (String userId:users) {
MsgRole msgRole = new MsgRole();
msgRole.setMsgId(message.getMsgId());
msgRole.setUserId(userId);
msgRole.setStatus("0");
msgRole.setUserName(userService.getUserByUserId(userId).getName());
msgRoleService.addMsgRole(msgRole);
}
// msgRoleService.getMsgRole(list, message);
// try {
// Thread.sleep(10000);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
message.setStatus("1");
// messageService.updateMessage(message);
System.out.println("结束");
}
}
| [
"lenzhao@yahoo.com"
] | lenzhao@yahoo.com |
2f3fb1eb4b657bf7980922699bdb904e36188ab2 | a58646f1367cb6208a9b1c11393c61cd3f91658b | /oil/src/main/java/com/ysxsoft/grainandoil/view/InviteQrcodeActivity.java | 934243c92adc4fcc7f030ea72ee61c7a9ff5f102 | [] | no_license | huguangcai/OilProject | d7ff3faba9957ade04b0ce6f248dc0a6a2340434 | a0f2559ca53883d9dc2aab402de40d2af0d977cf | refs/heads/master | 2020-08-25T00:59:32.953145 | 2019-10-23T01:03:08 | 2019-10-23T01:03:08 | 216,938,368 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,687 | java | package com.ysxsoft.grainandoil.view;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.umeng.socialize.ShareAction;
import com.umeng.socialize.UMShareAPI;
import com.umeng.socialize.UMShareListener;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.media.UMImage;
import com.umeng.socialize.media.UMWeb;
import com.umeng.socialize.utils.SocializeUtils;
import com.ysxsoft.grainandoil.R;
import com.ysxsoft.grainandoil.utils.BaseActivity;
import com.ysxsoft.grainandoil.widget.ShareDialog;
public class InviteQrcodeActivity extends BaseActivity {
private Button btn_share_invitation;
private ImageView img_qrcode;
private TextView tv_invitation_code;
private int stateBar;
private ProgressDialog dialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.invatation_qrcode_layout);
setHalfTransparent();
setFitSystemWindow(false);
stateBar = getStateBar();
dialog = new ProgressDialog(this);
img_qrcode = getViewById(R.id.img_qrcode);
tv_invitation_code = getViewById(R.id.tv_invitation_code);
btn_share_invitation = getViewById(R.id.btn_share_invitation);
btn_share_invitation.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final ShareDialog dialog = new ShareDialog(mContext);
ImageView img_share_wechat = dialog.findViewById(R.id.img_share_wechat);
img_share_wechat.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// startActivity(ShareRegisterActivity.class);
// showToastMessage("分享到微信");
shareUrl();
dialog.dismiss();
}
});
dialog.show();
}
});
}
public void shareUrl(){
UMWeb web = new UMWeb("https://lanhuapp.com/web/#/item/board?pid=764865c0-f911-48f3-b638-942de26c2ed8");
web.setTitle("This is wechat title");
web.setThumb(new UMImage(this, R.mipmap.img_normal_head));
web.setDescription("my description");
new ShareAction(InviteQrcodeActivity.this).withMedia(web )
.setPlatform(SHARE_MEDIA.WEIXIN)
.setCallback(shareListener).share();
}
private UMShareListener shareListener = new UMShareListener() {
@Override
public void onStart(SHARE_MEDIA platform) {
SocializeUtils.safeShowDialog(dialog);
}
@Override
public void onResult(SHARE_MEDIA platform) {
showToastMessage("成功了");
SocializeUtils.safeCloseDialog(dialog);
}
@Override
public void onError(SHARE_MEDIA platform, Throwable t) {
SocializeUtils.safeCloseDialog(dialog);
showToastMessage("失败"+t.getMessage());
}
@Override
public void onCancel(SHARE_MEDIA platform) {
SocializeUtils.safeCloseDialog(dialog);
showToastMessage("取消了");
}
};
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
UMShareAPI.get(this).onActivityResult(requestCode,resultCode,data);
}
}
| [
"2694675654@qq.com"
] | 2694675654@qq.com |
3987fede6209dfe0a83e5279d7d65434de5e74a8 | 4da340a6db0eb1d845fec6aaf6b75a6871987eea | /org.adichatz.engine/src/org/adichatz/engine/xjc/TableStatusBar.java | 24d3820f04c764bc6cb19f3355df829a29b9cd89 | [] | no_license | YvesDrumbonnet/Adichatz-RCP-Eclipse | 107bbf784407a6167729e9ed82c5546f3f8e3b5d | 359c430f6daec55cab93a63d08c669fcd05dea84 | refs/heads/master | 2023-08-26T02:06:25.194503 | 2020-04-28T15:49:51 | 2020-04-28T15:49:51 | 256,515,394 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 4,231 | java | //
// Ce fichier a été généré par l'implémentation de référence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b130911.1802
// Voir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Toute modification apportée à ce fichier sera perdue lors de la recompilation du schéma source.
// Généré le : 2020.01.22 à 11:02:22 AM CET
//
package org.adichatz.engine.xjc;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Classe Java pour tableStatusBar complex type.
*
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
*
* <pre>
* <complexType name="tableStatusBar">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" />
* <attribute name="text" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="bundleFile" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="className" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "tableStatusBar")
public class TableStatusBar
implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlAttribute(name = "id", required = true)
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NCName")
protected String id;
@XmlAttribute(name = "text", required = true)
protected String text;
@XmlAttribute(name = "bundleFile", required = true)
protected String bundleFile;
@XmlAttribute(name = "className", required = true)
protected String className;
/**
* Obtient la valeur de la propriété id.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Définit la valeur de la propriété id.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Obtient la valeur de la propriété text.
*
* @return
* possible object is
* {@link String }
*
*/
public String getText() {
return text;
}
/**
* Définit la valeur de la propriété text.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setText(String value) {
this.text = value;
}
/**
* Obtient la valeur de la propriété bundleFile.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBundleFile() {
return bundleFile;
}
/**
* Définit la valeur de la propriété bundleFile.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBundleFile(String value) {
this.bundleFile = value;
}
/**
* Obtient la valeur de la propriété className.
*
* @return
* possible object is
* {@link String }
*
*/
public String getClassName() {
return className;
}
/**
* Définit la valeur de la propriété className.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setClassName(String value) {
this.className = value;
}
}
| [
"yves@adichatz.org"
] | yves@adichatz.org |
34bbc80d74c99463a8dbdf59c52d803a3177678a | e3d0f7f75e4356413d05ba78e14c484f8555b2b5 | /azure-resourcemanager-hybrid/src/main/java/com/azure/resourcemanager/hybrid/network/implementation/BackendAddressPoolImpl.java | bb201b28c14c7b149a78e4c2d810bb6b049e297d | [
"MIT"
] | permissive | weidongxu-microsoft/azure-stack-java-samples | 1df227502c367f128916f121ccc0f5bc77b045e5 | afdfd0ed220f2f8a603c6fa5e16311a7842eb31c | refs/heads/main | 2023-04-04T12:24:07.405360 | 2021-04-07T08:06:00 | 2021-04-07T08:06:00 | 337,593,216 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,946 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.hybrid.network.implementation;
import com.azure.core.management.SubResource;
import com.azure.resourcemanager.hybrid.network.fluent.models.BackendAddressPoolInner;
import com.azure.resourcemanager.hybrid.network.fluent.models.NetworkInterfaceIpConfigurationInner;
import com.azure.resourcemanager.hybrid.network.models.BackendAddressPool;
import com.azure.resourcemanager.hybrid.network.models.NetworkInterfaceIpConfiguration;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
public final class BackendAddressPoolImpl implements BackendAddressPool {
private BackendAddressPoolInner innerObject;
private final com.azure.resourcemanager.hybrid.network.NetworkManager serviceManager;
BackendAddressPoolImpl(
BackendAddressPoolInner innerObject,
com.azure.resourcemanager.hybrid.network.NetworkManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
public String id() {
return this.innerModel().id();
}
public String name() {
return this.innerModel().name();
}
public String etag() {
return this.innerModel().etag();
}
public List<NetworkInterfaceIpConfiguration> backendIpConfigurations() {
List<NetworkInterfaceIpConfigurationInner> inner = this.innerModel().backendIpConfigurations();
if (inner != null) {
return Collections
.unmodifiableList(
inner
.stream()
.map(inner1 -> new NetworkInterfaceIpConfigurationImpl(inner1, this.manager()))
.collect(Collectors.toList()));
} else {
return Collections.emptyList();
}
}
public List<SubResource> loadBalancingRules() {
List<SubResource> inner = this.innerModel().loadBalancingRules();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
return Collections.emptyList();
}
}
public SubResource outboundRule() {
return this.innerModel().outboundRule();
}
public List<SubResource> outboundRules() {
List<SubResource> inner = this.innerModel().outboundRules();
if (inner != null) {
return Collections.unmodifiableList(inner);
} else {
return Collections.emptyList();
}
}
public String provisioningState() {
return this.innerModel().provisioningState();
}
public BackendAddressPoolInner innerModel() {
return this.innerObject;
}
private com.azure.resourcemanager.hybrid.network.NetworkManager manager() {
return this.serviceManager;
}
}
| [
"weidxu@microsoft.com"
] | weidxu@microsoft.com |
fc38263aa6ee9647ab6fefd7d8a976e82b055d39 | 028cbe18b4e5c347f664c592cbc7f56729b74060 | /v2/appserv-tests/devtests/deployment/jsr88/misc/exampleFromJ2EETutorial/cb/server/src/com/sun/cb/messages/CBMessages_en.java | b4edf48315fcc68c82232d088b5aa320ac2114f9 | [] | no_license | dmatej/Glassfish-SVN-Patched | 8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e | 269e29ba90db6d9c38271f7acd2affcacf2416f1 | refs/heads/master | 2021-05-28T12:55:06.267463 | 2014-11-11T04:21:44 | 2014-11-11T04:21:44 | 23,610,469 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,292 | java | /*
* Copyright (c) 2003 Sun Microsystems, Inc. All rights reserved. U.S.
* Government Rights - Commercial software. Government users are subject
* to the Sun Microsystems, Inc. standard license agreement and
* applicable provisions of the FAR and its supplements. Use is subject
* to license terms.
*
* This distribution may include materials developed by third parties.
* Sun, Sun Microsystems, the Sun logo, Java and J2EE are trademarks
* or registered trademarks of Sun Microsystems, Inc. in the U.S. and
* other countries.
*
* Copyright (c) 2003 Sun Microsystems, Inc. Tous droits reserves.
*
* Droits du gouvernement americain, utilisateurs gouvernementaux - logiciel
* commercial. Les utilisateurs gouvernementaux sont soumis au contrat de
* licence standard de Sun Microsystems, Inc., ainsi qu'aux dispositions
* en vigueur de la FAR (Federal Acquisition Regulations) et des
* supplements a celles-ci. Distribue par des licences qui en
* restreignent l'utilisation.
*
* Cette distribution peut comprendre des composants developpes par des
* tierces parties. Sun, Sun Microsystems, le logo Sun, Java et J2EE
* sont des marques de fabrique ou des marques deposees de Sun
* Microsystems, Inc. aux Etats-Unis et dans d'autres pays.
*/
package com.sun.cb.messages;
import java.util.*;
public class CBMessages_en extends ListResourceBundle {
public Object[][] getContents() {
return contents;
}
static final Object[][] contents = {
{"ServerError", "Your request cannot be completed. The server got the following error: "},
{"TitleServerError", "Server Error"},
{"TitleOrderForm", "Order Form"},
{"TitleCheckoutForm", "Checkout Form"},
{"TitleCheckoutAck", "Confirmation"},
{"OrderInstructions", "Enter the amount of coffee and click Update to update the totals.<br>Click Checkout to proceed with your order. "},
{"OrderForm", "OrderForm"},
{"Price", "Price"},
{"Quantity", "Quantity"},
{"Total", "Total"},
{"Update", "Update"},
{"Checkout", "Checkout"},
{"CheckoutInstructions", "To complete your order, fill in the form and click Submit."},
{"YourOrder", "Your order totals "},
{"CheckoutForm", "Checkout Form"},
{"FirstName", "First Name"},
{"FirstNameError", "Please enter your first name."},
{"LastName", "Last Name"},
{"LastNameError", "Please enter your last name."},
{"EMail", " E-Mail"},
{"EMailError", "Please enter a valid e-mail address."},
{"PhoneNumber", "Phone Number"},
{"AreaCodeError", "Please enter your area code."},
{"PhoneNumberError", "Please enter your phone number."},
{"Street", "Street"},
{"StreetError", "Please enter your street."},
{"City", "City"},
{"CityError", "Please enter your city."},
{"State", "State"},
{"StateError", "Please enter your state."},
{"Zip", "Zip"},
{"ZipError", "Please enter a valid zip code."},
{"CCOption", "Credit Card"},
{"CCNumber", "Credit Card Number"},
{"CCNumberError", "Please enter your credit card number."},
{"Submit", "Submit"},
{"Reset", "Reset"},
{"ItemPrice", "Price"},
{"OrderConfirmed", "Your order has been confirmed."},
{"ShipDate", "Ship Date"},
{"Items", "Items"},
{"Coffee", "Coffee"},
{"Pounds", "Pounds"},
{"ContinueShopping", "Continue Shopping"}
};
}
| [
"kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] | kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5 |
b5c10b69565be4e5a6ce8de6e559995780510339 | 2ee9a8936f889bade976b475d5ed257f49f8a32f | /core/src/main/java/com/huawei/openstack4j/model/workflow/builder/WorkflowExecutionBuilder.java | 346967e027483d9e26317d7fdbf9ff95fe1d7d39 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | huaweicloud/huaweicloud-sdk-java | f44532a5e6eae867e9620923a9467ed431d13611 | c1372d4be2d86382dfd20ccc084ae66c5ca4a4ce | refs/heads/master | 2023-09-01T06:10:00.487173 | 2022-09-01T01:50:12 | 2022-09-01T01:50:12 | 148,595,939 | 49 | 45 | NOASSERTION | 2023-07-18T02:12:39 | 2018-09-13T07:01:08 | Java | UTF-8 | Java | false | false | 3,154 | java | /*******************************************************************************
* Copyright 2016 ContainX and OpenStack4j
*
* 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.
*******************************************************************************/
/*******************************************************************************
* Huawei has modified this source file.
* Copyright 2018 Huawei Technologies Co.,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
* *******************************************************************************/
package com.huawei.openstack4j.model.workflow.builder;
import com.huawei.openstack4j.common.Buildable.Builder;
import com.huawei.openstack4j.model.workflow.WorkflowExecution;
/**
* Builder for a {@link WorkflowExecution} model class
*
* @author Renat Akhmerov
*/
public interface WorkflowExecutionBuilder extends Builder<WorkflowExecutionBuilder, WorkflowExecution> {
/**
* @see WorkflowExecution#getId()
*/
WorkflowExecutionBuilder id(String id);
// TODO(rakhmerov): add all methods
}
| [
"289228042@qq.com"
] | 289228042@qq.com |
858b0526b8ae54fe75a56120d4f2385fd47ad2c6 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/14/14_5c4b00a45be92ab54ecae6b324cef899f173f09a/CJInput/14_5c4b00a45be92ab54ecae6b324cef899f173f09a_CJInput_s.java | 95e7140a4b3df4d9ee7c15561743486505f32ebe | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 7,261 | java | package idv.Zero.KerKerInput.Methods;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.view.KeyEvent;
import idv.Zero.KerKerInput.KerKerInputCore;
import idv.Zero.KerKerInput.Keyboard;
import idv.Zero.KerKerInput.R;
public class CJInput extends idv.Zero.KerKerInput.IKerKerInputMethod {
private StringBuilder inputBufferRaw = new StringBuilder();
private List<CharSequence> _currentCandidates;
private String _dbpath;
private int _currentPage;
private int _totalPages;
private HashMap<CharSequence, CharSequence> keyNames;
private SQLiteDatabase db;
private boolean copying = false;
public void initInputMethod(KerKerInputCore core) {
super.initInputMethod(core);
_currentPage = 0;
_currentCandidates = new ArrayList<CharSequence>();
final Context c = core.getFrontend();
_dbpath = c.getDatabasePath("cj5.db").toString();
keyNames = new HashMap<CharSequence, CharSequence>();
try
{
db = SQLiteDatabase.openDatabase(_dbpath, null, SQLiteDatabase.OPEN_READONLY);
loadKeyNames();
db.close();
}
catch(SQLiteException ex)
{
db = null;
System.out.println("Error, no database file found. Copying...");
new Thread(new Runnable() {
public void run() {
copying = true;
// Create the database (and the directories required) then close it.
db = c.openOrCreateDatabase("cj5.db", 0, null);
db.close();
try {
OutputStream dos = new FileOutputStream(_dbpath);
InputStream dis = c.getResources().openRawResource(R.raw.cj5);
byte[] buffer = new byte[32768];
while (dis.read(buffer) > 0)
{
dos.write(buffer);
}
dos.flush();
dos.close();
dis.close();
} catch (IOException e) {
e.printStackTrace();
}
db = SQLiteDatabase.openDatabase(_dbpath, null, SQLiteDatabase.OPEN_READONLY);
db.setLocale(Locale.TRADITIONAL_CHINESE);
loadKeyNames();
copying = false;
}
}).start();
}
}
public void onEnterInputMethod()
{
if (!copying)
{
db = SQLiteDatabase.openDatabase(_dbpath, null, SQLiteDatabase.OPEN_READONLY);
db.setLocale(Locale.TRADITIONAL_CHINESE);
}
inputBufferRaw.delete(0, inputBufferRaw.length());
updateCandidates();
}
public void onLeaveInputMethod()
{
if (db != null)
db.close();
}
public String getName()
{
return "倉頡五代";
}
public Keyboard getDesiredKeyboard() {
return new Keyboard(_core.getFrontend(), R.xml.kb_cj, R.id.mode_normal);
}
public void commitCurrentComposingBuffer() {
commitText(getCompositeString());
}
public boolean onKeyEvent(int keyCode, int[] keyCodes) {
return handleCJInput(keyCode, keyCodes);
}
private boolean handleCJInput(int keyCode, int[] keyCodes) {
if (keyCode == Keyboard.KEYCODE_DELETE)
{
if (inputBufferRaw.length() > 0)
{
inputBufferRaw.deleteCharAt(inputBufferRaw.length() - 1);
}
else
_core.getFrontend().sendDownUpKeyEvents(KeyEvent.KEYCODE_DEL);
}
else if (keyCode == 10)
{
if (inputBufferRaw.length() > 0)
commitText(getCompositeString());
else
_core.getFrontend().sendKeyChar((char) keyCode);
}
else if(((keyCode >= KeyEvent.KEYCODE_0 && keyCode <= KeyEvent.KEYCODE_9) || (keyCode == 32)) && inputBufferRaw.length() > 0)
{
if (keyCode == 32)
{
if (_currentCandidates.size() > 0)
keyCode = KeyEvent.KEYCODE_0;
else
_core.getFrontend().sendKeyChar((char) keyCode);
}
if (keyCode >= KeyEvent.KEYCODE_0 && keyCode <= KeyEvent.KEYCODE_9)
{
int CANDIDATES_PER_PAGE = (_currentCandidates.size() / _totalPages);
if ((_currentPage * CANDIDATES_PER_PAGE + keyCode - KeyEvent.KEYCODE_0 - 1) < _currentCandidates.size())
{
commitCandidate(_currentPage * CANDIDATES_PER_PAGE + keyCode - KeyEvent.KEYCODE_0);
inputBufferRaw.delete(0, inputBufferRaw.length());
}
}
}
else
{
char c = (char)keyCode;
inputBufferRaw.append(c);
}
_core.setCompositeBuffer(getCompositeString());
updateCandidates();
return true;
}
private CharSequence getCompositeString() {
StringBuilder str = new StringBuilder();
int length = inputBufferRaw.length();
for(int i=0;i<length;i++)
str.append(keyNames.get(Character.toString(inputBufferRaw.charAt(i))));
return str.toString();
}
private void updateCandidates() {
if (inputBufferRaw.length() == 0)
{
_core.hideCandidatesView();
return;
}
if (db == null)
return;
try
{
Cursor currentQuery = db.rawQuery("Select val from changjei5 where key >= '" + inputBufferRaw.toString() + "' AND key < '" + inputBufferRaw.toString() + "zzz'", null);
if (currentQuery.getCount() == 0)
{
inputBufferRaw.deleteCharAt(inputBufferRaw.length() - 1);
_currentCandidates.clear();
_core.setCompositeBuffer(getCompositeString());
_core.showPopup(R.string.no_such_mapping);
_core.hideCandidatesView();
updateCandidates();
return;
}
else
{
int count = Math.min(currentQuery.getCount(), 50);
int colIdx = currentQuery.getColumnIndex("val");
_currentCandidates = new ArrayList<CharSequence>(count);
currentQuery.moveToNext();
for(int i=0;i<count;i++)
{
String ca = currentQuery.getString(colIdx);
_currentCandidates.add(ca);
currentQuery.moveToNext();
}
_core.setCandidates(_currentCandidates);
_core.showCandidatesView();
}
}
catch(Exception e) {}
finally
{
}
}
public void commitCandidate(int selectedCandidate)
{
commitText(_currentCandidates.get(selectedCandidate));
}
private void commitText(CharSequence str)
{
_core.getConnection().commitText(str, 1);
_core.hideCandidatesView();
inputBufferRaw.delete(0, inputBufferRaw.length());
}
public void setTotalPages(int totalPages)
{
_totalPages = totalPages;
}
public void setCurrentPage(int currentPage)
{
_currentPage = currentPage;
}
private void loadKeyNames()
{
if (db == null)
return;
Cursor currentQuery = db.rawQuery("Select * from keyname", null);
if (currentQuery.getCount() == 0)
return;
else
{
int count = currentQuery.getCount();
int colKey = currentQuery.getColumnIndex("key");
int colVal = currentQuery.getColumnIndex("val");
currentQuery.moveToNext();
for(int i=0;i<count;i++)
{
keyNames.put(currentQuery.getString(colKey), currentQuery.getString(colVal));
currentQuery.moveToNext();
}
}
currentQuery.close();
// Make sure if user pressed any keys during database init gets reflected.
_core.setCompositeBuffer(getCompositeString());
updateCandidates();
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
922ffd695a2ec1e71e88a675f857c855daf88f08 | bfe1a70857991385724bb50ea4b28d817c72abe6 | /blackbox-core/src/test/java/jp/ats/blackbox/test/GroupHandlerTest.java | 0ed60534b315791ca82107f4ecbade331f69dd9b | [] | no_license | ats-jp/blackbox | 35e117f515f4fa3ba998468f2201e9620b046d30 | c8b321ea42bd375e3b836df484a29b585ddc20a2 | refs/heads/master | 2022-09-28T23:56:29.195642 | 2022-01-04T16:11:16 | 2022-01-04T16:11:16 | 159,038,816 | 0 | 0 | null | 2022-09-08T00:56:06 | 2018-11-25T14:13:47 | Java | UTF-8 | Java | false | false | 1,312 | java | package jp.ats.blackbox.test;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import org.blendee.util.Blendee;
import jp.ats.blackbox.common.U;
import jp.ats.blackbox.core.persistence.GroupHandler;
import jp.ats.blackbox.core.persistence.GroupHandler.RegisterRequest;
import jp.ats.blackbox.core.persistence.SecurityValues;
public class GroupHandlerTest {
static final AtomicInteger counter = new AtomicInteger();
public static void main(String[] args) {
JournalCommon.startWithLog();
register();
SecurityValues.end();
}
public static UUID register() {
var req = new RegisterRequest();
req.name = name();
req.parent_id = U.NULL_ID;
req.org_id = U.NULL_ID;
req.props = Optional.of("{}");
UUID[] id = { null };
Blendee.execute(t -> {
id[0] = GroupHandler.register(req, U.NULL_ID);
});
return id[0];
}
static UUID register(UUID parentId) {
var req = new RegisterRequest();
req.name = name();
req.parent_id = parentId;
req.org_id = U.NULL_ID;
UUID[] id = { null };
Blendee.execute(t -> {
id[0] = GroupHandler.register(req, U.NULL_ID);
});
return id[0];
}
private static String name() {
return "test-" + counter.getAndIncrement();
}
}
| [
"ats.t.chiba@gmail.com"
] | ats.t.chiba@gmail.com |
7fab97693befbcc630ff7d748b41d7e1763ec206 | ab705e3525e0f7c066e83d7637518de84822682b | /app/src/main/java/com/bw/forwardsample/presenter/RegisterAndLoginPresenter.java | 77bc3919047d63dfcd06109ddce24c6d4b5859a6 | [] | no_license | tongchexinfeitao/ForwardSample | 64a9368619bc5099f388befb5272d2cdfd57180b | 4e005253b9fccccbadc6ba0da54dff8343dbb8b3 | refs/heads/master | 2020-12-01T02:35:44.710056 | 2020-01-10T04:00:17 | 2020-01-10T04:00:17 | 230,542,442 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,229 | java | package com.bw.forwardsample.presenter;
import com.bw.forwardsample.base.BasePresenter;
import com.bw.forwardsample.contract.IRegisterAndLoginContract;
import com.bw.forwardsample.model.RegisterAndLoginModel;
import com.bw.forwardsample.model.bean.LoginBean;
import com.bw.forwardsample.model.bean.RegisterBean;
public class RegisterAndLoginPresenter extends BasePresenter<IRegisterAndLoginContract.IView> implements IRegisterAndLoginContract.IPresenter {
private RegisterAndLoginModel registerAndLoginModel;
@Override
protected void initModel() {
registerAndLoginModel = new RegisterAndLoginModel();
}
@Override
public void register(String phone, String pwd) {
registerAndLoginModel.register(phone, pwd, new IRegisterAndLoginContract.IModel.IModelCallback() {
@Override
public void onRegisterSuccess(RegisterBean registerBean) {
view.onRegisterSuccess(registerBean);
}
@Override
public void onRegisterFailure(Throwable throwable) {
view.onRegisterFailure(throwable);
}
@Override
public void onLoginSuccess(LoginBean loginBean) {
view.onLoginSuccess(loginBean);
}
@Override
public void onLoginFailure(Throwable throwable) {
view.onLoginFailure(throwable);
}
});
}
@Override
public void login(String phone, String pwd) {
registerAndLoginModel.login(phone, pwd, new IRegisterAndLoginContract.IModel.IModelCallback() {
@Override
public void onRegisterSuccess(RegisterBean registerBean) {
view.onRegisterSuccess(registerBean);
}
@Override
public void onRegisterFailure(Throwable throwable) {
view.onRegisterFailure(throwable);
}
@Override
public void onLoginSuccess(LoginBean loginBean) {
view.onLoginSuccess(loginBean);
}
@Override
public void onLoginFailure(Throwable throwable) {
view.onLoginFailure(throwable);
}
});
}
}
| [
"tongchexinfeitao@sina.cn"
] | tongchexinfeitao@sina.cn |
806b793adfd0ba07d1d78ce55e8bb9501d6c50be | fc321d35e6b04a0f0904547c0419ca53c2a334a3 | /security-app/src/main/java/com/zhy/security/app/ImoocAuthorizationServerConfig.java | b8b79b3d557ea1e5195f8dfcb799d6ce69494d61 | [] | no_license | anhengchangyua/mooc-security | 6e09c946bdec1ac4b1e302451bf5dd722908c3c8 | c106bdbb945b0943f61eb1d7bc71ddddf1166b1a | refs/heads/master | 2021-04-15T08:21:41.733070 | 2018-05-03T08:14:20 | 2018-05-03T08:14:20 | 126,215,863 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 442 | java | package com.zhy.security.app;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
@Configuration
//添加默认的四种授权模式认证,实现了认证服务器
@EnableAuthorizationServer
public class ImoocAuthorizationServerConfig {
}
| [
"188851312@qq.com"
] | 188851312@qq.com |
96c5d163837003e43720c9fff6dc6ce14e52d31f | 80f2a3291e8d7f69dcc980529df42fada4a30546 | /engine_java/000_Engine_G2D/new_java2d_impl/com/g2d/java2d/impl/AwtCanvasAdapter.java | d96d86969c0e4d7a17a99d8d2193b7ec43540532 | [] | no_license | Letractively/cellengine | 5b125d8418df1e108fd4d24557553c23af671aff | 4f79ddc33f0f45c3ac6d3da7ef2eb3b1e97a9ded | refs/heads/master | 2016-08-12T18:40:47.360983 | 2012-12-04T08:57:18 | 2012-12-04T08:57:18 | 46,205,801 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,508 | java | package com.g2d.java2d.impl;
import java.awt.Component;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.Transparency;
import java.awt.image.VolatileImage;
import com.g2d.AnimateCursor;
import com.g2d.display.Stage;
import com.g2d.java2d.CommonAnimateCursor;
import com.g2d.java2d.CommonCanvasAdapter;
public class AwtCanvasAdapter extends CommonCanvasAdapter
{
private VolatileImage vm_buffer;
// --------------------------------------------------------------------------------------------------------------------------
// construction
public AwtCanvasAdapter(Component container, int stage_width, int stage_height)
{
super(container, stage_width, stage_height);
if (container.getFont() != null) {
setDefaultFont(new AwtFont(container.getFont()));
} else {
Graphics g = AwtEngine.getEngine().getGC().createCompatibleImage(1, 1).getGraphics();
setDefaultFont(new AwtFont(g.getFont()));
g.dispose();
}
}
public Image getVMBuffer() {
return vm_buffer;
}
// --------------------------------------------------------------------------------
// substage manag
/**
* 设置场景象素大小
* @param width
* @param height
*/
public void setStageSize(int width, int height)
{
synchronized (this) {
destory_vm_buffer();
super.setStageSize(width, height);
}
}
/**
* 根据parentFrame的大小来设置stage,使得stage刚好包容在parentFrame里
* @param parentFrame
*/
public void fillStageSize(Container parentFrame)
{
synchronized (this) {
if (parentFrame != null) {
setStageSize(
parentFrame.getWidth() - (parentFrame.getInsets().left+parentFrame.getInsets().right),
parentFrame.getHeight()- (parentFrame.getInsets().left+parentFrame.getInsets().right));
getComponent().setSize(getStageWidth(), getStageHeight());
}
}
}
// --------------------------------------------------------------------------------
// game
protected void destory_vm_buffer() {
if (vm_buffer != null) {
vm_buffer.flush();
vm_buffer = null;
System.out.println("CanvasAdapter : destory_vm_buffer");
}
}
protected VolatileImage create_vm_buffer(GraphicsConfiguration gc) {
VolatileImage vm_buffer = gc.createCompatibleVolatileImage(getStageWidth(), getStageHeight(), Transparency.OPAQUE);
System.out.println("CanvasAdapter : create_vm_buffer");
return vm_buffer;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
destory_vm_buffer();
System.out.println(getClass().getName() + " : finalize");
}
@Override
protected void updateStage(java.awt.Graphics2D g, Stage currentStage)
{
GraphicsConfiguration gc = g.getDeviceConfiguration();
if (vm_buffer == null) {
vm_buffer = create_vm_buffer(gc);
} else if (vm_buffer.validate(gc) == VolatileImage.IMAGE_INCOMPATIBLE) {
destory_vm_buffer();
vm_buffer = create_vm_buffer(gc);
}
Graphics2D g2d = vm_buffer.createGraphics();
try
{
if (currentStage != null)
{
AwtGraphics2D awt_g = new AwtGraphics2D(g2d);
awt_g.setClip(0, 0, getStageWidth(), getStageHeight());
currentStage.onUpdate(this, getStageWidth(), getStageHeight());
currentStage.onRender(this, awt_g);
}
} finally {
g2d.dispose();
}
}
}
| [
"wazazhang@3d9cc3ef-9625-0410-a0f0-cde76ce531e7"
] | wazazhang@3d9cc3ef-9625-0410-a0f0-cde76ce531e7 |
560e64fb8107b02129d1050b839beb5dd3b3108e | 9b49bf017fc1cfbdc0355c485c995c8c481496a1 | /dds-bindings/src/main/java/org/openfmb/model/dds/rti/openfmb/commonmodule/DateTimeIntervalSeq.java | fd8eb85c545c80c5ad5170c5640fce34906e6d21 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | pkritpra/openfmb-dds-adapters | b7b25a010f11c99be086253cee9534a71a259358 | 1dc811dcde72082dde2c46420142ebbfe19a2dd3 | refs/heads/master | 2020-04-15T23:11:52.212964 | 2016-02-15T16:44:12 | 2016-02-15T16:44:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,247 | java |
/*
WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY.
This file was generated from .idl using "rtiddsgen".
The rtiddsgen tool is part of the RTI Connext distribution.
For more information, type 'rtiddsgen -help' at a command shell
or consult the RTI Connext manual.
*/
package org.openfmb.model.dds.rti.openfmb.commonmodule;
import java.util.Collection;
import com.rti.dds.infrastructure.Copyable;
import com.rti.dds.util.Enum;
import com.rti.dds.util.Sequence;
import com.rti.dds.util.LoanableSequence;
/**
* A sequence of DateTimeInterval instances.
*/
public final class DateTimeIntervalSeq extends LoanableSequence implements Copyable {
// -----------------------------------------------------------------------
// Package Fields
// -----------------------------------------------------------------------
/**
* When a memory loan has been taken out in the lower layers of
* RTI Data Distribution Service, store a pointer to the native sequence here.
* That way, when we call finish(), we can give the memory back.
*/
/*package*/ transient Sequence _loanedInfoSequence = null;
// -----------------------------------------------------------------------
// Public Fields
// -----------------------------------------------------------------------
// --- Constructors: -----------------------------------------------------
public DateTimeIntervalSeq() {
super(DateTimeInterval.class);
}
public DateTimeIntervalSeq (int initialMaximum) {
super(DateTimeInterval.class, initialMaximum);
}
public DateTimeIntervalSeq (Collection elements) {
super(DateTimeInterval.class, elements);
}
// --- From Copyable: ----------------------------------------------------
/**
* Copy data into <code>this</code> object from another.
* The result of this method is that both <code>this</code>
* and <code>src</code> will be the same size and contain the
* same data.
*
* @param src The Object which contains the data to be copied
* @return <code>this</code>
* @exception NullPointerException If <code>src</code> is null.
* @exception ClassCastException If <code>src</code> is not a
* <code>Sequence</code> OR if one of the objects contained in
* the <code>Sequence</code> is not of the expected type.
* @see com.rti.dds.infrastructure.Copyable#copy_from(java.lang.Object)
*/
public Object copy_from(Object src) {
Sequence typedSrc = (Sequence) src;
final int srcSize = typedSrc.size();
final int origSize = size();
// if this object's size is less than the source, ensure we have
// enough room to store all of the objects
if (getMaximum() < srcSize) {
setMaximum(srcSize);
}
// trying to avoid clear() method here since it allocates memory
// (an Iterator)
// if the source object has fewer items than the current object,
// remove from the end until the sizes are equal
if (srcSize < origSize){
removeRange(srcSize, origSize);
}
// copy the data from source into this (into positions that already
// existed)
for(int i = 0; (i < origSize) && (i < srcSize); i++){
if (typedSrc.get(i) == null){
set(i, null);
} else {
// check to see if our entry is null, if it is, a new instance has to be allocated
if (get(i) == null){
set(i, DateTimeInterval.create());
}
set(i, ((Copyable) get(i)).copy_from(typedSrc.get(i)));
}
}
// copy 'new' DateTimeInterval objects (beyond the original size of this object)
for(int i = origSize; i < srcSize; i++){
if (typedSrc.get(i) == null) {
add(null);
} else {
// NOTE: we need to create a new object here to hold the copy
add(DateTimeInterval.create());
// we need to do a set here since enums aren't truely Copyable
set(i, ((Copyable) get(i)).copy_from(typedSrc.get(i)));
}
}
return this;
}
}
| [
"devans@greenenergycorp.com"
] | devans@greenenergycorp.com |
341700fc8d0f9738b1740cfb95a0a1f1de18f169 | 093dd21c41b5004c22e9f47044f465771ae72b68 | /app/src/main/java/com/vrem/wifianalyzer/MainConfiguration.java | a1ac0ec1a18615a51407461da8e24072e384eead | [
"Apache-2.0"
] | permissive | Blker/WifiAnalyzer | 8bf6cc8bf9091d7cc8abf0d6637ea684dabba63b | 92ed7efa7226ade575d0c6a9d89b9dbc3c4be284 | refs/heads/master | 2021-01-22T06:38:08.021151 | 2016-04-04T23:58:27 | 2016-04-04T23:58:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,093 | java | /*
* Copyright (C) 2015 - 2016 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 com.vrem.wifianalyzer;
import android.support.annotation.NonNull;
import android.support.v4.util.Pair;
import com.vrem.wifianalyzer.wifi.band.WiFiChannel;
import java.util.Locale;
public enum MainConfiguration {
INSTANCE;
private Locale locale;
private Pair<WiFiChannel, WiFiChannel> wiFiChannelPair;
private boolean developmentMode;
private boolean largeScreenLayout;
public Pair<WiFiChannel, WiFiChannel> getWiFiChannelPair() {
return wiFiChannelPair;
}
public void setWiFiChannelPair(@NonNull Pair<WiFiChannel, WiFiChannel> wiFiChannelPair) {
this.wiFiChannelPair = wiFiChannelPair;
}
public Locale getLocale() {
return locale;
}
public void setLocale(@NonNull Locale locale) {
this.locale = locale;
}
public boolean isDevelopmentMode() {
return developmentMode;
}
public void setDevelopmentMode(boolean developmentMode) {
this.developmentMode = developmentMode;
}
public boolean isLargeScreenLayout() {
return largeScreenLayout;
}
public void setLargeScreenLayout(boolean largeScreenLayout) {
this.largeScreenLayout = largeScreenLayout;
}
public boolean isInitialized() {
return locale != null && wiFiChannelPair != null;
}
public void clear() {
locale = null;
wiFiChannelPair = null;
}
}
| [
"VREMSoftwareDevelopment@gmail.com"
] | VREMSoftwareDevelopment@gmail.com |
f904b5e22dab612200227e497e65c5f8e2b81f51 | a61848363d06fd0540066af5b82f956c1144bd1c | /supplier-common/src/main/java/co/yixiang/common/enums/DataSourceType.java | 1e52ae98bf6833335ca3fe1c61e7c799459ff476 | [
"MIT"
] | permissive | WingsII/supplierShop | 7bba4ef576ba7bdeb74d17d7e084cf201790c602 | d95d3b792a8ee4e4d4efa4234acd20da94bd3c2c | refs/heads/master | 2023-07-31T07:14:03.550065 | 2021-06-18T09:27:13 | 2021-06-18T09:27:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 209 | java | package co.yixiang.common.enums;
/**
* 数据源
*
* @author ruoyi
*/
public enum DataSourceType
{
/**
* 主库
*/
MASTER,
/**
* 从库
*/
SLAVE
}
| [
"guchengwuyue@163.com"
] | guchengwuyue@163.com |
b87418ed5e524f4fbd6e13700be50514c95500fb | 09a00394429e4bad33d18299358a54fcd395423d | /gradle/wrapper/dists/gradle-1.12-all/4ff8jj5a73a7zgj5nnzv1ubq0/gradle-1.12/src/scala/org/gradle/api/internal/tasks/scala/DefaultScalaJavaJointCompileSpec.java | b0b393ee9de59c59036e71f950b8d39fd5e46bc6 | [
"Apache-2.0",
"LGPL-2.1-or-later",
"MIT",
"CPL-1.0",
"LGPL-2.1-only",
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | agneske-arter-walter-mostertruck-firetr/pushfish-android | 35001c81ade9bb0392fda2907779c1d10d4824c0 | 09157e1d5d2e33a57b3def177cd9077cd5870b24 | refs/heads/master | 2021-12-02T21:13:04.281907 | 2021-10-18T21:48:59 | 2021-10-18T21:48:59 | 215,611,384 | 0 | 0 | BSD-2-Clause | 2019-10-16T17:58:05 | 2019-10-16T17:58:05 | null | UTF-8 | Java | false | false | 1,911 | java | /*
* Copyright 2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.api.internal.tasks.scala;
import org.gradle.api.internal.tasks.compile.DefaultJavaCompileSpec;
import org.gradle.api.tasks.scala.ScalaCompileOptions;
import java.io.File;
import java.util.Map;
public class DefaultScalaJavaJointCompileSpec extends DefaultJavaCompileSpec implements ScalaJavaJointCompileSpec {
private ScalaCompileOptions options;
private Iterable<File> scalaClasspath;
private Iterable<File> zincClasspath;
private Map<File, File> analysisMap;
public ScalaCompileOptions getScalaCompileOptions() {
return options;
}
public void setScalaCompileOptions(ScalaCompileOptions options) {
this.options = options;
}
public Iterable<File> getScalaClasspath() {
return scalaClasspath;
}
public void setScalaClasspath(Iterable<File> scalaClasspath) {
this.scalaClasspath = scalaClasspath;
}
public Iterable<File> getZincClasspath() {
return zincClasspath;
}
public void setZincClasspath(Iterable<File> zincClasspath) {
this.zincClasspath = zincClasspath;
}
public Map<File, File> getAnalysisMap() {
return analysisMap;
}
public void setAnalysisMap(Map<File, File> analysisMap) {
this.analysisMap = analysisMap;
}
}
| [
"mega@ioexception.at"
] | mega@ioexception.at |
873b9e22d8a29fee90232c86c729b5e6015a1ede | 092c76fcc6c411ee77deef508e725c1b8277a2fe | /hybris/bin/ext-accelerator/acceleratorcms/src/de/hybris/platform/acceleratorcms/component/renderer/impl/CMSParagraphComponentRenderer.java | 144068c18e698d4b30480d2ad31713fda30ce5ef | [
"MIT"
] | permissive | BaggaShivanshu2/hybris-bookstore-tutorial | 4de5d667bae82851fe4743025d9cf0a4f03c5e65 | 699ab7fd8514ac56792cb911ee9c1578d58fc0e3 | refs/heads/master | 2022-11-28T12:15:32.049256 | 2020-08-05T11:29:14 | 2020-08-05T11:29:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,424 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.acceleratorcms.component.renderer.impl;
import de.hybris.platform.acceleratorcms.component.renderer.CMSComponentRenderer;
import de.hybris.platform.cms2.model.contents.components.CMSParagraphComponentModel;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
import org.apache.commons.lang.StringUtils;
/**
* {@link CMSComponentRenderer} implementation handling {@link CMSParagraphComponentModel} instances.
*/
public class CMSParagraphComponentRenderer implements CMSComponentRenderer<CMSParagraphComponentModel>
{
@Override
public void renderComponent(final PageContext pageContext, final CMSParagraphComponentModel component)
throws ServletException, IOException
{
// <div class="content">${content}</div>
final JspWriter out = pageContext.getOut();
out.write("<div class=\"content\">");
out.write(component.getContent() == null ? StringUtils.EMPTY : component.getContent());
out.write("</div>");
}
}
| [
"xelilim@hotmail.com"
] | xelilim@hotmail.com |
3a64be027ea9529c811effacf66d83d656c2768c | 9d199804ea3aca63762a6779570cfb482c605834 | /DigitalSimulatorJavaBinding/java/de/freegroup/util/clazz/MethodNode.java | f40ebcec613188c8388e69231e2c80221aacb9e2 | [] | no_license | hupfdule/DigitalSimulator | 6a9a9e43f2f6a9bab620b0190e8991b6c55e54bb | 3b789dcae9adb977bbed681c4459e74bf5f4bf62 | refs/heads/master | 2020-06-20T06:17:40.835154 | 2015-05-24T06:37:48 | 2015-05-24T06:37:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,614 | java | package de.freegroup.util.clazz;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.lang.reflect.Method;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
/**
* Node representing a method of a Java interface or class.
*
* @author Philllip E. Trewhella
* @version 1.0
*/
public class MethodNode
{
private String methodName = "";
private String jniName = "";
private List parameterList = new ArrayList();
private ClassNode returnType = null;
private boolean ctor = false;
private String jniSignature = "";
private String jniMethodCall = "";
private boolean staticMethod = false;
public MethodNode(Constructor ctor) throws ClassNotFoundException
{
this.ctor = true;
int lastDot = ctor.getName().lastIndexOf( '.' ) + 1;
methodName = ctor.getName().substring( lastDot );
jniName = "<init>";
Class[] parameterTypes = ctor.getParameterTypes();
for ( int i = 0; i < parameterTypes.length; ++i )
parameterList.add( ClassNode.getClassNode( parameterTypes[i].getName() ) );
buildJNISignature();
buildJNIMethodCall();
}
public MethodNode(Method method) throws ClassNotFoundException
{
methodName = method.getName();
jniName = methodName;
staticMethod = Modifier.isStatic( method.getModifiers() );
returnType = ClassNode.getClassNode( method.getReturnType().getName() );
Class[] parameterTypes = method.getParameterTypes();
for ( int i = 0; i < parameterTypes.length; ++i )
parameterList.add( ClassNode.getClassNode( parameterTypes[i].getName() ) );
buildJNISignature();
buildJNIMethodCall();
}
private void buildJNISignature()
{
jniSignature = "(";
Iterator it = parameterList.iterator();
while ( it.hasNext() == true )
jniSignature += ((ClassNode) it.next()).getJNIString();
jniSignature += ")" + (returnType == null ? "V" : returnType.getJNIString() );
}
private void buildJNIMethodCall()
{
if ( returnType == null || returnType.getClassName().equals( "void" ) == true )
{
jniMethodCall = "JNIEnvHelper::Call";
jniMethodCall += (staticMethod == true ? "StaticVoidMethod(" : "VoidMethod(");
}
else
if ( returnType.isPrimitive() == false )
{
jniMethodCall = "return JNIEnvHelper::Call";
jniMethodCall += (staticMethod == true ? "StaticObjectMethod(" : "ObjectMethod(");
}
else
{
jniMethodCall = "return JNIEnvHelper::Call";
if ( staticMethod == true )
jniMethodCall += "Static";
jniMethodCall += Character.toUpperCase( returnType.getClassName().charAt( 0 ) ) + returnType.getClassName().substring( 1 );
jniMethodCall += "Method(";
}
}
public String getName()
{
return methodName;
}
public String getCPPName()
{
return Util.getCPPIdentifier( methodName );
}
public String getJNIName()
{
return jniName;
}
public String getJNISignature()
{
return jniSignature;
}
public Iterator getParameterList()
{
return parameterList.iterator();
}
public ClassNode getReturnType()
{
return returnType;
}
public String getJNIMethodCall()
{
return jniMethodCall;
}
public boolean isStatic()
{
return staticMethod;
}
public String getJavaSignature()
{
String signature = "";
if ( returnType != null )
signature += returnType.getClassName() + " ";
else
if ( ctor == false )
signature += "void ";
signature += methodName + "(";
Iterator it = parameterList.iterator();
while ( it.hasNext() == true )
{
ClassNode node =((ClassNode) it.next());
signature += node.getClassName()+ (it.hasNext() == true ? ", " : "");
}
signature += ");";
return signature;
}
}
| [
"a.herz@freegroup.de"
] | a.herz@freegroup.de |
b00ea1ec60101343451e33698c213c77a5e57e80 | 36b3dd585b149a48f0f6f6bf130734820dbf93d2 | /mall-business/user-center/src/test/java/com/mallplus/pms/service/SysUserServiceTest.java | 73eea49843a2c88e53e475a0a1c6b20be0c764ad | [
"Apache-2.0"
] | permissive | shenzhuan/zscat-me | 5d391e00bb2864bbf4aaca82b845f9f8bacfd38d | 23ac9ab9e97d7d63433887168961881a011f217c | refs/heads/master | 2023-07-23T12:41:19.688624 | 2022-10-18T02:26:50 | 2022-10-18T02:26:50 | 102,570,841 | 218 | 95 | Apache-2.0 | 2023-07-16T05:02:47 | 2017-09-06T06:23:37 | PLpgSQL | UTF-8 | Java | false | false | 1,000 | java | package com.mallplus.pms.service;
import com.mallplus.UserCenterApp;
import com.mallplus.common.model.SysRoleMenu;
import com.mallplus.user.service.ISysRolePermissionService;
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.SpringRunner;
import java.util.ArrayList;
import java.util.List;
/**
* SysUserServiceTest单元测试用例
*
* @author mall
*/
@SpringBootTest(classes = UserCenterApp.class)
@RunWith(SpringRunner.class)
public class SysUserServiceTest {
@Autowired
private ISysRolePermissionService rolePermissionService;
@Test
public void testFindByUsername() {
List<SysRoleMenu> list = new ArrayList<>();
for (int i=1;i<150;i++){
SysRoleMenu r = new SysRoleMenu();
r.setPermissionId(Long.valueOf(i));
r.setRoleId(1L);
list.add(r);
}
rolePermissionService.saveBatch(list);
}
}
| [
"shen@913656048"
] | shen@913656048 |
b7847aa8a172ae049af951715fd9ff41b295aa9c | 3a59bd4f3c7841a60444bb5af6c859dd2fe7b355 | /sources/com/google/android/material/elevation/ElevationOverlayProvider.java | f4550cef1c43eb422f438338d67b6ecac2ea9f81 | [] | no_license | sengeiou/KnowAndGo-android-thunkable | 65ac6882af9b52aac4f5a4999e095eaae4da3c7f | 39e809d0bbbe9a743253bed99b8209679ad449c9 | refs/heads/master | 2023-01-01T02:20:01.680570 | 2020-10-22T04:35:27 | 2020-10-22T04:35:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,555 | java | package com.google.android.material.elevation;
import android.content.Context;
import android.graphics.Color;
import android.view.View;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.core.graphics.ColorUtils;
import com.google.android.material.C1641R;
import com.google.android.material.color.MaterialColors;
import com.google.android.material.internal.ViewUtils;
import com.google.android.material.resources.MaterialAttributes;
public class ElevationOverlayProvider {
private static final float FORMULA_MULTIPLIER = 4.5f;
private static final float FORMULA_OFFSET = 2.0f;
private final int colorSurface;
private final float displayDensity;
private final int elevationOverlayColor;
private final boolean elevationOverlayEnabled;
public ElevationOverlayProvider(@NonNull Context context) {
this.elevationOverlayEnabled = MaterialAttributes.resolveBoolean(context, C1641R.attr.elevationOverlayEnabled, false);
this.elevationOverlayColor = MaterialColors.getColor(context, C1641R.attr.elevationOverlayColor, 0);
this.colorSurface = MaterialColors.getColor(context, C1641R.attr.colorSurface, 0);
this.displayDensity = context.getResources().getDisplayMetrics().density;
}
@ColorInt
public int compositeOverlayWithThemeSurfaceColorIfNeeded(float f, @NonNull View view) {
return compositeOverlayWithThemeSurfaceColorIfNeeded(f + getParentAbsoluteElevation(view));
}
@ColorInt
public int compositeOverlayWithThemeSurfaceColorIfNeeded(float f) {
return compositeOverlayIfNeeded(this.colorSurface, f);
}
@ColorInt
public int compositeOverlayIfNeeded(@ColorInt int i, float f, @NonNull View view) {
return compositeOverlayIfNeeded(i, f + getParentAbsoluteElevation(view));
}
@ColorInt
public int compositeOverlayIfNeeded(@ColorInt int i, float f) {
return (!this.elevationOverlayEnabled || !isThemeSurfaceColor(i)) ? i : compositeOverlay(i, f);
}
@ColorInt
public int compositeOverlay(@ColorInt int i, float f, @NonNull View view) {
return compositeOverlay(i, f + getParentAbsoluteElevation(view));
}
@ColorInt
public int compositeOverlay(@ColorInt int i, float f) {
float calculateOverlayAlphaFraction = calculateOverlayAlphaFraction(f);
return ColorUtils.setAlphaComponent(MaterialColors.layer(ColorUtils.setAlphaComponent(i, 255), this.elevationOverlayColor, calculateOverlayAlphaFraction), Color.alpha(i));
}
public int calculateOverlayAlpha(float f) {
return Math.round(calculateOverlayAlphaFraction(f) * 255.0f);
}
public float calculateOverlayAlphaFraction(float f) {
if (this.displayDensity <= 0.0f || f <= 0.0f) {
return 0.0f;
}
return Math.min(((((float) Math.log1p((double) (f / this.displayDensity))) * FORMULA_MULTIPLIER) + FORMULA_OFFSET) / 100.0f, 1.0f);
}
public boolean isThemeElevationOverlayEnabled() {
return this.elevationOverlayEnabled;
}
@ColorInt
public int getThemeElevationOverlayColor() {
return this.elevationOverlayColor;
}
@ColorInt
public int getThemeSurfaceColor() {
return this.colorSurface;
}
public float getParentAbsoluteElevation(@NonNull View view) {
return ViewUtils.getParentAbsoluteElevation(view);
}
private boolean isThemeSurfaceColor(@ColorInt int i) {
return ColorUtils.setAlphaComponent(i, 255) == this.colorSurface;
}
}
| [
"joshuahj.tsao@gmail.com"
] | joshuahj.tsao@gmail.com |
e9fd8c9ff692dacdb3ea42a365d39701aaed2518 | f9fd138d5e6f1f23d9aced533b5a3f5ff2b7d6f4 | /Common/src/main/java/com/blamejared/crafttweaker/natives/entity/effect/ExpandMobEffectInstance.java | ca7de61114fda8f09dcbfa207a04b507bb33efbb | [
"MIT"
] | permissive | kindlich/CraftTweaker | fd61116413b274dc6eac2d6f7468095eb04a9a06 | c15ecad34374f09a4917506dc9eb17cf743b792e | refs/heads/1.18 | 2023-08-17T16:30:47.448860 | 2022-05-29T14:45:02 | 2022-05-29T14:45:02 | 109,025,585 | 0 | 0 | MIT | 2023-04-04T09:46:26 | 2017-10-31T16:49:14 | Java | UTF-8 | Java | false | false | 7,111 | java | package com.blamejared.crafttweaker.natives.entity.effect;
import com.blamejared.crafttweaker.api.annotation.ZenRegister;
import com.blamejared.crafttweaker.api.data.MapData;
import com.blamejared.crafttweaker_annotations.annotations.Document;
import com.blamejared.crafttweaker_annotations.annotations.NativeConstructor;
import com.blamejared.crafttweaker_annotations.annotations.NativeTypeRegistration;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.entity.LivingEntity;
import org.openzen.zencode.java.ZenCodeType;
@ZenRegister
@Document("vanilla/api/entity/effect/MobEffectInstance")
@NativeTypeRegistration(value = MobEffectInstance.class, zenCodeName = "crafttweaker.api.entity.effect.MobEffectInstance", constructors = {
@NativeConstructor({
@NativeConstructor.ConstructorParameter(type = MobEffect.class, name = "mobEffect", examples = "<mobeffect:minecraft:haste>")
}),
@NativeConstructor({
@NativeConstructor.ConstructorParameter(type = MobEffect.class, name = "mobEffect", examples = "<mobeffect:minecraft:haste>"),
@NativeConstructor.ConstructorParameter(type = int.class, name = "duration", examples = "100"),
}),
@NativeConstructor({
@NativeConstructor.ConstructorParameter(type = MobEffect.class, name = "mobEffect", examples = "<mobeffect:minecraft:haste>"),
@NativeConstructor.ConstructorParameter(type = int.class, name = "duration", examples = "100"),
@NativeConstructor.ConstructorParameter(type = int.class, name = "amplifier", examples = "2"),
}),
@NativeConstructor({
@NativeConstructor.ConstructorParameter(type = MobEffect.class, name = "mobEffect", examples = "<mobeffect:minecraft:haste>"),
@NativeConstructor.ConstructorParameter(type = int.class, name = "duration", examples = "100"),
@NativeConstructor.ConstructorParameter(type = int.class, name = "amplifier", examples = "2"),
@NativeConstructor.ConstructorParameter(type = boolean.class, name = "ambient", examples = "true"),
@NativeConstructor.ConstructorParameter(type = boolean.class, name = "visible", examples = "false"),
}),
@NativeConstructor({
@NativeConstructor.ConstructorParameter(type = MobEffect.class, name = "mobEffect", examples = "<mobeffect:minecraft:haste>"),
@NativeConstructor.ConstructorParameter(type = int.class, name = "duration", examples = "100"),
@NativeConstructor.ConstructorParameter(type = int.class, name = "amplifier", examples = "2"),
@NativeConstructor.ConstructorParameter(type = boolean.class, name = "ambient", examples = "true"),
@NativeConstructor.ConstructorParameter(type = boolean.class, name = "visible", examples = "false"),
@NativeConstructor.ConstructorParameter(type = boolean.class, name = "showIcon", examples = "false"),
}),
@NativeConstructor({
@NativeConstructor.ConstructorParameter(type = MobEffect.class, name = "mobEffect", examples = "<mobeffect:minecraft:haste>"),
@NativeConstructor.ConstructorParameter(type = int.class, name = "duration", examples = "100"),
@NativeConstructor.ConstructorParameter(type = int.class, name = "amplifier", examples = "2"),
@NativeConstructor.ConstructorParameter(type = boolean.class, name = "ambient", examples = "true"),
@NativeConstructor.ConstructorParameter(type = boolean.class, name = "visible", examples = "false"),
@NativeConstructor.ConstructorParameter(type = boolean.class, name = "showIcon", examples = "false"),
@NativeConstructor.ConstructorParameter(type = MobEffectInstance.class, name = "hiddenEffect", examples = "new MobEffectInstance(<mobeffect:minecraft:haste>, 200, 3)"),
})
})
public class ExpandMobEffectInstance {
@ZenCodeType.Method
public static boolean update(MobEffectInstance internal, MobEffectInstance instance) {
return internal.update(instance);
}
@ZenCodeType.Method
@ZenCodeType.Getter("effect")
public static MobEffect getEffect(MobEffectInstance internal) {
return internal.getEffect();
}
@ZenCodeType.Method
@ZenCodeType.Getter("duration")
public static int getDuration(MobEffectInstance internal) {
return internal.getDuration();
}
@ZenCodeType.Method
@ZenCodeType.Getter("amplifier")
public static int getAmplifier(MobEffectInstance internal) {
return internal.getAmplifier();
}
@ZenCodeType.Method
@ZenCodeType.Getter("ambient")
public static boolean isAmbient(MobEffectInstance internal) {
return internal.isAmbient();
}
@ZenCodeType.Method
@ZenCodeType.Getter("visible")
public static boolean isVisible(MobEffectInstance internal) {
return internal.isVisible();
}
@ZenCodeType.Method
@ZenCodeType.Getter("showIcon")
public static boolean showIcon(MobEffectInstance internal) {
return internal.showIcon();
}
@ZenCodeType.Method
public static boolean tick(MobEffectInstance internal, LivingEntity entity, @ZenCodeType.Optional("null") @ZenCodeType.Nullable Runnable onFinish) {
if(onFinish == null) {
onFinish = () -> {};
}
return internal.tick(entity, onFinish);
}
@ZenCodeType.Method
public static void applyEffect(MobEffectInstance internal, LivingEntity entity) {
internal.applyEffect(entity);
}
@ZenCodeType.Method
@ZenCodeType.Getter("descriptionId")
public static String getDescriptionId(MobEffectInstance internal) {
return internal.getDescriptionId();
}
@ZenCodeType.Method
public static MapData save(MobEffectInstance internal, @ZenCodeType.Optional @ZenCodeType.Nullable MapData data) {
if(data == null) {
data = new MapData();
}
return new MapData(internal.save(data.getInternal()));
}
@ZenCodeType.StaticExpansionMethod
public static MobEffectInstance load(MapData data) {
return MobEffectInstance.load(data.getInternal());
}
@ZenCodeType.Method
public static void setNoCounter(MobEffectInstance internal, boolean noCounter) {
internal.setNoCounter(noCounter);
}
@ZenCodeType.Method
@ZenCodeType.Getter("isNoCounter")
public static boolean isNoCounter(MobEffectInstance internal) {
return internal.isNoCounter();
}
@ZenCodeType.Method
@ZenCodeType.Operator(ZenCodeType.OperatorType.COMPARE)
public static int compareTo(MobEffectInstance internal, MobEffectInstance other) {
return internal.compareTo(other);
}
}
| [
"jaredlll08@gmail.com"
] | jaredlll08@gmail.com |
b38ba46b688ba755abc814cecab2537ccd662e1e | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/android/nfc/cardemulation/ISeSettingsService.java | a611bd91224da386f077b2755c8eb0b8a06ec286 | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,472 | java | package android.nfc.cardemulation;
import android.content.ComponentName;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
public interface ISeSettingsService extends IInterface {
void setSeacActive(ComponentName componentName, boolean z) throws RemoteException;
public static class Default implements ISeSettingsService {
@Override // android.nfc.cardemulation.ISeSettingsService
public void setSeacActive(ComponentName service, boolean foreground) throws RemoteException {
}
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
}
public static abstract class Stub extends Binder implements ISeSettingsService {
private static final String DESCRIPTOR = "android.nfc.cardemulation.ISeSettingsService";
static final int TRANSACTION_setSeacActive = 1;
public Stub() {
attachInterface(this, DESCRIPTOR);
}
public static ISeSettingsService asInterface(IBinder obj) {
if (obj == null) {
return null;
}
IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (iin == null || !(iin instanceof ISeSettingsService)) {
return new Proxy(obj);
}
return (ISeSettingsService) iin;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
@Override // android.os.Binder
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
ComponentName _arg0;
if (code == 1) {
data.enforceInterface(DESCRIPTOR);
if (data.readInt() != 0) {
_arg0 = (ComponentName) ComponentName.CREATOR.createFromParcel(data);
} else {
_arg0 = null;
}
setSeacActive(_arg0, data.readInt() != 0);
reply.writeNoException();
return true;
} else if (code != 1598968902) {
return super.onTransact(code, data, reply, flags);
} else {
reply.writeString(DESCRIPTOR);
return true;
}
}
/* access modifiers changed from: private */
public static class Proxy implements ISeSettingsService {
public static ISeSettingsService sDefaultImpl;
private IBinder mRemote;
Proxy(IBinder remote) {
this.mRemote = remote;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return Stub.DESCRIPTOR;
}
@Override // android.nfc.cardemulation.ISeSettingsService
public void setSeacActive(ComponentName service, boolean foreground) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
if (service != null) {
_data.writeInt(1);
service.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
_data.writeInt(foreground ? 1 : 0);
if (this.mRemote.transact(1, _data, _reply, 0) || Stub.getDefaultImpl() == null) {
_reply.readException();
_reply.recycle();
_data.recycle();
return;
}
Stub.getDefaultImpl().setSeacActive(service, foreground);
} finally {
_reply.recycle();
_data.recycle();
}
}
}
public static boolean setDefaultImpl(ISeSettingsService impl) {
if (Proxy.sDefaultImpl != null || impl == null) {
return false;
}
Proxy.sDefaultImpl = impl;
return true;
}
public static ISeSettingsService getDefaultImpl() {
return Proxy.sDefaultImpl;
}
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
7123df4e8f1f9cf828b6f38bdacb1672373a33fa | ca0e9689023cc9998c7f24b9e0532261fd976e0e | /src/com/tencent/mm/ui/account/RegByMobileRegUI$9.java | deabbfbcb7d43576709b72a73808c25c02386697 | [] | no_license | honeyflyfish/com.tencent.mm | c7e992f51070f6ac5e9c05e9a2babd7b712cf713 | ce6e605ff98164359a7073ab9a62a3f3101b8c34 | refs/heads/master | 2020-03-28T15:42:52.284117 | 2016-07-19T16:33:30 | 2016-07-19T16:33:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 498 | java | package com.tencent.mm.ui.account;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
final class RegByMobileRegUI$9
implements DialogInterface.OnCancelListener
{
RegByMobileRegUI$9(RegByMobileRegUI paramRegByMobileRegUI) {}
public final void onCancel(DialogInterface paramDialogInterface) {}
}
/* Location:
* Qualified Name: com.tencent.mm.ui.account.RegByMobileRegUI.9
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
17651c686b808f99525be9726263c1920aa540b8 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-422-19-7-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/xhtml/filter/XHTMLWhitespaceXMLFilter_ESTest.java | d7bfd4e83e404cf2be385db9c8e26eed2a1f2352 | [] | 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 | 597 | java | /*
* This file was automatically generated by EvoSuite
* Tue Apr 07 00:15:19 UTC 2020
*/
package org.xwiki.rendering.wikimodel.xhtml.filter;
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 XHTMLWhitespaceXMLFilter_ESTest extends XHTMLWhitespaceXMLFilter_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
e57bb77dce5b3007116f042104587c20f4972689 | 21bcd1da03415fec0a4f3fa7287f250df1d14051 | /sources/org/apache/http/p550k0/C15455c.java | 27a999bf100317e6192b0ea4218a8e252ec23147 | [] | no_license | lestseeandtest/Delivery | 9a5cc96bd6bd2316a535271ec9ca3865080c3ec8 | bc3fae8f30804a2520e6699df92c2e6a4a0a7cfc | refs/heads/master | 2022-04-24T12:14:22.396398 | 2020-04-25T21:50:29 | 2020-04-25T21:50:29 | 258,875,870 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,695 | java | package org.apache.http.p550k0;
import java.io.UnsupportedEncodingException;
/* renamed from: org.apache.http.k0.c */
/* compiled from: EncodingUtils */
public final class C15455c {
private C15455c() {
}
/* renamed from: a */
public static String m68493a(byte[] bArr, int i, int i2, String str) {
if (bArr == null) {
throw new IllegalArgumentException("Parameter may not be null");
} else if (str == null || str.length() == 0) {
throw new IllegalArgumentException("charset may not be null or empty");
} else {
try {
return new String(bArr, i, i2, str);
} catch (UnsupportedEncodingException unused) {
return new String(bArr, i, i2);
}
}
}
/* renamed from: a */
public static String m68494a(byte[] bArr, String str) {
if (bArr != null) {
return m68493a(bArr, 0, bArr.length, str);
}
throw new IllegalArgumentException("Parameter may not be null");
}
/* renamed from: a */
public static byte[] m68496a(String str, String str2) {
if (str == null) {
throw new IllegalArgumentException("data may not be null");
} else if (str2 == null || str2.length() == 0) {
throw new IllegalArgumentException("charset may not be null or empty");
} else {
try {
return str.getBytes(str2);
} catch (UnsupportedEncodingException unused) {
return str.getBytes();
}
}
}
/* renamed from: a */
public static byte[] m68495a(String str) {
if (str != null) {
try {
return str.getBytes("US-ASCII");
} catch (UnsupportedEncodingException unused) {
throw new Error("HttpClient requires ASCII support");
}
} else {
throw new IllegalArgumentException("Parameter may not be null");
}
}
/* renamed from: a */
public static String m68492a(byte[] bArr, int i, int i2) {
if (bArr != null) {
try {
return new String(bArr, i, i2, "US-ASCII");
} catch (UnsupportedEncodingException unused) {
throw new Error("HttpClient requires ASCII support");
}
} else {
throw new IllegalArgumentException("Parameter may not be null");
}
}
/* renamed from: a */
public static String m68491a(byte[] bArr) {
if (bArr != null) {
return m68492a(bArr, 0, bArr.length);
}
throw new IllegalArgumentException("Parameter may not be null");
}
}
| [
"zsolimana@uaedomain.local"
] | zsolimana@uaedomain.local |
6c2b2cae17faaed16c0450feadcaaba553a2c504 | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava7/Foo421.java | 71f0aa738ecc82f4202673e15afc61487be808b2 | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package applicationModulepackageJava7;
public class Foo421 {
public void foo0() {
new applicationModulepackageJava7.Foo420().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
1541e66e2f988be48a8cfe342e51493cdf49ba4c | eb665dd6b4edbc75f96825e69479dcc07ee6cb30 | /beancmpr-dido/src/main/java/beancmpr/dido/results/GenericDataResultHandlerFactory.java | 6d9134bf1df5a80963e1388450d8993418354436 | [
"Apache-2.0"
] | permissive | robjg/beancmpr | fa04c5adc34f833044f15f11df8b1188da9a1ebc | ca3fdb7587d036e70adc708452e360a6d2b31876 | refs/heads/master | 2023-02-08T01:19:48.593993 | 2023-02-02T06:29:31 | 2023-02-02T06:29:31 | 7,269,581 | 0 | 0 | Apache-2.0 | 2023-01-23T08:39:44 | 2012-12-21T06:11:25 | Java | UTF-8 | Java | false | false | 2,915 | java | package beancmpr.dido.results;
import org.oddjob.beancmpr.matchables.CompareResultsHandler;
import org.oddjob.beancmpr.matchables.CompareResultsHandlerFactory;
import java.util.function.Consumer;
/**
* @oddjob.description A Result Handler that will generate results as Generic Data.
* Useful for exporting results to CSV, or Excel. Although beancmpr-poi might be
* better for Excel as it colours results according to match type.
*
* @author rob
*
*/
public class GenericDataResultHandlerFactory
implements CompareResultsHandlerFactory {
/**
* @oddjob.property
* @oddjob.description The format of X fields. Must contain one and only one %s which will be replaced
* with the underlying field name.
* @oddjob.required No. Defaults to X_%s.
*/
private String xFieldFormat;
/**
* @oddjob.property
* @oddjob.description The format of Y fields. Must contain one and only one %s which will be replaced
* with the underlying field name.
* @oddjob.required No. Defaults to Y_%s.
*/
private String yFieldFormat;
/**
* @oddjob.property
* @oddjob.description The format of the comparison fields. Must contain one and only one %s which will be replaced
* with the underlying field name.
* @oddjob.required No. Defaults to %s_.
*/
private String comparisonFieldFormat;
/**
* @oddjob.property
* @oddjob.description If true then result data will not be created
* when a comparison results in a match. If false result data
* for all comparisons will be created.
* @oddjob.required No. Defaults to false.
*/
private boolean ignoreMatches;
@Override
public CompareResultsHandler createResultsHandlerTo(Consumer<Object> resultsConsumer) {
return GenericDataResultHandler.withSettings()
.setxFieldFormat(xFieldFormat)
.setyFieldFormat(yFieldFormat)
.setComparisonFieldFormat(comparisonFieldFormat)
.setIgnoreMatches(ignoreMatches)
.setTo(resultsConsumer)
.make();
}
public String getxFieldFormat() {
return xFieldFormat;
}
public void setxFieldFormat(String xFieldFormat) {
this.xFieldFormat = xFieldFormat;
}
public String getyFieldFormat() {
return yFieldFormat;
}
public void setyFieldFormat(String yFieldFormat) {
this.yFieldFormat = yFieldFormat;
}
public String getComparisonFieldFormat() {
return comparisonFieldFormat;
}
public void setComparisonFieldFormat(String comparisonFieldFormat) {
this.comparisonFieldFormat = comparisonFieldFormat;
}
public boolean isIgnoreMatches() {
return ignoreMatches;
}
public void setIgnoreMatches(boolean ignoreMatches) {
this.ignoreMatches = ignoreMatches;
}
@Override
public String toString() {
return "GenericDataResultHandlerFactory{" +
"xFieldFormat='" + xFieldFormat + '\'' +
", yFieldFormat='" + yFieldFormat + '\'' +
", comparisonFieldFormat='" + comparisonFieldFormat + '\'' +
", ignoreMatches=" + ignoreMatches +
'}';
}
}
| [
"rob@rgordon.co.uk"
] | rob@rgordon.co.uk |
7270836344ca14e7bb15645c2585a4b6976aa217 | 9d595014e84e9ca112eae0ddad7bb617220f01dc | /j2se-src/org/freecolandroid/repackaged/javax/swing/border/TitledBorder.java | 4cf37aabc2ffc5dcf09e31ed65a518ae558951d1 | [] | no_license | JumpingYang001/freecol-android | fc002adc267a050a8b8ce87fb07909f796e72911 | de0cdd8835bbed167979a8beb02e70ef79c23360 | refs/heads/master | 2020-07-10T22:48:03.788185 | 2016-11-17T09:27:14 | 2016-11-17T09:27:14 | 74,009,042 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,367 | java | /**
* Copyright (C) 2012 The FreeCol-Android Team
*
* This file is part of FreeCol-Android.
*
* FreeCol-Android 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.
*
* FreeCol 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 FreeCol-Android. If not, see <http://www.gnu.org/licenses/>.
*/
package org.freecolandroid.repackaged.javax.swing.border;
import org.freecolandroid.repackaged.java.awt.Component;
import org.freecolandroid.repackaged.java.awt.Graphics;
import org.freecolandroid.repackaged.java.awt.Insets;
public class TitledBorder implements Border {
private String title;
public void setTitle(String title) {
this.title = title;
}
@Override
public void paintBorder(Component c, Graphics g, int x, int y, int width,
int height) {
// Does nothing
}
@Override
public Insets getBorderInsets(Component c) {
// Does nothing
return new Insets(0, 0, 10, 10);
}
}
| [
"v-zhenpy@microsoft.com"
] | v-zhenpy@microsoft.com |
8156df922a310f6a72e7cb36ffbb246723108e6d | 1c66317651db486181ea4f921ff9a0924737f21e | /archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockNetworkProxyAdmin.java | b46a846d3ab41fa8ed94c451b3e1a2d666adcaf6 | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"MIT",
"GPL-1.0-or-later",
"GPL-2.0-only",
"CDDL-1.0"
] | permissive | apache/archiva | dede022da31e1c8051ab73438e4e86b1f68d6cd9 | 2beaf864901abb337b263662800b3373326bcfd4 | refs/heads/master | 2023-08-25T06:12:24.779893 | 2023-03-20T06:00:55 | 2023-03-20T06:00:55 | 18,627,126 | 325 | 156 | Apache-2.0 | 2023-09-04T22:48:04 | 2014-04-10T07:00:07 | Java | UTF-8 | Java | false | false | 2,101 | java | package org.apache.archiva.mock;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.archiva.admin.model.AuditInformation;
import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.admin.model.beans.NetworkProxy;
import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin;
import java.util.Collections;
import java.util.List;
/**
* @author Olivier Lamy
*/
public class MockNetworkProxyAdmin
implements NetworkProxyAdmin
{
@Override
public List<NetworkProxy> getNetworkProxies()
throws RepositoryAdminException
{
return Collections.emptyList();
}
@Override
public NetworkProxy getNetworkProxy( String networkProxyId )
throws RepositoryAdminException
{
return null;
}
@Override
public void addNetworkProxy( NetworkProxy networkProxy, AuditInformation auditInformation )
throws RepositoryAdminException
{
// no op
}
@Override
public void updateNetworkProxy( NetworkProxy networkProxy, AuditInformation auditInformation )
throws RepositoryAdminException
{
// no op
}
@Override
public void deleteNetworkProxy( String networkProxyId, AuditInformation auditInformation )
throws RepositoryAdminException
{
// no op
}
}
| [
"olamy@apache.org"
] | olamy@apache.org |
09258d928fd7b4195882b294e9e92478a5456dfe | a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9 | /src/main/java/com/alipay/api/domain/InsMktCouponDTO.java | 8ab5f548f172ef88254a43a3bba29674ed828480 | [
"Apache-2.0"
] | permissive | cc-shifo/alipay-sdk-java-all | 38b23cf946b73768981fdeee792e3dae568da48c | 938d6850e63160e867d35317a4a00ed7ba078257 | refs/heads/master | 2022-12-22T14:06:26.961978 | 2020-09-23T04:00:10 | 2020-09-23T04:00:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,292 | java | package com.alipay.api.domain;
import java.util.Date;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 保险营销权益信息
*
* @author auto create
* @since 1.0, 2016-10-26 17:43:39
*/
public class InsMktCouponDTO extends AlipayObject {
private static final long serialVersionUID = 4753636926421181634L;
/**
* 权益资产Id,如券Id
*/
@ApiField("asset_id")
private String assetId;
/**
* 权益Id
*/
@ApiField("coupon_id")
private String couponId;
/**
* 权益类型
*/
@ApiField("coupon_type")
private String couponType;
/**
* 500元单品券
*/
@ApiField("coupon_value")
private String couponValue;
/**
* 是否推荐使用该优惠
*/
@ApiField("recommend")
private Boolean recommend;
/**
* 核销结束时间
*/
@ApiField("use_end_time")
private Date useEndTime;
/**
* 核销规则
*/
@ApiField("use_rule")
private String useRule;
/**
* 核销开始时间
*/
@ApiField("use_start_time")
private Date useStartTime;
public String getAssetId() {
return this.assetId;
}
public void setAssetId(String assetId) {
this.assetId = assetId;
}
public String getCouponId() {
return this.couponId;
}
public void setCouponId(String couponId) {
this.couponId = couponId;
}
public String getCouponType() {
return this.couponType;
}
public void setCouponType(String couponType) {
this.couponType = couponType;
}
public String getCouponValue() {
return this.couponValue;
}
public void setCouponValue(String couponValue) {
this.couponValue = couponValue;
}
public Boolean getRecommend() {
return this.recommend;
}
public void setRecommend(Boolean recommend) {
this.recommend = recommend;
}
public Date getUseEndTime() {
return this.useEndTime;
}
public void setUseEndTime(Date useEndTime) {
this.useEndTime = useEndTime;
}
public String getUseRule() {
return this.useRule;
}
public void setUseRule(String useRule) {
this.useRule = useRule;
}
public Date getUseStartTime() {
return this.useStartTime;
}
public void setUseStartTime(Date useStartTime) {
this.useStartTime = useStartTime;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
c20caab5e8bc99785d4251a24c965fc4fdcea73e | ab3eb90b718cb907a427ec32390a639b8737eda9 | /ch08/PottersPotions/src/mjg/pp/service/jaxws/BrewPotionResponse.java | f2475eda0802d38ec3db38682b47eaded505fe5b | [] | no_license | fabriciotuosto/Making-Java-Groovy | a5ba8902ecdca9e572ac6cbbfe4928e9318124c3 | b421a09b3b22b7aa88d874e9066c8ad1a5e82b69 | refs/heads/master | 2020-12-25T10:36:48.818845 | 2012-04-04T08:45:43 | 2012-04-04T08:45:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 964 | java |
package mjg.pp.service.jaxws;
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;
@XmlRootElement(name = "brewPotionResponse", namespace = "http://service.pp.mjg/")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "brewPotionResponse", namespace = "http://service.pp.mjg/")
public class BrewPotionResponse {
@XmlElement(name = "potion", namespace = "")
private mjg.pp.entities.Potion potion;
/**
*
* @return
* returns Potion
*/
public mjg.pp.entities.Potion getPotion() {
return this.potion;
}
/**
*
* @param potion
* the value for the potion property
*/
public void setPotion(mjg.pp.entities.Potion potion) {
this.potion = potion;
}
}
| [
"ken.kousen@kousenit.com"
] | ken.kousen@kousenit.com |
0f8a2f1a143e127c7884a18a4e980de64dd450b4 | 80dded658a2def9f19efda0285e22405a8dd451c | /decompiled_src/Procyon/org/anddev/andengine/util/modifier/ease/EaseQuartInOut.java | 9335b3bd25d91966b43b46354d6d0480a0431823 | [
"Apache-2.0"
] | permissive | rLadia-demo/AttacknidPatch | 57482e19c6e99e8923e299a121b9b2c74242b8ee | 561fc5fa5c1bc5afa4bad28855bf16b480c3ab6a | refs/heads/master | 2021-01-25T07:08:43.450419 | 2014-06-15T14:35:03 | 2014-06-15T14:35:03 | 20,852,359 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 763 | java | package org.anddev.andengine.util.modifier.ease;
public class EaseQuartInOut implements IEaseFunction
{
private static EaseQuartInOut INSTANCE;
public static EaseQuartInOut getInstance() {
if (EaseQuartInOut.INSTANCE == null) {
EaseQuartInOut.INSTANCE = new EaseQuartInOut();
}
return EaseQuartInOut.INSTANCE;
}
@Override
public float getPercentageDone(final float n, final float n2, final float n3, final float n4) {
final float n5 = n / (n2 * 0.5f);
if (n5 < 1.0f) {
return n3 + n5 * (n5 * (n5 * (n5 * (n4 * 0.5f))));
}
final float n6 = 0.5f * -n4;
final float n7 = n5 - 2.0f;
return n3 + n6 * (n7 * (n7 * (n7 * n7)) - 2.0f);
}
}
| [
"rLadia@ymail.com"
] | rLadia@ymail.com |
7a2b3b9f235d9936ff28c6e64479c78be5df727d | 69a1a3621dea651a414d8cc4f54fb1aa30a3222f | /app/src/main/java/yhh/rippleanimationview/MainActivity.java | 8af5f65e16f9bbe032f1b924bda526842f005713 | [] | no_license | s011208/EasyRippleAnimationView | e092723dc71b712363502ba7179b96e207f5c700 | b7cceef43c64c7bc9c6d422fddaf7af4f6b1e37c | refs/heads/master | 2021-07-25T01:21:18.931305 | 2017-11-06T17:08:15 | 2017-11-06T17:08:15 | 109,724,962 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 606 | java | package yhh.rippleanimationview;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
private RippleAnimationImageView anim;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
anim = (RippleAnimationImageView) findViewById(R.id.anim);
anim.setMainColor(Color.RED);
anim.setInnerRadius(50);
anim.setOuterRadius(200);
anim.start();
}
}
| [
"s011208@gmail.com"
] | s011208@gmail.com |
29c96df5cf8b3d7734470b511e202632769f214e | 7d90834081b20312625c33c947df9afd3e11d0c0 | /src/main/java/com/kh/onepart/resident/warm/open_chatting/model/vo/OpenChatCommVO.java | 7f34e406dcbd64b13fbe89c8270839ce958b8e68 | [] | no_license | kyj9168/onepart | 9dd52420e6d43b4f708412953bf0f355f7af9e86 | eee62e5ed10f3a85d3a0d65b1e7e4890e4ff8bd8 | refs/heads/master | 2023-04-19T12:44:45.503673 | 2021-05-04T16:56:47 | 2021-05-04T16:56:47 | 364,326,416 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 781 | java | package com.kh.onepart.resident.warm.open_chatting.model.vo;
import java.sql.Date;
import java.sql.Timestamp;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OpenChatCommVO {
private int openChatCommSeq; // 오픈채팅 대화내용 고유번호 (pk)
private String openChatCommContent; // 발신내용
private int openChatMemberSeq; // 오픈채팅 방 별 멤버 고유번호(발신인)
private String openChatCommAttchTf; // 첨부파일 여부
private String openChatCommImgTf; // 이미지 여부
private Timestamp openChatCommSendDt;
private int openChatSeq; //고유 방 번호
private int residentSeq; //회원 번호
private String residentId; //회원 ID
}
| [
"youngjunkim-ibricks@gmail.com"
] | youngjunkim-ibricks@gmail.com |
c1f1b8ee03f6263af0943a279e477f9da8ee415e | 66ef83660729980ca40171c591750ff8eb517a3d | /src/main/java/com/jayden/mall/model/pojo/UmsMemberRuleSetting.java | ae179fc75ff561c438e2ab24ccc3eac00cc79591 | [] | no_license | BruceLee12013/mall | b24bab18109fcbd715d9683d88b4f18742d1a957 | 8838a1f2a3a39c0f2cc089e392ece53e8695bea9 | refs/heads/master | 2023-01-18T16:46:46.619486 | 2020-11-11T09:37:49 | 2020-11-11T09:37:49 | 311,924,301 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,610 | java | package com.jayden.mall.model.pojo;
import java.math.BigDecimal;
public class UmsMemberRuleSetting {
private Long id;
private Integer continueSignDay;
private Integer continueSignPoint;
private BigDecimal consumePerPoint;
private BigDecimal lowOrderAmount;
private Integer maxPointPerOrder;
private Integer type;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getContinueSignDay() {
return continueSignDay;
}
public void setContinueSignDay(Integer continueSignDay) {
this.continueSignDay = continueSignDay;
}
public Integer getContinueSignPoint() {
return continueSignPoint;
}
public void setContinueSignPoint(Integer continueSignPoint) {
this.continueSignPoint = continueSignPoint;
}
public BigDecimal getConsumePerPoint() {
return consumePerPoint;
}
public void setConsumePerPoint(BigDecimal consumePerPoint) {
this.consumePerPoint = consumePerPoint;
}
public BigDecimal getLowOrderAmount() {
return lowOrderAmount;
}
public void setLowOrderAmount(BigDecimal lowOrderAmount) {
this.lowOrderAmount = lowOrderAmount;
}
public Integer getMaxPointPerOrder() {
return maxPointPerOrder;
}
public void setMaxPointPerOrder(Integer maxPointPerOrder) {
this.maxPointPerOrder = maxPointPerOrder;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
} | [
"brucelee_123@163.com"
] | brucelee_123@163.com |
0f12af2c444cf548da6e8ee0769c844478aa490c | f9852e15cbfc56515d4e156198cc92d8ebe06d60 | /proj/SWFParser/src/com/kitfox/swf/tags/action/swf5/ActionModulo.java | 8c2a13fa4c3494b0d293c4f4ac53f39b1b4fee8e | [] | no_license | kansasSamurai/raven | 0c708ee9fc4224f53d49700834f622b357915bb6 | d4b4f6dde43c7d801837977dfb087d8913ed71ca | refs/heads/master | 2021-06-09T08:08:14.593699 | 2014-06-10T02:30:48 | 2014-06-10T02:30:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,295 | java | /*
* Copyright 2011 Mark McKay
*
* 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.kitfox.swf.tags.action.swf5;
import com.kitfox.swf.dataType.SWFDataReader;
import com.kitfox.swf.tags.action.ActionRecord;
import com.kitfox.swf.tags.action.ActionRecordLoader;
import java.io.IOException;
/**
*
* @author kitfox
*/
public class ActionModulo extends ActionRecord
{
public static class Loader extends ActionRecordLoader
{
public Loader()
{
super(CODE);
}
@Override
public ActionRecord read(SWFDataReader in, int length) throws IOException
{
return new ActionModulo();
}
}
public static final int CODE = 0x3F;
public ActionModulo()
{
}
}
| [
"kitfox@6b8830c1-5349-cced-e2ce-a6a69cd31f76"
] | kitfox@6b8830c1-5349-cced-e2ce-a6a69cd31f76 |
26930c47e95aebe74fd245bb1b1043510a6ca0dd | 4d3410dd9f2a775a7a6c330a69a77f4076c5aa7f | /LLD Questions and Answer/Pratice_LLD/Meeting_scheduler/src/models/Meeting.java | d8a1c32c4615794b831def701eb0e561acec3b14 | [] | no_license | venti98/LLD | 1d694ce203bd32e368a4c9ab34d87943a9d1ec25 | 22611f1610f18e16b098759407649bcae6def005 | refs/heads/main | 2023-06-14T00:36:47.276729 | 2021-07-11T02:12:17 | 2021-07-11T02:12:17 | 384,841,803 | 0 | 0 | null | 2021-07-11T02:06:49 | 2021-07-11T02:06:48 | null | UTF-8 | Java | false | false | 410 | java | package models;
import java.util.ArrayList;
import java.util.UUID;
public class Meeting {
String id;
int startTime;
int endTime;
String roomID;
// list of participents
public Meeting(int startTime, int endTime, String roomID) {
this.id = UUID.randomUUID().toString();
this.startTime = startTime;
this.endTime = endTime;
this.roomID = roomID;
}
}
| [
"gowtkum@amazon.com"
] | gowtkum@amazon.com |
c3793e39cc3c934c0e908483eed06ed8cfbc598d | fc2af5d61af1ad7d526257517560205d0added5d | /study-querydsl/src/main/java/com/wuxp/study/cache/key/PutWildcardKey.java | 8e6e4bb44432ca99114192f9e37e5e92fe2c6691 | [] | no_license | fengwuxp/study-demo | f1d83348de12ae5a7f811bf667597e7aaaa676da | 2aaf841b5594a0908ee71014bd314f34f4187699 | refs/heads/master | 2022-12-11T23:25:52.456718 | 2021-01-11T14:14:37 | 2021-01-11T14:14:37 | 186,108,604 | 1 | 0 | null | 2022-11-15T23:49:06 | 2019-05-11T08:40:22 | Java | UTF-8 | Java | false | false | 480 | java | package com.wuxp.study.cache.key;
import com.wuxp.study.cache.WildcardKey;
/**
* 通配符的 put key
*/
public class PutWildcardKey implements WildcardKey {
/**
* 表达式
*/
private String expression;
public PutWildcardKey(String expression) {
this.expression = expression;
}
@Override
public boolean equals(Object other) {
return false;
}
@Override
public final int hashCode() {
return -1;
}
}
| [
"1109695647@qq.com"
] | 1109695647@qq.com |
5e280689ee59a0697bca98316a507783ff4a42ad | 8d9c809a138f29aa3806ecca2f1a90d0e57fff86 | /Sales/src/edu/hebeu/action/ItemsServlet.java | e3b86d90762c4ad66bb5f52e38cf654b070b399f | [] | no_license | Tyong1365137828/stu-java | e9fe76586749e06e41f55edab0001d2c245fccfd | 39b452da284e0a80520359bf2dcf655c2c3d72fb | refs/heads/main | 2023-04-06T11:25:18.794632 | 2021-04-25T07:05:14 | 2021-04-25T07:05:14 | 353,631,034 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 4,328 | java | package edu.hebeu.action;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import edu.hebeu.po.Items;
import edu.hebeu.service.ItemsService;
import edu.hebeu.service.impl.ItemsServiceImpl;
import edu.hebeu.util.PageBean;
/**
* Servlet implementation class ItemsServlet
*/
@WebServlet("/myServlet/Items")
public class ItemsServlet extends BaseServlet {
private static final long serialVersionUID = 1L;
/**
* Default constructor.
*/
public ItemsServlet() {
// TODO Auto-generated constructor stub
}
/**
* 显示全部商品
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void ViewAllProduce(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
ItemsService itemsService = new ItemsServiceImpl();
List<Items> list = null;
try {
list =itemsService.showProduce();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("商品图片list="+list);
request.setAttribute("itemslist", list);
request.getRequestDispatcher("/product_all.jsp").forward(request, response);
}
/**
* 通过code展示商品
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void selectProductView(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String code = request.getParameter("code");
ItemsService itemsService = new ItemsServiceImpl();
Items items = new Items();
items.setCode(code);
Items items2= new Items();
try {
items2 = itemsService.showProduceByCode(items);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
request.setAttribute("showitems", items2);
request.getRequestDispatcher("/show_items.jsp").forward(request, response);
}
/**
* 模糊展示商品
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void SelectProduct(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String name = request.getParameter("proname");
Items items2 = new Items();
items2.setName(name);
ItemsService itemsService = new ItemsServiceImpl();
List<Items> list = null;
try {
list =itemsService.showProduce(items2);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.print("name="+name);
System.out.println("items2"+items2);
System.out.println("模糊商品图片list="+list);
request.setAttribute("itemslist", list);
request.getRequestDispatcher("/product_all.jsp").forward(request, response);
}
/**
* 分页显示全部信息
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void PageViewItems(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// 接收参数
int index = 1;// 当前页,默认1
String sindex = request.getParameter("index");// 接受前台传来的操作,对应的第几页
if (sindex != null && !"".equals(sindex)) {
index = Integer.parseInt(sindex);// 赋值给当前页
}
int size = 4;// 当前每页的记录数,默认4
String ssize = request.getParameter("size");// 接受前台传来的操作,对应每页的记录数
if (ssize != null && !"".equals(ssize)) {
size = Integer.parseInt(ssize);// 赋值给当前每页的记录数
}
System.out.println("当前页是:" + index);
System.out.println("当前每页的记录数是:" + size);
PageBean<Items> pageBean = new PageBean<Items>();
pageBean.setIndex(index); // 第1个参数
pageBean.setSize(size); // 第2个参数
ItemsService itemsService = new ItemsServiceImpl();
try {
itemsService.showProductAllPage(pageBean);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
request.getSession().setAttribute("itemslist", pageBean);
request.getRequestDispatcher("/admin/items.jsp").forward(request, response);
}
}
| [
"1365137828@qq.com"
] | 1365137828@qq.com |
7f571d5371ee7d2fcc992b189ee80f5348fa8875 | 8782061b1e1223488a090f9f3f3b8dfe489e054a | /storeMongoDB/projects/ABCD/ahoehma_vaadlets/test/4Test.java | 926af8d6d379fc7a571e79753e1ad1e904a41fcd | [] | no_license | ryosuke-ku/TCS_init | 3cb79a46aa217e62d8fff13d600f2a9583df986c | e1207d68bdc9d2f1eed63ef44a672b5a37b45633 | refs/heads/master | 2020-08-08T18:40:17.929911 | 2019-10-18T01:06:32 | 2019-10-18T01:06:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 205 | java | public void testFluentApi() {
VaadletsBuilder.build(
new Button().withId("foobar").withCaption("Foobar").withStyleName(BaseTheme.BUTTON_LINK).withWidth("100px"))
.getRoot();
}
| [
"naist1020@gmail.com"
] | naist1020@gmail.com |
fca1e82fd7bb7a21d414bedf80864f070e76a202 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_41ea09c87c89546ce023b1a7b5d659270f94b900/SmartCheckMapV2Fragment/2_41ea09c87c89546ce023b1a7b5d659270f94b900_SmartCheckMapV2Fragment_t.java | e8cf1e4bd88059a18148c9440872b2db24457305 | [] | 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 | 6,878 | java | package eu.trentorise.smartcampus.jp;
import java.util.ArrayList;
import java.util.List;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.GoogleMap.OnCameraChangeListener;
import com.google.android.gms.maps.GoogleMap.OnMarkerClickListener;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import eu.trentorise.smartcampus.android.feedback.utils.FeedbackFragmentInflater;
import eu.trentorise.smartcampus.jp.custom.StopsV2AsyncTask;
import eu.trentorise.smartcampus.jp.custom.map.MapManager;
import eu.trentorise.smartcampus.jp.custom.map.StopsInfoDialog;
import eu.trentorise.smartcampus.jp.custom.map.StopsInfoDialog.OnDetailsClick;
import eu.trentorise.smartcampus.jp.helper.JPHelper;
import eu.trentorise.smartcampus.jp.helper.JPParamsHelper;
import eu.trentorise.smartcampus.jp.model.LocatedObject;
import eu.trentorise.smartcampus.jp.model.SmartCheckStop;
public class SmartCheckMapV2Fragment extends SupportMapFragment implements OnCameraChangeListener, OnMarkerClickListener,
OnDetailsClick {
public final static String ARG_AGENCY_IDS = "agencyIds";
public final static String ARG_STOP = "stop";
public final static int REQUEST_CODE = 1983;
private SherlockFragmentActivity mActivity;
private String[] selectedAgencyIds = new String[] {};
private LatLng centerLatLng;
private float zoomLevel = JPParamsHelper.getZoomLevelMap() + 2;
private StopsV2AsyncTask loader;
private GoogleMap mMap;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mActivity = (SherlockFragmentActivity) getActivity();
// get arguments
if (savedInstanceState != null && savedInstanceState.containsKey(ARG_AGENCY_IDS)) {
selectedAgencyIds = savedInstanceState.getStringArray(ARG_AGENCY_IDS);
} else if (getArguments() != null && getArguments().containsKey(ARG_AGENCY_IDS)) {
selectedAgencyIds = getArguments().getStringArray(ARG_AGENCY_IDS);
}
Log.e(getClass().getSimpleName(), "onCreate");
setHasOptionsMenu(true);
}
@Override
public void onStart() {
super.onStart();
FeedbackFragmentInflater.inflateHandleButton(getActivity(), getView());
}
@Override
public void onResume() {
super.onResume();
Log.e(getClass().getSimpleName(), "onResume");
if (getSupportMap() == null)
return;
// features disabled waiting for a better clustering grid
getSupportMap().getUiSettings().setRotateGesturesEnabled(false);
getSupportMap().getUiSettings().setTiltGesturesEnabled(false);
getSupportMap().setOnCameraChangeListener(this);
getSupportMap().setOnMarkerClickListener(this);
// show my location
getSupportMap().setMyLocationEnabled(true);
// move to my location
if (JPHelper.getLocationHelper().getLocation() != null) {
centerLatLng = new LatLng(JPHelper.getLocationHelper().getLocation().getLatitudeE6() / 1e6, JPHelper
.getLocationHelper().getLocation().getLongitudeE6() / 1e6);
getSupportMap().moveCamera(CameraUpdateFactory.newLatLngZoom(centerLatLng, zoomLevel));
} else {
getSupportMap().moveCamera(CameraUpdateFactory.zoomTo(zoomLevel));
}
}
@Override
public void onPause() {
super.onPause();
if (getSupportMap() == null)
return;
getSupportMap().setMyLocationEnabled(false);
getSupportMap().setOnCameraChangeListener(null);
getSupportMap().setOnMarkerClickListener(null);
if (loader != null) {
loader.cancel(true);
}
}
@Override
public void onCameraChange(CameraPosition position) {
boolean zoomLevelChanged = false;
if (zoomLevel != position.zoom) {
zoomLevelChanged = true;
zoomLevel = position.zoom;
}
if (loader != null) {
loader.cancel(true);
}
loader = new StopsV2AsyncTask(mActivity, selectedAgencyIds, centerLatLng, getDiagonalLenght(), getSupportMap(),
zoomLevelChanged, null);
loader.execute();
}
@Override
public boolean onMarkerClick(Marker marker) {
String id = marker.getTitle();
List<LocatedObject> list = MapManager.ClusteringHelper.getFromGridId(id);
if (list == null || list.isEmpty()) {
return true;
}
if (list.size() > 1 && getSupportMap().getCameraPosition().zoom == getSupportMap().getMaxZoomLevel()) {
StopsInfoDialog stopInfoDialog = new StopsInfoDialog(this);
Bundle args = new Bundle();
args.putSerializable(StopsInfoDialog.ARG_STOPS, (ArrayList) list);
stopInfoDialog.setArguments(args);
stopInfoDialog.show(mActivity.getSupportFragmentManager(), "stopselected");
} else if (list.size() > 1) {
// getSupportMap().animateCamera(CameraUpdateFactory.newLatLngZoom(marker.getPosition(),
// zoomLevel + 1));
MapManager.fitMapWithOverlays(list, getSupportMap());
} else {
SmartCheckStop stop = (SmartCheckStop) list.get(0);
if (stop != null) {
StopsInfoDialog stopInfoDialog = new StopsInfoDialog(this);
Bundle args = new Bundle();
args.putSerializable(StopsInfoDialog.ARG_STOP, stop);
stopInfoDialog.setArguments(args);
stopInfoDialog.show(mActivity.getSupportFragmentManager(), "stopselected");
}
}
// // default behavior
// return false;
return true;
}
@Override
public void OnDialogDetailsClick(SmartCheckStop stop) {
FragmentTransaction fragmentTransaction = mActivity.getSupportFragmentManager().beginTransaction();
Fragment fragment = new SmartCheckStopFragment();
Bundle args = new Bundle();
args.putSerializable(SmartCheckStopFragment.ARG_STOP, stop);
fragment.setArguments(args);
fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
fragmentTransaction.addToBackStack(fragment.getTag());
fragmentTransaction.add(Config.mainlayout, fragment, "lines");
// fragmentTransaction.commitAllowingStateLoss();
fragmentTransaction.commit();
}
private double getDiagonalLenght() {
LatLng lu = getSupportMap().getProjection().getVisibleRegion().farLeft;
LatLng rd = getSupportMap().getProjection().getVisibleRegion().nearRight;
double h = rd.longitude - lu.longitude;
double w = lu.latitude - rd.latitude;
double diagonal = Math.sqrt(Math.pow(w, 2) + Math.pow(h, 2));
return diagonal;
}
private GoogleMap getSupportMap() {
if (mMap == null) {
mMap = ((SupportMapFragment) getFragmentManager().findFragmentById(Config.mainlayout)).getMap();
}
return mMap;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
6f1a336f79e6293dc4259a11f7feb1d5e88adbf9 | 2bc2eadc9b0f70d6d1286ef474902466988a880f | /tags/mule-2.0.0-M1/core/src/main/java/org/mule/umo/security/provider/SecurityProviderInfo.java | da064e40e98d72924c0b494688b516d2cd7cbf28 | [] | no_license | OrgSmells/codehaus-mule-git | 085434a4b7781a5def2b9b4e37396081eaeba394 | f8584627c7acb13efdf3276396015439ea6a0721 | refs/heads/master | 2022-12-24T07:33:30.190368 | 2020-02-27T19:10:29 | 2020-02-27T19:10:29 | 243,593,543 | 0 | 0 | null | 2022-12-15T23:30:00 | 2020-02-27T18:56:48 | null | UTF-8 | Java | false | false | 619 | java | /*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the MuleSource MPL
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.umo.security.provider;
/**
* A holder for some JDK-level SSL/TLS properties.
*/
public interface SecurityProviderInfo
{
String getKeyManagerAlgorithm();
String getProtocolHandler();
String getProviderClass();
}
| [
"tcarlson@bf997673-6b11-0410-b953-e057580c5b09"
] | tcarlson@bf997673-6b11-0410-b953-e057580c5b09 |
3ee1324bb98e482f8587cb8832363df42350e4b4 | f413d9bb59a1c305f251ff9f5cabec670fd22ea2 | /src/test/java/com/chenxin/authority/dao/BaseModuleRepositoryTest.java | beb0aad662fd719c97781b25c05da28f3db62e95 | [] | no_license | tomlxq/authority | b1a3bc0029a967f87c2f4187dc8726e1edd7d646 | cf46673ec2c07150a1e1e313c8f4a954742c0ffc | refs/heads/master | 2021-01-21T21:43:16.632498 | 2016-05-15T12:57:30 | 2016-05-15T12:57:30 | 28,711,826 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,453 | java | package com.chenxin.authority.dao;
import static org.junit.Assert.*;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import com.chenxin.authority.pojo.BaseModule;
public class BaseModuleRepositoryTest extends Dao {
// private static final Logger logger =
// LoggerFactory.getLogger(BaseModuleRepositoryTest.class);
@Autowired
private BaseModuleRepository repository;
private BaseModule object;
private List<BaseModule> list = null;
@Before
public void before() {
object = new BaseModule();
object.setModuleName("moduleName");
object.setModuleUrl("moduleUrl");
object.setLeaf(1);
object.setParentId(1L);
}
@Test
public void testSelectAllModules() {
list = this.repository.selectAllModules(null);
assertNotNull(list);
assertNotNull(list.size());
assertTrue(list.size() > 1);
}
@Test
public void testFindByUserId() {
list = this.repository.findByUserId(1L);
assertNotNull(list);
assertNotNull(list.size());
assertTrue(list.size() > 0);
}
@Test
public void testDeleteByParentUrl() {
object = this.repository.save(object);
int result = this.repository.deleteByParentUrl(1L);
assertTrue(result >= 1);
}
@Test
public void testFindByLeaf() {
object = this.repository.save(object);
list = this.repository.findByLeaf(1);
assertNotNull(list);
assertNotNull(list.size());
assertTrue(list.size() >= 1);
}
}
| [
"21429503@qq.com"
] | 21429503@qq.com |
200d757624f4b51fab860c15b9115196a3594c81 | a5d01febfd8d45a61f815b6f5ed447e25fad4959 | /Source Code/5.5.1/sources/com/iqoption/view/stickyheadersrecyclerview/d/a.java | 337ecb10089e3b54a3813f5fca81fad68c0aeff7 | [] | no_license | kkagill/Decompiler-IQ-Option | 7fe5911f90ed2490687f5d216cb2940f07b57194 | c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6 | refs/heads/master | 2020-09-14T20:44:49.115289 | 2019-11-04T06:58:55 | 2019-11-04T06:58:55 | 223,236,327 | 1 | 0 | null | 2019-11-21T18:17:17 | 2019-11-21T18:17:16 | null | UTF-8 | Java | false | false | 1,002 | java | package com.iqoption.view.stickyheadersrecyclerview.d;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.LayoutManager;
/* compiled from: LinearLayoutOrientationProvider */
public class a implements b {
public int h(RecyclerView recyclerView) {
LayoutManager layoutManager = recyclerView.getLayoutManager();
a(layoutManager);
return ((LinearLayoutManager) layoutManager).getOrientation();
}
public boolean p(RecyclerView recyclerView) {
LayoutManager layoutManager = recyclerView.getLayoutManager();
a(layoutManager);
return ((LinearLayoutManager) layoutManager).getReverseLayout();
}
private void a(LayoutManager layoutManager) {
if (!(layoutManager instanceof LinearLayoutManager)) {
throw new IllegalStateException("StickyListHeadersDecoration can only be used with a LinearLayoutManager.");
}
}
}
| [
"yihsun1992@gmail.com"
] | yihsun1992@gmail.com |
3ef6210666aae2fb1678d9d965e077a0bcc34c12 | dba87418d2286ce141d81deb947305a0eaf9824f | /sources/com/lowagie/text/pdf/internal/PdfAnnotationsImp.java | e604bce5c03c68b5624b8eaef12af376d6ae52a8 | [] | no_license | Sluckson/copyOavct | 1f73f47ce94bb08df44f2ba9f698f2e8589b5cf6 | d20597e14411e8607d1d6e93b632d0cd2e8af8cb | refs/heads/main | 2023-03-09T12:14:38.824373 | 2021-02-26T01:38:16 | 2021-02-26T01:38:16 | 341,292,450 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,984 | java | package com.lowagie.text.pdf.internal;
import com.lowagie.text.Annotation;
import com.lowagie.text.ExceptionConverter;
import com.lowagie.text.Rectangle;
import com.lowagie.text.pdf.PdfAcroForm;
import com.lowagie.text.pdf.PdfAction;
import com.lowagie.text.pdf.PdfAnnotation;
import com.lowagie.text.pdf.PdfArray;
import com.lowagie.text.pdf.PdfFileSpecification;
import com.lowagie.text.pdf.PdfFormField;
import com.lowagie.text.pdf.PdfName;
import com.lowagie.text.pdf.PdfObject;
import com.lowagie.text.pdf.PdfRectangle;
import com.lowagie.text.pdf.PdfString;
import com.lowagie.text.pdf.PdfWriter;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
public class PdfAnnotationsImp {
protected PdfAcroForm acroForm;
protected ArrayList annotations;
protected ArrayList delayedAnnotations = new ArrayList();
public PdfAnnotationsImp(PdfWriter pdfWriter) {
this.acroForm = new PdfAcroForm(pdfWriter);
}
public boolean hasValidAcroForm() {
return this.acroForm.isValid();
}
public PdfAcroForm getAcroForm() {
return this.acroForm;
}
public void setSigFlags(int i) {
this.acroForm.setSigFlags(i);
}
public void addCalculationOrder(PdfFormField pdfFormField) {
this.acroForm.addCalculationOrder(pdfFormField);
}
public void addAnnotation(PdfAnnotation pdfAnnotation) {
if (pdfAnnotation.isForm()) {
PdfFormField pdfFormField = (PdfFormField) pdfAnnotation;
if (pdfFormField.getParent() == null) {
addFormFieldRaw(pdfFormField);
return;
}
return;
}
this.annotations.add(pdfAnnotation);
}
public void addPlainAnnotation(PdfAnnotation pdfAnnotation) {
this.annotations.add(pdfAnnotation);
}
/* access modifiers changed from: package-private */
public void addFormFieldRaw(PdfFormField pdfFormField) {
this.annotations.add(pdfFormField);
ArrayList kids = pdfFormField.getKids();
if (kids != null) {
for (int i = 0; i < kids.size(); i++) {
addFormFieldRaw((PdfFormField) kids.get(i));
}
}
}
public boolean hasUnusedAnnotations() {
return !this.annotations.isEmpty();
}
public void resetAnnotations() {
this.annotations = this.delayedAnnotations;
this.delayedAnnotations = new ArrayList();
}
public PdfArray rotateAnnotations(PdfWriter pdfWriter, Rectangle rectangle) {
PdfRectangle pdfRectangle;
HashMap templates;
PdfArray pdfArray = new PdfArray();
int rotation = rectangle.getRotation() % 360;
int currentPageNumber = pdfWriter.getCurrentPageNumber();
for (int i = 0; i < this.annotations.size(); i++) {
PdfAnnotation pdfAnnotation = (PdfAnnotation) this.annotations.get(i);
if (pdfAnnotation.getPlaceInPage() > currentPageNumber) {
this.delayedAnnotations.add(pdfAnnotation);
} else {
if (pdfAnnotation.isForm()) {
if (!pdfAnnotation.isUsed() && (templates = pdfAnnotation.getTemplates()) != null) {
this.acroForm.addFieldTemplates(templates);
}
PdfFormField pdfFormField = (PdfFormField) pdfAnnotation;
if (pdfFormField.getParent() == null) {
this.acroForm.addDocumentField(pdfFormField.getIndirectReference());
}
}
if (pdfAnnotation.isAnnotation()) {
pdfArray.add((PdfObject) pdfAnnotation.getIndirectReference());
if (!pdfAnnotation.isUsed() && (pdfRectangle = (PdfRectangle) pdfAnnotation.get(PdfName.RECT)) != null) {
if (rotation == 90) {
pdfAnnotation.put(PdfName.RECT, new PdfRectangle(rectangle.getTop() - pdfRectangle.bottom(), pdfRectangle.left(), rectangle.getTop() - pdfRectangle.top(), pdfRectangle.right()));
} else if (rotation == 180) {
pdfAnnotation.put(PdfName.RECT, new PdfRectangle(rectangle.getRight() - pdfRectangle.left(), rectangle.getTop() - pdfRectangle.bottom(), rectangle.getRight() - pdfRectangle.right(), rectangle.getTop() - pdfRectangle.top()));
} else if (rotation == 270) {
pdfAnnotation.put(PdfName.RECT, new PdfRectangle(pdfRectangle.bottom(), rectangle.getRight() - pdfRectangle.left(), pdfRectangle.top(), rectangle.getRight() - pdfRectangle.right()));
}
}
}
if (!pdfAnnotation.isUsed()) {
pdfAnnotation.setUsed();
try {
pdfWriter.addToBody((PdfObject) pdfAnnotation, pdfAnnotation.getIndirectReference());
} catch (IOException e) {
throw new ExceptionConverter(e);
}
}
}
}
return pdfArray;
}
public static PdfAnnotation convertAnnotation(PdfWriter pdfWriter, Annotation annotation, Rectangle rectangle) throws IOException {
PdfFileSpecification pdfFileSpecification;
switch (annotation.annotationType()) {
case 1:
return new PdfAnnotation(pdfWriter, annotation.llx(), annotation.lly(), annotation.urx(), annotation.ury(), new PdfAction((URL) annotation.attributes().get("url")));
case 2:
return new PdfAnnotation(pdfWriter, annotation.llx(), annotation.lly(), annotation.urx(), annotation.ury(), new PdfAction((String) annotation.attributes().get("file")));
case 3:
return new PdfAnnotation(pdfWriter, annotation.llx(), annotation.lly(), annotation.urx(), annotation.ury(), new PdfAction((String) annotation.attributes().get("file"), (String) annotation.attributes().get("destination")));
case 4:
return new PdfAnnotation(pdfWriter, annotation.llx(), annotation.lly(), annotation.urx(), annotation.ury(), new PdfAction((String) annotation.attributes().get("file"), ((Integer) annotation.attributes().get("page")).intValue()));
case 5:
return new PdfAnnotation(pdfWriter, annotation.llx(), annotation.lly(), annotation.urx(), annotation.ury(), new PdfAction(((Integer) annotation.attributes().get("named")).intValue()));
case 6:
return new PdfAnnotation(pdfWriter, annotation.llx(), annotation.lly(), annotation.urx(), annotation.ury(), new PdfAction((String) annotation.attributes().get("application"), (String) annotation.attributes().get("parameters"), (String) annotation.attributes().get("operation"), (String) annotation.attributes().get("defaultdir")));
case 7:
boolean[] zArr = (boolean[]) annotation.attributes().get("parameters");
String str = (String) annotation.attributes().get("file");
String str2 = (String) annotation.attributes().get(Annotation.MIMETYPE);
if (zArr[0]) {
pdfFileSpecification = PdfFileSpecification.fileEmbedded(pdfWriter, str, str, (byte[]) null);
} else {
pdfFileSpecification = PdfFileSpecification.fileExtern(pdfWriter, str);
}
return PdfAnnotation.createScreen(pdfWriter, new Rectangle(annotation.llx(), annotation.lly(), annotation.urx(), annotation.ury()), str, pdfFileSpecification, str2, zArr[1]);
default:
return new PdfAnnotation(pdfWriter, rectangle.getLeft(), rectangle.getBottom(), rectangle.getRight(), rectangle.getTop(), new PdfString(annotation.title(), PdfObject.TEXT_UNICODE), new PdfString(annotation.content(), PdfObject.TEXT_UNICODE));
}
}
}
| [
"lucksonsurprice94@gmail.com"
] | lucksonsurprice94@gmail.com |
0ee4b73946893639ad1072b3c92721c42ec88e7c | 9e7352d7f96ba5e289fb960d1a7419fb9c4c7470 | /Client/src/main/java/org/xdi/oxauth/client/BaseResponseWithErrors.java | 39bf511ea6f5d5eee064ce8bec465973b95e7f12 | [
"MIT"
] | permissive | IDmachines/oxAuth | e38a66159eac948f8534fe3883d620083b2750eb | 368a5d7dcf6bf1b2a9947d03ea7e0f2de4998663 | refs/heads/master | 2021-01-18T04:17:11.299386 | 2014-09-04T20:20:06 | 2014-09-04T20:20:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,275 | java | package org.xdi.oxauth.client;
import org.apache.commons.lang.StringUtils;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import org.jboss.resteasy.client.ClientResponse;
import org.xdi.oxauth.model.error.IErrorType;
/**
* @author Yuriy Zabrovarnyy
* @version 0.9, 09/10/2012
*/
public abstract class BaseResponseWithErrors<T extends IErrorType> extends BaseResponse {
// private static final Logger LOG = Logger.getLogger(BaseResponseWithErrors.class);
private T errorType;
private String errorDescription;
private String errorUri;
public BaseResponseWithErrors() {
super();
}
public BaseResponseWithErrors(ClientResponse<String> clientResponse) {
super(clientResponse);
final String entity = getEntity();
if (StringUtils.isNotBlank(entity)) {
injectErrorIfExistSilently(entity);
}
}
public String getErrorDescription() {
return errorDescription;
}
public void setErrorDescription(String p_errorDescription) {
errorDescription = p_errorDescription;
}
public T getErrorType() {
return errorType;
}
public void setErrorType(T p_errorType) {
errorType = p_errorType;
}
public String getErrorUri() {
return errorUri;
}
public void setErrorUri(String p_errorUri) {
errorUri = p_errorUri;
}
public abstract T fromString(String p_str);
public void injectDataFromJson(String p_json) {
}
public void injectErrorIfExistSilently(JSONObject jsonObj) throws JSONException {
if (jsonObj.has("error")) {
errorType = fromString(jsonObj.getString("error"));
}
if (jsonObj.has("error_description")) {
errorDescription = jsonObj.getString("error_description");
}
if (jsonObj.has("error_uri")) {
errorUri = jsonObj.getString("error_uri");
}
}
public void injectErrorIfExistSilently(String p_entity) {
try {
injectErrorIfExistSilently(new JSONObject(p_entity));
} catch (JSONException e) {
// ignore : it's ok to skip exception because entity string can be json array or just trash
}
}
}
| [
"Yuriy.Movchan@gmail.com"
] | Yuriy.Movchan@gmail.com |
a39fefc4e575fb2f1acd06a2c4e158e519b6e758 | ec7942c929e1fcd16ae302a0b5e0e59378364afa | /core-base/core-base/src/main/java/org/nanotek/beans/entity/Label.java | f949fcd0ba1aa1ae81d563513964eba4e7c53f6c | [
"Apache-2.0"
] | permissive | JoseCanova/repository-spring-core | 16e2df2f50efb4d8a9268aa42031d9fae6b15ad1 | 10dd4a39b674180e522f4dd53155e1b2f456298c | refs/heads/master | 2022-12-20T23:48:24.257644 | 2022-05-22T17:10:04 | 2022-05-22T17:10:04 | 249,253,054 | 2 | 1 | Apache-2.0 | 2022-06-22T18:37:11 | 2020-03-22T19:04:30 | Java | UTF-8 | Java | false | false | 4,444 | java | package org.nanotek.beans.entity;
import java.util.UUID;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.nanotek.PrePersistValidationGroup;
import org.nanotek.annotations.BrainzKey;
import org.nanotek.entities.BaseLabelEntity;
import org.nanotek.entities.MutableAreaEntity;
import org.nanotek.entities.MutableGidEntity;
import org.nanotek.entities.MutableLabelBeginDateEntity;
import org.nanotek.entities.MutableLabelCodeEntity;
import org.nanotek.entities.MutableLabelEndDateEntity;
import org.nanotek.entities.MutableLabelIdEntity;
import org.nanotek.entities.MutableLabelNameEntity;
import org.nanotek.entities.MutableLabelTypeEntity;
import org.nanotek.opencsv.CsvValidationGroup;
@SuppressWarnings("serial")
@Valid
@Entity
@Table(name="label",
uniqueConstraints = {@UniqueConstraint(name="uk_label_id" , columnNames = {"label_id"})})
public class Label<K extends Label<K>>
extends BrainzBaseEntity<K>
implements BaseLabelEntity<K>,
MutableLabelIdEntity<Long>,
MutableGidEntity<UUID>,
MutableLabelNameEntity<String>,
MutableLabelBeginDateEntity<LabelBeginDate<?>>,
MutableLabelEndDateEntity<LabelEndDate<?>>,
MutableLabelTypeEntity<LabelType<?>>,
MutableAreaEntity<Area<?>>,
MutableLabelCodeEntity<Integer>{
@NotNull(groups = {CsvValidationGroup.class,PrePersistValidationGroup.class})
@Column(name="label_id")
public Long labelId;
@NotNull(groups = {PrePersistValidationGroup.class})
@Column(name="gid", nullable=false , columnDefinition = "UUID NOT NULL")
public UUID gid;
@NotNull(groups = {CsvValidationGroup.class,PrePersistValidationGroup.class})
@Column(name="name" , nullable=false, columnDefinition = "VARCHAR NOT NULL")
public String labelName;
@ManyToOne(optional = true , cascade = {CascadeType.MERGE,CascadeType.PERSIST})
@JoinTable(name = "label_type_join",joinColumns =
@JoinColumn(name = "label_id" , referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "label_type_id" , referencedColumnName = "id"))
public LabelType<?> labelType;
@Column
public Integer labelCode;
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "label_begin_date_id",referencedColumnName = "id")
public LabelBeginDate<?> labelBeginDate;
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "label_end_date_id" , referencedColumnName = "id")
public LabelEndDate<?> labelEndDate;
@ManyToOne(optional = true , cascade = {CascadeType.MERGE,CascadeType.PERSIST})
public Area<?> area;
public Label(@NotBlank String sortName, Long labelId, @NotNull UUID gid, @NotNull String name,
LabelType<?> labelType) {
this.labelId = labelId;
this.gid = gid;
this.labelName = name;
this.labelType = labelType;
}
public Label() {
}
@BrainzKey(entityClass = Label.class, pathName = "labelId")
public Long getLabelId() {
return labelId;
}
public void setLabelId(Long labelId) {
this.labelId = labelId;
}
public UUID getGid() {
return gid;
}
public void setGid(UUID gid) {
this.gid = gid;
}
public String getLabelName() {
return labelName;
}
public void setLabelName(String name) {
this.labelName = name;
}
public LabelType<?> getLabelType() {
return labelType;
}
public void setLabelType(LabelType<?> labelType) {
this.labelType = labelType;
}
public Integer getLabelCode() {
return labelCode;
}
public void setLabelCode(Integer labelCode) {
this.labelCode = labelCode;
}
public LabelBeginDate<?> getLabelBeginDate() {
return labelBeginDate;
}
public void setLabelBeginDate(LabelBeginDate<?> labelBeginDate) {
this.labelBeginDate = labelBeginDate;
}
public LabelEndDate<?> getLabelEndDate() {
return labelEndDate;
}
public void setLabelEndDate(LabelEndDate<?> labelEndDate) {
this.labelEndDate = labelEndDate;
}
public Area<?> getArea() {
return area;
}
public void setArea(Area<?> area) {
this.area = area;
}
}
| [
"jose.c.canova@gmail.com"
] | jose.c.canova@gmail.com |
619924cd286f8e1bed9cd5e0269a8dc1cbaba0a5 | fa93c9be2923e697fb8a2066f8fb65c7718cdec7 | /sources/com/avito/android/publish/add_advert/AddAdvertModule_ProvideAddAdvertInteractorFactory.java | 14bd76c15741777c53a4e07bdf1fa3dd20f4fc1a | [] | no_license | Auch-Auch/avito_source | b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b | 76fdcc5b7e036c57ecc193e790b0582481768cdc | refs/heads/master | 2023-05-06T01:32:43.014668 | 2021-05-25T10:19:22 | 2021-05-25T10:19:22 | 370,650,685 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,767 | java | package com.avito.android.publish.add_advert;
import com.avito.android.remote.PublishApi;
import com.avito.android.remote.error.TypedErrorThrowableConverter;
import com.avito.android.util.SchedulersFactory3;
import dagger.internal.Factory;
import dagger.internal.Preconditions;
import javax.inject.Provider;
import ru.avito.component.floating_add_advert.AddAdvertInteractor;
public final class AddAdvertModule_ProvideAddAdvertInteractorFactory implements Factory<AddAdvertInteractor> {
public final Provider<PublishApi> a;
public final Provider<SchedulersFactory3> b;
public final Provider<TypedErrorThrowableConverter> c;
public AddAdvertModule_ProvideAddAdvertInteractorFactory(Provider<PublishApi> provider, Provider<SchedulersFactory3> provider2, Provider<TypedErrorThrowableConverter> provider3) {
this.a = provider;
this.b = provider2;
this.c = provider3;
}
public static AddAdvertModule_ProvideAddAdvertInteractorFactory create(Provider<PublishApi> provider, Provider<SchedulersFactory3> provider2, Provider<TypedErrorThrowableConverter> provider3) {
return new AddAdvertModule_ProvideAddAdvertInteractorFactory(provider, provider2, provider3);
}
public static AddAdvertInteractor provideAddAdvertInteractor(PublishApi publishApi, SchedulersFactory3 schedulersFactory3, TypedErrorThrowableConverter typedErrorThrowableConverter) {
return (AddAdvertInteractor) Preconditions.checkNotNullFromProvides(AddAdvertModule.provideAddAdvertInteractor(publishApi, schedulersFactory3, typedErrorThrowableConverter));
}
@Override // javax.inject.Provider
public AddAdvertInteractor get() {
return provideAddAdvertInteractor(this.a.get(), this.b.get(), this.c.get());
}
}
| [
"auchhunter@gmail.com"
] | auchhunter@gmail.com |
16efb3132767a90b9a2934984044a683c8a8d404 | 469f0d0522f902fbc541b6694969a836bf3e7d47 | /src/main/java/br/org/rh/domain/EntityAuditEvent.java | 00209f5f7955b324ff03a0c94d30abceb7b54b4d | [] | no_license | lrsilva99/apprh | 50e296baa20be564d14382bab050d1bf35beca21 | 0fef51cd7b959b53d13cfb4f86e6d974ab4ec9be | refs/heads/master | 2021-01-20T20:29:01.247922 | 2016-07-11T14:08:18 | 2016-07-11T14:08:18 | 62,813,372 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,541 | java | package br.org.rh.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import java.time.ZonedDateTime;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Objects;
@Entity
@Table(name = "jhi_entity_audit_event")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class EntityAuditEvent implements Serializable{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@NotNull
@Column(name = "entity_id", nullable = false)
private Long entityId;
@NotNull
@Size(max = 255)
@Column(name = "entity_type", length = 255, nullable = false)
private String entityType;
@NotNull
@Size(max=20)
@Column(name = "action", length = 20, nullable = false)
private String action;
@Lob
@Column(name = "entity_value")
private String entityValue;
@Column(name = "commit_version")
private Integer commitVersion;
@Size(max = 100)
@Column(name = "modified_by", length = 100)
private String modifiedBy;
@NotNull
@Column(name = "modified_date", nullable = false)
private ZonedDateTime modifiedDate;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getEntityId() {
return entityId;
}
public void setEntityId(Long entityId) {
this.entityId = entityId;
}
public String getEntityType() {
return entityType;
}
public void setEntityType(String entityType) {
this.entityType = entityType;
}
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public String getEntityValue() {
return entityValue;
}
public void setEntityValue(String entityValue) {
this.entityValue = entityValue;
}
public Integer getCommitVersion() {
return commitVersion;
}
public void setCommitVersion(Integer commitVersion) {
this.commitVersion = commitVersion;
}
public String getModifiedBy() {
return modifiedBy;
}
public void setModifiedBy(String modifiedBy) {
this.modifiedBy = modifiedBy;
}
public ZonedDateTime getModifiedDate() {
return modifiedDate;
}
public void setModifiedDate(ZonedDateTime modifiedDate) {
this.modifiedDate = modifiedDate;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EntityAuditEvent entityAuditEvent = (EntityAuditEvent) o;
return Objects.equals(id, entityAuditEvent.id);
}
@Override
public int hashCode() {
return Objects.hashCode(id);
}
@Override
public String toString() {
return "EntityAuditEvent{" +
"id=" + id +
", entityId='" + entityId + "'" +
", entityType='" + entityType + "'" +
", action='" + action + "'" +
", entityValue='" + entityValue + "'" +
", commitVersion='" + commitVersion + "'" +
", modifiedBy='" + modifiedBy + "'" +
", modifiedDate='" + modifiedDate + "'" +
'}';
}
}
| [
"Leonardo Ribeiro Silva"
] | Leonardo Ribeiro Silva |
9d138e443a7b2a51f4bbcf40c02fe0559607c84a | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/jdbi/learning/4879/DefineFactory.java | 3b3a0abb3b4ba75d19b6e75ffadb7598ec2be4c8 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,030 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jdbi.v3.sqlobject.customizer.internal;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.lang.reflect.Type;
import org.jdbi.v3.sqlobject.customizer. Define;
import org.jdbi.v3.sqlobject.customizer.SqlStatementCustomizerFactory;
import org.jdbi.v3.sqlobject.customizer.SqlStatementParameterCustomizer;
import org.jdbi.v3.sqlobject.internal.ParameterUtil;
public class DefineFactory implements SqlStatementCustomizerFactory {
@Override
public SqlStatementParameterCustomizer createForParameter(Annotation annotation,
Class<?> sqlObjectType,
Method method,
Parameter param,
int index,
Type type) {
Define define = (Define) annotation;
final String name = ParameterUtil.findParameterName(define.value(), param)
.orElseThrow(() -> new UnsupportedOperationException("A @Define parameter was not given a name, "
+ "and parameter name data is not present in the class file, for: "
+ param.getDeclaringExecutable() + "::" + param));
return (stmt, arg) -> stmt.define(name, arg);
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
acc959a14cf9249c4286bf570222066d4a915a54 | f8fec97eff6d026b51f3a40b145b1546756aa07c | /src/main/java/com/github/narcissujsk/openstackjsk/openstack/murano/v1/internal/MuranoSessionServiceImpl.java | 21bab5f3902e2371b9275d77d88239d10df45fc4 | [] | no_license | narcissujsk/openstackjsk | 3e4a24ca2664fb87b0420c9655bf466a38c535ad | 21b8681f9cfc3b9f9286bd678e3affac05cd9c74 | refs/heads/master | 2022-11-18T12:13:38.110554 | 2019-10-08T10:41:58 | 2019-10-08T10:41:58 | 207,704,102 | 0 | 0 | null | 2022-11-16T08:55:30 | 2019-09-11T02:20:32 | Java | UTF-8 | Java | false | false | 2,862 | java | /*******************************************************************************
* Copyright 2019 ContainX and OpenStack4j
*
* 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.github.narcissujsk.openstackjsk.openstack.murano.v1.internal;
import com.github.narcissujsk.openstackjsk.api.murano.v1.MuranoSessionService;
import com.github.narcissujsk.openstackjsk.model.ModelEntity;
import com.github.narcissujsk.openstackjsk.model.common.ActionResponse;
import com.github.narcissujsk.openstackjsk.model.murano.v1.domain.AppCatalogSession;
import com.github.narcissujsk.openstackjsk.openstack.murano.v1.domain.MuranoEnvironment;
import com.github.narcissujsk.openstackjsk.openstack.murano.v1.domain.MuranoSession;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* This class implements all methods for manipulation of {@link MuranoEnvironment} objects.
*
* @author Nikolay Mahotkin
*
*/
public class MuranoSessionServiceImpl extends BaseMuranoServices implements MuranoSessionService {
/**
* {@inheritDoc}
*/
@Override
public MuranoSession get(String environmentId, String sessionId) {
checkNotNull(environmentId);
checkNotNull(sessionId);
return get(MuranoSession.class, uri("/environments/%s/sessions/%s", environmentId, sessionId)).execute();
}
/**
* {@inheritDoc}
*/
@Override
public MuranoSession configure(String environmentId) {
checkNotNull(environmentId);
return post(MuranoSession.class, uri("/environments/%s/configure", environmentId))
.execute();
}
/**
* {@inheritDoc}
*/
@Override
public ActionResponse delete(String environmentId, String sessionId) {
checkNotNull(environmentId);
checkNotNull(sessionId);
return deleteWithResponse(uri("/environments/%s/sessions/%s", environmentId, sessionId)).execute();
}
/**
* {@inheritDoc}
*/
@Override
public ActionResponse deploy(String environmentId, String sessionId) {
checkNotNull(environmentId);
checkNotNull(sessionId);
return post(ActionResponse.class, uri("/environments/%s/sessions/%s/deploy", environmentId, sessionId))
.execute();
}
}
| [
"jiangsk@inspur.com"
] | jiangsk@inspur.com |
e08f2868eea134b0abde1bbb4e942d1b231b5c0f | 8dc658c2188d94f2d4d9fadc0555d1f0caa59993 | /src/com/example/desidimeassignment/net/ServerException.java | 58a9341a691871383a380d3f109884bc2f1b69c1 | [] | no_license | Siddharthyadav123/DesiDimeAssinment | edc3760ec8f643368debacf2d1182ca2c7f6292f | 0c820ff7c1b5b89771954d8496d64dbe96fe25e6 | refs/heads/master | 2020-04-04T20:53:03.211512 | 2015-05-19T20:00:22 | 2015-05-19T20:00:22 | 35,900,945 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 933 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.example.desidimeassignment.net;
/**
* ServerException.java The Class to throw exception for server communication
*
* @author sid
*/
public class ServerException extends Exception {
/**
* Unique error code to handle exception
*/
int errorCode;
/**
* Unique error code to handle exception
*/
public ServerException() {
super();
}
/**
* Constructor
*
* @param message
* Message to be access after exception
*/
public ServerException(String s) {
super(s);
}
/**
* Constructor
*
* @param errorCode
* Unique error code to handle exception
*/
public ServerException(int errorCode) {
this.errorCode = errorCode;
}
/**
* The function to get Error Code Value
*
* @return Error Code value
*/
public int getCode() {
return errorCode;
}
}
| [
"siddharthdv80@gmail.com"
] | siddharthdv80@gmail.com |
829c84ee0d635a34f7fecfd769dbdd93f6569b42 | fa55027e10c36977b4a50946d663e15f8fe0faf7 | /src/org/wshuai/leetcode/ReplaceTheSubstringForBalancedString.java | b3a98d3f96d5dda35b08b0aa6fff2e138ee1adcb | [] | no_license | relentlesscoder/Leetcode | 773a207c15ea72f6027eade8565377f11a856672 | 6b3ecd82d01739f6adb1caf86a770fcff0d6a54b | refs/heads/master | 2021-07-05T13:35:37.312910 | 2020-06-21T12:48:54 | 2020-06-21T12:48:54 | 40,448,524 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 794 | java | package org.wshuai.leetcode;
/**
* Created by Wei on 11/7/19.
* #1234 https://leetcode.com/problems/replace-the-substring-for-balanced-string/
*/
public class ReplaceTheSubstringForBalancedString {
// great idea - https://leetcode.com/problems/replace-the-substring-for-balanced-string/discuss/408978/JavaC%2B%2BPython-Sliding-Window
public int balancedString(String s) {
int[] count = new int[128];
int N = s.length();
int res = N;
int i = 0;
int k = N / 4;
for(int j = 0; j < N; j++){
count[s.charAt(j)]++;
}
for(int j = 0; j < N; j++){
count[s.charAt(j)]--;
while(i < N
&& count['Q'] <= k
&& count['W'] <= k
&& count['E'] <= k
&& count['R'] <= k){
res = Math.min(res, j - i + 1);
count[s.charAt(i++)]++;
}
}
return res;
}
}
| [
"relentless.code@gmail.com"
] | relentless.code@gmail.com |
f8428c8554030a53ae9dc6a888b484799aebbf50 | 5148293c98b0a27aa223ea157441ac7fa9b5e7a3 | /Method_Scraping/xml_scraping/NicadOutputFile_t1_maven_0726/Nicad_t1_maven_0726283.java | 10fc0a0d4c8e930599a942fbe8ba9982c2726e53 | [] | no_license | ryosuke-ku/TestCodeSeacherPlus | cfd03a2858b67a05ecf17194213b7c02c5f2caff | d002a52251f5461598c7af73925b85a05cea85c6 | refs/heads/master | 2020-05-24T01:25:27.000821 | 2019-08-17T06:23:42 | 2019-08-17T06:23:42 | 187,005,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 798 | java | //C:/Users/ryosuke-ku/Desktop/NiCad-5.1/systems/maven/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java
//C:/Users/ryosuke-ku/Desktop/NiCad-5.1/systems/maven/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/OrArtifactFilter.java
// clone pairs:995:90%
// 1706:maven/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/OrArtifactFilter.java
public class Nicad_t1_maven_0726283
{
public boolean equals( Object obj )
{
if ( this == obj )
{
return true;
}
if ( !( obj instanceof OrArtifactFilter ) )
{
return false;
}
OrArtifactFilter other = (OrArtifactFilter) obj;
return filters.equals( other.filters );
}
} | [
"naist1020@gmail.com"
] | naist1020@gmail.com |
39c46f6363a6bd66e91385ccf1390509a5ce7332 | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_2/src/b/e/i/b/Calc_1_2_14817.java | 6381527580567c22eb46b6541b4b4d9915cd8ef2 | [] | no_license | chalstrick/bigRepo1 | ac7fd5785d475b3c38f1328e370ba9a85a751cff | dad1852eef66fcec200df10083959c674fdcc55d | refs/heads/master | 2016-08-11T17:59:16.079541 | 2015-12-18T14:26:49 | 2015-12-18T14:26:49 | 48,244,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 134 | java | package b.e.i.b;
public class Calc_1_2_14817 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
| [
"christian.halstrick@sap.com"
] | christian.halstrick@sap.com |
550893ae6037cf2b32c8b4a45e8218b98140d9f3 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /single-large-project/src/test/java/org/gradle/test/performancenull_494/Testnull_49318.java | 4be7374d92d61c180dbc749a658fb381cfb3f359 | [] | 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 | 308 | java | package org.gradle.test.performancenull_494;
import static org.junit.Assert.*;
public class Testnull_49318 {
private final Productionnull_49318 production = new Productionnull_49318("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
78509f932e0cfe7659707c8b9ded17a6a6b39b35 | 01dfb27f1288a9ed62f83be0e0aeedf121b4623a | /Ponto/src/java/com/t2tierp/ponto/cliente/PontoGeracaoArquivoGridController.java | 975a834b241058eea63936917c58409ed1f1cf52 | [
"MIT"
] | permissive | FabinhuSilva/T2Ti-ERP-2.0-Java-OpenSwing | deb486a13c264268d82e5ea50d84d2270b75772a | 9531c3b6eaeaf44fa1e31b11baa630dcae67c18e | refs/heads/master | 2022-11-16T00:03:53.426837 | 2020-07-08T00:36:48 | 2020-07-08T00:36:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,785 | java | /*
* The MIT License
*
* Copyright: Copyright (C) 2014 T2Ti.COM
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* The author may be contacted at: t2ti.com@gmail.com
*
* @author Claudio de Barros (T2Ti.com)
* @version 2.0
*/
package com.t2tierp.ponto.cliente;
import com.t2tierp.padrao.java.Constantes;
import com.t2tierp.ponto.acjef.GeraArquivoACJEF;
import com.t2tierp.ponto.afdt.GeraArquivoAFDT;
import com.t2tierp.ponto.java.PontoFechamentoJornadaVO;
import com.t2tierp.ponto.java.PontoHorarioVO;
import com.t2tierp.ponto.java.PontoMarcacaoVO;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import org.openswing.swing.mdi.client.MDIFrame;
import org.openswing.swing.message.receive.java.ErrorResponse;
import org.openswing.swing.message.receive.java.Response;
import org.openswing.swing.message.receive.java.VOListResponse;
import org.openswing.swing.message.send.java.GridParams;
import org.openswing.swing.table.client.GridController;
import org.openswing.swing.table.java.GridDataLocator;
import org.openswing.swing.util.client.ClientUtils;
public class PontoGeracaoArquivoGridController extends GridController implements GridDataLocator {
private PontoGeracaoArquivoGrid grid;
private String acaoServidor;
private Date dataInicial;
private Date dataFinal;
public PontoGeracaoArquivoGridController() {
grid = new PontoGeracaoArquivoGrid(this);
acaoServidor = "pontoGeracaoArquivoGridAction";
MDIFrame.add(grid, true);
}
public Response loadData(int action, int startIndex, Map filteredColumns, ArrayList currentSortedColumns, ArrayList currentSortedVersusColumns, Class valueObjectType, Map otherGridParams) {
try {
grid.getPeriodo();
} catch (Exception ex) {
return new ErrorResponse(ex.getMessage());
}
//define os parametros da grid
otherGridParams.put("acao", Constantes.LOAD);
otherGridParams.put("dataInicial", dataInicial);
otherGridParams.put("dataFinal", dataFinal);
return ClientUtils.getData(acaoServidor, new GridParams(action, startIndex, filteredColumns, currentSortedColumns, currentSortedVersusColumns, otherGridParams));
}
@Override
public void loadDataCompleted(boolean error) {
grid.getGridFechamento().reloadData();
}
public void geraArquivoAFDT() {
try {
JFileChooser chooser = new JFileChooser();
int resposta = chooser.showOpenDialog(grid);
if (resposta == JFileChooser.APPROVE_OPTION) {
List<PontoMarcacaoVO> marcacoes = grid.getGridMarcacao().getVOListTableModel().getDataVector();
if (marcacoes.isEmpty()) {
JOptionPane.showMessageDialog(grid, "Nenhum registro para ser gerado!", "Informação do Sistema", JOptionPane.INFORMATION_MESSAGE);
} else {
GeraArquivoAFDT geraArquivo = new GeraArquivoAFDT();
geraArquivo.geraArquivoAFDT(chooser.getSelectedFile(), dataInicial, dataFinal, marcacoes);
JOptionPane.showMessageDialog(grid, "Arquivo gerado com sucesso!", "Informação do Sistema", JOptionPane.INFORMATION_MESSAGE);
}
}
} catch (Exception e) {
e.printStackTrace();
JOptionPane.showMessageDialog(grid, "Ocorreu um erro ao gerar o arquivo!\n" + e.getMessage(), "Erro do Sistema", JOptionPane.ERROR_MESSAGE);
}
}
public void geraArquivoACJEF() {
try {
JFileChooser chooser = new JFileChooser();
int resposta = chooser.showOpenDialog(grid);
if (resposta == JFileChooser.APPROVE_OPTION) {
//define os parametros da grid
Map otherGridParams = new HashMap();
otherGridParams.put("acao", Constantes.LOAD);
GridParams pars = new GridParams(0, 0, null, null, null, otherGridParams);
Response res = ClientUtils.getData("pontoHorarioGridAction", pars);
if (res.isError()) {
throw new Exception(res.getErrorMessage());
}
List<PontoHorarioVO> horarios = ((VOListResponse) res).getRows();
List<PontoFechamentoJornadaVO> fechamento = grid.getGridFechamento().getVOListTableModel().getDataVector();
if (horarios.isEmpty()) {
JOptionPane.showMessageDialog(grid, "Nenhum horário cadastrado!", "Informação do Sistema", JOptionPane.INFORMATION_MESSAGE);
} else if (fechamento.isEmpty()) {
JOptionPane.showMessageDialog(grid, "Nenhum registro de fechamento da jornada foi encontrado!", "Informação do Sistema", JOptionPane.INFORMATION_MESSAGE);
} else {
GeraArquivoACJEF geraArquivo = new GeraArquivoACJEF();
geraArquivo.geraArquivoACJEF(chooser.getSelectedFile(), dataInicial, dataFinal, horarios, fechamento);
JOptionPane.showMessageDialog(grid, "Arquivo gerado com sucesso!", "Informação do Sistema", JOptionPane.INFORMATION_MESSAGE);
}
}
} catch (Exception e) {
e.printStackTrace();
JOptionPane.showMessageDialog(grid, "Ocorreu um erro ao gerar o arquivo!\n" + e.getMessage(), "Erro do Sistema", JOptionPane.ERROR_MESSAGE);
}
}
public void setDataInicial(Date dataInicial) {
this.dataInicial = dataInicial;
}
public void setDataFinal(Date dataFinal) {
this.dataFinal = dataFinal;
}
}
| [
"claudiobsi@gmail.com"
] | claudiobsi@gmail.com |
db09dde6367aae123643f8a4ab65abb0b816fdc7 | a00326c0e2fc8944112589cd2ad638b278f058b9 | /src/main/java/000/130/143/CWE190_Integer_Overflow__int_random_add_61b.java | 61cf8b7dc90f30938453f886a6e360a3b54564e2 | [] | 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,490 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_random_add_61b.java
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-61b.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: random Set data to a random value
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: add
* GoodSink: Ensure there will not be an overflow before adding 1 to data
* BadSink : Add 1 to data, which can cause an overflow
* Flow Variant: 61 Data flow: data returned from one method to another in different classes in the same package
*
* */
import java.security.SecureRandom;
public class CWE190_Integer_Overflow__int_random_add_61b
{
public int badSource() throws Throwable
{
int data;
/* POTENTIAL FLAW: Set data to a random value */
data = (new SecureRandom()).nextInt();
return data;
}
/* goodG2B() - use goodsource and badsink */
public int goodG2BSource() throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
return data;
}
/* goodB2G() - use badsource and goodsink */
public int goodB2GSource() throws Throwable
{
int data;
/* POTENTIAL FLAW: Set data to a random value */
data = (new SecureRandom()).nextInt();
return data;
}
}
| [
"anhtluet12@gmail.com"
] | anhtluet12@gmail.com |
6fb5eb245c40556a8aba88d8a53e048d3cd9d8cc | e35ebc804453da547f1e10592f0e38eec75b7e85 | /src/com/thanthu/exercises/polymorphism/logging/FileLogger.java | a805674f0161b18a4b9f78f91598c46ca7ca276b | [] | no_license | Thanthu/reflection-demo | 8d12b66287a047d5510bbdda619474c6acbfa3c2 | 4479760a13304051eff6aab65f7a70ae0edb0f53 | refs/heads/main | 2023-07-28T08:04:25.158927 | 2021-09-14T15:12:35 | 2021-09-14T15:12:35 | 403,211,631 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 326 | java | package com.thanthu.exercises.polymorphism.logging;
import java.io.IOException;
public class FileLogger {
public void sendRequest(String data) throws IOException {
throw new IOException("Failed saving request to a file");
// System.out.println(String.format("Data : %s was logged to the file system",
// data));
}
}
| [
"tnair@orthofx.com"
] | tnair@orthofx.com |
9e9251f3afb175656d9250d4428bd8fd846fb978 | e7dd00103174fb24b75a9f490987b03dadfab74f | /src/main/java/io/github/jhipster/application/config/AsyncConfiguration.java | 69320db808919c26723daf795ac04fc88e122eaf | [] | no_license | posox2000/resume | 343660fe4d650d1961f85a80a39eb3d1b933f92c | 614818b1a3e4563b8a885f64cb295379c4c8b861 | refs/heads/master | 2021-09-01T08:51:06.194947 | 2017-12-26T03:12:49 | 2017-12-26T03:12:49 | 115,375,406 | 0 | 0 | null | 2017-12-26T03:12:51 | 2017-12-26T01:58:23 | Java | UTF-8 | Java | false | false | 1,788 | java | package io.github.jhipster.application.config;
import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor;
import io.github.jhipster.config.JHipsterProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.*;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
@Configuration
@EnableAsync
@EnableScheduling
public class AsyncConfiguration implements AsyncConfigurer {
private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class);
private final JHipsterProperties jHipsterProperties;
public AsyncConfiguration(JHipsterProperties jHipsterProperties) {
this.jHipsterProperties = jHipsterProperties;
}
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
log.debug("Creating Async Task Executor");
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
executor.setThreadNamePrefix("resume-Executor-");
return new ExceptionHandlingAsyncTaskExecutor(executor);
}
@Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
return new SimpleAsyncUncaughtExceptionHandler();
}
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
160f68379d61fe57e568055b4d5d226d776b7696 | d4c3659ac9ddb5e3c0010b326f3bcc7e33ce0bed | /ren-automation-ui/src/main/java/com/exigen/ren/main/modules/customer/tabs/CustomerTypeTab.java | b887666559ef73909c63085dd44dd523d708d07a | [] | no_license | NandiniDR29/regression-test | cbfdae60e8b462cf32485afb3df0d9504200d0e1 | c4acbc3488195217f9d6a780130d2e5dfe01d6e5 | refs/heads/master | 2023-07-03T14:35:40.673146 | 2021-08-11T07:03:13 | 2021-08-11T07:03:13 | 369,527,619 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,156 | java | /* Copyright © 2016 EIS Group and/or one of its affiliates. All rights reserved. Unpublished work under U.S. copyright laws.
CONFIDENTIAL AND TRADE SECRET INFORMATION. No portion of this work may be copied, distributed, modified, or incorporated into any other media without EIS Group prior written consent.*/
package com.exigen.ren.main.modules.customer.tabs;
import com.exigen.istf.webdriver.controls.composite.assets.AssetList;
import com.exigen.ren.common.DefaultTab;
import com.exigen.ren.common.Tab;
import com.exigen.ren.common.pages.Page;
import com.exigen.ren.main.modules.customer.metadata.CustomerTypeMetaData;
import org.openqa.selenium.By;
public class CustomerTypeTab extends DefaultTab {
public CustomerTypeTab() {
super(CustomerTypeMetaData.class);
assetList = new AssetList(By.xpath("//div[@id='searchForm:customerTypePopup_container' or @id='customerTypePopup_container']"), metaDataClass);
assetList.applyConfiguration("CustomerTypeTab");
assetList.setName("CustomerType");
}
@Override
public Tab submitTab() {
Page.dialogConfirmation.confirm();
return this;
}
}
| [
"Nramachandra@previseit.com"
] | Nramachandra@previseit.com |
b2319f2d0e52a67aff1f458aed1ba4b4a651acdd | 85986e4d862e6fd257eb1c3db6f6b9c82bc6c4d5 | /prjClienteSIC/src/main/java/ec/com/smx/sic/cliente/gestor/ordenCompra/calculo/ICalculoAlmacenamientoOrdenCompraGestor.java | c6d6ec64f5bbe327877f33f2c5464917b57ba264 | [] | no_license | SebasBenalcazarS/RepoAngularJS | 1d60d0dec454fe4f1b1a8c434b656d55166f066f | 5c3e1d5bb4a624e30cba0d518ff0b0cda14aa92c | refs/heads/master | 2016-08-03T23:21:26.639859 | 2015-08-19T16:05:00 | 2015-08-19T16:05:00 | 40,517,374 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,873 | java | package ec.com.smx.sic.cliente.gestor.ordenCompra.calculo;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;
import ec.com.smx.sic.cliente.exception.SICException;
import ec.com.smx.sic.cliente.mdl.dto.OrdenCompraDetalleEstadoDTO;
import ec.com.smx.sic.cliente.mdl.dto.OrdenCompraEstadoDTO;
import ec.com.smx.sic.cliente.mdl.vo.AdminOrdenCompraVO;
public interface ICalculoAlmacenamientoOrdenCompraGestor extends Serializable{
/**
*
* @param ordenCompraDetalleEstadoDTO
* @param ordenCompraEstadoDTO
* @param cantidadAnterior
* @param pesoAnterior
* @param validarCantidades
* @param costoBrutoAnterior
* @param costoNetoAnterior
* @param valorUnidadManejoAnterior
* @throws SICException
*/
public void calculoValorTotalDetalle(OrdenCompraDetalleEstadoDTO ordenCompraDetalleEstadoDTO, OrdenCompraEstadoDTO ordenCompraEstadoDTO,
Integer cantidadAnterior, BigDecimal pesoAnterior, boolean validarCantidades, BigDecimal costoBrutoAnterior, BigDecimal costoNetoAnterior, BigDecimal valorUnidadManejoAnterior) throws SICException;
/**
* Metodo que calcula por referencia
* los valores totales sin impuestos
* actuales y anteriores
* (VALOR TOTAL - COSTO BRUTO)
* del detalle de la orden de compra
*
* @param validarCantidades
* @param ordenCompraDetalleEstadoDTO
* @param cantidadAnterior
* @param pesoAnterior
* @param valorUnidadManejoAcutal
* @param valorUnidadManejoAnterior
* @param costoBrutoAnterior
* @param costoNetoAnterior
* @return
* @throws SICException
*/
public BigDecimal[] calculoValorTotalDetalleSinImpuestos(boolean validarCantidades, OrdenCompraDetalleEstadoDTO ordenCompraDetalleEstadoDTO,
BigDecimal cantidadAnterior, BigDecimal pesoAnterior, BigDecimal valorUnidadManejoAcutal, BigDecimal valorUnidadManejoAnterior,
BigDecimal costoBrutoAnterior, BigDecimal costoNetoAnterior) throws SICException;
/**
*
* @param ordenCompraDetalleEstadoDTO
* @return
* @throws SICException
*/
public void calculoPesoPedidoPorCantidadPedida(OrdenCompraDetalleEstadoDTO ordenCompraDetalleEstadoDTO) throws SICException;
/**
*
* @param adminOrdenCompraVO
* @param ordenComptraDetalleEstadoList
* @param valorIngresado Corresponde a la clave identificadora en el mapa de propiedades dinamicas
* @throws SICException
*/
public void copiarValorSugeridoOrdenCompra(AdminOrdenCompraVO adminOrdenCompraVO, List<OrdenCompraDetalleEstadoDTO> ordenComptraDetalleEstadoList, String valorIngresado) throws SICException;
/**
*
* @param adminOrdenCompraVO
* @param ordenComptraDetalleEstadoList
* @param valorIngresado Corresponde a la clave identificadora en el mapa de propiedades dinamicas
* @throws SICException
*/
public void limpiarValorSugeridoOrdenCompra(AdminOrdenCompraVO adminOrdenCompraVO, List<OrdenCompraDetalleEstadoDTO> ordenComptraDetalleEstadoList, String valorIngresado) throws SICException;
/**
*
* @param adminOrdenCompraVO
* @throws SICException
*/
public void copiarValoresNuevaConsultaOrdenCompra(AdminOrdenCompraVO adminOrdenCompraVO) throws SICException;
/**
*
* @param adminOrdenCompraVO
* @throws SICException
*/
public void inicializacionValoresTotalesOrdenCompra(AdminOrdenCompraVO adminOrdenCompraVO) throws SICException;
/**
*
* @param adminOrdenCompraVO
* @throws SICException
*/
public void calcularTotalesNoAlmacenadosOrdenCompra(AdminOrdenCompraVO adminOrdenCompraVO) throws SICException;
/**
*
* @param adminOrdenCompraVO
* @throws SICException
*/
public void cambioMonedaOrigenPedido(AdminOrdenCompraVO adminOrdenCompraVO) throws SICException;
/**
* Metodo que calcula el valor total bruto
* de los detalle de la orden de compra
* @param ordenCompraDetalleEstadoDTOs
* @throws SICException
*/
public void calculoValorTotalBrutoDetalle(Collection<OrdenCompraDetalleEstadoDTO> ordenCompraDetalleEstadoDTOs)throws SICException;
/**
* Metodo que calcula el valor total bruto
* de los detalle de la orden de compra
* @param ordenCompraDetalleEstadoDTOs
* @throws SICException
*/
public void calculoValorTotalBrutoDetalle(OrdenCompraDetalleEstadoDTO ordenCompraDetalleEstadoDTO)throws SICException;
/**
* Metodo que calcula el peso recibido
* por cantidad recibida
*
* @param ordenCompraDetalleEstadoDTOs
* @return Peso pedido
* @throws SICException
*/
public BigDecimal calculoPesoPedidoPorCantidadRecibida(OrdenCompraDetalleEstadoDTO ordenCompraDetalleEstadoDTO, String valorTipoControlCosto, Double pesoAproximadoRecepcioc) throws SICException;
/**
* @param ordenCompraDetalleEstadoDTO
* @param costoBrutoActualizado
*/
public void recalcularValoresOrdenCompraDetalleEstado(OrdenCompraDetalleEstadoDTO ordenCompraDetalleEstadoDTO, BigDecimal costoBrutoActualizado);
} | [
"nbenalcazar@kruger.com.ec"
] | nbenalcazar@kruger.com.ec |
ad90277cc0fc9f71905222927731787f2b0fec0c | 7b73756ba240202ea92f8f0c5c51c8343c0efa5f | /classes/nlr.java | 812491f0795efa5a17a0cf8c99f8b53f968c2233 | [] | no_license | meeidol-luo/qooq | 588a4ca6d8ad579b28dec66ec8084399fb0991ef | e723920ac555e99d5325b1d4024552383713c28d | refs/heads/master | 2020-03-27T03:16:06.616300 | 2016-10-08T07:33:58 | 2016-10-08T07:33:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,247 | java | import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import com.tencent.mobileqq.activity.ChatActivityFacade;
import com.tencent.mobileqq.activity.aio.item.LongMsgItemBuilder;
import com.tencent.mobileqq.data.MessageForLongMsg;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
public class nlr
implements DialogInterface.OnClickListener
{
public nlr(LongMsgItemBuilder paramLongMsgItemBuilder, MessageForLongMsg paramMessageForLongMsg)
{
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
}
public void onClick(DialogInterface paramDialogInterface, int paramInt)
{
ChatActivityFacade.a(this.jdField_a_of_type_ComTencentMobileqqActivityAioItemLongMsgItemBuilder.jdField_a_of_type_ComTencentMobileqqAppQQAppInterface, this.jdField_a_of_type_ComTencentMobileqqActivityAioItemLongMsgItemBuilder.jdField_a_of_type_AndroidContentContext, this.jdField_a_of_type_ComTencentMobileqqActivityAioItemLongMsgItemBuilder.jdField_a_of_type_ComTencentMobileqqActivityAioSessionInfo, this.jdField_a_of_type_ComTencentMobileqqDataMessageForLongMsg);
}
}
/* Location: E:\apk\QQ_91\classes-dex2jar.jar!\nlr.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"1776098770@qq.com"
] | 1776098770@qq.com |
acf4a3265ead0138f3867a60afe6c7e6d14f72d8 | 3c4013d1ed3c6869653145b539c142d348db9fa8 | /src/main/java/de/dgverlag/myapp/aop/logging/LoggingAspect.java | f8b6b60382d0c6a0c1c44e8c9b0b9adf05b1831e | [] | no_license | fherrmann42/jhipster-sample-application-20210223 | 0f25dd6f8a77481a9e7b412e541afe5e9c9e0d48 | 3b81761aa59267874c9d2a15e12f3d9391efd40b | refs/heads/main | 2023-03-07T16:22:20.222897 | 2021-02-23T12:39:37 | 2021-02-23T12:39:37 | 341,550,391 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,160 | java | package de.dgverlag.myapp.aop.logging;
import io.github.jhipster.config.JHipsterConstants;
import java.util.Arrays;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
/**
* Aspect for logging execution of service and repository Spring components.
*
* By default, it only runs with the "dev" profile.
*/
@Aspect
public class LoggingAspect {
private final Environment env;
public LoggingAspect(Environment env) {
this.env = env;
}
/**
* Pointcut that matches all repositories, services and Web REST endpoints.
*/
@Pointcut(
"within(@org.springframework.stereotype.Repository *)" +
" || within(@org.springframework.stereotype.Service *)" +
" || within(@org.springframework.web.bind.annotation.RestController *)"
)
public void springBeanPointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
/**
* Pointcut that matches all Spring beans in the application's main packages.
*/
@Pointcut(
"within(de.dgverlag.myapp.repository..*)" + " || within(de.dgverlag.myapp.service..*)" + " || within(de.dgverlag.myapp.web.rest..*)"
)
public void applicationPackagePointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
/**
* Retrieves the {@link Logger} associated to the given {@link JoinPoint}.
*
* @param joinPoint join point we want the logger for.
* @return {@link Logger} associated to the given {@link JoinPoint}.
*/
private Logger logger(JoinPoint joinPoint) {
return LoggerFactory.getLogger(joinPoint.getSignature().getDeclaringTypeName());
}
/**
* Advice that logs methods throwing exceptions.
*
* @param joinPoint join point for advice.
* @param e exception.
*/
@AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e")
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))) {
logger(joinPoint)
.error(
"Exception in {}() with cause = \'{}\' and exception = \'{}\'",
joinPoint.getSignature().getName(),
e.getCause() != null ? e.getCause() : "NULL",
e.getMessage(),
e
);
} else {
logger(joinPoint)
.error(
"Exception in {}() with cause = {}",
joinPoint.getSignature().getName(),
e.getCause() != null ? e.getCause() : "NULL"
);
}
}
/**
* Advice that logs when a method is entered and exited.
*
* @param joinPoint join point for advice.
* @return result.
* @throws Throwable throws {@link IllegalArgumentException}.
*/
@Around("applicationPackagePointcut() && springBeanPointcut()")
public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
Logger log = logger(joinPoint);
if (log.isDebugEnabled()) {
log.debug("Enter: {}() with argument[s] = {}", joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs()));
}
try {
Object result = joinPoint.proceed();
if (log.isDebugEnabled()) {
log.debug("Exit: {}() with result = {}", joinPoint.getSignature().getName(), result);
}
return result;
} catch (IllegalArgumentException e) {
log.error("Illegal argument: {} in {}()", Arrays.toString(joinPoint.getArgs()), joinPoint.getSignature().getName());
throw e;
}
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
5d245e6e88e8a3e8c6f79837f6158af4861a28bb | f305ae5594e5474d54a738d14d5114163095397a | /workspace/Ej01_Spring_Beans/src/main/java/Pruebas.java | 2a49d63031dc09ba0d72784774b4b23394acfdf5 | [] | no_license | victorherrerocazurro/CursoSopraFullStackMarzo2018 | da5c32a2368bfa7172aa3fb64173ac4f00c7b7a9 | 0ffca12eb8bc7e74810282ef558e643bfd8f3836 | refs/heads/master | 2021-04-15T09:32:55.429800 | 2018-03-27T11:51:58 | 2018-03-27T11:51:58 | 126,366,646 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 531 | java | import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.curso.modelo.entidad.Cliente;
import com.curso.modelo.negocio.GestorClientes;
public class Pruebas {
public static void main(String[] args) {
ApplicationContext appCtx = new ClassPathXmlApplicationContext("Beans2.xml");
GestorClientes gc = (GestorClientes) appCtx.getBean("gestorClientes");
Cliente c = new Cliente(null,"Pepe","C/Falsa 123",555L);
gc.insertar(c);
}
}
| [
"victorherrerocazurro@gmail.com"
] | victorherrerocazurro@gmail.com |
51816159e46850a262728e40945e7d4c65bc44da | 08b8d598fbae8332c1766ab021020928aeb08872 | /src/gcom/gui/faturamento/conta/ManterContaConjuntoImovelActionForm.java | 574f59606eb1484723a63f4f2198c319dcf4288c | [] | no_license | Procenge/GSAN-CAGEPA | 53bf9bab01ae8116d08cfee7f0044d3be6f2de07 | dfe64f3088a1357d2381e9f4280011d1da299433 | refs/heads/master | 2020-05-18T17:24:51.407985 | 2015-05-18T23:08:21 | 2015-05-18T23:08:21 | 25,368,185 | 3 | 1 | null | null | null | null | WINDOWS-1252 | Java | false | false | 7,406 | java | /*
* Copyright (C) 2007-2007 the GSAN – Sistema Integrado de Gestão de Serviços de Saneamento
*
* This file is part of GSAN, an integrated service management system for Sanitation
*
* GSAN 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.
*
* GSAN 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., 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA
*/
/*
* GSAN – Sistema Integrado de Gestão de Serviços de Saneamento
* Copyright (C) <2007>
* Adriano Britto Siqueira
* Alexandre Santos Cabral
* Ana Carolina Alves Breda
* Ana Maria Andrade Cavalcante
* Aryed Lins de Araújo
* Bruno Leonardo Rodrigues Barros
* Carlos Elmano Rodrigues Ferreira
* Cláudio de Andrade Lira
* Denys Guimarães Guenes Tavares
* Eduardo Breckenfeld da Rosa Borges
* Fabíola Gomes de Araújo
* Flávio Leonardo Cavalcanti Cordeiro
* Francisco do Nascimento Júnior
* Homero Sampaio Cavalcanti
* Ivan Sérgio da Silva Júnior
* José Edmar de Siqueira
* José Thiago Tenório Lopes
* Kássia Regina Silvestre de Albuquerque
* Leonardo Luiz Vieira da Silva
* Márcio Roberto Batista da Silva
* Maria de Fátima Sampaio Leite
* Micaela Maria Coelho de Araújo
* Nelson Mendonça de Carvalho
* Newton Morais e Silva
* Pedro Alexandre Santos da Silva Filho
* Rafael Corrêa Lima e Silva
* Rafael Francisco Pinto
* Rafael Koury Monteiro
* Rafael Palermo de Araújo
* Raphael Veras Rossiter
* Roberto Sobreira Barbalho
* Rodrigo Avellar Silveira
* Rosana Carvalho Barbosa
* Sávio Luiz de Andrade Cavalcante
* Tai Mu Shih
* Thiago Augusto Souza do Nascimento
* Tiago Moreno Rodrigues
* Vivianne Barbosa Sousa
*
* Este programa é software livre; você pode redistribuí-lo e/ou
* modificá-lo sob os termos de Licença Pública Geral GNU, conforme
* publicada pela Free Software Foundation; versão 2 da
* Licença.
* Este programa é distribuído na expectativa de ser útil, mas SEM
* QUALQUER GARANTIA; sem mesmo a garantia implícita de
* COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM
* PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais
* detalhes.
* Você deve ter recebido uma cópia da Licença Pública Geral GNU
* junto com este programa; se não, escreva para Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
package gcom.gui.faturamento.conta;
import org.apache.struts.action.ActionForm;
public class ManterContaConjuntoImovelActionForm
extends ActionForm {
private static final long serialVersionUID = 1L;
private String inscricaoInicial;
private String inscricaoFinal;
private String quatidadeImovel;
private String mesAnoConta;
private String quatidadeConta;
private String codigoCliente;
private String nomeCliente;
private String dataVencimentoInicial;
private String dataVencimentoFinal;
private String idGrupoFaturamento;
private String mesAnoContaFinal;
private String inContasRevisao;
private String contaSelected;
private Integer[] motivosRevisaoDisponiveis;
public String getIdGrupoFaturamento(){
return idGrupoFaturamento;
}
public void setIdGrupoFaturamento(String idGrupoFaturamento){
this.idGrupoFaturamento = idGrupoFaturamento;
}
/**
* @return Retorna o campo codigoCliente.
*/
public String getCodigoCliente(){
return codigoCliente;
}
/**
* @param codigoCliente
* O codigoCliente a ser setado.
*/
public void setCodigoCliente(String codigoCliente){
this.codigoCliente = codigoCliente;
}
/**
* @return Retorna o campo nomeCliente.
*/
public String getNomeCliente(){
return nomeCliente;
}
/**
* @param nomeCliente
* O nomeCliente a ser setado.
*/
public void setNomeCliente(String nomeCliente){
this.nomeCliente = nomeCliente;
}
/**
* @return Retorna o campo inscricaoFinal.
*/
public String getInscricaoFinal(){
return inscricaoFinal;
}
/**
* @param inscricaoFinal
* O inscricaoFinal a ser setado.
*/
public void setInscricaoFinal(String inscricaoFinal){
this.inscricaoFinal = inscricaoFinal;
}
/**
* @return Retorna o campo inscricaoInicial.
*/
public String getInscricaoInicial(){
return inscricaoInicial;
}
/**
* @param inscricaoInicial
* O inscricaoInicial a ser setado.
*/
public void setInscricaoInicial(String inscricaoInicial){
this.inscricaoInicial = inscricaoInicial;
}
/**
* @return Retorna o campo mesAnoConta.
*/
public String getMesAnoConta(){
return mesAnoConta;
}
/**
* @param mesAnoConta
* O mesAnoConta a ser setado.
*/
public void setMesAnoConta(String mesAnoConta){
this.mesAnoConta = mesAnoConta;
}
/**
* @return Retorna o campo quatidadeConta.
*/
public String getQuatidadeConta(){
return quatidadeConta;
}
/**
* @param quatidadeConta
* O quatidadeConta a ser setado.
*/
public void setQuatidadeConta(String quatidadeConta){
this.quatidadeConta = quatidadeConta;
}
/**
* @return Retorna o campo quatidadeImovel.
*/
public String getQuatidadeImovel(){
return quatidadeImovel;
}
/**
* @param quatidadeImovel
* O quatidadeImovel a ser setado.
*/
public void setQuatidadeImovel(String quatidadeImovel){
this.quatidadeImovel = quatidadeImovel;
}
public String getDataVencimentoFinal(){
return dataVencimentoFinal;
}
public void setDataVencimentoFinal(String dataVencimentoFinal){
this.dataVencimentoFinal = dataVencimentoFinal;
}
public String getDataVencimentoInicial(){
return dataVencimentoInicial;
}
public void setDataVencimentoInicial(String dataVencimentoInicial){
this.dataVencimentoInicial = dataVencimentoInicial;
}
public String getMesAnoContaFinal(){
return mesAnoContaFinal;
}
public void setMesAnoContaFinal(String mesAnoContaFinal){
this.mesAnoContaFinal = mesAnoContaFinal;
}
public String getInContasRevisao(){
return inContasRevisao;
}
public void setInContasRevisao(String inContasRevisao){
this.inContasRevisao = inContasRevisao;
}
public Integer[] getMotivosRevisaoDisponiveis(){
return motivosRevisaoDisponiveis;
}
public void setMotivosRevisaoDisponiveis(Integer[] motivosRevisaoDisponiveis){
this.motivosRevisaoDisponiveis = motivosRevisaoDisponiveis;
}
public void setMotivosRevisaoDisponiveisComoInteger(String[] motivosRevisaoDisponiveis){
Integer[] arrayInteger = new Integer[motivosRevisaoDisponiveis.length];
for(int i = 0; i < motivosRevisaoDisponiveis.length; i++){
arrayInteger[i] = Integer.valueOf(motivosRevisaoDisponiveis[i]);
}
this.motivosRevisaoDisponiveis = arrayInteger;
}
public void limparMotivosRevisaoDisponiveisComoInteger(){
this.motivosRevisaoDisponiveis = null;
}
public String getContaSelected(){
return contaSelected;
}
public void setContaSelected(String contaSelected){
this.contaSelected = contaSelected;
}
}
| [
"Yara.Souza@procenge.com.br"
] | Yara.Souza@procenge.com.br |
506e155a31afd938f2bfe9e810bcaef6a3b11701 | 82915a6b4cc9f75df740d8d4966fa8c529e147eb | /src/gov/nasa/worldwind/util/xml/xal/XALAddressLines.java | 077a8c6ec0c5006f432aff4a94e62f21c2a9478f | [] | no_license | mdmzero0/WorldWind-Source | 0365eacf71fb86602b9ecf7752e6d3b234710bc7 | f6158e385a2b0efc94cec5cee7367482ace596e9 | refs/heads/master | 2020-12-25T10:59:39.731966 | 2011-07-29T12:12:14 | 2011-07-29T12:12:14 | 1,949,055 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,234 | java | /*
Copyright (C) 2001, 2010 United States Government
as represented by the Administrator of the
National Aeronautics and Space Administration.
All Rights Reserved.
*/
package gov.nasa.worldwind.util.xml.xal;
import gov.nasa.worldwind.util.xml.XMLEventParserContext;
import javax.xml.stream.events.XMLEvent;
import javax.xml.stream.XMLStreamException;
import java.util.*;
/**
* @author tag
* @version $Id: XALAddressLines.java 13388 2010-05-19 17:44:46Z tgaskins $
*/
public class XALAddressLines extends XALAbstractObject
{
protected List<XALAddressLine> addressLines;
public XALAddressLines(String namespaceURI)
{
super(namespaceURI);
}
@Override
protected void doAddEventContent(Object o, XMLEventParserContext ctx, XMLEvent event, Object... args)
throws XMLStreamException
{
if (o instanceof XALAddressLine)
this.addAddressLine((XALAddressLine) o);
}
public List<XALAddressLine> getAddressLines()
{
return this.addressLines;
}
protected void addAddressLine(XALAddressLine o)
{
if (this.addressLines == null)
this.addressLines = new ArrayList<XALAddressLine>();
this.addressLines.add(o);
}
}
| [
"sean.li@ai-solutions.com"
] | sean.li@ai-solutions.com |
160bc3e77c29d8576bacf4081be5e9ce908e4945 | 5e284ee27883843ef4d000333b78eeeda8b8b104 | /Algorithms/Neeraj/contest/leetcode/weekly/weekly213/CheckArrayFormationThroughConcatenation.java | 1cfd2b76ca646414833aeacb54d99a605eec181a | [] | no_license | Beryl2208/FAANG_Practice | 60d6e800a2969ae0821266cb139475e7398bba04 | 9d968988b1ad41d70f0b702b6ad847ba7b035ce1 | refs/heads/master | 2023-06-16T20:34:28.647181 | 2021-07-08T04:10:45 | 2021-07-08T04:10:45 | 384,302,377 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 941 | java | package weekly.weekly213;
/**
* Created on: Oct 31, 2020
* Questions:
*/
public class CheckArrayFormationThroughConcatenation {
public static void main(String[] args) {
System.out.println(canFormArray(new int[]{85}, new int[][]{{85}}));
System.out.println(canFormArray(new int[]{15, 88}, new int[][]{{88}, {15}}));
System.out.println(canFormArray(new int[]{49, 18, 16}, new int[][]{{16, 18, 49}}));
}
public static boolean canFormArray(int[] arr, int[][] pieces) {
int p1 = 0, len = arr.length;
while (p1 < len) {
boolean found = false;
for (int[] p : pieces) {
if (p1 >= len || arr[p1] != p[0]) continue;
for (int num : p) {
if (arr[p1++] != num) return false;
found = true;
}
}
if (!found) return false;
}
return true;
}
}
| [
"43318996+neerazz@users.noreply.github.com"
] | 43318996+neerazz@users.noreply.github.com |
1adcd30ad1ce958fd02e3bb8b60824a1ae7abeb4 | 42c50e58c738d67fd65105172c3291fbedfc1ecb | /src/com/szit/arbitrate/client/dao/impl/TempClientDaoImpl.java | d0655d03200629c557e905b824aa38558df2f8d6 | [] | no_license | xmxnkj/interact | 44860df5ad4550f972c26a5bab32460d9228d5c2 | f97b4631fc6bffcfc4606cac36286e6e59165f4e | refs/heads/master | 2020-08-08T20:31:53.681178 | 2019-01-10T07:33:31 | 2019-01-10T07:33:31 | 213,910,518 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,371 | java | package com.szit.arbitrate.client.dao.impl;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.google.common.collect.Maps;
import com.hsit.common.dao.QueryParam;
import com.hsit.common.dao.impl.BaseHibernateDaoImpl;
import com.hsit.common.exceptions.ErrorException;
import com.szit.arbitrate.client.dao.TempClientDao;
import com.szit.arbitrate.client.entity.TempClient;
import com.szit.arbitrate.client.entity.query.TempClientQuery;
/**
*
* @ProjectName:
* @ClassName: TempClientDaoImpl
* @Description:虚拟用户dao实现类
* @author Administrator
* @date 2017年3月24日 下午3:26:34
* @UpdateUser:
* @UpdateDate:
* @UpdateRemark:
* @Copyright: 2017 厦门西牛科技有限公司
* @versions:1.0
*/
@Repository
public class TempClientDaoImpl extends BaseHibernateDaoImpl<TempClient, TempClientQuery> implements TempClientDao{
@Override
public List<QueryParam> buildQueryParams(TempClientQuery query) {
List<QueryParam> qps = super.buildQueryParams(query);
if(query!=null){
if (query.getCaseId()!=null) {
qps.add(new QueryParam("caseId", query.getCaseId()));
}
if (query.getClientId()!=null) {
qps.add(new QueryParam("clientId", query.getClientId()));
}
if (query.getIdentifyName()!=null) {
qps.add(new QueryParam("identifyName", query.getIdentifyName()));
}
if (query.getIdentify()!=null) {
qps.add(new QueryParam("identify", query.getIdentify()));
}
if (query.getTel()!=null) {
qps.add(new QueryParam("tel", query.getTel()));
}
if (query.getSign()!=null) {
qps.add(new QueryParam("sign", query.getSign()));
}
if(query.isPartB()){
qps.add(new QueryParam("partB", query.isPartB()));
}
}
return qps;
}
@Override
public boolean isCaseClientAllCalled(String caseid) throws ErrorException {
Map<String,Object> paramMap = Maps.newHashMap();
paramMap.put("CASEIDPARAMS", caseid);
StringBuffer sbsql = new StringBuffer();
sbsql.append(" SELECT COUNT(*) FROM cl_tempclient ");
sbsql.append(" WHERE CASE_ID =:CASEIDPARAMS");
sbsql.append(" AND CLIENT_ID IS NULL");
Integer count = this.findSqlCounts(sbsql.toString(), paramMap).intValue();
if(count > 0){//说明有未召集的用户
return false;
}
return true;
}
}
| [
"chenwu0@aliyun.com"
] | chenwu0@aliyun.com |
1c3065847a74fab04f7f4641226f417b3d84bae5 | aaba5757aac5d1122e295d837cd3846748907c06 | /usg-server/src/main/java/com/accure/budget/service/BudgetFundTypeViewService.java | 1f1d3e304faf5a829be77a4260f7ccc59f60c1b7 | [] | no_license | usgInfo/UsgServerProject | 3845ef95595d9cd24285ac25c9164fc435494ad5 | a81df8ec3ef2b298acd0627e414825ddc71fc43b | refs/heads/master | 2021-05-15T00:35:02.159785 | 2018-03-21T13:17:26 | 2018-03-21T13:17:26 | 103,244,787 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,900 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.accure.budget.service;
import com.accure.budget.dto.FundType;
import com.accure.budget.manager.FundTypeManager;
import com.accure.usg.common.manager.SessionManager;
import com.accure.usg.server.utils.ApplicationConstants;
import com.accure.usg.server.utils.Common;
import com.google.gson.Gson;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger;
/**
*
* @author user
*/
public class BudgetFundTypeViewService extends HttpServlet {
Logger logger = Logger.getLogger(BudgetFundTypeViewService.class);
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/json;charset=UTF-8");
PrintWriter out = response.getWriter();
try {
/* TODO output your page here. You may use following sample code. */
HttpSession session = request.getSession(false);
if (SessionManager.checkUserSession(session)) {
List<FundType> fundTypeList = null;
fundTypeList = new FundTypeManager().view();
if (fundTypeList != null && !fundTypeList.isEmpty()) {
request.setAttribute("statuscode", ApplicationConstants.HTTP_STATUS_SUCCESS);
out.write(new Gson().toJson(fundTypeList));
} else if (fundTypeList == null || fundTypeList.isEmpty()) {
out.write(new Gson().toJson(new Common().LoginonFailure(ApplicationConstants.HTTP_STATUS_NODATA, ApplicationConstants.NO_DATA_FOUND)));
} else {
request.setAttribute("statuscode", ApplicationConstants.HTTP_STATUS_FAIL);
out.write(new Gson().toJson(ApplicationConstants.HTTP_STATUS_FAIL));
logger.info(Common.getLogMsg("BudgetFundTypeViewService", ApplicationConstants.VIEW, ApplicationConstants.FAIL));
}
} else {
request.setAttribute("statuscode", ApplicationConstants.HTTP_STATUS_INVALID_SESSION);
out.write(new Gson().toJson(ApplicationConstants.HTTP_STATUS_INVALID_SESSION));
logger.info(Common.getLogMsg("BudgetFundTypeViewService", ApplicationConstants.FAIL, ApplicationConstants.INVALID_SESSION));
}
} catch (Exception ex) {
request.setAttribute("statuscode", ApplicationConstants.HTTP_STATUS_EXCEPTION);
StringWriter stack = new StringWriter();
ex.printStackTrace(new PrintWriter(stack));
logger.error(Common.getLogMsg("BudgetFundTypeViewService", ApplicationConstants.ERROR, stack.toString()));
out.write(new Gson().toJson(ApplicationConstants.HTTP_STATUS_EXCEPTION));
} finally {
out.close();
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
| [
"31878742+usgInfo@users.noreply.github.com"
] | 31878742+usgInfo@users.noreply.github.com |
e5798a2a7f6ab04786b208904560f9ad29fae5ab | 8486bd12baf33b93fbf376b97040db4944a5df2b | /mylibrary/src/main/java/com/twy/network/business/RequestManagerFragment.java | 36de1a426eb6eec7b0b5ce8a07df7bf9e9ad5aef | [] | no_license | tuwenyuan/TTTT | c3d78684484f7d988ae938203cd9ef0085305fb2 | 06e771fe2459624ebd71ba603d0bfb0c7b2a6353 | refs/heads/master | 2020-12-14T20:41:24.875895 | 2020-04-28T10:04:07 | 2020-04-28T10:04:07 | 234,862,697 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,120 | java | package com.twy.network.business;
import android.os.Bundle;
import com.twy.network.interfaces.OnRecvDataListener;
import androidx.fragment.app.Fragment;
/**
* Author by twy, Email 499216359@qq.com, Date on 2019/1/14.
* PS: Not easy to write code, please indicate.
*/
public class RequestManagerFragment extends Fragment {
private StartRequestData startRequestData;
private Net.IUnsubscribe iUnsubscribe;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public void onDestroy() {
super.onDestroy();
if(startRequestData!=null)
startRequestData.unsubscribe();
if(iUnsubscribe!=null)
iUnsubscribe.unsubscribe();
}
public void startRequestData(Observable observable, OnRecvDataListener dataListener, Net.IUnsubscribe iUnsubscribe){
this.iUnsubscribe = iUnsubscribe;
if(startRequestData == null) {
startRequestData = new StartRequestData();
}
startRequestData.startRequestNetData(this,observable,dataListener);
}
}
| [
"123456"
] | 123456 |
bf7bd1dee31cd423f858a75d1df021836048002c | 6bf5dfe453d489e66b04a82514cc314f7042d958 | /WCP/fdahpStudyDesigner/src/main/java/com/hphc/mystudies/bo/StudyPermissionBO.java | d845e987d7a981ba467003f12e2960c8762caacf | [
"MIT",
"Apache-2.0"
] | permissive | elliot2extreme/FDA-My-Studies-Mobile-Application-System | 19cba2bb18404b83df1b37c42211201910b7bff2 | 4a9fa581a439c7b17a671efe7b2e5b6309d10cd7 | refs/heads/2019.05 | 2022-01-09T06:14:58.415053 | 2019-05-14T17:26:03 | 2019-05-14T17:26:03 | 190,152,983 | 0 | 0 | NOASSERTION | 2019-06-06T09:53:14 | 2019-06-04T07:37:13 | Java | WINDOWS-1252 | Java | false | false | 3,631 | java | /*
* Copyright © 2017-2018 Harvard Pilgrim Health Care Institute (HPHCI) and its Contributors.
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
* following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial
* portions of the Software.
*
* Funding Source: Food and Drug Administration ("Funding Agency") effective 18 September 2014 as Contract no.
* HHSF22320140030I/HHSF22301006T (the "Prime Contract").
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package com.hphc.mystudies.bo;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* The persistent class for the study_permission database table.
*
* @author Pradyumn
*
*/
@Entity
@Table(name = "study_permission")
@NamedQueries({ @NamedQuery(name = "getStudyPermissionById", query = " from StudyPermissionBO where studyId=:studyId and userId=:userId"), })
public class StudyPermissionBO implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@Column(name = "delFlag")
private Integer delFlag;
@Column(name = "project_lead")
private Integer projectLead;
@Column(name = "study_id")
private Integer studyId;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Integer studyPermissionId;
@Transient
private String userFullName;
@Column(name = "user_id")
private Integer userId;
@Column(name = "view_permission", length = 1)
private boolean viewPermission;
public Integer getDelFlag() {
return delFlag;
}
public Integer getProjectLead() {
return projectLead;
}
public Integer getStudyId() {
return studyId;
}
public Integer getStudyPermissionId() {
return studyPermissionId;
}
public String getUserFullName() {
return userFullName;
}
public Integer getUserId() {
return userId;
}
public boolean isViewPermission() {
return viewPermission;
}
public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag;
}
public void setProjectLead(Integer projectLead) {
this.projectLead = projectLead;
}
public void setStudyId(Integer studyId) {
this.studyId = studyId;
}
public void setStudyPermissionId(Integer studyPermissionId) {
this.studyPermissionId = studyPermissionId;
}
public void setUserFullName(String userFullName) {
this.userFullName = userFullName;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public void setViewPermission(boolean viewPermission) {
this.viewPermission = viewPermission;
}
}
| [
"Adam_Paczuski@harvardpilgrim.org"
] | Adam_Paczuski@harvardpilgrim.org |
858aff8e131684c44c1b71a11343dd4daed5ad84 | f91290b43c675f3657994f0b0485c1fc1eac786a | /src/com/pdd/pop/ext/fasterxml/jackson/databind/node/JsonNodeCreator.java | bcf80abf452e209a3a8999d8afedc6c52d276bfc | [] | no_license | lywx215/http-client | 49462178ebbbd3469f798f53b16f5cb52db56d72 | 29871ab097e2e6dfc1bd2ab5f1a63b6146797c5a | refs/heads/master | 2021-10-09T09:01:07.389764 | 2018-12-25T05:06:11 | 2018-12-25T05:06:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,282 | java | package com.pdd.pop.ext.fasterxml.jackson.databind.node;
import java.math.BigDecimal;
import java.math.BigInteger;
import com.pdd.pop.ext.fasterxml.jackson.databind.util.RawValue;
/**
* Interface that defines common "creator" functionality implemented
* both by {@link JsonNodeFactory} and {@link ContainerNode} (that is,
* JSON Object and Array nodes).
*
* @since 2.3
*/
public interface JsonNodeCreator
{
// Enumerated/singleton types
public ValueNode booleanNode(boolean v);
public ValueNode nullNode();
// Numeric types
public ValueNode numberNode(byte v);
public ValueNode numberNode(Byte value);
public ValueNode numberNode(short v);
public ValueNode numberNode(Short value);
public ValueNode numberNode(int v);
public ValueNode numberNode(Integer value);
public ValueNode numberNode(long v);
public ValueNode numberNode(Long value);
public ValueNode numberNode(BigInteger v);
public ValueNode numberNode(float v);
public ValueNode numberNode(Float value);
public ValueNode numberNode(double v);
public ValueNode numberNode(Double value);
public ValueNode numberNode(BigDecimal v);
// Textual nodes
public ValueNode textNode(String text);
// Other value (non-structured) nodes
public ValueNode binaryNode(byte[] data);
public ValueNode binaryNode(byte[] data, int offset, int length);
public ValueNode pojoNode(Object pojo);
/**
* Factory method to use for adding "raw values"; pre-encoded values
* that are included exactly as-is when node is serialized.
* This may be used, for example, to include fully serialized JSON
* sub-trees.
* Note that the concept may not work with all backends, and since
* no translation of any kinds is done it will not work when converting
* between data formats.
*
* @since 2.6
*/
public ValueNode rawValueNode(RawValue value);
// Structured nodes:
// (bit unkosher, due to forward references... but has to do for now)
public ArrayNode arrayNode();
/**
* Factory method for constructing a JSON Array node with an initial capacity
*
* @since 2.8
*/
public ArrayNode arrayNode(int capacity);
public ObjectNode objectNode();
}
| [
"lenzhao@yahoo.com"
] | lenzhao@yahoo.com |
d6396bfbaff01cae5ad36f5c5b201f74759d1cd6 | f662526b79170f8eeee8a78840dd454b1ea8048c | /cci.java | cf50ab4a7513f05efa0a04eff26b2f8959cc307c | [] | no_license | jason920612/Minecraft | 5d3cd1eb90726efda60a61e8ff9e057059f9a484 | 5bd5fb4dac36e23a2c16576118da15c4890a2dff | refs/heads/master | 2023-01-12T17:04:25.208957 | 2020-11-26T08:51:21 | 2020-11-26T08:51:21 | 316,170,984 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 281 | java | import javax.annotation.Nullable;
public interface cci {
void a(aog paramaog);
@Nullable
gy b(aog paramaog);
String[] f();
}
/* Location: F:\dw\server.jar!\cci.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/ | [
"jasonya2206@gmail.com"
] | jasonya2206@gmail.com |
6f2051e041d24a8471376e082cccee7c620e3c0a | c6c1a124eb1ff2fc561213d43d093f84d1ab2c43 | /mxz-ttafs-server/ai/cn/mxz/equipment/EquipmentImpl.java | f43fc19ef51c04ff25cea894004225fcf62cd36c | [] | no_license | fantasylincen/javaplus | 69201dba21af0973dfb224c53b749a3c0440317e | 36fc370b03afe952a96776927452b6d430b55efd | refs/heads/master | 2016-09-06T01:55:33.244591 | 2015-08-15T12:15:51 | 2015-08-15T12:15:51 | 15,601,930 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,417 | java | package cn.mxz.equipment;
import cn.mxz.Attribute;
import cn.mxz.EquipmentTemplet;
import cn.mxz.EquipmentTempletConfig;
import cn.mxz.ExclusiveTemplet;
import cn.mxz.ExclusiveTempletConfig;
import cn.mxz.battle.buff.AttributeSingle;
import cn.mxz.city.City;
import cn.mxz.city.CityFactory;
import cn.mxz.fighter.AttributeCalculator;
import cn.mxz.fighter.AttributeEmpty;
import cn.mxz.fighter.EquipmentTianMingConfig;
import cn.mxz.fighter.Part;
import cn.mxz.fighter.TianMingAddition;
import cn.mxz.formation.AdditionType;
import cn.mxz.user.team.god.Hero;
import db.dao.impl.DaoFactory;
import db.dao.impl.NewEquipmentDao;
import db.domain.NewEquipment;
class EquipmentImpl implements Equipment {
protected NewEquipment data;
public EquipmentImpl(NewEquipment data) {
this.data = data;
}
/**
* 装备基础加成
*
* @return
*/
private Attribute getBaseAddition() {
EquipmentTemplet temp = getTemplet();
int type = temp.getBaseAdditionType();
AdditionType at = AdditionType.fromNum(type);
if (at == null) {
return new AttributeEmpty();
}
int value = temp.getAdditionValue1();
value += temp.getAdditionGrow1() * getLevel();
return new AttributeSingle(at, value);
}
@Override
public int getLevel() {
return data.getLevel();
}
@Override
public int getPrice() {
return getTemplet().getSellPrice();
}
@Override
public EquipmentTemplet getTemplet() {
int typeId = getTypeId();
EquipmentTemplet t = EquipmentTempletConfig.get(typeId);
if (t == null) {
throw new NullPointerException("null typeid=" + typeId);
}
return t;
}
@Override
public int getStep() {
int quality = getTemplet().getQuality();
return quality;
}
@Override
public int getTypeId() {
return data.getTempletId();
}
@Override
public boolean isEquipped() {
int gridIndex = data.getFighterTypeId();
return gridIndex != -1;
}
@Override
public void exchangePosition(Equipment e2) {
NewEquipmentDao DAO = DaoFactory.getNewEquipmentDao();
EquipmentImpl e2R = (EquipmentImpl) e2;
int index = e2R.data.getFighterTypeId();
e2R.data.setFighterTypeId(data.getFighterTypeId());
data.setFighterTypeId(index);
DAO.update(data);
DAO.update(e2R.data);
}
@Override
public void qualityLevelUp() {
// int step = getStep();
double qOld = EquipmentConfig.getQ(data.getTempletId());
data.setTempletId(new EquipmentAfterLevelUp(this).getTypeId());
double qNew = EquipmentConfig.getQ(data.getTempletId());
int level = getLevel();
level = (int) (level * (qOld / qNew));
data.setLevel(level);
DaoFactory.getNewEquipmentDao().update(data);
}
@Override
public Integer getId() {
return data.getEquipmentId();
}
@Override
public int hashCode() {
return (data.getEquipmentId() + data.getUname()).hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
EquipmentImpl other = (EquipmentImpl) obj;
return other.data.getEquipmentId() == data.getEquipmentId()
&& other.data.getUname().equals(data.getUname());
}
@Override
public int getAdditionType() {
return getTemplet().getBaseAdditionType();
}
@Override
public Hero getHero() {
City city = CityFactory.getCity(data.getUname());
Hero hero = city.getTeam().get(data.getFighterTypeId());
return hero;
}
@Override
public Attribute getAddition() {
Attribute a = getBaseAddition();
Attribute d = getAdditionZhuanShu();
Attribute adding = AttributeCalculator.adding(a, d);
return adding;
}
/**
* 专属装备加成
*
* @return
*/
private Attribute getAdditionZhuanShu() {
Hero hero = getHero();
if (hero == null) {
return new AttributeEmpty();
}
Integer id2 = EquipmentTianMingConfig.getId(hero.getTypeId(),
getTypeId());
if (id2 != null) {
Attribute base = hero.getAdditions().getBase2();
ExclusiveTemplet temp = ExclusiveTempletConfig.get(id2);
if (temp.getFighterId() == hero.getTypeId()) {
return new TianMingAddition(base, temp);
}
}
return new AttributeEmpty();
}
@Override
public int getPriceLevelUpHistory() {
return data.getPrice() + getTemplet().getSellPrice();
}
@Override
public int getShenJia() {
EquipmentTemplet temp = getTemplet();
return (int) (temp.getSocial() + (getLevel()) * temp.getSocialGrow());
}
public NewEquipment getDto() {
return data;
}
@Override
public String toString() {
return getTemplet().getName();
}
@Override
public int getLevelUpCashNeed() {
return EquipmentConfig.getLevelUpNeed(data.getTempletId(),
data.getLevel());
}
@Override
public int getHeroId() {
return data.getFighterTypeId();
}
@Override
public int getSuitId() {
EquipmentTemplet t = getTemplet();
int suitId = t.getSuitId();
return suitId;
}
@Override
public Part getPart() {
int type = getAdditionType();
AdditionType additionType = AdditionType.fromNum(type);
Part part = Part.getPart(additionType);
return part;
}
@Override
public Attribute getBase() {
return getBaseAddition();
}
}
| [
"12-2"
] | 12-2 |
8f32d1732aea891a326ff91b58bd7997d1b13f5e | cfca4d5453a0c3418b3e59f311de046c763b36fc | /node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.java | 2675c10d2790a86676bce6d5078a362ae4545469 | [
"MIT",
"CC-BY-4.0",
"CC-BY-SA-4.0",
"CC-BY-NC-SA-4.0"
] | permissive | notjosh/Marzipants | e04b01328acbbfcc2ffba6fc88c729fdc6f573f0 | 4909a2502d9575469d2647a3d750a0c1a50ff9e9 | refs/heads/master | 2020-03-19T12:44:12.785247 | 2018-06-25T11:54:50 | 2018-06-25T11:54:50 | 136,536,830 | 151 | 2 | MIT | 2018-06-25T11:54:52 | 2018-06-07T22:13:24 | Objective-C | UTF-8 | Java | false | false | 3,565 | java | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.views.view;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.os.Build;
import android.util.TypedValue;
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.SoftAssertions;
import com.facebook.react.uimanager.ViewProps;
/**
* Utility class that helps with converting android drawable description used in JS to an actual
* instance of {@link Drawable}.
*/
public class ReactDrawableHelper {
private static final TypedValue sResolveOutValue = new TypedValue();
public static Drawable createDrawableFromJSDescription(
Context context,
ReadableMap drawableDescriptionDict) {
String type = drawableDescriptionDict.getString("type");
if ("ThemeAttrAndroid".equals(type)) {
String attr = drawableDescriptionDict.getString("attribute");
SoftAssertions.assertNotNull(attr);
int attrID = context.getResources().getIdentifier(attr, "attr", "android");
if (attrID == 0) {
throw new JSApplicationIllegalArgumentException("Attribute " + attr +
" couldn't be found in the resource list");
}
if (context.getTheme().resolveAttribute(attrID, sResolveOutValue, true)) {
final int version = Build.VERSION.SDK_INT;
if (version >= 21) {
return context.getResources()
.getDrawable(sResolveOutValue.resourceId, context.getTheme());
} else {
return context.getResources().getDrawable(sResolveOutValue.resourceId);
}
} else {
throw new JSApplicationIllegalArgumentException("Attribute " + attr +
" couldn't be resolved into a drawable");
}
} else if ("RippleAndroid".equals(type)) {
if (Build.VERSION.SDK_INT < 21) {
throw new JSApplicationIllegalArgumentException("Ripple drawable is not available on " +
"android API <21");
}
int color;
if (drawableDescriptionDict.hasKey(ViewProps.COLOR) &&
!drawableDescriptionDict.isNull(ViewProps.COLOR)) {
color = drawableDescriptionDict.getInt(ViewProps.COLOR);
} else {
if (context.getTheme().resolveAttribute(
android.R.attr.colorControlHighlight,
sResolveOutValue,
true)) {
color = context.getResources().getColor(sResolveOutValue.resourceId);
} else {
throw new JSApplicationIllegalArgumentException("Attribute colorControlHighlight " +
"couldn't be resolved into a drawable");
}
}
Drawable mask = null;
if (!drawableDescriptionDict.hasKey("borderless") ||
drawableDescriptionDict.isNull("borderless") ||
!drawableDescriptionDict.getBoolean("borderless")) {
mask = new ColorDrawable(Color.WHITE);
}
ColorStateList colorStateList = new ColorStateList(
new int[][] {new int[]{}},
new int[] {color});
return new RippleDrawable(colorStateList, null, mask);
} else {
throw new JSApplicationIllegalArgumentException(
"Invalid type for android drawable: " + type);
}
}
}
| [
"notjosh@gmail.com"
] | notjosh@gmail.com |
59a1830cb5379507ca5e00d1da8f86f42a707b39 | 24601fa1da5b2d906780d3e446f1410d930c78da | /src/test/java/org/darkestapp/money_exchange_rater/api/bittrex/BittrexApiTest.java | 706205df877fc8211de5642b85aa9ccf5470baa2 | [
"Apache-2.0"
] | permissive | darkestpriest/money-exchange-rater | 7641fc999368c29bc809f13128127356f2c71d33 | 56e904e0d697766d2598ade7d8c86e1a4b9ec307 | refs/heads/master | 2021-01-19T16:26:17.158126 | 2017-06-01T01:08:08 | 2017-06-01T01:08:08 | 88,264,120 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,874 | java | package org.darkestapp.money_exchange_rater.api.bittrex;
import org.darkestapp.money_exchange_rater.api.bittrex.processors.BittrexObject;
import org.darkestapp.money_exchange_rater.api.bittrex.util.BittrexCurrencyPair;
import org.darkestapp.money_exchange_rater.api.money_converter.exceptions.ParseException;
import org.darkestapp.money_exchange_rater.interfaces.CurrencyPair;
import org.darkestapp.money_exchange_rater.interfaces.MoneyExchangeRaterException;
import org.darkestapp.money_exchange_rater.util.CurrencyPairBuilder;
import org.junit.Test;
import static org.darkestapp.money_exchange_rater.enums.PublicCurrencyCode.ARS;
import static org.darkestapp.money_exchange_rater.enums.PublicCurrencyCode.BTC;
import static org.darkestapp.money_exchange_rater.enums.PublicCurrencyCode.USDT;
import static org.hamcrest.Matchers.greaterThan;
import static org.junit.Assert.*;
/**
* Created by Manuel Perez P. (darkpriestrelative@gmail.com) on 28/04/17.
*/
public class BittrexApiTest {
private static final BittrexCurrencyPair VALID_CURRENCY_PAIR =
new BittrexCurrencyPair(USDT, BTC);
private static final BittrexCurrencyPair INVALID_CURRENCY_PAIR =
new BittrexCurrencyPair(ARS, USDT);
private static final BittrexCurrencyPair REVERSE_VALID_CURRENCY_PAIR =
new BittrexCurrencyPair(BTC, USDT);
private static final BittrexCurrencyPair REVERSE_INVALID_CURRENCY_PAIR =
new BittrexCurrencyPair(USDT, ARS);
private BittrexApi bittrexApi = new BittrexApi();
@Test
public void getApiObjectTest() throws Exception {
BittrexObject result = bittrexApi.getApiObject(VALID_CURRENCY_PAIR);
assertNotNull(result);
assertEquals(VALID_CURRENCY_PAIR, result.getCurrencyPair());
assertThat(result.getBuyPrice().doubleValue(), greaterThan(0.0));
assertThat(result.getSellPrice().doubleValue(), greaterThan(0.0));
assertThat(result.getRequestTime().getTime(), greaterThan(0L));
}
@Test(expected = MoneyExchangeRaterException.class)
public void getApiObjectNullCurrencyPairTest() throws Exception {
bittrexApi.getApiObject(null);
}
@Test(expected = MoneyExchangeRaterException.class)
public void getApiObjectNotValidCurrencyPairTest() throws Exception {
bittrexApi.getApiObject(INVALID_CURRENCY_PAIR);
}
@Test
public void isCurrencyPairAllowedTest() throws Exception {
boolean result = bittrexApi.isCurrencyPairAllowed(VALID_CURRENCY_PAIR);
assertTrue(result);
}
@Test
public void isCurrencyPairAllowedNotValidCurrencyPairTest() throws Exception {
boolean result = bittrexApi.isCurrencyPairAllowed(INVALID_CURRENCY_PAIR);
assertFalse(result);
}
@Test
public void isReverseCurrencyPairAllowedTest() throws Exception {
boolean result = bittrexApi.isCurrencyPairAllowed(REVERSE_VALID_CURRENCY_PAIR);
assertTrue(result);
}
@Test
public void isCurrencyPairAllowedReverseNotValidCurrencyPairTest() throws Exception {
boolean result = bittrexApi.isCurrencyPairAllowed(REVERSE_INVALID_CURRENCY_PAIR);
assertFalse(result);
}
@Test(expected = ParseException.class)
public void isCurrencyPairAllowedNullCurrencyPairTest() throws Exception {
bittrexApi.isCurrencyPairAllowed(null);
}
@Test
public void currencyPairInterfaceAsArgumentTest() throws Exception {
CurrencyPair genericCurrencyPair = CurrencyPairBuilder.build(USDT, BTC);
BittrexObject result = bittrexApi.getApiObject(genericCurrencyPair);
assertNotNull(result);
assertThat(result.getBuyPrice().doubleValue(), greaterThan(0.0));
assertThat(result.getSellPrice().doubleValue(), greaterThan(0.0));
assertThat(result.getRequestTime().getTime(), greaterThan(0L));
}
} | [
"darkpriestrelative@gmail.com"
] | darkpriestrelative@gmail.com |
3908a472d960eccab885f8bb4d781a4f2428c088 | f07d6e0844c8f1131616f9460bebab962a817d70 | /app/src/main/java/com/rch/base/AppManager.java | a4cb68edd86a5d282f42e0c79413388f9dfa0a44 | [] | no_license | linbaoji/rch | 3439a4cf9361c7fe5c5697320ad1c0a2ecbfc753 | c42b4fbd68ac3d7e8423ccf9b8e859f2a0e53e0e | refs/heads/master | 2020-05-29T16:46:43.445155 | 2019-01-21T08:08:24 | 2019-01-21T08:08:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,627 | java | package com.rch.base;
import android.app.Activity;
import android.content.Context;
import com.rch.NewMainActivity;
import java.util.Stack;
/**
* 应用程序Activity管理类:用于Activity管理和应用程序退出
* @author wangbin
* @version 1.0
* @created
*/
public class AppManager {
private static Stack<Activity> activityStack;
private static AppManager instance;
private AppManager(){}
/**
* 单一实例
*/
public static AppManager getAppManager(){
if(instance==null){
instance=new AppManager();
}
return instance;
}
/**
* 添加Activity到堆栈
*/
public void addActivity(Activity activity){
if(activityStack==null){
activityStack=new Stack<Activity>();
}
if(!activityStack.contains(activity)){
activityStack.add(activity);
}
}
/**
* 获取当前Activity(堆栈中最后一个压入的)
*/
public Activity currentActivity(){
Activity activity=activityStack.lastElement();
return activity;
}
/**
* 结束当前Activity(堆栈中最后一个压入的)
*/
public void finishActivity(){
Activity activity=activityStack.lastElement();
finishActivity(activity);
}
/**
* 结束指定的Activity
*/
public void finishActivity(Activity activity){
if(activity!=null){
activityStack.remove(activity);
activity.finish();
activity=null;
}
}
/**
* 结束指定类名的Activity
*/
public void finishActivity(Class<?> cls){
Activity act=null;
for (Activity activity : activityStack) {
if(activity.getClass().equals(cls) ){
act=activity;
}
}
if(act!=null){
finishActivity(act);
}
}
/**
* 结束所有Activity
*/
public void finishAllActivity(){
for (int i = 0, size = activityStack.size(); i < size; i++){
if (null != activityStack.get(i)){
activityStack.get(i).finish();
}
}
activityStack.clear();
}
/**
* 结束除主界面之外的其他Activity
*/
public void finishOtherActivity(){
for (int i = 0, size = activityStack.size(); i < size; i++){
if (null != activityStack.get(i)){
if (!activityStack.get(i).getClass().equals(NewMainActivity.class)) {
activityStack.get(i).finish();
activityStack.remove(i);
}
}
}
}
/**
* 退出应用程序
*/
public void AppExit(Context context) {
try {
finishAllActivity();
android.os.Process.killProcess(android.os.Process.myPid());
// ActivityManager activityMgr= (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
// activityMgr.restartPackage(context.getPackageName());
// System.exit(0);
} catch (Exception e) {
}
}
} | [
"673132032@qq.com"
] | 673132032@qq.com |
a9507585721e89b7a7a1476b4a1c2c0808203794 | c41750c718bf1329d525c7ff39770c9ce5c1ebc3 | /이펙티브 자바/effectiveJava/src/main/java/Chap12_Serialization/item88/MutablePeriod.java | 4a7a0d382030acaae497c7798e0bff713595c0dd | [] | no_license | Java-Bom/ReadingRecord | 45a2649b96a4180063b6d398e9db24ae80664ffa | 004f9967c1502115b00cf23f60cf0d5a7fd9b2d2 | refs/heads/master | 2022-07-07T16:10:59.206131 | 2022-06-18T03:40:43 | 2022-06-18T03:40:57 | 214,052,494 | 472 | 47 | null | 2022-05-25T02:36:10 | 2019-10-10T00:44:15 | Java | UTF-8 | Java | false | false | 1,046 | java | package Chap12_Serialization.item88;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Date;
public class MutablePeriod {
public final Period period;
public final Date start;
public final Date end;
public MutablePeriod() {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bos);
out.writeObject(new Period(new Date(), new Date()));
//
//byte코드로 Date 참조를 bos에서 교체
//
ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
period = (Period) in.readObject();
start = (Date) in.readObject();
end = (Date) in.readObject();
} catch (IOException | ClassNotFoundException e) {
throw new AssertionError();
}
}
}
| [
"pci2676@gmail.com"
] | pci2676@gmail.com |
f1c4e76288384bae2f44e1937a09bbc74dfee850 | 7b3480d5f661a83753fc4e25a1e4c2a92a833d82 | /acme4j-client/src/main/java/org/shredzone/acme4j/provider/letsencrypt/LetsEncryptAcmeProvider.java | e75f7746e8253bc804677d68d2b8f5ed3cf87766 | [
"Apache-2.0"
] | permissive | svandav/acme4j | 3efe20f86064dc490f4e7397443259597955776e | 85d97a5b97014ff106b4867d8acf298c9b94e25b | refs/heads/master | 2021-08-23T22:27:14.135627 | 2017-12-05T23:16:23 | 2017-12-05T23:16:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,840 | java | /*
* acme4j - Java ACME client
*
* Copyright (C) 2015 Richard "Shred" Körber
* http://acme4j.shredzone.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* 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.
*/
package org.shredzone.acme4j.provider.letsencrypt;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import org.shredzone.acme4j.connector.HttpConnector;
import org.shredzone.acme4j.exception.AcmeProtocolException;
import org.shredzone.acme4j.provider.AbstractAcmeProvider;
import org.shredzone.acme4j.provider.AcmeProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* An {@link AcmeProvider} for <em>Let's Encrypt</em>.
* <p>
* The {@code serverUri} is {@code "acme://letsencrypt.org"} for the production server,
* and {@code "acme://letsencrypt.org/staging"} for a testing server.
* <p>
* If you want to use <em>Let's Encrypt</em>, always prefer to use this provider.
*
* @see <a href="https://letsencrypt.org/">Let's Encrypt</a>
*/
public class LetsEncryptAcmeProvider extends AbstractAcmeProvider {
private static final Logger LOG = LoggerFactory.getLogger(LetsEncryptAcmeProvider.class);
private static final String V01_DIRECTORY_URL = "https://acme-v01.api.letsencrypt.org/directory";
private static final String STAGING_DIRECTORY_URL = "https://acme-staging.api.letsencrypt.org/directory";
@Override
public boolean accepts(URI serverUri) {
return "acme".equals(serverUri.getScheme())
&& "letsencrypt.org".equals(serverUri.getHost());
}
@Override
public URL resolve(URI serverUri) {
String path = serverUri.getPath();
String directoryUrl;
if (path == null || "".equals(path) || "/".equals(path) || "/v01".equals(path)) {
directoryUrl = V01_DIRECTORY_URL;
} else if ("/staging".equals(path)) {
directoryUrl = STAGING_DIRECTORY_URL;
} else {
throw new IllegalArgumentException("Unknown URI " + serverUri);
}
try {
return new URL(directoryUrl);
} catch (MalformedURLException ex) {
throw new AcmeProtocolException(directoryUrl, ex);
}
}
@Override
@SuppressWarnings("deprecation")
protected HttpConnector createHttpConnector() {
if (Boolean.getBoolean("acme4j.le.certfix")) {
LOG.warn("Using a hardcoded Let's Encrypt certificate. It will expire by June 2018.");
return new LetsEncryptHttpConnector();
} else {
return super.createHttpConnector();
}
}
}
| [
"github@shredzone.org"
] | github@shredzone.org |
ab6c6e204478c96398ac4f8367c8a51f33c346cf | fef9fa08f61f0e2aee078e2467699f1a87648d38 | /MaterialDesignRecyclerViewAnimacao/app/src/main/java/br/com/trmasolucoes/materialdesignrecyclerviewanimacao/interfaces/RecyclerViewOnClickListenerHack.java | d5f36bfb53d6acd572103f44434b790c5a563ecf | [] | no_license | tairoroberto/Android-samples | 85854b21733c58950335ee7206694877aa812535 | 0da729baf1a52354e2a16c1bef01fbfdac57ed0d | refs/heads/master | 2021-05-11T19:44:41.757630 | 2018-01-17T20:37:06 | 2018-01-17T20:37:06 | 117,889,757 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 330 | java | package br.com.trmasolucoes.materialdesignrecyclerviewanimacao.interfaces;
import android.view.View;
/**
* Created by viniciusthiengo on 4/5/15.
*/
public interface RecyclerViewOnClickListenerHack {
public void onClickListener(View view, int position);
public void onLongPressClickListener(View view, int position);
}
| [
"tairoroberto@hotmail.com"
] | tairoroberto@hotmail.com |
20dd51058914abdcc55497cba56b08ac6b139c8d | 838576cc2e44f590d4c59f8a4d120f629969eedf | /src/com/sino/ams/sampling/model/OrderLineUploadModel.java | 5c9bc3878121b097ff3cacc19b36d5888662ce3f | [] | no_license | fancq/CQEAM | ecbfec8290fc4c213101b88365f7edd4b668fdc8 | 5dbb23cde5f062d96007f615ddae8fd474cb37d8 | refs/heads/master | 2021-01-16T20:33:40.983759 | 2013-09-03T16:00:57 | 2013-09-03T16:00:57 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 4,578 | java | package com.sino.ams.sampling.model;
import java.util.ArrayList;
import java.util.List;
import com.sino.ams.appbase.model.AMSSQLProducer;
import com.sino.ams.bean.SyBaseSQLUtil;
import com.sino.ams.sampling.constant.SamplingDicts;
import com.sino.ams.sampling.dto.AmsAssetsSamplingLineDTO;
import com.sino.base.db.sql.model.SQLModel;
import com.sino.base.exception.CalendarException;
import com.sino.base.exception.SQLModelException;
import com.sino.framework.dto.BaseUserDTO;
/**
* <p>Title: SinoAMS</p>
* <p>Description: 山西移动实物资产管理系统</p>
* <p>Copyright: 北京思诺博信息技术有限公司版权所有CopyrightCopyright (c) 2008</p>
* <p>Company: 北京思诺博信息技术有限公司</p>
* @author 唐明胜
* @version 1.0
*/
public class OrderLineUploadModel extends AMSSQLProducer {
/**
* 功能:资产盘点行表--待盘点资产表(AMS) AMS_ASSETS_SAMPLING_LINE 数据库SQL构造层构造函数
* @param userAccount SfUserDTO 代表本系统的最终操作用户对象
* @param dtoParameter AmsAssetsSamplingLineDTO 本次操作的数据
*/
public OrderLineUploadModel(BaseUserDTO userAccount, AmsAssetsSamplingLineDTO dtoParameter) {
super(userAccount, dtoParameter);
}
/**
* 功能:更新剩余条码为未扫描到信息。
* @return SQLModel
*/
public SQLModel getLeftBarcodesUpdateModel() {
SQLModel sqlModel = new SQLModel();
AmsAssetsSamplingLineDTO dto = (AmsAssetsSamplingLineDTO)dtoParameter;
List sqlArgs = new ArrayList();
String sqlStr = "UPDATE "
+ " AMS_ASSETS_SAMPLING_LINE"
+ " SET"
+ " SCAN_STATUS = ?,"
+ " REMARK = ?"
+ " WHERE"
+ " SCAN_STATUS = NULL"
+ " AND HEADER_ID = ?";
sqlArgs.add(SamplingDicts.STATUS_NO);
sqlArgs.add("PDA未扫描到该设备");
sqlArgs.add(dto.getHeaderId());
sqlModel.setSqlStr(sqlStr);
sqlModel.setArgs(sqlArgs);
return sqlModel;
}
/**
*
* @param itemExist boolean
* @return SQLModel
* @throws SQLModelException
*/
public SQLModel getLineUploadModel(boolean itemExist) throws SQLModelException {
SQLModel sqlModel = new SQLModel();
try {
List sqlArgs = new ArrayList();
String sqlStr = "";
AmsAssetsSamplingLineDTO dto = (AmsAssetsSamplingLineDTO) dtoParameter;
if (itemExist) {
sqlStr = "UPDATE "
+ " AMS_ASSETS_SAMPLING_LINE"
+ " SET"
+ " SCAN_STATUS = ?,"
+ " SCAN_ITEM_CODE = ?,"
+ " SCAN_ITEM_CATEGORY = ?,"
+ " SCAN_ITEM_NAME = ?,"
+ " SCAN_ITEM_SPEC = ?,"
+ " SCAN_RESPONSIBILITY_USER = ?,"
+ " SCAN_RESPONSIBILITY_DEPT = ?,"
+ " SCAN_START_DATE = ?,"
+ " SCAN_MAINTAIN_USER = ?"
+ " WHERE"
+ " HEADER_ID = ?"
+ " AND BARCODE = ?";
sqlArgs.add(dto.getScanStatus());
sqlArgs.add(dto.getScanItemCode());
sqlArgs.add(dto.getScanItemCategory());
sqlArgs.add(dto.getScanItemName());
sqlArgs.add(dto.getScanItemSpec());
sqlArgs.add(dto.getScanResponsibilityUser());
sqlArgs.add(dto.getScanResponsibilityDept());
sqlArgs.add(dto.getScanStartDate());
sqlArgs.add(dto.getScanMaintainUser());
sqlArgs.add(dto.getHeaderId());
sqlArgs.add(dto.getBarcode());
} else {
sqlStr = "INSERT INTO"
+ " AMS_ASSETS_SAMPLING_LINE("
+ " HEADER_ID,"
+ " BARCODE,"
+ " SYSTEM_STATUS,"
+ " SCAN_STATUS,"
+ " SCAN_ITEM_CODE,"
+ " SCAN_ITEM_CATEGORY,"
+ " SCAN_ITEM_NAME,"
+ " SCAN_ITEM_SPEC,"
+ " SCAN_RESPONSIBILITY_USER,"
+ " SCAN_RESPONSIBILITY_DEPT,"
+ " SCAN_MAINTAIN_USER,"
+ " SCAN_START_DATE,"
+ " REMARK"
+ ") VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
sqlArgs.add(dto.getHeaderId());
sqlArgs.add(dto.getBarcode());
sqlArgs.add(dto.getSystemStatus());
sqlArgs.add(dto.getScanStatus());
sqlArgs.add(dto.getScanItemCode());
sqlArgs.add(dto.getScanItemCategory());
sqlArgs.add(dto.getScanItemName());
sqlArgs.add(dto.getScanItemSpec());
sqlArgs.add(dto.getScanResponsibilityUser());
sqlArgs.add(dto.getScanResponsibilityDept());
sqlArgs.add(dto.getScanMaintainUser());
sqlArgs.add(dto.getScanStartDate());
sqlArgs.add(dto.getRemark());
}
sqlModel.setSqlStr(sqlStr);
sqlModel.setArgs(sqlArgs);
} catch (CalendarException ex) {
ex.printLog();
throw new SQLModelException(ex);
}
return sqlModel;
}
}
| [
"lq_xm@163.com"
] | lq_xm@163.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.