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
bddecad6452b8b6bac50c5825a8614145e319da9
8e9659672e5ffd623a534a5dd6ebb224b4a6cb98
/Core_Java_Practice/src/com/mkpits/java/basicjavaprograms/electricbill9th19.java
e0b9dc751cf4144cac56445e5b94666eed5bde02
[]
no_license
MAYU75/MKPITS_Mayuri_Dhole_Java_Nov_2020
8ec4ea495aff68ff8d0ce0b23119576121409130
2ac59daf4c17293898b03013cd0c7d7ac0c75627
refs/heads/main
2023-06-25T18:01:52.514638
2021-07-25T16:14:21
2021-07-25T16:14:21
339,304,237
0
0
null
null
null
null
UTF-8
Java
false
false
1,624
java
//Java program to calculate and print the Electricity bill of a given //customer. The customer id., name and unit consumed by the user should be taken //from the keyboard and display the total amount to pay to the customer. //The charge are as follow : //Unit charge/unit //upto 199 @1.20 //200 and above but less than 400 @1.50 //400 and above but less than 600 @1.80 //600 and above @2.00 //If bill exceeds Rs. 400 then a surcharge of 15% will be charged //and the minimum bill should be of Rs. 100/- import java.util.*; class bill { int custid; String custname; int unitconsumed; double billamount; } class electricbill9th19 { public static void main(String[] args) { bill b = new bill(); Scanner scan = new Scanner(System.in); System.out.println("Enter the id of the customer: "); b.custid = scan.nextInt(); System.out.println("Enter the name of the customer: "); b.custname = scan.next(); System.out.println("Enter the number of units consumed by the customer: "); b.unitconsumed = scan.nextInt(); if(b.unitconsumed <= 199) { b.billamount = b.unitconsumed*1.20f; } else if(b.unitconsumed >= 200 && b.unitconsumed < 400) { b.billamount = b.unitconsumed*1.50f; } else if(b.unitconsumed >= 400 && b.unitconsumed < 600) { b.billamount = b.unitconsumed*1.80f; } else { b.billamount = b.unitconsumed*2.00f; } if(b.billamount > 400) { b.billamount = b.billamount + (0.15*b.billamount); } if(b.billamount < 100) { b.billamount = 100; } System.out.println("Electricity bill of the customer is " + b.billamount); } }
[ "mayuridhole@gmail.com" ]
mayuridhole@gmail.com
07cedb5079bd0c344f3596df68cf03bcde18cb49
cd749f4cca68e90c67b8dcc893c72913d74d748c
/rtp-creditor-intake/src/main/java/rtp/demo/creditor/intake/service/MessageRestService.java
fd2d51e611d9e81a96fd4876505212117128aa65
[ "Apache-2.0" ]
permissive
prog-nov/rtp-demo-iso20022
a500c39190e357af5c22f429a76cdaa79db6a141
71adf3fb42320c348446b26466b8f43bcd619a20
refs/heads/master
2023-03-20T21:08:02.967704
2018-12-02T18:04:09
2018-12-02T18:04:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,089
java
package rtp.demo.creditor.intake.service; import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.Path; import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; import org.apache.camel.impl.DefaultCamelContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.example.kafka.producer.ExampleProducer; import rtp.demo.creditor.intake.service.model.CreditTransferMessagesRequest; @Path("/credit-transfer-messages") public class MessageRestService { private static final Logger log = LogManager.getLogger(MessageRestService.class); private ExampleProducer producer = new ExampleProducer(); private final CamelContext context = new DefaultCamelContext(); @POST @Consumes("application/xml") public void processCreditTransferMessages(CreditTransferMessagesRequest creditTransferMessageRequest) { log.info(creditTransferMessageRequest); ProducerTemplate camelProducer = context.createProducerTemplate(); camelProducer.sendBody("direct:credit-transfers", creditTransferMessageRequest); } }
[ "lizspan@gmail.com" ]
lizspan@gmail.com
b3184a983ebba841e807f08af075b28b8b24f9ff
bceba483c2d1831f0262931b7fc72d5c75954e18
/src/qubed/corelogic/PropertyValuationStateBase.java
64f963e2befd0233bb31c48039d7fe636834da41
[]
no_license
Nigel-Qubed/credit-services
6e2acfdb936ab831a986fabeb6cefa74f03c672c
21402c6d4328c93387fd8baf0efd8972442d2174
refs/heads/master
2022-12-01T02:36:57.495363
2020-08-10T17:26:07
2020-08-10T17:26:07
285,552,565
0
1
null
null
null
null
UTF-8
Java
false
false
1,622
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2020.08.05 at 04:46:29 AM CAT // package qubed.corelogic; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for PropertyValuationStateBase. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="PropertyValuationStateBase"> * &lt;restriction base="{http://www.mismo.org/residential/2009/schemas}MISMOEnum_Base"> * &lt;enumeration value="Original"/> * &lt;enumeration value="Subsequent"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "PropertyValuationStateBase") @XmlEnum public enum PropertyValuationStateBase { @XmlEnumValue("Original") ORIGINAL("Original"), @XmlEnumValue("Subsequent") SUBSEQUENT("Subsequent"); private final String value; PropertyValuationStateBase(String v) { value = v; } public String value() { return value; } public static PropertyValuationStateBase fromValue(String v) { for (PropertyValuationStateBase c: PropertyValuationStateBase.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "vectorcrael@yahoo.com" ]
vectorcrael@yahoo.com
871ea2eb69eac7bb146e11353613d5dbce95e1cf
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project417/src/main/java/org/gradle/test/performance/largejavamultiproject/project417/p2087/Production41751.java
ba1c362d7fad4471e5b8a6cf58b7fa9df98bfa4e
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,971
java
package org.gradle.test.performance.largejavamultiproject.project417.p2087; public class Production41751 { private Production41748 property0; public Production41748 getProperty0() { return property0; } public void setProperty0(Production41748 value) { property0 = value; } private Production41749 property1; public Production41749 getProperty1() { return property1; } public void setProperty1(Production41749 value) { property1 = value; } private Production41750 property2; public Production41750 getProperty2() { return property2; } public void setProperty2(Production41750 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
cb548bbe6d188a683419f94ad21a9f2d8dbd855b
cacd87f8831b02e254d65c5e86d48264c7493d78
/pc/new/cusystem/src/main/java/com/manji/cusystem/dao/common/Account.java
00d1caa8e68b48866f9582e2f1e4d77a347d9482
[]
no_license
lichaoqian1992/beautifulDay
1a5a30947db08d170968611068673d2f0b626eb2
44e000ecd47099dc5342ab8a208edea73602760b
refs/heads/master
2021-07-24T22:48:33.067359
2017-11-03T09:06:15
2017-11-03T09:06:15
108,791,908
0
3
null
null
null
null
UTF-8
Java
false
false
496
java
package com.manji.cusystem.dao.common; import lombok.Data; import java.util.List; /** * Created by Administrator on 2017/9/5. * 登录返回的账户信息 */ @Data public class Account { private String userId; private String userName; private String realName; private String email; private String job;//工号 private String mobile; private List<Role> role; private List<Menu> menu; private String sessionId; }
[ "1015598423@qq.com" ]
1015598423@qq.com
e6af8d005ed6dc548f634693c58320882c49cbdf
4efd23da9798a17ecaa3e1ea62ae36b9271b5a8b
/wxjy-common-1.0.5-SNAPSHOT/src/main/java/com/insigma/thread/Test.java
e141733e1f65123445d92c1639149250b4f8a227
[]
no_license
wengweng85/wxjy-web-all
a7237fac6185e7bf8b370f0675a748ae04831d9d
242f903e5db5c17d03159a804dad02d58c4c3561
refs/heads/master
2020-04-18T12:26:32.977558
2019-04-03T12:27:48
2019-04-03T12:27:48
167,533,377
0
1
null
null
null
null
UTF-8
Java
false
false
407
java
package com.insigma.thread; /** * Created by admin on 2018/11/16. */ public class Test { public static void main(String [] args){ System.out.println(Thread.currentThread().getName()); Account account=new Account("123456",1000); DrawThread a=new DrawThread("A",account,800); a.start(); DrawThread b=new DrawThread("B",account,800); b.start(); } }
[ "whengshaohui@163.com" ]
whengshaohui@163.com
8ce6946a42a4d3b99009f7b0231bb08f3ec02cc7
e6ce4ed86a5a9bec1b074245afc29ab002b06298
/src/leetcode/删除二叉搜索树中的结点.java
821d5b836e08bdfd7c9b4e7cd721897c78cd6550
[]
no_license
hyfangcong/data-struct
6c16f2909c8949142cb28ab6d02bacb71debdef2
dfd609daf7ab3c2afa289e6903aa2d7642b0398e
refs/heads/master
2020-05-18T23:02:57.700011
2019-11-22T01:47:31
2019-11-22T01:47:31
184,702,462
0
0
null
null
null
null
UTF-8
Java
false
false
2,088
java
package leetcode; public class 删除二叉搜索树中的结点 { public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } } //删除以root为根节点的二叉搜索树中值最大的节点,并且返回新的二叉树的根节点 private static TreeNode delMaxNode(TreeNode root){ if(root == null) return null; if(root.right == null){ TreeNode leftNode = root.left; root.left = null; return leftNode; } root.right = delMaxNode(root.right); return root; } //返回以root为根节点的二叉搜索树中值最大的节点 private static TreeNode maxmum(TreeNode node){ if(node.right == null) return node; return maxmum(node.right); } //删除以root为根节点的二叉搜素树中值为key的节点,并且返回新的二叉树的根节点 public TreeNode deleteNode(TreeNode root, int key) { if(root == null) return null; if(key < root.val){ root.left = deleteNode(root.left, key); return root; } else if(key > root.val){ root.right = deleteNode(root.right, key); return root; } else{ if(root.left == null){ TreeNode retNode = root.right; root.right = null; return retNode; } if(root.right == null){ TreeNode retNode = root.left; root.left = null; return retNode; } //root.left != null && root.right != null TreeNode node = maxmum(root.left); TreeNode precursor = new TreeNode(node.val); precursor.left = node.left; precursor.right = node.right; precursor.left = delMaxNode(root.left); precursor.right = root.right; root.left = root.right = null; return precursor; } } }
[ "1186977171@qq.com" ]
1186977171@qq.com
e7c3eefd2b37f6dc80b602d77487e016e0b8c555
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/thinkaurelius--titan/ac42df773fdcd4ecbfd4de68455dc989b3d7adb2/before/QueryException.java
824dce5fe56b92c28d3e7d73be009ee25be4ab54
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
810
java
package com.thinkaurelius.titan.core; /** * Exception thrown when a user defined query is invalid or could not be processed. * * @author Matthias Br&ouml;cheler (http://www.matthiasb.com) * */ public class QueryException extends GraphDatabaseException { private static final long serialVersionUID = 1L; /** * * @param msg Exception message */ public QueryException(String msg) { super(msg); } /** * * @param msg Exception message * @param cause Cause of the exception */ public QueryException(String msg, Throwable cause) { super(msg,cause); } /** * Constructs an exception with a generic message * * @param cause Cause of the exception */ public QueryException(Throwable cause) { this("Exception in query.",cause); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
9ce97fdc28c3383d57e4016f695216877fd8661d
8e336250046e1af7dce8bd205d183f38ccfce1cc
/bundles/sirix-core/src/main/java/org/sirix/access/trx/node/json/InternalJsonNodeTrx.java
dbf6dd763bec1cdeea40df6ecf1c25368ab2d0f8
[ "BSD-3-Clause" ]
permissive
90lantran/sirix
93d53b0eb53f48e1eee89742205542e02d5c2930
753f337f299ba26b2e672a32acf52b1fe4eca3ff
refs/heads/master
2023-06-14T11:22:25.134995
2021-07-07T18:33:08
2021-07-07T18:33:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
241
java
package org.sirix.access.trx.node.json; import org.sirix.api.json.JsonNodeTrx; public interface InternalJsonNodeTrx extends JsonNodeTrx { JsonNodeTrx setBulkInsertion(boolean bulkInsertion); void adaptHashesInPostorderTraversal(); }
[ "johannes.lichtenberger@unitedplanet.de" ]
johannes.lichtenberger@unitedplanet.de
a377523580ae23ebb6c35d27c9e61c78bb4e478f
ab6c0bc74dff2b522618ae4192b63ca879f3d07a
/utp-trade-ht/utp-common/src/main/java/cn/kingnet/utp/trade/common/security/PasswordAuthorization.java
73003b07c54518de06481decbee60f4484c7600d
[]
no_license
exyangbang/learngit
9669cb329c9686db96bd250a6ceceaf44f02e945
12c92df41a6b778a9db132c37dd136bedfd5b56f
refs/heads/master
2023-02-16T20:49:57.437363
2021-01-16T07:45:17
2021-01-16T07:45:17
330,107,905
0
0
null
null
null
null
UTF-8
Java
false
false
1,388
java
package cn.kingnet.utp.trade.common.security; import org.apache.commons.codec.digest.DigestUtils; import java.nio.charset.StandardCharsets; /** * @Description : Password签名验签 * @Author : linkaigui@scenetec.com * @Create : 2018/9/11 14:40 */ public class PasswordAuthorization implements Authorization { private final String appId; private final String password; public PasswordAuthorization(String appId, String password) { super(); this.appId = appId; this.password = password; } /** * 创建签名加密字符串 * * @param sortString 参数排序拼接字符串 * @return 签名字符串 */ public String createAuthorization(String sortString) { return String.format(AUTH_RSA + ":%s:%s:%s", this.appId, DigestUtils.md5Hex(this.password.getBytes(StandardCharsets.UTF_8)), System.currentTimeMillis()); } /** * 验签解密 * * @param sign 签名字符串 * @param timestamp 时间戳 * @param sortString 参数排序拼接字符串 * @return */ public boolean verifyAuthorization(String sign, String timestamp, String sortString) { return DigestUtils.md5Hex(this.password.getBytes(StandardCharsets.UTF_8)).equals(sign); } @Override public boolean verifyDn(String sign, String dbDN) { return true; } }
[ "945288603@qq.com" ]
945288603@qq.com
3d5f68519369e789b9cfdeca5e883a1a23403331
74aa76e909e72b874a4282175fbfce70dd9b34db
/src/test/java/org/assertj/core/api/offsettime/OffsetTimeAssert_isEqualToIgnoringTimezone_Test.java
2cf6956454e7ba220a86f70203f69543249a5669
[ "Apache-2.0" ]
permissive
zdanek/assertj-core
cf9d382487d351cf42df46f158f3811d794efa2a
a3dca528018aeeeef48fcdd74c1cf7c09c651ebb
refs/heads/master
2020-03-22T08:06:01.865218
2018-07-02T10:18:34
2018-07-02T10:18:34
26,014,052
0
0
null
null
null
null
UTF-8
Java
false
false
2,257
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. * * Copyright 2012-2018 the original author or authors. */ package org.assertj.core.api.offsettime; import static org.assertj.core.api.AbstractOffsetTimeAssert.NULL_OFFSET_TIME_PARAMETER_MESSAGE; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.util.FailureMessages.actualIsNull; import java.time.OffsetTime; import java.time.ZoneOffset; import org.assertj.core.api.BaseTest; import org.junit.Test; public class OffsetTimeAssert_isEqualToIgnoringTimezone_Test extends BaseTest { private final OffsetTime actual = OffsetTime.of(12, 0, 0, 0, ZoneOffset.MAX); @Test public void should_pass_if_actual_is_equal_to_other_ignoring_timezone_fields() { assertThat(actual).isEqualToIgnoringTimezone(OffsetTime.of(12, 0, 0, 0, ZoneOffset.UTC)); } @Test public void should_fail_if_actual_is_not_equal_to_given_OffsetTime_with_timezone_ignored() { thrown.expectAssertionError("%nExpecting:%n " + "<12:00+18:00>%n" + "to have same time fields except timezone as:%n" + " <12:01Z>%n" + "but had not."); assertThat(actual).isEqualToIgnoringTimezone(OffsetTime.of(12, 1, 0, 0, ZoneOffset.UTC)); } @Test public void should_fail_if_actual_is_null() { expectException(AssertionError.class, actualIsNull()); OffsetTime actual = null; assertThat(actual).isEqualToIgnoringTimezone(OffsetTime.now()); } @Test public void should_throw_error_if_given_offsetTime_is_null() { expectIllegalArgumentException(NULL_OFFSET_TIME_PARAMETER_MESSAGE); assertThat(actual).isEqualToIgnoringTimezone(null); } }
[ "joel.costigliola@gmail.com" ]
joel.costigliola@gmail.com
77384eaf2f9492dfdb5656947b304c20ee9b0894
d2984ba2b5ff607687aac9c65ccefa1bd6e41ede
/metamodel/net/datenwerke/rs/compiledreportstore/entities/PersistentCompiledReport_.java
1de72282ddbea32e8a3b8896b3c38ece8800f8f1
[]
no_license
bireports/ReportServer
da979eaf472b3e199e6fbd52b3031f0e819bff14
0f9b9dca75136c2bfc20aa611ebbc7dc24cfde62
refs/heads/master
2020-04-18T10:18:56.181123
2019-01-25T00:45:14
2019-01-25T00:45:14
167,463,795
0
0
null
null
null
null
UTF-8
Java
false
false
1,740
java
/* * ReportServer * Copyright (c) 2018 InfoFabrik GmbH * http://reportserver.net/ * * * This file is part of ReportServer. * * ReportServer is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package net.datenwerke.rs.compiledreportstore.entities; import java.util.Date; import javax.annotation.Generated; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.StaticMetamodel; import net.datenwerke.rs.core.service.reportmanager.entities.reports.Report; @Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor") @StaticMetamodel(PersistentCompiledReport.class) public abstract class PersistentCompiledReport_ { public static volatile SingularAttribute<PersistentCompiledReport, Report> report; public static volatile SingularAttribute<PersistentCompiledReport, Long> id; public static volatile SingularAttribute<PersistentCompiledReport, Date> createdOn; public static volatile SingularAttribute<PersistentCompiledReport, Long> version; public static volatile SingularAttribute<PersistentCompiledReport, byte[]> serializedReport; }
[ "srbala@gmail.com" ]
srbala@gmail.com
c042b63264389bc78f27b60d2792bd4ba50df1d2
a744882fb7cf18944bd6719408e5a9f2f0d6c0dd
/sourcecode7/src/java/beans/ConstructorProperties.java
a5df05de19d54e0702c8b4ad96411acfe9584d33
[ "Apache-2.0" ]
permissive
hanekawasann/learn
a39b8d17fd50fa8438baaa5b41fdbe8bd299ab33
eef678f1b8e14b7aab966e79a8b5a777cfc7ab14
refs/heads/master
2022-09-13T02:18:07.127489
2020-04-26T07:58:35
2020-04-26T07:58:35
176,686,231
0
0
Apache-2.0
2022-09-01T23:21:38
2019-03-20T08:16:05
Java
UTF-8
Java
false
false
2,540
java
/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.beans; import java.lang.annotation.*; import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.*; /** * <p>An annotation on a constructor that shows how the parameters of * that constructor correspond to the constructed object's getter * methods. For example: * * <blockquote> * <pre> * public class Point { * &#64;ConstructorProperties({"x", "y"}) * public Point(int x, int y) { * this.x = x; * this.y = y; * } * * public int getX() { * return x; * } * * public int getY() { * return y; * } * * private final int x, y; * } * </pre> * </blockquote> * <p> * The annotation shows that the first parameter of the constructor * can be retrieved with the {@code getX()} method and the second with * the {@code getY()} method. Since parameter names are not in * general available at runtime, without the annotation there would be * no way to know whether the parameters correspond to {@code getX()} * and {@code getY()} or the other way around.</p> * * @since 1.6 */ @Documented @Target(CONSTRUCTOR) @Retention(RUNTIME) public @interface ConstructorProperties { /** * <p>The getter names.</p> * * @return the getter names corresponding to the parameters in the * annotated constructor. */ String[] value(); }
[ "763803382@qq.com" ]
763803382@qq.com
190030ca9668e944e637d987b338e93e0f3feffc
d26f11c1611b299e169e6a027f551a3deeecb534
/core/resources/org/fdesigner/resources/internal/dtree/DataTree.java
5d11bbd85d7fe5d59058c9668d78e90cb7d3210e
[]
no_license
WeControlTheFuture/fdesigner-ui
1bc401fd71a57985544220b9f9e42cf18db6491d
62efb51e57e5d7f25654e67ef8b2762311b766b6
refs/heads/master
2020-11-24T15:00:24.450846
2019-12-27T08:47:23
2019-12-27T08:47:23
228,199,674
0
0
null
null
null
null
UTF-8
Java
false
false
7,567
java
/******************************************************************************* * Copyright (c) 2000, 2014 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.fdesigner.resources.internal.dtree; import org.fdesigner.runtime.common.runtime.IPath; /** * A <code>DataTree</code> represents the complete information of a source tree. * The tree contains all information within its branches, and has no relation to any * other source trees (no parent and no children). */ public class DataTree extends AbstractDataTree { /** * the root node of the tree */ private DataTreeNode rootNode; /** * Creates a new empty tree */ public DataTree() { this.empty(); } /** * Returns a copy of the node subtree rooted at the given key. * * @param key * Key of subtree to copy */ @Override public AbstractDataTreeNode copyCompleteSubtree(IPath key) { DataTreeNode node = findNodeAt(key); if (node == null) { handleNotFound(key); } return copyHierarchy(node); } /** * Returns a deep copy of a node and all its children. * * @param node * Node to be copied. */ DataTreeNode copyHierarchy(DataTreeNode node) { DataTreeNode newNode; int size = node.size(); if (size == 0) { newNode = new DataTreeNode(node.getName(), node.getData()); } else { AbstractDataTreeNode[] children = node.getChildren(); DataTreeNode[] newChildren = new DataTreeNode[size]; for (int i = size; --i >= 0;) { newChildren[i] = this.copyHierarchy((DataTreeNode) children[i]); } newNode = new DataTreeNode(node.getName(), node.getData(), newChildren); } return newNode; } /** * Creates a new child in the tree. * @see AbstractDataTree#createChild(IPath, String) */ @Override public void createChild(IPath parentKey, String localName) { createChild(parentKey, localName, null); } /** * Creates a new child in the tree. * @see AbstractDataTree#createChild(IPath, String, Object) */ @Override public void createChild(IPath parentKey, String localName, Object data) { DataTreeNode node = findNodeAt(parentKey); if (node == null) handleNotFound(parentKey); if (this.isImmutable()) handleImmutableTree(); /* If node already exists, replace */ if (node.includesChild(localName)) { node.replaceChild(localName, new DataTreeNode(localName, data)); } else { this.replaceNode(parentKey, node.copyWithNewChild(localName, new DataTreeNode(localName, data))); } } /** * Creates and returns an instance of the receiver. This is an * implementation of the factory method creational pattern for allowing * abstract methods to create instances */ @Override protected AbstractDataTree createInstance() { return new DataTree(); } /** * Creates or replaces a subtree in the tree. The parent node must exist. * * @param key * Key of parent node whose subtree we want to create/replace. * @param subtree * New node to insert into tree. */ @Override public void createSubtree(IPath key, AbstractDataTreeNode subtree) { // Copy it since destructive mods are allowed on the original // and shouldn't affect this tree. DataTreeNode newNode = copyHierarchy((DataTreeNode) subtree); if (this.isImmutable()) { handleImmutableTree(); } if (key.isRoot()) { setRootNode(newNode); } else { String localName = key.lastSegment(); newNode.setName(localName); // Another mod, but it's OK we've already copied IPath parentKey = key.removeLastSegments(1); DataTreeNode node = findNodeAt(parentKey); if (node == null) { handleNotFound(parentKey); } /* If node already exists, replace */ if (node.includesChild(localName)) { node.replaceChild(localName, newNode); } this.replaceNode(parentKey, node.copyWithNewChild(localName, newNode)); } } /** * Deletes a child of the tree. * @see AbstractDataTree#deleteChild(IPath, String) */ @Override public void deleteChild(IPath parentKey, String localName) { if (this.isImmutable()) handleImmutableTree(); DataTreeNode node = findNodeAt(parentKey); if (node == null || (!node.includesChild(localName))) { handleNotFound(node == null ? parentKey : parentKey.append(localName)); } else { this.replaceNode(parentKey, node.copyWithoutChild(localName)); } } /** * Initializes the receiver. * @see AbstractDataTree#empty() */ @Override public void empty() { this.setRootNode(new DataTreeNode(null, null)); } /** * Returns the specified node if it is present, otherwise returns null. * * @param key * Key of node to return */ public DataTreeNode findNodeAt(IPath key) { AbstractDataTreeNode node = this.getRootNode(); int keyLength = key.segmentCount(); for (int i = 0; i < keyLength; i++) { try { node = node.childAt(key.segment(i)); } catch (ObjectNotFoundException notFound) { return null; } } return (DataTreeNode) node; } /** * Returns the data at the specified node. * * @param key * Node whose data to return. */ @Override public Object getData(IPath key) { DataTreeNode node = findNodeAt(key); if (node == null) { handleNotFound(key); return null; } return node.getData(); } /** * Returns the names of the children of a node. * @see AbstractDataTree#getNamesOfChildren(IPath) */ @Override public String[] getNamesOfChildren(IPath parentKey) { DataTreeNode parentNode; parentNode = findNodeAt(parentKey); if (parentNode == null) { handleNotFound(parentKey); return null; } return parentNode.namesOfChildren(); } /** * Returns the root node of the tree */ @Override AbstractDataTreeNode getRootNode() { return rootNode; } /** * Returns true if the receiver includes a node with * the given key, false otherwise. */ @Override public boolean includes(IPath key) { return (findNodeAt(key) != null); } /** * Returns an object containing: * - a flag indicating whether the specified node was found * - the data for the node, if it was found * @param key * key of node for which we want to retrieve data. */ @Override public DataTreeLookup lookup(IPath key) { DataTreeNode node = this.findNodeAt(key); if (node == null) return DataTreeLookup.newLookup(key, false, null); return DataTreeLookup.newLookup(key, true, node.getData()); } /** * Replaces the node at the specified key with the given node */ protected void replaceNode(IPath key, DataTreeNode node) { DataTreeNode found; if (key.isRoot()) { this.setRootNode(node); } else { found = this.findNodeAt(key.removeLastSegments(1)); found.replaceChild(key.lastSegment(), node); } } /** * Sets the data at the specified node. * @see AbstractDataTree#setData(IPath, Object) */ @Override public void setData(IPath key, Object data) { DataTreeNode node = this.findNodeAt(key); if (this.isImmutable()) handleImmutableTree(); if (node == null) { handleNotFound(key); } else { node.setData(data); } } /** * Sets the root node of the tree * @see AbstractDataTree#setRootNode(AbstractDataTreeNode) */ void setRootNode(DataTreeNode aNode) { rootNode = aNode; } }
[ "491676539@qq.com" ]
491676539@qq.com
0f182b4910a22d2694146ed2594f34d6384c3d90
ec9b1c2bbf49885c5184286eb09bb1b921b94a7e
/Java Programming/OOPROG/P2W4/Basis/Spelling/src/SpellingDemo.java
8cfb4cde48f5c86d3f8918824de59ba041829097
[]
no_license
gvdhaege/KdG
a7c46973be303162c85383fe5eaa2d74fda12b0a
9fdec9800fdcd0773340472bc5d711bfe73be3e4
refs/heads/master
2020-03-27T17:44:10.149815
2018-05-25T09:52:42
2018-05-25T09:52:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
891
java
import java.util.Scanner; public class SpellingDemo { private static final String[] TEST_WOORDEN = {"onmiddellijk", "ogenblikkelijk"}; public static void main(String[] args) { boolean fout = true; do { System.out.print("Geef een synoniem voor 'direct' in 'o...k': "); Scanner scanner = new Scanner(System.in); String woord = scanner.nextLine(); try { if (woord.equalsIgnoreCase(TEST_WOORDEN[0]) || woord.equalsIgnoreCase(TEST_WOORDEN[1])) { System.out.println("Correct!"); fout = false; } else { throw new SpellingException("o...k", woord); } } catch (SpellingException e) { System.out.println(e.getMessage()); } } while (fout); } }
[ "steven.excelmans@cegeka.com" ]
steven.excelmans@cegeka.com
8159155545105703e3644e4c048ade7b7f74cf1d
5231935328a91016b102c36a7a27a09d8acd31a3
/src/quiz/zhaohang/Test1.java
ad17a5c6343f0e9af90b063778ee3699e1df1b29
[]
no_license
SeniYuting/LeetCode
5ed7aeaa7f69cfd0418d904ae7713225943f9be6
14272dc2766f3d24c167f74a878f5e21ce4f857c
refs/heads/master
2020-03-11T13:25:11.588516
2018-10-22T03:45:43
2018-10-22T03:45:43
130,024,373
0
0
null
null
null
null
UTF-8
Java
false
false
1,242
java
package quiz.zhaohang; import java.util.Scanner; /** * 输入:abcabc * 输出:abc * * 子串 */ public class Test1 { public static void main(String[] args) { Scanner in = new Scanner(System.in); String s = in.nextLine(); StringBuilder sb = new StringBuilder(s); int length = s.length(); char begin = sb.charAt(0); int minI = length; for (int i = length - 1; i >= 0; i--) { if (sb.charAt(i) == begin) { String child = s.substring(i, length); if (isTrue(child, s)) { minI = Math.min(minI, i); } } } if (minI == length) { System.out.println(false); } else { System.out.println(s.substring(minI, length)); } } public static boolean isTrue(String child, String s) { if (child == s) { return false; } int num = s.length() / child.length(); StringBuilder cb = new StringBuilder(child); for (int i = 0; i < num - 1; i++) { cb.append(child); } if (cb.toString().equals(s)) { return true; } return false; } }
[ "2580238659@qq.com" ]
2580238659@qq.com
55e237db32c19f63fff466904dc7e07d3f9ce5bd
b6ede16e87a6a08104051332ee6ab5555e0e719f
/barteczko/src/main/java/oca/ch06/FinallyNoCatch.java
79e12da7cfde3a6277eeecd43f60eab4c7f78236
[]
no_license
krzysztofkolcz/java
96929e4b993ddfb4b3c00b312dcb4fa56366fdf0
f10f14cd4fd8050be3e35ea0d65b2d8dc9cbd55f
refs/heads/master
2021-01-20T20:47:51.571515
2019-10-12T12:47:48
2019-10-12T12:47:48
64,404,216
0
0
null
2020-10-13T11:40:46
2016-07-28T14:53:34
Java
UTF-8
Java
false
false
631
java
package oca.ch06; // Pamiętać o tym, że jeżeli nie ma catch, wyjatek nie jest obslużony public class FinallyNoCatch { public static void main(String args[]) throws Exception{ try{ m1(); System.out.println("A"); }finally{ System.out.println("B"); } System.out.println("C"); } public static void m1() throws Exception { throw new Exception(); } } // print: // B // Exception in thread "main" java.lang.Exception // at oca.ch06.FinallyNoCatch.m1(FinallyNoCatch.java:14) // at oca.ch06.FinallyNoCatch.main(FinallyNoCatch.java:6)
[ "krzysztof.kolcz@gmail.com" ]
krzysztof.kolcz@gmail.com
b377b0cc023db07c19cc8adadd1ae1f2dc03cb69
50c937c8a203a5ca3a26f70980173a5a898da9e3
/l2gw-core/highfive/gameserver/java/ru/l2gw/gameserver/model/inventory/listeners/ArmorSetListener.java
8d0d7534f770943a1d200e06bfb1b4e6cda8d157
[]
no_license
gokusgit/hi5
b336cc8bf96b74cbd9419253444cf0a7df71a2fb
0345266a3cb3059b3e4e5ec31b59690af36e07fd
refs/heads/master
2020-07-10T23:33:14.500298
2019-08-26T07:41:18
2019-08-26T07:41:18
204,398,114
0
1
null
null
null
null
UTF-8
Java
false
false
4,270
java
package ru.l2gw.gameserver.model.inventory.listeners; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import ru.l2gw.gameserver.model.Inventory; import ru.l2gw.gameserver.model.L2ArmorSet; import ru.l2gw.gameserver.model.L2Player; import ru.l2gw.gameserver.model.L2Skill; import ru.l2gw.gameserver.model.instances.L2ItemInstance; import ru.l2gw.gameserver.serverpackets.SkillList; import ru.l2gw.gameserver.tables.ArmorSetsTable; import ru.l2gw.gameserver.tables.SkillTable; public final class ArmorSetListener implements PaperdollListener { public static short SET_COMMON_SKILL_ID = 3006; protected static final Log _log = LogFactory.getLog(ArmorSetListener.class.getName()); Inventory _inv; public ArmorSetListener(Inventory inv) { _inv = inv; } public void notifyEquipped(int slot, L2ItemInstance item) { if(!_inv.getOwner().isPlayer() || slot < 0) return; L2Player player = (L2Player) _inv.getOwner(); // checks if player worns chest item L2ItemInstance chestItem = _inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST); if(chestItem == null) return; // checks if there is armorset for chest item that player worns L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(chestItem.getItemId()); if(armorSet == null) return; boolean update = false; // checks if equipped item is part of set if(armorSet.containItem(slot, item.getItemId())) { if(armorSet.containAll(player)) { L2Skill commonSetSkill = SkillTable.getInstance().getInfo(SET_COMMON_SKILL_ID, 1); if(armorSet.getSkill() != null) { player.addSkill(armorSet.getSkill(), false); player.addSkill(commonSetSkill, false); update = true; } if(armorSet.getShieldSkill() != null && armorSet.containShield(player)) // has shield from set { player.addSkill(armorSet.getShieldSkill(), false); update = true; } if(armorSet.getEnchant6Skill() != null && armorSet.isEnchanted6(player)) // has all parts of set enchanted to 6 or more { player.addSkill(armorSet.getEnchant6Skill(), false); update = true; } } } else if(armorSet.containShield(item.getItemId()) && armorSet.containAll(player) && armorSet.getShieldSkill() != null) { player.addSkill(armorSet.getShieldSkill(), false); update = true; } if(update) player.sendPacket(new SkillList(player)); } public void notifyUnequipped(int slot, L2ItemInstance item) { if(slot < 0) return; boolean remove = false; L2Skill removeSkillId1 = null; // set skill L2Skill removeSkillId2 = null; // shield skill L2Skill removeSkillId3 = null; // enchant +6 skill if(slot == Inventory.PAPERDOLL_CHEST) { L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(item.getItemId()); if(armorSet == null) return; remove = true; removeSkillId1 = armorSet.getSkill(); removeSkillId2 = armorSet.getShieldSkill(); removeSkillId3 = armorSet.getEnchant6Skill(); } else { L2ItemInstance chestItem = _inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST); if(chestItem == null) return; L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(chestItem.getItemId()); if(armorSet == null) return; if(armorSet.containItem(slot, item.getItemId())) // removed part of set { remove = true; removeSkillId1 = armorSet.getSkill(); removeSkillId2 = armorSet.getShieldSkill(); removeSkillId3 = armorSet.getEnchant6Skill(); } else if(armorSet.containShield(item.getItemId())) // removed shield { remove = true; removeSkillId2 = armorSet.getShieldSkill(); } } boolean update = false; if(remove) { if(removeSkillId1 != null) { L2Skill commonSetSkill = SkillTable.getInstance().getInfo(SET_COMMON_SKILL_ID, 1); ((L2Player) _inv.getOwner()).removeSkill(removeSkillId1, false); ((L2Player) _inv.getOwner()).removeSkill(commonSetSkill, false); update = true; } if(removeSkillId2 != null) { _inv.getOwner().removeSkill(removeSkillId2); update = true; } if(removeSkillId3 != null) { _inv.getOwner().removeSkill(removeSkillId3); update = true; } } if(update) _inv.getOwner().sendPacket(new SkillList((L2Player) _inv.getOwner())); } }
[ "46629361+gokusgit@users.noreply.github.com" ]
46629361+gokusgit@users.noreply.github.com
8e06d1b94dd3312cf92f0958030d1bb955e8dad1
f662526b79170f8eeee8a78840dd454b1ea8048c
/bru.java
8e9c2e8c0bf4ec1d5e91706206d3688c543ca4e9
[]
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
2,779
java
/* */ import java.util.Random; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class bru /* */ extends btl<brt> /* */ { /* */ protected boolean a(bmy<?> ☃, Random random, int i, int j) { /* 18 */ ((boz)random).c(☃.c(), i, j); /* */ /* 20 */ ayu ayu = ☃.b().a(new el((i << 4) + 9, 0, (j << 4) + 9), ayz.b); /* */ /* 22 */ if (☃.a(ayu, (btl)bqo.f)) { /* 23 */ brt brt = (brt)☃.b(ayu, (btl)bqo.f); /* 24 */ double d = brt.a; /* 25 */ return (random.nextDouble() < d); /* */ } /* 27 */ return false; /* */ } /* */ /* */ /* */ protected boolean a(axz ☃) { /* 32 */ return ☃.g().r(); /* */ } /* */ /* */ /* */ protected bxc a(axz ☃, bmy<?> bmy1, boz boz1, int i, int j) { /* 37 */ ayu ayu = bmy1.b().a(new el((i << 4) + 9, 0, (j << 4) + 9), ayz.b); /* 38 */ return new a(☃, bmy1, boz1, i, j, ayu); /* */ } /* */ /* */ /* */ protected String a() { /* 43 */ return "Mineshaft"; /* */ } /* */ /* */ /* */ public int b() { /* 48 */ return 8; /* */ } /* */ /* */ public enum b { /* 52 */ a, /* 53 */ b; /* */ /* */ public static b a(int ☃) { /* 56 */ if (☃ < 0 || ☃ >= (values()).length) { /* 57 */ return a; /* */ } /* 59 */ return values()[☃]; /* */ } /* */ } /* */ /* */ public static class a /* */ extends bxc /* */ { /* */ private bru.b e; /* */ /* */ public a() {} /* */ /* */ public a(axz ☃, bmy<?> bmy1, boz boz1, int i, int j, ayu ayu1) { /* 71 */ super(i, j, ayu1, boz1, ☃.r_()); /* 72 */ brt brt = (brt)bmy1.b(ayu1, (btl)bqo.f); /* */ /* 74 */ this.e = brt.b; /* */ /* 76 */ bwq.d d = new bwq.d(0, boz1, (i << 4) + 2, (j << 4) + 2, this.e); /* 77 */ this.a.add(d); /* 78 */ d.a(d, this.a, boz1); /* */ /* 80 */ a(☃); /* 81 */ if (brt.b == bru.b.b) { /* */ /* 83 */ int k = -5; /* 84 */ int m = ☃.k() - this.b.e + this.b.d() / 2 - -5; /* */ /* */ /* 87 */ this.b.a(0, m, 0); /* 88 */ for (bxb bxb : this.a) { /* 89 */ bxb.a(0, m, 0); /* */ } /* */ } else { /* 92 */ a(☃, boz1, 10); /* */ } /* */ } /* */ } /* */ } /* Location: F:\dw\server.jar!\bru.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "jasonya2206@gmail.com" ]
jasonya2206@gmail.com
d0b3a365c72ced4dfcb8ef539b107304c7879623
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14122-35-20-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/job/internal/AbstractExtensionJob_ESTest_scaffolding.java
9ac1231b1a1b71a50dea48593738c0d1b978ad1e
[]
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
457
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 04 12:27:07 UTC 2020 */ package org.xwiki.extension.job.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractExtensionJob_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
e6d2149a9e011361458b5a2e98e9af8c6c0307cf
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201710/mcm/CustomerErrorReason.java
3b2b3272bd4ede3d0a4855bcf5cee77899dea5bd
[ "Apache-2.0" ]
permissive
mo4ss/googleads-java-lib
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
refs/heads/master
2022-12-05T00:30:56.740813
2022-11-16T10:47:15
2022-11-16T10:47:15
108,132,394
0
0
Apache-2.0
2022-11-16T10:47:16
2017-10-24T13:41:43
Java
UTF-8
Java
false
false
1,973
java
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.adwords.jaxws.v201710.mcm; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for CustomerError.Reason. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="CustomerError.Reason"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="INVALID_SERVICE_LINK"/> * &lt;enumeration value="INVALID_STATUS"/> * &lt;enumeration value="ACCOUNT_NOT_SET_UP"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "CustomerError.Reason") @XmlEnum public enum CustomerErrorReason { /** * * Referenced service link does not exist * * */ INVALID_SERVICE_LINK, /** * * An {@code ACTIVE} link cannot be made {@code PENDING} * * */ INVALID_STATUS, /** * * CustomerService cannot {@link CustomerService#get() get} an account that is not fully set up. * * */ ACCOUNT_NOT_SET_UP; public String value() { return name(); } public static CustomerErrorReason fromValue(String v) { return valueOf(v); } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
b5a21c72bcaa461ef4af73d16c3ba4cf7168e089
7b733d7be68f0fa4df79359b57e814f5253fc72d
/system/src/main/java/com/percussion/filetracker/PSFUDServerException.java
1b68f93f531319b13caa5344db12bf68c4ad5cbc
[ "LicenseRef-scancode-dco-1.1", "Apache-2.0", "OFL-1.1", "LGPL-2.0-or-later" ]
permissive
percussion/percussioncms
318ac0ef62dce12eb96acf65fc658775d15d95ad
c8527de53c626097d589dc28dba4a4b5d6e4dd2b
refs/heads/development
2023-08-31T14:34:09.593627
2023-08-31T14:04:23
2023-08-31T14:04:23
331,373,975
18
6
Apache-2.0
2023-09-14T21:29:25
2021-01-20T17:03:38
Java
UTF-8
Java
false
false
1,137
java
/* * Copyright 1999-2023 Percussion Software, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * limitations under the License. */ /** * This exception is thrown when application fails to load the content list * document from the server for a reason other than authentication failure. */ package com.percussion.filetracker; public class PSFUDServerException extends Exception { /** * Default constructor */ public PSFUDServerException() { } /** * Constructore that takes the message as a parameter. * * @param msg as String * */ public PSFUDServerException(String msg) { super(msg); } }
[ "nate.chadwick@gmail.com" ]
nate.chadwick@gmail.com
96fa541f6bd53fbea377e26cb0e151f0e6de432f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_a3774cff0aa1c4c5374c0ddbd22bd862d1b92565/MacUtil/2_a3774cff0aa1c4c5374c0ddbd22bd862d1b92565_MacUtil_t.java
54c828f32128e851bee0dbfc7190fa20d95230be
[]
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
4,014
java
/* * Copyright 2010-2011, Sikuli.org * Released under the MIT License. * */ package org.sikuli.script; import java.io.*; import java.awt.Window; import javax.swing.JFrame; import javax.swing.JOptionPane; import java.awt.Rectangle; import com.wapmx.nativeutils.jniloader.NativeLoader; import com.sun.awt.AWTUtilities; public class MacUtil implements OSUtil { private static boolean _askedToEnableAX = false; static { try{ NativeLoader.loadLibrary("MacUtil"); Debug.info("Mac OS X utilities loaded."); } catch(IOException e){ e.printStackTrace(); } } public int switchApp(String appName){ return openApp(appName); } public int switchApp(int pid, int num){ return -1; } // ignore winNum on Mac public int switchApp(String appName, int winNum){ return openApp(appName); } public int openApp(String appName){ Debug.history("openApp: \"" + appName + "\""); if(_openApp(appName)) return 0; return -1; } public int closeApp(String appName){ Debug.history("closeApp: \"" + appName +"\""); try{ String cmd[] = {"sh", "-c", "ps aux | grep \"" + appName + "\" | awk '{print $2}' | xargs kill"}; Debug.history("closeApp: " + appName); Process p = Runtime.getRuntime().exec(cmd); p.waitFor(); return p.exitValue(); } catch(Exception e){ return -1; } } public int closeApp(int pid){ return -1; } private void checkAxEnabled(String name){ if(!isAxEnabled()){ Debug.error(name + " requires Accessibility API to be enabled!"); if(_askedToEnableAX) return; int ret = JOptionPane.showConfirmDialog(null, "You need to enable Accessibility API to use the function \"" + name + "\".\n"+ "Should I open te System Preferences for you?", "Accessibility API not enabled", JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE); if(ret == JOptionPane.YES_OPTION){ openAxSetting(); JOptionPane.showMessageDialog(null, "Check \"Enable access for assistant devices\""+ "in the System Preferences\n and then close this dialog.", "Enable Accessibility API", JOptionPane.INFORMATION_MESSAGE); } _askedToEnableAX = true; } } public Region getWindow(String appName, int winNum){ checkAxEnabled("getWindow"); int pid = getPID(appName); return getWindow(pid, winNum); } public Region getWindow(String appName){ return getWindow(appName, 0); } public Region getWindow(int pid){ return getWindow(pid, 0); } public Region getWindow(int pid, int winNum){ Rectangle rect = getRegion(pid, winNum); if(rect != null) return new Region(rect); return null; } public Region getFocusedWindow(){ checkAxEnabled("getFocusedWindow"); Rectangle rect = getFocusedRegion(); if(rect != null) return new Region(rect); return null; } public native void bringWindowToFront(Window win, boolean ignoreMouse); public static native boolean _openApp(String appName); public static native int getPID(String appName); public static native Rectangle getRegion(int pid, int winNum); public static native Rectangle getFocusedRegion(); public static native boolean isAxEnabled(); public static native void openAxSetting(); public void setWindowOpacity(Window win, float alpha){ ((JFrame)win).getRootPane().putClientProperty("Window.alpha", new Float(alpha)); } public void setWindowOpaque(Window win, boolean opaque){ AWTUtilities.setWindowOpaque(win, opaque); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
40eade9d5f553c79e7bdbddef418e27890ca354f
e737a537195a431fe255fa3839a1e337d806a372
/java/src/concurrencies/asynchronous/asynchronous/async/gpcoder/CompletableFuture5.java
0d01e8f9868f4ad98fee063e50daf2b73c2eddfe
[]
no_license
iceleeyo/concurrency
132e9444fe20e5c80efd5c13d477af7e5c3a5d13
fa8a1d1ccad92330c17ae4b7e34d17c65076a7a4
refs/heads/master
2023-05-09T09:11:36.706861
2020-09-10T10:52:15
2020-09-10T10:52:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,646
java
package asynchronous.async.gpcoder; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; /** * * * @author EMAIL:vuquangtin@gmail.com , tel:0377443333 * @version 1.0.0 * @see <a href="https://github.com/vuquangtin/concurrency">https://github.com/ * vuquangtin/concurrency</a> * */ class MathUtil { public static int times(int number, int times) { return number * times; } public static int squared(int number) { return number * number; } public static boolean isEven(int number) { return number % 2 == 0; } } public class CompletableFuture5 { public static final int NUMBER = 5; public static void main(String[] args) throws InterruptedException, ExecutionException { // Create a CompletableFuture CompletableFuture<Integer> times2 = CompletableFuture.supplyAsync(() -> { try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) { throw new IllegalStateException(e); } return MathUtil.times(NUMBER, 2); }); // Attach a callback to the Future using thenApply() CompletableFuture<Boolean> greetingFuture = times2.thenApply(n -> { try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) { e.printStackTrace(); } return MathUtil.squared(n); }) // Chaining multiple callbacks .thenApply(n -> { try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) { e.printStackTrace(); } return MathUtil.isEven(n); }); // Block and get the result of the future. System.out.println(greetingFuture.get()); // true } }
[ "vuquangtin@gmail.com" ]
vuquangtin@gmail.com
af870096a3dd8db5a41f03df0e5d71f6ccaa301d
c1f0074d7292efdcae168fa59f66b818e0875d3a
/org.jebtk.graphplot/src/main/java/org/jebtk/graphplot/figure/props/FillProps.java
dc741cf65a05048585d52f38a9a3b592eafb4d78
[]
no_license
antonybholmes/jebtk-graphplot
9998714ccf240695bf230a61672b324ac9e25c54
d0135649c67631bd68f5be8001635afc14d1436a
refs/heads/master
2021-08-01T22:22:11.812623
2021-07-24T21:59:19
2021-07-24T21:59:19
100,538,054
0
0
null
null
null
null
UTF-8
Java
false
false
1,655
java
/** * Copyright 2016 Antony Holmes * * 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.jebtk.graphplot.figure.props; import java.awt.Color; /** * Set the color and stroke of a line on a plot element. * * @author Antony Holmes * */ public class FillProps extends ColorProps { /** * The constant serialVersionUID. */ private static final long serialVersionUID = 1L; /** * The member pattern. */ private FillPattern mPattern = FillPattern.SOLID; /** * Instantiates a new fill properties. */ public FillProps() { this(Color.WHITE); } /** * Instantiates a new fill properties. * * @param color the color */ public FillProps(Color color) { super(color); } /** * Copy. * * @param style the style */ public void copy(FillProps style) { mPattern = style.mPattern; super.copy(style); } /** * Returns the line color. * * @return The line color. */ public FillPattern getPattern() { return mPattern; } /** * Sets the pattern. * * @param pattern the new pattern */ public void setPattern(FillPattern pattern) { mPattern = pattern; fireChanged(); } }
[ "antony.b.holmes@gmail.com" ]
antony.b.holmes@gmail.com
b4f7d3d6913a8eca441df875680f9034c936b5c6
13ef8279d3f19ce7d4c031f4f6f9be2a323cb78e
/hazelcast/src/main/java/com/hazelcast/client/impl/ClientHeartbeatMonitor.java
4b6b3d515ec57362d511e65dae1e55f41443a1bc
[ "Apache-2.0" ]
permissive
y-higuchi/hazelcast
724554817ccc434d51f844ac079f902a21762724
26511b02bf47e0632f854c5c62d5902a674dd122
refs/heads/master
2021-01-18T01:08:02.060286
2015-04-07T05:17:13
2015-04-07T05:17:13
33,526,166
1
1
null
2015-04-07T06:28:47
2015-04-07T06:28:46
null
UTF-8
Java
false
false
3,226
java
package com.hazelcast.client.impl; import com.hazelcast.client.ClientEndpoint; import com.hazelcast.client.ClientEngine; import com.hazelcast.instance.GroupProperties; import com.hazelcast.logging.ILogger; import com.hazelcast.logging.Logger; import com.hazelcast.nio.Connection; import com.hazelcast.spi.ExecutionService; import com.hazelcast.util.Clock; import java.util.concurrent.TimeUnit; import java.util.logging.Level; /** * Monitors client heartbeats.. As soon as a client has not used its connection for a certain amount of time, * the client is disconnected. */ public class ClientHeartbeatMonitor implements Runnable { private static final int HEART_BEAT_CHECK_INTERVAL_SECONDS = 10; private static final int DEFAULT_CLIENT_HEARTBEAT_TIMEOUT_SECONDS = 60; private final ClientEndpointManagerImpl clientEndpointManager; private final ClientEngine clientEngine; private final long heartbeatTimeoutSeconds; private final ILogger logger = Logger.getLogger(ClientHeartbeatMonitor.class); private final ExecutionService executionService; public ClientHeartbeatMonitor(ClientEndpointManagerImpl endpointManager, ClientEngine clientEngine, ExecutionService executionService, GroupProperties groupProperties) { this.clientEndpointManager = endpointManager; this.clientEngine = clientEngine; this.executionService = executionService; this.heartbeatTimeoutSeconds = getHeartBeatTimeout(groupProperties); } private long getHeartBeatTimeout(GroupProperties groupProperties) { long configuredTimeout = groupProperties.CLIENT_HEARTBEAT_TIMEOUT_SECONDS.getInteger(); if (configuredTimeout > 0) { return configuredTimeout; } return DEFAULT_CLIENT_HEARTBEAT_TIMEOUT_SECONDS; } public void start() { executionService.scheduleWithFixedDelay(this, HEART_BEAT_CHECK_INTERVAL_SECONDS, HEART_BEAT_CHECK_INTERVAL_SECONDS, TimeUnit.SECONDS); } @Override public void run() { final String memberUuid = clientEngine.getLocalMember().getUuid(); for (ClientEndpoint ce : clientEndpointManager.getEndpoints()) { ClientEndpointImpl clientEndpoint = (ClientEndpointImpl) ce; monitor(memberUuid, clientEndpoint); } } private void monitor(String memberUuid, ClientEndpointImpl clientEndpoint) { if (clientEndpoint.isFirstConnection()) { return; } final Connection connection = clientEndpoint.getConnection(); final long lastTimePackageReceived = connection.lastReadTime(); final long timeoutInMillis = TimeUnit.SECONDS.toMillis(heartbeatTimeoutSeconds); final long currentTimeInMillis = Clock.currentTimeMillis(); if (lastTimePackageReceived + timeoutInMillis < currentTimeInMillis) { if (memberUuid.equals(clientEndpoint.getPrincipal().getOwnerUuid())) { logger.log(Level.WARNING, "Client heartbeat is timed out , closing connection to " + connection); connection.close(); } } } }
[ "alarmnummer@gmail.com" ]
alarmnummer@gmail.com
e68b3fac8733b0692f67f44e25e9cced82ae5d2c
5bb4a4b0364ec05ffb422d8b2e76374e81c8c979
/sdk/containerservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_08_01/ContainerServiceServicePrincipalProfile.java
5d3e69921416ed902b3cd5fbfdee5d9d60fb15a5
[ "MIT", "LicenseRef-scancode-generic-cla", "BSD-3-Clause", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.1-or-later", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
FabianMeiswinkel/azure-sdk-for-java
bd14579af2f7bc63e5c27c319e2653db990056f1
41d99a9945a527b6d3cc7e1366e1d9696941dbe3
refs/heads/main
2023-08-04T20:38:27.012783
2020-07-15T21:56:57
2020-07-15T21:56:57
251,590,939
3
1
MIT
2023-09-02T00:50:23
2020-03-31T12:05:12
Java
UTF-8
Java
false
false
2,766
java
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.management.containerservice.v2019_08_01; import com.fasterxml.jackson.annotation.JsonProperty; /** * Information about a service principal identity for the cluster to use for * manipulating Azure APIs. Either secret or keyVaultSecretRef must be * specified. */ public class ContainerServiceServicePrincipalProfile { /** * The ID for the service principal. */ @JsonProperty(value = "clientId", required = true) private String clientId; /** * The secret password associated with the service principal in plain text. */ @JsonProperty(value = "secret") private String secret; /** * Reference to a secret stored in Azure Key Vault. */ @JsonProperty(value = "keyVaultSecretRef") private KeyVaultSecretRef keyVaultSecretRef; /** * Get the ID for the service principal. * * @return the clientId value */ public String clientId() { return this.clientId; } /** * Set the ID for the service principal. * * @param clientId the clientId value to set * @return the ContainerServiceServicePrincipalProfile object itself. */ public ContainerServiceServicePrincipalProfile withClientId(String clientId) { this.clientId = clientId; return this; } /** * Get the secret password associated with the service principal in plain text. * * @return the secret value */ public String secret() { return this.secret; } /** * Set the secret password associated with the service principal in plain text. * * @param secret the secret value to set * @return the ContainerServiceServicePrincipalProfile object itself. */ public ContainerServiceServicePrincipalProfile withSecret(String secret) { this.secret = secret; return this; } /** * Get reference to a secret stored in Azure Key Vault. * * @return the keyVaultSecretRef value */ public KeyVaultSecretRef keyVaultSecretRef() { return this.keyVaultSecretRef; } /** * Set reference to a secret stored in Azure Key Vault. * * @param keyVaultSecretRef the keyVaultSecretRef value to set * @return the ContainerServiceServicePrincipalProfile object itself. */ public ContainerServiceServicePrincipalProfile withKeyVaultSecretRef(KeyVaultSecretRef keyVaultSecretRef) { this.keyVaultSecretRef = keyVaultSecretRef; return this; } }
[ "yaozheng@microsoft.com" ]
yaozheng@microsoft.com
30f67b08a85bf28cacb2732aa8c8f10377da7aa7
3bfbe2fc6cd399734b51f84a91daec94f74d513d
/src/pasa/cbentley/jpasc/pcore/task/ListTask.java
03f92dedb09e32b007212722948f6e966118173c
[ "MIT" ]
permissive
cpbentley/pasa_cbentley_jpasc_pcore
ef3f5910641fbe73ba0e311c9310c1c005761b1e
97c5b6ef55f22f654304bfa9d780e702e1ed9ba4
refs/heads/master
2023-02-27T18:48:26.431054
2023-02-06T12:05:05
2023-02-06T12:05:05
195,836,126
1
0
null
null
null
null
UTF-8
Java
false
false
1,823
java
/* * (c) 2018-2019 Charles-Philip Bentley * This code is licensed under MIT license (see LICENSE.txt for details) */ package pasa.cbentley.jpasc.pcore.task; import java.util.ArrayList; import java.util.List; import pasa.cbentley.core.src4.logging.Dctx; import pasa.cbentley.jpasc.pcore.ctx.PCoreCtx; import pasa.cbentley.jpasc.pcore.listlisteners.IListListener; public abstract class ListTask<T> extends PCoreTask { private IListListener<T> listener; public ListTask(PCoreCtx pc, IListListener<T> listener) { super(pc); this.setListener(listener); } public IListListener<T> getListener() { return listener; } public void publish(T t) { if (t != null) { ArrayList<T> list = new ArrayList<>(1); list.add(t); //send it to the listener or getListener().newDataAvailable(list); } } /** * Send our work to your listener. * * @param list */ public void publishList(List<T> list) { if (list != null) { //send it to the listener or getListener().newDataAvailable(list); } } public void setListener(IListListener<T> listener) { this.listener = listener; } //#mdebug public void toString(Dctx dc) { dc.root(this, "ListTask"); toStringPrivate(dc); super.toString(dc.sup()); if(listener != null) { dc.nlLvl1Line(listener,"IListListener"); } else { dc.append("IListListner is null"); } } public void toString1Line(Dctx dc) { dc.root1Line(this, "ListTask"); toStringPrivate(dc); super.toString1Line(dc.sup1Line()); } private void toStringPrivate(Dctx dc) { } //#enddebug }
[ "cbentley@mail.ru" ]
cbentley@mail.ru
ecc41b9bb352dcfbac5708225d28a7e35c76ae52
b7b870158ac741a303b854876f73173b3c984730
/1.JavaSyntax/src/com/codegym/task/task08/task0823/Solution.java
44778edc1f983d964b137ec6056aad60f4d465e7
[]
no_license
KrisTovski/CodeGym
b788c65b0ec2cc71c7a75dfd39b4221b571090e4
74be0793b2b1f8e9e7dc576e2cb5d25da505417a
refs/heads/master
2021-12-13T01:22:09.284904
2021-11-28T19:23:57
2021-11-28T19:23:57
246,921,433
0
0
null
null
null
null
UTF-8
Java
false
false
781
java
package com.codegym.task.task08.task0823; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /* Going national */ public class Solution { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String s = reader.readLine(); char[] ch = s.toLowerCase().trim().toCharArray(); for(int i = 0; i < ch.length; i++) { ch[0] = Character.toUpperCase(ch[0]); if(Character.isWhitespace(ch[i])) { if(Character.isLetter(ch[i+1])) ch[i+1] = Character.toUpperCase(ch[i+1]); } } s = String.valueOf(ch); System.out.println(s); } }
[ "kfilak@onet.eu" ]
kfilak@onet.eu
c77df83e3649187d3c781eddad3ffe3fe32e6ef3
d36547db41c511a73850f780eab27d298f795337
/ph-xsds-bdxr-smp2/src/test/java/com/helger/xsds/bdxr/smp2/CBDXRSMP2Test.java
9e0bd582b0a4d8aededc794c31f711a6eae9fa44
[ "Apache-2.0" ]
permissive
jdrew1303/ph-xsds
4ceaa7f51622a6bc501a49e3bc6385e436d4a614
0800f7d73c5e5bfaac91ee3d763549bf65ba8f1e
refs/heads/master
2023-09-04T06:13:30.875913
2021-10-30T19:34:19
2021-10-30T19:34:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,130
java
/* * Copyright (C) 2016-2021 Philip Helger (www.helger.com) * philip[at]helger[dot]com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.helger.xsds.bdxr.smp2; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertTrue; import javax.xml.validation.Schema; import org.junit.Test; import com.helger.commons.collection.impl.ICommonsList; import com.helger.commons.io.resource.ClassPathResource; import com.helger.xml.schema.XMLSchemaCache; /** * Test class for class {@link CBDXRSMP2}. * * @author Philip Helger */ public final class CBDXRSMP2Test { @Test public void testBasic () { assertNotNull (CBDXRSMP2.getXSDResourceUnqualifiedDataTypes ()); assertTrue (CBDXRSMP2.getXSDResourceUnqualifiedDataTypes ().exists ()); assertNotNull (CBDXRSMP2.getXSDResourceQualifiedDataTypes ()); assertTrue (CBDXRSMP2.getXSDResourceQualifiedDataTypes ().exists ()); assertNotNull (CBDXRSMP2.getXSDResourceBasicComponents ()); assertTrue (CBDXRSMP2.getXSDResourceBasicComponents ().exists ()); assertNotNull (CBDXRSMP2.getXSDResourceExtensionContentDataType ()); assertTrue (CBDXRSMP2.getXSDResourceExtensionContentDataType ().exists ()); assertNotNull (CBDXRSMP2.getXSDResourceExtensionComponents ()); assertTrue (CBDXRSMP2.getXSDResourceExtensionComponents ().exists ()); assertNotNull (CBDXRSMP2.getXSDResourcePayloadContentDataType ()); assertTrue (CBDXRSMP2.getXSDResourcePayloadContentDataType ().exists ()); assertNotNull (CBDXRSMP2.getXSDResourceAggregateComponents ()); assertTrue (CBDXRSMP2.getXSDResourceAggregateComponents ().exists ()); assertNotNull (CBDXRSMP2.getXSDResourceServiceGroup ()); assertTrue (CBDXRSMP2.getXSDResourceServiceGroup ().exists ()); assertEquals (CBDXRSMP2.getXSDResourceServiceGroup (), CBDXRSMP2.getXSDResourceServiceGroup ()); assertNotSame (CBDXRSMP2.getXSDResourceServiceGroup (), CBDXRSMP2.getXSDResourceServiceGroup ()); assertNotNull (CBDXRSMP2.getXSDResourceServiceMetadata ()); assertTrue (CBDXRSMP2.getXSDResourceServiceMetadata ().exists ()); assertEquals (CBDXRSMP2.getXSDResourceServiceMetadata (), CBDXRSMP2.getXSDResourceServiceMetadata ()); assertNotSame (CBDXRSMP2.getXSDResourceServiceMetadata (), CBDXRSMP2.getXSDResourceServiceMetadata ()); } @Test public void testSchemaCreationServiceGroup () { final ICommonsList <ClassPathResource> aList = CBDXRSMP2.getAllXSDIncludes (); aList.add (CBDXRSMP2.getXSDResourceServiceGroup ()); final Schema aSchema = XMLSchemaCache.getInstance ().getFromCache (aList); assertNotNull (aSchema); } @Test public void testSchemaCreationServiceGroup2 () { final ICommonsList <ClassPathResource> aList = CBDXRSMP2.getAllXSDResourceServiceGroup (); final Schema aSchema = XMLSchemaCache.getInstance ().getFromCache (aList); assertNotNull (aSchema); } @Test public void testSchemaCreationServiceMetadata () { final ICommonsList <ClassPathResource> aList = CBDXRSMP2.getAllXSDIncludes (); aList.add (CBDXRSMP2.getXSDResourceServiceMetadata ()); final Schema aSchema = XMLSchemaCache.getInstance ().getFromCache (aList); assertNotNull (aSchema); } @Test public void testSchemaCreationServiceMetadata2 () { final ICommonsList <ClassPathResource> aList = CBDXRSMP2.getAllXSDResourceServiceMetadata (); final Schema aSchema = XMLSchemaCache.getInstance ().getFromCache (aList); assertNotNull (aSchema); } }
[ "philip@helger.com" ]
philip@helger.com
ec9628271ff5b23b609594d7b385425c10f37623
63638d02aadd2a253e39723709cbe2f7ad846523
/src/main/java/com/alipay/hbaseviewer/ext/consumerecord/StringDateHandler.java
1073af2d52c6f76a4fe998315b1378b4d992558a
[]
no_license
carsonshan/simplehbaseviewer
00e788b497e1302f03a1cecee4805c1d74697c66
608666723e9b52aee02b49eb674c5dcf01acc90a
refs/heads/master
2020-05-23T15:07:14.359465
2015-01-22T10:00:29
2015-01-22T10:00:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
840
java
package com.alipay.hbaseviewer.ext.consumerecord; import java.util.Date; import org.apache.hadoop.hbase.util.Bytes; import com.alipay.simplehbase.type.AbstractTypeHandler; import com.alipay.simplehbase.util.DateUtil; /** * @author xinzhi * */ public class StringDateHandler extends AbstractTypeHandler { @Override protected boolean aboutToHandle(Class<?> type) { return type == Date.class; } @Override protected byte[] innerToBytes(Class<?> type, Object value) { String str = DateUtil.format((Date) value, "yyyy-MM-dd HH:mm:ss"); return Bytes.toBytes(str); } @Override protected Object innerToObject(Class<?> type, byte[] bytes) { String str = Bytes.toString(bytes); return DateUtil.parse(str, "yyyy-MM-dd HH:mm:ss"); } }
[ "xinzhi.zhang@alipay.com" ]
xinzhi.zhang@alipay.com
0809efbea918de2d7b17336bac153c509976d4a1
23f4d78623458d375cf23b7017c142dd45c32481
/Core/orient-collabdev/src/com/orient/collabdev/business/structure/constant/StructOperateConstant.java
0e7738d3ffdb5e7f5b1417df71257a09f4b9653b
[]
no_license
lcr863254361/weibao_qd
4e2165efec704b81e1c0f57b319e24be0a1e4a54
6d12c52235b409708ff920111db3e6e157a712a6
refs/heads/master
2023-04-03T00:37:18.947986
2021-04-11T15:12:45
2021-04-11T15:12:45
356,436,350
0
0
null
null
null
null
UTF-8
Java
false
false
299
java
package com.orient.collabdev.business.structure.constant; public final class StructOperateConstant { static public final String STRUCT_OPERATE_CREATE = "add"; static public final String STRUCT_OPERATE_DELETE = "delete"; static public final String STRUCT_OPERATE_UPDATE = "update"; }
[ "lcr18015367626" ]
lcr18015367626
f6ef82ba14bdc5df0e381b5750863cfada5aa15a
04cf8a62dc7c6cd872794b5bc2067500f31a277b
/app/src/main/java/com/zhizhong/farmer/module/my/fragment/VouchersYiGuoQiFragment.java
8b96fb82bdd171f590dfaefaea127f84b9fbbc92
[]
no_license
20180910/Farmer
3def5b87cb762766b5e191b7b3711b3848226568
2c3390f1ddf68d837e7b520fb8e5654189314a6f
refs/heads/master
2020-03-28T10:20:52.020803
2017-10-31T07:45:32
2017-10-31T07:45:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,051
java
package com.zhizhong.farmer.module.my.fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import com.zhizhong.farmer.R; import com.zhizhong.farmer.base.BaseFragment; import com.zhizhong.farmer.module.my.adapter.VouchersAdapter; import butterknife.BindView; /** * Created by administartor on 2017/8/8. */ public class VouchersYiGuoQiFragment extends BaseFragment { @BindView(R.id.rv_vouchers) RecyclerView rv_vouchers; VouchersAdapter adapter; @Override public void again() { } @Override protected int getContentView() { return R.layout.frag_vouchers; } @Override protected void initView() { adapter=new VouchersAdapter(mContext,R.layout.item_vouchers,0); rv_vouchers.setLayoutManager(new LinearLayoutManager(mContext)); rv_vouchers.setAdapter(adapter); } @Override protected void initData() { } @Override protected void onViewClick(View v) { } }
[ "2380253499@qq.com" ]
2380253499@qq.com
ef43153e07ee4df4961f42f927ea36ca35c8ca0b
85d75b0211b5f18aea4770556df1722a45dd4523
/src/main/java/org/codemucker/jmutate/generate/util/PluralToSingularConverter.java
46e808b0e20975876cddcf216cabdcd3e15503e6
[ "Apache-2.0" ]
permissive
codemucker/codemucker-jmutate
8b536d5a3475a47ae4b6723676e9d7712aaaeb84
a6417887685df469e018111a914cc85cf288a568
refs/heads/master
2021-01-01T06:17:00.821752
2015-05-06T07:54:47
2015-05-06T07:54:47
3,552,490
0
0
null
null
null
null
UTF-8
Java
false
false
3,628
java
package org.codemucker.jmutate.generate.util; import java.util.HashMap; import java.util.Map; public class PluralToSingularConverter { public static final PluralToSingularConverter INSTANCE = new PluralToSingularConverter(); private Map<String, String> pluralToSingular = new HashMap<>(); private Map<String, String> singleToPlural = new HashMap<>(); private PluralToSingularConverter() { addSingleToPlural("person", "people"); addSingleToPlural("fish", "fish"); addSingleToPlural("sheep", "sheep"); addSingleToPlural("cow", "cows"); // addSingleToPlural("company","companies"); // addSingleToPlural("address","adresses"); // addSingleToPlural("city","cities"); addSingleToPlural("series", "series"); addSingleToPlural("child", "children"); addSingleToPlural("money", "monies"); addSingleToPlural("man", "men"); addSingleToPlural("woman", "women"); addSingleToPlural("use", "uses"); addSingleToPlural("leaf", "leaves"); } private void addSingleToPlural(String single, String plural) { pluralToSingular.put(plural, single); singleToPlural.put(single, plural); } public String singleToPlural(String single) { if (single == null) { return null; } String plural = this.singleToPlural.get(single); if (plural == null) { if (pluralToSingular.containsKey(single)) { return plural; } if (single.endsWith("y")) { String w = removeLastChar(single); if (endsWithVowel(w)) { plural = w + "ys"; } else { plural = w + "ies"; } } else if (isEsEnding(single)) { plural = single + "es"; } else if (single.endsWith("f")) { plural = removeLastChar(single) + "ves"; } else if (single.endsWith("fe")) { plural = removeLastChars(single, 2) + "ves"; } else { plural = single + "s"; } } return plural; } public String pluralToSingle(String plural) { if (plural == null) { return null; } String singular = this.pluralToSingular.get(plural); if (singular == null) { if (singleToPlural.containsKey(plural)) { return plural; } if (plural.endsWith("ies")) { singular = removeLastChars(plural, 3) + "y"; } else if (plural.endsWith("ves")) { String w = removeLastChars(plural, 3); if (endsWithVowel(w)) { singular = w + "fe"; } else { singular = w + "f"; } } else if (plural.endsWith("ys")) { singular = removeLastChar(plural); } else if (plural.endsWith("es")) { String w = removeLastChars(plural, 2); if (isEsEnding(w)) { singular = w; } else { singular = removeLastChar(plural); } } else if (plural.endsWith("s")) { singular = removeLastChar(plural); } else { singular = plural; } } return singular; } private static boolean isEsEnding(String w) { return w.endsWith("ss") || w.endsWith("ch") || w.endsWith("ex") || w.endsWith("is") || w.endsWith("ix") || w.endsWith("nx") || w.endsWith("us"); } private static String removeLastChar(String s) { return removeLastChars(s, 1); } private static String removeLastChars(String s, int num) { return s.substring(0, s.length() - num); } private static boolean endsWithVowel(String s) { return isVowel(s.charAt(s.length() - 1)); } private static boolean isVowelFromEnd(String s, int pos) { return isVowel(s.charAt(s.length() - pos - 1)); } private static boolean isVowel(String s, int pos) { return isVowel(s.charAt(pos)); } private static boolean isVowel(char c) { c = Character.toLowerCase(c); switch (c) { case 'a': case 'e': case 'i': case 'o': case 'u': return true; default: return false; } } }
[ "bertvanbrakel@gmail.com" ]
bertvanbrakel@gmail.com
04fbd2611e405bedf51a0ec56cb6b967faeccacc
dfc2d24310b242b6510c2291fc6f737b4930ba7d
/Output/EvoSuite-Generation/test_schemaspy2/net/sourceforge/schemaspy/model/xml/SchemaMetaEvoSuiteTest.java
a5562aaca76d22369622c8e46a0e7201fca4fed5
[]
no_license
jakepetrovic/Jesh_Jacob_QualityOfTestsPaper
e06a97b0b0a1c647cbe499f37b958affff3c34aa
2945d31c76bb4bdc65a7c95061758d9b7c4fe497
refs/heads/master
2016-09-16T04:07:10.088029
2015-07-04T21:10:20
2015-07-04T21:10:20
20,139,705
0
1
null
null
null
null
UTF-8
Java
false
false
3,162
java
/* * This file was automatically generated by EvoSuite */ package net.sourceforge.schemaspy.model.xml; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; import net.sourceforge.schemaspy.model.InvalidConfigurationException; import net.sourceforge.schemaspy.model.xml.SchemaMeta; public class SchemaMetaEvoSuiteTest { //Test case number: 0 /* * 2 covered goals: * 1 net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V: I30 Branch 1 IFEQ L58 - true * 2 net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V: I124 Branch 5 IFNE L73 - false */ @Test public void test0() throws Throwable { SchemaMeta schemaMeta0 = null; try { schemaMeta0 = new SchemaMeta("';", "';", "';"); fail("Expecting exception: InvalidConfigurationException"); } catch(InvalidConfigurationException e) { /* * Specified meta file \"';\" does not exist */ } } //Test case number: 1 /* * 4 covered goals: * 1 net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V: I30 Branch 1 IFEQ L58 - false * 2 net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V: I37 Branch 2 IFNONNULL L59 - true * 3 net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V: I60 Branch 3 IFNE L62 - false * 4 net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V: I65 Branch 4 IFEQ L63 - true */ @Test public void test1() throws Throwable { SchemaMeta schemaMeta0 = null; try { schemaMeta0 = new SchemaMeta("/", "/", "/"); fail("Expecting exception: InvalidConfigurationException"); } catch(InvalidConfigurationException e) { /* * Meta directory \"/\" must contain a file named \"/.meta.xml\" */ } } //Test case number: 2 /* * 4 covered goals: * 1 net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V: I37 Branch 2 IFNONNULL L59 - false * 2 net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V: I30 Branch 1 IFEQ L58 - false * 3 net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V: I60 Branch 3 IFNE L62 - false * 4 net.sourceforge.schemaspy.model.xml.SchemaMeta.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V: I65 Branch 4 IFEQ L63 - true */ @Test public void test2() throws Throwable { SchemaMeta schemaMeta0 = null; try { schemaMeta0 = new SchemaMeta("/", "/", (String) null); fail("Expecting exception: InvalidConfigurationException"); } catch(InvalidConfigurationException e) { /* * Meta directory \"/\" must contain a file named \"/.meta.xml\" */ } } }
[ "jskracht@gmail.com" ]
jskracht@gmail.com
2d5ad8c546e599af076c95c9feebcb7454baad3a
c59f24c507d30bbb80f39e9a4f120fec26a43439
/hbase-src-1.2.1/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceAuditor.java
8a2f122f4631fa455291ee236fe08f89ff27067a
[ "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
6,698
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.namespace; import java.io.IOException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.HBaseIOException; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.MetaTableAccessor; import org.apache.hadoop.hbase.NamespaceDescriptor; import org.apache.hadoop.hbase.TableExistsException; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.master.MasterServices; import org.apache.hadoop.hbase.quotas.QuotaExceededException; /** * The Class NamespaceAuditor performs checks to ensure operations like table creation and region * splitting preserve namespace quota. The namespace quota can be specified while namespace * creation. */ @InterfaceAudience.Private public class NamespaceAuditor { private static final Log LOG = LogFactory.getLog(NamespaceAuditor.class); static final String NS_AUDITOR_INIT_TIMEOUT = "hbase.namespace.auditor.init.timeout"; static final int DEFAULT_NS_AUDITOR_INIT_TIMEOUT = 120000; private NamespaceStateManager stateManager; private MasterServices masterServices; public NamespaceAuditor(MasterServices masterServices) { this.masterServices = masterServices; stateManager = new NamespaceStateManager(masterServices, masterServices.getZooKeeper()); } public void start() throws IOException { stateManager.start(); LOG.info("NamespaceAuditor started."); } /** * Check quota to create table. We add the table information to namespace state cache, assuming * the operation will pass. If the operation fails, then the next time namespace state chore runs * namespace state cache will be corrected. * @param tName - The table name to check quota. * @param regions - Number of regions that will be added. * @throws IOException Signals that an I/O exception has occurred. */ public void checkQuotaToCreateTable(TableName tName, int regions) throws IOException { if (stateManager.isInitialized()) { // We do this check to fail fast. if (MetaTableAccessor.tableExists(this.masterServices.getConnection(), tName)) { throw new TableExistsException(tName); } stateManager.checkAndUpdateNamespaceTableCount(tName, regions); } else { checkTableTypeAndThrowException(tName); } } /** * Check and update region count quota for an existing table. * @param tName - table name for which region count to be updated. * @param regions - Number of regions that will be added. * @throws IOException Signals that an I/O exception has occurred. */ public void checkQuotaToUpdateRegion(TableName tName, int regions) throws IOException { if (stateManager.isInitialized()) { stateManager.checkAndUpdateNamespaceRegionCount(tName, regions); } else { checkTableTypeAndThrowException(tName); } } private void checkTableTypeAndThrowException(TableName name) throws IOException { if (name.isSystemTable()) { LOG.debug("Namespace auditor checks not performed for table " + name.getNameAsString()); } else { throw new HBaseIOException(name + " is being created even before namespace auditor has been initialized."); } } /** * Get region count for table * @param tName - table name * @return cached region count, or -1 if table status not found * @throws IOException Signals that the namespace auditor has not been initialized */ public int getRegionCountOfTable(TableName tName) throws IOException { if (stateManager.isInitialized()) { NamespaceTableAndRegionInfo state = stateManager.getState(tName.getNamespaceAsString()); return state != null ? state.getRegionCountOfTable(tName) : -1; } checkTableTypeAndThrowException(tName); return -1; } public void checkQuotaToSplitRegion(HRegionInfo hri) throws IOException { if (!stateManager.isInitialized()) { throw new IOException( "Split operation is being performed even before namespace auditor is initialized."); } else if (!stateManager.checkAndUpdateNamespaceRegionCount(hri.getTable(), hri.getRegionName(), 1)) { throw new QuotaExceededException("Region split not possible for :" + hri.getEncodedName() + " as quota limits are exceeded "); } } public void updateQuotaForRegionMerge(HRegionInfo hri) throws IOException { if (!stateManager.isInitialized()) { throw new IOException( "Merge operation is being performed even before namespace auditor is initialized."); } else if (!stateManager .checkAndUpdateNamespaceRegionCount(hri.getTable(), hri.getRegionName(), -1)) { throw new QuotaExceededException("Region split not possible for :" + hri.getEncodedName() + " as quota limits are exceeded "); } } public void addNamespace(NamespaceDescriptor ns) throws IOException { stateManager.addNamespace(ns.getName()); } public void deleteNamespace(String namespace) throws IOException { stateManager.deleteNamespace(namespace); } public void removeFromNamespaceUsage(TableName tableName) throws IOException { stateManager.removeTable(tableName); } public void removeRegionFromNamespaceUsage(HRegionInfo hri) throws IOException { stateManager.removeRegionFromTable(hri); } /** * @param namespace The name of the namespace * @return An instance of NamespaceTableAndRegionInfo */ public NamespaceTableAndRegionInfo getState(String namespace) { if (stateManager.isInitialized()) { return stateManager.getState(namespace); } return null; } /** * Checks if namespace auditor is initialized. Used only for testing. * @return true, if is initialized */ public boolean isInitialized() { return stateManager.isInitialized(); } }
[ "fengchen8086@gmail.com" ]
fengchen8086@gmail.com
d89223d73fd45d3330ea62b0a60f51d65c09a595
f995e377608ff5ee656bf4ab2c45d156c0bf9600
/src/main/java/com/renchaigao/zujuba/dao/User.java
34517efd4132ba0a09665d50499e0525f7c607fd
[]
no_license
goying666/data20
74d0a621d77ec9630513274a9ec90e18ef31d978
090f3f7604724347de1928b761db9b39712687b0
refs/heads/master
2020-03-26T04:40:25.612167
2019-03-17T13:11:03
2019-03-17T13:11:03
144,515,703
0
0
null
null
null
null
UTF-8
Java
false
false
6,874
java
package com.renchaigao.zujuba.dao; public class User { private String id; private String age; private String ageLevel; private String realName; private String nickName; private String idCard; private String gender; private String job; private String telephone; private String marriage; private String userPWD; private String token; private String picPath = "/system/user.jpg"; private Boolean deleteStyle; private String upTime; private String myOpenInfoId; private String userInfoId; private String uniqueId; private String myTeamsId; private String myGamesId; private String myStoresId; private String photoInfoId; private String myAddressId; private String myRankInfoId; private String mySpendInfoId; private String myMessageInfoId; private String myFriendInfoId; private String myIntegrationInfoId; private String peopleListId; private String myPermissionInfoId; public String getId() { return id; } public void setId(String id) { this.id = id == null ? null : id.trim(); } public String getAge() { return age; } public void setAge(String age) { this.age = age == null ? null : age.trim(); } public String getAgeLevel() { return ageLevel; } public void setAgeLevel(String ageLevel) { this.ageLevel = ageLevel == null ? null : ageLevel.trim(); } public String getRealName() { return realName; } public void setRealName(String realName) { this.realName = realName == null ? null : realName.trim(); } public String getNickName() { return nickName; } public void setNickName(String nickName) { this.nickName = nickName == null ? null : nickName.trim(); } public String getIdCard() { return idCard; } public void setIdCard(String idCard) { this.idCard = idCard == null ? null : idCard.trim(); } public String getGender() { return gender; } public void setGender(String gender) { this.gender = gender == null ? null : gender.trim(); } public String getJob() { return job; } public void setJob(String job) { this.job = job == null ? null : job.trim(); } public String getTelephone() { return telephone; } public void setTelephone(String telephone) { this.telephone = telephone == null ? null : telephone.trim(); } public String getMarriage() { return marriage; } public void setMarriage(String marriage) { this.marriage = marriage == null ? null : marriage.trim(); } public String getUserPWD() { return userPWD; } public void setUserPWD(String userPWD) { this.userPWD = userPWD == null ? null : userPWD.trim(); } public String getToken() { return token; } public void setToken(String token) { this.token = token == null ? null : token.trim(); } public String getPicPath() { return picPath; } public void setPicPath(String picPath) { this.picPath = picPath == null ? null : picPath.trim(); } public Boolean getDeleteStyle() { return deleteStyle; } public void setDeleteStyle(Boolean deleteStyle) { this.deleteStyle = deleteStyle; } public String getUpTime() { return upTime; } public void setUpTime(String upTime) { this.upTime = upTime == null ? null : upTime.trim(); } public String getMyOpenInfoId() { return myOpenInfoId; } public void setMyOpenInfoId(String myOpenInfoId) { this.myOpenInfoId = myOpenInfoId == null ? null : myOpenInfoId.trim(); } public String getUserInfoId() { return userInfoId; } public void setUserInfoId(String userInfoId) { this.userInfoId = userInfoId == null ? null : userInfoId.trim(); } public String getUniqueId() { return uniqueId; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId == null ? null : uniqueId.trim(); } public String getMyTeamsId() { return myTeamsId; } public void setMyTeamsId(String myTeamsId) { this.myTeamsId = myTeamsId == null ? null : myTeamsId.trim(); } public String getMyGamesId() { return myGamesId; } public void setMyGamesId(String myGamesId) { this.myGamesId = myGamesId == null ? null : myGamesId.trim(); } public String getMyStoresId() { return myStoresId; } public void setMyStoresId(String myStoresId) { this.myStoresId = myStoresId == null ? null : myStoresId.trim(); } public String getPhotoInfoId() { return photoInfoId; } public void setPhotoInfoId(String photoInfoId) { this.photoInfoId = photoInfoId == null ? null : photoInfoId.trim(); } public String getMyAddressId() { return myAddressId; } public void setMyAddressId(String myAddressId) { this.myAddressId = myAddressId == null ? null : myAddressId.trim(); } public String getMyRankInfoId() { return myRankInfoId; } public void setMyRankInfoId(String myRankInfoId) { this.myRankInfoId = myRankInfoId == null ? null : myRankInfoId.trim(); } public String getMySpendInfoId() { return mySpendInfoId; } public void setMySpendInfoId(String mySpendInfoId) { this.mySpendInfoId = mySpendInfoId == null ? null : mySpendInfoId.trim(); } public String getMyMessageInfoId() { return myMessageInfoId; } public void setMyMessageInfoId(String myMessageInfoId) { this.myMessageInfoId = myMessageInfoId == null ? null : myMessageInfoId.trim(); } public String getMyFriendInfoId() { return myFriendInfoId; } public void setMyFriendInfoId(String myFriendInfoId) { this.myFriendInfoId = myFriendInfoId == null ? null : myFriendInfoId.trim(); } public String getMyIntegrationInfoId() { return myIntegrationInfoId; } public void setMyIntegrationInfoId(String myIntegrationInfoId) { this.myIntegrationInfoId = myIntegrationInfoId == null ? null : myIntegrationInfoId.trim(); } public String getPeopleListId() { return peopleListId; } public void setPeopleListId(String peopleListId) { this.peopleListId = peopleListId == null ? null : peopleListId.trim(); } public String getMyPermissionInfoId() { return myPermissionInfoId; } public void setMyPermissionInfoId(String myPermissionInfoId) { this.myPermissionInfoId = myPermissionInfoId == null ? null : myPermissionInfoId.trim(); } }
[ "13040837899@163.com" ]
13040837899@163.com
4f4ac6879e56efda408d38054eeeb5b5e39b725c
af6611faf56563d046293943a2f7a17b2a073f7e
/app/src/main/java/com/wiatec/update/db/ThreadDAOImpl.java
1d350d9b1d81315a31e6bee16964a8495ef787b8
[]
no_license
xcpxcp198608/Access
8c58ed62a3ec6881ca1fbff0cd4e60dbabc3563b
dafc1908d1c3c6fba13f7a1f51792999e9c1572c
refs/heads/master
2021-01-12T15:47:15.337249
2016-11-07T08:00:47
2016-11-07T08:00:47
71,866,327
0
0
null
null
null
null
UTF-8
Java
false
false
3,034
java
/* * @Title ThreadDAOImpl.java * @Copyright Copyright 2010-2015 Yann Software Co,.Ltd All Rights Reserved. * @Description: * @author ZL * @version 1.0 */ package com.wiatec.update.db; import java.util.ArrayList; import java.util.List; import com.wiatec.entity.ThreadInfo; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; /** * 数据访问接口实现 * @author ZL */ public class ThreadDAOImpl implements ThreadDAO { private DBHelper mHelper = null; public ThreadDAOImpl(Context context) { mHelper = DBHelper.getInstance(context); } /** * @see com.download.db.ThreadDAO#insertThread(com.download.entities.ThreadInfo) */ @Override public synchronized void insertThread(ThreadInfo threadInfo) { SQLiteDatabase db = mHelper.getWritableDatabase(); db.execSQL("insert into thread_info(thread_id,url,start,end,finished) values(?,?,?,?,?)", new Object[]{threadInfo.getId(), threadInfo.getUrl(), threadInfo.getStart(), threadInfo.getEnd(), threadInfo.getFinished()}); db.close(); } /** * @see com.download.db.ThreadDAO#deleteThread(java.lang.String, int) */ @Override public synchronized void deleteThread(String url) { SQLiteDatabase db = mHelper.getWritableDatabase(); db.execSQL("delete from thread_info where url = ?", new Object[]{url}); db.close(); } /** * @see com.download.db.ThreadDAO#updateThread(java.lang.String, int, int) */ @Override public synchronized void updateThread(String url, int thread_id, int finished) { SQLiteDatabase db = mHelper.getWritableDatabase(); db.execSQL("update thread_info set finished = ? where url = ? and thread_id = ?", new Object[]{finished, url, thread_id}); db.close(); } /** * @see com.download.db.ThreadDAO#getThreads(java.lang.String) */ @Override public List<ThreadInfo> getThreads(String url) { List<ThreadInfo> list = new ArrayList<ThreadInfo>(); SQLiteDatabase db = mHelper.getReadableDatabase(); Cursor cursor = db.rawQuery("select * from thread_info where url = ?", new String[]{url}); while (cursor.moveToNext()) { ThreadInfo threadInfo = new ThreadInfo(); threadInfo.setId(cursor.getInt(cursor.getColumnIndex("thread_id"))); threadInfo.setUrl(cursor.getString(cursor.getColumnIndex("url"))); threadInfo.setStart(cursor.getInt(cursor.getColumnIndex("start"))); threadInfo.setEnd(cursor.getInt(cursor.getColumnIndex("end"))); threadInfo.setFinished(cursor.getInt(cursor.getColumnIndex("finished"))); list.add(threadInfo); } cursor.close(); db.close(); return list; } /** * @see com.download.db.ThreadDAO#isExists(java.lang.String, int) */ @Override public boolean isExists(String url, int thread_id) { SQLiteDatabase db = mHelper.getReadableDatabase(); Cursor cursor = db.rawQuery("select * from thread_info where url = ? and thread_id = ?", new String[]{url, thread_id+""}); boolean exists = cursor.moveToNext(); cursor.close(); db.close(); return exists; } }
[ "xcpxcp198608@163.com" ]
xcpxcp198608@163.com
b93bf25c632e1c395f166207cbb0ef28f74bfd32
dd76d0b680549acb07278b2ecd387cb05ec84d64
/divestory-CFR/org/apache/http/cookie/CookieSpecFactory.java
bd3401c6a247e8a47561d55cd0710b3127499aca
[]
no_license
ryangardner/excursion-decompiling
43c99a799ce75a417e636da85bddd5d1d9a9109c
4b6d11d6f118cdab31328c877c268f3d56b95c58
refs/heads/master
2023-07-02T13:32:30.872241
2021-08-09T19:33:37
2021-08-09T19:33:37
299,657,052
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
/* * Decompiled with CFR <Could not determine version>. */ package org.apache.http.cookie; import org.apache.http.cookie.CookieSpec; import org.apache.http.params.HttpParams; public interface CookieSpecFactory { public CookieSpec newInstance(HttpParams var1); }
[ "ryan.gardner@coxautoinc.com" ]
ryan.gardner@coxautoinc.com
33e4ceb40c09529ed5df6cb83d127cb57968e1b5
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/6_jnfe-br.com.jnfe.base.Orig-1.0-8/br/com/jnfe/base/Orig_ESTest_scaffolding.java
003d693a407108678a1f52243d21873d2170cedb
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
527
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Oct 25 23:12:46 GMT 2019 */ package br.com.jnfe.base; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class Orig_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
a00302bc432616cb170afc05553f0530c385bf2f
5c0a5d1e3685720e5fa387a26a60dd06bb7c6e4a
/group-core/admin-core/src/main/java/com/spark/bitrade/service/SysPermissionService.java
1b4f89e5e28d9d2b0f7eb7cad16c77695de5c466
[]
no_license
im8s/silk-v1
5d88ccd1b5ed2370f8fba4a70298d1d14d9a175d
ff9f689443af30c815a8932899a333dfc87f6f12
refs/heads/master
2022-06-20T13:08:01.519634
2020-04-28T02:56:50
2020-04-28T02:56:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,504
java
package com.spark.bitrade.service; import com.querydsl.core.types.Predicate; import com.spark.bitrade.dao.SysPermissionDao; import com.spark.bitrade.entity.SysPermission; import com.spark.bitrade.service.Base.BaseService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * @author Zhang Jinwei * @date 2017年12月20日 */ @Service public class SysPermissionService extends BaseService<SysPermission> { @Autowired public void setDao(SysPermissionDao dao) { super.setDao(dao); } @Autowired private SysPermissionDao sysPermissionDao; public SysPermission findOne(Long id) { return sysPermissionDao.findOne(id); } public List<SysPermission> findAll() { return sysPermissionDao.findAll(); } public SysPermission save(SysPermission sysPermission) { return sysPermissionDao.save(sysPermission); } @Transactional(rollbackFor = Exception.class) public void deletes(Long[] ids) { for (long id : ids) { sysPermissionDao.deletePermission(id); sysPermissionDao.delete(id); } } public Page<SysPermission> findAll(Predicate predicate, Pageable pageable) { return sysPermissionDao.findAll(predicate, pageable); } }
[ "huihui123" ]
huihui123
2a09647e3bfb8111bb0fc770d71ee67d4a2a318f
5cce7298fab4cd5d5cebd8fd9f172efaf1c776f1
/jitl-jobs/src/main/java/com/sos/jitl/notification/helper/RegExFilenameFilter.java
c50a9aaa028ba3c95db5436652d62c31bdb634fe
[]
no_license
sos-berlin/jitl
9d9173c2b8ea1ceb6b89c4056679d88ceedbd778
1c14f38b710d4b80fd1505e18ed8524914e07485
refs/heads/master
2023-07-22T06:55:14.598872
2022-01-28T09:12:22
2022-01-28T09:12:22
27,331,689
0
3
null
null
null
null
UTF-8
Java
false
false
349
java
package com.sos.jitl.notification.helper; import java.io.File; import java.io.FilenameFilter; public class RegExFilenameFilter implements FilenameFilter{ private String regex; public RegExFilenameFilter(String val){ this.regex = val; } @Override public boolean accept(File dir, String name) { return name.matches(this.regex); } }
[ "robert.ehrlich@sos-berlin.com" ]
robert.ehrlich@sos-berlin.com
a1c86fcd0f0a371156248ee1f04e541d563860ea
59a1c9a75f6d82a8872499bee3f4c0e62e4cbb99
/src/com/javarush/test/level15/lesson12/home01/Solution.java
7374ef2263e2fd4692f4d245cf1aed78e77fc135
[]
no_license
Mistes/MyRep
9dbfcfc391510be739dca19ced3eafcc52a43444
1700a6f1c04f31a40a9dc1312f7a9125f61e7119
refs/heads/master
2020-04-06T04:12:20.857417
2016-10-11T08:01:16
2016-10-11T08:01:16
57,094,487
0
0
null
null
null
null
UTF-8
Java
false
false
1,515
java
package com.javarush.test.level15.lesson12.home01; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /* Разные методы для разных типов 1. Считать с консоли данные, пока не введено слово "exit". 2. Для каждого значения, кроме "exit", вызвать метод print. Если значение: 2.1. содержит точку '.', то вызвать метод print для Double; 2.2. больше нуля, но меньше 128, то вызвать метод print для short; 2.3. больше либо равно 128, то вызвать метод print для Integer; 2.4. иначе, вызвать метод print для String. */ public class Solution { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); for (; true; ){} } public static void print(Double value) { System.out.println("Это тип Double, значение " + value); } public static void print(String value) { System.out.println("Это тип String, значение " + value); } public static void print(short value) { System.out.println("Это тип short, значение " + value); } public static void print(Integer value) { System.out.println("Это тип Integer, значение " + value); } }
[ "kurilenko.dm@gmail.com" ]
kurilenko.dm@gmail.com
034610528bd53b2cf336af6b7a3a539f54043e86
882c865cf0a4b94fdd117affbb5748bdf4e056d0
/JAVA/Programmers/level1/Q2_수박수박수.java
61bc6047ebaa94a04749f297a8b615076f9439ff
[]
no_license
minhee0327/Algorithm
ebae861e90069e2d9cf0680159e14c833b2f0da3
fb0d3763b1b75d310de4c19c77014e8fb86dad0d
refs/heads/master
2023-08-15T14:55:49.769179
2021-09-14T04:05:11
2021-09-14T04:05:11
331,007,037
0
0
null
null
null
null
UTF-8
Java
false
false
458
java
package level1; public class Q2_수박수박수 { public static void main(String[] args) { System.out.println(Solution.solution(3)); System.out.println(Solution.solution(4)); } } class Solution { public static String solution(int n) { String answer = ""; for(int i = 0 ; i< n / 2 ; i++){ answer += "수박"; } if (n % 2 != 0){ answer += "수"; } return answer; } }
[ "queen.minhee@gmail.com" ]
queen.minhee@gmail.com
c6ce721971284a2fd0f95ebca4a16330ca55f867
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/neo4j/learning/5154/RecordRelationshipScanCursor.java
7904293d76cd6cfbcf0dbbee1f296a774d64140a
[]
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
5,018
java
/* * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.impl.storageengine.impl.recordstorage; import org.neo4j.io.pagecache.PageCursor; import org.neo4j.kernel.impl.store.RelationshipGroupStore; import org.neo4j.kernel.impl.store.RelationshipStore; import org.neo4j.kernel.impl.store.record.RecordLoad; import org.neo4j.kernel.impl.store.record.RelationshipRecord; import org.neo4j.storageengine.api.StorageRelationshipScanCursor; class RecordRelationshipScanCursor extends RecordRelationshipCursor implements StorageRelationshipScanCursor { private int filterType; private long next; private long highMark; private long nextStoreReference; private PageCursor pageCursor; private boolean open; RecordRelationshipScanCursor( RelationshipStore relationshipStore, RelationshipGroupStore groupStore ) { super( relationshipStore ); } @Override public void scan() { scan( -1 ); } @Override public void scan( int type ) { if ( getId() != NO_ID ) { reset(); } if ( pageCursor == null ) { pageCursor = relationshipPage( 0 ); } this.next = 0; this.filterType = type; this.highMark = relationshipHighMark(); this.nextStoreReference = NO_ID; this.open = true; } @Override public void single( long reference ) { if ( getId() != NO_ID ) { reset(); } if ( pageCursor == null ) { pageCursor = relationshipPage( reference ); } this.next = reference >= 0 ? reference : NO_ID; this.filterType = -1; this.highMark = NO_ID; this.nextStoreReference = NO_ID; this.open = true; } @Override public boolean next() { if ( next == NO_ID ) { reset(); return false; } do { if ( nextStoreReference == next ) { relationshipAdvance( this, pageCursor ); next++; nextStoreReference++; } else { relationship( this, next++, pageCursor ); nextStoreReference = next; } if ( next > highMark ) { if ( isSingle() ) { //we are a "single cursor" next = NO_ID; return inUse(); } else { //we are a "scan cursor" //Check if there is a new high mark highMark = relationshipHighMark(); if ( next > highMark ) { next = NO_ID; return isWantedTypeAndInUse(); } } } } while ( !isWantedTypeAndInUse() ); return true; } private boolean isWantedTypeAndInUse() { return (filterType == -1 || type() == filterType) && inUse(); } @Override public void close() { if ( open ) { open = false; reset(); } } private void reset() { setId( next = NO_ID ); } @Override public String toString() { if ( !open ) { return "RelationshipScanCursor[closed state]"; } else { return "RelationshipScanCursor[id=" + getId() + ", open state with: highMark=" + highMark + ", next=" + next + ", type=" + filterType + ", underlying record=" + super.toString() + "]"; } } private boolean isSingle() { return highMark == NO_ID; } @Override public void release() { if ( pageCursor != null ) { pageCursor.close(); pageCursor = null; } } private void relationshipAdvance( RelationshipRecord record, PageCursor pageCursor ) { // When scanning, we inspect RelationshipRecord.inUse(), so using RecordLoad.CHECK is fine relationshipStore.nextRecordByCursor( record, RecordLoad.CHECK, pageCursor ); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
069d82d310625cbad8cd973b54fad8047de3eb92
ac7268ce884b8497b91cca93991b95b4cdcf915c
/src/main/java/com/example/user/service/impl/OaSoftwareServiceImpl.java
1eb3e179dc9b0bf4eb836cc01eedace60e80a8d6
[]
no_license
phx1314/user
4a76ab4f250f66c0e66c9eb6a7c5ef1f58259ef7
49a9b04f6203c3dc8fb370637c1753aec226867f
refs/heads/master
2022-06-28T21:40:02.797584
2020-03-17T01:42:07
2020-03-17T01:42:07
246,250,256
0
0
null
2022-06-17T03:00:15
2020-03-10T08:47:50
JavaScript
UTF-8
Java
false
false
652
java
package com.example.user.service.impl; import com.example.user.dao.OaSoftwareMapper; import com.example.user.model.OaSoftware; import com.example.user.service.OaSoftwareService; import com.example.user.core.universal.AbstractService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; /** * @Description: OaSoftwareService接口实现类 * @author df * @date 2020/03/06 13:31 */ @Service public class OaSoftwareServiceImpl extends AbstractService<OaSoftware> implements OaSoftwareService { @Resource private OaSoftwareMapper oaSoftwareMapper; }
[ "daif@deepblueai.com" ]
daif@deepblueai.com
8fa685aad88e0ea5bf1329784cf4ecb87f09f720
5f1fe8299c6aaec9cd66b063b42cfeb800fa1d05
/src/test/java/UserMapConcurrencyTest.java
ef1c74145097a957cba33fc06a11bfc39401ae9b
[]
no_license
mtumilowicz/java11-concurrency-lock-execute-around-method-pattern
42d0f0e4f91be5af7c2e71490fe1780467fae7fa
56389e4a85bb36d80a015f137e5944a9ef5c7543
refs/heads/master
2020-04-15T07:30:15.802939
2019-01-26T19:30:26
2019-01-26T19:30:26
164,496,010
0
0
null
null
null
null
UTF-8
Java
false
false
1,694
java
import org.junit.Test; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; /** * Created by mtumilowicz on 2019-01-25. */ public class UserMapConcurrencyTest { @Test public void write_transfer() { var userMap = Stream.of( new User(1, 40), new User(2, 33) ).collect(Collectors.toMap(User::getId, Function.identity())); ReadWriteLock lock = new ReentrantReadWriteLock(); LockExecutor executor = new LockExecutor(lock); executor.write(() -> { var transfer = PositiveInt.of(15); userMap.replace(1, userMap.get(1).outcome(transfer)); userMap.replace(2, userMap.get(2).income(transfer)); return Void.class; }); assertThat(userMap.get(1).getBalance(), is(25)); assertThat(userMap.get(2).getBalance(), is(48)); } @Test public void read_sum_balance() { var userMap = Stream.of( new User(1, 40), new User(2, 33) ).collect(Collectors.toMap(User::getId, Function.identity())); ReadWriteLock lock = new ReentrantReadWriteLock(); LockExecutor executor = new LockExecutor(lock); var balanceAll = executor.read(() -> userMap.values() .stream() .map(User::getBalance) .mapToInt(x -> x) .sum()); assertThat(balanceAll, is(73)); } }
[ "michal.tumilowicz01@gmail.com" ]
michal.tumilowicz01@gmail.com
f9881a9ca8d77b77672c32b3303860436595f499
a3e9de23131f569c1632c40e215c78e55a78289a
/alipay/alipay_sdk/src/main/java/com/alipay/api/request/MybankCreditLoantradeLoanarRepayRequest.java
bb12988355a9090045e1a3a885ccdc8d17c7439f
[]
no_license
P79N6A/java_practice
80886700ffd7c33c2e9f4b202af7bb29931bf03d
4c7abb4cde75262a60e7b6d270206ee42bb57888
refs/heads/master
2020-04-14T19:55:52.365544
2019-01-04T07:39:40
2019-01-04T07:39:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,019
java
package com.alipay.api.request; import com.alipay.api.domain.MybankCreditLoantradeLoanarRepayModel; import java.util.Map; import com.alipay.api.AlipayRequest; import com.alipay.api.internal.util.AlipayHashMap; import com.alipay.api.response.MybankCreditLoantradeLoanarRepayResponse; import com.alipay.api.AlipayObject; /** * ALIPAY API: mybank.credit.loantrade.loanar.repay request * * @author auto create * @since 1.0, 2018-10-12 13:35:42 */ public class MybankCreditLoantradeLoanarRepayRequest implements AlipayRequest<MybankCreditLoantradeLoanarRepayResponse> { private AlipayHashMap udfParams; // add user-defined text parameters private String apiVersion="1.0"; /** * 机构代客户还款 */ private String bizContent; public void setBizContent(String bizContent) { this.bizContent = bizContent; } public String getBizContent() { return this.bizContent; } private String terminalType; private String terminalInfo; private String prodCode; private String notifyUrl; private String returnUrl; private boolean needEncrypt=false; private AlipayObject bizModel=null; public String getNotifyUrl() { return this.notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getReturnUrl() { return this.returnUrl; } public void setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; } public String getApiVersion() { return this.apiVersion; } public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public void setTerminalType(String terminalType){ this.terminalType=terminalType; } public String getTerminalType(){ return this.terminalType; } public void setTerminalInfo(String terminalInfo){ this.terminalInfo=terminalInfo; } public String getTerminalInfo(){ return this.terminalInfo; } public void setProdCode(String prodCode) { this.prodCode=prodCode; } public String getProdCode() { return this.prodCode; } public String getApiMethodName() { return "mybank.credit.loantrade.loanar.repay"; } public Map<String, String> getTextParams() { AlipayHashMap txtParams = new AlipayHashMap(); txtParams.put("biz_content", this.bizContent); if(udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new AlipayHashMap(); } this.udfParams.put(key, value); } public Class<MybankCreditLoantradeLoanarRepayResponse> getResponseClass() { return MybankCreditLoantradeLoanarRepayResponse.class; } public boolean isNeedEncrypt() { return this.needEncrypt; } public void setNeedEncrypt(boolean needEncrypt) { this.needEncrypt=needEncrypt; } public AlipayObject getBizModel() { return this.bizModel; } public void setBizModel(AlipayObject bizModel) { this.bizModel=bizModel; } }
[ "jiaojianjun1991@gmail.com" ]
jiaojianjun1991@gmail.com
4774bc501044cc83f39e972a904b7d92b0864ec7
dd01522057d622e942cc7c9058cbca61377679aa
/hybris/bin/platform/bootstrap/gensrc/de/hybris/platform/workflow/model/WorkflowActionCommentModel.java
deec38f6d7533485c63512cf0b569686b1a15ac6
[]
no_license
grunya404/bp-core-6.3
7d73db4db81015e4ae69eeffd43730f564e17679
9bc11bc514bd0c35d7757a9e949af89b84be634f
refs/heads/master
2021-05-19T11:32:39.663520
2017-09-01T11:36:21
2017-09-01T11:36:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,166
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at 25 Aug 2017 4:31:18 PM --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2016 SAP SE * All rights reserved. * * This software is the confidential and proprietary information of SAP * 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 SAP Hybris. * */ package de.hybris.platform.workflow.model; import de.hybris.bootstrap.annotations.Accessor; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.core.model.user.UserModel; import de.hybris.platform.servicelayer.model.ItemModelContext; import de.hybris.platform.workflow.model.AbstractWorkflowActionModel; /** * Generated model class for type WorkflowActionComment first defined at extension workflow. */ @SuppressWarnings("all") public class WorkflowActionCommentModel extends ItemModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "WorkflowActionComment"; /**<i>Generated relation code constant for relation <code>WorkflowActionCommentRelation</code> defining source attribute <code>workflowAction</code> in extension <code>workflow</code>.</i>*/ public final static String _WORKFLOWACTIONCOMMENTRELATION = "WorkflowActionCommentRelation"; /** <i>Generated constant</i> - Attribute key of <code>WorkflowActionComment.comment</code> attribute defined at extension <code>workflow</code>. */ public static final String COMMENT = "comment"; /** <i>Generated constant</i> - Attribute key of <code>WorkflowActionComment.user</code> attribute defined at extension <code>workflow</code>. */ public static final String USER = "user"; /** <i>Generated constant</i> - Attribute key of <code>WorkflowActionComment.workflowAction</code> attribute defined at extension <code>workflow</code>. */ public static final String WORKFLOWACTION = "workflowAction"; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public WorkflowActionCommentModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public WorkflowActionCommentModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _comment initial attribute declared by type <code>WorkflowActionComment</code> at extension <code>workflow</code> * @param _workflowAction initial attribute declared by type <code>WorkflowActionComment</code> at extension <code>workflow</code> */ @Deprecated public WorkflowActionCommentModel(final String _comment, final AbstractWorkflowActionModel _workflowAction) { super(); setComment(_comment); setWorkflowAction(_workflowAction); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _comment initial attribute declared by type <code>WorkflowActionComment</code> at extension <code>workflow</code> * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> * @param _workflowAction initial attribute declared by type <code>WorkflowActionComment</code> at extension <code>workflow</code> */ @Deprecated public WorkflowActionCommentModel(final String _comment, final ItemModel _owner, final AbstractWorkflowActionModel _workflowAction) { super(); setComment(_comment); setOwner(_owner); setWorkflowAction(_workflowAction); } /** * <i>Generated method</i> - Getter of the <code>WorkflowActionComment.comment</code> attribute defined at extension <code>workflow</code>. * @return the comment */ @Accessor(qualifier = "comment", type = Accessor.Type.GETTER) public String getComment() { return getPersistenceContext().getPropertyValue(COMMENT); } /** * <i>Generated method</i> - Getter of the <code>WorkflowActionComment.user</code> attribute defined at extension <code>workflow</code>. * @return the user */ @Accessor(qualifier = "user", type = Accessor.Type.GETTER) public UserModel getUser() { return getPersistenceContext().getPropertyValue(USER); } /** * <i>Generated method</i> - Getter of the <code>WorkflowActionComment.workflowAction</code> attribute defined at extension <code>workflow</code>. * @return the workflowAction */ @Accessor(qualifier = "workflowAction", type = Accessor.Type.GETTER) public AbstractWorkflowActionModel getWorkflowAction() { return getPersistenceContext().getPropertyValue(WORKFLOWACTION); } /** * <i>Generated method</i> - Setter of <code>WorkflowActionComment.comment</code> attribute defined at extension <code>workflow</code>. * * @param value the comment */ @Accessor(qualifier = "comment", type = Accessor.Type.SETTER) public void setComment(final String value) { getPersistenceContext().setPropertyValue(COMMENT, value); } /** * <i>Generated method</i> - Setter of <code>WorkflowActionComment.user</code> attribute defined at extension <code>workflow</code>. * * @param value the user */ @Accessor(qualifier = "user", type = Accessor.Type.SETTER) public void setUser(final UserModel value) { getPersistenceContext().setPropertyValue(USER, value); } /** * <i>Generated method</i> - Setter of <code>WorkflowActionComment.workflowAction</code> attribute defined at extension <code>workflow</code>. * * @param value the workflowAction */ @Accessor(qualifier = "workflowAction", type = Accessor.Type.SETTER) public void setWorkflowAction(final AbstractWorkflowActionModel value) { getPersistenceContext().setPropertyValue(WORKFLOWACTION, value); } }
[ "mashimbyek@gmail.com" ]
mashimbyek@gmail.com
79a30fc80506e13daeea8c0910aca863cc5bee1f
7d701debbd995889d42b52739a08cc70c94dbc3d
/elink-platform/device-gateway/elink-device-jt8082019-gateway/src/main/java/com/legaoyi/protocol/server/SessionContext.java
c131cecacbed5d50a7b10144955117e398204e63
[]
no_license
jonytian/code1
e95faccc16ceb91cefbe0b52f1cf5dae0c63c143
3ffbd5017dda31dab29087e6cdf8f12b19a18089
refs/heads/master
2022-12-11T08:13:52.981253
2020-03-24T03:04:32
2020-03-24T03:04:32
249,597,038
3
2
null
2022-12-06T00:46:44
2020-03-24T02:48:20
JavaScript
UTF-8
Java
false
false
1,006
java
package com.legaoyi.protocol.server; import io.netty.channel.ChannelHandlerContext; import io.netty.util.AttributeKey; /** * @author <a href="mailto:shengbo.gao@gmail.com;78772895@qq.com">gaoshengbo</a> * @version 1.0.0 * @since 2019-06-10 */ public class SessionContext { private Session session; public static final AttributeKey<SessionContext> ATTRIBUTE_SESSION_CONTEXT = AttributeKey.valueOf("sessionContext"); public SessionContext(ChannelHandlerContext ctx) { session = SessionManager.getInstance().initSession(ctx); } public Session createSession(String simCode) { session = SessionManager.getInstance().createSession(simCode, session.getChannelHandlerContext()); return session; } public Session getCurrentSession() { return session; } public void closeSession(String channelId) { if (session != null) { SessionManager.getInstance().closeSession(session.getSimCode(), channelId); } } }
[ "yaojiang.tian@reacheng.com" ]
yaojiang.tian@reacheng.com
bcb34abe6a1e857db0f8621234b229b0c4fa0dba
c248025047738c6aaf51e8f012160dfe37121a5f
/src/main/java/me/itzg/tryenvoymonitorqueries/TryEnvoyMonitorQueriesApplication.java
e62a769f56992e7ff290bb62dbe10784d21e21d0
[]
no_license
itzg/try-envoy-monitor-queries
9c5ad87755f50f6edc9d6f3dd29828161d2c335c
759cf1081891a962c612de5a8747118c4c5cc4b8
refs/heads/master
2020-04-14T04:04:17.679767
2018-12-31T16:59:51
2018-12-31T16:59:51
163,624,853
0
0
null
null
null
null
UTF-8
Java
false
false
360
java
package me.itzg.tryenvoymonitorqueries; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class TryEnvoyMonitorQueriesApplication { public static void main(String[] args) { SpringApplication.run(TryEnvoyMonitorQueriesApplication.class, args); } }
[ "itzgeoff@gmail.com" ]
itzgeoff@gmail.com
05e11feb058f30fd9993ca2f68ab9bf66b89c1c5
10dd0d94b749e7f10fbbd50b4344704561d415f2
/algorithm/src/algorithm/chapter2/first/GenerateParentheses.java
b8060bfb0ad27e00cfac003c0b4c8ca5ad90e579
[]
no_license
chying/algorithm_group
79d0bffea56e6dc0b327f879a309cfd7c7e4133e
cd85dd08f065ae0a6a9d57831bd1ac8c8ce916ce
refs/heads/master
2020-09-13T19:10:19.074546
2020-02-13T04:12:56
2020-02-13T04:12:56
222,877,592
7
3
null
null
null
null
UTF-8
Java
false
false
1,161
java
package algorithm.chapter2.first; import java.util.ArrayList; import java.util.List; /** * 【22 括号生成】给出 n 代表生成括号的对数,请你写出一个函数,使其能够生成所有可能的并且有效的括号组合。 例如,给出 n = 3,生成结果为: [ * "((()))", "(()())", "(())()", "()(())", "()()()" ] 来源:力扣(LeetCode) * 链接:https://leetcode-cn.com/problems/generate-parentheses * * @author chying * */ public class GenerateParentheses { public List<String> generateParenthesis(int n) { List<String> ans = new ArrayList<>(); backtrack(ans, "", 0, 0, n); return ans; } private void backtrack(List<String> ans, String cur, int left, int right, int n) { if (cur.length() == n * 2) { ans.add(cur); return; } if (left < n) { backtrack(ans, cur + "(", left + 1, right, n); } if (right < left) { backtrack(ans, cur + ")", left, right + 1, n); } } public static void main(String[] args) { GenerateParentheses a = new GenerateParentheses(); List<String> result = a.generateParenthesis(3); for (String s : result) { System.out.println(s + ";"); } } }
[ "852342406@qq.com" ]
852342406@qq.com
aae07463da18df87080b85782f6d4b28cbd6736a
cf7704d9ef0a34aff366adbbe382597473ab509d
/src/net/sourceforge/plantuml/real/RealImpl.java
f23a4a7657851c8fdad9b96c6156b355d655e03a
[]
no_license
maheeka/plantuml-esb
0fa14b60af513c9dedc22627996240eaf3802c5a
07c7c7d78bae29d9c718a43229996c068386fccd
refs/heads/master
2021-01-10T07:49:10.043639
2016-02-23T17:36:33
2016-02-23T17:36:33
52,347,881
0
4
null
null
null
null
UTF-8
Java
false
false
2,039
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2014, Arnaud Roques * * Project Info: http://plantuml.sourceforge.net * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * Original Author: Arnaud Roques * * Revision $Revision: 4636 $ * */ package net.sourceforge.plantuml.real; class RealImpl extends RealMoveable implements RealOrigin { private double currentValue; public RealImpl(String name, RealLine line, double currentValue) { super(line, name); this.currentValue = currentValue; } void move(double delta) { this.currentValue += delta; } @Override double getCurrentValueInternal() { return currentValue; } public Real addAtLeast(double delta) { final RealImpl result = new RealImpl(getName() + ".addAtLeast" + delta, getLine(), this.currentValue + delta); getLine().addForce(new PositiveForce(this, result, delta)); return result; } public void ensureBiggerThan(Real other) { getLine().addForce(new PositiveForce(other, this, 0)); } public void compileNow() { getLine().compile(); } }
[ "maheeka@wso2.com" ]
maheeka@wso2.com
0a1b18eb50017d62decdfe7cce7b16288a097e5d
bd1151a43fdda6b5a48867cf621e0ac264d4ea7a
/Youtube/youtubechannel+NavigationDrawer+SelectedItemMarker/app/src/main/java/bhh/youtube/channel/fragment/FragmentDrama.java
5b3bae94a4712574bd2fb781b4026e62239f8fd7
[]
no_license
Nazmul56/Projects2017
1fcc953619d8ec7aa009f8b9181457a06215c266
8e35fa15019ad3c23bf7b8de9f1fda0dec8cbdb6
refs/heads/master
2021-05-08T00:31:14.126716
2017-10-21T04:59:07
2017-10-21T04:59:07
107,750,975
1
0
null
null
null
null
UTF-8
Java
false
false
2,409
java
package bhh.youtube.channel.fragment; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.content.ContextCompat; import android.support.v4.content.res.ResourcesCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import bhh.youtube.channel.R; /** * A simple {@link Fragment} subclass. * Use the {@link FragmentDrama#newInstance} factory method to * create an instance of this fragment. */ public class FragmentDrama extends Fragment { private static final String KEY_MOVIE_TITLE = "key_title"; public FragmentDrama() { // Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment. * * @return A new instance of fragment FragmentDrama. * @param movieTitle */ public static FragmentDrama newInstance(int movieTitle) { FragmentDrama fragmentDrama = new FragmentDrama(); Bundle args = new Bundle(); args.putInt(KEY_MOVIE_TITLE, movieTitle); fragmentDrama.setArguments(args); return fragmentDrama; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_drama, container, false); } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); Drawable movieIcon = ResourcesCompat.getDrawable(getResources(), R.drawable.movie_icon, getContext().getTheme()); if (movieIcon != null) { movieIcon.setColorFilter(ContextCompat.getColor(getContext(), R.color.grey), PorterDuff.Mode.SRC_ATOP); } ((ImageView) view.findViewById(R.id.movie_icon)).setImageDrawable(movieIcon); String movieTitle = getArguments().getString(KEY_MOVIE_TITLE); ((TextView) view.findViewById(R.id.movie_title)).setText(movieTitle); } }
[ "nazmul.cste07@gmail.com" ]
nazmul.cste07@gmail.com
ce0be92107e7f8fd82892c4551a466d8bff5a795
b84c9c74379d3216daad7476527057fff826aa87
/app/src/main/java/com/example/ivani/schoolscheduleonline/TabRow.java
55fe3ad6cf97912fdf19ee59b9f8cab95da9c399
[]
no_license
vanshianec/School-Timetable
2132a610756fdaf49109aea1cdc5e0e394e1ad9e
bd86b4707271c08b06a9f62857e32b343fe2593c
refs/heads/master
2020-04-21T12:42:45.156859
2019-04-15T15:25:38
2019-04-15T15:25:38
169,572,157
0
0
null
null
null
null
UTF-8
Java
false
false
809
java
package com.example.ivani.schoolscheduleonline; public class TabRow { private int order; private String clockText; private String teacherText; private String roomText; private String color; public TabRow(int order, String clockText, String teacherText, String roomText, String color) { this.order = order; this.clockText = clockText; this.teacherText = teacherText; this.roomText = roomText; this.color = color; } public String getColor() { return color; } public int getOrder() { return order; } public String getClockText() { return clockText; } public String getTeacherText() { return teacherText; } public String getRoomText() { return roomText; } }
[ "ivaniovov@abv.bg" ]
ivaniovov@abv.bg
2e27c62d8dc82ac0e0505c7e213298fb58b1f792
097df92ce1bfc8a354680725c7d10f0d109b5b7d
/com/amazon/ws/emr/hadoop/fs/shaded/org/apache/commons/math/analysis/ComposableFunction.java
2042eba2ef0f631dfb99c2cb814764b9ae4203ca
[]
no_license
cozos/emrfs-hadoop
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
ba5dfa631029cb5baac2f2972d2fdaca18dac422
refs/heads/master
2022-10-14T15:03:51.500050
2022-10-06T05:38:49
2022-10-06T05:38:49
233,979,996
2
2
null
2022-10-06T05:41:46
2020-01-15T02:24:16
Java
UTF-8
Java
false
false
8,030
java
package com.amazon.ws.emr.hadoop.fs.shaded.org.apache.commons.math.analysis; import com.amazon.ws.emr.hadoop.fs.shaded.org.apache.commons.math.FunctionEvaluationException; public abstract class ComposableFunction implements UnivariateRealFunction { public static final ComposableFunction ZERO = new ComposableFunction() { public double value(double d) { return 0.0D; } }; public static final ComposableFunction ONE = new ComposableFunction() { public double value(double d) { return 1.0D; } }; public static final ComposableFunction IDENTITY = new ComposableFunction() { public double value(double d) { return d; } }; public static final ComposableFunction ABS = new ComposableFunction() { public double value(double d) { return Math.abs(d); } }; public static final ComposableFunction NEGATE = new ComposableFunction() { public double value(double d) { return -d; } }; public static final ComposableFunction INVERT = new ComposableFunction() { public double value(double d) { return 1.0D / d; } }; public static final ComposableFunction SIN = new ComposableFunction() { public double value(double d) { return Math.sin(d); } }; public static final ComposableFunction SQRT = new ComposableFunction() { public double value(double d) { return Math.sqrt(d); } }; public static final ComposableFunction SINH = new ComposableFunction() { public double value(double d) { return Math.sinh(d); } }; public static final ComposableFunction EXP = new ComposableFunction() { public double value(double d) { return Math.exp(d); } }; public static final ComposableFunction EXPM1 = new ComposableFunction() { public double value(double d) { return Math.expm1(d); } }; public static final ComposableFunction ASIN = new ComposableFunction() { public double value(double d) { return Math.asin(d); } }; public static final ComposableFunction ATAN = new ComposableFunction() { public double value(double d) { return Math.atan(d); } }; public static final ComposableFunction TAN = new ComposableFunction() { public double value(double d) { return Math.tan(d); } }; public static final ComposableFunction TANH = new ComposableFunction() { public double value(double d) { return Math.tanh(d); } }; public static final ComposableFunction CBRT = new ComposableFunction() { public double value(double d) { return Math.cbrt(d); } }; public static final ComposableFunction CEIL = new ComposableFunction() { public double value(double d) { return Math.ceil(d); } }; public static final ComposableFunction FLOOR = new ComposableFunction() { public double value(double d) { return Math.floor(d); } }; public static final ComposableFunction LOG = new ComposableFunction() { public double value(double d) { return Math.log(d); } }; public static final ComposableFunction LOG10 = new ComposableFunction() { public double value(double d) { return Math.log10(d); } }; public static final ComposableFunction LOG1P = new ComposableFunction() { public double value(double d) { return Math.log1p(d); } }; public static final ComposableFunction COS = new ComposableFunction() { public double value(double d) { return Math.cos(d); } }; public static final ComposableFunction ACOS = new ComposableFunction() { public double value(double d) { return Math.acos(d); } }; public static final ComposableFunction COSH = new ComposableFunction() { public double value(double d) { return Math.cosh(d); } }; public static final ComposableFunction RINT = new ComposableFunction() { public double value(double d) { return Math.rint(d); } }; public static final ComposableFunction SIGNUM = new ComposableFunction() { public double value(double d) { return Math.signum(d); } }; public static final ComposableFunction ULP = new ComposableFunction() { public double value(double d) { return Math.ulp(d); } }; public ComposableFunction of(final UnivariateRealFunction f) { new ComposableFunction() { public double value(double x) throws FunctionEvaluationException { return ComposableFunction.this.value(f.value(x)); } }; } public ComposableFunction postCompose(final UnivariateRealFunction f) { new ComposableFunction() { public double value(double x) throws FunctionEvaluationException { return f.value(ComposableFunction.this.value(x)); } }; } public ComposableFunction combine(final UnivariateRealFunction f, final BivariateRealFunction combiner) { new ComposableFunction() { public double value(double x) throws FunctionEvaluationException { return combiner.value(ComposableFunction.this.value(x), f.value(x)); } }; } public ComposableFunction add(final UnivariateRealFunction f) { new ComposableFunction() { public double value(double x) throws FunctionEvaluationException { return ComposableFunction.this.value(x) + f.value(x); } }; } public ComposableFunction add(final double a) { new ComposableFunction() { public double value(double x) throws FunctionEvaluationException { return ComposableFunction.this.value(x) + a; } }; } public ComposableFunction subtract(final UnivariateRealFunction f) { new ComposableFunction() { public double value(double x) throws FunctionEvaluationException { return ComposableFunction.this.value(x) - f.value(x); } }; } public ComposableFunction multiply(final UnivariateRealFunction f) { new ComposableFunction() { public double value(double x) throws FunctionEvaluationException { return ComposableFunction.this.value(x) * f.value(x); } }; } public ComposableFunction multiply(final double scaleFactor) { new ComposableFunction() { public double value(double x) throws FunctionEvaluationException { return ComposableFunction.this.value(x) * scaleFactor; } }; } public ComposableFunction divide(final UnivariateRealFunction f) { new ComposableFunction() { public double value(double x) throws FunctionEvaluationException { return ComposableFunction.this.value(x) / f.value(x); } }; } public MultivariateRealFunction asCollector(BivariateRealFunction combiner, final double initialValue) { new MultivariateRealFunction() { public double value(double[] point) throws FunctionEvaluationException, IllegalArgumentException { double result = initialValue; for (double entry : point) { result = val$combiner.value(result, value(entry)); } return result; } }; } public MultivariateRealFunction asCollector(BivariateRealFunction combiner) { return asCollector(combiner, 0.0D); } public MultivariateRealFunction asCollector(double initialValue) { return asCollector(BinaryFunction.ADD, initialValue); } public MultivariateRealFunction asCollector() { return asCollector(BinaryFunction.ADD, 0.0D); } public abstract double value(double paramDouble) throws FunctionEvaluationException; } /* Location: * Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.org.apache.commons.math.analysis.ComposableFunction * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "Arwin.tio@adroll.com" ]
Arwin.tio@adroll.com
7e0e65ff112b72cbb52132a47e35e1ea6a1c4ea5
72f02c3826d332630227006855c6bf21003b4bf5
/src/main/java/generated/AccommodationCategoryType.java
4ecf0c1cf909822a22067e0e508521d1260432a5
[ "Apache-2.0" ]
permissive
ateeb-hk/otalib
887ff885ba3ec8a20975424e30b74f1549055e73
2c314144352ab0d3357a94b301338b002068103a
refs/heads/master
2020-03-23T05:05:22.668269
2017-07-19T08:05:39
2017-07-19T08:05:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,521
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.07.11 at 07:19:31 PM IST // package generated; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * Accommodations and services offered on a train. * * <p>Java class for AccommodationCategoryType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="AccommodationCategoryType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Accommodation" maxOccurs="99" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;extension base="{}AccommodationType"> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;element ref="{}AncillaryService" maxOccurs="99" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AccommodationCategoryType", propOrder = { "accommodation", "ancillaryService" }) public class AccommodationCategoryType { @XmlElement(name = "Accommodation") protected List<AccommodationCategoryType.Accommodation> accommodation; @XmlElement(name = "AncillaryService") protected List<AncillaryService> ancillaryService; /** * Gets the value of the accommodation property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the accommodation property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAccommodation().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link AccommodationCategoryType.Accommodation } * * */ public List<AccommodationCategoryType.Accommodation> getAccommodation() { if (accommodation == null) { accommodation = new ArrayList<AccommodationCategoryType.Accommodation>(); } return this.accommodation; } /** * Any service or product offered in conjunction with a basic rail accommodation, such as vehicle transport, pet transport and restaurant car service. Refer to OpenTravel Code List Rail Ancillary Service (RAN).Gets the value of the ancillaryService property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the ancillaryService property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAncillaryService().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link AncillaryService } * * */ public List<AncillaryService> getAncillaryService() { if (ancillaryService == null) { ancillaryService = new ArrayList<AncillaryService>(); } return this.ancillaryService; } /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;extension base="{}AccommodationType"> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") public static class Accommodation extends AccommodationType { } }
[ "kesav@hotelsoft.com" ]
kesav@hotelsoft.com
37fdfc4b2b6690c16f0ac297e7b0647d8cc49d3b
0a664cecaede225e0b062d7245de4c7364ab15f3
/edu.ustb.sei.mde.xmu.resource.xmu/src-gen/edu/ustb/sei/mde/xmu/resource/xmu/util/XmuEObjectUtil.java
e5647deec908f511f298363a27b5bbd38491993a
[]
no_license
lesleytong/XMU-from-hexiao
95188c546c45fde9c8349dd7620ab6a0676dd942
d24ee350ac7f74a7e925769145ed6e0f57d7ab8d
refs/heads/master
2021-07-02T10:43:04.370583
2020-11-11T02:12:40
2020-11-11T02:12:40
228,829,472
0
0
null
null
null
null
UTF-8
Java
false
false
5,122
java
/** * <copyright> * </copyright> * * */ package edu.ustb.sei.mde.xmu.resource.xmu.util; /** * A utility class that can be used to work with EObjects. While many similar * methods are provided by EMF's own EcoreUtil class, the missing ones are * collected here. * * @see org.eclipse.emf.ecore.util.EcoreUtil */ public class XmuEObjectUtil { public static <T> java.util.Collection<T> getObjectsByType(java.util.Iterator<?> iterator, org.eclipse.emf.ecore.EClassifier type) { java.util.Collection<T> result = new java.util.ArrayList<T>(); while (iterator.hasNext()) { Object object = iterator.next(); if (type.isInstance(object)) { @SuppressWarnings("unchecked") T t = (T) object; result.add(t); } } return result; } /** * Use EcoreUtil.getRootContainer() instead. */ @Deprecated public static org.eclipse.emf.ecore.EObject findRootContainer(org.eclipse.emf.ecore.EObject object) { org.eclipse.emf.ecore.EObject container = object.eContainer(); if (container != null) { return findRootContainer(container); } else { return object; } } public static Object invokeOperation(org.eclipse.emf.ecore.EObject element, org.eclipse.emf.ecore.EOperation o) { java.lang.reflect.Method method; try { method = element.getClass().getMethod(o.getName(), new Class[]{}); if (method != null) { Object result = method.invoke(element, new Object[]{}); return result; } } catch (SecurityException e) { new edu.ustb.sei.mde.xmu.resource.xmu.util.XmuRuntimeUtil().logError("Exception while matching proxy URI.", e); } catch (NoSuchMethodException e) { new edu.ustb.sei.mde.xmu.resource.xmu.util.XmuRuntimeUtil().logError("Exception while matching proxy URI.", e); } catch (IllegalArgumentException e) { new edu.ustb.sei.mde.xmu.resource.xmu.util.XmuRuntimeUtil().logError("Exception while matching proxy URI.", e); } catch (IllegalAccessException e) { new edu.ustb.sei.mde.xmu.resource.xmu.util.XmuRuntimeUtil().logError("Exception while matching proxy URI.", e); } catch (java.lang.reflect.InvocationTargetException e) { new edu.ustb.sei.mde.xmu.resource.xmu.util.XmuRuntimeUtil().logError("Exception while matching proxy URI.", e); } return null; } @SuppressWarnings("unchecked") public static void setFeature(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature eFeature, Object value, boolean clearIfList) { int upperBound = eFeature.getUpperBound(); if (upperBound > 1 || upperBound < 0) { Object oldValue = object.eGet(eFeature); if (oldValue instanceof java.util.List<?>) { java.util.List<Object> list = (java.util.List<Object>) oldValue; if (clearIfList) { list.clear(); } list.add(value); } else { assert false; } } else { object.eSet(eFeature, value); } } /** * Returns the depth of the given element in the containment tree. */ public static int getDepth(org.eclipse.emf.ecore.EObject element) { org.eclipse.emf.ecore.EObject parent = element.eContainer(); if (parent == null) { return 0; } else { return getDepth(parent) + 1; } } /** * Returns the value of the given feature. If the feature is a list, the list item * at the given index is returned. Proxy objects are resolved. */ public static Object getFeatureValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, int index) { return getFeatureValue(eObject, feature, index, true); } /** * Returns the value of the given feature. If the feature is a list, the list item * at the given index is returned. */ public static Object getFeatureValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, int index, boolean resolve) { // get value of feature Object o = eObject.eGet(feature, resolve); if (o instanceof java.util.List<?>) { java.util.List<?> list = (java.util.List<?>) o; o = list.get(index); } return o; } /** * Checks whether the root container of the given object has an EAdapter that is * an instance of the given class. If one is found, it is returned, otherwise the * result is null. */ public static <T> T getEAdapterFromRoot(org.eclipse.emf.ecore.EObject object, Class<T> clazz) { org.eclipse.emf.ecore.EObject root = org.eclipse.emf.ecore.util.EcoreUtil.getRootContainer(object); return getEAdapter(root, clazz); } /** * Checks whether the given object has an EAdapter that is an instance of the * given class. If one is found, it is returned, otherwise the result is null. */ @SuppressWarnings("unchecked") public static <T> T getEAdapter(org.eclipse.emf.ecore.EObject object, Class<T> clazz) { java.util.List<org.eclipse.emf.common.notify.Adapter> eAdapters = object.eAdapters(); for (org.eclipse.emf.common.notify.Adapter adapter : eAdapters) { if (clazz.isInstance(adapter)) { return (T) adapter; } } return null; } }
[ "10242@DESKTOP-EJ087RD" ]
10242@DESKTOP-EJ087RD
3c8ab2a8483b4b409cb0cefde73e3bebe64aa718
91703ccdb9f65e4505a8b4320f299fd5d2ece5bd
/src/main/java/layers/service/models/User.java
d535edaf59773eee9654989918a73385c0300f63
[]
no_license
RomanMorozov88/Cinema
54bbf237116b903eb8498aa4d51539208131f3e6
2de8f048c0a4a83dac18bd965c5557c24d165a7f
refs/heads/master
2022-11-26T00:30:18.099731
2019-12-24T19:51:14
2019-12-24T19:51:14
225,599,553
0
0
null
2022-11-15T23:32:53
2019-12-03T11:06:09
Java
UTF-8
Java
false
false
1,006
java
package layers.service.models; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; public class User { @JsonProperty("userName") private String name; @JsonProperty("userPhone") private int phone; public User() { } public User(String name, int phone) { this.name = name; this.phone = phone; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getPhone() { return phone; } public void setPhone(int phone) { this.phone = phone; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; return phone == user.phone && Objects.equals(name, user.name); } @Override public int hashCode() { return Objects.hash(name, phone); } }
[ "MorozovRoman.88@mail.ru" ]
MorozovRoman.88@mail.ru
a99a3ddef474b2c1bf02bc256b201baf08eafd0a
d0ba383ff0a606674db006599d96800062fd9b7f
/bagri-server/bagri-server-hazelcast/src/test/java/com/bagri/server/hazelcast/management/ManagementBeanTest.java
07fc734ce1efe7f4b51cd58e54d93313ff04f740
[ "Apache-2.0" ]
permissive
grassit/bagri
462d954525e568cdcae973ab27032ba963661482
3d3527ab6e960645417e047fd9f1767bc664ad26
refs/heads/master
2020-05-16T22:41:11.608491
2019-02-15T06:12:01
2019-02-15T06:12:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,298
java
package com.bagri.server.hazelcast.management; import static org.junit.Assert.*; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import javax.management.MBeanAttributeInfo; import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; import javax.management.MBeanServerConnection; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import org.junit.Test; public abstract class ManagementBeanTest { protected static MBeanServerConnection mbsc; protected abstract ObjectName getObjectName() throws MalformedObjectNameException; protected Map<String, Object> getExpectedAttributes() { return Collections.emptyMap(); } protected String[] getExpectedOperations() { return new String[0]; } @Test public void testManagementAttributes() throws Exception { ObjectName oName = getObjectName(); MBeanInfo mbi = mbsc.getMBeanInfo(oName); assertNotNull(mbi); MBeanAttributeInfo[] attrs = mbi.getAttributes(); Map<String, Object> expected = getExpectedAttributes(); assertEquals(expected.size(), attrs.length); for (MBeanAttributeInfo attr: attrs) { assertTrue("not found attribute: " + attr.getName(), expected.containsKey(attr.getName())); } for (Map.Entry<String, Object> attr: expected.entrySet()) { Object o = mbsc.getAttribute(oName, attr.getKey()); if (attr.getValue() != null) { assertEquals(attr.getValue(), o); } else { System.out.println("attribute: " + attr.getKey() + " value: " + o); } } } @Test public void testManagementOperations() throws Exception { ObjectName oName = getObjectName(); MBeanInfo mbi = mbsc.getMBeanInfo(oName); assertNotNull(mbi); MBeanOperationInfo[] ops = mbi.getOperations(); String[] expected = getExpectedOperations(); assertEquals(expected.length, ops.length); List<String> exList = Arrays.asList(expected); for (MBeanOperationInfo op: ops) { assertTrue("not found operation: " + op.getName(), exList.contains(op.getName())); } } }
[ "dsukhoroslov@gmail.com" ]
dsukhoroslov@gmail.com
ed51488a8318a8e652bfce5323df7d011d753b36
024ef33f04da3a84f9c44e4180604f5a9339f161
/ga-supervision-database/src/main/java/com/atosenet/ga/company/db/repos/ga/company/AircraftFlySumRepository.java
11eee36269cb76144cc27e5113f5a44ae735f7ca
[]
no_license
pitaoWang/ga_supervision
d95da46b39cf61185ac9c8f32f285e0198a4a8c2
4dc42dae1fae66f6065f27c65a52765b7e6f5f07
refs/heads/master
2020-04-08T22:27:49.202427
2018-12-04T09:43:35
2018-12-04T09:43:35
159,641,336
0
0
null
null
null
null
UTF-8
Java
false
false
2,303
java
package com.atosenet.ga.company.db.repos.ga.company; import java.util.Date; import java.util.List; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; import com.atosenet.ga.company.db.model.ga.company.AircraftFlySumView; @RepositoryRestResource(collectionResourceRel = "acfr", path = "acfr") public interface AircraftFlySumRepository extends PagingAndSortingRepository<AircraftFlySumView, Long> { @Query(value="select t.aircraft_model,sum(t.sum_time) as fly_sum_time from v_flight_time_as_aircraft as t where FIND_IN_SET(t.company_id,:companyidds) and t.fly_date between :startDate and :endDate group by t.aircraft_model order by fly_sum_time desc", nativeQuery=true) List<Object> countIdAndTime(@Param("companyidds") String companyidds,@Param("startDate") Date startDate,@Param("endDate") Date endDate); @Query(value="select * from v_flight_time_as_aircraft t where FIND_IN_SET(t.company_id,:companyidds) and t.fly_date between :startDate and :endDate order by sum_time desc \n-- #pageable\n", countQuery="select count(*) from v_flight_time_as_aircraft t where FIND_IN_SET(t.company_id,:companyidds) and t.fly_date between :startDate and :endDate order by sum_time desc", nativeQuery=true) Page<AircraftFlySumView> findAircraftFlySumList(@Param("companyidds") String companyidds ,@Param("startDate") Date startDate,@Param("endDate") Date endDate,Pageable pageable); /** * TODO(这里用一句话描述这个方法的作用) * * @Title: countIdAndTimes * @param companyIds * @param sdate * @param edate * @return * @throws * */ @Query(value="select t.aircraft_model,sum(t.sum_time) as fly_sum_time from v_flight_time_as_aircraft as t where FIND_IN_SET(t.company_id,:companyidds) and t.fly_date between :startDate and :endDate group by t.aircraft_model order by fly_sum_time desc LIMIT 0,10", nativeQuery=true) List<Object> countIdAndTimes(@Param("companyidds") String companyidds,@Param("startDate") Date startDate,@Param("endDate") Date endDate); }
[ "wpt1225@126.com" ]
wpt1225@126.com
601d3276a5d476996bd9cc840bd9b704fca1ada4
aefc7957e92e39de0566b712727c7df66709886c
/src/main/java/com/aliyun/openservices/shade/io/netty/example/uptime/UptimeClient.java
d487640babc05ddd7bdc176df7cbf05bebcb983a
[ "MIT" ]
permissive
P79N6A/gw-boot-starter-aliyun-ons
71ff20d12c33fa9aa061c262f892d8bde7a93459
10ae89ce3e4f44edd383e472c987b0671244f1be
refs/heads/master
2020-05-19T10:05:00.665427
2019-05-05T01:42:57
2019-05-05T01:42:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,293
java
/* * Copyright 2012 The Netty Project * * The Netty Project 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 com.aliyun.openservices.shade.io.netty.example.uptime; import com.aliyun.openservices.shade.io.netty.bootstrap.Bootstrap; import com.aliyun.openservices.shade.io.netty.channel.ChannelFuture; import com.aliyun.openservices.shade.io.netty.channel.ChannelFutureListener; import com.aliyun.openservices.shade.io.netty.channel.ChannelInitializer; import com.aliyun.openservices.shade.io.netty.channel.EventLoopGroup; import com.aliyun.openservices.shade.io.netty.channel.socket.SocketChannel; import com.aliyun.openservices.shade.io.netty.channel.nio.NioEventLoopGroup; import com.aliyun.openservices.shade.io.netty.channel.socket.nio.NioSocketChannel; import com.aliyun.openservices.shade.io.netty.handler.timeout.IdleStateHandler; /** * Connects to a server periodically to measure and print the uptime of the * server. This example demonstrates how to implement reliable reconnection * mechanism in Netty. */ public final class UptimeClient { static final String HOST = System.getProperty("host", "127.0.0.1"); static final int PORT = Integer.parseInt(System.getProperty("port", "8080")); // Sleep 5 seconds before a reconnection attempt. static final int RECONNECT_DELAY = Integer.parseInt(System.getProperty("reconnectDelay", "5")); // Reconnect when the server sends nothing for 10 seconds. static final int READ_TIMEOUT = Integer.parseInt(System.getProperty("readTimeout", "10")); private static final UptimeClientHandler handler = new UptimeClientHandler(); public static void main(String[] args) throws Exception { configureBootstrap(new Bootstrap()).connect(); } private static Bootstrap configureBootstrap(Bootstrap b) { return configureBootstrap(b, new NioEventLoopGroup()); } static Bootstrap configureBootstrap(Bootstrap b, EventLoopGroup g) { b.group(g) .channel(NioSocketChannel.class) .remoteAddress(HOST, PORT) .handler(new ChannelInitializer<SocketChannel>() { @Override public void initChannel(SocketChannel ch) throws Exception { ch.pipeline().addLast(new IdleStateHandler(READ_TIMEOUT, 0, 0), handler); } }); return b; } static void connect(Bootstrap b) { b.connect().addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { if (future.cause() != null) { handler.startTime = -1; handler.println("Failed to connect: " + future.cause()); } } }); } }
[ "hf@geewit.io" ]
hf@geewit.io
1114d9cae14d166cd818e6dbd093610e0b57b4a4
ffe0ea2a467e12ce661497150692faa9758225f7
/Dsdps_v1.2/app/src/main/java/com/unccr/zclh/dsdps/fragment/view/AnalogClockBitmap.java
566ec2719da563436db35d478a5d3b7031dd01eb
[]
no_license
changjigang52084/Mark-s-Project
cc1be3e3e4d2b5d0d7d48b8decbdb0c054b742b7
8e82a8c3b1d75d00a70cf54838f3a91411ff1d16
refs/heads/master
2022-12-31T01:21:42.822825
2020-10-13T10:24:58
2020-10-13T10:24:58
303,652,140
1
1
null
null
null
null
UTF-8
Java
false
false
8,410
java
package com.unccr.zclh.dsdps.fragment.view; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.drawable.BitmapDrawable; import android.util.Log; import com.unccr.zclh.dsdps.R; import com.unccr.zclh.dsdps.app.DsdpsApp; import com.unccr.zclh.dsdps.util.Helper; import java.util.Calendar; import java.util.TimeZone; public class AnalogClockBitmap { private static final String TAG = "AnalogClockBitmap"; // 表盘,时针,分针,秒针的Bitmap private Bitmap mBmpDial; private Bitmap mBmpHour; private Bitmap mBmpMinute; private Bitmap mBmpSecond; // 表盘,时针,分针,秒针的BitmapDrawable private BitmapDrawable bmdHour; private BitmapDrawable bmdMinute; private BitmapDrawable bmdSecond; private BitmapDrawable bmdDial; private int mWidth; // 表盘的宽度 private int mHeigh; // 表盘的高度 private int mTempWidth; // 时针,分针,秒针的宽度 private int mTempHeigh; // 时针,分针,秒针的高度 private int centerX; // 时针,分针,秒针的圆心点(x轴) private int centerY; // 时针,分针,秒针的圆心点(y轴) private int availableWidth; // 宽度的中间变量 private int availableHeight; // 高度的中间变量 private int hour; private int minute; private int second; private float circleWH; // 表心的参数 private float hourRotate; // 时针的旋转参数 private float minuteRotate; // 分针的旋转参数 private float secondRotate; // 秒针的旋转参数 private Calendar mCalendar; private Paint mPaint; // 画表心的Paint private static AnalogClockBitmap ins = new AnalogClockBitmap(); public static AnalogClockBitmap get() { if (ins == null) { ins = new AnalogClockBitmap(); } return ins; } public void getAnalogClock(int width, int height) { initAnalogClockSize(width, height); initAnalogClockBitmap(); } /** * 计算相关的尺寸 */ private void initAnalogClockSize(int width, int height) { availableWidth = width > height ? height : width; // 根据传入的Area的宽度与高度,进行View的适配 availableHeight = availableWidth; mTempHeigh = availableHeight; mTempWidth = (int) (availableHeight/5.5f); circleWH = availableHeight / 27f; centerX = (int) (availableWidth / 2f); centerY = (int) (availableHeight / 2f); } /** * 加载Bitmap的资源 */ private void initAnalogClockBitmap() { // 时针的Bitmap与BitmapDrawable mBmpHour = BitmapFactory.decodeResource(DsdpsApp.getDsdpsApp().getResources(), R.drawable.big_hour); bmdHour = new BitmapDrawable(DsdpsApp.getDsdpsApp().getResources(), mBmpHour); // 分针的Bitmap与BitmapDrawable mBmpMinute = BitmapFactory.decodeResource(DsdpsApp.getDsdpsApp().getResources(), R.drawable.big_minute); bmdMinute = new BitmapDrawable(DsdpsApp.getDsdpsApp().getResources(), mBmpMinute); // 秒针的Bitmap与BitmapDrawable mBmpSecond = BitmapFactory.decodeResource(DsdpsApp.getDsdpsApp().getResources(), R.drawable.big_second); bmdSecond = new BitmapDrawable(DsdpsApp.getDsdpsApp().getResources(), mBmpSecond); // 表盘的Bitmap与BitmapDrawable mBmpDial = BitmapFactory.decodeResource(DsdpsApp.getDsdpsApp().getResources(), R.drawable.big_dial); mBmpDial = Helper.zoomImage(mBmpDial, availableWidth, availableHeight); bmdDial = new BitmapDrawable(DsdpsApp.getDsdpsApp().getResources(), mBmpDial); mWidth = mBmpDial.getWidth(); mHeigh = mBmpDial.getHeight(); } /** * 加载Calendar */ public void prepareAnalogClockCalendar() { mCalendar = Calendar.getInstance(TimeZone.getDefault()); setAnalogClockCalendar(); } /** * 格式化Calendar */ private void setAnalogClockCalendar() { hour = mCalendar.get(Calendar.HOUR); minute = mCalendar.get(Calendar.MINUTE); second = mCalendar.get(Calendar.SECOND); hourRotate = (hour * 30.0f) + (minute / 60.0f * 30.0f); minuteRotate = minute * 6.0f; secondRotate = second * 6.0f; } /** * 通过专递的参数Canvas,绘制View */ public void drawAnalogClockView(Canvas mCanvas) { boolean scaled = false; // 确定View所在中心与尺寸 if (availableWidth < mWidth || availableHeight < mHeigh) { scaled = true; float scale = Math.min((float) availableWidth / (float) mWidth, (float) availableHeight / (float) mHeigh); mCanvas.save(); mCanvas.scale(scale, scale, centerX, centerY); } // 确定表盘在View中的位置 bmdDial.setAntiAlias(true); // 实现抗锯齿的效果 bmdDial.setFilterBitmap(true); bmdDial.setBounds(centerX - (mWidth / 2), centerY - (mHeigh / 2), centerX + (mWidth / 2), centerY + (mHeigh / 2)); bmdDial.draw(mCanvas); int left = centerX - (mTempWidth / 2); int top = centerY - (mTempHeigh / 2); int right = centerX + (mTempWidth / 2); int bottom = centerY + (mTempHeigh / 2); // 把时针画在View上 mCanvas.save(); // 保存时针的状态 mCanvas.rotate(hourRotate, centerX, centerY); bmdHour.setBounds(left, top, right, bottom); bmdHour.setAntiAlias(true); // 实现抗锯齿的效果 bmdHour.setFilterBitmap(true); bmdHour.draw(mCanvas); mCanvas.restore(); // 恢复时针的状态 // 把分针画在View上 mCanvas.save(); // 保存分针的状态 mCanvas.rotate(minuteRotate, centerX, centerY); bmdMinute.setBounds(left, top, right, bottom); bmdMinute.setAntiAlias(true); // 实现抗锯齿的效果 bmdMinute.setFilterBitmap(true); bmdMinute.draw(mCanvas); mCanvas.restore(); // 恢复分针的状态 // 把秒针画在View上 mCanvas.save(); // 保存秒针的状态 mCanvas.rotate(secondRotate, centerX, centerY); bmdSecond.setBounds(left, top, right, bottom); bmdSecond.setAntiAlias(true); // 实现抗锯齿的效果 bmdSecond.setFilterBitmap(true); bmdSecond.draw(mCanvas); mCanvas.restore(); // 恢复秒针的状态 // 绘制表心 mPaint = new Paint(); mPaint.setAntiAlias(true); // 实现抗锯齿的效果 mPaint.setFilterBitmap(true); mPaint.setAntiAlias(true) ; mPaint.setColor(Color.parseColor("#282A2B")); mPaint.setStyle(Paint.Style.FILL); mCanvas.drawCircle(centerX, centerY, circleWH, mPaint); if (scaled) { mCanvas.restore(); } } /** * 销毁余留的Bitmap */ public void destroyAnalogClockBitmap() { if (mBmpHour != null && !mBmpHour.isRecycled()) { mBmpHour.recycle(); mBmpHour = null; bmdHour.getBitmap().recycle(); Log.d(TAG, "mBmpHour has already been recycled mBmpHour = " + mBmpHour + " : " + "bmdHour = " + bmdHour); } if (mBmpMinute != null && !mBmpMinute.isRecycled()) { mBmpMinute.recycle(); mBmpMinute = null; bmdMinute.getBitmap().recycle(); Log.d(TAG, "mBmpMinute has already been recycled mBmpMinute = " + mBmpMinute + " : " + "bmdMinute = " + bmdMinute); } if (mBmpSecond != null && !mBmpSecond.isRecycled()) { mBmpSecond.recycle(); mBmpSecond = null; bmdSecond.getBitmap().recycle(); Log.d(TAG, "mBmpSecond has already been recycled mBmpSecond = " + mBmpSecond + " : " + "bmdSecond = " + bmdSecond); } if (mBmpDial != null && !mBmpDial.isRecycled()) { mBmpDial.recycle(); mBmpDial = null; bmdDial.getBitmap().recycle(); Log.d(TAG, "mBmpDial has already been recycled mBmpDial = " + mBmpDial + " : " + "bmdDial = " + bmdDial); } } }
[ "451861975@qq.com" ]
451861975@qq.com
1aebbc9aa3c538d8c353b4a81144ae342fc59986
ec4913f487b116f9a1f2273e17d3815f44a1c545
/org.aml.javacodegen/src/main/java/org/raml/jaxrs/codegen/core/ext/NestedSchemaNameComputer.java
10927cd98f59399d05148d7fbd7f48e5a3837198
[ "Apache-2.0" ]
permissive
OnPositive/aml
b6e5959a998ec456e557826bfd0deb22d53271aa
84ad439df6cec689bd1b3b6601dc891ba653eb70
refs/heads/master
2022-12-21T20:32:59.296069
2019-11-11T10:16:50
2019-11-11T10:16:50
67,412,606
10
5
Apache-2.0
2022-12-14T20:27:13
2016-09-05T10:46:17
Java
UTF-8
Java
false
false
1,083
java
/* * Copyright 2013-2015 (c) MuleSoft, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ package org.raml.jaxrs.codegen.core.ext; import org.aml.apimodel.MimeType; /** * * Created by Pavel Petrochenko on 12/04/15. * * @author Pavel * @version $Id: $Id */ public interface NestedSchemaNameComputer extends GeneratorExtension{ /** * <p>computeNestedSchemaName.</p> * * @param mime mime type * @return null if nested schema name can not be computed by this extension, or null */ String computeNestedSchemaName(MimeType mime); }
[ "petrochenko.pavel.a@gmail.com" ]
petrochenko.pavel.a@gmail.com
00b2b84f80d8618ded4daa0e2f0a60ca9936d0c0
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Mate20-9.0/src/main/java/android/icu/text/SourceTargetUtility.java
982c4b29e450039a792ec2f3ed4e3a4023065aaf
[]
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
2,508
java
package android.icu.text; import android.icu.lang.CharSequences; import java.util.HashSet; import java.util.Iterator; import java.util.Set; class SourceTargetUtility { static Normalizer2 NFC = Normalizer2.getNFCInstance(); static final UnicodeSet NON_STARTERS = new UnicodeSet("[:^ccc=0:]").freeze(); final UnicodeSet sourceCache; final Set<String> sourceStrings; final Transform<String, String> transform; public SourceTargetUtility(Transform<String, String> transform2) { this(transform2, null); } public SourceTargetUtility(Transform<String, String> transform2, Normalizer2 normalizer) { this.transform = transform2; if (normalizer != null) { this.sourceCache = new UnicodeSet("[:^ccc=0:]"); } else { this.sourceCache = new UnicodeSet(); } this.sourceStrings = new HashSet(); for (int i = 0; i <= 1114111; i++) { boolean added = false; if (!CharSequences.equals(i, (CharSequence) transform2.transform(UTF16.valueOf(i)))) { this.sourceCache.add(i); added = true; } if (normalizer != null) { String d = NFC.getDecomposition(i); if (d != null) { if (!d.equals(transform2.transform(d))) { this.sourceStrings.add(d); } if (!added && !normalizer.isInert(i)) { this.sourceCache.add(i); } } } } this.sourceCache.freeze(); } public void addSourceTargetSet(Transliterator transliterator, UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) { UnicodeSet myFilter = transliterator.getFilterAsUnicodeSet(inputFilter); UnicodeSet affectedCharacters = new UnicodeSet(this.sourceCache).retainAll(myFilter); sourceSet.addAll(affectedCharacters); Iterator<String> it = affectedCharacters.iterator(); while (it.hasNext()) { targetSet.addAll((CharSequence) this.transform.transform(it.next())); } for (String s : this.sourceStrings) { if (myFilter.containsAll(s)) { String t = this.transform.transform(s); if (!s.equals(t)) { targetSet.addAll((CharSequence) t); sourceSet.addAll((CharSequence) s); } } } } }
[ "dstmath@163.com" ]
dstmath@163.com
34c256dc5919e8af8e863cd43ee8bc9813cc38d2
5627649c5601e671fa565ebbe6a57d5af20d9c33
/src/main/java/br/com/cinema/exemplos/UsuariosBean.java
e39da534a1172840e19335a3c285065f946abe7a
[ "Apache-2.0" ]
permissive
cleitonferreira/CinemaJsf
f22665ff0eace0dfaf5afbc10db7144444139a19
4861b85da07f65dc3d0ef7939ebf3ee7417396b8
refs/heads/master
2016-08-11T16:23:41.350367
2016-04-08T01:37:58
2016-04-08T01:37:58
55,435,797
0
0
null
null
null
null
UTF-8
Java
false
false
598
java
package br.com.cinema.exemplos; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; @ManagedBean(name = "usuarios") @SessionScoped public class UsuariosBean { private String nome, senha; public void setNome(String nome) { this.nome = nome; } public void setSenha(String senha) { this.senha = senha; } public String getNome() { return nome; } public String getSenha() { return senha; } public String validarUsuario() { if (nome.equals("user") && senha.equals("123")) { return "/exemplos/sucesso"; } else { return "/exemplos/erro"; } } }
[ "cleitonferreiraa@hotmail.com" ]
cleitonferreiraa@hotmail.com
edbd5da31c52986245fcb1fb75122d27b01e2da7
f378ddd47c8b7de6e9cf1d4228c84f73e9dc59f1
/projetos/PlantsVsBugs/src/org/anddev/amatidev/pvb/MainMenu.java
146fa876873415acb063977717a4424e998611ab
[]
no_license
charles-marques/dataset-375
29e2f99ac1ba323f8cb78bf80107963fc180487c
51583daaf58d5669c69d8208b8c4ed4e009001a5
refs/heads/master
2023-01-20T07:23:09.445693
2020-11-27T22:35:49
2020-11-27T22:35:49
283,315,149
0
1
null
null
null
null
UTF-8
Java
false
false
5,277
java
package org.anddev.amatidev.pvb; import org.amatidev.scene.AdScene; import org.amatidev.util.AdEnviroment; import org.amatidev.util.AdPrefs; import org.anddev.amatidev.pvb.singleton.GameData; import org.anddev.andengine.entity.IEntity; import org.anddev.andengine.entity.modifier.LoopEntityModifier; import org.anddev.andengine.entity.modifier.ScaleModifier; import org.anddev.andengine.entity.modifier.SequenceEntityModifier; import org.anddev.andengine.entity.modifier.IEntityModifier.IEntityModifierListener; import org.anddev.andengine.entity.scene.menu.MenuScene; import org.anddev.andengine.entity.sprite.Sprite; import org.anddev.andengine.entity.text.Text; import org.anddev.andengine.input.touch.TouchEvent; import org.anddev.andengine.util.modifier.IModifier; import android.content.ActivityNotFoundException; import android.content.Intent; import android.net.Uri; import com.openfeint.api.ui.Dashboard; public class MainMenu extends AdScene { private int mIndex; private boolean mContinue; @Override public MenuScene createMenu() { return null; } @Override public void createScene() { Sprite back = new Sprite(0, 0, GameData.getInstance().mMainBackground); getChild(BACKGROUND_LAYER).attachChild(back); Sprite title = new Sprite(3, 9, GameData.getInstance().mMainTitle); getChild(BACKGROUND_LAYER).attachChild(title); title.registerEntityModifier( new LoopEntityModifier( null, -1, null, new SequenceEntityModifier( new ScaleModifier(0.7f, 1f, 1.02f), new ScaleModifier(0.7f, 1.02f, 1f) ) ) ); int x = AdEnviroment.getInstance().getScreenWidth() / 2; this.mIndex = 159; Text play = new Text(0, 0, GameData.getInstance().mFontMainMenu, "PLAY"); //play.setColor(1.0f, 1.0f, 0.6f); play.setPosition(x - play.getWidthScaled() / 2, this.mIndex); Text cont = new Text(0, 0, GameData.getInstance().mFontMainMenu, "CONTINUE"); //more.setColor(1.0f, 1.0f, 0.6f); cont.setPosition(x - cont.getWidthScaled() / 2, this.mIndex + 90); Text score = new Text(0, 0, GameData.getInstance().mFontMainMenu, "SCORE"); //score.setColor(1.0f, 1.0f, 0.6f); score.setPosition(60, this.mIndex + 180); Text sep = new Text(0, 0, GameData.getInstance().mFontMainMenu, "/"); //score.setColor(1.0f, 1.0f, 0.6f); sep.setPosition(250, this.mIndex + 180); Text more = new Text(0, 0, GameData.getInstance().mFontMainMenu, "MORE GAME"); //score.setColor(1.0f, 1.0f, 0.6f); more.setPosition(300, this.mIndex + 180); getChild(AdScene.GAME_LAYER).attachChild(play); getChild(AdScene.GAME_LAYER).attachChild(cont); getChild(AdScene.GAME_LAYER).attachChild(sep); getChild(AdScene.GAME_LAYER).attachChild(score); getChild(AdScene.GAME_LAYER).attachChild(more); registerTouchArea(play); registerTouchArea(cont); registerTouchArea(score); registerTouchArea(more); } @Override public void endScene() { GameData.getInstance().mMyLevel.resetScore(); GameData.getInstance().mMyScore.resetScore(); GameData.getInstance().mMySeed.resetScore(); if (this.mContinue) { int lev = AdPrefs.getValue(AdEnviroment.getInstance().getContext(), "level", 0); GameData.getInstance().mMyLevel.addScore(lev); AdEnviroment.getInstance().setScene(new MainGame()); } else { AdEnviroment.getInstance().setScene(new Tutorial()); } } @Override public void manageAreaTouch(final ITouchArea pTouchArea) { final Text item = (Text) pTouchArea; item.setColor(1f, 0.7f, 0.7f); item.registerEntityModifier( new SequenceEntityModifier( new IEntityModifierListener() { @Override public void onModifierFinished(IModifier<IEntity> pModifier, IEntity pItem) { item.setColor(1.0f, 1.0f, 1.0f); MainMenu.this.execute(pTouchArea); } @Override public void onModifierStarted(IModifier<IEntity> pModifier, IEntity pItem) { } }, new ScaleModifier(0.1f, 1f, 1.3f), new ScaleModifier(0.1f, 1.3f, 1f) )); } private void execute(ITouchArea pTouchArea) { GameData.getInstance().mSoundMenu.play(); Text item = (Text) pTouchArea; if ((int) item.getY() == this.mIndex) { this.mContinue = false; AdEnviroment.getInstance().nextScene(); } else if ((int) item.getY() == this.mIndex + 90) { this.mContinue = true; AdEnviroment.getInstance().nextScene(); } else if ((int) item.getY() == this.mIndex + 180) { if ((int) item.getX() > 100) { try{ AdEnviroment.getInstance().getContext().startActivity(new Intent (Intent.ACTION_VIEW, Uri.parse("market://details?id=org.anddev.andengine.braingamelite"))); } catch (ActivityNotFoundException e) { } } else { try { Dashboard.open(); } catch (Exception e) { } } } } @Override public void startScene() { } @Override public void downSceneTouch(TouchEvent pSceneTouchEvent) { // TODO Auto-generated method stub } @Override public void moveSceneTouch(TouchEvent pSceneTouchEvent) { // TODO Auto-generated method stub } @Override public void upSceneTouch(TouchEvent pSceneTouchEvent) { // TODO Auto-generated method stub } }
[ "suporte@localhost.localdomain" ]
suporte@localhost.localdomain
928c797227f1d39c56167bc40c62e5b115d3f43a
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module507/src/main/java/module507packageJava0/Foo33.java
d0687a565d089125b59e0562d1d02665b15a84b8
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
292
java
package module507packageJava0; import java.lang.Integer; public class Foo33 { Integer int0; public void foo0() { new module507packageJava0.Foo32().foo3(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
6aa5a31bd6b2f93aa3deef59aefa0c4562e6d280
eb1343219a925101de1b4ca4aadae71b51dfffd2
/mnisqm/mnisqm-services/src/main/java/com/lachesis/mnisqm/module/remote/qualityForm/dao/QualityInfoMapper.java
751fb3d2b25d1c9a7f9543718f6fe2da5ae9b81d
[ "Apache-2.0" ]
permissive
gavin2lee/incubator
b961c23c63fc88c059e74e427b665125115717db
c95623af811195c3e89513ec30e52862d6562add
refs/heads/master
2020-12-13T20:52:26.951484
2017-01-25T00:31:59
2017-01-25T00:31:59
58,938,038
4
4
null
null
null
null
UTF-8
Java
false
false
260
java
package com.lachesis.mnisqm.module.remote.qualityForm.dao; import com.lachesis.mnisqm.module.qualityForm.domain.QualityInfo; import java.util.List; public interface QualityInfoMapper { int insert(QualityInfo record); List<QualityInfo> selectAll(); }
[ "gavin2lee@163.com" ]
gavin2lee@163.com
0872c6003e78f34363029380473be5246aca6e7d
00d47aa58bce01168f5444ac2926e60aa5611c14
/src/main/java/com.propentus/iot/BlockchainConnector.java
7e776ee021ad7da2d92cafac12624e1435bb8861
[ "Apache-2.0" ]
permissive
project-smartlog/smartlog-common-hyperledger-sdk
b88c92275883f3fe302e91b40ae9231e39cc4d7f
998815c41cd0dcdede59b953c152d7ba18d3b472
refs/heads/master
2020-04-25T03:48:59.722227
2019-02-25T12:04:43
2019-02-25T12:04:43
172,489,955
1
0
null
null
null
null
UTF-8
Java
false
false
6,352
java
/* * * * Copyright 2016-2019 * * * * Interreg Central Baltic 2014-2020 funded project * * Smart Logistics and Freight Villages Initiative, CB426 * * * * Kouvola Innovation Oy, FINLAND * * Region Örebro County, SWEDEN * * Tallinn University of Technology, ESTONIA * * Foundation Valga County Development Agency, ESTONIA * * Transport and Telecommunication Institute, LATVIA * * * * 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.propentus.iot; import com.propentus.common.exception.BlockchainException; import com.propentus.common.exception.ConfigurationException; import com.propentus.iot.configs.BasicSettingInitializer; import com.propentus.iot.configs.OrganisationConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.hyperledger.fabric.sdk.*; import org.hyperledger.fabric.sdk.exception.InvalidArgumentException; import org.hyperledger.fabric.sdk.exception.ProposalException; import java.util.Collection; import java.util.LinkedList; /** * Should be used as main entry point for talking with Hyperledger Fabric from outside sources */ public class BlockchainConnector { private static final Logger logger = LoggerFactory.getLogger(BlockchainConnector.class); private Channel currentChannel; private BasicSettingInitializer settingInitializer; public BlockchainConnector() throws ConfigurationException, BlockchainException { initialize(); } /** * Initialize this Blockchain connector instance * @throws ConfigurationException */ private void initialize() throws ConfigurationException, BlockchainException { //Load configs for this client settingInitializer = new BasicSettingInitializer(); joinChannel(); } private void joinChannel() throws BlockchainException { // Try to join channel when connector is created. try { OrganisationConfiguration orgConf = settingInitializer.getConfigReader().getOrganisationConfiguration(); ChannelManager channelManager = new ChannelManager(orgConf); currentChannel = channelManager.joinChannel(orgConf.channel, settingInitializer.getHFClient(), settingInitializer.getSampleOrg()); logger.debug("Joined channel '" + currentChannel.getName() + "' succesfully"); } catch (Exception e) { logger.error(e.getMessage(), e); throw new BlockchainException("BlockchainConnector threw exception when trying to join channel!", e); } } public User getUser() { return this.settingInitializer.getHFClient().getUserContext(); } /** * Get current channel where this connector belongs to. This information is not persistent and BlockchainConnector will try to join channel on startup always! * @return Current channel this Blockchain connector is participant of. */ public Channel getChannel() { if(currentChannel == null) { logger.error("Connector has no channel information"); } return this.currentChannel; } /** * Send transaction request to Smart contract and return decoded response as String * @param request * @return */ public String doTransaction(TransactionProposalRequest request) throws BlockchainException { Channel channel = this.getChannel(); User user = this.getUser(); LinkedList<ProposalResponse> successful = new LinkedList<>(); Collection<ProposalResponse> failed = new LinkedList<>(); Collection<ProposalResponse> invokePropResp = null; try { invokePropResp = this.getChannel().sendTransactionProposal(request); } catch (ProposalException e) { // TODO Auto-generated catch block logger.error(e.getMessage(), e); } catch (InvalidArgumentException e) { // TODO Auto-generated catch block logger.error(e.getMessage(), e); } for (ProposalResponse response : invokePropResp) { if (response.getStatus() == ChaincodeResponse.Status.SUCCESS) { successful.add(response); } else { failed.add(response); } } //////////////////////////// // Send transaction to orderer and return value if (user != null) { channel.sendTransaction(successful, user); if(!successful.isEmpty()) { return successful.get(0).getProposalResponse().getResponse().getPayload().toStringUtf8(); } } //successful //return channel.sendTransaction(successful); return null; } public String doQuery(QueryByChaincodeRequest request) { try { Channel channel = this.getChannel(); Collection<ProposalResponse> responses = currentChannel.queryByChaincode(request); //Got response if(!responses.isEmpty()) { for (ProposalResponse response : responses) { String responseValue = response.getProposalResponse().getResponse().getPayload().toStringUtf8(); logger.debug("Received query response: " + responseValue); return responseValue; } } } catch(Exception e) { logger.error(e.getMessage(), e); } logger.error("Query received no response!"); return null; } public OrganisationConfiguration getConfig() { return this.settingInitializer.getConfigReader().getOrganisationConfiguration(); } }
[ "sami.hongisto@cygate.fi" ]
sami.hongisto@cygate.fi
2b158d4ddc391fc6eadd4f2eb826c28b85ea1eb2
480d76232ca7293194c69ba57a5039c6507d5bc7
/mcp811 1.6.4/temp/src/minecraft_server/net/minecraft/src/BlockMelon.java
9d31e33af211f0d5eeb8640c046aec5078b5c683
[]
no_license
interactivenyc/Minecraft_SRC_MOD
bee868e7adf9c548ddafd8549a55a759cfa237ce
4b311f43fd312521c1df39010b0ae34ed81bc406
refs/heads/master
2016-09-07T18:33:22.494356
2014-01-27T19:10:47
2014-01-27T19:10:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
845
java
package net.minecraft.src; import java.util.Random; import net.minecraft.src.Block; import net.minecraft.src.CreativeTabs; import net.minecraft.src.Item; import net.minecraft.src.Material; public class BlockMelon extends Block { protected BlockMelon(int p_i2224_1_) { super(p_i2224_1_, Material.field_76266_z); this.func_71849_a(CreativeTabs.field_78030_b); } public int func_71885_a(int p_71885_1_, Random p_71885_2_, int p_71885_3_) { return Item.field_77738_bf.field_77779_bT; } public int func_71925_a(Random p_71925_1_) { return 3 + p_71925_1_.nextInt(5); } public int func_71910_a(int p_71910_1_, Random p_71910_2_) { int var3 = this.func_71925_a(p_71910_2_) + p_71910_2_.nextInt(1 + p_71910_1_); if(var3 > 9) { var3 = 9; } return var3; } }
[ "steve@speakaboos.com" ]
steve@speakaboos.com
5d69c0291e507615df75c9fe93abe2b056568f8a
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/jonan_ForkHub/app/src/main/java/com/github/mobile/core/gist/RandomGistTask.java
1c9f99a9c02155697ccc50330a20bee36c8ece18
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,618
java
// isComment package com.github.mobile.core.gist; import static com.github.mobile.RequestCodes.GIST_VIEW; import android.accounts.Account; import android.app.Activity; import android.util.Log; import com.github.mobile.R; import com.github.mobile.core.gist.GistStore; import com.github.mobile.ui.ProgressDialogTask; import com.github.mobile.ui.gist.GistsViewActivity; import com.github.mobile.util.ToastUtils; import com.google.inject.Inject; import java.util.Collection; import org.eclipse.egit.github.core.Gist; import org.eclipse.egit.github.core.client.PageIterator; import org.eclipse.egit.github.core.service.GistService; /** * isComment */ public class isClassOrIsInterface extends ProgressDialogTask<Gist> { private static final String isVariable = "isStringConstant"; @Inject private GistService isVariable; @Inject private GistStore isVariable; /** * isComment */ public isConstructor(final Activity isParameter) { super(isNameExpr); } /** * isComment */ public void isMethod() { isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isMethod(); } @Override protected Gist isMethod(Account isParameter) throws Exception { PageIterator<Gist> isVariable = isNameExpr.isMethod(isIntegerConstant); isNameExpr.isMethod(); int isVariable = isIntegerConstant + (int) (isNameExpr.isMethod() * ((isNameExpr.isMethod() - isIntegerConstant) + isIntegerConstant)); Collection<Gist> isVariable = isNameExpr.isMethod(isNameExpr, isIntegerConstant).isMethod(); // isComment if (isNameExpr.isMethod()) { isNameExpr = isIntegerConstant + (int) (isNameExpr.isMethod() * ((isNameExpr.isMethod() - isIntegerConstant) + isIntegerConstant)); isNameExpr = isNameExpr.isMethod(isNameExpr, isIntegerConstant).isMethod(); } if (isNameExpr.isMethod()) throw new IllegalArgumentException(isMethod().isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr)); return isNameExpr.isMethod(isNameExpr.isMethod().isMethod()); } @Override protected void isMethod(Gist isParameter) throws Exception { super.isMethod(isNameExpr); ((Activity) isMethod()).isMethod(isNameExpr.isMethod(isNameExpr), isNameExpr); } @Override protected void isMethod(Exception isParameter) throws RuntimeException { super.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr, "isStringConstant", isNameExpr); isNameExpr.isMethod((Activity) isMethod(), isNameExpr.isMethod()); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
cc4ae4b780ae78f58595c62d26144e973edc0ec0
6e674b34fe9f906670ebbe3e1289709294048f03
/JazminServer/src/jazmin/server/relay/udp/webrtc/SRTPCipherF8.java
57a00ac3560d3c2d65c86baf0a6df9e9bdbf09a4
[]
no_license
icecooly/JazminServer
56455725de9a134029df151a9823494d4bb0f551
56b8ca3ab08d29c68b55364361ba9939d350f9ab
refs/heads/master
2023-08-31T01:17:46.482612
2023-08-29T09:16:16
2023-08-29T09:16:16
54,451,494
6
7
null
2020-03-10T02:39:07
2016-03-22T06:39:40
Java
UTF-8
Java
false
false
5,875
java
package jazmin.server.relay.udp.webrtc; /** * * Code derived and adapted from the Jitsi client side SRTP framework. * * Distributed under LGPL license. * See terms of license at gnu.org. */ import java.nio.ByteBuffer; import java.util.Arrays; import org.bouncycastle.crypto.BlockCipher; import org.bouncycastle.crypto.params.KeyParameter; /** * SRTPCipherF8 implements SRTP F8 Mode AES Encryption (AES-f8). * F8 Mode AES Encryption algorithm is defined in RFC3711, section 4.1.2. * * Other than Null Cipher, RFC3711 defined two two encryption algorithms: * Counter Mode AES Encryption and F8 Mode AES encryption. Both encryption * algorithms are capable to encrypt / decrypt arbitrary length data, and the * size of packet data is not required to be a multiple of the AES block * size (128bit). So, no padding is needed. * * Please note: these two encryption algorithms are specially defined by SRTP. * They are not common AES encryption modes, so you will not be able to find a * replacement implementation in common cryptographic libraries. * * As defined by RFC3711: F8 mode encryption is optional. * * mandatory to impl optional default * ------------------------------------------------------------------------- * encryption AES-CM, NULL AES-f8 AES-CM * message integrity HMAC-SHA1 - HMAC-SHA1 * key derivation (PRF) AES-CM - AES-CM * * We use AESCipher to handle basic AES encryption / decryption. * * @author Bing SU (nova.su@gmail.com) * @author Werner Dittmann <werner.dittmann@t-online.de> */ public class SRTPCipherF8 { /** * AES block size, just a short name. */ private final static int BLKLEN = 16; /** * F8 mode encryption context, see RFC3711 section 4.1.2 for detailed * description. */ class F8Context { public byte[] S; public byte[] ivAccent; long J; } public static void deriveForIV(BlockCipher f8Cipher, byte[] key, byte[] salt) { /* * Get memory for the special key. This is the key to compute the * derived IV (IV'). */ byte[] saltMask = new byte[key.length]; byte[] maskedKey = new byte[key.length]; /* * First copy the salt into the mask field, then fill with 0x55 to get a * full key. */ System.arraycopy(salt, 0, saltMask, 0, salt.length); for (int i = salt.length; i < saltMask.length; ++i) saltMask[i] = 0x55; /* * XOR the original key with the above created mask to get the special * key. */ for (int i = 0; i < key.length; i++) maskedKey[i] = (byte) (key[i] ^ saltMask[i]); /* * Prepare the f8Cipher with the special key to compute IV' */ KeyParameter encryptionKey = new KeyParameter(maskedKey); f8Cipher.init(true, encryptionKey); saltMask = null; maskedKey = null; } public static void process(BlockCipher cipher, ByteBuffer data, int off, int len, byte[] iv, BlockCipher f8Cipher) { F8Context f8ctx = new SRTPCipherF8().new F8Context(); /* * Get memory for the derived IV (IV') */ f8ctx.ivAccent = new byte[BLKLEN]; /* * Use the derived IV encryption setup to encrypt the original IV to produce IV'. */ f8Cipher.processBlock(iv, 0, f8ctx.ivAccent, 0); f8ctx.J = 0; // initialize the counter f8ctx.S = new byte[BLKLEN]; // get the key stream buffer Arrays.fill(f8ctx.S, (byte) 0); int inLen = len; while (inLen >= BLKLEN) { processBlock(cipher, f8ctx, data, off, data, off, BLKLEN); inLen -= BLKLEN; off += BLKLEN; } if (inLen > 0) { processBlock(cipher, f8ctx, data, off, data, off, inLen); } } /** * Encrypt / Decrypt a block using F8 Mode AES algorithm, read len bytes * data from in at inOff and write the output into out at outOff * * @param f8ctx * F8 encryption context * @param in * byte array holding the data to be processed * @param inOff * start offset of the data to be processed inside in array * @param out * byte array that will hold the processed data * @param outOff * start offset of output data in out * @param len * length of the input data */ private static void processBlock(BlockCipher cipher, F8Context f8ctx, ByteBuffer in, int inOff, ByteBuffer out, int outOff, int len) { /* * XOR the previous key stream with IV' * ( S(-1) xor IV' ) */ for (int i = 0; i < BLKLEN; i++) f8ctx.S[i] ^= f8ctx.ivAccent[i]; /* * Now XOR (S(n-1) xor IV') with the current counter, then increment * the counter */ f8ctx.S[12] ^= f8ctx.J >> 24; f8ctx.S[13] ^= f8ctx.J >> 16; f8ctx.S[14] ^= f8ctx.J >> 8; f8ctx.S[15] ^= f8ctx.J >> 0; f8ctx.J++; /* * Now compute the new key stream using AES encrypt */ cipher.processBlock(f8ctx.S, 0, f8ctx.S, 0); /* * As the last step XOR the plain text with the key stream to produce * the cipher text. */ for (int i = 0; i < len; i++) out.put(outOff + i, (byte) (in.get(inOff + i) ^ f8ctx.S[i])); } }
[ "guooscar@gmail.com" ]
guooscar@gmail.com
c33111e02a2fb2607bd49add607037461f77ca0b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_7834c806fdc5b2147b62d8818163f85583edd52b/User/8_7834c806fdc5b2147b62d8818163f85583edd52b_User_t.java
fa9c138f779bffd7c8271e6597572331b710f1e7
[]
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
4,795
java
package com.df.idm.entity; import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.PrePersist; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.eclipse.persistence.annotations.Cache; import org.eclipse.persistence.annotations.FetchGroup; import org.eclipse.persistence.annotations.FetchAttribute; import org.eclipse.persistence.annotations.Index; @Cache @Entity @Table(name = "USERS") @FetchGroup(name = "AuthenticationInfo", attributes = { @FetchAttribute(name = "password"), @FetchAttribute(name = "weiboAccount"), @FetchAttribute(name = "email"), @FetchAttribute(name = "cellPhone"), }) public class User implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "USER_ID_SEQUENCE") @SequenceGenerator(initialValue = 10000, name = "USER_ID_SEQUENCE", sequenceName = "USER_ID_SEQUENCE") @Column private long Id; @Column(length = 32) private String firstName; @Column(length = 56) private String lastName; @Column(length = 256, nullable = false) private String password; @Column(length = 128) private String nickName; @Column private int age; @Column(length = 20) @Index(unique = true) private String cellPhone; @Column(length = 512) private String imageId; @Column(length = 8) private Gender gender; @Column(length = 128, updatable = false, nullable = false) @Index(unique = true) private String email; @Column(unique = true) @Index(unique = true) private String weiboAccount; @Column private boolean locked; @Temporal(value = TemporalType.TIMESTAMP) @Column(name = "CREATED_TIME", nullable = false) private Date createdTime; @Temporal(value = TemporalType.TIMESTAMP) @Column(name = "CHANGED_TIME") private Date changedTime; @Column(name = "IS_TENANT_OWNER") private boolean isTenantOwner; @Column(name = "TENANT_CODE") private String tenantCode; public long getId() { return Id; } public void setId(long id) { Id = id; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getCellPhone() { return cellPhone; } public void setCellPhone(String cellPhone) { this.cellPhone = cellPhone; } public String getImage() { return imageId; } public void setImage(String image) { this.imageId = image; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public Gender getGender() { return gender; } public void setGender(Gender gender) { this.gender = gender; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public boolean isLocked() { return locked; } public void setLocked(boolean locked) { this.locked = locked; } public String getImageId() { return imageId; } public void setImageId(String imageId) { this.imageId = imageId; } public String getWeiboAccount() { return weiboAccount; } public void setWeiboAccount(String weiboAccount) { this.weiboAccount = weiboAccount; } public Date getCreatedTime() { return createdTime; } public void setCreatedTime(Date createdTime) { this.createdTime = createdTime; } public Date getChangedTime() { return changedTime; } public void setChangedTime(Date changedTime) { this.changedTime = changedTime; } public String getNickName() { return nickName; } public void setNickName(String nickName) { this.nickName = nickName; } @PrePersist protected void fillDefaultValue() { if (this.createdTime == null) { this.setCreatedTime(new Date()); } } public boolean isTenantOwner() { return isTenantOwner; } public void setTenantOwner(boolean isTenantOwner) { this.isTenantOwner = isTenantOwner; } public String getTenantCode() { return tenantCode; } public void setTenantCode(String tenantCode) { this.tenantCode = tenantCode; } public static enum Gender { MALE, FEMALE } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8a70a04569958a9fcce2f0d4b916940385738702
c009207de4f01292f78011bf3c35a28709e166cb
/Manve/src/main/java/ThreadPrac/Th1.java
7e5412c531b406596e77a4a76d3bbb6c59cf97ed
[]
no_license
wangmia/Java
12087a4aac8954317ad77f29084c853d81d90679
821b78e7bb9a8fb18ba3b9bc56c85a26befa8cc0
refs/heads/master
2021-02-17T06:57:51.230036
2020-04-10T01:02:42
2020-04-10T01:02:42
245,078,754
0
0
null
2020-06-06T05:55:43
2020-03-05T05:40:26
Java
UTF-8
Java
false
false
1,396
java
package ThreadPrac; import java.nio.Buffer; /** * @author WM * @date 2020/3/29 2:46 下午 * 描述信息:1.现在有三个线程,如何保持三个线程按照顺序执行 */ public class Th1{ public static void main(String[] args) { final Thread thread1 = new Thread(new Runnable() { @Override public void run() { System.out.println(Thread.currentThread().getName()+"运行了"); } },"线程1"); final Thread thread2 = new Thread(new Runnable() { @Override public void run() { try { thread1.join(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(Thread.currentThread().getName()+"运行了"); } },"线程2"); final Thread thread3 = new Thread(new Runnable() { @Override public void run() { try { thread2.join(); thread1.join(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(Thread.currentThread().getName()+"运行了"); } },"线程3"); thread1.start(); thread2.start(); thread3.start(); } }
[ "you@example.com" ]
you@example.com
9b4e11d5d1a25d5f1f094959e0e70cfbebf61b67
9c22dd43d34a393ba0608a396e978a35d5ae0336
/src/main/java/edu/illinois/library/cantaloupe/config/ConfigurationWatcher.java
0d1c6e9a72e3d7180cfb95acf1ca68fa9a1f44d1
[ "NCSA", "LicenseRef-scancode-unknown-license-reference" ]
permissive
adam-vessey/cantaloupe
110523283002383add22b3f6366e8c0074a3c186
6f38df8fa7c8121b88d249c3980ac8da2d51618e
refs/heads/master
2023-02-20T17:42:49.949893
2017-12-09T01:33:14
2017-12-09T01:33:14
115,033,871
0
0
null
2017-12-21T18:11:08
2017-12-21T18:11:08
null
UTF-8
Java
false
false
2,050
java
package edu.illinois.library.cantaloupe.config; import edu.illinois.library.cantaloupe.logging.LoggerUtil; import edu.illinois.library.cantaloupe.util.FilesystemWatcher; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Path; /** * Listens for changes to a configuration file and reloads it when it has * changed. */ class ConfigurationWatcher implements Runnable { private static class CallbackImpl implements FilesystemWatcher.Callback { @Override public void created(Path path) { handle(path); } @Override public void deleted(Path path) {} @Override public void modified(Path path) { handle(path); } private void handle(Path path) { final Configuration config = Configuration.getInstance(); if (path.toFile().equals(config.getFile())) { try { config.reload(); LoggerUtil.reloadConfiguration(); } catch (FileNotFoundException e) { System.err.println("ConfigurationWatcher$CallbackImpl: " + "file not found: " + e.getMessage()); } catch (IOException e) { System.err.println("ConfigurationWatcher$CallbackImpl: " + e.getMessage()); } } } } private FilesystemWatcher filesystemWatcher; @Override public void run() { final Configuration config = Configuration.getInstance(); try { Path path = config.getFile().toPath().getParent(); filesystemWatcher = new FilesystemWatcher(path, new CallbackImpl()); filesystemWatcher.processEvents(); } catch (IOException e) { System.err.println("ConfigurationWatcher.run(): " + e.getMessage()); } } public void stop() { if (filesystemWatcher != null) { filesystemWatcher.stop(); } } }
[ "alexd@n-ary.net" ]
alexd@n-ary.net
c00b1d477208d7ea68a39263647c7e556e0c16d8
d274d6d1f4585a1f88ee022383dd4609cd537a20
/homeworks/2019/Lesson05/Lesson05/autotest/src/main/java/StringHelper.java
59bc1a2cf4e24bbe12f8ff586e547e17e1249ca7
[]
no_license
maxchv/selenium
a3350728257b31ec1745d67d17f2d13663ba134f
e9b4d416d05d5f0a0c0e81fd4667c707e9340899
refs/heads/master
2021-01-01T03:33:26.112280
2019-06-12T07:38:52
2019-06-12T07:38:52
56,548,354
4
0
null
2020-10-13T13:40:23
2016-04-18T23:08:10
HTML
UTF-8
Java
false
false
364
java
public class StringHelper { public String joinStrings(String... args){ String result = args[0]; for (int i = 1; i < args.length; i++) { result += ','; result += args[i]; } return result; } public String[] spiltStrings(String str, String separator){ return str.split(separator); } }
[ "maxshaptala@gmail.com" ]
maxshaptala@gmail.com
5842ddfc4189b9f15ee72c2054b7d3b69435301a
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.3.jar/classes.jar/com/tencent/assistant/sdk/remote/SDKActionCallback$Stub$Proxy.java
644866053fb51af42f6600e0f9313595b8538467
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,143
java
package com.tencent.assistant.sdk.remote; import android.os.IBinder; import android.os.Parcel; class SDKActionCallback$Stub$Proxy implements SDKActionCallback { private IBinder mRemote; SDKActionCallback$Stub$Proxy(IBinder paramIBinder) { this.mRemote = paramIBinder; } public IBinder asBinder() { return this.mRemote; } public String getInterfaceDescriptor() { return "com.tencent.assistant.sdk.remote.SDKActionCallback"; } public void onActionResult(byte[] paramArrayOfByte) { Parcel localParcel = Parcel.obtain(); try { localParcel.writeInterfaceToken("com.tencent.assistant.sdk.remote.SDKActionCallback"); localParcel.writeByteArray(paramArrayOfByte); this.mRemote.transact(1, localParcel, null, 1); return; } finally { localParcel.recycle(); } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.3.jar\classes.jar * Qualified Name: com.tencent.assistant.sdk.remote.SDKActionCallback.Stub.Proxy * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
5687d6465f08ea0df2d7a2b98485e9ffeaeced7d
bf49e37e52646a01446c6b237feeb45a1a0a7456
/app/src/main/java/com/go/onekeyclean/base/ActivityTack.java
5fb5ecd4cab4d734a27eb9eff8b953f239f81e79
[]
no_license
wangchao1994/oneKeyClean
f891613fa03fe5a4f81e8fd6681010bc971207fd
719ccd34c29bf4afcf3982abb4e458aeb32687b7
refs/heads/master
2021-07-25T13:39:14.070292
2017-11-06T06:57:56
2017-11-06T06:57:56
109,658,786
0
0
null
null
null
null
UTF-8
Java
false
false
2,150
java
package com.go.onekeyclean.base; import android.app.Activity; import android.content.Context; import com.umeng.analytics.MobclickAgent; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * activity 栈管理 * */ public class ActivityTack { public List<Activity> activityList=new ArrayList<Activity>(); public static ActivityTack tack=new ActivityTack(); public static ActivityTack getInstanse(){ return tack; } private ActivityTack(){ } public void addActivity(Activity activity){ activityList.add(activity); } public void removeActivity(Activity activity){ activityList.remove(activity); } /** * 完全退出 * @param context */ public void exit(Context context){ MobclickAgent.onKillProcess(context); while (activityList.size()>0) { activityList.get(activityList.size()-1).finish(); } System.exit(0); } /** * 根据class name获取activity * @param name * @return */ public Activity getActivityByClassName(String name){ for(Activity ac:activityList){ if(ac.getClass().getName().indexOf(name)>=0) { return ac; } } return null; } @SuppressWarnings("rawtypes") public Activity getActivityByClass(Class cs){ for(Activity ac:activityList){ if(ac.getClass().equals(cs)) { return ac; } } return null; } /** * 弹出activity * @param activity */ public void popActivity(Activity activity){ removeActivity(activity); activity.finish(); } /** * 弹出activity到 * @param cs */ @SuppressWarnings("rawtypes") public void popUntilActivity(Class... cs){ List<Activity> list=new ArrayList<Activity>(); for (int i = activityList.size()-1; i>=0; i--){ Activity ac= activityList.get(i); boolean isTop=false; for (int j = 0; j < cs.length; j++) { if(ac.getClass().equals(cs[j])){ isTop=true; break; } } if(!isTop){ list.add(ac); }else break; } for (Iterator<Activity> iterator = list.iterator(); iterator.hasNext();) { Activity activity = iterator.next(); popActivity(activity); } } }
[ "wchao0829@163.com" ]
wchao0829@163.com
88ca79e7008faf1fa3df980f5838fbe8da1d3fd7
0deb0a9a5d627365179e8e6eb560b8ce5eb4462e
/java/src/test/java/com/yourtion/leetcode/easy/c0392/SolutionTest.java
b51788f0cfbf064d0d941e7a9468c869629c6a9b
[ "MIT" ]
permissive
yourtion/LeetCode
511bdd344b2d5a6a436ae0a6c0458c73205d54da
61ee9fb1f97274e1621f8415dcdd8c7e424d20b3
refs/heads/master
2021-08-16T21:50:13.852242
2021-07-09T01:58:46
2021-07-09T01:58:46
231,171,224
0
0
null
null
null
null
UTF-8
Java
false
false
473
java
package com.yourtion.leetcode.easy.c0392; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; class SolutionTest { void runTest(String s1, String s2, boolean res) { System.out.printf("runTest: %s %s, res: %b \n", s1, s2, res); Assertions.assertEquals(res, new Solution().isSubsequence(s1, s2)); } @Test void isSubsequence() { runTest("abc", "ahbgdc", true); runTest("axc", "ahbgdc", false); } }
[ "yourtion@gmail.com" ]
yourtion@gmail.com
efbf6e8e8a036eacbef527c11b4dfd82d85eb835
48ae8e24dfe5a8e099eb1ce2d14c9a24f48975cc
/Product/Production/Common/CONNECTCoreLib/src/main/java/gov/hhs/fha/nhinc/callback/opensaml/SAMLAssertionBuilderFactoryImpl.java
8f83fcc6c2cbfc68bb90d7b1443a9d9d0fb86c8c
[ "BSD-3-Clause" ]
permissive
CONNECT-Continuum/Continuum
f12394db3cc8b794fdfcb2cb3224e4a89f23c9d5
23acf3ea144c939905f82c59ffeff221efd9cc68
refs/heads/master
2022-12-16T15:04:50.675762
2019-09-07T16:14:08
2019-09-07T16:14:08
206,986,335
0
0
NOASSERTION
2022-12-05T23:32:14
2019-09-07T15:18:59
Java
UTF-8
Java
false
false
2,486
java
/* * Copyright (c) 2009-2019, United States Government, as represented by the Secretary of Health and Human Services. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above * copyright notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the United States Government nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE UNITED STATES GOVERNMENT 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 gov.hhs.fha.nhinc.callback.opensaml; import gov.hhs.fha.nhinc.nhinclib.NhincConstants; /** * @author bhumphrey * */ public class SAMLAssertionBuilderFactoryImpl implements SAMLAssertionBuilderFactory { /* * (non-Javadoc) * * @see gov.hhs.fha.nhinc.callback.openSAML.SAMLAssertionBuilderFactory#getBuilder(java.lang.String) */ @Override public SAMLAssertionBuilder getBuilder(final String confirmationMethod) { SAMLAssertionBuilder builder = null; if (NhincConstants.HOK_ASSERTION_TYPE.equals(confirmationMethod)) { builder = new HOKSAMLAssertionBuilder(); } else if (NhincConstants.SV_ASSERTION_TYPE.equals(confirmationMethod)) { builder = new SVSAMLAssertionBuilder(); } return builder; } }
[ "minh-hai.nguyen@cgi.com" ]
minh-hai.nguyen@cgi.com
726b58283c50ceb00f786fc3da575fe4b1e69127
93750b67fa56aaf121316506c4d26759e5cfbe4e
/app/src/main/java/com/tentcoo/jgchat/utils/imagepicker/util/BitmapUtil.java
aa23aaece9a6e7abaab8c777ba019e9e5300c94e
[]
no_license
androidHarlan/JgChat
838c34698e64faa7e166967fdf4269bf39213593
a9990b8d1454ac40bf0e4fc679e5c577cbcaa89c
refs/heads/master
2020-03-10T10:14:31.776484
2018-04-13T07:37:26
2018-04-13T07:37:26
129,328,929
0
0
null
null
null
null
UTF-8
Java
false
false
3,273
java
package com.tentcoo.jgchat.utils.imagepicker.util; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.media.ExifInterface; import android.net.Uri; import android.provider.MediaStore; import java.io.File; import java.io.IOException; public class BitmapUtil { private BitmapUtil() { throw new UnsupportedOperationException("u can't instantiate me..."); } /** * 获取图片的旋转角度 * * @param path 图片绝对路径 * @return 图片的旋转角度 */ public static int getBitmapDegree(String path) { int degree = 0; try { // 从指定路径下读取图片,并获取其EXIF信息 ExifInterface exifInterface = new ExifInterface(path); // 获取图片的旋转信息 int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); switch (orientation) { case ExifInterface.ORIENTATION_ROTATE_90: degree = 90; break; case ExifInterface.ORIENTATION_ROTATE_180: degree = 180; break; case ExifInterface.ORIENTATION_ROTATE_270: degree = 270; break; } } catch (IOException e) { e.printStackTrace(); } return degree; } /** * 将图片按照指定的角度进行旋转 * * @param bitmap 需要旋转的图片 * @param degree 指定的旋转角度 * @return 旋转后的图片 */ public static Bitmap rotateBitmapByDegree(Bitmap bitmap, int degree) { // 根据旋转角度,生成旋转矩阵 Matrix matrix = new Matrix(); matrix.postRotate(degree); // 将原始图片按照旋转矩阵进行旋转,并得到新的图片 Bitmap newBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); if (!bitmap.isRecycled()) { bitmap.recycle(); } return newBitmap; } /** * 获取我们需要的整理过旋转角度的Uri * @param activity 上下文环境 * @param path 路径 * @return 正常的Uri */ public static Uri getRotatedUri(Activity activity, String path){ int degree = BitmapUtil.getBitmapDegree(path); if (degree != 0){ Bitmap bitmap = BitmapFactory.decodeFile(path); Bitmap newBitmap = BitmapUtil.rotateBitmapByDegree(bitmap,degree); return Uri.parse(MediaStore.Images.Media.insertImage(activity.getContentResolver(),newBitmap,null,null)); }else{ return Uri.fromFile(new File(path)); } } /** * 将图片按照指定的角度进行旋转 * * @param path 需要旋转的图片的路径 * @param degree 指定的旋转角度 * @return 旋转后的图片 */ public static Bitmap rotateBitmapByDegree(String path, int degree) { Bitmap bitmap = BitmapFactory.decodeFile(path); return rotateBitmapByDegree(bitmap,degree); } }
[ "1986821027@qq.com" ]
1986821027@qq.com
2add628d41089a4c94ced281bf6f8a629372d2ef
91c9cedc8ea067bdb719538031c7e4bf8d8cf6a3
/src/WhackAMole.java
0f8ff5fbe464909b53c506ff315db8ff891a8d33
[]
no_license
TJHL/Level_1
8cc0148ea5efa71e4413d75a3d1eb3a63279a3af
2f9ad3dbf0888e2a97d1376e10f1f061679093b8
refs/heads/master
2020-04-06T12:14:32.820204
2016-10-01T18:59:01
2016-10-01T18:59:01
36,262,585
0
0
null
null
null
null
UTF-8
Java
false
false
663
java
import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public class WhackAMole { WhackAMole() { JFrame frame = new JFrame(); JPanel panel = new JPanel(); JButton button = new JButton(); JButton buddon = new JButton(); JButton bubbon = new JButton(); JButton butdon = new JButton(); JButton butbon = new JButton(); JButton buton = new JButton(); JLabel label = new JLabel(); frame.add(panel); panel.add(button); panel.add(buddon); panel.add(bubbon); panel.add(butdon); panel.add(butbon); panel.add(buton); panel.add(label); frame.pack(); frame.setVisible(true); } }
[ "league@WTS5.attlocal.net" ]
league@WTS5.attlocal.net
46aee9f2e4a730b76e7c2c537fc51debf1aed050
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_ed46e46ed0605b9a36aea071bbfaa66bd00c191d/StringUtils/30_ed46e46ed0605b9a36aea071bbfaa66bd00c191d_StringUtils_t.java
016945a972296832834553287918a04018ab96c4
[]
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
2,443
java
/** * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved * * The contents of this file are subject to the terms * of the Common Development and Distribution License * (the License). You may not use this file except in * compliance with the License. * * You can obtain a copy of the License at * https://opensso.dev.java.net/public/CDDLv1.0.html or * opensso/legal/CDDLv1.0.txt * See the License for the specific language governing * permission and limitations under the License. * * When distributing Covered Code, include this CDDL * Header Notice in each file and include the License file * at opensso/legal/CDDLv1.0.txt. * If applicable, add the following below the CDDL Header, * with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * $Id: StringUtils.java,v 1.2 2009-11-11 17:14:52 huacui Exp $ * */ package com.sun.identity.shared; /** * This class provides string related helper methods. */ public class StringUtils { // ampersand character '&' public static final String AMPERSAND = "&"; // HTML escape code for character '&' public static final String ESCAPE_AMPERSAND = "&#38;"; // character '|' used as property value delimiter public static final String PROPERTY_VALUE_DELIMITER = "|"; // HTML escape code for character '|' public static final String ESCAPE_DELIMITER = "&#124;"; private StringUtils() { } /** * Returns substituted string. * * @param orig Original string. * @param pattern String substitution matching pattern. * @param str Substituting string. * @return substituted string. */ public static String strReplaceAll(String orig, String pattern, String str){ return orig.replaceAll(pattern, str.replaceAll("[$]", "\\\\\\$")); } /** * Returns special character escaped string. * * @param value original string. * @return special character escaped string. */ public static String getEscapedValue(String value) { if (value != null) { return value.replaceAll(AMPERSAND, ESCAPE_AMPERSAND).replaceAll( "\\" + PROPERTY_VALUE_DELIMITER, ESCAPE_DELIMITER); } return null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2e84f2b8817056ab27133eaf6d21770479280a33
71b919749069accbdbfc35f7dba703dd5c5780a6
/learn-spring-example/small-spring-step-09/src/main/java/org/learn/spring/beans/factory/support/DefaultSingletonBeanRegistry.java
db2ac86b408d5e9ef19b178bee9eb943e73e4471
[ "MIT" ]
permissive
xp-zhao/learn-java
489f811acf20649b773032a6831fbfc72dc4c418
108dcf1e4e02ae76bfd09e7c2608a38a1216685c
refs/heads/master
2023-09-01T03:07:23.795372
2023-08-25T08:28:59
2023-08-25T08:28:59
118,060,929
2
0
MIT
2022-06-21T04:16:08
2018-01-19T01:39:11
Java
UTF-8
Java
false
false
1,683
java
package org.learn.spring.beans.factory.support; import java.util.HashMap; import java.util.Map; import java.util.Set; import org.learn.spring.beans.BeansException; import org.learn.spring.beans.factory.DisposableBean; import org.learn.spring.beans.factory.config.SingletonBeanRegistry; /** * 默认单例接口实现 * * @author zhaoxiaoping * @date 2022-1-4 */ public class DefaultSingletonBeanRegistry implements SingletonBeanRegistry { protected static final Object NULL_OBJECT = new Object(); private Map<String, Object> singletonObjects = new HashMap<>(); private final Map<String, DisposableBean> disposableBeans = new HashMap<>(); @Override public Object getSingleton(String beanName) { return singletonObjects.get(beanName); } /** * 添加单例对象 * * @param beanName bean的名字 * @param singletonObject 单例对象 */ protected void addSingleton(String beanName, Object singletonObject) { singletonObjects.put(beanName, singletonObject); } public void registerDisposableBean(String beanName, DisposableBean bean) { disposableBeans.put(beanName, bean); } public void destroySingletons() { Set<String> keySet = this.disposableBeans.keySet(); Object[] disposableBeanNames = keySet.toArray(); for (int i = disposableBeanNames.length - 1; i >= 0; i--) { Object beanName = disposableBeanNames[i]; DisposableBean disposableBean = disposableBeans.remove(beanName); try { disposableBean.destroy(); } catch (Exception e) { throw new BeansException( "Destroy method on bean with name '" + beanName + "' threw an exception", e); } } } }
[ "13688396271@163.com" ]
13688396271@163.com
ae5b9dea7f9765afbf5e94b665455d1d0701fbf6
a9a40b4a5c2400e64468278a5ba5468e39829bda
/java/src/data_structures/sort/miniapp/algorithm/miniapp/sortalgorithms/countingsort/CountingFrame.java
01e637cf8b827edcc89fc2e3ba30cfd214433e91
[]
no_license
vuquangtin/algorithm
9a7607817b3aff7fb085f35a2fc4bce1d40ccda9
0c33212a66bdeb6513939302d85e7cda9ae445be
refs/heads/master
2022-12-20T23:43:35.508246
2020-09-28T07:19:22
2020-09-28T07:19:22
290,949,654
0
0
null
null
null
null
UTF-8
Java
false
false
442
java
package algorithm.miniapp.sortalgorithms.countingsort; import algorithm.miniapp.abstraction.SortVisual; import algorithm.miniapp.view.manoeuvre.AlgoFrame; public class CountingFrame implements SortVisual { @Override public String getCnName() { return "计数排序"; } @Override public void sort(AlgoFrame frame) { } @Override public String methodName() { return "Counting Sort"; } }
[ "tinvuquang@admicro.vn" ]
tinvuquang@admicro.vn
a60db319d7cca33dd080ec7a21790483ec07f612
73308ecf567af9e5f4ef8d5ff10f5e9a71e81709
/en62657087/src/main/java/com/example/en62657087/En62657087Application.java
1d9123594a59fafe95b1831cdbed83c319744f9d
[]
no_license
yukihane/stackoverflow-qa
bfaf371e3c61919492e2084ed4c65f33323d7231
ba5e6a0d51f5ecfa80bb149456adea49de1bf6fb
refs/heads/main
2023-08-03T06:54:32.086724
2023-07-26T20:02:07
2023-07-26T20:02:07
194,699,870
3
3
null
2023-03-02T23:37:45
2019-07-01T15:34:08
Java
UTF-8
Java
false
false
323
java
package com.example.en62657087; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class En62657087Application { public static void main(String[] args) { SpringApplication.run(En62657087Application.class, args); } }
[ "yukihane.feather@gmail.com" ]
yukihane.feather@gmail.com
488c76b7c1d7d7f4e728995f8a1eef7745e73245
329b2cb3c91a0c953458efd253c4fcdce6f539c4
/graphsdk/src/main/java/com/microsoft/graph/extensions/IWorkbookTableRowAddRequest.java
23716254fd563687a938a9b6a42808143c99f0cc
[ "MIT" ]
permissive
sbolotovms/msgraph-sdk-android
255eeddf19c1b15f04ee3b1549f0cae70d561fdd
1320795ba1c0b5eb36ef8252b73799d15fc46ba1
refs/heads/master
2021-01-20T05:09:00.148739
2017-04-28T23:20:23
2017-04-28T23:20:23
89,751,501
1
0
null
2017-04-28T23:20:37
2017-04-28T23:20:37
null
UTF-8
Java
false
false
919
java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.extensions; import com.microsoft.graph.concurrency.*; import com.microsoft.graph.core.*; import com.microsoft.graph.extensions.*; import com.microsoft.graph.http.*; import com.microsoft.graph.generated.*; import com.microsoft.graph.options.*; import com.microsoft.graph.serializer.*; import java.util.Arrays; import java.util.List; // This file is available for extending, afterwards please submit a pull request. /** * The interface for the Workbook Table Row Add Request. */ public interface IWorkbookTableRowAddRequest extends IBaseWorkbookTableRowAddRequest { }
[ "brianmel@microsoft.com" ]
brianmel@microsoft.com
c4c8a1f79b28e6ac3ac94d609562d56016380029
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/kotlin/reflect/full/IllegalCallableAccessException.java
8f7dbd3d7e60336f012ad0d96aa617b91c209b33
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
933
java
package kotlin.reflect.full; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; @Metadata(bv = {1, 0, 1}, d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0007\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004¨\u0006\u0005"}, d2 = {"Lkotlin/reflect/full/IllegalCallableAccessException;", "Lkotlin/reflect/IllegalCallableAccessException;", "cause", "Ljava/lang/IllegalAccessException;", "(Ljava/lang/IllegalAccessException;)V", "kotlin-reflection"}, k = 1, mv = {1, 1, 5}) /* compiled from: exceptions.kt */ public final class IllegalCallableAccessException extends kotlin.reflect.IllegalCallableAccessException { public IllegalCallableAccessException(IllegalAccessException illegalAccessException) { Intrinsics.m26847b(illegalAccessException, "cause"); super(illegalAccessException); } }
[ "mi.arevalo10@uniandes.edu.co" ]
mi.arevalo10@uniandes.edu.co
088e18f626080f65a801a3aa3e0397369853a7e4
5cefafafa516d374fd600caa54956a1de7e4ce7d
/oasis/web/ePolicy/wsPolicy/test/src/com/delphi_tech/ows/account/BillingActivityInformationType.java
abf06f4fbb9d12c13c257eb05072d9d840e0f67a
[]
no_license
TrellixVulnTeam/demo_L223
18c641c1d842c5c6a47e949595b5f507daa4aa55
87c9ece01ebdd918343ff0c119e9c462ad069a81
refs/heads/master
2023-03-16T00:32:08.023444
2019-04-08T15:46:48
2019-04-08T15:46:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,698
java
package com.delphi_tech.ows.account; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for BillingActivityInformationType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="BillingActivityInformationType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="BillingActivityDate" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="BillingActivityId" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="DueDate" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="ActivityDescription" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="BillingActivityAmount" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="BillingActivityOpenBalance" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BillingActivityInformationType", propOrder = { "billingActivityDate", "billingActivityId", "dueDate", "activityDescription", "billingActivityAmount", "billingActivityOpenBalance" }) public class BillingActivityInformationType implements Serializable { private final static long serialVersionUID = 1L; @XmlElement(name = "BillingActivityDate", required = true) protected String billingActivityDate; @XmlElement(name = "BillingActivityId", required = true) protected String billingActivityId; @XmlElement(name = "DueDate", required = true) protected String dueDate; @XmlElement(name = "ActivityDescription", required = true) protected String activityDescription; @XmlElement(name = "BillingActivityAmount", required = true) protected String billingActivityAmount; @XmlElement(name = "BillingActivityOpenBalance", required = true) protected String billingActivityOpenBalance; /** * Gets the value of the billingActivityDate property. * * @return * possible object is * {@link String } * */ public String getBillingActivityDate() { return billingActivityDate; } /** * Sets the value of the billingActivityDate property. * * @param value * allowed object is * {@link String } * */ public void setBillingActivityDate(String value) { this.billingActivityDate = value; } /** * Gets the value of the billingActivityId property. * * @return * possible object is * {@link String } * */ public String getBillingActivityId() { return billingActivityId; } /** * Sets the value of the billingActivityId property. * * @param value * allowed object is * {@link String } * */ public void setBillingActivityId(String value) { this.billingActivityId = value; } /** * Gets the value of the dueDate property. * * @return * possible object is * {@link String } * */ public String getDueDate() { return dueDate; } /** * Sets the value of the dueDate property. * * @param value * allowed object is * {@link String } * */ public void setDueDate(String value) { this.dueDate = value; } /** * Gets the value of the activityDescription property. * * @return * possible object is * {@link String } * */ public String getActivityDescription() { return activityDescription; } /** * Sets the value of the activityDescription property. * * @param value * allowed object is * {@link String } * */ public void setActivityDescription(String value) { this.activityDescription = value; } /** * Gets the value of the billingActivityAmount property. * * @return * possible object is * {@link String } * */ public String getBillingActivityAmount() { return billingActivityAmount; } /** * Sets the value of the billingActivityAmount property. * * @param value * allowed object is * {@link String } * */ public void setBillingActivityAmount(String value) { this.billingActivityAmount = value; } /** * Gets the value of the billingActivityOpenBalance property. * * @return * possible object is * {@link String } * */ public String getBillingActivityOpenBalance() { return billingActivityOpenBalance; } /** * Sets the value of the billingActivityOpenBalance property. * * @param value * allowed object is * {@link String } * */ public void setBillingActivityOpenBalance(String value) { this.billingActivityOpenBalance = value; } }
[ "athidevwork@gmail.com" ]
athidevwork@gmail.com
db86c7354ef3d56238044ee6af594c6860c96029
896683aaf6dd5d4c092175a2141a0f15404fcd38
/JavaPracticeGit/src/thread10_synchronized/Service.java
e52513be126052551614c349aea83b20d3f9e04b
[]
no_license
WoodZzzzz/java
3d776d35ff81f681c8a2d63c78a816de976b560e
26d68157636a0c51303eb6417fce0f932d97a4f9
refs/heads/master
2020-03-08T07:25:03.830889
2018-08-31T10:59:26
2018-08-31T10:59:26
127,993,812
1
0
null
null
null
null
UTF-8
Java
false
false
606
java
package thread10_synchronized; public class Service { private String anyString = new String(); public void a() { try { synchronized (anyString) { System.out.println(Thread.currentThread().getName() + " a begin"); Thread.sleep(3000); System.out.println(Thread.currentThread().getName() + " a end"); } } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public synchronized void b() { System.out.println(Thread.currentThread().getName() + " b begin"); System.out.println(Thread.currentThread().getName() + " b end"); } }
[ "772005736@qq.com" ]
772005736@qq.com
be34faaad090aedab6ccbb73359be903b48c5f34
f9450dc88cbd160e47895f9f0bad0932aa81c7b3
/src/java/main/org/apache/zookeeper/StatsTrack.java
4950926790790bd9f4e6d956de8fae2951216f43
[ "Apache-2.0" ]
permissive
2395383177/zookeeper-release-3.4.6
5e44825ea994597cd9264c0879742d9d59b14d32
cb54a6326cf56459e76282ade0a47ffd5715b96f
refs/heads/master
2022-03-18T15:18:56.699663
2019-12-01T03:03:44
2019-12-01T03:03:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,801
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.zookeeper; /** * a class that represents the stats associated with quotas * 数据长度的StateTrack */ public class StatsTrack { private int count; private long bytes; private String countStr = "count"; private String byteStr = "bytes"; /** * a default constructor for * stats */ public StatsTrack() { this(null); } /** * the stat string should be of the form count=int,bytes=long * if stats is called with null the count and bytes are initialized * to -1. * @param stats the stat string to be intialized with */ public StatsTrack(String stats) { if (stats == null) { stats = "count=-1,bytes=-1"; } String[] split = stats.split(","); if (split.length != 2) { throw new IllegalArgumentException("invalid string " + stats); } count = Integer.parseInt(split[0].split("=")[1]); bytes = Long.parseLong(split[1].split("=")[1]); } /** * get the count of nodes allowed as part of quota * * @return the count as part of this string */ public int getCount() { return this.count; } /** * set the count for this stat tracker. * * @param count * the count to set with */ public void setCount(int count) { this.count = count; } /** * get the count of bytes allowed as part of quota * * @return the bytes as part of this string */ public long getBytes() { return this.bytes; } /** * set teh bytes for this stat tracker. * * @param bytes * the bytes to set with */ public void setBytes(long bytes) { this.bytes = bytes; } @Override /* * returns the string that maps to this stat tracking. */ public String toString() { return countStr + "=" + count + "," + byteStr + "=" + bytes; } }
[ "chenhaiyang@ruubypay.com" ]
chenhaiyang@ruubypay.com
45c511738bb4fa2605fe4828766e591520ebf68c
43a7a8a3a8e0bd59640ed4970990fc9bbb845730
/martus-common/source/org/martus/common/fieldspec/SearchFieldTreeModel.java
7a477bd6209c0961e90860415c15f2ade267f6e4
[]
no_license
benetech/Martus-Project
c992d1b847e1091085407f31bb61b34060f24c13
b454387d8ecdd3245cd17ead06184a4cdd3c7234
refs/heads/master
2021-01-17T11:34:31.482994
2017-09-27T18:14:11
2017-09-27T18:14:11
49,678,622
17
13
null
null
null
null
UTF-8
Java
false
false
2,015
java
/* The Martus(tm) free, social justice documentation and monitoring software. Copyright (C) 2006-2007, Beneficent Technology, Inc. (The Benetech Initiative). Martus 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 with the additions and exceptions described in the accompanying Martus license file entitled "license.txt". It is distributed WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, including warranties of fitness of purpose or merchantability. See the accompanying Martus License and GPL license for more details on the required license terms for this software. 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. */ package org.martus.common.fieldspec; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; public class SearchFieldTreeModel extends DefaultTreeModel { public SearchFieldTreeModel(TreeNode rootNode) { super(rootNode); } public TreePath findObject(TreePath pathToStartSearch, String code) { DefaultMutableTreeNode nodeToSearch = (DefaultMutableTreeNode)pathToStartSearch.getLastPathComponent(); if(nodeToSearch.getChildCount() == 0) { SearchableFieldChoiceItem item = (SearchableFieldChoiceItem)nodeToSearch.getUserObject(); if(item != null && item.getCode().equals(code)) return pathToStartSearch; } else { for(int i = 0; i < nodeToSearch.getChildCount(); ++i) { TreeNode thisChild = nodeToSearch.getChildAt(i); TreePath childPath = pathToStartSearch.pathByAddingChild(thisChild); TreePath found = findObject(childPath, code); if(found != null) return found; } } return null; } }
[ "charlesl@benetech.org" ]
charlesl@benetech.org
b833e276476d8ae77d2b43c54b1837c8a415901f
21bcd1da03415fec0a4f3fa7287f250df1d14051
/sources/kotlin/p214b1/p215t/C6085q.java
377babe067669786f313103edc5de34c10c402e5
[]
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
245
java
package kotlin.p214b1.p215t; import kotlin.C6101i; /* renamed from: kotlin.b1.t.q */ /* compiled from: Functions.kt */ public interface C6085q<P1, P2, P3, R> extends C6101i<R> { /* renamed from: b */ R mo24963b(P1 p1, P2 p2, P3 p3); }
[ "zsolimana@uaedomain.local" ]
zsolimana@uaedomain.local
8798d68330e5203f407cd748a5815273fccb78d6
571bbd48c8fad5e4e35c25a43b6ace378b99715a
/src/main/java/org/ml4j/tensor/dl4j/DL4JTensorOperations.java
a3884ff3157bfd102d2d7380500f39868f026d44
[ "Apache-2.0" ]
permissive
michaellavelle/ml4j-tensors-api
9020ab52569b8f7067abe52735357ff50417ae83
65499c3ce49a0f57870f81b53d9f26bbe90ba859
refs/heads/main
2023-06-17T17:43:33.824202
2021-07-12T20:26:25
2021-07-12T20:26:25
309,573,645
0
0
Apache-2.0
2020-11-03T04:33:42
2020-11-03T04:33:41
null
UTF-8
Java
false
false
378
java
package org.ml4j.tensor.dl4j; import org.jvmpy.symbolictensors.Operatable; import org.jvmpy.symbolictensors.Size; import org.ml4j.tensor.TensorOperations; import org.nd4j.linalg.api.ndarray.INDArray; public interface DL4JTensorOperations extends TensorOperations<DL4JTensorOperations>, Operatable<DL4JTensorOperations, Size, DL4JTensorOperations> { INDArray getNDArray(); }
[ "michael@lavelle.name" ]
michael@lavelle.name
6bdca095e5d2c05a8c63cc1c8c6d631058ba6bc7
53be90612030c7a95ad59b31d6d1341b06eeb70d
/blogserver/src/main/java/org/sang/controller/admin/AdminController.java
0d2763fd5c89021bf20fb306437d53d0b859a63b
[ "MIT" ]
permissive
kfoolish/VBlog
4a7a91277885be08cc99abf5198f603f1917fb77
46bfc59576257a9afda633296ec7d6edc906ab1c
refs/heads/dev
2020-08-22T20:47:51.456603
2019-11-05T14:14:40
2019-11-05T14:14:40
216,474,535
1
0
MIT
2019-11-05T15:08:00
2019-10-21T04:01:43
null
UTF-8
Java
false
false
1,622
java
package org.sang.controller.admin; import org.sang.bean.Article; import org.sang.bean.RespBean; import org.sang.service.ArticleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 超级管理员专属Controller */ @RestController @RequestMapping("/admin") public class AdminController { @Autowired ArticleService articleService; @RequestMapping(value = "/article/all", method = RequestMethod.GET) public Map<String, Object> getArticleByStateByAdmin(@RequestParam(value = "page", defaultValue = "1") Integer page, @RequestParam(value = "count", defaultValue = "6") Integer count, String keywords) { List<Article> articles = articleService.getArticleByState(-2, page, count, keywords); Map<String, Object> map = new HashMap<>(); map.put("articles", articles); map.put("totalCount", articleService.getArticleCountByState(1, null, keywords)); return map; } @RequestMapping(value = "/article/dustbin", method = RequestMethod.PUT) public RespBean updateArticleState(Long[] aids, Integer state) { if (articleService.updateArticleState(aids, state) == aids.length) { return new RespBean("success", "删除成功!"); } return new RespBean("error", "删除失败!"); } }
[ "wangsong0210@gmail.com" ]
wangsong0210@gmail.com
3547933740894cd398fdf4987133ca7dca6b2164
894927bf0fc36549955be6fb781974c12bb449eb
/osp/glossary/tool-lib/src/java/org/theospi/portfolio/help/control/GlossaryTag.java
46b03257307cf3d0d3ee2c8bd6c9021a75b65863
[ "LicenseRef-scancode-generic-cla", "ECL-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
sadupally/Dev
cd32fa3b753e8d20dd80e794618a8e97d1ff1c79
ead9de3993b7a805199ac254c6fa99d3dda48adf
refs/heads/master
2020-03-24T08:15:12.732481
2018-07-27T12:54:29
2018-07-27T12:54:29
142,589,852
0
0
ECL-2.0
2018-07-27T14:49:51
2018-07-27T14:49:50
null
UTF-8
Java
false
false
5,703
java
/********************************************************************************** * $URL:https://source.sakaiproject.org/svn/osp/trunk/glossary/tool-lib/src/java/org/theospi/portfolio/help/control/GlossaryTag.java $ * $Id:GlossaryTag.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $ *********************************************************************************** * * Copyright (c) 2005, 2006, 2007, 2008 The Sakai Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ECL-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.theospi.portfolio.help.control; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.sakaiproject.component.cover.ComponentManager; import org.sakaiproject.component.cover.ServerConfigurationService; import org.sakaiproject.metaobj.shared.model.OspException; import org.sakaiproject.tool.api.Tool; import org.sakaiproject.tool.cover.SessionManager; import org.theospi.portfolio.help.model.GlossaryEntry; import org.theospi.portfolio.help.model.HelpManager; import org.theospi.portfolio.help.helper.HelpTagHelper; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.tagext.BodyContent; import javax.servlet.jsp.tagext.BodyTagSupport; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.util.Collection; import java.util.HashSet; import java.util.Set; /** * Matches keywords in the body to those in the glossary, * and places links around the keywords which link the glossary entries. * The glossary entry text is also available via a hover. * Linking or hovering can be turned on/off using the link and hover attributes * Linking is on by default, hover is off be default. * Use true/false as the attributes values to modify these from the defaults. * Hovering requires the following two lines be placed in the jsp, making sure * the path to the eport.js file is correct: <br/><br/> * <p/> * &lt;script language="JavaScript" src="../js/eport.js"&gt;&lt;/script&gt; <br/> * &lt;div id="tooltip" style="position:absolute;visibility:hidden;border:1px solid black;font-size:10px;layer-background-color:lightyellow;background-color:lightyellow;padding:1px"&gt;&lt;/div&gt; <br/> */ public class GlossaryTag extends BodyTagSupport { private boolean firstOnly = false; private boolean hover = false; private boolean link = true; private String glossaryLink; protected final Log logger = LogFactory.getLog(getClass()); private static final String TERMS_TAG = "org.theospi.portfolio.help.control.GlossaryTag.terms"; /** * Default processing of the start tag returning EVAL_BODY_BUFFERED. * * @return EVAL_BODY_BUFFERED * @throws javax.servlet.jsp.JspException if an error occurred while processing this tag * @see javax.servlet.jsp.tagext.BodyTag#doStartTag */ public int doStartTag() throws JspException { try { pageContext.getOut().write("" + "<div id=\"tooltip\" style=\"position:absolute;visibility:hidden;" + "border:1px solid black;font-size:10px;layer-background-color:lightyellow;" + "background-color:lightyellow;padding:1px\"></div>" + "<script type=\"text/javascript\" src=\"/osp-common-tool/js/eport.js\"></script>"); } catch (IOException e) { logger.error("", e); throw new OspException(e); } return super.doStartTag(); } public int doAfterBody() throws JspException { BodyContent body = getBodyContent(); JspWriter out = body.getEnclosingWriter(); Reader reader = body.getReader(); Set termSet = getTerms(); GlossaryEntry[] terms = new GlossaryEntry[termSet.size()]; terms = (GlossaryEntry[]) termSet.toArray(terms); try { HelpTagHelper.renderHelp(reader, body.getBufferSize() - body.getRemaining(), out, terms, firstOnly, hover, link); } catch (IOException ioe) { logger.error(ioe.getMessage(), ioe); } finally { body.clearBody(); // Clear for next evaluation } return (SKIP_BODY); } protected Set getTerms() { if (pageContext.getAttribute(TERMS_TAG) != null) { return (Set)pageContext.getAttribute(TERMS_TAG); } Set returned = getHelpManager().getSortedWorksiteTerms(); pageContext.setAttribute(TERMS_TAG, returned); return returned; } public HelpManager getHelpManager() { return (HelpManager) ComponentManager.getInstance().get("helpManager"); } public boolean isHover() { return hover; } public void setHover(boolean hover) { this.hover = hover; } public boolean isLink() { return link; } public void setLink(boolean link) { this.link = link; } public String getGlossaryLink() { return glossaryLink; } public void setGlossaryLink(String glossaryLink) { this.glossaryLink = glossaryLink; } public boolean isFirstOnly() { return firstOnly; } public void setFirstOnly(boolean firstOnly) { this.firstOnly = firstOnly; } }
[ "UdcsWeb@unisa.ac.za" ]
UdcsWeb@unisa.ac.za
518a258ea2ef6e0872f6b4dd092848e251d42b41
bacde5bb0effd64aa061a729d73e07642d876368
/lamthem/BiBook/code/src/vn/vvn/bibook/item/NewScrollView.java
7caa7f32d0b5f185c416d8e12bd0551231bb6ca4
[]
no_license
fordream/store-vnp
fe10d74acd1a780fb88f90e4854d15ce44ecb68c
6ca37dd4a69a63ea65d601aad695150e70f8d603
refs/heads/master
2020-12-02T15:05:14.994903
2015-10-23T13:52:51
2015-10-23T13:52:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,383
java
package vn.vvn.bibook.item; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.widget.ScrollView; public class NewScrollView extends ScrollView { private boolean mIsBottom; private ScrollViewListener scrollViewListener = null; public NewScrollView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); mIsBottom = false; } public NewScrollView(Context context, AttributeSet attrs) { super(context, attrs); mIsBottom = false; } public NewScrollView(Context context) { super(context); mIsBottom = false; } public void setScrollViewListener(ScrollViewListener scrollViewListener) { this.scrollViewListener = scrollViewListener; } @Override protected void onScrollChanged(int l, int t, int oldl, int oldt) { if (!mIsBottom) { View view = (View) getChildAt(getChildCount() - 1); int diff = (view.getBottom() - (getHeight() + getScrollY()));// Calculate // the // scrolldiff if (diff == 0) { mIsBottom = true; } } super.onScrollChanged(l, t, oldl, oldt); if (scrollViewListener != null) { scrollViewListener.onScrollChanged(t); } } public boolean ismIsBottom() { return mIsBottom; } public void setmIsBottom(boolean mIsBottom) { this.mIsBottom = mIsBottom; } }
[ "truongvv@atmarkcafe.org" ]
truongvv@atmarkcafe.org
3a4a9295ae254c86848acedff79d086ea75ce43a
198b4a318085ab759f900952b230729246abbd5d
/src/main/java/com/cat/netty/talk/Util.java
97763e68c7344ae3ac00ab331ef69c0b1da7a79e
[]
no_license
zhsyk34/net
9a0cc8c3b17a0d3189acfd4d5054e53ebcc69059
46af8b49397e66cdecb567862f417558eb99ae13
refs/heads/master
2020-05-29T08:52:53.977840
2016-10-08T10:06:19
2016-10-08T10:06:19
69,581,618
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
package com.cat.netty.talk; import io.netty.buffer.ByteBuf; public class Util { public static void read(Object object) { if (object instanceof ByteBuf) { ByteBuf buf = (ByteBuf) object; /*while (buf.isReadable()) { System.out.print((char) buf.readByte()); } buf.readerIndex(0);*/ System.out.println(buf.readableBytes()); for (int i = 0; i < buf.readableBytes(); i++) { System.out.print((char) buf.getByte(i)); } } } }
[ "zhsy1985@sina.com" ]
zhsy1985@sina.com
517be8f3f6a695c942174b580fd3647238ebf73a
656ce78b903ef3426f8f1ecdaee57217f9fbc40e
/src/org/spongycastle/jcajce/provider/digest/SHA384$HashMac.java
9915dd79143e608b51cf26918fe7df1f38f0e147
[]
no_license
zhuharev/periscope-android-source
51bce2c1b0b356718be207789c0b84acf1e7e201
637ab941ed6352845900b9d465b8e302146b3f8f
refs/heads/master
2021-01-10T01:47:19.177515
2015-12-25T16:51:27
2015-12-25T16:51:27
48,586,306
8
10
null
null
null
null
UTF-8
Java
false
false
594
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package org.spongycastle.jcajce.provider.digest; import org.spongycastle.crypto.digests.SHA384Digest; import org.spongycastle.crypto.macs.HMac; import org.spongycastle.jcajce.provider.symmetric.util.BaseMac; // Referenced classes of package org.spongycastle.jcajce.provider.digest: // SHA384 public static class extends BaseMac { public () { super(new HMac(new SHA384Digest())); } }
[ "hostmaster@zhuharev.ru" ]
hostmaster@zhuharev.ru