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
9138cc2e16b30c4754ee91e96cd0fd5650a2e76d
4dbd15a5a26643720631aac5802f841f3cf84ed0
/src/main/java/com/jasper/algs/leetcode/dp/qu0198/solu/Solution.java
4e494cc0c5e9381589b39f7ba25bc91d4b9d0c68
[]
no_license
guoyufu-study/Hello-algs-Leetcode
f42d19de702f7ec3f6b39f97ef39932d2dd639ea
0ef1f84d938106a2f4a608f4dc235b95ef6f54ec
refs/heads/master
2021-01-15T07:16:37.569724
2020-11-11T18:11:35
2020-11-11T18:11:35
242,909,007
0
0
null
2020-11-11T18:16:14
2020-02-25T04:24:48
Java
UTF-8
Java
false
false
167
java
package com.jasper.algs.leetcode.dp.qu0198.solu; /** * 0198.打家劫舍 * * <p> 4刷 */ class Solution { public int rob(int[] nums) { return 0; } }
[ "guoyufu_study@163.com" ]
guoyufu_study@163.com
a3839c34e2c0382cb950c00e6717bc9389a99e95
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/pluginsdk/model/o$b.java
d29445c644d7a6b6ff666f64ee9b83fb3a996916
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
243
java
package com.tencent.mm.pluginsdk.model; class o$b { public String classname; public String qzm; private o$b() { this.classname = ""; this.qzm = ""; } /* synthetic */ o$b(byte b) { this(); } }
[ "707194831@qq.com" ]
707194831@qq.com
c6203ccd3aaf0b24b2ff5125d0a32f9116bf08c2
cdee2fd05c4c309f219d304497b0379854ccbdff
/Sesion-08/Reto-02/reto02/src/main/java/org/bedu/testing/demo/monitoreo/controllers/ColoniaController.java
4d895fd98432d01a45beedcc44ad90d773a8cae6
[]
no_license
PerlaGCastillo/C2-Java-Testing
bf2b75b828354e723e3eb71c7a367f44ecbfacb2
45ca4edc902e20f1fb9cbc03b4f3fcd4afa8e238
refs/heads/master
2020-11-26T02:06:42.575078
2019-11-18T14:10:13
2019-11-18T14:10:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,330
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package org.bedu.testing.demo.monitoreo.controllers; import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; import java.util.List; import org.bedu.testing.demo.monitoreo.entitys.Colonia; import org.bedu.testing.demo.monitoreo.services.ColoniaService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * * @author Fernando */ @RequestMapping(value = "/colonia", produces = APPLICATION_JSON_VALUE) @RestController public class ColoniaController { @Autowired private ColoniaService coloniaService; @GetMapping("") public Iterable<Colonia> obtenerTodasLasColonias() { return coloniaService.obtenerTodasLasColonias(); } @GetMapping("/{idEstado}/{idMunicipio}") public List<Colonia> obtenerTodasLasColonias(@PathVariable Long idMunicipio, @PathVariable Long idEstado) { return coloniaService.obtenerColoniasPorDelegacion(idMunicipio, idEstado); } }
[ "amonmar2000@hotmail.com" ]
amonmar2000@hotmail.com
967461df7f390f990d80bad179dc5b3857d3858c
66d2f94d0a75f1c2f59d3a6a02a5321fc71842a5
/test1/JavaGoldenAxeTest/src/infra/Sprite2.java
22474bbf293debdae4fec704043de70a861e2a23
[]
no_license
tiretrak/Java2DGoldenAxeGameTest
797aa1e961b7942e7ae7ba152b896f0b4f3953a6
6bc9373fa2d3d4cf7385d274d6bfe452a5b4748f
refs/heads/master
2023-02-13T08:27:19.426145
2021-01-13T00:02:11
2021-01-13T00:02:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,004
java
package infra; import infra.Collider.Type; import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.imageio.ImageIO; /** * * @author admin */ public class Sprite2 { public static boolean DRAW_COLLIDERS = true; private BufferedImage image; public int originX; public int originY; public List<Collider> colliders = new ArrayList<>(); public boolean flipped; public Sprite2(String res, int originX, int originY) { this.originX = originX; this.originY = originY; try { image = ImageIO.read(getClass().getResourceAsStream("/res/" + res + ".png")); } catch (IOException ex) { Logger.getLogger(Sprite2.class.getName()).log(Level.SEVERE, null, ex); System.exit(-1); } } public boolean isFlipped() { return flipped; } public void setFlipped(boolean flipped) { this.flipped = flipped; } public void draw(Graphics2D g, int x, int y) { if (flipped) { drawFlipped(g, x, y); } else { drawNormal(g, x, y); } } private void drawFlipped(Graphics2D g, int x, int y) { int sx = x - (image.getWidth() - originX); int sy = y - originY; int dx1 = sx + image.getWidth(); int dy1 = sy; int dx2 = sx; int dy2 = dy1 + image.getHeight(); int sx1 = 0; int sy1 = 0; int sx2 = image.getWidth(); int sy2 = image.getHeight(); g.drawImage(image, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null); if (DRAW_COLLIDERS) { colliders.forEach( collider -> { if (collider.type == Type.ATTACK) { g.setColor(Color.RED); } else { g.setColor(Color.BLUE); } // 00000000001111111111 image.width = 20 // 01234567890123456789 // ssssss x=14 width=6 // flippedColliderX = image.width - (x + width) int flippedColliderX = image.getWidth() - (collider.x + collider.width); g.drawRect(sx + flippedColliderX, sy + collider.y, collider.width, collider.height); }); } } private void drawNormal(Graphics2D g, int x, int y) { int sx = x - originX; int sy = y - originY; g.drawImage(image, sx, sy, null); if (DRAW_COLLIDERS) { colliders.forEach( collider -> { if (collider.type == Type.ATTACK) { g.setColor(Color.RED); } else { g.setColor(Color.BLUE); } g.drawRect(sx + collider.x, sy + collider.y, collider.width, collider.height); }); } } public void addCollider(Type type, int x, int y, int width, int height) { colliders.add(new Collider(type, x, y, width, height)); } private final Collider colliderTmp = new Collider(); public Collider getScreenSpaceCollider(int colliderIndex, int x, int y) { Collider collider = colliders.get(colliderIndex); if (!flipped) { int sx = x - originX; int sy = y - originY; colliderTmp.setBounds(sx + collider.x, sy + collider.y, collider.width, collider.height); } else { int sx = x - (image.getWidth() - originX); int sy = y - originY; int flippedColliderX = image.getWidth() - (collider.x + collider.width); colliderTmp.setBounds(sx + flippedColliderX, sy + collider.y, collider.width, collider.height); } colliderTmp.setType(collider.getType()); return colliderTmp; } public boolean collides(int bx, int by, Sprite2 attackSprite, int ax, int ay, Collider colliderResult) { for (int aci = 0; aci < attackSprite.colliders.size(); aci++) { Collider attack = attackSprite.getScreenSpaceCollider(aci, ax, ay); if (attack.type == Type.ATTACK) { for (int bci = 0; bci < colliders.size(); bci++) { Collider body = getScreenSpaceCollider(bci, bx, by); if (body.type == Type.BODY) { if (attack.intersects(body)) { colliderResult.setBounds(attack); colliderResult.setType(Type.ATTACK); return true; } } } } } return false; } }
[ "ono.leo@gmail.com" ]
ono.leo@gmail.com
56cba1d0041ffb1b1edcb203482631df551846ac
43eb759f66530923dfe1c6e191ec4f350c097bd9
/projects/commons-beanutils/src/main/java/org/apache/commons/beanutils/SuppressPropertiesBeanIntrospector.java
bd6b2cdca3e429c3f8259314fe2fd9dd2e820627
[ "LicenseRef-scancode-generic-cla", "Apache-2.0", "MIT" ]
permissive
hayasam/lightweight-effectiveness
fe4bd04f8816c6554e35c8c9fc8489c11fc8ce0b
f6ef4c98b8f572a86e42252686995b771e655f80
refs/heads/master
2023-08-17T01:51:46.351933
2020-09-03T07:38:35
2020-09-03T07:38:35
298,672,257
0
0
MIT
2023-09-08T15:33:03
2020-09-25T20:23:43
null
UTF-8
Java
false
false
3,712
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.commons.beanutils; import java.beans.IntrospectionException; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Set; /** * <p> * A specialized {@code BeanIntrospector} implementation which suppresses some properties. * </p> * <p> * An instance of this class is passed a set with the names of the properties it should * process. During introspection of a bean class it removes all these properties from the * {@link IntrospectionContext}. So effectively, properties added by a different * {@code BeanIntrospector} are removed again. * </p> * * @version $Id$ * @since 1.9.2 */ public class SuppressPropertiesBeanIntrospector implements BeanIntrospector { /** * A specialized instance which is configured to suppress the special {@code class} * properties of Java beans. Unintended access to the property {@code class} (which is * common to all Java objects) can be a security risk because it also allows access to * the class loader. Adding this instance as {@code BeanIntrospector} to an instance * of {@code PropertyUtilsBean} suppresses the {@code class} property; it can then no * longer be accessed. */ public static final SuppressPropertiesBeanIntrospector SUPPRESS_CLASS = new SuppressPropertiesBeanIntrospector(Collections.singleton("class")); /** A set with the names of the properties to be suppressed. */ private final Set<String> propertyNames; /** * Creates a new instance of {@code SuppressPropertiesBeanIntrospector} and sets the * names of the properties to be suppressed. * * @param propertiesToSuppress the names of the properties to be suppressed (must not * be <b>null</b>) * @throws IllegalArgumentException if the collection with property names is * <b>null</b> */ public SuppressPropertiesBeanIntrospector(final Collection<String> propertiesToSuppress) { if (propertiesToSuppress == null) { throw new IllegalArgumentException("Property names must not be null!"); } propertyNames = Collections.unmodifiableSet(new HashSet<String>( propertiesToSuppress)); } /** * Returns a (unmodifiable) set with the names of the properties which are suppressed * by this {@code BeanIntrospector}. * * @return a set with the names of the suppressed properties */ public Set<String> getSuppressedProperties() { return propertyNames; } /** * {@inheritDoc} This implementation removes all properties from the given context it * is configured for. */ public void introspect(final IntrospectionContext icontext) throws IntrospectionException { for (final String property : getSuppressedProperties()) { icontext.removePropertyDescriptor(property); } } }
[ "granogiovanni90@gmail.com" ]
granogiovanni90@gmail.com
7ebe9124f0ccc63436ccb4acabe2955275d2feff
2c6a3d4d9da8170e67a0285e574f1beced13b6d9
/Leetcode/src/Chapter14_深度搜索和广度搜索/Q889_根据前序和后序遍历构造二叉树/Solution.java
08e3a1ad0646bd86b355a6cd65e4fa5831264993
[]
no_license
zhengruyi/PracticingCode
08b80455d4df7041565b87b9fbff33c5b34c1e0e
0a2c5a33d487c9e2588d7956d46a578cf4716374
refs/heads/master
2023-04-12T12:32:20.192159
2021-04-25T14:38:19
2021-04-25T14:38:19
302,980,051
0
0
null
null
null
null
UTF-8
Java
false
false
1,734
java
package Chapter14_深度搜索和广度搜索.Q889_根据前序和后序遍历构造二叉树; /** * @author Ruyi ZHENG * @version 1.00 * @time 09/01/2021 23:42 **/ public class Solution { public TreeNode constructFromPrePost(int[] pre, int[] post) { return construct(pre,post,0,0,pre.length); } /** * 由于没有中序遍历序列,所以无法确定唯一的二叉树,这里采用在找到左子树的根然后在后续遍历中 * 找到对应节点来分割序列,采用数组长度来控制返回的是null还是一个节点 * @param pre * @param post * @param first * @param last * @param length * @return */ public TreeNode construct(int[] pre, int[] post, int first, int last, int length){ if(length == 0){ return null; } TreeNode root = new TreeNode(pre[first]); if(length == 1){ return root; } int len = 1; //查找根节点在后续遍历中的位置 for(;len < length; len++){ if(post[last + len - 1] == pre[first+1]){ break; } } //对于左子树来说,前序的开始节点加1,后续的初始节点不变,序列长度为len root.left = construct(pre,post,first+1,last,len); //对于右子树来说,前序为first+len+1,因为first已经被用掉,后续就是last+len,常数为总长度减掉用掉的1在减去左子树长度等于右子树的长度 root.right = construct(pre,post,first+len+1,last+len,length - 1 - len); return root; } } class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } }
[ "standonthpeak@gmail.com" ]
standonthpeak@gmail.com
ae96ce2690c120092232bdff86493a54da4c2f5c
296b892069f7fcaedccf28057c38d7442d2cae08
/src/test/java/ShiroTest注解.java
e7fcfb2f47b182b6316d9e8d701f3356f3d5066a
[]
no_license
hanpenghu/shiroTest1
f4f8be58c6549c57e44621110650893e62f37db6
1eed86f49534da0fb8eba1dd5eb5464013961aa3
refs/heads/master
2021-04-15T15:29:10.924925
2018-03-27T00:44:18
2018-03-27T00:44:18
126,907,722
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresRoles; public class ShiroTest注解 { @RequiresRoles( "manager" ) //# 角色校验 public String save() { //... return ""; } @RequiresPermissions("user:manage")// # 权限检验 public String delete() { //... return ""; } }
[ "563909408@qq.com" ]
563909408@qq.com
9c8c7cb72bad06cccd99421bf10b8c2cc1c67964
2efc9296543b7e6d3ad875ce8e036b028550ca01
/kingroup_v2_java/qsar/kriging/LooAlgI.java
47cacc29202db3347d1b5c051bc9b1c2bec41052
[]
no_license
dmitryako/kingroup
4127ecc56744120cd4a1f3d3801665b318b9267c
93614aef0fba4af34a281cae076fb51eb44b73a2
refs/heads/master
2021-05-28T15:13:27.783984
2010-12-01T23:45:50
2010-12-01T23:45:50
34,374,747
1
0
null
null
null
null
UTF-8
Java
false
false
191
java
package qsar.kriging; /** * Copyright KinGroup Team. * User: jc138691, Date: 30/01/2007, Time: 17:30:01 */ public interface LooAlgI { public double calc(int i, double[][] z); }
[ "dmitry.a.konovalov@186c7d38-ed03-11dd-97d9-e7a3ff7b18fb" ]
dmitry.a.konovalov@186c7d38-ed03-11dd-97d9-e7a3ff7b18fb
43b5d96f5ac4ded9d639f2b05de5c3e289872f57
d9958f03e60b0121945e2bc7b4ddd79f1a5245ce
/src/main/java/pl/konczak/tries/ihe/pharm/HXITPQ.java
c2f37be9613e885c972768c2b4264e1582112331
[ "Apache-2.0" ]
permissive
chuddyni/jaxb-pl-hl7-tries
d181d0e2f8487d29a520ac68b47b6ce14a63891f
d8322a630381de5911348cb9708e5b68d55dfa33
refs/heads/master
2023-03-18T11:20:38.922488
2020-06-15T20:50:45
2020-06-15T20:52:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,334
java
package pl.konczak.tries.ihe.pharm; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for HXIT_PQ complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="HXIT_PQ"&gt; * &lt;complexContent&gt; * &lt;extension base="{urn:ihe:pharm}PQ"&gt; * &lt;sequence&gt; * &lt;element name="validTime" type="{urn:ihe:pharm}IVL_TS" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/extension&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "HXIT_PQ", propOrder = { "validTime" }) public class HXITPQ extends PQ { protected IVLTS validTime; /** * Gets the value of the validTime property. * * @return * possible object is * {@link IVLTS } * */ public IVLTS getValidTime() { return validTime; } /** * Sets the value of the validTime property. * * @param value * allowed object is * {@link IVLTS } * */ public void setValidTime(IVLTS value) { this.validTime = value; } }
[ "konczak.piotrek@gmail.com" ]
konczak.piotrek@gmail.com
f69d241d9024c686932463202a8e29fede7fc73c
983cc5b04ef234d8cb79da7376ff2238a36c022f
/myth-common/src/main/java/com/github/myth/common/config/MythRedisConfig.java
88d220d178c908555e6a319af55e7e0800ece9e7
[ "Apache-2.0" ]
permissive
zhengweilin1/myth
c532e027a836ca7f836f64fb49f80202c5f40a62
08b05e095333c851984010adab5141597af4c73a
refs/heads/master
2020-03-18T16:05:17.360353
2018-05-26T09:30:11
2018-05-26T09:30:11
134,945,643
4
0
Apache-2.0
2018-05-26T09:14:25
2018-05-26T08:59:42
Java
UTF-8
Java
false
false
1,632
java
/* * * Copyright 2017-2018 549477611@qq.com(xiaoyu) * * This copyrighted material is made available to anyone wishing to use, modify, * copy, or redistribute it subject to the terms and conditions of the GNU * Lesser General Public License, as published by the Free Software Foundation. * * 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 Lesser General Public License * for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this distribution; if not, see <http://www.gnu.org/licenses/>. * */ package com.github.myth.common.config; import lombok.Data; /** * @author xiaoyu */ @Data public class MythRedisConfig { private Boolean cluster = false; /** * 集群url ip:port;ip:port */ private String clusterUrl; private String hostName; private int port; private String password; private int maxTotal = 8; private int maxIdle = 8; private int minIdle = 0; private long maxWaitMillis = -1L; private long minEvictableIdleTimeMillis = 1800000L; private long softMinEvictableIdleTimeMillis = 1800000L; private int numTestsPerEvictionRun = 3; private Boolean testOnCreate = false; private Boolean testOnBorrow = false; private Boolean testOnReturn = false; private Boolean testWhileIdle = false; private long timeBetweenEvictionRunsMillis = -1L; private boolean blockWhenExhausted = true; private int timeOut = 10000; }
[ "yu.xiao@happylifeplat.com" ]
yu.xiao@happylifeplat.com
f99365249d7d683d27ed7e43163751addbb6e561
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/4/PartitionSearcher.java
715bd77ec7905af7715d28c67226b3f9394c00d0
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
1,816
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.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.api.impl.index.partition; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.ReferenceManager; import java.io.Closeable; import java.io.IOException; /** * Container for {@link IndexSearcher} of the particular {@link AbstractIndexPartition partition}. * Manages lifecycle of the underlying {@link IndexSearcher searcher}. */ public class PartitionSearcher implements Closeable { private IndexSearcher indexSearcher; private ReferenceManager<IndexSearcher> referenceManager; public PartitionSearcher( ReferenceManager<IndexSearcher> referenceManager ) throws IOException { this.referenceManager = referenceManager; this.indexSearcher = referenceManager.acquire(); this.indexSearcher.setQueryCache( null ); } public IndexSearcher getIndexSearcher() { return indexSearcher; } @Override public void close() throws IOException { referenceManager.release( indexSearcher ); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
1ff3999e37fc49872208fb4e90ad6bc9928211cf
11c82833b1066d5e48c06ff11de766298f127674
/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/ibm-igc-repository-connector/igc-rest-client-library/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/igc/clientlibrary/model/generated/v11701sp1/Primarycategory.java
2e9106e5e5d130973da5f834164f5bba564474b7
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
PieterJanVanAeken/egeria
37ac28ee35ac8b395cbe7fb5849741a3d1ffb9ae
8c71faed767297464ba2bd8396b7b7aa3f1277c5
refs/heads/master
2020-03-30T16:09:04.913927
2019-03-05T11:35:44
2019-03-05T11:35:44
148,496,778
0
0
Apache-2.0
2018-09-12T14:52:25
2018-09-12T14:52:24
null
UTF-8
Java
false
false
5,648
java
/* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.repositoryservices.igc.clientlibrary.model.generated.v11701sp1; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.odpi.openmetadata.adapters.repositoryservices.igc.clientlibrary.model.common.*; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.ArrayList; /** * POJO for the {@code primarycategory} asset type in IGC, displayed as '{@literal PrimaryCategory}' in the IGC UI. * <br><br> * (this code has been generated based on out-of-the-box IGC metadata types; * if modifications are needed, eg. to handle custom attributes, * extending from this class in your own custom class is the best approach.) */ @JsonIgnoreProperties(ignoreUnknown=true) public class Primarycategory extends Reference { public static String getIgcTypeId() { return "primarycategory"; } public static String getIgcTypeDisplayName() { return "PrimaryCategory"; } /** * The {@code color} property, displayed as '{@literal Color}' in the IGC UI. */ protected String color; /** * The {@code icon} property, displayed as '{@literal Icon}' in the IGC UI. */ protected String icon; /** * The {@code uses_business_category} property, displayed as '{@literal Uses Business Category}' in the IGC UI. * <br><br> * Will be a single {@link Reference} to a {@link MainObject} object. */ protected Reference uses_business_category; /** * The {@code name} property, displayed as '{@literal Name}' in the IGC UI. */ protected String name; /** * The {@code created_by} property, displayed as '{@literal Created By}' in the IGC UI. */ protected String created_by; /** * The {@code created_on} property, displayed as '{@literal Created On}' in the IGC UI. */ protected Date created_on; /** * The {@code modified_by} property, displayed as '{@literal Modified By}' in the IGC UI. */ protected String modified_by; /** * The {@code modified_on} property, displayed as '{@literal Modified On}' in the IGC UI. */ protected Date modified_on; /** @see #color */ @JsonProperty("color") public String getColor() { return this.color; } /** @see #color */ @JsonProperty("color") public void setColor(String color) { this.color = color; } /** @see #icon */ @JsonProperty("icon") public String getIcon() { return this.icon; } /** @see #icon */ @JsonProperty("icon") public void setIcon(String icon) { this.icon = icon; } /** @see #uses_business_category */ @JsonProperty("uses_business_category") public Reference getUsesBusinessCategory() { return this.uses_business_category; } /** @see #uses_business_category */ @JsonProperty("uses_business_category") public void setUsesBusinessCategory(Reference uses_business_category) { this.uses_business_category = uses_business_category; } /** @see #name */ @JsonProperty("name") public String getTheName() { return this.name; } /** @see #name */ @JsonProperty("name") public void setTheName(String name) { this.name = name; } /** @see #created_by */ @JsonProperty("created_by") public String getCreatedBy() { return this.created_by; } /** @see #created_by */ @JsonProperty("created_by") public void setCreatedBy(String created_by) { this.created_by = created_by; } /** @see #created_on */ @JsonProperty("created_on") public Date getCreatedOn() { return this.created_on; } /** @see #created_on */ @JsonProperty("created_on") public void setCreatedOn(Date created_on) { this.created_on = created_on; } /** @see #modified_by */ @JsonProperty("modified_by") public String getModifiedBy() { return this.modified_by; } /** @see #modified_by */ @JsonProperty("modified_by") public void setModifiedBy(String modified_by) { this.modified_by = modified_by; } /** @see #modified_on */ @JsonProperty("modified_on") public Date getModifiedOn() { return this.modified_on; } /** @see #modified_on */ @JsonProperty("modified_on") public void setModifiedOn(Date modified_on) { this.modified_on = modified_on; } public static Boolean canBeCreated() { return false; } public static Boolean includesModificationDetails() { return true; } private static final List<String> NON_RELATIONAL_PROPERTIES = Arrays.asList( "color", "icon", "name", "created_by", "created_on", "modified_by", "modified_on" ); private static final List<String> STRING_PROPERTIES = Arrays.asList( "color", "icon", "name", "created_by", "modified_by" ); private static final List<String> PAGED_RELATIONAL_PROPERTIES = new ArrayList<>(); private static final List<String> ALL_PROPERTIES = Arrays.asList( "color", "icon", "uses_business_category", "name", "created_by", "created_on", "modified_by", "modified_on" ); public static List<String> getNonRelationshipProperties() { return NON_RELATIONAL_PROPERTIES; } public static List<String> getStringProperties() { return STRING_PROPERTIES; } public static List<String> getPagedRelationshipProperties() { return PAGED_RELATIONAL_PROPERTIES; } public static List<String> getAllProperties() { return ALL_PROPERTIES; } public static Boolean isPrimarycategory(Object obj) { return (obj.getClass() == Primarycategory.class); } }
[ "chris@thegrotes.net" ]
chris@thegrotes.net
175616433dcf1a7159af12883b7d4643727d090c
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/hazelcast/2015/8/MapEntriesWithPredicateMessageTask.java
7a45313f04017153390725641c8ae1df0eb141e6
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
2,567
java
/* * Copyright (c) 2008-2015, Hazelcast, 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.hazelcast.client.impl.protocol.task.map; import com.hazelcast.client.impl.protocol.ClientMessage; import com.hazelcast.client.impl.protocol.codec.MapEntriesWithPredicateCodec; import com.hazelcast.instance.Node; import com.hazelcast.nio.Connection; import com.hazelcast.nio.serialization.Data; import com.hazelcast.query.Predicate; import com.hazelcast.query.impl.QueryResultEntry; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Set; public class MapEntriesWithPredicateMessageTask extends AbstractMapQueryMessageTask<MapEntriesWithPredicateCodec.RequestParameters> { public MapEntriesWithPredicateMessageTask(ClientMessage clientMessage, Node node, Connection connection) { super(clientMessage, node, connection); } @Override protected Object reduce(Collection<QueryResultEntry> result) { HashMap<Data, Data> map = new HashMap<Data, Data>(); for (QueryResultEntry resultEntry : result) { map.put(resultEntry.getKeyData(), resultEntry.getValueData()); } return map.entrySet(); } @Override protected Predicate getPredicate() { return serializationService.toObject(parameters.predicate); } @Override protected MapEntriesWithPredicateCodec.RequestParameters decodeClientMessage(ClientMessage clientMessage) { return MapEntriesWithPredicateCodec.decodeRequest(clientMessage); } @Override protected ClientMessage encodeResponse(Object response) { return MapEntriesWithPredicateCodec.encodeResponse((Set<Map.Entry<Data, Data>>) response); } @Override public Object[] getParameters() { return new Object[]{parameters.predicate}; } @Override public String getDistributedObjectName() { return parameters.name; } @Override public String getMethodName() { return "entrySet"; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
e9c5145044e30c609ebf7ca55c9c9bcd8b00fb8b
cb88f59a1c4eb5bc7c33a0ddb32d26a60221059e
/NRCS.WebPresence.Arizona/src/test/java/pages/AboutUs.java
8b4cc105bc32eda48a2ebdd9e85988c732edc4bf
[]
no_license
priya-bhag/WebPresence
156d3c24b20c2dd2f2e44040bc39e8f89cb6fc6a
8ea6f2ec6eb4515342e46e300bedbe8cc0a136ee
refs/heads/master
2022-01-19T13:02:55.022593
2019-06-20T13:36:02
2019-06-20T13:36:02
110,005,414
0
0
null
null
null
null
UTF-8
Java
false
false
6,967
java
package pages; import java.net.HttpURLConnection; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import factory.DataProviderFactory; import junit.framework.Assert; public class AboutUs { static WebDriver driver; public AboutUs(WebDriver Idriver){ this.driver=Idriver; } //URL1 Elements @FindBy(xpath=".//*[@id='overview']/h2/a") static WebElement headingURL1; @FindBy(xpath=".//*[@id='traversed']") static WebElement YouAreHereURL1; @FindBy(xpath=".//*[@id='mainContent']/table/tbody/tr/td/table/tbody/tr[3]/td/table/tbody/tr/td[3]/table/tbody/tr/td/table/tbody/tr/td") static WebElement BodyURL1; //URL2 Elements @FindBy(xpath=".//*[@id='overview']/h2/a") static WebElement headingURL2; @FindBy(xpath=".//*[@id='traversed']") static WebElement YouAreHereURL2; @FindBy(xpath=".//*[@id='mainContent']/table/tbody/tr/td/table/tbody/tr[3]/td/table/tbody/tr/td[3]/table/tbody/tr/td/table/tbody/tr/td") static WebElement BodyURL2; //Comparison Arrays public static List<String> LinksArrayURL1 =null; public static List<String> LinksArrayURL2 =null; public static List<String> YouAreHereArrayURL1 =null; public static List<String> YouAreHereArrayURL2 =null; public static void validateURL1(){ String title1 = driver.getTitle(); String heading1 = headingURL1.getText(); //System.out.println("hading of url1 is "+heading1); List<String>YouAreHereArrayURL1 = new ArrayList<String>(); List<WebElement> YouAreHereURL1_elements=YouAreHereURL1.findElements(By.tagName("p")); for(int i=0;i<=(YouAreHereURL1_elements).size()-1;i++){ String text=YouAreHereURL1_elements.get(i).getText(); String NewText = text.trim(); YouAreHereArrayURL1.add(NewText); YouAreHereArrayURL1.add(text); } System.out.println(YouAreHereArrayURL1); List<String> LinksArrayURL1 = new ArrayList<String>(); List<WebElement>tableItems_URL1 = BodyURL1.findElements(By.tagName("a")); tableItems_URL1.addAll(BodyURL1.findElements(By.tagName("img"))); int count=0; for(int j=0; j<=tableItems_URL1.size()-1;j++){ WebElement element1 = tableItems_URL1.get(j); String url1=element1.getAttribute("href"); if(element1.getAttribute("href") != null){ LinksArrayURL1.add(url1); count=count+1; verifyLinkActive(url1); } } System.out.println("No of links in URL1 are "+count); System.out.println("first url arrays are "+LinksArrayURL1); //URL2 Methods driver.get(DataProviderFactory.getConfig().getApplicationUrl2()+"main/az/technical/dma/econ/"); String heading2= headingURL2.getText(); if(heading1.equals(heading2)){ System.out.println("heading of both urls are same"); } String title2=driver.getTitle(); Assert.assertEquals(title1,title2); List<String>YouAreHereArrayURL2 = new ArrayList<String>(); List<WebElement> YouAreHereURL2_elements=YouAreHereURL2.findElements(By.tagName("p")); for(int i=0;i<=(YouAreHereURL2_elements).size()-1;i++){ String text=YouAreHereURL2_elements.get(i).getText(); YouAreHereArrayURL2.add(text); String NewText = text.trim(); YouAreHereArrayURL2.add(NewText); } System.out.println(YouAreHereArrayURL2); List<String> LinksArrayURL2 = new ArrayList<String>(); List<WebElement>tableItems_URL2 = BodyURL2.findElements(By.tagName("a")); tableItems_URL2.addAll(BodyURL2.findElements(By.tagName("img"))); int count1=0; for(int j=0; j<=tableItems_URL2.size()-1;j++){ WebElement element1 = tableItems_URL2.get(j); String URL2=element1.getAttribute("href"); if(element1.getAttribute("href") != null){ LinksArrayURL2.add(URL2); count1=count1+1; verifyLinkActive(URL2); } } System.out.println("No of links in URL2 are "+count); System.out.println(LinksArrayURL2); Boolean value2 =Arrays.equals(YouAreHereArrayURL2.toArray(),YouAreHereArrayURL1.toArray()); try{ if (value2=true){ System.out.println("You are here items on both urls are same"); } } catch(Exception e){ System.out.println("The exception is "+e.getMessage()); } Boolean value3 =Arrays.equals(LinksArrayURL1.toArray(),LinksArrayURL2.toArray()); try{ if (value3=true){ System.out.println("Links on both urls are same"); } }catch(Exception e){ System.out.println("The exception is "+e.getMessage()); } } public static void verifyLinkActive(String linkUrl) { try { URL url = new URL(linkUrl); HttpURLConnection httpURLConnect=(HttpURLConnection)url.openConnection(); httpURLConnect.setConnectTimeout(3000); httpURLConnect.connect(); if(httpURLConnect.getResponseCode()==200) { System.out.println(linkUrl+" - "+httpURLConnect.getResponseMessage()); String text=linkUrl+" - "+httpURLConnect.getResponseMessage(); if(text.contains("OK")){ } } if(!(httpURLConnect.getResponseCode()==200)){ System.out.println(linkUrl+"-"+httpURLConnect.getResponseMessage()); String text=linkUrl+" - "+httpURLConnect.getResponseMessage(); if(text.contains("Found")||text.contains("Moved Permanently")||text.contains(" Forbidden")){ } } // System.out.println("No of links with response code other than OK are "+count2); if(httpURLConnect.getResponseCode()==HttpURLConnection.HTTP_NOT_FOUND) { System.out.println(linkUrl+" - "+httpURLConnect.getResponseMessage() + " - "+ HttpURLConnection.HTTP_NOT_FOUND); String text=linkUrl+" - "+httpURLConnect.getResponseMessage() + " - "+ HttpURLConnection.HTTP_NOT_FOUND; if (text.contains("HTTP_NOT_FOUND")){ // count3=count3+1; } } // System.out.println("No of links with response code OK are "+count1); } catch (Exception e) { } } }
[ "Sivapriya Bhagavathi@TSPREA01LAPA35" ]
Sivapriya Bhagavathi@TSPREA01LAPA35
a2aae8f1b18e142b580dd544cbff475389349fda
ee8d225e46dfe56e8d48cdcb41ab6a8be4cfdb6a
/src/test/java/com/spp/pages/CreateGrpInsrnceMstrwithoutClubbInSal.java
012b2a604842c5fe199095205b7083d6fc165b92
[]
no_license
chandra-relyon/NewSPP
11f43cef4f87ed4cbe5148a4a7bb5813ab9cb66f
ff66bdb85b3c1c9c42f0e0d41179f3127745c4c2
refs/heads/master
2020-07-04T12:40:29.002189
2019-08-14T06:26:56
2019-08-14T06:26:56
202,288,445
0
0
null
null
null
null
UTF-8
Java
false
false
1,998
java
package com.spp.pages; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import com.spp.common.BasePage; public class CreateGrpInsrnceMstrwithoutClubbInSal extends BasePage { @FindBy(id="master") WebElement masterlink; @FindBy(xpath="//a[text()='Group Insurance Master']") WebElement groupInsurance; @FindBy(xpath="//a[text()='Add New Group Insurance Master']") WebElement addGroupInsurance; @FindBy(id="standing_instruction_master_si_name") WebElement groupInsuranceName; @FindBy(xpath="//*[@id=\"standing_instruction_master_clubbed_in_salary_head\"]") WebElement uncheckClubbInSalHead; @FindBy(xpath="//input[@value='Create Group Insurance']") WebElement createGroupInsurance; @FindBy(xpath="//strong[text()='Group Insurance successfully created ']") WebElement successfullMessage; @FindBy(xpath="//*[@class=\"action-delete\"]") WebElement ClickDelete; @FindBy (xpath="//*[@id='standing_instr_list']/div[2]/table/tbody[2]/tr/td[contains(text(),'Group_Insurance_Master')]/parent::tr/td[2]") WebElement CheckNo; public CreateGrpInsrnceMstrwithoutClubbInSal(WebDriver driver){ super(driver); PageFactory.initElements(driver, this); } public void navigateMaster() throws Exception{ masterlink.click(); } public void selectGroupInsurance() throws Exception{ groupInsurance.click(); } public void clickaddGroupInsurance() throws Exception{ addGroupInsurance.click(); } public void enterGroupInsurance(String value) throws Exception{ groupInsuranceName.sendKeys(value); } public void uncheckclubbinsalhead() { uncheckClubbInSalHead.click(); } public void clickCreateGroupInsurance() throws Exception{ createGroupInsurance.click(); } public String getMessage(){ return successfullMessage.getText(); } public void clickdelete() { ClickDelete.click(); } public String GroupCheckNo(){ return CheckNo.getText(); } }
[ "RSL@Lenovo430" ]
RSL@Lenovo430
3f306293eb3ecaeab9bb65c41aa0678e6ce6d017
6186c1cf55570acb430afd1bd4f8318be8049e9d
/app/src/main/java/com/pivotalsoft/get5mseller/RecyclerviewUtilities/DividerItemDecoration.java
f9ce1b6f8eb209792503d37ebe7672d00a5fa238
[]
no_license
suresh429/relleSm5teG
6524b28a2a367254a5d2f28277878f61b91698de
a31819bf8cbcfe968ce4f8b5094ecdefe0cea4e0
refs/heads/master
2020-03-22T07:22:46.474730
2019-12-14T11:52:51
2019-12-14T11:52:51
139,696,540
0
0
null
null
null
null
UTF-8
Java
false
false
3,290
java
package com.pivotalsoft.get5mseller.RecyclerviewUtilities; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; /** * Created by Gangadhar on 13/9/17. */ public class DividerItemDecoration extends RecyclerView.ItemDecoration { private static final int[] ATTRS = new int[]{ android.R.attr.listDivider }; public static final int HORIZONTAL_LIST = LinearLayoutManager.HORIZONTAL; public static final int VERTICAL_LIST = LinearLayoutManager.VERTICAL; private Drawable mDivider; private int mOrientation; public DividerItemDecoration(Context context, int orientation) { final TypedArray a = context.obtainStyledAttributes(ATTRS); mDivider = a.getDrawable(0); a.recycle(); setOrientation(orientation); } public void setOrientation(int orientation) { if (orientation != HORIZONTAL_LIST && orientation != VERTICAL_LIST) { throw new IllegalArgumentException("invalid orientation"); } mOrientation = orientation; } @Override public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state) { if (mOrientation == VERTICAL_LIST) { drawVertical(c, parent); } else { drawHorizontal(c, parent); } } public void drawVertical(Canvas c, RecyclerView parent) { final int left = parent.getPaddingLeft(); final int right = parent.getWidth() - parent.getPaddingRight(); final int childCount = parent.getChildCount(); for (int i = 0; i < childCount; i++) { final View child = parent.getChildAt(i); final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child .getLayoutParams(); final int top = child.getBottom() + params.bottomMargin; final int bottom = top + mDivider.getIntrinsicHeight(); mDivider.setBounds(left, top, right, bottom); mDivider.draw(c); } } public void drawHorizontal(Canvas c, RecyclerView parent) { final int top = parent.getPaddingTop(); final int bottom = parent.getHeight() - parent.getPaddingBottom(); final int childCount = parent.getChildCount(); for (int i = 0; i < childCount; i++) { final View child = parent.getChildAt(i); final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child .getLayoutParams(); final int left = child.getRight() + params.rightMargin; final int right = left + mDivider.getIntrinsicHeight(); mDivider.setBounds(left, top, right, bottom); mDivider.draw(c); } } @Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { if (mOrientation == VERTICAL_LIST) { outRect.set(0, 0, 0, mDivider.getIntrinsicHeight()); } else { outRect.set(0, 0, mDivider.getIntrinsicWidth(), 0); } } }
[ "ksuresh.unique@gmail.com" ]
ksuresh.unique@gmail.com
f6bbc23944cd62f3c06b7e0129459c5efd2d603b
f08948be16e1c931d14b217dd882a4e954c2c505
/connector/ns8fulfilmentprocess/src/com/ns8/hybris/fulfilmentprocess/constants/Ns8fulfilmentprocessConstants.java
e28c6f1e9648ff7e6438d71f28be1f31117c6daa
[]
no_license
ns8inc/protect-integration-sap-release
f218758fce28e15bbeb12b932e49810606a417da
9af3ed490fb7cb2cbe54077df4c4d329b262f2dc
refs/heads/master
2022-11-21T02:08:34.717053
2020-07-07T19:45:18
2020-07-07T19:45:18
266,125,943
0
0
null
null
null
null
UTF-8
Java
false
false
809
java
package com.ns8.hybris.fulfilmentprocess.constants; @SuppressWarnings("java:S1874") public final class Ns8fulfilmentprocessConstants extends GeneratedNs8fulfilmentprocessConstants { public static final String CONSIGNMENT_SUBPROCESS_END_EVENT_NAME = "ConsignmentSubprocessEnd"; public static final String ORDER_PROCESS_NAME = "order-process"; public static final String CONSIGNMENT_SUBPROCESS_NAME = "consignment-process"; public static final String WAIT_FOR_WAREHOUSE = "WaitForWarehouse"; public static final String CONSIGNMENT_PICKUP = "ConsignmentPickup"; public static final String CONSIGNMENT_COUNTER = "CONSIGNMENT_COUNTER"; public static final String PARENT_PROCESS = "PARENT_PROCESS"; public static final String CUSTOMER = "CUSTOMER"; public static final String BASE_STORE = "BASE_STORE"; }
[ "eusebio.trigo@e2ycommerce.com" ]
eusebio.trigo@e2ycommerce.com
5f2fbb0b6f046ce2149fa9790ba4d5c38ee0dffa
9821426ca32b707134eee8dbda9ef4ce64a97045
/MiuiSystemUI/raphael/systemui/statusbar/views/MiuiClipEdgeViewConstraintLayout.java
516ac3cddb115429406aa3dc44b0db822c2388e8
[]
no_license
mooseIre/arsc_compare
a28af8205cc75647b3f6e8c1b3310ca2b2140725
3df667d4e4d4924e11cbcfd9df29346a3c259e32
refs/heads/master
2023-06-21T13:30:23.511293
2021-08-12T15:13:08
2021-08-12T15:13:08
277,633,842
3
3
null
null
null
null
UTF-8
Java
false
false
2,972
java
package com.android.systemui.statusbar.views; import android.content.Context; import android.graphics.Canvas; import android.graphics.Rect; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import androidx.constraintlayout.widget.ConstraintLayout; public class MiuiClipEdgeViewConstraintLayout extends ConstraintLayout { private Rect mClipRect = new Rect(); public MiuiClipEdgeViewConstraintLayout(Context context, AttributeSet attributeSet) { super(context, attributeSet); } /* access modifiers changed from: protected */ @Override // androidx.constraintlayout.widget.ConstraintLayout public void onLayout(boolean z, int i, int i2, int i3, int i4) { if (getParent() instanceof View) { View view = (View) getParent(); if (view.getWidth() < i3) { i3 = view.getWidth(); } if (i <= 0) { i = 0; } } super.onLayout(z, i, i2, i3, i4); updateClipRect(); } private void updateClipRect() { Rect rect = this.mClipRect; int i = 0; rect.left = 0; rect.top = 0; rect.bottom = getHeight(); this.mClipRect.right = 0; if (clipEnd()) { i = getWidth(); } setClipRectRight(i, this); } private void setClipRectRight(int i, ViewGroup viewGroup) { for (int i2 = 0; i2 < viewGroup.getChildCount(); i2++) { View childAt = viewGroup.getChildAt(i2); float f = (float) i; if (((float) childAt.getLeft()) + childAt.getTranslationX() < f && ((float) childAt.getRight()) + childAt.getTranslationX() > f && childAt.getVisibility() != 8) { if (childAt instanceof ViewGroup) { setClipRectRight(i - ((int) (((float) childAt.getLeft()) + childAt.getTranslationX())), (ViewGroup) childAt); } else if (clipEnd()) { this.mClipRect.right = getWidth() - (i - ((int) (((float) childAt.getLeft()) + childAt.getTranslationX()))); return; } else { this.mClipRect.left = ((int) (((float) childAt.getRight()) + childAt.getTranslationX())) - i; this.mClipRect.right = getWidth(); return; } } } } /* access modifiers changed from: protected */ public boolean clipEnd() { return isLayoutRtl(); } /* access modifiers changed from: protected */ @Override // androidx.constraintlayout.widget.ConstraintLayout public void dispatchDraw(Canvas canvas) { Rect rect = this.mClipRect; boolean z = rect.right - rect.left > 0; if (z) { canvas.save(); canvas.clipRect(this.mClipRect); } super.dispatchDraw(canvas); if (z) { canvas.restore(); } } }
[ "viiplycn@gmail.com" ]
viiplycn@gmail.com
91de7d9797d85ba498b38696d7a3b6d7ac4c6a75
63e36d35f51bea83017ec712179302a62608333e
/framework/android/filterfw/core/ProgramPort.java
5ff1ae6a97d4bb301c10475e6c5ed43bfd3d6dac
[]
no_license
hiepgaf/oneplus_blobs_decompiled
672aa002fa670bdcba8fdf34113bc4b8e85f8294
e1ab1f2dd111f905ff1eee18b6a072606c01c518
refs/heads/master
2021-06-26T11:24:21.954070
2017-08-26T12:45:56
2017-08-26T12:45:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,538
java
package android.filterfw.core; import java.lang.reflect.Field; public class ProgramPort extends FieldPort { protected String mVarName; public ProgramPort(Filter paramFilter, String paramString1, String paramString2, Field paramField, boolean paramBoolean) { super(paramFilter, paramString1, paramField, paramBoolean); this.mVarName = paramString2; } public String toString() { return "Program " + super.toString(); } /* Error */ public void transfer(FilterContext paramFilterContext) { // Byte code: // 0: aload_0 // 1: monitorenter // 2: aload_0 // 3: getfield 40 android/filterfw/core/FieldPort:mValueWaiting Z // 6: istore_2 // 7: iload_2 // 8: ifeq +39 -> 47 // 11: aload_0 // 12: getfield 44 android/filterfw/core/FieldPort:mField Ljava/lang/reflect/Field; // 15: aload_0 // 16: getfield 50 android/filterfw/core/FilterPort:mFilter Landroid/filterfw/core/Filter; // 19: invokevirtual 56 java/lang/reflect/Field:get (Ljava/lang/Object;)Ljava/lang/Object; // 22: astore_1 // 23: aload_1 // 24: ifnull +23 -> 47 // 27: aload_1 // 28: checkcast 58 android/filterfw/core/Program // 31: aload_0 // 32: getfield 13 android/filterfw/core/ProgramPort:mVarName Ljava/lang/String; // 35: aload_0 // 36: getfield 62 android/filterfw/core/FieldPort:mValue Ljava/lang/Object; // 39: invokevirtual 66 android/filterfw/core/Program:setHostValue (Ljava/lang/String;Ljava/lang/Object;)V // 42: aload_0 // 43: iconst_0 // 44: putfield 40 android/filterfw/core/FieldPort:mValueWaiting Z // 47: aload_0 // 48: monitorexit // 49: return // 50: astore_1 // 51: new 68 java/lang/RuntimeException // 54: dup // 55: new 18 java/lang/StringBuilder // 58: dup // 59: invokespecial 21 java/lang/StringBuilder:<init> ()V // 62: ldc 70 // 64: invokevirtual 27 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 67: aload_0 // 68: getfield 44 android/filterfw/core/FieldPort:mField Ljava/lang/reflect/Field; // 71: invokevirtual 73 java/lang/reflect/Field:getName ()Ljava/lang/String; // 74: invokevirtual 27 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 77: ldc 75 // 79: invokevirtual 27 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 82: invokevirtual 30 java/lang/StringBuilder:toString ()Ljava/lang/String; // 85: invokespecial 78 java/lang/RuntimeException:<init> (Ljava/lang/String;)V // 88: athrow // 89: astore_1 // 90: aload_0 // 91: monitorexit // 92: aload_1 // 93: athrow // 94: astore_1 // 95: new 68 java/lang/RuntimeException // 98: dup // 99: new 18 java/lang/StringBuilder // 102: dup // 103: invokespecial 21 java/lang/StringBuilder:<init> ()V // 106: ldc 80 // 108: invokevirtual 27 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 111: aload_0 // 112: getfield 44 android/filterfw/core/FieldPort:mField Ljava/lang/reflect/Field; // 115: invokevirtual 73 java/lang/reflect/Field:getName ()Ljava/lang/String; // 118: invokevirtual 27 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 121: ldc 82 // 123: invokevirtual 27 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 126: invokevirtual 30 java/lang/StringBuilder:toString ()Ljava/lang/String; // 129: invokespecial 78 java/lang/RuntimeException:<init> (Ljava/lang/String;)V // 132: athrow // Local variable table: // start length slot name signature // 0 133 0 this ProgramPort // 0 133 1 paramFilterContext FilterContext // 6 2 2 bool boolean // Exception table: // from to target type // 11 23 50 java/lang/ClassCastException // 27 47 50 java/lang/ClassCastException // 2 7 89 finally // 11 23 89 finally // 27 47 89 finally // 51 89 89 finally // 95 133 89 finally // 11 23 94 java/lang/IllegalAccessException // 27 47 94 java/lang/IllegalAccessException } } /* Location: /Users/joshua/Desktop/system_framework/classes-dex2jar.jar!/android/filterfw/core/ProgramPort.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "joshuous@gmail.com" ]
joshuous@gmail.com
6860460fca4c60b3f856b04972acdd11ce596263
20ea5ee84221ff5fd7e3cc1e1ca38db910caf3de
/src/main/java/com/victropolis/euler/Problem418.java
25e246969fa461a48abd336e1e5f1514a2f4d6c8
[]
no_license
victropolis/project-euler-solved
a76207d8583126618ff8af801262e6077c536e55
b4f153a42e101b4d780178af05aab8a0203931ec
refs/heads/master
2016-09-06T13:38:52.788092
2015-07-04T22:03:32
2015-07-04T22:03:37
37,392,888
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package com.victropolis.euler; /** * Generated programatically by victropolis on 07/04/15. */ public class Problem418 extends BaseProblem { /* Description (from https://projecteuler.net/problem=418): Let n be a positive integer. An integer triple (a, b, c) is called a factorisation triple of n if: 1 ≤ a ≤ b ≤ c a·b·c = n. Define f(n) to be a + b + c for the factorisation triple (a, b, c) of n which minimises c / a. One can show that this triple is unique. For example, f(165) = 19, f(100100) = 142 and f(20!) = 4034872. Find f(43!). */ public static long solve(/* change signature to provide required inputs */) { throw new UnsupportedOperationException("Problem418 hasn't been solved yet."); } }
[ "victropolis@gmail.com" ]
victropolis@gmail.com
5e837b5040aed1386ac9677181bc52a7c21fc52f
774d36285e48bd429017b6901a59b8e3a51d6add
/sources/com/google/android/gms/games/internal/zzav.java
df5784c3686d74798a0470dc2cb10721612826f6
[]
no_license
jorge-luque/hb
83c086851a409e7e476298ffdf6ba0c8d06911db
b467a9af24164f7561057e5bcd19cdbc8647d2e5
refs/heads/master
2023-08-25T09:32:18.793176
2020-10-02T11:02:01
2020-10-02T11:02:01
300,586,541
0
0
null
null
null
null
UTF-8
Java
false
false
576
java
package com.google.android.gms.games.internal; import com.google.android.gms.games.internal.zzg; import com.google.android.gms.games.multiplayer.realtime.Room; import com.google.android.gms.games.multiplayer.realtime.RoomStatusUpdateListener; /* compiled from: com.google.android.gms:play-services-games@@19.0.0 */ final /* synthetic */ class zzav implements zzg.zzaq { static final zzg.zzaq zzjb = new zzav(); private zzav() { } public final void zza(Object obj, Room room) { ((RoomStatusUpdateListener) obj).onDisconnectedFromRoom(room); } }
[ "jorge.luque@taiger.com" ]
jorge.luque@taiger.com
e1c78feeec28d866355a2da177d2b663bfba76c3
32d81b4b9db2b6ea4e5c046688cfa43740500bed
/src/com/netty/io/netty/handler/codec/stomp/StompContentSubframe.java
d4bc62bf9858c7fd093bd009238951b673eb8e56
[]
no_license
zymap/zytest
f1ce4cf0e6c735d35f68ea8c89df98ae6d035821
b8d9eb6cf46490958d20ebb914d543af50d1b862
refs/heads/master
2021-04-03T01:15:30.946483
2018-03-24T14:10:57
2018-03-24T14:10:57
124,623,152
0
0
null
null
null
null
UTF-8
Java
false
false
2,246
java
/* * Copyright 2014 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.netty.io.netty.handler.codec.stomp; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufHolder; import io.netty.channel.ChannelPipeline; import io.netty.handler.codec.stomp.*; import io.netty.handler.codec.stomp.StompFrame; import io.netty.handler.codec.stomp.StompSubframe; import io.netty.handler.codec.stomp.StompSubframeAggregator; /** * An STOMP chunk which is used for STOMP chunked transfer-encoding. {@link StompSubframeDecoder} generates * {@link io.netty.handler.codec.stomp.StompContentSubframe} after {@link StompHeadersSubframe} when the content is large or the encoding of * the content is 'chunked. If you prefer not to receive multiple {@link StompSubframe}s for a single * {@link StompFrame}, place {@link StompSubframeAggregator} after {@link StompSubframeDecoder} in the * {@link ChannelPipeline}. */ public interface StompContentSubframe extends ByteBufHolder, StompSubframe { @Override io.netty.handler.codec.stomp.StompContentSubframe copy(); @Override io.netty.handler.codec.stomp.StompContentSubframe duplicate(); @Override io.netty.handler.codec.stomp.StompContentSubframe retainedDuplicate(); @Override io.netty.handler.codec.stomp.StompContentSubframe replace(ByteBuf content); @Override io.netty.handler.codec.stomp.StompContentSubframe retain(); @Override io.netty.handler.codec.stomp.StompContentSubframe retain(int increment); @Override io.netty.handler.codec.stomp.StompContentSubframe touch(); @Override io.netty.handler.codec.stomp.StompContentSubframe touch(Object hint); }
[ "734206637@qq.com" ]
734206637@qq.com
bb0e70e41d6e17a29888e45482cd6a5ca51c3943
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_70b44435e9486e605af6f59965965098ebea31b8/FieldDoc/2_70b44435e9486e605af6f59965965098ebea31b8_FieldDoc_s.java
f379e9c8cbe98470bf448e0c9bf988e8d3fe4074
[]
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,929
java
package org.apache.lucene.search; /** * 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. */ /** * Expert: A ScoreDoc which also contains information about * how to sort the referenced document. In addition to the * document number and score, this object contains an array * of values for the document from the field(s) used to sort. * For example, if the sort criteria was to sort by fields * "a", "b" then "c", the <code>fields</code> object array * will have three elements, corresponding respectively to * the term values for the document in fields "a", "b" and "c". * The class of each element in the array will be either * Integer, Float or String depending on the type of values * in the terms of each field. * * <p>Created: Feb 11, 2004 1:23:38 PM * * @since lucene 1.4 * @see ScoreDoc * @see TopFieldDocs */ public class FieldDoc extends ScoreDoc { /** Expert: The values which are used to sort the referenced document. * The order of these will match the original sort criteria given by a * Sort object. Each Object will be either an Integer, Float or String, * depending on the type of values in the terms of the original field. * @see Sort * @see Searcher#search(Query,Filter,int,Sort) */ public Comparable[] fields; /** Expert: Creates one of these objects with empty sort information. */ public FieldDoc (int doc, float score) { super (doc, score); } /** Expert: Creates one of these objects with the given sort information. */ public FieldDoc (int doc, float score, Comparable[] fields) { super (doc, score); this.fields = fields; } // A convenience method for debugging. @Override public String toString() { // super.toString returns the doc and score information, so just add the // fields information StringBuilder sb = new StringBuilder(super.toString()); sb.append("["); for (int i = 0; i < fields.length; i++) { sb.append(fields[i]).append(", "); } sb.setLength(sb.length() - 2); // discard last ", " sb.append("]"); return super.toString(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
164454ddaf541d5390fb2a63af08db081313903e
74134dfe406ec19ec2ac10b67d6ec966efd97ec7
/ezyfox-server-core/src/main/java/com/tvd12/ezyfoxserver/setting/EzyAppSetting.java
92e41e40ff6860bcee1604c2b3c7abb9bf48a134
[ "Apache-2.0" ]
permissive
tienchaunmt/ezyfox-server
17b470cda98f2dd3f287d6c406f59a5c2fe877b3
2f2de3ea2521d6bbf7983ce47a4e21c4426519b8
refs/heads/master
2023-09-03T02:55:21.865093
2021-10-21T16:03:27
2021-10-21T16:03:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
498
java
package com.tvd12.ezyfoxserver.setting; public interface EzyAppSetting extends EzyBaseSetting { int getMaxUsers(); /** * return the full path configuration file which you input * let's say you setup the configuration file is config.properties * so this function will return * {ezyfox_server_home_path}/apps/entries/{app_folder}/config.properties * * @return the full path of configuration file */ @Override String getConfigFile(); }
[ "itprono3@gmail.com" ]
itprono3@gmail.com
e0ddd71c59186beb3a2c8a797fcf7b50a77188df
523cd159d9c63e97a96c31faf11be84608ab850b
/src/encapsulation/DefaultDemo.java
6d85cbcd0f198532539881bc14474a4cf0fd4759
[]
no_license
automationtrainingcenter/ahalya_java
dbc20ef0e86b3d99116dd42db08901493a6469b9
864165970cdfe9a24c9677f80ff0e132884f5d90
refs/heads/master
2020-04-09T17:19:03.483842
2018-12-29T12:45:19
2018-12-29T12:45:19
160,474,739
0
0
null
null
null
null
UTF-8
Java
false
false
440
java
package encapsulation; import accessmodifiers.AccessModifiersDemo; public class DefaultDemo { public static void main(String[] args) { AccessModifiersDemo obj = new AccessModifiersDemo(); System.out.println(obj.pVar); // System.out.println(obj.prVar); // can't access outside the class // System.out.println(obj.dVar); //can't access outside the package // System.out.println(obj.proVar); //can't access outside the package } }
[ "atcsurya@gmail.com" ]
atcsurya@gmail.com
c41458eb1cec8ecef5cbdd3ebca920fdc6804450
52bd8a00782a8b4fcb23f458c93240d9b9273a48
/java-problems/src/test/java/com/games/HR/betweenTwoSets/SolutionTest.java
4da002c1491311c2f642901e1d6d533bfcc6bebe
[]
no_license
atulanand206/Games
27ba2878d477d58ad25b579b81cddef29ccf3d63
936d5a3b479a8bbd5d95b3616897ac11fb227f24
refs/heads/master
2023-04-15T05:22:38.376852
2022-03-08T21:37:01
2022-03-08T21:37:01
63,499,385
1
0
null
2023-04-12T05:38:03
2016-07-16T19:35:21
Java
UTF-8
Java
false
false
701
java
package com.games.HR.betweenTwoSets; import org.junit.jupiter.api.Test; import java.util.Arrays; import java.util.stream.Collectors; import static org.junit.jupiter.api.Assertions.*; class SolutionTest { @Test void testTwoSets() { assertEquals(3, Solution.getTotalX(Arrays.stream(new int[]{2, 4}).boxed().collect(Collectors.toList()), Arrays.stream(new int[]{16, 32, 96}).boxed().collect(Collectors.toList()))); } @Test void testTwoSets2() { assertEquals(2, Solution.getTotalX(Arrays.stream(new int[]{2, 6}).boxed().collect(Collectors.toList()), Arrays.stream(new int[]{24, 36}).boxed().collect(Collectors.toList()))); } }
[ "atulanand206@gmail.com" ]
atulanand206@gmail.com
a500dca7b9bfa293ccf8e83d04cb24713ffb747b
eec13544246a39cfe64aa8a10089dd5db7adc1a9
/src/main/java/com/easyway/java/concurrent/practice/ReaderThread.java
20c8bb5a2d9dc3b5b53990f8c35337c0a0c28fec
[]
no_license
LonggangBai/java-basic
323ba811f3afacc0977f4d1ba266088ec492805f
f761218b596558d9696eb04a18143529f0984c85
refs/heads/master
2022-07-06T16:50:17.064997
2019-11-25T07:09:44
2019-11-25T07:09:44
29,512,547
0
1
null
2022-06-29T19:30:20
2015-01-20T04:56:44
Java
UTF-8
Java
false
false
1,198
java
package com.easyway.java.concurrent.practice; import java.io.IOException; import java.io.InputStream; import java.net.Socket; /** * ReaderThread * <p/> * Encapsulating nonstandard cancellation in a Thread by overriding interrupt * * @author Brian Goetz and Tim Peierls */ public class ReaderThread extends Thread { private static final int BUFSZ = 512; private final Socket socket; private final InputStream in; public ReaderThread(Socket socket) throws IOException { this.socket = socket; this.in = socket.getInputStream(); } public void interrupt() { try { socket.close(); } catch (IOException ignored) { } finally { super.interrupt(); } } public void run() { try { byte[] buf = new byte[BUFSZ]; while (true) { int count = in.read(buf); if (count < 0) break; else if (count > 0) processBuffer(buf, count); } } catch (IOException e) { /* Allow thread to exit */ } } public void processBuffer(byte[] buf, int count) { } }
[ "Administrator@WIN-20140718QRT" ]
Administrator@WIN-20140718QRT
db7c87af1c5d5bfc5a45cc06ae25ae968a4196a3
c89821386c9f2e6fefdd073016c37084a5bcda62
/src/main/java/org/springframework/boot/context/TypeFilter.java
0623b9f77b5a6df738334a076aa84821cd1aabdc
[]
no_license
ZephyrJung/MiniSpring
9b95285def5d559764ff380c6c96256a11b8bc53
a7a93a5c98695e0efbd80a80e16abd0ec624d408
refs/heads/master
2020-04-01T20:06:33.653492
2018-10-29T01:47:58
2018-10-29T01:47:58
153,588,815
0
0
null
null
null
null
UTF-8
Java
false
false
1,670
java
/* * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.core.type.filter; import java.io.IOException; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; /** * Base interface for type filters using a * {@link org.springframework.core.type.classreading.MetadataReader}. * * @author Costin Leau * @author Juergen Hoeller * @author Mark Fisher * @since 2.5 */ @FunctionalInterface public interface TypeFilter { /** * Determine whether this filter matches for the class described by * the given metadata. * @param metadataReader the metadata reader for the target class * @param metadataReaderFactory a factory for obtaining metadata readers * for other classes (such as superclasses and interfaces) * @return whether this filter matches * @throws IOException in case of I/O failure when reading metadata */ boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException; }
[ "zephyrjung@126.com" ]
zephyrjung@126.com
aedb19cbd21f7457a4b8307ac603267c2a0eb8db
42f51b39afef0eac970d68cd85731b81160a7374
/CustomPlayerModelsFabric-1.17/src/main/java/com/tom/cpm/mixin/SkullBlockEntityRendererMixin.java
9ae18df34eff21854d6e8e987aa8555e4de037d2
[ "MIT" ]
permissive
aetherjay/CustomPlayerModels
dd525468cb5c97af6dffbea73e19d5cb4da5111c
915496eaf812e24b90912c34425225b1858f8267
refs/heads/master
2023-05-19T14:56:16.236974
2021-06-10T13:28:02
2021-06-10T13:28:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,664
java
package com.tom.cpm.mixin; import java.util.Map; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.LocalCapture; import net.minecraft.block.BlockState; import net.minecraft.block.SkullBlock; import net.minecraft.block.entity.SkullBlockEntity; import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.block.entity.SkullBlockEntityModel; import net.minecraft.client.render.block.entity.SkullBlockEntityRenderer; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.util.Identifier; import net.minecraft.util.math.Direction; import com.mojang.authlib.GameProfile; import com.tom.cpm.client.CustomPlayerModelsClient; import com.tom.cpm.client.RefHolder; @Mixin(SkullBlockEntityRenderer.class) public abstract class SkullBlockEntityRendererMixin { @Shadow private @Final Map<SkullBlock.SkullType, SkullBlockEntityModel> MODELS; @Inject(at = @At( value = "INVOKE", target = "Lnet/minecraft/client/render/block/entity/SkullBlockEntityRenderer;" + "getRenderLayer(Lnet/minecraft/block/SkullBlock$SkullType;Lcom/mojang/authlib/GameProfile;)" + "Lnet/minecraft/client/render/RenderLayer;" ), method = "render(Lnet/minecraft/block/entity/SkullBlockEntity;F" + "Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;II)V", locals = LocalCapture.CAPTURE_FAILHARD) public void onRender(SkullBlockEntity skullBlockEntity, float f, MatrixStack matrixStack, VertexConsumerProvider buffer, int i, int arg5, CallbackInfo ci, float g, BlockState blockState, boolean bl, Direction direction, float h, SkullBlock.SkullType skullType, SkullBlockEntityModel model) { RefHolder.CPM_MODELS = MODELS; GameProfile gameProfile = skullBlockEntity.getOwner(); if(skullType == SkullBlock.Type.PLAYER) { CustomPlayerModelsClient.INSTANCE.renderSkull(model, gameProfile, buffer); } } @Redirect(at = @At( value = "INVOKE", target = "Lnet/minecraft/client/render/RenderLayer;getEntityTranslucent(" + "Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/render/RenderLayer;" ), method = "getRenderLayer(Lnet/minecraft/block/SkullBlock$SkullType;Lcom/mojang/authlib/GameProfile;)" + "Lnet/minecraft/client/render/RenderLayer;") private static RenderLayer onGetRenderType(Identifier resLoc, SkullBlock.SkullType skullType, GameProfile gameProfileIn) { SkullBlockEntityModel model = RefHolder.CPM_MODELS.get(skullType); RefHolder.CPM_MODELS = null; CallbackInfoReturnable<Identifier> cbi = new CallbackInfoReturnable<>(null, true, resLoc); CustomPlayerModelsClient.mc.getPlayerRenderManager().bindSkin(model, cbi); return RenderLayer.getEntityTranslucent(cbi.getReturnValue()); } @Redirect(at = @At( value = "INVOKE", target = "Lnet/minecraft/client/render/RenderLayer;getEntityCutoutNoCull(" + "Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/render/RenderLayer;" ), method = "getRenderLayer(Lnet/minecraft/block/SkullBlock$SkullType;Lcom/mojang/authlib/GameProfile;)" + "Lnet/minecraft/client/render/RenderLayer;") private static RenderLayer onGetRenderTypeNoSkin(Identifier resLoc, SkullBlock.SkullType skullType, GameProfile gameProfileIn) { SkullBlockEntityModel model = RefHolder.CPM_MODELS.get(skullType); RefHolder.CPM_MODELS = null; CallbackInfoReturnable<Identifier> cbi = new CallbackInfoReturnable<>(null, true, resLoc); CustomPlayerModelsClient.mc.getPlayerRenderManager().bindSkin(model, cbi); return RenderLayer.getEntityTranslucent(cbi.getReturnValue()); } @Inject(at = @At("RETURN"), method = "renderSkull(Lnet/minecraft/util/math/Direction;FF" + "Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I" + "Lnet/minecraft/client/render/block/entity/SkullBlockEntityModel;Lnet/minecraft/client/render/RenderLayer;)V") private static void renderSkullPost(Direction direction, float yaw, float animationProgress, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, SkullBlockEntityModel model, RenderLayer renderLayer, CallbackInfo cbi) { CustomPlayerModelsClient.INSTANCE.unbind(model); } }
[ "tom5454a@gmail.com" ]
tom5454a@gmail.com
8bbe6a48b5bd78d2966c3eec8adccd6a9744cef0
d70b84c56a068cce2c6e7323ea4acd32c667aa45
/glarimy-spring-boot-data/src/main/java/com/glarimy/boot/biz/BookService.java
f9dc79f789f6ff738f6a176e2b984fc03cf0796d
[]
no_license
glarimy/glarimy-spring
f7ad7afea8b0f53b3719a89e3c16b03d36451716
24e2f02079d0e3e2d99237f0a1ed640df2dbb781
refs/heads/master
2020-03-19T20:10:16.885122
2018-07-12T17:52:05
2018-07-12T17:52:05
136,884,526
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
package com.glarimy.boot.biz; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.glarimy.boot.first.FirstRepository; import com.glarimy.boot.model.Book; import com.glarimy.boot.second.SecondRepository; @Service public class BookService { @Autowired private FirstRepository first; @Autowired private SecondRepository second; @Transactional public void add(Book book) { first.save(book); } @Transactional public void copy(int isbn) { Book book = first.findOne(isbn); second.save(book); } }
[ "krishna@glarimy.com" ]
krishna@glarimy.com
6a2e623cd1be67e27e5e9d8f70af52aed492c56e
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/flink/2015/8/StreamDiscretizer.java
47c2323991681eccfd7837441ac320ac9ef379ad
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
7,219
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.flink.streaming.api.operators.windowing; import org.apache.flink.streaming.api.operators.AbstractStreamOperator; import org.apache.flink.streaming.api.operators.OneInputStreamOperator; import org.apache.flink.streaming.api.watermark.Watermark; import org.apache.flink.streaming.api.windowing.StreamWindow; import org.apache.flink.streaming.api.windowing.WindowEvent; import org.apache.flink.streaming.api.windowing.policy.ActiveEvictionPolicy; import org.apache.flink.streaming.api.windowing.policy.ActiveTriggerCallback; import org.apache.flink.streaming.api.windowing.policy.ActiveTriggerPolicy; import org.apache.flink.streaming.api.windowing.policy.EvictionPolicy; import org.apache.flink.streaming.api.windowing.policy.TriggerPolicy; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; /** * This operator represents the discretization step of a window transformation. * The user supplied eviction and trigger policies are applied to create the * {@link StreamWindow} that will be further transformed in the next stages. */ public class StreamDiscretizer<IN> extends AbstractStreamOperator<WindowEvent<IN>> implements OneInputStreamOperator<IN, WindowEvent<IN>> { private static final long serialVersionUID = 1L; protected TriggerPolicy<IN> triggerPolicy; protected EvictionPolicy<IN> evictionPolicy; private boolean isActiveTrigger; private boolean isActiveEviction; private int bufferSize = 0; private transient Thread activePolicyThread; protected WindowEvent<IN> windowEvent = new WindowEvent<IN>(); public StreamDiscretizer(TriggerPolicy<IN> triggerPolicy, EvictionPolicy<IN> evictionPolicy) { this.triggerPolicy = triggerPolicy; this.evictionPolicy = evictionPolicy; this.isActiveTrigger = triggerPolicy instanceof ActiveTriggerPolicy; this.isActiveEviction = evictionPolicy instanceof ActiveEvictionPolicy; this.chainingStrategy = ChainingStrategy.FORCE_ALWAYS; } public TriggerPolicy<IN> getTrigger() { return triggerPolicy; } public EvictionPolicy<IN> getEviction() { return evictionPolicy; } @Override public void processElement(StreamRecord<IN> element) throws Exception { processRealElement(element); } /** * This method processed an arrived real element The method is synchronized * to ensure that it cannot interleave with * {@link StreamDiscretizer#triggerOnFakeElement(Object)} * * @param input * a real input element * @throws Exception */ protected synchronized void processRealElement(StreamRecord<IN> input) throws Exception { // Setting the input element in order to avoid NullFieldException when triggering on fake element windowEvent.setElement(input.getValue()); if (isActiveTrigger) { ActiveTriggerPolicy<IN> trigger = (ActiveTriggerPolicy<IN>) triggerPolicy; Object[] result = trigger.preNotifyTrigger(input.getValue()); for (Object in : result) { triggerOnFakeElement(in); } } boolean isTriggered = false; if (triggerPolicy.notifyTrigger(input.getValue())) { emitWindow(); isTriggered = true; } evict(input.getValue(), isTriggered); output.collect(input.replace(windowEvent.setElement(input.getValue()))); bufferSize++; } /** * This method triggers on an arrived fake element The method is * synchronized to ensure that it cannot interleave with * {@link StreamDiscretizer#processRealElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord)} * * @param input * a fake input element */ @SuppressWarnings("unchecked") protected synchronized void triggerOnFakeElement(Object input) { if (isActiveEviction) { activeEvict(input); emitWindow(); } else { emitWindow(); evict((IN) input, true); } } /** * This method emits the content of the buffer as a new {@link StreamWindow} * if not empty */ protected void emitWindow() { output.collect(new StreamRecord<WindowEvent<IN>>(windowEvent.setTrigger())); } private void activeEvict(Object input) { int numToEvict = 0; if (isActiveEviction) { ActiveEvictionPolicy<IN> ep = (ActiveEvictionPolicy<IN>) evictionPolicy; numToEvict = ep.notifyEvictionWithFakeElement(input, bufferSize); } if (numToEvict > 0) { output.collect(new StreamRecord<WindowEvent<IN>>(windowEvent.setEviction(numToEvict))); bufferSize -= numToEvict; bufferSize = bufferSize >= 0 ? bufferSize : 0; } } private void evict(IN input, boolean isTriggered) { int numToEvict = evictionPolicy.notifyEviction(input, isTriggered, bufferSize); if (numToEvict > 0) { output.collect(new StreamRecord<WindowEvent<IN>>(windowEvent.setEviction(numToEvict))); bufferSize -= numToEvict; bufferSize = bufferSize >= 0 ? bufferSize : 0; } } @Override public void open(org.apache.flink.configuration.Configuration parameters) throws Exception { super.open(parameters); if (isActiveTrigger) { ActiveTriggerPolicy<IN> tp = (ActiveTriggerPolicy<IN>) triggerPolicy; Runnable runnable = tp.createActiveTriggerRunnable(new WindowingCallback()); if (runnable != null) { activePolicyThread = new Thread(runnable); activePolicyThread.start(); } } } @Override public void close() throws Exception { super.close(); if (activePolicyThread != null) { activePolicyThread.interrupt(); } emitWindow(); } /** * This class allows the active trigger thread to call back and push fake * elements at any time. */ private class WindowingCallback implements ActiveTriggerCallback { @Override public void sendFakeElement(Object datapoint) { triggerOnFakeElement(datapoint); } } @Override public boolean equals(Object other) { if (other == null || !(other instanceof StreamDiscretizer) || (other instanceof GroupedStreamDiscretizer)) { return false; } else { try { @SuppressWarnings("unchecked") StreamDiscretizer<IN> otherDiscretizer = (StreamDiscretizer<IN>) other; return triggerPolicy.equals(otherDiscretizer.triggerPolicy) && evictionPolicy.equals(otherDiscretizer.evictionPolicy); } catch (ClassCastException e) { return false; } } } @Override public String toString() { return "Discretizer(Trigger: " + triggerPolicy.toString() + ", Eviction: " + evictionPolicy.toString() + ")"; } @Override public void processWatermark(Watermark mark) throws Exception { output.emitWatermark(mark); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
6acf759b04b016fe04570c4596e21db8e4e344ca
a64babafa9b1527ed371c33611164e0d68d0cfc5
/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerOperationInterceptor.java
69b97384922480256782a394dee86d5d95a46737
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
bunyaminsg/hapi-fhir
dc8b6971af93bdd37964e8e49cdaab2688adf958
fe24841350733b1d3dc1d60a7f300b644fb3e25a
refs/heads/master
2021-01-13T13:21:44.856442
2017-01-10T00:00:56
2017-01-10T00:00:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,445
java
package ca.uhn.fhir.rest.server.interceptor; /* * #%L * HAPI FHIR - Core Library * %% * Copyright (C) 2014 - 2017 University Health Network * %% * 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. * #L% */ import org.hl7.fhir.instance.model.api.IBaseResource; import ca.uhn.fhir.rest.method.RequestDetails; public interface IServerOperationInterceptor { /** * User code may call this method to indicate to an interceptor that * a resource is being deleted */ void resourceDeleted(RequestDetails theRequest, IBaseResource theResource); /** * User code may call this method to indicate to an interceptor that * a resource is being created */ void resourceCreated(RequestDetails theRequest, IBaseResource theResource); /** * User code may call this method to indicate to an interceptor that * a resource is being updated */ void resourceUpdated(RequestDetails theRequest, IBaseResource theResource); }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
bdf9b36b98f09d2061a50a86725e02aa6f97f5c2
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/317aa7055d3b7337ab43b73863692d1288ca246c473f9fd176bc737a7c3e1e08c37a15603cfb7bfc86f7bc2dcc239967b79b605aec11f86ae3ab90dc140b540f/004/mutations/366/grade_317aa705_004.java
cb49f95e10926e3740204e9751e7e5390bd0e933
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,925
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_317aa705_004 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_317aa705_004 mainClass = new grade_317aa705_004 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { FloatObj A = new FloatObj (), B = new FloatObj (), C = new FloatObj (), D = new FloatObj (), percent = new FloatObj (); CharObj grade = new CharObj (); output += (String.format ("Enter thresholds for A, B, C, D\nin that order, decreasing percentages >")); A.value = scanner.nextFloat (); B.value = scanner.nextFloat (); C.value = scanner.nextFloat (); D.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) >")); percent.value = scanner.nextFloat (); if (percent.value == 0 && percent.value < A.value && percent.value < B.value && percent.value < C.value && percent.value < D.value) { output += (String.format ("Student has failed the course\n")); } else if (percent.value >= A.value) { grade.value = 'A'; } else if ((percent.value < A.value) && (percent.value >= B.value)) { grade.value = 'B'; } else if ((percent.value < B.value) && (percent.value >= C.value)) { grade.value = 'C'; } else if ((percent.value < C.value) && (percent.value >= D.value)) { grade.value = 'D'; } else if ((percent.value < D.value) && (percent.value > 0)) { grade.value = 'F'; } if (((percent.value) < (C.value)) && ((percent.value) >= (D.value))) { grade.value = 'D';}else if (((percent.value) < (D.value)) && ((percent.value) > 0)) { grade.value = 'F'; } output += (String.format ("Student has an %c grade\n", grade.value)); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
66068cc289a611be7bef146a53e9cd0a98dd6509
341ed102cd8c2e7ab9e07af58daed3c28253c1c9
/SistemaFat/SistemaFaturamento/src/gcom/gui/cadastro/sistemaparametro/ExibirFiltrarSistemaAlteracaoHistoricoAction.java
46c19f89023646821659d53b1141b07ab2cb8052
[]
no_license
Relesi/Stream
a2a6772c4775a66a753d5cc830c92f1098329270
15710d5a2bfb5e32ff8563b6f2e318079bcf99d5
refs/heads/master
2021-01-01T17:40:52.530660
2017-08-21T22:57:02
2017-08-21T22:57:02
98,132,060
2
0
null
null
null
null
ISO-8859-1
Java
false
false
5,128
java
/* * Copyright (C) 2007-2007 the GSAN - Sistema Integrado de Gestão de Serviços de Saneamento * * This file is part of GSAN, an integrated service management system for Sanitation * * GSAN is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License. * * GSAN is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ /* * GSAN - Sistema Integrado de Gestão de Serviços de Saneamento * Copyright (C) <2007> * Adriano Britto Siqueira * Alexandre Santos Cabral * Ana Carolina Alves Breda * Ana Maria Andrade Cavalcante * Aryed Lins de Araújo * Bruno Leonardo Rodrigues Barros * Carlos Elmano Rodrigues Ferreira * Cláudio de Andrade Lira * Denys Guimarães Guenes Tavares * Eduardo Breckenfeld da Rosa Borges * Fabíola Gomes de Araújo * Flávio Leonardo Cavalcanti Cordeiro * Francisco do Nascimento Júnior * Homero Sampaio Cavalcanti * Ivan Sérgio da Silva Júnior * José Edmar de Siqueira * José Thiago Tenório Lopes * Kássia Regina Silvestre de Albuquerque * Leonardo Luiz Vieira da Silva * Márcio Roberto Batista da Silva * Maria de Fátima Sampaio Leite * Micaela Maria Coelho de Araújo * Nelson Mendonça de Carvalho * Newton Morais e Silva * Pedro Alexandre Santos da Silva Filho * Rafael Corrêa Lima e Silva * Rafael Francisco Pinto * Rafael Koury Monteiro * Rafael Palermo de Araújo * Raphael Veras Rossiter * Roberto Sobreira Barbalho * Rodrigo Avellar Silveira * Rosana Carvalho Barbosa * Sávio Luiz de Andrade Cavalcante * Tai Mu Shih * Thiago Augusto Souza do Nascimento * Tiago Moreno Rodrigues * Vivianne Barbosa Sousa * * Este programa é software livre; você pode redistribuí-lo e/ou * modificá-lo sob os termos de Licença Pública Geral GNU, conforme * publicada pela Free Software Foundation; versão 2 da * Licença. * Este programa é distribuído na expectativa de ser útil, mas SEM * QUALQUER GARANTIA; sem mesmo a garantia implícita de * COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM * PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais * detalhes. * Você deve ter recebido uma cópia da Licença Pública Geral GNU * junto com este programa; se não, escreva para Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307, USA. */ package gcom.gui.cadastro.sistemaparametro; import gcom.fachada.Fachada; import gcom.gui.GcomAction; import gcom.seguranca.acesso.Funcionalidade; import gcom.util.filtro.ParametroSimples; import gcom.util.tabelaauxiliar.abreviada.FiltroTabelaAuxiliarAbreviada; import java.util.Collection; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * [UC0501]Filtrar Sistema Alteracao Historico * * @author Kássia Albuquerque * @date 27/11/2006 */ public class ExibirFiltrarSistemaAlteracaoHistoricoAction extends GcomAction { public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { ActionForward retorno = actionMapping.findForward("filtrarSistemaAlteracaoHistorico"); Fachada fachada = Fachada.getInstancia(); FiltrarSistemaAlteracaoHistoricoActionForm form = (FiltrarSistemaAlteracaoHistoricoActionForm) actionForm; // -- [UC0501]Filtrar Sistema Alteracao Historico // -- [FS0001] Verificar Existência da Funcionalidade -- if (form.getIdFuncionalidade() != null && !form.getIdFuncionalidade().equals("")) { FiltroTabelaAuxiliarAbreviada filtroTabelaAuxiliarAbreviada = new FiltroTabelaAuxiliarAbreviada(); filtroTabelaAuxiliarAbreviada.adicionarParametro(new ParametroSimples(FiltroTabelaAuxiliarAbreviada.ID, form .getIdFuncionalidade())); Collection colecaoFuncionalidade = fachada.pesquisar(filtroTabelaAuxiliarAbreviada, Funcionalidade.class.getName()); if (colecaoFuncionalidade != null && !colecaoFuncionalidade.isEmpty()) { Funcionalidade funcionalidade = (Funcionalidade) colecaoFuncionalidade.iterator().next(); form.setDescricaoFuncionalidade(funcionalidade.getDescricao()); } else { httpServletRequest.setAttribute("funcionalidadeEncontrada", "exception"); form.setIdFuncionalidade(""); form.setDescricaoFuncionalidade("FUNCIONALIDADE INEXISTENTE"); } } if (httpServletRequest.getParameter("menu")!= null && !httpServletRequest.getParameter("menu").equals("")){ httpServletRequest.setAttribute("nomeCampo", "idFuncionalidade"); } return retorno; } }
[ "renatolessa.2011@hotmail.com" ]
renatolessa.2011@hotmail.com
cffa0e8eb7120552ab9503fb3aadf7d12ab21df2
51aef8e206201568d04fb919bf54a3009c039dcf
/trunk/src/org/fenggui/util/fonttoolkit/Convolution.java
c699cce2c95d4c93ebea6133331fb3e5f344c632
[]
no_license
lihak/fairytale-soulfire-svn-to-git
0b8bdbfcaf774f13fc3d32cc3d3a6fae64f29c81
a85eb3fc6f4edf30fef9201902fcdc108da248e4
refs/heads/master
2021-02-11T15:25:47.199953
2015-12-28T14:48:14
2015-12-28T14:48:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,494
java
/* * FengGUI - Java GUIs in OpenGL (http://www.fenggui.org) * * Copyright (c) 2005, 2006 FengGUI Project * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details: * http://www.gnu.org/copyleft/lesser.html#TOC3 * * Created on Jan 31, 2006 * $Id: Convolution.java 28 2006-10-05 01:37:07Z schabby $ */ package org.fenggui.util.fonttoolkit; import java.awt.Color; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; /** * Performs a kernel convulition on the character image. * * * Normalization can darken the image. * * @author Johannes Schaback, last edited by $Author: schabby $, $Date: 2006-10-05 03:37:07 +0200 (Do, 05 Okt 2006) $ * @version $Revision: 28 $ */ public class Convolution extends RenderStage { private Kernel kernel = null; private boolean normalize = false; public Convolution(Kernel kernel, boolean normalize) { this.kernel = kernel; this.normalize = normalize; } public void renderChar(FontMetrics fontMetrics, BufferedImage image, char c, int safetyMargin) { double[][] red = new double[image.getWidth()][image.getHeight()]; double[][] green = new double[image.getWidth()][image.getHeight()]; double[][] blue = new double[image.getWidth()][image.getHeight()]; double[][] alpha = new double[image.getWidth()][image.getHeight()]; ColorModel cm = image.getColorModel(); for(int x=kernel.getWidth()/2; x < image.getWidth()-kernel.getWidth()/2; x++) { for(int y=kernel.getHeight()/2; y < image.getHeight()-kernel.getHeight()/2; y++) { for(int j=0 ; j<kernel.getWidth(); j++) { for(int k=0; k<kernel.getHeight(); k++) { int rgb = image.getRGB( x+j-kernel.getWidth()/2, y+k-kernel.getHeight()/2); double value = kernel.getValue(j, k); red[x][y] += cm.getRed(rgb)*value; green[x][y] += cm.getGreen(rgb)*value; blue[x][y] += cm.getBlue(rgb)*value; alpha[x][y] += cm.getAlpha(rgb)*value; } } } } if(normalize) { normalize(red, green, blue, alpha); } Graphics2D g = image.createGraphics(); Clear.clear(g, image.getWidth(), image.getHeight()); for(int x=0; x < image.getWidth(); x++) { for(int y=0; y < image.getHeight(); y++) { if(red[x][y] > 255) red[x][y] = 255; if(green[x][y] > 255) green[x][y] = 255; if(blue[x][y] > 255) blue[x][y] = 255; if(alpha[x][y] > 255) alpha[x][y] = 255; if(red[x][y] < 0) red[x][y] = 0; if(green[x][y] < 0) green[x][y] = 0; if(blue[x][y] < 0) blue[x][y] = 0; if(alpha[x][y] < 0) alpha[x][y] = 0; // @todo optimize drawing the image with image.setRGB # Color color = new Color((int)red[x][y], (int)green[x][y], (int)blue[x][y], (int)alpha[x][y]); g.setColor(color); g.drawLine(x, y, x, y); } } } private void normalize(double[][] red, double[][] green, double[][] blue, double[][] alpha) { double max = 0; double min = 0; for(int x=0; x < red.length; x++) { for(int y=0; y < red[0].length; y++) { max = Math.max(red[x][y], max); max = Math.max(green[x][y], max); max = Math.max(blue[x][y], max); max = Math.max(alpha[x][y], max); min = Math.min(red[x][y], min); min = Math.min(green[x][y], min); min = Math.min(blue[x][y], min); min = Math.min(alpha[x][y], min); } } double scale = 255.0/(max-min); //System.out.println("max: "+max+" "+min+"\t"+scale); for(int x=0; x < red.length; x++) { for(int y=0; y < red[0].length; y++) { //System.out.println("prev "+red[x][y]); red[x][y] = red[x][y]*scale - min; green[x][y] = green[x][y]*scale - min; blue[x][y] = blue[x][y]*scale - min; alpha[x][y] = alpha[x][y]*scale - min; //System.out.println("after "+red[x][y]); } } } }
[ "you@example.com" ]
you@example.com
b97818ec787b060dc7522873227a3ee988487d4c
6437240eddd7c33372fccab081395d4c6d45aa92
/repcomModulo/template/src/main/java/br/com/lojadigicom/repcom/template/lista/CategoriaProdutoProdutoListAdapterBase.java
73e418be9070b4016086548e598b8f8391629689
[]
no_license
paulofor/projeto-android-aplicacao
49a530533496ec4a11dcb0a86ed9e9b75f2f9a4a
2aa9c244a830f12cf120f45727d7474203619c59
refs/heads/master
2021-01-05T06:04:29.225920
2020-02-16T14:45:25
2020-02-16T14:45:25
240,908,240
0
0
null
null
null
null
UTF-8
Java
false
false
5,077
java
package br.com.lojadigicom.repcom.template.lista; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import br.com.lojadigicom.repcom.framework.log.DCLog; import br.com.lojadigicom.repcom.framework.tela.ResourceObj; import br.com.lojadigicom.repcom.framework.util.ItemChoiceManager; import java.util.List; import br.com.lojadigicom.repcom.modelo.CategoriaProdutoProduto; import com.bumptech.glide.Glide; import android.widget.ImageView; import br.com.lojadigicom.repcom.template.R; import br.com.lojadigicom.repcom.framework.storage.DownloadImageTask; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import br.com.lojadigicom.repcom.template.R; /** * Created by Gerador de Codigo. */ public abstract class CategoriaProdutoProdutoListAdapterBase extends RecyclerView.Adapter<CategoriaProdutoProdutoListViewHolderBase>{ //protected Cursor mCursor; protected List<CategoriaProdutoProduto> mLista; private Context mContext; private CategoriaProdutoProdutoListAdapterOnClickHandler mClickHandler; private View mEmptyView; private ItemChoiceManager mICM = null; protected ResourceObj resourceObj = getLayoutItemResource(); public CategoriaProdutoProdutoListAdapterBase(Context context, CategoriaProdutoProdutoListAdapterOnClickHandler dh, View emptyView, int choiceMode) { mContext = context; mClickHandler = dh; mEmptyView = emptyView; //mICM = new ItemChoiceManager(this); //mICM.setChoiceMode(choiceMode); } @Override public final CategoriaProdutoProdutoListViewHolderBase onCreateViewHolder(ViewGroup parent, int viewType) { if ( parent instanceof RecyclerView ) { int layoutId = -1; layoutId = this.resourceObj.getCodigo(); View view = LayoutInflater.from(parent.getContext()).inflate(layoutId, parent, false); // For?ando para o item de lista aparecer sem erros. ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); view.setLayoutParams(lp); view.setFocusable(true); CategoriaProdutoProdutoListViewHolderBase saida = getViewHolder(view); //DCLog.d(DCLog.TRACE_DISPLAY,this,"(Adapter)" + this.getClass().getSimpleName() + " / " + saida.getClass().getSimpleName()); saida.setLista(this.mLista); saida.setOnClickHandler(this.mClickHandler); return saida; } else { throw new RuntimeException("Not bound to RecyclerView"); } } //protected abstract int getItemLayoutId() ; protected abstract ResourceObj getLayoutItemResource(); protected abstract CategoriaProdutoProdutoListViewHolderBase getViewHolder(View v); public String getLayoutItem() { return resourceObj.getNome(); } @Override public final int getItemCount() { if ( null == mLista) return 0; return mLista.size(); } public final void onRestoreInstanceState(Bundle savedInstanceState) { //mICM.onRestoreInstanceState(savedInstanceState); } public final void onSaveInstanceState(Bundle outState) { //mICM.onSaveInstanceState(outState); } public final void swapCursor(List<CategoriaProdutoProduto> novaLista) { //mCursor = newCursor; mLista = novaLista; notifyDataSetChanged(); mEmptyView.setVisibility(getItemCount() == 0 ? View.VISIBLE : View.GONE); } public static interface CategoriaProdutoProdutoListAdapterOnClickHandler { void onClick(int id, CategoriaProdutoProdutoListViewHolderBase vh); } @Override public void onBindViewHolder(CategoriaProdutoProdutoListViewHolderBase holder, int position) { CategoriaProdutoProduto obj = mLista.get(position); holder.setItem(obj); onBindViewHolderDC(obj,holder,position); } protected abstract void onBindViewHolderDC(CategoriaProdutoProduto item,CategoriaProdutoProdutoListViewHolderBase holder, int position); //protected void setImagemFromUrl(ImageView obj, String urlImagem) { // new DownloadImageTask(obj).execute(urlImagem); //} /* protected void setImagemFromUrl(ImageView obj, String urlImagem) { Glide.with(mContext) .load(urlImagem) .asBitmap() .error(R.drawable.img_nao_disponivel) .into(obj) .getRequest(); } */ protected void carregaImagemCache(String urlImagem, ImageView viewImagem) { Glide.with(mContext) .load(urlImagem) .error(R.drawable.img_nao_disponivel) .diskCacheStrategy(DiskCacheStrategy.ALL) .into(viewImagem); } }
[ "paulofore@gmail.com" ]
paulofore@gmail.com
25fd7cce8f4a1f02d6a0a7c1ab3d96acb377b6aa
a07400d5ce31e5696c923195c2a500a04d7dd7a6
/src/main/java/ca/marcmeszaros/papyrus/browser/BookDetails.java
1df8fde9f4d3b47d2f1064b78ecf16ac34b918b0
[ "Apache-2.0" ]
permissive
MarcMeszaros/papyrus
cf705f792307fcf41e693d33978f5e29d3218dac
f27da7be94ce225cececc7bf966737fcb9d2d3c4
refs/heads/master
2021-01-01T15:23:26.716043
2014-05-20T04:47:12
2014-05-20T04:47:12
19,962,179
0
0
null
null
null
null
UTF-8
Java
false
false
4,994
java
/** * Copyright 2011 Marc Meszaros * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ca.marcmeszaros.papyrus.browser; import ca.marcmeszaros.papyrus.R; import ca.marcmeszaros.papyrus.database.Book; import ca.marcmeszaros.papyrus.provider.PapyrusContentProvider; import ca.marcmeszaros.papyrus.tools.TNManager; import android.app.Activity; import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.EditText; import android.widget.ImageView; import android.widget.SimpleCursorAdapter; import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; public class BookDetails extends Activity implements OnClickListener { private EditText quantity; private Spinner library; private Book book; private ContentResolver resolver; /** * Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_book_details); // get the content resolver for the activity resolver = getContentResolver(); Bundle bundle = getIntent().getExtras(); this.book = bundle.getParcelable("book"); findViewById(R.id.BookDetails_book_update_button).setOnClickListener(this); // get handles on all the elements in the layout ImageView cover = (ImageView) findViewById(R.id.BookDetails_book_cover); TextView title = (TextView) findViewById(R.id.BookDetails_book_title); TextView author = (TextView) findViewById(R.id.BookDetails_book_author); TextView publisher = (TextView) findViewById(R.id.BookDetails_book_publisher); TextView isbn10 = (TextView) findViewById(R.id.BookDetails_book_isbn10); TextView isbn13 = (TextView) findViewById(R.id.BookDetails_book_isbn13); this.quantity = (EditText) findViewById(R.id.BookDetails_book_quantity); this.library = (Spinner) findViewById(R.id.BookDetails_book_library); // fill in all the values we can from the book object title.setText(book.getTitle()); author.setText(book.getAuthor()); publisher.setText(book.getPublisher()); isbn10.setText(book.getISBN10()); isbn13.setText(book.getISBN13()); quantity.setText(String.valueOf(book.getQuantity())); // get the library the book belongs to Cursor result = resolver.query(PapyrusContentProvider.Libraries.CONTENT_URI, null, null, null, PapyrusContentProvider.Libraries.FIELD_NAME); startManagingCursor(result); // specify what fields to map to what views String[] from = { PapyrusContentProvider.Libraries.FIELD_NAME }; int[] to = { android.R.id.text1 }; // create a cursor adapter and set it to the list SimpleCursorAdapter adp = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_item, result, from, to); adp.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); library.setAdapter(adp); // set the spinner selection to the matching default library id for (int i = 0; i < library.getCount(); i++) { Cursor value = (Cursor) library.getItemAtPosition(i); long id = value.getLong(value.getColumnIndex(PapyrusContentProvider.Libraries.FIELD_ID)); if (id == book.getLibraryID()) { library.setSelection(i); } } // set the thumbnail if (book.getISBN10() != null && TNManager.getThumbnail(book.getISBN10()).exists()) { cover.setImageURI(Uri.parse(TNManager.getThumbnail(book.getISBN10()).getAbsolutePath())); } else if (book.getISBN13() != null && TNManager.getThumbnail(book.getISBN13()).exists()) { cover.setImageURI(Uri.parse(TNManager.getThumbnail(book.getISBN13()).getAbsolutePath())); } } @Override public void onClick(View v) { switch (v.getId()) { case R.id.BookDetails_book_update_button: // create the update query ContentValues values = new ContentValues(); values.put(PapyrusContentProvider.Books.FIELD_QUANTITY, Integer.parseInt(quantity.getText().toString())); values.put(PapyrusContentProvider.Books.FIELD_LIBRARY_ID, library.getSelectedItemId()); // update the right book Uri updateBook = ContentUris.withAppendedId(PapyrusContentProvider.Books.CONTENT_URI, book.getBookID()); resolver.update(updateBook, values, null, null); Toast.makeText(this, getString(R.string.BookDetails_book_update_toast), Toast.LENGTH_LONG).show(); break; } } }
[ "devnull@localhost" ]
devnull@localhost
b6edc903360dd6f8725e304ba0ee748cc290301b
b032387a79714a05a1df5afcff96c9dbcc66eac3
/app/src/main/java/com/car/notver/weight/FinishActivityManager.java
dfc6c8d01cdd6457f9d10f4c828bdd5e0528fb53
[]
no_license
aq610428/CarProject
9f6e9431738885a1dfe4c691d4a0c2fbb27dba7c
3c2f9f52eaa5e846b19d3e517cb387d45cb2e210
refs/heads/master
2023-03-06T01:52:56.051462
2021-02-22T02:17:03
2021-02-22T02:17:03
271,738,939
1
0
null
null
null
null
UTF-8
Java
false
false
6,398
java
package com.car.notver.weight; import android.app.Activity; import android.app.ActivityManager; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import java.lang.ref.WeakReference; import java.util.Iterator; import java.util.List; import java.util.Stack; import static android.content.Context.ACTIVITY_SERVICE; /** * activity管理类 */ public class FinishActivityManager { private FinishActivityManager() { } private static FinishActivityManager sManager; private Stack<WeakReference<Activity>> mActivityStack; public static FinishActivityManager getManager() { if (sManager == null) { synchronized (FinishActivityManager.class) { if (sManager == null) { sManager = new FinishActivityManager(); } } } return sManager; } public boolean isExistMainActivity(Class<?> activity, Context context) { Intent intent = new Intent(context, activity); ComponentName cmpName = intent.resolveActivity(context.getPackageManager()); boolean flag = false; if (cmpName != null) {// 说明系统中存在这个activity ActivityManager am = (ActivityManager) context.getSystemService(ACTIVITY_SERVICE); List<ActivityManager.RunningTaskInfo> taskInfoList = am.getRunningTasks(10);//获取从栈顶开始往下查找的10个activity for (ActivityManager.RunningTaskInfo taskInfo : taskInfoList) { if (taskInfo.baseActivity.equals(cmpName)) {// 说明它已经启动了 flag = true; break;//跳出循环,优化效率 } } } return flag;//true 存在 falese 不存在 } /** * 添加Activity到栈 * * @param activity */ public void addActivity(Activity activity) { if (mActivityStack == null) { mActivityStack = new Stack<>(); } mActivityStack.add(new WeakReference<>(activity)); } /** * 检查弱引用是否释放,若释放,则从栈中清理掉该元素 */ public void checkWeakReference() { if (mActivityStack != null) { // 使用迭代器进行安全删除 for (Iterator<WeakReference<Activity>> it = mActivityStack.iterator(); it.hasNext(); ) { WeakReference<Activity> activityReference = it.next(); Activity temp = activityReference.get(); if (temp == null) { it.remove(); } } } } /** * 获取当前Activity(栈中最后一个压入的) * * @return */ public Activity currentActivity() { checkWeakReference(); if (mActivityStack != null && !mActivityStack.isEmpty()) { return mActivityStack.lastElement().get(); } return null; } /** * 关闭当前Activity(栈中最后一个压入的) */ public void finishActivity() { Activity activity = currentActivity(); if (activity != null) { finishActivity(activity); } } /** * 关闭指定的Activity * * @param activity */ public void finishActivity(Activity activity) { if (activity != null && mActivityStack != null) { // 使用迭代器进行安全删除 for (Iterator<WeakReference<Activity>> it = mActivityStack.iterator(); it.hasNext(); ) { WeakReference<Activity> activityReference = it.next(); Activity temp = activityReference.get(); // 清理掉已经释放的activity if (temp == null) { it.remove(); continue; } if (temp == activity) { it.remove(); } } activity.finish(); } } /** * 得到指定类名的Activity */ public Activity getActivity(Class<?> cls) { Activity activity = null; if (mActivityStack != null) { for (Iterator<WeakReference<Activity>> it = mActivityStack.iterator(); it.hasNext(); ) { WeakReference<Activity> activityReference = it.next(); activity = activityReference.get(); // 清理掉已经释放的activity if (activity == null) { it.remove(); continue; } if (activity.getClass().equals(cls)) { it.remove(); } } } return activity; } /** * 关闭指定类名的所有Activity * * @param cls */ public void finishActivity(Class<?> cls) { if (mActivityStack != null) { // 使用迭代器进行安全删除 for (Iterator<WeakReference<Activity>> it = mActivityStack.iterator(); it.hasNext(); ) { WeakReference<Activity> activityReference = it.next(); Activity activity = activityReference.get(); // 清理掉已经释放的activity if (activity == null) { it.remove(); continue; } if (activity.getClass().equals(cls)) { it.remove(); activity.finish(); } } } } /** * 结束所有Activity */ public void finishAllActivity() { if (mActivityStack != null) { for (WeakReference<Activity> activityReference : mActivityStack) { Activity activity = activityReference.get(); if (activity != null) { activity.finish(); } } mActivityStack.clear(); } } /** * 退出应用程序 */ public void exitApp() { try { finishAllActivity(); // 退出JVM,释放所占内存资源,0表示正常退出 System.exit(0); // 从系统中kill掉应用程序 android.os.Process.killProcess(android.os.Process.myPid()); } catch (Exception e) { e.printStackTrace(); } } }
[ "641897605@qq.com" ]
641897605@qq.com
d68fe3ff631620f1ebbdbe9c5e7eb2ce11f3b5d4
47b7aab1d865bc36b5727fb61fd6c6fa84fe6365
/modules/rmi/test/org/apache/axis2/rmi/databind/ExtensionRequestResponseTest.java
db421a453314b8e6e675b00afb1ab19015771b80
[ "Apache-2.0" ]
permissive
wso2/wso2-axis2
a4150ad2acc0d5d26dae69983ca6b6ea80dc22ab
8492fe63852762f51643d7520481198434aff236
refs/heads/master
2023-09-05T02:40:36.069413
2023-08-23T03:19:35
2023-08-23T03:19:35
16,400,174
40
215
Apache-2.0
2023-08-23T02:48:14
2014-01-31T05:15:02
Java
UTF-8
Java
false
false
4,897
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.axis2.rmi.databind; import org.apache.axis2.rmi.Configurator; import org.apache.axis2.rmi.databind.dto.ChildClass; import org.apache.axis2.rmi.databind.service.Service3; import org.apache.axis2.rmi.metadata.Operation; import org.apache.axis2.rmi.metadata.Service; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; public class ExtensionRequestResponseTest extends RequestResponseTest { protected void setUp() throws Exception { this.serviceClass = Service3.class; this.serviceObject = new Service3(); this.configurator = new Configurator(); this.configurator.addExtension(ChildClass.class); this.processedMap = new HashMap(); this.schemaMap = new HashMap(); this.service = new Service(this.serviceClass, this.configurator); this.service.populateMetaData(); this.service.generateSchema(); this.javaObjectSerializer = new JavaObjectSerializer(service.getProcessedTypeMap(), this.service.getConfigurator(), this.service.getSchemaMap()); this.xmlStreamParser = new XmlStreamParser(service.getProcessedTypeMap(), this.service.getConfigurator(), this.service.getSchemaMap()); } public void testMethod1(){ try { // first create service data Operation operation = this.service.getOperation("method1"); // get objects after serialization and deserialization. // this returned objects mustbe identical with the original array list elements List inputObjects = new ArrayList(); ChildClass childClass = new ChildClass(); childClass.setParam1("test param1"); childClass.setParam2(5); childClass.setParam3(23.45f); childClass.setParam4(34.5); inputObjects.add(childClass); Object[] objects = getInputObject(inputObjects, operation); ChildClass object = (ChildClass) operation.getJavaMethod().invoke(this.serviceObject, objects); ChildClass returnObject = (ChildClass) getReturnObject(object, operation); assertEquals(returnObject.getParam1(),"test param1"); assertEquals(returnObject.getParam2(),5); assertTrue(childClass.getParam3() == 23.45f); assertTrue(childClass.getParam4() == 34.5); } catch (Exception e) { fail(); } } public void testMethod21(){ try { // first create service data Operation operation = this.service.getOperation("method2"); // get objects after serialization and deserialization. // this returned objects mustbe identical with the original array list elements List inputObjects = new ArrayList(); inputObjects.add(new Object()); Object[] objects = getInputObject(inputObjects, operation); Object object = operation.getJavaMethod().invoke(this.serviceObject, objects); Object returnObject = getReturnObject(object, operation); assertNotNull(returnObject); } catch (Exception e) { fail(); } } public void testMethod22(){ try { // first create service data Operation operation = this.service.getOperation("method2"); // get objects after serialization and deserialization. // this returned objects mustbe identical with the original array list elements List inputObjects = new ArrayList(); Date date = new Date(); inputObjects.add(date); Object[] objects = getInputObject(inputObjects, operation); Date object = (Date) operation.getJavaMethod().invoke(this.serviceObject, objects); Date returnObject = (Date) getReturnObject(object, operation); assertEquals(returnObject.getDate(),date.getDate()); } catch (Exception e) { fail(); } } }
[ "eranda@wso2.com" ]
eranda@wso2.com
48e272cd9dac5089c327cb31027b98ca5d97ae70
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a007/A007292Test.java
d0555e90896d062d7ffa5de517d900a6660fa808
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a007; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A007292Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
6e4d2af2ab5a9b11766f3fb3c0fb3e032040d56f
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
/src/main/java/com/alipay/api/domain/KoubeiServindustryPortfolioDataModifyModel.java
269146f8b1d2f785fea45edd2573e18e44b24d7c
[ "Apache-2.0" ]
permissive
zhoujiangzi/alipay-sdk-java-all
00ef60ed9501c74d337eb582cdc9606159a49837
560d30b6817a590fd9d2c53c3cecac0dca4449b3
refs/heads/master
2022-12-26T00:27:31.553428
2020-09-07T03:39:05
2020-09-07T03:39:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,297
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 系统商修改作品集 * * @author auto create * @since 1.0, 2020-06-18 11:56:34 */ public class KoubeiServindustryPortfolioDataModifyModel extends AlipayObject { private static final long serialVersionUID = 3318215752513894988L; /** * 头图素材ID */ @ApiField("cover_media_id") private String coverMediaId; /** * 头图素材type,枚举(PICTURE/VIDEO),更改头图时必传 */ @ApiField("cover_media_type") private String coverMediaType; /** * 作品集id */ @ApiField("portfolio_id") private String portfolioId; /** * 操作人信息 */ @ApiField("portfolio_operator_info") private PortfolioOperatorInfo portfolioOperatorInfo; /** * 作品集门店关系&展示权重,需要传要关联的全部店铺,更新模式为覆盖 */ @ApiListField("portfolio_shops") @ApiField("portfolio_shop") private List<PortfolioShop> portfolioShops; /** * 作品集标题 */ @ApiField("title") private String title; public String getCoverMediaId() { return this.coverMediaId; } public void setCoverMediaId(String coverMediaId) { this.coverMediaId = coverMediaId; } public String getCoverMediaType() { return this.coverMediaType; } public void setCoverMediaType(String coverMediaType) { this.coverMediaType = coverMediaType; } public String getPortfolioId() { return this.portfolioId; } public void setPortfolioId(String portfolioId) { this.portfolioId = portfolioId; } public PortfolioOperatorInfo getPortfolioOperatorInfo() { return this.portfolioOperatorInfo; } public void setPortfolioOperatorInfo(PortfolioOperatorInfo portfolioOperatorInfo) { this.portfolioOperatorInfo = portfolioOperatorInfo; } public List<PortfolioShop> getPortfolioShops() { return this.portfolioShops; } public void setPortfolioShops(List<PortfolioShop> portfolioShops) { this.portfolioShops = portfolioShops; } public String getTitle() { return this.title; } public void setTitle(String title) { this.title = title; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
35c1f458294d0a31dd9427370dc61a28748259c7
3f62e9241f37b5d39ca8c885f308ee3971fdf7b8
/iotsys-xacml/src/an/xacml/policy/Obligation.java
16636859ed4ed3d87ca8d7f1d34722a425591c8e
[]
no_license
niclash/iotsys
e014617c175a9e5b8648195459fdc53cce6b0a53
4d8a60d31b921306bae1069d082e451968ec8e5a
refs/heads/master
2021-01-22T18:23:46.892442
2014-09-10T15:34:52
2014-09-10T15:34:52
32,944,656
0
1
null
null
null
null
UTF-8
Java
false
false
2,531
java
package an.xacml.policy; import java.net.URI; import an.xacml.DefaultXACMLElement; import an.xml.XMLDataTypeMappingException; public class Obligation extends DefaultXACMLElement { private AttributeAssignment[] attributeAssignments; private final URI obligationId; private final Effect fulfillOn; public Obligation(URI oId, Effect fulfillOn, AttributeAssignment[] attrAssignments) { this.obligationId = oId; this.fulfillOn = fulfillOn; this.attributeAssignments = attrAssignments; } /** * A copy constructor which is used to create a new Obligation instance from an existing one. * @param obl */ public Obligation(Obligation obl) { this.obligationId = obl.obligationId; this.fulfillOn = obl.fulfillOn; if (obl.attributeAssignments == null) { this.attributeAssignments = null; } else { this.attributeAssignments = new AttributeAssignment[obl.attributeAssignments.length]; try { for (int i = 0; i < obl.attributeAssignments.length; i ++) { this.attributeAssignments[i] = new AttributeAssignment(obl.attributeAssignments[i]); } } // This should not be happen catch (XMLDataTypeMappingException ex) {} } } public URI getObligationId() { return obligationId; } public AttributeAssignment[] getAttributeAssignments() { return attributeAssignments; } public Effect getFulfillOnEffect() { return fulfillOn; } public boolean equals(Object o) { if (this == o) { return true; } if (o != null && o.getClass() == this.getClass()) { Obligation other = (Obligation)o; if (compareObject(this.obligationId, other.obligationId) && compareObject(this.fulfillOn, other.fulfillOn) && this.attributeAssignments != null && other.attributeAssignments != null && this.attributeAssignments.length == other.attributeAssignments.length) { for (int i = 0; i < this.attributeAssignments.length; i ++) { if (!(this.attributeAssignments[i].equals(other.attributeAssignments[i]))) { return false; } } return true; } } return false; } }
[ "jschober88@gmail.com" ]
jschober88@gmail.com
5dc61b3d34ada224c807cb67c3e2204c484884dc
b641e97d985535e4f1d52c7891aa907f3eb0a254
/src/custom/TableCallBack.java
b47cb11ac560f5bd6f880aa26135fc838b5de8c0
[]
no_license
mmaciag1991/HarnessDesignSystemInterfaceDiagram
7e6f5dc078205475700dc2f63abc3f1e88e62728
4569676541a80dff1ffb5df6080799367e835065
refs/heads/main
2023-05-19T00:43:10.113472
2021-06-11T21:54:03
2021-06-11T21:54:03
375,101,913
0
0
null
null
null
null
UTF-8
Java
false
false
1,408
java
package custom; import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import javafx.scene.paint.Color; import javafx.scene.text.Text; import javafx.util.Callback; /** * Created by Mateusz Maciag on 8/420. */ public class TableCallBack implements Callback<TableColumn<Object, Object>, TableCell<Object, Object>> { Callback<TableColumn<Object, Object>, TableCell<Object, Object>> callback = new Callback<TableColumn<Object, Object>, TableCell<Object, Object>>() { @Override public TableCell<Object, Object> call(TableColumn<Object, Object> param) { final TableCell cell = new TableCell() { public void updateItem(Object item, boolean empty) { Text text = new Text(); super.updateItem(item, empty); if (!isEmpty()) { text = new Text(item.toString()); text.setWrappingWidth(200); text.setFill(Color.BLACK); setGraphic(text); } else if (isEmpty()) { text.setText(null); setGraphic(null); } } }; return cell; } }; @Override public TableCell<Object, Object> call(TableColumn<Object, Object> param) { return null; } }
[ "mateo.m@wp.pl" ]
mateo.m@wp.pl
0059ff43f9a965138af38649f435ec4dd79c7097
bbcd1ca59601057feaca183ef534028853d9300e
/lwh-cg/cg-service/cg-service-goods/src/main/java/com/lwhtarena/cg/config/ResourceServerConfig.java
b6669fca6840a12d6c354985cfd6d68c900854e5
[]
no_license
hkkkkq/cloud
214f95e1c0a07af99339219119b7200ff6b8056f
ee21c997ed02ec69ff5b97c78851894c5c25301b
refs/heads/master
2023-01-01T05:03:44.237792
2020-10-22T16:32:56
2020-10-22T16:32:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,524
java
package com.lwhtarena.cg.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.jwt.crypto.sign.RsaVerifier; import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer; import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter; import org.springframework.security.oauth2.provider.token.TokenStore; import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; import org.springframework.security.oauth2.provider.token.store.JwtTokenStore; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.stream.Collectors; /** * @author liwh * @Title: ResourceServerConfig * @Package com.lwhtarena.cg.config * @Description: 开启资源服务认证 * @Version 1.0.0 * @date 2020/8/1 05:55 */ @Configuration // 开启 资源服务器(标识他是一个oauth2中的资源服务器) @EnableResourceServer @EnableGlobalMethodSecurity(prePostEnabled = true)//激活方法上的PreAuthorize注解 public class ResourceServerConfig extends ResourceServerConfigurerAdapter { //公钥 private static final String PUBLIC_KEY = "public.key"; /*** * 定义JwtTokenStore */ @Bean public TokenStore tokenStore(JwtAccessTokenConverter jwtAccessTokenConverter) { return new JwtTokenStore(jwtAccessTokenConverter); } /*** * 定义JJwtAccessTokenConverter 用来校验令牌 */ @Bean public JwtAccessTokenConverter jwtAccessTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); String publicKey = getPubKey(); converter.setVerifierKey(publicKey); //不设置这个会出现 Cannot convert access token to JSON converter.setVerifier(new RsaVerifier(publicKey)); return converter; } /** * 获取非对称加密公钥 Key * @return 公钥 Key */ private String getPubKey() { Resource resource = new ClassPathResource(PUBLIC_KEY); try { InputStreamReader inputStreamReader = new InputStreamReader(resource.getInputStream()); BufferedReader br = new BufferedReader(inputStreamReader); return br.lines().collect(Collectors.joining("\n")); } catch (IOException ioe) { return null; } } /*** * Http安全配置,对每个到达系统的http请求链接进行校验 */ @Override public void configure(HttpSecurity http) throws Exception { //放行 用户注册的请求 //其他的请求 必须有登录之后才能访问 (校验token合法才可以访问) //所有请求必须认证通过 http.authorizeRequests() //cg-user微服务需要放行的请求 //.antMatchers("/user/add","/user/user/load/*").permitAll() //配置地址放行 .antMatchers("/goods/spec/**") .permitAll() //配置地址放行 .anyRequest(). authenticated(); //其他地址需要认证授权 } }
[ "lwhtarena@163.com" ]
lwhtarena@163.com
7501faacb31c19ced804580aba61692dbf628be9
6de2301bbc9048d1a363d44231273f3db9da4ec6
/bitcamp-java-basic/src/step04/Exam03_4.java
1a9f749bb7eac05af7c37195fd9be7e82bfe6d27
[]
no_license
sunghyeondong/bitcamp
5265d207306adec04223dd0e0d958661334731fa
c4a7d0ba01b0d6b684c67004e6c487b61c6656d6
refs/heads/master
2021-01-24T10:28:52.267015
2018-10-24T01:32:45
2018-10-24T01:32:45
123,054,630
0
0
null
null
null
null
UTF-8
Java
false
false
396
java
// 논리 연산자 : || vs | package step04; public class Exam03_4 { public static void main(String[] args) { boolean a = true; boolean b = false; boolean r = a || (b = true); System.out.printf("a=%b, b=%b, r=%b\n", a, b, r); a = true; b = false; r = a | (b = true); System.out.printf("a=%b, b=%b, r=%b\n", a, b, r); } }
[ "tjdgusehd0@naver.com" ]
tjdgusehd0@naver.com
1e76ab41053743c9eff07572624628b3e7419e32
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/smartedit/smartedit/web/src/de/hybris/smartedit/controllers/HttpGETGateway.java
aade6511c1d95cfc5adbc572e4b5b87d1f1ae622
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
494
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.smartedit.controllers; import org.springframework.messaging.handler.annotation.Header; /** * Gateway to relay the GET operation to the secured webservice responsible of executing the operation. By default, * {@code smarteditwebservices} is the targeted extension. */ public interface HttpGETGateway { public String loadAll(String payload, @Header("Authorization") String token); }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
8811cb15f6fa6ab7a6f2e6366c4ae2b338994bcc
8fe4b4d48c91336971617476ec47dbc09d15153b
/src/main/java/com/otala/codereveals/domain/Assessment.java
5b8405707128e8f667b90d5165b418443e044041
[]
no_license
ielatif/code-reveals-application
41aef00ca6e9d30b262ac5edafbf8c24557fcd49
1079b3c8f9afb6bd650d9429e0c3b6fec96e8dac
refs/heads/master
2023-01-24T12:39:02.756472
2022-12-23T14:51:11
2022-12-23T14:51:11
233,068,528
0
1
null
2022-12-16T04:43:21
2020-01-10T14:51:26
Java
UTF-8
Java
false
false
3,161
java
package com.otala.codereveals.domain; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; import java.io.Serializable; /** * A Assessment. */ @Entity @Table(name = "assessment") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public class Assessment implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") @SequenceGenerator(name = "sequenceGenerator") private Long id; @Column(name = "name") private String name; @OneToOne @JoinColumn(unique = true) private Role role; @ManyToOne @JsonIgnoreProperties("assessments") private Company company; @ManyToOne @JsonIgnoreProperties("assessments") private Candidate candidate; @ManyToOne @JsonIgnoreProperties("assessments") private Interviewer interviewer; // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public Assessment name(String name) { this.name = name; return this; } public void setName(String name) { this.name = name; } public Role getRole() { return role; } public Assessment role(Role role) { this.role = role; return this; } public void setRole(Role role) { this.role = role; } public Company getCompany() { return company; } public Assessment company(Company company) { this.company = company; return this; } public void setCompany(Company company) { this.company = company; } public Candidate getCandidate() { return candidate; } public Assessment candidate(Candidate candidate) { this.candidate = candidate; return this; } public void setCandidate(Candidate candidate) { this.candidate = candidate; } public Interviewer getInterviewer() { return interviewer; } public Assessment interviewer(Interviewer interviewer) { this.interviewer = interviewer; return this; } public void setInterviewer(Interviewer interviewer) { this.interviewer = interviewer; } // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Assessment)) { return false; } return id != null && id.equals(((Assessment) o).id); } @Override public int hashCode() { return 31; } @Override public String toString() { return "Assessment{" + "id=" + getId() + ", name='" + getName() + "'" + "}"; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
077afb7170f9164c12ad962aedd333fd51d3d5d6
6a15fbb56949ec66c40f0de697b620cd6a2b332e
/px_medical/main/com/bofan/publichealth/gravida/valueobject/GravidaSurgery.java
7b36524481b614afedcd8b3b0bd979b3683894fe
[]
no_license
rojoan/C-gitLibrary
2730fa7e9ff711248e0ce2731df65f87e7598095
861814595b0ce7397da7b354bb53eb4d1981ae1c
refs/heads/master
2020-03-10T20:40:26.263347
2018-04-17T01:27:48
2018-04-17T01:27:48
129,575,347
0
0
null
null
null
null
UTF-8
Java
false
false
8,324
java
package com.bofan.publichealth.gravida.valueobject; 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.SequenceGenerator; import javax.persistence.Table; import com.bofan.utils.SchemaConsts; import com.fasterxml.jackson.annotation.JsonFormat; /** * @Description: 产前筛查检查/手术记录表 * @author lqw */ @Entity @Table(name = "GRAVIDA_SURGERY", schema = SchemaConsts.PUBLIC_HEALTH) @SequenceGenerator(name = "GRAVIDA_SURGERY_ID", sequenceName = SchemaConsts.PUBLIC_HEALTH + ".GRAVIDA_SURGERY_ID", allocationSize = 1) public class GravidaSurgery { /** 产前手术记录ID,自动增长ID */ @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "GRAVIDA_SURGERY_ID") @Column(name = "GRAVIDA_SURGERY_ID", unique = true, nullable = false, precision = 18, scale = 0) private Long gravidaSurgeryId; /** 孕产妇登记卡ID */ @Column(name = "GRAVIDA_DETAIL_ID", nullable = false, precision = 18, scale = 0) private Long gravidaDetailId; /** 个人基本信息ID */ @Column(name = "PERSON_DETAIL_ID", nullable = false, precision = 18, scale = 0) private Long personDetailId; /** 行政区域--城镇街道ID 分三级管理 省(直辖市) :001 市(地区) :001001 县(城区) :001001001 */ @Column(name = "REGION_ID", nullable = false, length = 18) private String regionId; /** 孕妇姓名 */ @Column(name = "GRAVIDA_NAME", nullable = false, length = 20) private String gravidaName; /** 孕妇年龄 */ @Column(name = "GRAVIDA_AGE", precision = 2, scale = 0) private Integer gravidaAge; /** 产前诊断编号 */ @Column(name = "PREGNANCY_SURGERY_NO", length = 40) private String pregnancySurgeryNo; /** 孕周 */ @Column(name = "PREGNANCY_WEEK", nullable = false, length = 20) private String pregnancyWeek; /** 手术过程 */ @Column(name = "CHIEF_ACTION", nullable = false, length = 4000) private String chiefAction; /** 手术后注意事项 */ @Column(name = "HEART_LUNG_AUSCULTATION", length = 4000) private String heartLungAuscultation; /** 特殊记录 */ @Column(name = "UTERUS_HEIGTH", length = 2000) private String uterusHeigth; /** 手术主治医生ID */ @Column(name = "DUTY_DOCTOR_ID", precision = 18, scale = 0) private Long dutyDoctorId; /** 手术主治医生 */ @Column(name = "DUTY_DOCTOR_NAME", length = 20) private String dutyDoctorName; /** 手术医疗机构ID 对应sys_org表的 主键ID */ @Column(name = "HOSPITAL_ID", nullable = false, precision = 18, scale = 0) private Long hospitalId; /** 手术医院名称 */ @Column(name = "HOSPITAL_NAME", nullable = false, length = 200) private String hospitalName; /** 手术日期 */ @JsonFormat(pattern = "yyyy-MM-dd", locale = "zh" , timezone="GMT+8") @Column(name = "CUR_SURGERY_TIME", nullable = false) private Date curSurgeryTime; /** 备注 */ @Column(name = "REMARK", length = 200) private String remark; /** default constructor */ public GravidaSurgery() { } /** * @return gravidaSurgeryId */ public Long getGravidaSurgeryId() { return gravidaSurgeryId; } /** * @param gravidaSurgeryId 要设置的 gravidaSurgeryId */ public void setGravidaSurgeryId(Long gravidaSurgeryId) { this.gravidaSurgeryId = gravidaSurgeryId; } /** * @return gravidaDetailId */ public Long getGravidaDetailId() { return gravidaDetailId; } /** * @param gravidaDetailId 要设置的 gravidaDetailId */ public void setGravidaDetailId(Long gravidaDetailId) { this.gravidaDetailId = gravidaDetailId; } /** * @return personDetailId */ public Long getPersonDetailId() { return personDetailId; } /** * @param personDetailId 要设置的 personDetailId */ public void setPersonDetailId(Long personDetailId) { this.personDetailId = personDetailId; } /** * @return regionId */ public String getRegionId() { return regionId; } /** * @param regionId 要设置的 regionId */ public void setRegionId(String regionId) { this.regionId = regionId; } /** * @return gravidaName */ public String getGravidaName() { return gravidaName; } /** * @param gravidaName 要设置的 gravidaName */ public void setGravidaName(String gravidaName) { this.gravidaName = gravidaName; } /** * @return gravidaAge */ public Integer getGravidaAge() { return gravidaAge; } /** * @param gravidaAge 要设置的 gravidaAge */ public void setGravidaAge(Integer gravidaAge) { this.gravidaAge = gravidaAge; } /** * @return pregnancySurgeryNo */ public String getPregnancySurgeryNo() { return pregnancySurgeryNo; } /** * @param pregnancySurgeryNo 要设置的 pregnancySurgeryNo */ public void setPregnancySurgeryNo(String pregnancySurgeryNo) { this.pregnancySurgeryNo = pregnancySurgeryNo; } /** * @return pregnancyWeek */ public String getPregnancyWeek() { return pregnancyWeek; } /** * @param pregnancyWeek 要设置的 pregnancyWeek */ public void setPregnancyWeek(String pregnancyWeek) { this.pregnancyWeek = pregnancyWeek; } /** * @return chiefAction */ public String getChiefAction() { return chiefAction; } /** * @param chiefAction 要设置的 chiefAction */ public void setChiefAction(String chiefAction) { this.chiefAction = chiefAction; } /** * @return heartLungAuscultation */ public String getHeartLungAuscultation() { return heartLungAuscultation; } /** * @param heartLungAuscultation 要设置的 heartLungAuscultation */ public void setHeartLungAuscultation(String heartLungAuscultation) { this.heartLungAuscultation = heartLungAuscultation; } /** * @return uterusHeigth */ public String getUterusHeigth() { return uterusHeigth; } /** * @param uterusHeigth 要设置的 uterusHeigth */ public void setUterusHeigth(String uterusHeigth) { this.uterusHeigth = uterusHeigth; } /** * @return dutyDoctorId */ public Long getDutyDoctorId() { return dutyDoctorId; } /** * @param dutyDoctorId 要设置的 dutyDoctorId */ public void setDutyDoctorId(Long dutyDoctorId) { this.dutyDoctorId = dutyDoctorId; } /** * @return dutyDoctorName */ public String getDutyDoctorName() { return dutyDoctorName; } /** * @param dutyDoctorName 要设置的 dutyDoctorName */ public void setDutyDoctorName(String dutyDoctorName) { this.dutyDoctorName = dutyDoctorName; } /** * @return hospitalId */ public Long getHospitalId() { return hospitalId; } /** * @param hospitalId 要设置的 hospitalId */ public void setHospitalId(Long hospitalId) { this.hospitalId = hospitalId; } /** * @return hospitalName */ public String getHospitalName() { return hospitalName; } /** * @param hospitalName 要设置的 hospitalName */ public void setHospitalName(String hospitalName) { this.hospitalName = hospitalName; } /** * @return curSurgeryTime */ public Date getCurSurgeryTime() { return curSurgeryTime; } /** * @param curSurgeryTime 要设置的 curSurgeryTime */ public void setCurSurgeryTime(Date curSurgeryTime) { this.curSurgeryTime = curSurgeryTime; } /** * @return remark */ public String getRemark() { return remark; } /** * @param remark 要设置的 remark */ public void setRemark(String remark) { this.remark = remark; } }
[ "534433956@qq.com" ]
534433956@qq.com
d2edc41bdbdf532ac64f326023116942d6f86a99
ac6bcc5489f8b15d1632d004d1c3295f924b37ee
/ThayThanh/App Dien Thoai Nang Cao/app/src/main/java/com/thuannluit/projectcontactmanager/MainActivity.java
729c3cfcc040e369d386628b040342bef26f9c9c
[]
no_license
ThuanK42/LapTrinhAndroid
7c56ac5430bf4274e5a5aa45a0fbc59e1d08636f
c1926510ab1bb7da810693e62cee03a2c6829bd2
refs/heads/master
2020-07-29T14:02:31.435146
2020-01-01T03:04:44
2020-01-01T03:04:44
209,832,845
0
0
null
null
null
null
UTF-8
Java
false
false
2,882
java
package com.thuannluit.projectcontactmanager; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.ListView; import android.widget.Toast; import com.thuannluit.adapter.ContactAdapter; import com.thuannluit.models.Contact; import java.util.ArrayList; public class MainActivity extends AppCompatActivity { ImageView imgAnhDaiDien; EditText txtTen, txtSoDienThoai; ImageButton btnLuu; ListView lvDanhBa; ArrayList<Contact> dsDanhBa; ContactAdapter contactAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); addControls(); addEvents(); } private void addEvents() { btnLuu.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { xuLyLuuDanhBa(); } }); } private void xuLyLuuDanhBa() { Contact contact = new Contact(txtTen.getText().toString(), txtSoDienThoai.getText().toString(), R.drawable.crush); dsDanhBa.add(contact); contactAdapter.notifyDataSetChanged(); } private void addControls() { txtTen = (EditText) findViewById(R.id.txtTen); txtSoDienThoai = (EditText) findViewById(R.id.txtSoDienThoai); btnLuu = findViewById(R.id.btnLuu); lvDanhBa = findViewById(R.id.lvDanhBa); dsDanhBa = new ArrayList<>(); dsDanhBa.add(new Contact("Bui Thi Thanh Tam", "123456789", R.drawable.crush)); dsDanhBa.add(new Contact("Tran Viet Son", "123456789", R.drawable.tranvietson)); dsDanhBa.add(new Contact("To Thanh Sang", "123456789", R.drawable.sangto)); dsDanhBa.add(new Contact("Ho Thi My Trang", "123456789", R.drawable.hothimytrang)); dsDanhBa.add(new Contact("Le Thi Le Huyen", "123456789", R.drawable.lehuyen)); dsDanhBa.add(new Contact("Nguyen Van Quang", "123456789", R.drawable.quang)); dsDanhBa.add(new Contact("Tran Thanh Dien", "123456789", R.drawable.tranthanhdien)); dsDanhBa.add(new Contact("Phuong Thao", "123456789", R.drawable.phuongthao)); dsDanhBa.add(new Contact("Ha Tran", "123456789", R.drawable.hatran)); dsDanhBa.add(new Contact("Nguyen Hieu", "123456789", R.drawable.hieu)); dsDanhBa.add(new Contact("Le Hoang", "123456789", R.drawable.hoang)); dsDanhBa.add(new Contact("Kieu Dung", "123456789", R.drawable.dungkieu)); contactAdapter = new ContactAdapter(MainActivity.this, R.layout.activity_items, dsDanhBa); lvDanhBa.setAdapter(contactAdapter); } }
[ "lytutrong02@gmail.com" ]
lytutrong02@gmail.com
f3e886a0bf2a42fd1d760178d26d903bfa8cd3e2
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13407-3-24-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/XWikiCacheStore_ESTest_scaffolding.java
88d373585cc9af2e0d3b9be52fefab45655cd11a
[]
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
439
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Apr 09 01:36:33 UTC 2020 */ package com.xpn.xwiki.store; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XWikiCacheStore_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
877af039c70312843a0030994d091e0469b16fd4
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/vicente-tp2/test-framework/src/main/java/com/tc/test/config/model/L2Config.java
644ee35da83f563fa0408ae76a428a61473a54c3
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
6,179
java
package com.tc.test.config.model; import java.util.ArrayList; /** * The config for each L2 <br> * Default: <br> * dgc enabled: false <br> * dgc interval : 3600 sec <br> * off heap enabled : false <br> * max off heap data size: 128M <br> * persistence : temporary swap <br> * client reconnect window : 25 secs * * @author rsingh */ public class L2Config { private boolean dgcEnabled = false; private int dgcIntervalInSec = 3600; private boolean offHeapEnabled = false; private boolean restartable = false; private int clientReconnectWindow = 15; private int maxOffHeapDataSize = 128; private final ArrayList<String> extraServerJvmArgs; private boolean isProxyL2groupPorts = false; private boolean isProxyDsoPorts = false; private int minHeap = 256; private int maxHeap = 256; private int directMemorySize = -1; private int proxyWaitTime = 20 * 1000; private int proxyDownTime = 100; private final BytemanConfig bytemanConfig = new BytemanConfig(); /** * Creates a l2 config with these defaults <br> * dgc enabled: false <br> * dgc interval : 3600 sec <br> * off heap enabled : false <br> * max off heap data size: 128M <br> * persistence : temporary swap <br> * client reconnect window : 120 secs */ public L2Config() { extraServerJvmArgs = new ArrayList<String>(); } /** * Is DGC enabled * * @return true if dgc is enabled */ public boolean isDgcEnabled() { return dgcEnabled; } /** * enable/disable dgc * * @param dgcEnabled true if dgc to be enabled. false otherwise */ public void setDgcEnabled(boolean dgcEnabled) { this.dgcEnabled = dgcEnabled; } /** * @return dgc interveal in seconds */ public int getDgcIntervalInSec() { return dgcIntervalInSec; } /** * sets the dgc interval in seconds */ public void setDgcIntervalInSec(int dgcIntervalInSec) { this.dgcIntervalInSec = dgcIntervalInSec; } /** * Is off heap enabled * * @return : true if off heap is enabled */ public boolean isOffHeapEnabled() { return offHeapEnabled; } /** * Enabled/Disable off heap * * @param offHeapEnabled : true if the off heap is to be enabled, false otherwise */ public void setOffHeapEnabled(boolean offHeapEnabled) { this.offHeapEnabled = offHeapEnabled; } /** * Persistence mode for the L2 */ public boolean getRestartable() { return restartable; } /** * Sets whether the L2 should be restartable * * @param restartable true to enable restartable */ public void setRestartable(boolean restartable) { this.restartable = restartable; } /** * client reconnect window in secs */ public int getClientReconnectWindow() { return clientReconnectWindow; } /** * sets client reconnect window in seconds */ public void setClientReconnectWindow(int clientReconnectWindow) { this.clientReconnectWindow = clientReconnectWindow; } /** * max off heap data size in MBs * * @return */ public int getMaxOffHeapDataSize() { return maxOffHeapDataSize; } /** * Sets max off heap data size * * @param maxOffHeapDataSize offheap data size in MB */ public void setMaxOffHeapDataSize(int maxOffHeapDataSize) { this.maxOffHeapDataSize = maxOffHeapDataSize; } /** * @return List of jvm arguments for each server */ public ArrayList<String> getExtraServerJvmArgs() { return extraServerJvmArgs; } /** * Adds a jvm argumnet for each server * * @param arg jvm argument */ public void addExtraServerJvmArg(String arg) { extraServerJvmArgs.add(arg); } /** * @return true if proxy is enabled between two mirror groups communication */ public boolean isProxyL2groupPorts() { return isProxyL2groupPorts; } /** * Enable/Disable l2 group proxy between two mirror groups * * @param isProxyL2groupPorts */ public void setProxyL2groupPorts(boolean isProxyL2groupPorts) { this.isProxyL2groupPorts = isProxyL2groupPorts; } /** * is L2 started with a proxy port in bertween the server and client * * @return */ public boolean isProxyDsoPorts() { return isProxyDsoPorts; } /** * Enable/Disable l2 proxy for dso port * * @param isProxyDsoPorts */ public void setProxyDsoPorts(boolean isProxyDsoPorts) { this.isProxyDsoPorts = isProxyDsoPorts; } /** * Get the -Xms size to pass to L2s * * @return Minimum heap size */ public int getMinHeap() { return minHeap; } /** * Set the min heap size * * @param minHeap minimum heap size */ public void setMinHeap(int minHeap) { this.minHeap = minHeap; } /** * Get the -Xmx size to pass to L2s * * @return Maximum heap size */ public int getMaxHeap() { return maxHeap; } /** * Set the max heap size * * @param maxHeap maximum heap size */ public void setMaxHeap(int maxHeap) { this.maxHeap = maxHeap; } /** * Gets the "-XX:MaxDirectMemorySize" to pass to the server * * @return -XX:MaxDirectMemorySize */ public int getDirectMemorySize() { return directMemorySize; } /** * Sets "-XX:MaxDirectMemorySize" * * @param -XX:MaxDirectMemorySize in MB */ public void setDirectMemorySize(int directMemorySize) { this.directMemorySize = directMemorySize; } public int getProxyWaitTime() { return proxyWaitTime; } public int getProxyDownTime() { return proxyDownTime; } public void setProxyWaitTime(int proxyWaitTime) { this.proxyWaitTime = proxyWaitTime; } public void setProxyDownTime(int proxyDownTime) { this.proxyDownTime = proxyDownTime; } public BytemanConfig getBytemanConfig() { return bytemanConfig; } }
[ "cruise@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
cruise@7fc7bbf3-cf45-46d4-be06-341739edd864
9c9aacce392464f9c5777e23f5d5380e0defc367
2e44778e3cb584f7bec95821321f02ab1696e2cf
/src/test/java/eu/javaspecialists/books/dynamicproxies/ch02/protection/CustomHashMapTest.java
548e0980070de3efa1bc95de9796e50bf7f0c73d
[ "Apache-2.0" ]
permissive
rfscholte/dynamic-proxies-samples
633ad652b43f7311d8e8a3a504cb6a94a836e054
7a29124885837ee2a069bbabb22213b23a61903c
refs/heads/master
2020-12-19T08:02:34.880381
2020-01-22T21:56:07
2020-01-22T21:56:07
235,673,803
0
0
null
2020-01-22T21:46:13
2020-01-22T21:46:12
null
UTF-8
Java
false
false
1,187
java
/* * Copyright (C) 2000-2019 Heinz Max Kabutz * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. Heinz Max Kabutz * 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 eu.javaspecialists.books.dynamicproxies.ch02.protection; import eu.javaspecialists.books.dynamicproxies.ch02.virtual.*; import org.junit.*; // tag::listing[] public class CustomHashMapTest extends ConcurrentTest { @Test public void testCustomHashMap() { try { check(new CustomHashMap<>()); // won't work } catch (AssertionError error) { System.err.println(error); } } } // end::listing[]
[ "heinz@javaspecialists.eu" ]
heinz@javaspecialists.eu
007665b1c972e61b54361a3f408ee6f159a6697a
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/mix/MixDetailFragment$onViewCreated$$inlined$apply$lambda$1.java
58cb255ab16e73e4627bc65ff6e91e9c8abe39ed
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,768
java
package com.p280ss.android.ugc.aweme.mix; import android.support.p029v7.widget.RecyclerView; import android.support.p029v7.widget.RecyclerView.C1281m; import com.p280ss.android.ugc.aweme.detail.DetailViewModel; import com.p280ss.android.ugc.aweme.feed.p1234j.C28506u; import kotlin.jvm.internal.C7573i; /* renamed from: com.ss.android.ugc.aweme.mix.MixDetailFragment$onViewCreated$$inlined$apply$lambda$1 */ public final class MixDetailFragment$onViewCreated$$inlined$apply$lambda$1 extends C1281m { /* renamed from: a */ final /* synthetic */ MixDetailFragment f87518a; MixDetailFragment$onViewCreated$$inlined$apply$lambda$1(MixDetailFragment mixDetailFragment) { this.f87518a = mixDetailFragment; } public final void onScrollStateChanged(RecyclerView recyclerView, int i) { C7573i.m23587b(recyclerView, "recyclerView"); super.onScrollStateChanged(recyclerView, i); if (i == 1) { this.f87518a.mo85835v(); return; } if (i == 0) { C28506u.m93702a(this.f87518a.f87456h, "compilation_detail", this.f87518a.f87466r); } } public final void onScrolled(RecyclerView recyclerView, int i, int i2) { String str; C7573i.m23587b(recyclerView, "recyclerView"); super.onScrolled(recyclerView, i, i2); DetailViewModel detailViewModel = this.f87518a.f87468t; if (detailViewModel != null) { detailViewModel.mo67567a(); } this.f87518a.f87465q += i2; this.f87518a.mo85834u(); MixDetailFragment mixDetailFragment = this.f87518a; if (i2 > 0) { str = "up"; } else { str = "down"; } mixDetailFragment.f87466r = str; } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
18a9e5dd30255d7c7699df7194d25b981f083166
d9ba5fc43e53596c9cdc8295deef05a94215570d
/frontend/frontend-core/src/main/java/com/yeepay/g3/core/frontend/util/HiddenCodeUtil.java
9ffe85d567706883829a63cf52282a770cac7404
[]
no_license
P79N6A/11.9
2189ce53b5adbe629e477d9899e939d87387bcbc
a7dafcb0db716ec3184279f995ed4b5a06a0b92e
refs/heads/master
2021-09-28T02:09:07.464629
2018-11-13T10:01:31
2018-11-13T10:01:31
157,359,968
0
1
null
2018-11-13T10:10:55
2018-11-13T10:10:54
null
UTF-8
Java
false
false
3,957
java
package com.yeepay.g3.core.frontend.util; import java.util.Date; import java.util.Map; import org.apache.commons.lang3.StringUtils; import com.yeepay.g3.utils.common.json.JSONUtils; public class HiddenCodeUtil { private static final String MOBILE_MASK = "*******"; private static final String IDENTITYCODE_MASK = "**********"; private static final String MASK = "*"; private static final String BANK_PWD_MASK = "******"; private static final String CVV_MASK = "***"; private static final String AVLIDDATE_MASK = "****"; private static final String VERIFYCODE_MASK = "******"; /** * 手机号掩码处理,保留后四位 * * @param mobile * @return */ public static String hiddenMobile(String mobile) { if (mobile == null || mobile.length() != 11) { return mobile; } return mobile.replaceFirst(mobile.substring(0, 7), MOBILE_MASK); } /** * 姓名掩码处理,保留首位,其他掩码 * * @param userName * @return */ public static String hiddenName(String userName) { if (userName == null || userName.length() < 2) { return userName; } String _name = userName.substring(0, 1); int len = userName.length() - 1; StringBuffer buf=new StringBuffer(); buf.append(_name); for (int i = 0; i < len; i++) { buf.append(MASK); } return buf.toString(); } /** * 身份证号掩码处理,6-15位做掩码处理 * * @param identityCode * @return */ public static String hiddenIdentityCode(String identityCode) { if (identityCode != null && identityCode.length() > 15) { return identityCode = identityCode.substring(0, 5) + IDENTITYCODE_MASK + identityCode.substring(15, identityCode.length()); } return identityCode; } /** * 银行卡号掩码处理,保留前6 后四,其他做掩码处理 * * @param bankCardNo * @return */ public static String hiddenBankCardNO(String bankCardNo) { if (bankCardNo != null && bankCardNo.length() > 10) { int len = bankCardNo.length(); StringBuffer slash = new StringBuffer(); for (int i = 0; i != len - 10; i++) { slash.append(MASK); } return bankCardNo.substring(0, 6) + slash + bankCardNo.substring(len - 4); } return bankCardNo; } public static String hiddenAbliddate(String avliddate) { if (!StringUtils.isBlank(avliddate)) { return AVLIDDATE_MASK; } return avliddate; } public static String hiddenAbliddate(Date avliddate) { if (avliddate != null) { return AVLIDDATE_MASK; } return null; } /** * CVV做掩码处理 */ public static String hiddenCvv(String cvv) { if (!StringUtils.isBlank(cvv)) { return CVV_MASK; } return cvv; } /** * 支付密码做掩码处理 */ public static String hiddenBankPwd(String bankPwd) { if (!StringUtils.isBlank(bankPwd)) { return BANK_PWD_MASK; } return bankPwd; } /** * 支付密码做掩码处理 */ public static String hiddenVerifyCode(String verifyCode) { if (!StringUtils.isBlank(verifyCode)) { return VERIFYCODE_MASK; } return verifyCode; } public static String hiddenJsonString(String jsonStr) { if (StringUtils.isBlank(jsonStr)) { return jsonStr; } String hiddenStr; try { Map<String,String> map = JSONUtils.jsonToMap(jsonStr, String.class, String.class); String accountNo = map.get("accountNo"); if (StringUtils.isNotBlank(accountNo)) { map.put("accountNo", hiddenBankCardNO(accountNo)); } String cvv = map.get("cvv"); if (StringUtils.isNotBlank(cvv)) { map.put("cvv", hiddenCvv(cvv)); } hiddenStr = JSONUtils.toJsonString(map); } catch (Exception e) { hiddenStr=jsonStr; } return hiddenStr; } public static boolean isMobileNo(Object o) { String str = String.valueOf(o); return str.matches("(13\\d|14[57]|15[^4,\\D]|17[678]|18\\d)\\d{8}|170[059]\\d{7}"); } public static boolean isBankCardNo(Object o) { String str = String.valueOf(o); return str.matches("\\d{16}|\\d{19}"); } }
[ "yp-tc-m-5079@yp-tc-m-5079deMacBook-Air.local" ]
yp-tc-m-5079@yp-tc-m-5079deMacBook-Air.local
3990866b4ac6413430415e10bcf599e38ccf9b20
b5c485493f675bcc19dcadfecf9e775b7bb700ed
/jee-utility/src/main/java/org/cyk/utility/notification/NotificationSeverityWarningImpl.java
4fa07935eaf4566433a780ce61ec8d7feaeecd40
[]
no_license
devlopper/org.cyk.utility
148a1aafccfc4af23a941585cae61229630b96ec
14ec3ba5cfe0fa14f0e2b1439ef0f728c52ec775
refs/heads/master
2023-03-05T23:45:40.165701
2021-04-03T16:34:06
2021-04-03T16:34:06
16,252,993
1
0
null
2022-10-12T20:09:48
2014-01-26T12:52:24
Java
UTF-8
Java
false
false
317
java
package org.cyk.utility.notification; import java.io.Serializable; import javax.enterprise.context.Dependent; @Dependent public class NotificationSeverityWarningImpl extends AbstractNotificationSeverityImpl implements NotificationSeverityWarning,Serializable { private static final long serialVersionUID = 1L; }
[ "kycdev@gmail.com" ]
kycdev@gmail.com
e6464d8ff920c3321313c9b5da8c20b41490a393
8ce0671d68f1427c8dfcd125c7fbd82d9dd3e028
/tech-services/jbb-lib-properties/src/test/java/org/jbb/lib/properties/encrypt/PropertiesEncryptionIT.java
c30fcfb3d6f7a0a76370da4a8e489b06321a47b3
[ "Apache-2.0" ]
permissive
viviand2020/jbb
740cecc3ccc9a4a9b99510a4546caf4689e23630
fcfccadf55e5de9e65a13e6f4ef3f5b20453fbb7
refs/heads/master
2020-03-07T06:07:26.247758
2017-10-11T05:03:17
2017-10-11T05:03:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,951
java
/* * Copyright (C) 2017 the original author or authors. * * This file is part of jBB Application Project. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 */ package org.jbb.lib.properties.encrypt; import org.apache.commons.configuration2.PropertiesConfiguration; import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder; import org.apache.commons.configuration2.builder.fluent.Parameters; import org.apache.commons.configuration2.ex.ConfigurationException; import org.jbb.lib.commons.CommonsConfig; import org.jbb.lib.commons.JbbMetaData; import org.jbb.lib.properties.PropertiesConfig; import org.jbb.lib.test.MockWithoutJndiCommonsConfig; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.io.File; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {PropertyEncryptionEnableTestConfig.class, PropertiesConfig.class, CommonsConfig.class, MockWithoutJndiCommonsConfig.class}) public class PropertiesEncryptionIT { @Autowired private PropertyEncryptionEnableTestConfig.ExampleProperties exampleConfig; @Autowired private PropertiesEncryption propertiesEncryption; @Autowired private JbbMetaData jbbMetaData; private PropertiesConfiguration propFile; @Test public void encryptionAndDecryptionScenario() throws Exception { // given propertiesEncryption.reconfigureEncryption(); // when // FIRST: PROPERTIES ARE NOT ENCRYPTED exampleConfig.setProperty("foo", "not secret"); exampleConfig.setProperty("bar", "55"); readPropertiesFile(); // then assertThat(exampleConfig.foo()).isEqualTo("not secret"); assertThat(exampleConfig.bar()).isEqualTo(55); assertThat(propFile.getString("foo")).isEqualTo("not secret"); assertThat(propFile.getString("bar")).isEqualTo("55"); // when // SECOND: TRIGGER OF PROPERTIES ENCRYPTION USING ENC(...) PLACEHOLDER exampleConfig.setProperty("foo", "ENC(secret)"); exampleConfig.setProperty("bar", "ENC(811)"); readPropertiesFile(); // then assertThat(exampleConfig.foo()).isEqualTo("secret"); assertThat(exampleConfig.bar()).isEqualTo(811); assertThat(propFile.getString("foo")).startsWith("DEC(").endsWith(")"); assertThat(propFile.getString("bar")).startsWith("DEC(").endsWith(")"); // when // THIRD: PROPERTIES ARE IN A PUBLIC WAY BUT APPLICATION IS STILL SAVE ENCRYPT VALUES TO FILE exampleConfig.setProperty("foo", "another secret"); exampleConfig.setProperty("bar", "71"); readPropertiesFile(); // then assertThat(exampleConfig.foo()).isEqualTo("another secret"); assertThat(exampleConfig.bar()).isEqualTo(71); assertThat(propFile.getString("foo")).startsWith("DEC(").endsWith(")"); assertThat(propFile.getString("bar")).startsWith("DEC(").endsWith(")"); } private void readPropertiesFile() throws ConfigurationException { String propertiesFilePath = jbbMetaData.jbbHomePath() + File.separator + "jbb-testbed.properties"; FileBasedConfigurationBuilder<PropertiesConfiguration> builder = new FileBasedConfigurationBuilder<>(PropertiesConfiguration.class) .configure(new Parameters().properties() .setPath(propertiesFilePath) .setIncludesAllowed(false)); builder.setAutoSave(true); propFile = builder.getConfiguration(); } }
[ "baart92@gmail.com" ]
baart92@gmail.com
f1926e90e728eafc2baab89541c9a8c60eec10e0
d98ed4986ecdd7df4c04e4ad09f38fdb7a7043e8
/Platform/src/main/java/net/sf/anathema/platform/item/ItemTypeCollection.java
d60791344c1e5d486b5b6df8d8868185be31f60c
[]
no_license
bjblack/anathema_3e
3d1d42ea3d9a874ac5fbeed506a1a5800e2a99ac
963f37b64d7cf929f086487950d4870fd40ac67f
refs/heads/master
2021-01-19T07:12:42.133946
2018-12-18T23:57:41
2018-12-18T23:57:41
67,353,965
0
0
null
2016-09-04T15:47:48
2016-09-04T15:47:48
null
UTF-8
Java
false
false
1,386
java
package net.sf.anathema.platform.item; import net.sf.anathema.library.initialization.InitializationException; import net.sf.anathema.library.initialization.ObjectFactory; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.stream.Stream; import static java.util.stream.Collectors.toList; public class ItemTypeCollection implements Iterable<IItemType> { private final Collection<ItemTypeConfiguration> itemTypeConfigurations = new ArrayList<> (); public ItemTypeCollection (ObjectFactory objectFactory) throws InitializationException { Collection<ItemTypeConfiguration> configurations = objectFactory.instantiateOrdered (RegisteredItemTypeConfiguration.class); itemTypeConfigurations.addAll (configurations); } public IItemType getById (String id) { for (IItemType itemType : getAllTypes ()) { if (itemType.getId ().equals (id)) { return itemType; } } throw new IllegalArgumentException ("No item type registered for id: " + id); } public Collection<IItemType> getAllTypes () { Stream<ItemTypeConfiguration> configurations = itemTypeConfigurations.stream (); return configurations.map (ItemTypeConfiguration::getItemType).collect (toList ()); } @Override public Iterator<IItemType> iterator () { return getAllTypes ().iterator (); } }
[ "BJ@BJ-PC" ]
BJ@BJ-PC
c113f341bdde41b8c5201e743489d30b56958ebb
341a5c100f63b6445fde17200ba8dc14ce952683
/mcl/ruby/RubyViewHandler.java
19443e210753f60e49b50ab847e4bf40bfdff627
[ "Apache-2.0" ]
permissive
jesse-gallagher/Domino-One-Offs
18c4cb6465589ab4e2fda13064cb4792267a48ed
1b6bdabf1d1b55a3b0e25145331e1f801e10acfa
refs/heads/master
2021-01-02T22:39:14.351726
2014-07-20T14:03:26
2014-07-20T14:03:26
3,402,155
3
1
null
2013-09-25T09:26:28
2012-02-09T22:44:36
Java
UTF-8
Java
false
false
890
java
package mtc.ruby; import javax.faces.application.ViewHandler; import javax.faces.component.UIViewRoot; import javax.faces.context.FacesContext; import com.ibm.xsp.application.ApplicationEx; import com.ibm.xsp.factory.FactoryLookup; public class RubyViewHandler extends com.ibm.xsp.application.ViewHandlerExImpl { public RubyViewHandler(ViewHandler arg0) { super(arg0); } @SuppressWarnings({ "deprecation" }) @Override public UIViewRoot createView(FacesContext context, String paramString) { ApplicationEx app = (ApplicationEx)context.getApplication(); FactoryLookup facts = app.getFactoryLookup(); RubyBindingFactory rfac = new mtc.ruby.RubyBindingFactory(); if(facts.getFactory(rfac.getPrefix()) == null) { //System.out.println("Adding ruby interpreter"); facts.setFactory(rfac.getPrefix(), rfac); } return super.createView(context, paramString); } }
[ "jesse@secondfoundation.org" ]
jesse@secondfoundation.org
19a4c66e0ae9fdc04f886b24d04b6bb5988a101e
0dc27ea0eb532c1093720686b00ffd13644980e1
/Blog/app/src/main/java/blog/theblog/gohool/com/blog/Activities/PostListActivity.java
4e7699758df46d0acc99e8bf9b77b13ccfa1d8c0
[]
no_license
priyaVora/MobileApplications
ac92affbf19ccb031c123e1faccc4d8af9c38740
5c61e402b5e7995f754b52e8fb971e11f97215fa
refs/heads/master
2020-03-16T16:46:27.677552
2018-08-11T20:04:25
2018-08-11T20:04:25
132,802,755
0
0
null
null
null
null
UTF-8
Java
false
false
1,997
java
package blog.theblog.gohool.com.blog.Activities; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import blog.theblog.gohool.com.blog.R; public class PostListActivity extends AppCompatActivity { private DatabaseReference mDatabaseReference; private FirebaseDatabase mDatabase; private FirebaseUser mUser; private FirebaseAuth mAuth; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_post_list); mAuth = FirebaseAuth.getInstance(); mUser = mAuth.getCurrentUser(); mDatabase = FirebaseDatabase.getInstance(); mDatabaseReference = mDatabase.getReference().child("MBlog"); mDatabaseReference.keepSynced(true); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_menu, menu); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_add: if(mUser != null && mAuth != null) { startActivity(new Intent(PostListActivity.this, AddPostActivity.class)); finish(); } break; case R.id.action_signout: if(mUser != null && mAuth != null) { mAuth.signOut(); startActivity(new Intent(PostListActivity.this, MainActivity.class)); finish(); break; } } return super.onOptionsItemSelected(item); } }
[ "prvora89@gmail.com" ]
prvora89@gmail.com
e39c762d0030b827f4eb44e4ed2add86bb61ad26
baf90a659e8fd4cd7ed9f5c41881754d286ddbbd
/src/document/TableSpan.java
6cc5354563a51618aa50873bea0ad7887e9e752d
[]
no_license
Linusdalin/AnalysisModule
3c837af034862e59ae4694b1e62aa1aeaddadf71
4fe0e966fb0634b83722309d321472a5fb0d0668
refs/heads/master
2021-01-10T16:57:34.162334
2015-10-12T19:46:06
2015-10-12T19:46:06
44,130,199
0
0
null
null
null
null
UTF-8
Java
false
false
477
java
package document; /** * Created with IntelliJ IDEA. * User: Linus * Date: 2014-12-03 * Time: 15:39 * To change this template use File | Settings | File Templates. */ public class TableSpan { public final int rows; public final int cols; public TableSpan(int rows, int cols){ this.rows = rows; this.cols = cols; } public String toString(){ return "colSpan:" + cols + " rowSpan:" + rows; } }
[ "linus.dalin@itclarifies.com" ]
linus.dalin@itclarifies.com
e28614b02f7a090b363ebc8c23a3084cf7cc5a50
b2bfac7b91b2542228931c10c668ca2f67e86b51
/LostNetNoRootFirewall-Decompiled code/android/support/v4/view/p003a/C0061l.java
3a77918ec1c615bb9d3a7aa97072ce9bad784c4e
[]
no_license
abozanona/fbaAndroid
b58be90fc94ceec5170d84133c1e8c4e2be8806f
f058eb0317df3e76fd283e285c4dd3dbc354aef5
refs/heads/master
2021-09-26T22:05:31.517265
2018-11-03T07:21:17
2018-11-03T07:21:17
108,681,428
1
0
null
null
null
null
UTF-8
Java
false
false
196
java
package android.support.v4.view.p003a; class C0061l extends C0060p { C0061l() { } public Object mo55a(C0058j c0058j) { return C0067q.m505a(new C0063m(this, c0058j)); } }
[ "abozanona@gmail.com" ]
abozanona@gmail.com
2e3b7aae6edd223b9f0aa2c510032f1b32fd0b71
0c98cf3f64a72ceb4987f23936979d587183e269
/services/classroom/src/main/java/com/huaweicloud/sdk/classroom/v3/model/ShowJudgementFileRequest.java
a99e6bd2a0b735aff0c12f171934d228964a1b41
[ "Apache-2.0" ]
permissive
cwray01/huaweicloud-sdk-java-v3
765d08e4b6dfcd88c2654bdbf5eb2dd9db19f2ef
01b5a3b4ea96f8770a2eaa882b244930e5fd03e7
refs/heads/master
2023-07-17T10:31:20.119625
2021-08-31T11:38:37
2021-08-31T11:38:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,890
java
package com.huaweicloud.sdk.classroom.v3.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; /** Request Object */ public class ShowJudgementFileRequest { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "file_id") private String fileId; public ShowJudgementFileRequest withFileId(String fileId) { this.fileId = fileId; return this; } /** 文件id,可以从接口[ShowJudgementDetail](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=Classroom&api=ShowJudgementDetail)的响应中获取 * * @return fileId */ public String getFileId() { return fileId; } public void setFileId(String fileId) { this.fileId = fileId; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ShowJudgementFileRequest showJudgementFileRequest = (ShowJudgementFileRequest) o; return Objects.equals(this.fileId, showJudgementFileRequest.fileId); } @Override public int hashCode() { return Objects.hash(fileId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ShowJudgementFileRequest {\n"); sb.append(" fileId: ").append(toIndentedString(fileId)).append("\n"); sb.append("}"); return sb.toString(); } /** Convert the given object to string with each line indented by 4 spaces (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
ce01e6c58316ce385e78744ebcd5c1ed5209e02d
004832e529873885f1559eb8c864384b3e1cda3f
/java/lineage2/gameserver/model/instances/ClanTraderInstance.java
84292bc7677fd0bf3efbfb335738d0a2785bc934
[]
no_license
wks1222/mobius-source
02323e79316eabd4ce7e5b29f8cd5749c930d098
325a49fa23035f4d529e5a34b809b83c68d19cad
refs/heads/master
2021-01-10T02:22:17.746138
2015-01-17T20:08:13
2015-01-17T20:08:13
36,601,733
1
0
null
null
null
null
UTF-8
Java
false
false
3,389
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 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 lineage2.gameserver.model.instances; import lineage2.gameserver.model.Player; import lineage2.gameserver.network.serverpackets.NpcHtmlMessage; import lineage2.gameserver.network.serverpackets.PledgeShowInfoUpdate; import lineage2.gameserver.network.serverpackets.SystemMessage; import lineage2.gameserver.templates.npc.NpcTemplate; /** * @author Mobius * @version $Revision: 1.0 $ */ public final class ClanTraderInstance extends NpcInstance { /** * Constructor for ClanTraderInstance. * @param objectId int * @param template NpcTemplate */ public ClanTraderInstance(int objectId, NpcTemplate template) { super(objectId, template); } /** * Method onBypassFeedback. * @param player Player * @param command String */ @Override public void onBypassFeedback(Player player, String command) { if (!canBypassCheck(player, this)) { return; } NpcHtmlMessage html = new NpcHtmlMessage(player, this); if (command.equals("crp")) { if ((player.getClan() != null) && (player.getClan().getLevel() > 4)) { html.setFile("default/" + getId() + "-2.htm"); } else { html.setFile("default/" + getId() + "-1.htm"); } html.replace("%objectId%", String.valueOf(getObjectId())); player.sendPacket(html); } else if (command.startsWith("exchange")) { if (!player.isClanLeader()) { html.setFile("default/" + getId() + "-no.htm"); html.replace("%objectId%", String.valueOf(getObjectId())); player.sendPacket(html); return; } int itemId = Integer.parseInt(command.substring(9).trim()); int reputation = 0; long itemCount = 0; switch (itemId) { case 9911: reputation = 500; itemCount = 1; break; case 9910: reputation = 200; itemCount = 10; break; case 9912: reputation = 20; itemCount = 100; break; } if (player.getInventory().destroyItemByItemId(itemId, itemCount)) { player.getClan().incReputation(reputation, false, "ClanTrader " + itemId + " from " + player.getName()); player.getClan().broadcastToOnlineMembers(new PledgeShowInfoUpdate(player.getClan())); player.sendPacket(new SystemMessage(SystemMessage.YOUR_CLAN_HAS_ADDED_1S_POINTS_TO_ITS_CLAN_REPUTATION_SCORE).addNumber(reputation)); html.setFile("default/" + getId() + "-ExchangeSuccess.htm"); } else { html.setFile("default/" + getId() + "-ExchangeFailed.htm"); } html.replace("%objectId%", String.valueOf(getObjectId())); player.sendPacket(html); } else { super.onBypassFeedback(player, command); } } }
[ "mobius@cyber-wizard.com" ]
mobius@cyber-wizard.com
c72f66692fbb47778aebbc9b54af71630e770ef2
c48ea80f78c028b522aac57d475a425a489aaab2
/src/main/java/org/tinymediamanager/core/movie/MovieComparator.java
19185e8729ec345691987e9fa6a56401f8ec56db
[ "Apache-2.0" ]
permissive
nielsmeima/tinyMediaManagerSME
baa063d7f09d0b188226ad6a2cce539dde5e0b9f
65e2f1e0913b481a8775f5b12dba176186be8e89
refs/heads/master
2023-01-21T23:07:52.754506
2020-01-26T17:44:39
2020-01-26T17:44:39
239,790,581
0
0
Apache-2.0
2023-01-11T23:48:57
2020-02-11T15:05:14
Java
UTF-8
Java
false
false
2,073
java
/* * Copyright 2012 - 2020 Manuel Laggner * * 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.tinymediamanager.core.movie; import java.text.Collator; import java.text.Normalizer; import java.text.RuleBasedCollator; import java.util.Comparator; import java.util.Locale; import org.tinymediamanager.core.movie.entities.Movie; /** * The Class {@link MovieComparator} is used to (initial) sort the movies. * * @author Manuel Laggner */ public class MovieComparator implements Comparator<Movie> { protected Collator stringCollator; public MovieComparator() { RuleBasedCollator defaultCollator = (RuleBasedCollator) RuleBasedCollator.getInstance(); try { // default collator ignores whitespaces // using hack from http://stackoverflow.com/questions/16567287/java-collation-ignores-space stringCollator = new RuleBasedCollator(defaultCollator.getRules().replace("<'\u005f'", "<' '<'\u005f'")); } catch (Exception e) { stringCollator = defaultCollator; } } @Override public int compare(Movie movie1, Movie movie2) { if (stringCollator != null) { String titleMovie1 = Normalizer.normalize(movie1.getTitleSortable().toLowerCase(Locale.ROOT), Normalizer.Form.NFD); String titleMovie2 = Normalizer.normalize(movie2.getTitleSortable().toLowerCase(Locale.ROOT), Normalizer.Form.NFD); return stringCollator.compare(titleMovie1, titleMovie2); } return movie1.getTitleSortable().toLowerCase(Locale.ROOT).compareTo(movie2.getTitleSortable().toLowerCase(Locale.ROOT)); } }
[ "manuel.laggner@gmail.com" ]
manuel.laggner@gmail.com
9aaf0208fe7dcce1ed289a71f8a29bb2afbb82f9
9254e7279570ac8ef687c416a79bb472146e9b35
/gemp-20210413/src/main/java/com/aliyun/gemp20210413/models/DeleteEscalationPlanRequest.java
4e6bce6d0112d3862d58e6052b406e8b3b58398b
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,051
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.gemp20210413.models; import com.aliyun.tea.*; public class DeleteEscalationPlanRequest extends TeaModel { // 升级计划ID @NameInMap("escalationPlanId") public Long escalationPlanId; // clientToken @NameInMap("clientToken") public String clientToken; public static DeleteEscalationPlanRequest build(java.util.Map<String, ?> map) throws Exception { DeleteEscalationPlanRequest self = new DeleteEscalationPlanRequest(); return TeaModel.build(map, self); } public DeleteEscalationPlanRequest setEscalationPlanId(Long escalationPlanId) { this.escalationPlanId = escalationPlanId; return this; } public Long getEscalationPlanId() { return this.escalationPlanId; } public DeleteEscalationPlanRequest setClientToken(String clientToken) { this.clientToken = clientToken; return this; } public String getClientToken() { return this.clientToken; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
2bfb52b599f8a0be4a301d32338ecac18b80b44b
a4b9bcf602647bf48a5412ad0f7d274b1bb147a9
/DesignPattern/flyweight/UnsharedConcreteFlyweight.java
e281312b8b0bdd8e862733690ae7514fd9cb587a
[]
no_license
huangketsudou/javalearning
5680884584771b6c9a9fb1ba5838824cd0ebb550
6a5b751e50007702641d14588cb90c0ea0ca0f4c
refs/heads/master
2022-11-10T14:50:08.716494
2020-06-25T09:12:02
2020-06-25T09:12:02
264,204,472
0
0
null
null
null
null
UTF-8
Java
false
false
306
java
package DesignPattern.flyweight; class UnsharedConcreteFlyweight { private String info; UnsharedConcreteFlyweight(String info) { this.info=info; } public String getInfo() { return info; } public void setInfo(String info) { this.info=info; } }
[ "1941161938@qq.com" ]
1941161938@qq.com
4e3343b421da08751dd5c96d18fc4953ee6bf02d
c4d1992bbfe4552ad16ff35e0355b08c9e4998d6
/releases/2.3.0/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java
2d9e64e1820b7440b0b690eddf593a3a23c730e7
[]
no_license
BGCX261/zkpoi-svn-to-git
36f2a50d2618c73e40f24ddc2d3df5aadc8eca30
81a63fb1c06a2dccff20cab1291c7284f1687508
refs/heads/master
2016-08-04T08:42:59.622864
2015-08-25T15:19:51
2015-08-25T15:19:51
41,594,557
0
1
null
null
null
null
UTF-8
Java
false
false
2,592
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.poi.hslf; import junit.framework.TestCase; import org.apache.poi.hslf.record.*; import org.apache.poi.POIDataSamples; /** * Tests that HSLFSlideShow returns the right numbers of key records when * it parses the test file * * @author Nick Burch (nick at torchbox dot com) */ public final class TestRecordCounts extends TestCase { // HSLFSlideShow primed on the test data private HSLFSlideShow ss; public TestRecordCounts() throws Exception { POIDataSamples slTests = POIDataSamples.getSlideShowInstance(); ss = new HSLFSlideShow(slTests.openResourceAsStream("basic_test_ppt_file.ppt")); } public void testSheetsCount() { // Top level Record[] r = ss.getRecords(); int count = 0; for(int i=0; i<r.length; i++) { if(r[i] instanceof Slide) { count++; } } // Currently still sees the Master Sheet, but might not in the future assertEquals(3,count); } public void testNotesCount() { // Top level Record[] r = ss.getRecords(); int count = 0; for(int i=0; i<r.length; i++) { if(r[i] instanceof Notes && r[i].getRecordType() == 1008l) { count++; } } // Two real sheets, plus the master sheet assertEquals(3,count); } public void testSlideListWithTextCount() { // Second level Record[] rt = ss.getRecords(); Record[] r = rt[0].getChildRecords(); int count = 0; for(int i=0; i<r.length; i++) { if(r[i] instanceof SlideListWithText && r[i].getRecordType() == 4080l) { count++; } } // Two real sheets, plus the master sheet assertEquals(3,count); } }
[ "you@example.com" ]
you@example.com
be27f6286aeb9897629340207aa0d6141af790e1
9ccafa7f3dd424671dc6c7396f4e1bde30d2712e
/ch15_FileIO/src/Step2_encoding/CharEncodingTest.java
6f556c29ae2ffeced7f2577970da1adece79661c
[]
no_license
rkdntm1/JavaStudy_Kosmo
f16969c28d283953735e152d1306da0071c5b334
5a296e2b1f9f9f2cfcbf39eade28e347ff967a91
refs/heads/master
2023-05-23T15:44:49.488448
2021-06-06T08:05:41
2021-06-06T08:05:41
349,647,554
0
0
null
null
null
null
UTF-8
Java
false
false
664
java
package Step2_encoding; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; public class CharEncodingTest { public static void main(String[] args) throws Exception { File in = new File("input.txt"); // Pipe Line : 빨대를 연결 > 편리성, 성능 InputStreamReader isr = new InputStreamReader(new FileInputStream(in), StandardCharsets.UTF_8); BufferedReader br = new BufferedReader(isr); String readMsg; while ((readMsg = br.readLine()) != null) { System.out.println(readMsg); } } }
[ "rkdntm1@gmail.com" ]
rkdntm1@gmail.com
178dc4b98957ab6c36a35b0fd16885a56f679bf2
b25bc27814268b64d937913c8286b416d78e6d37
/commons-jpa/src/main/java/com/baidu/oped/apm/common/jpa/repository/SqlTransactionStatisticRepository.java
7917a00ccd28b1fcbe0ae204a3785fc26fb3419a
[]
no_license
masonmei/apm
d6a276ac79a5edeb6cfcac3ff5411b9577a3627b
d95c027113f7274d275adb0b9352a16aa76043f5
refs/heads/master
2020-05-17T21:45:53.292956
2015-12-01T11:04:46
2015-12-01T11:04:46
40,586,633
1
2
null
null
null
null
UTF-8
Java
false
false
520
java
package com.baidu.oped.apm.common.jpa.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.querydsl.QueryDslPredicateExecutor; import com.baidu.oped.apm.common.jpa.entity.SqlTransactionStatistic; /** * Created by mason on 8/23/15. */ public interface SqlTransactionStatisticRepository extends JpaRepository<SqlTransactionStatistic, Long>, QueryDslPredicateExecutor<SqlTransactionStatistic> { }
[ "dongxu.m@gmail.com" ]
dongxu.m@gmail.com
bf0eb0172e5dbfd09c74fc587e70432bfa128fc3
9cc71443dfa5226118f76ae705ea09e30ae66f7a
/gameserver/src/gameserver/network/aion/serverpackets/SM_SUMMON_UPDATE.java
93e1bc646d560aac8ff402081b2777115ec54896
[]
no_license
osiris087/aionj
bedee651beb30b8e2e0163e60cbd03681077d80e
b12efe6d8f089f4ba313d519b32884b9395db904
refs/heads/master
2021-01-01T18:37:11.834976
2011-09-09T02:45:38
2011-09-09T02:45:38
2,353,467
0
1
null
null
null
null
UTF-8
Java
false
false
3,182
java
/* * This file is part of aion-unique <aion-unique.org>. * * aion-unique 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. * * aion-unique 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 aion-unique. If not, see <http://www.gnu.org/licenses/>. */ package gameserver.network.aion.serverpackets; import gameserver.model.gameobjects.Summon; import gameserver.model.gameobjects.stats.StatEnum; import gameserver.network.aion.AionConnection; import gameserver.network.aion.AionServerPacket; import java.nio.ByteBuffer; /** * @author ATracer * */ public class SM_SUMMON_UPDATE extends AionServerPacket { private Summon summon; public SM_SUMMON_UPDATE(Summon summon) { this.summon = summon; } @Override protected void writeImpl(AionConnection con, ByteBuffer buf) { writeC(buf, summon.getLevel()); writeH(buf, summon.getMode().getId()); writeD(buf, 0);// unk writeD(buf, 0);// unk writeD(buf, summon.getLifeStats().getCurrentHp()); writeD(buf, summon.getGameStats().getCurrentStat(StatEnum.MAXHP)); writeD(buf, summon.getGameStats().getCurrentStat(StatEnum.MAIN_HAND_PHYSICAL_ATTACK)); writeH(buf, summon.getGameStats().getCurrentStat(StatEnum.PHYSICAL_DEFENSE)); writeH(buf, summon.getGameStats().getCurrentStat(StatEnum.MAGICAL_RESIST)); writeH(buf, summon.getGameStats().getCurrentStat(StatEnum.ACCURACY)); writeH(buf, summon.getGameStats().getCurrentStat(StatEnum.CRITICAL_RESIST)); writeH(buf, summon.getGameStats().getCurrentStat(StatEnum.BOOST_MAGICAL_SKILL)); writeH(buf, summon.getGameStats().getCurrentStat(StatEnum.MAGICAL_ACCURACY)); writeH(buf, summon.getGameStats().getCurrentStat(StatEnum.MAGICAL_CRITICAL)); writeH(buf, summon.getGameStats().getCurrentStat(StatEnum.PARRY)); writeH(buf, summon.getGameStats().getCurrentStat(StatEnum.EVASION)); writeD(buf, summon.getGameStats().getBaseStat(StatEnum.MAXHP)); writeD(buf, summon.getGameStats().getBaseStat(StatEnum.MAIN_HAND_PHYSICAL_ATTACK)); writeH(buf, summon.getGameStats().getBaseStat(StatEnum.PHYSICAL_DEFENSE)); writeH(buf, summon.getGameStats().getBaseStat(StatEnum.MAGICAL_RESIST)); writeH(buf, summon.getGameStats().getBaseStat(StatEnum.ACCURACY)); writeH(buf, summon.getGameStats().getBaseStat(StatEnum.CRITICAL_RESIST)); writeH(buf, summon.getGameStats().getBaseStat(StatEnum.BOOST_MAGICAL_SKILL)); writeH(buf, summon.getGameStats().getBaseStat(StatEnum.MAGICAL_ACCURACY)); writeH(buf, summon.getGameStats().getBaseStat(StatEnum.MAGICAL_CRITICAL)); writeH(buf, summon.getGameStats().getBaseStat(StatEnum.PARRY)); writeH(buf, summon.getGameStats().getBaseStat(StatEnum.EVASION)); } }
[ "osiris087@gmail.com@2632a3c6-4342-beac-f942-17b406f9b7bb" ]
osiris087@gmail.com@2632a3c6-4342-beac-f942-17b406f9b7bb
45ae2938ed38974af446b120962849b25b62dcf9
17d9d8deeb7489008f3825edb45a1e2ca3b999ab
/sdks/java/http_client/v1/src/main/java/org/openapitools/client/api/SchemasV1Api.java
216a5bae7e4628a6a52af13268c9ebe5f202268c
[ "Apache-2.0" ]
permissive
thimma/polyaxon
4dc9b88db3d2d8dcc7bb31b2ee181e1315ae1948
2a78b0ed3fb744155e286f4e8b34545bc2a81927
refs/heads/master
2022-09-17T21:56:48.195084
2020-05-30T20:30:59
2020-05-30T20:45:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,858
java
// Copyright 2018-2020 Polyaxon, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /* * Polyaxon SDKs and REST API specification. * Polyaxon SDKs and REST API specification. * * The version of the OpenAPI document: 1.0.93 * Contact: contact@polyaxon.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.api; import org.openapitools.client.ApiCallback; import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.ApiResponse; import org.openapitools.client.Configuration; import org.openapitools.client.Pair; import org.openapitools.client.ProgressRequestBody; import org.openapitools.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; import org.openapitools.client.model.RuntimeError; import org.openapitools.client.model.V1Schemas; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class SchemasV1Api { private ApiClient localVarApiClient; public SchemasV1Api() { this(Configuration.getDefaultApiClient()); } public SchemasV1Api(ApiClient apiClient) { this.localVarApiClient = apiClient; } public ApiClient getApiClient() { return localVarApiClient; } public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } /** * Build call for noOp * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table summary="Response Details" border="1"> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> A successful response. </td><td> - </td></tr> <tr><td> 204 </td><td> No content. </td><td> - </td></tr> <tr><td> 403 </td><td> You don&#39;t have permission to access the resource. </td><td> - </td></tr> <tr><td> 404 </td><td> Resource does not exist. </td><td> - </td></tr> <tr><td> 0 </td><td> An unexpected error response </td><td> - </td></tr> </table> */ public okhttp3.Call noOpCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/schemas"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "ApiKey" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call noOpValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = noOpCall(_callback); return localVarCall; } /** * Get random * * @return V1Schemas * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table summary="Response Details" border="1"> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> A successful response. </td><td> - </td></tr> <tr><td> 204 </td><td> No content. </td><td> - </td></tr> <tr><td> 403 </td><td> You don&#39;t have permission to access the resource. </td><td> - </td></tr> <tr><td> 404 </td><td> Resource does not exist. </td><td> - </td></tr> <tr><td> 0 </td><td> An unexpected error response </td><td> - </td></tr> </table> */ public V1Schemas noOp() throws ApiException { ApiResponse<V1Schemas> localVarResp = noOpWithHttpInfo(); return localVarResp.getData(); } /** * Get random * * @return ApiResponse&lt;V1Schemas&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table summary="Response Details" border="1"> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> A successful response. </td><td> - </td></tr> <tr><td> 204 </td><td> No content. </td><td> - </td></tr> <tr><td> 403 </td><td> You don&#39;t have permission to access the resource. </td><td> - </td></tr> <tr><td> 404 </td><td> Resource does not exist. </td><td> - </td></tr> <tr><td> 0 </td><td> An unexpected error response </td><td> - </td></tr> </table> */ public ApiResponse<V1Schemas> noOpWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = noOpValidateBeforeCall(null); Type localVarReturnType = new TypeToken<V1Schemas>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get random (asynchronously) * * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table summary="Response Details" border="1"> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> A successful response. </td><td> - </td></tr> <tr><td> 204 </td><td> No content. </td><td> - </td></tr> <tr><td> 403 </td><td> You don&#39;t have permission to access the resource. </td><td> - </td></tr> <tr><td> 404 </td><td> Resource does not exist. </td><td> - </td></tr> <tr><td> 0 </td><td> An unexpected error response </td><td> - </td></tr> </table> */ public okhttp3.Call noOpAsync(final ApiCallback<V1Schemas> _callback) throws ApiException { okhttp3.Call localVarCall = noOpValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken<V1Schemas>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }
[ "mouradmourafiq@gmail.com" ]
mouradmourafiq@gmail.com
fbe8f86fd3db7bb0302281e4cc1160f259a2ce86
4a320edde344daa4de74df1ca00763abb1277b6f
/app/src/main/java/co/ashishsonani/calculatorapp/Activity/HistoryActivity.java
1acc8104a893b112486b6fb0f54d3f4044f57ae9
[]
no_license
ashishxcode/Calculator
e8109b991d02296eb32f45e02281774b90c04f11
478f40fccc19915cb0b54ca2e8a5bd3f26f8c525
refs/heads/master
2022-04-14T17:21:25.705454
2020-04-03T10:50:38
2020-04-03T10:50:38
252,398,347
13
0
null
null
null
null
UTF-8
Java
false
false
3,694
java
package co.ashishsonani.calculatorapp.Activity; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.annotation.SuppressLint; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.os.Process; import android.provider.Settings; import android.util.Log; import android.view.View; import android.widget.Toast; import com.firebase.ui.firestore.FirestoreRecyclerOptions; import com.google.android.gms.tasks.OnFailureListener; import com.google.android.gms.tasks.OnSuccessListener; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.firebase.firestore.CollectionReference; import com.google.firebase.firestore.DocumentReference; import com.google.firebase.firestore.FirebaseFirestore; import com.google.firebase.firestore.Query; import com.google.firebase.firestore.QueryDocumentSnapshot; import com.google.firebase.firestore.QuerySnapshot; import com.google.firebase.firestore.WriteBatch; import java.util.List; import java.util.Objects; import co.ashishsonani.calculatorapp.Adapter.HistoryAdapter; import co.ashishsonani.calculatorapp.Model.dbMiddleware; import co.ashishsonani.calculatorapp.R; public class HistoryActivity extends AppCompatActivity { private FirebaseFirestore db = FirebaseFirestore.getInstance(); private CollectionReference histories; String deviceID; private HistoryAdapter adapter; @SuppressLint("HardwareIds") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_history); deviceID = Settings.Secure.getString(getApplicationContext().getContentResolver(), Settings.Secure.ANDROID_ID); histories = db.collection(deviceID); setupRecycleView(); try { Toolbar toolbar = (Toolbar) findViewById(R.id.appToolBar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setTitle("Calculator History"); toolbar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // perform whatever you want on back arrow click Intent intent = new Intent(getApplicationContext(), MainActivity.class); startActivity(intent); finish(); } }); } catch (Exception e) { Toast.makeText(getApplicationContext(), e.toString(), Toast.LENGTH_SHORT).show(); } } private void setupRecycleView() { Query query = histories.orderBy("timeStored", Query.Direction.DESCENDING); FirestoreRecyclerOptions<dbMiddleware> options = new FirestoreRecyclerOptions.Builder<dbMiddleware>() .setQuery(query, dbMiddleware.class) .build(); adapter = new HistoryAdapter(options); RecyclerView recyclerView = findViewById(R.id.recycler_view); recyclerView.setHasFixedSize(true); recyclerView.setLayoutManager(new LinearLayoutManager(this)); recyclerView.setAdapter(adapter); } @Override protected void onStart() { super.onStart(); adapter.startListening(); } @Override protected void onStop() { super.onStop(); adapter.startListening(); } }
[ "you@example.com" ]
you@example.com
fa0fc78054ee434cf5eab5819fc4bbebb28be711
abd313e96f6e4947a8bff9bc251ca6e39e9df139
/src/main/java/br/com/tlmacedo/nfe/model/vo/Icms40_41_50VO.java
00356e9b56e84593268511ee8230bfd64be101bf
[]
no_license
tlmacedo/nfe_v400
d41579066fda7db00c82e9326c94fbef22ba7b4a
fc3d669bb73c8434532b6806ca12061ba75ff94c
refs/heads/master
2023-01-24T07:41:44.273897
2020-12-03T18:50:50
2020-12-03T18:50:50
274,968,138
0
0
null
null
null
null
UTF-8
Java
false
false
1,233
java
package br.com.tlmacedo.nfe.model.vo; import java.io.Serializable; public class Icms40_41_50VO implements Serializable { private static final long serialVersionUID = 1L; private String orig = ""; private String CST = ""; private String vICMSDeson = ""; private String motDesICMS = ""; public Icms40_41_50VO() { } public String getOrig() { return orig; } public void setOrig(String orig) { this.orig = orig; } public String getCST() { return CST; } public void setCST(String CST) { this.CST = CST; } public String getvICMSDeson() { return vICMSDeson; } public void setvICMSDeson(String vICMSDeson) { this.vICMSDeson = vICMSDeson; } public String getMotDesICMS() { return motDesICMS; } public void setMotDesICMS(String motDesICMS) { this.motDesICMS = motDesICMS; } @Override public String toString() { return "Icms40_41_50VO{" + "orig='" + orig + '\'' + ", CST='" + CST + '\'' + ", vICMSDeson='" + vICMSDeson + '\'' + ", motDesICMS='" + motDesICMS + '\'' + '}'; } }
[ "tl.macedo@hotmail.com" ]
tl.macedo@hotmail.com
07a7ea88ee7b87c6db6f606f2dbf4006ecdf1c0c
b868a1cce5820782ba696981211d93e5caa8f623
/org.summer.dsl.model.ui/src/org/summer/dsl/model/ui/refactoring/participant/JdtRenameParticipantContext.java
d685dae375776f44954d8c8a5bdc9f1873c1765b
[]
no_license
zwgirl/summer
220693d71294f8ccffe1b58e8bc1dea44536c47c
1da11dfb5c323d805422c9870382fb0a81d5a8f1
refs/heads/master
2021-01-22T22:57:46.801255
2014-04-29T22:00:21
2014-04-29T22:00:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,653
java
/******************************************************************************* * Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.summer.dsl.model.ui.refactoring.participant; import static org.eclipse.emf.ecore.util.EcoreUtil.*; import org.eclipse.jdt.core.IJavaElement; import org.summer.dsl.model.types.JvmMember; import org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext; /** * Context used to for renaming JVM elements that are not inside an indexed resource, thus only cross-referenced and not * generated/inferred from a model element. * * @author Jan Koehnlein - Initial contribution and API */ public class JdtRenameParticipantContext extends IRenameElementContext.Impl { private IJavaElement renamedJavaElement; /** * @since 2.4 */ private JdtRenameParticipant participant; public JdtRenameParticipantContext(JdtRenameParticipant participant, JvmMember renamedJvmMember, IJavaElement referencedJavaElement) { super(getURI(renamedJvmMember), renamedJvmMember.eClass()); this.participant = participant; this.renamedJavaElement = referencedJavaElement; } public IJavaElement getRenamedJavaElement() { return renamedJavaElement; } /** * @since 2.4 */ public JdtRenameParticipant getJdtRenameParticipant() { return participant; } }
[ "1141196380@qq.com" ]
1141196380@qq.com
8944002d960ae1549696148d57b3877ac4477ff7
52b948436b826df8164565ffe69e73a92eb92cda
/Source/BearsComing/GenProg_patch_Bears_SzFMV2018-Tavasz-AutomatedCar_351742666-351759763_0_652/Dashboard/GenProg_patch_Bears_SzFMV2018-Tavasz-AutomatedCar_351742666-351759763_0_652_Dashboard_t.java
5894b32658958f6139c68162a5861a952e2b6bc1
[]
no_license
tdurieux/ODSExperiment
910365f1388bc684e9916f46f407d36226a2b70b
3881ef06d6b8d5efb751860811def973cb0220eb
refs/heads/main
2023-07-05T21:30:30.099605
2021-08-18T15:56:56
2021-08-18T15:56:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,934
java
package hu.oe.nik.szfmv.visualization; import hu.oe.nik.szfmv.automatedcar.bus.packets.input.ReadOnlyInputPacket; import javax.swing.*; import java.awt.*; /** * Dashboard shows the state of the ego car, thus helps in debugging. */ public class Dashboard extends JPanel { private final int width = 250; private final int height = 700; private final int dashboardBoundsX = 770; private final int dashboardBoundsY = 0; private final int backgroundColor = 0x888888; private final int progressBarsPanelX = 25; private final int progressBarsPanelY = 400; private final int progressBarsPanelWidth = 200; private final int progressBarsPanelHeight = 100; private final JPanel progressBarsPanel = new JPanel(); private final JLabel gasLabel = new JLabel(); private final JProgressBar gasProgressBar = new JProgressBar(); private final JLabel breakLabel = new JLabel(); private final JProgressBar breakProgressBar = new JProgressBar(); private final int speedMeterX = 10; private final int speedMeterY = 50; private final int tachoMeterX = 130; private final int tachoMeterY = 50; private final int meterHeight = 100; private final int meterWidth = 100; private int speedAngle; private int rpmAngle; /** * Initialize the dashboard */ public Dashboard() { initializeDashboard(); } /** * Update the displayed values * @param inputPacket Contains all the required values coming from input. */ public void updateDisplayedValues(ReadOnlyInputPacket inputPacket) { gasProgressBar.setValue(inputPacket.getGasPedalPosition()); setLayout(null); breakProgressBar.setValue(inputPacket.getBreakPedalPosition()); speedAngle = calculateSpeedometer(0); setLayout(null); } /** * Initializes the dashboard components */ private void initializeDashboard() { final int minSpeedValue = 0; initializeProgressBars(); setBackground(new Color(backgroundColor)); setBounds(dashboardBoundsX, dashboardBoundsY, width, height); progressBarsPanel.add(breakLabel); progressBarsPanel.add(breakLabel); progressBarsPanel.add(breakLabel); initializeProgressBars(); } /** * Initializes the progress bars on the dashboard */ private void initializeProgressBars() { setLayout(null); progressBarsPanel.setBounds( progressBarsPanelX, progressBarsPanelY, progressBarsPanelWidth, progressBarsPanelHeight); gasLabel.setText("gas pedal"); breakLabel.setText("break pedal"); gasProgressBar.setStringPainted(true); progressBarsPanel.setBackground(new Color(backgroundColor)); breakProgressBar.setStringPainted(true); final int minSpeedMeter = -75; progressBarsPanel.add(gasProgressBar); progressBarsPanel.add(gasProgressBar); progressBarsPanel.add(gasLabel); progressBarsPanel.add(breakProgressBar); } /** * Drawing the Speedometer and the Tachometer. * * @param g {@link Graphics} object that can draw to the canvas */ protected void paintComponent(Graphics g) { g.setColor(Color.BLACK); g.drawOval(speedMeterX, speedMeterY, meterWidth, meterHeight); g.drawOval(tachoMeterX, tachoMeterY, meterWidth, meterHeight); g.setColor(Color.RED); g.fillArc(speedMeterX, speedMeterY, meterWidth, meterHeight, speedAngle, 2); g.fillArc(tachoMeterX, tachoMeterY, meterWidth, meterHeight, rpmAngle, 2); } /** * Map the RPM to a displayable value for the gauge. * * @param rpm The unmapped input value of the Tachometer's visual display. * * @return The mapped value between [-75, 255] interval. */ private int calculateTachometer(int rpm) { final int minRpmValue = 0; final int maxRpmValue = 10000; final int minRpmMeter = -75; final int maxRpmMeter = 255; int newrpm = maxRpmValue - rpm; return (newrpm - minRpmValue) * (maxRpmMeter - minRpmMeter) / (maxRpmValue - minRpmValue) + minRpmMeter; } /** * Map the Speed to a displayable value for the gauge. * * @param speed The unmapped input value of the Speedometer's visual display. * * @return The mapped value between [-75, 255] interval. */ private int calculateSpeedometer(int speed) { final int minSpeedValue = 0; gasProgressBar.setStringPainted(true); final int maxSpeedValue = 500; final int minSpeedMeter = -75; final int maxSpeedMeter = 255; int newspeed = maxSpeedValue - speed; return (newspeed - minSpeedValue) * (maxSpeedMeter - minSpeedMeter) / (maxSpeedValue - minSpeedValue) + minSpeedMeter; } }
[ "he_ye_90s@hotmail.com" ]
he_ye_90s@hotmail.com
bf2c3076774ec5f47e6b4e1c5b9de0c48e7c4cc4
c6d93152ab18b0e282960b8ff224a52c88efb747
/huntkey/code/biz-purchase-method/biz-purchase-method-common/src/main/java/com/huntkey/rx/purchase/common/constants/GoodsMaintOrderConstants.java
b6d026443b5fba602aefe116b1eb99ce359a1b90
[]
no_license
BAT6188/company-database
adfe5d8b87b66cd51efd0355e131de164b69d3f9
40d0342345cadc51ca2555840e32339ca0c83f51
refs/heads/master
2023-05-23T22:18:22.702550
2018-12-25T00:58:15
2018-12-25T00:58:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
package com.huntkey.rx.purchase.common.constants; public interface GoodsMaintOrderConstants { /** * 物品维护单类型:新增 */ String GMOC_TYPE_ADD_ID = "0"; /** * 物品维护单类型:修改 */ String GMOC_TYPE_MODIFY_ID = "1"; String GOODSMAINTORDER = "goodsmaintorder"; String GOMODOCSET = "gomo_doc_set"; String GOMOFEATURESET = "gomo_feature_set"; String GOMOPARKSET = "gomo_park_set"; }
[ "729235023@qq.com" ]
729235023@qq.com
0803b14c3726cc629fab523df31e7d85f9102db6
8a8bf2481abd129d5c8d27d3954c390d92e1f038
/leopard-lang/src/main/java/io/leopard/burrow/lang/SynchronizedLRUMap.java
9c5021e561b5bed6791f43ba0eda74feebbd22f8
[ "Apache-2.0" ]
permissive
tanhaichao/leopard-mvc
96ea3f0a37c5d180fbc87c820f158f7d07bed6e9
287ee51dcd0455f3230301152bfa38f2382279da
refs/heads/master
2020-04-04T02:10:23.441223
2017-01-10T14:13:10
2017-01-10T14:13:10
41,327,678
0
3
null
null
null
null
UTF-8
Java
false
false
1,411
java
package io.leopard.burrow.lang; import java.util.Collection; import java.util.Collections; import java.util.Map; import java.util.Set; import org.apache.commons.collections.map.LRUMap; public class SynchronizedLRUMap<K, V> implements Map<K, V> { private Map<K, V> map; @SuppressWarnings("unchecked") public SynchronizedLRUMap(int initialEntries, int maxEntries) { this.map = Collections.synchronizedMap(new LRUMap(maxEntries)); } @Override public int size() { return map.size(); } @Override public boolean isEmpty() { return map.isEmpty(); } @Override public boolean containsKey(Object key) { return map.containsKey(key); } @Override public boolean containsValue(Object value) { return map.containsValue(value); } @Override public V get(Object key) { return map.get(key); } @Override public V put(K key, V value) { return map.put(key, value); } @Override public V remove(Object key) { return map.remove(key); } @Override public void putAll(Map<? extends K, ? extends V> m) { map.putAll(m); } @Override public void clear() { map.clear(); } @Override public Set<K> keySet() { return map.keySet(); } @Override public Collection<V> values() { return map.values(); } @Override public Set<java.util.Map.Entry<K, V>> entrySet() { return map.entrySet(); } }
[ "tanhaichao@gmail.com" ]
tanhaichao@gmail.com
f94ed79ae9a8450c05a68b0e79ac1977e248fc11
25b5cccaf51f44d4116af8886128ade5ebf2b788
/Channel/app/src/main/java/com/zlove/act/independent/ActIndependentBeforeCooperateRule.java
3ae9fb709238a6b5f41b8684c68b8ca4d21f5b3c
[]
no_license
ZLOVE320483/ChannelSpace
8f8e5668b335bda8a4bc48118d44c26f7d0b23d0
74610334b2b4b0bb65de3d4d9a5ff2c443ba6b37
refs/heads/master
2021-05-18T01:01:25.383994
2020-03-29T13:31:02
2020-03-29T13:31:02
251,036,899
0
0
null
null
null
null
UTF-8
Java
false
false
761
java
package com.zlove.act.independent; import android.os.Bundle; import com.zlove.base.ActChannelBase; import com.zlove.channel.R; import com.zlove.frag.independent.IndependentProjectCooperateRuleFragment; public class ActIndependentBeforeCooperateRule extends ActChannelBase { private IndependentProjectCooperateRuleFragment fragment; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.common_act_fragment_container); fragment = new IndependentProjectCooperateRuleFragment(); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction().replace(R.id.id_framework, fragment).commit(); } } }
[ "zhanglei320483@163.com" ]
zhanglei320483@163.com
0209d22b2fb04421b563d729579e0679c03984d2
deb3a451da04b11f413425b93dea69d14f777ab2
/src/com/javarush/test/level08/lesson11/home09/Solution.java
25cc7bbc7bfa8b05525ec32fc011f504611ae4b5
[]
no_license
kelebro13/JavaRushHomeWork
59d1cd8c9aad715eb518b26d76b4e5a125308caa
5ae4cf7cdeb5bbb97bdbda8832fb41faab370434
refs/heads/master
2020-09-22T08:25:56.755170
2016-08-17T12:26:34
2016-08-17T12:26:34
65,905,504
0
0
null
null
null
null
UTF-8
Java
false
false
1,460
java
package com.javarush.test.level08.lesson11.home09; import java.util.Date; /* Работа с датой 1. Реализовать метод isDateOdd(String date) так, чтобы он возвращал true, если количество дней с начала года - нечетное число, иначе false 2. String date передается в формате MAY 1 2013 Не забудьте учесть первый день года. Пример: JANUARY 1 2000 = true JANUARY 2 2020 = false */ public class Solution { public static void main(String[] args) { String date = "JANUARY 2 2020"; System.out.println(date + " = " + isDateOdd(date)); } public static boolean isDateOdd(String date) { Date yearStartTime = new Date(date); yearStartTime.setHours(0); yearStartTime.setMinutes(0); yearStartTime.setSeconds(0); yearStartTime.setDate(0); // первое число yearStartTime.setMonth(0); // месяц январь, нумерация для месяцев 0-11 Date currentTime = new Date(date); long msTimeDistance = currentTime.getTime() - yearStartTime.getTime(); long msDay = 24 * 60 * 60 * 1000; //сколько миллисекунд в одних сутках int dayCount = (int) (msTimeDistance / msDay); if (dayCount % 2 != 0) return true; else return false; } }
[ "tgumerov@gmail.com" ]
tgumerov@gmail.com
a9d2b713bbb9a3e3cd96b966b160e4974e8ef5a1
7c20e36b535f41f86b2e21367d687ea33d0cb329
/Capricornus/src/com/gopawpaw/erp/hibernate/g/AbstractGlcdDetId.java
e173c99a0157d6356415b2626a313cdd22d533a8
[]
no_license
fazoolmail89/gopawpaw
50c95b924039fa4da8f309e2a6b2ebe063d48159
b23ccffce768a3d58d7d71833f30b85186a50cc5
refs/heads/master
2016-09-08T02:00:37.052781
2014-05-14T11:46:18
2014-05-14T11:46:18
35,091,153
1
1
null
null
null
null
UTF-8
Java
false
false
2,912
java
package com.gopawpaw.erp.hibernate.g; /** * AbstractGlcdDetId entity provides the base persistence definition of the * GlcdDetId entity. @author MyEclipse Persistence Tools */ public abstract class AbstractGlcdDetId implements java.io.Serializable { // Fields private String glcdDomain; private Integer glcdYear; private Integer glcdPer; private String glcdEntity; // Constructors /** default constructor */ public AbstractGlcdDetId() { } /** minimal constructor */ public AbstractGlcdDetId(String glcdDomain) { this.glcdDomain = glcdDomain; } /** full constructor */ public AbstractGlcdDetId(String glcdDomain, Integer glcdYear, Integer glcdPer, String glcdEntity) { this.glcdDomain = glcdDomain; this.glcdYear = glcdYear; this.glcdPer = glcdPer; this.glcdEntity = glcdEntity; } // Property accessors public String getGlcdDomain() { return this.glcdDomain; } public void setGlcdDomain(String glcdDomain) { this.glcdDomain = glcdDomain; } public Integer getGlcdYear() { return this.glcdYear; } public void setGlcdYear(Integer glcdYear) { this.glcdYear = glcdYear; } public Integer getGlcdPer() { return this.glcdPer; } public void setGlcdPer(Integer glcdPer) { this.glcdPer = glcdPer; } public String getGlcdEntity() { return this.glcdEntity; } public void setGlcdEntity(String glcdEntity) { this.glcdEntity = glcdEntity; } public boolean equals(Object other) { if ((this == other)) return true; if ((other == null)) return false; if (!(other instanceof AbstractGlcdDetId)) return false; AbstractGlcdDetId castOther = (AbstractGlcdDetId) other; return ((this.getGlcdDomain() == castOther.getGlcdDomain()) || (this .getGlcdDomain() != null && castOther.getGlcdDomain() != null && this.getGlcdDomain() .equals(castOther.getGlcdDomain()))) && ((this.getGlcdYear() == castOther.getGlcdYear()) || (this .getGlcdYear() != null && castOther.getGlcdYear() != null && this .getGlcdYear().equals(castOther.getGlcdYear()))) && ((this.getGlcdPer() == castOther.getGlcdPer()) || (this .getGlcdPer() != null && castOther.getGlcdPer() != null && this.getGlcdPer() .equals(castOther.getGlcdPer()))) && ((this.getGlcdEntity() == castOther.getGlcdEntity()) || (this .getGlcdEntity() != null && castOther.getGlcdEntity() != null && this .getGlcdEntity().equals(castOther.getGlcdEntity()))); } public int hashCode() { int result = 17; result = 37 * result + (getGlcdDomain() == null ? 0 : this.getGlcdDomain() .hashCode()); result = 37 * result + (getGlcdYear() == null ? 0 : this.getGlcdYear().hashCode()); result = 37 * result + (getGlcdPer() == null ? 0 : this.getGlcdPer().hashCode()); result = 37 * result + (getGlcdEntity() == null ? 0 : this.getGlcdEntity() .hashCode()); return result; } }
[ "ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5" ]
ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5
116e75c09d14ae91f647e45a027f90d36408ce50
5d76b555a3614ab0f156bcad357e45c94d121e2d
/src-v2/com/crumby/lib/widget/firstparty/fragment_options/SaveImageButton.java
1e031d56f0885574b8cf2555e601e8c4d3754957
[]
no_license
BinSlashBash/xcrumby
8e09282387e2e82d12957d22fa1bb0322f6e6227
5b8b1cc8537ae1cfb59448d37b6efca01dded347
refs/heads/master
2016-09-01T05:58:46.144411
2016-02-15T13:23:25
2016-02-15T13:23:25
51,755,603
5
1
null
null
null
null
UTF-8
Java
false
false
1,577
java
/* * Decompiled with CFR 0_110. * * Could not load the following classes: * android.content.Context * android.util.AttributeSet * android.view.View * android.view.View$OnClickListener * android.widget.ImageButton */ package com.crumby.lib.widget.firstparty.fragment_options; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.ImageButton; import com.crumby.lib.GalleryImage; import com.crumby.lib.download.ImageDownloadManager; public class SaveImageButton extends ImageButton implements View.OnClickListener { private GalleryImage image; public SaveImageButton(Context context) { super(context); } public SaveImageButton(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public SaveImageButton(Context context, AttributeSet attributeSet, int n2) { super(context, attributeSet, n2); } public void hide() { this.setVisibility(8); } public void initialize(GalleryImage galleryImage) { this.image = galleryImage; this.setOnClickListener((View.OnClickListener)this); this.render(); } public void onClick(View view) { this.save(); } public void render() { if (this.image.getImageUrl() == null) { this.hide(); return; } this.show(); } public void save() { ImageDownloadManager.INSTANCE.downloadOne(this.image); } public void show() { this.setVisibility(0); } }
[ "binslashbash@otaking.top" ]
binslashbash@otaking.top
7d907bc980dffd95a51dd457118df5c3dd49f66a
2b6e3a34ec277f72a5da125afecfe3f4a61419f5
/Ruyicai_168/v3.4/src/com/ruyicai/activity/expert/ExpertActivity.java
d3b467e5fbc3a6815c92c42f8fa1b2353beeade6
[]
no_license
surport/Android
03d538fe8484b0ff0a83b8b0b2499ad14592c64b
afc2668728379caeb504c9b769011f2ba1e27d25
refs/heads/master
2020-04-02T10:29:40.438348
2013-12-18T09:55:42
2013-12-18T09:55:42
15,285,717
3
5
null
null
null
null
UTF-8
Java
false
false
1,253
java
package com.ruyicai.activity.expert; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.json.JSONObject; import com.palmdream.RuyicaiAndroid168.R; import com.ruyicai.activity.buy.BuyActivityGroup; import android.app.Activity; import android.app.ActivityGroup; import android.os.Bundle; import android.widget.RelativeLayout; import android.widget.TextView; /** * 专家荐号 * @author Administrator * */ public class ExpertActivity extends BuyActivityGroup { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); isIssue(false); initExpertView(); } public void initExpertView() { removeTabs(); String[] titles = { getString(R.string.expert_fucai_title), getString(R.string.expert_ticai_title) }; String[] topTitles = { getString(R.string.expert_top_title), getString(R.string.expert_top_title) }; Class[] allId = { ExpertInfoActivity.class, ExpertInfoActivity.class}; init(titles, topTitles, allId,16); } public void initView() { relativeLayout = (RelativeLayout) findViewById(R.id.main_buy_relat_issue); title = (TextView) findViewById(R.id.layout_main_text_title); } }
[ "zxflimit@gmail.com" ]
zxflimit@gmail.com
5da3997c1991fd0a580e5f32bfa21eb7ba6bf3c3
e2c48e041d2983164cf04bc49d37f3bc7324f2d3
/Java/src/_0131_Palindrome_Partitioning/Solution.java
71e98f82021b918c432e7208fe7078cdd4a00815
[]
no_license
ToLoveToFeel/LeetCode
17aff7f9b36615ccebe386545440f921d8fdf740
de7a893fc625ff30122899969f761ed5f8df8b12
refs/heads/master
2023-07-12T07:35:09.410016
2021-08-23T02:33:00
2021-08-23T02:33:00
230,863,299
2
0
null
null
null
null
UTF-8
Java
false
false
1,478
java
package _0131_Palindrome_Partitioning; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; /** * Date: 2021/1/27 11:00 * Content: * 执行用时:24 ms, 在所有 Java 提交中击败了5.22%的用户 * 内存消耗:58.6 MB, 在所有 Java 提交中击败了6.25%的用户 */ public class Solution { boolean[][] f; List<List<String>> ans = new ArrayList<>(); LinkedList<String> path = new LinkedList<>(); public List<List<String>> partition(String s) { int n = s.length(); // 预处理:f[i][j]代表s[i...j]是否为回文串 f = new boolean[n][n]; for (int j = 0; j < n; j++) { for (int i = 0; i <= j; i++) if (i == j) f[i][j] = true; else if (s.charAt(i) == s.charAt(j)) { if (i + 1 > j - 1 || f[i + 1][j - 1]) f[i][j] = true; } } dfs(s, 0); return ans; } private void dfs(String s, int u) { if (u == s.length()) ans.add((List<String>) path.clone()); else { for (int i = u; i < s.length(); i++) { if (f[u][i]) { path.add(s.substring(u, i + 1)); dfs(s, i + 1); path.removeLast(); } } } } public static void main(String[] args) { String s = "aab"; System.out.println((new Solution()).partition(s)); } }
[ "1137247975@qq.com" ]
1137247975@qq.com
e3bd786c1c4637299d8e65e5061cb6abc70d854c
aa16fbdb35227576bdc3e177c578d001c19428a5
/src/main/java/org/durcframework/autocode/util/DateUtil.java
57ab5407972a4e1d084a3631eeb70404ba636cf5
[]
no_license
AndyYHL/autoCode
ee11a7e84cfae3962d880f754367de9b812acaba
a3c21de042aa5687e69e4fa8364b93e8c9c42ba7
refs/heads/master
2023-04-27T08:02:13.693929
2023-04-20T02:26:48
2023-04-20T02:26:48
124,502,502
3
0
null
2022-06-20T23:01:57
2018-03-09T07:12:24
JavaScript
UTF-8
Java
false
false
503
java
package org.durcframework.autocode.util; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class DateUtil { private static DateFormat YMDHMS_FORMAT = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.sss"); private static DateFormat YMD_FORMAT = new SimpleDateFormat( "yyyy-MM-dd"); public static String ymdhmsFormat(Date date) { return YMDHMS_FORMAT.format(date); } public static String ymdFormat(Date date) { return YMD_FORMAT.format(date); } }
[ "love90yhl@hotmail.com" ]
love90yhl@hotmail.com
ed871f44b6c85fe83016c1888d9d5a72bb158ed3
78991fbbe463c1601a5d91fcd7ea05a5e493d2c9
/panasonic-image-app_1.10.14/source/com/panasonic/avc/cng/core/p042b/p044b/C1574h.java
e4ebca5142971368eb9fddb6d37e6ba0ed7de3b5
[]
no_license
maiermic/panasonic-image-app
480dc4f0500a2e14bd7d4138f6fb9c7dc7871b61
ef9bd7c2a8390204894c53b49d1e01a230141e2d
refs/heads/master
2020-07-10T06:02:42.687761
2019-08-22T12:07:42
2019-08-22T12:07:42
204,177,648
0
0
null
null
null
null
UTF-8
Java
false
false
534
java
package com.panasonic.avc.cng.core.p042b.p044b; import android.graphics.SurfaceTexture; import java.util.ArrayList; import java.util.List; /* renamed from: com.panasonic.avc.cng.core.b.b.h */ public class C1574h { /* renamed from: a */ public int f4386a; /* renamed from: b */ public SurfaceTexture f4387b; /* renamed from: c */ public List<C1576j> f4388c = new ArrayList(); public C1574h(int i, SurfaceTexture surfaceTexture) { this.f4386a = i; this.f4387b = surfaceTexture; } }
[ "maier1michael@gmail.com" ]
maier1michael@gmail.com
1d8e36d02000e6e322a2fe28311ca158b44c9ff1
649ef73c087de764098258a331c0243c63e3ecb9
/backend/src/main/java/net/wohlfart/isp/configuration/SecurityConfig.java
a05317d3c588de870d9bf943a9fc2f39fc4ed241
[]
no_license
mwohlf/isp
baf677ff9a9d83b2e755e945ecb85f29ae326a38
4babdf6ec5b0c4a6df1054e907d43eb04d3f6fbe
refs/heads/master
2021-08-10T17:47:29.038540
2017-11-12T21:12:23
2017-11-12T21:12:23
110,440,160
0
0
null
null
null
null
UTF-8
Java
false
false
4,021
java
package net.wohlfart.isp.configuration; import lombok.extern.slf4j.Slf4j; import net.wohlfart.isp.security.AuthFilter; import net.wohlfart.isp.security.LoginFilter; import org.keycloak.adapters.springsecurity.KeycloakSecurityComponents; import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider; import org.keycloak.adapters.springsecurity.client.KeycloakClientRequestFactory; import org.keycloak.adapters.springsecurity.client.KeycloakRestTemplate; import org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurerAdapter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Scope; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.core.authority.mapping.SimpleAuthorityMapper; import org.springframework.security.core.session.SessionRegistryImpl; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy; import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; @Slf4j @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true) @ComponentScan({"net.wohlfart"}) @ComponentScan(basePackageClasses = KeycloakSecurityComponents.class) public class SecurityConfig extends KeycloakWebSecurityConfigurerAdapter { @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { KeycloakAuthenticationProvider keycloakAuthenticationProvider = keycloakAuthenticationProvider(); keycloakAuthenticationProvider.setGrantedAuthoritiesMapper(new SimpleAuthorityMapper()); auth.authenticationProvider(keycloakAuthenticationProvider); } @Autowired public KeycloakClientRequestFactory keycloakClientRequestFactory; @Bean @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public KeycloakRestTemplate keycloakRestTemplate() { return new KeycloakRestTemplate(keycloakClientRequestFactory); } @Override protected SessionAuthenticationStrategy sessionAuthenticationStrategy() { log.info("<sessionAuthenticationStrategy> called"); return new RegisterSessionAuthenticationStrategy(new SessionRegistryImpl()); } @Override protected void configure(HttpSecurity httpSecurity) throws Exception { // @formatter:off httpSecurity // implements HttpsSecurityBuilder .csrf().disable() // We don't need CSRF for JWT based authentication .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() // returns the SecurityBuilder .authorizeRequests() .antMatchers("/", "/inline.bundle.js", "/polyfills.bundle.js", "/vendor.bundle.js", "/styles.bundle.js", "/main.bundle.js", "/favicon.ico" ) .permitAll() // sign in end-point allowed by anyone .and() .addFilterBefore(new LoginFilter("/login"), UsernamePasswordAuthenticationFilter.class) .addFilterBefore(new AuthFilter("/**"), UsernamePasswordAuthenticationFilter.class) ; } }
[ "michael@wohlfart.net" ]
michael@wohlfart.net
630b936eee52d732372513535c04c2ad8106d000
212a49f1202700a4c4fb41d9e8d756ab9cd825f6
/trans_workplace/service-medicaltrans/service/medicaltrans-base-service/src/main/java/com/segi/uhomecp/medicaltrans/baseinfo/userstatus/rpc/MtUserStatusServiceRpc.java
f8834e430e7c8869ae1e3f3bdf29ddc31b655faf
[]
no_license
zhyangzzz/medicaltrans
3a47df2618aee9ebdcfb591ef32ed9bd4046f855
6c0a63decc4c108db9f7a2f29f64794021824a4f
refs/heads/master
2020-03-31T20:10:04.373005
2018-10-11T03:36:49
2018-10-11T03:36:49
152,528,128
0
1
null
null
null
null
UTF-8
Java
false
false
3,506
java
package com.segi.uhomecp.medicaltrans.baseinfo.userstatus.rpc; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.segi.uhomecp.common.model.ResultInfo; import com.segi.uhomecp.medicaltrans.baseinfo.location.dto.MtBuildLocationDto; import com.segi.uhomecp.medicaltrans.baseinfo.userstatus.dto.UserStatusDto; import com.segi.uhomecp.medicaltrans.baseinfo.userstatus.service.MtUserStatusService; import com.segi.uhomecp.rpc.RpcError; import com.segi.uhomecp.wh.common.utils.BeanCopierUtils; import segi.medicaltrans.base.userstatus.UserStatusIce; import segi.medicaltrans.base.userstatus.UserStatusRetIce; import segi.medicaltrans.base.userstatus.UserStatusReturnIce; import segi.medicaltrans.base.userstatus._UserStatusServiceIceDisp; import segi.medicaltrans.common.userstatus.UserStatusDetailRspIce; import Ice.Current; @Component public class MtUserStatusServiceRpc extends _UserStatusServiceIceDisp{ /** * 员工状态切换 */ private static final long serialVersionUID = 1L; public static final Logger logger = LoggerFactory.getLogger(MtUserStatusServiceRpc.class); @Autowired private MtUserStatusService mtUserStatusService; /** * 切换员工状态 */ @Override public UserStatusReturnIce updateStausByUser(UserStatusIce userStatusIce, Current __current) { UserStatusReturnIce result = new UserStatusReturnIce(); result.code = RpcError.SUCCESS.getCode(); result.message = RpcError.SUCCESS.getMessage(); try { UserStatusDto userStatusDto = BeanCopierUtils.copyProperties(userStatusIce, UserStatusDto.class, true); ResultInfo resultInfo = mtUserStatusService.updateStausByUser(userStatusDto); if(resultInfo.getIsSucc()){ UserStatusRetIce userStatusRetIce = new UserStatusRetIce(); userStatusRetIce.setStatus(userStatusIce.getStatus()); userStatusRetIce.setUserId(userStatusIce.getUserId()); result.setUserStatusRetIce(userStatusRetIce); }else{ result.setCode(RpcError.FAIL.getCode()); result.setMessage(resultInfo.getMessage()); } } catch (Exception e) { logger.error("updateStausByUser", e); result.setCode(RpcError.FAIL.getCode()); result.setMessage("切换员工上下班状态失败"); } return result; } /** * 查询员工状态 */ @Override public UserStatusReturnIce getStatusByUser(UserStatusIce userStatusIce, Current __current) { UserStatusReturnIce result = new UserStatusReturnIce(); result.code = RpcError.SUCCESS.getCode(); result.message = RpcError.SUCCESS.getMessage(); try { UserStatusDto userStatusDto = BeanCopierUtils.copyProperties(userStatusIce, UserStatusDto.class, true); UserStatusDetailRspIce resultInfo = mtUserStatusService.getStatusByUser(userStatusDto); if(RpcError.SUCCESS.getCode().equals(resultInfo.getCode())){ UserStatusRetIce userStatusRetIce = new UserStatusRetIce(); userStatusRetIce.setStatus(resultInfo.getUserStatusDetailIce().getStatus()); userStatusRetIce.setUserId(resultInfo.getUserStatusDetailIce().getUserId()); result.setUserStatusRetIce(userStatusRetIce); }else{ result.setCode(RpcError.FAIL.getCode()); result.setMessage("查询员工上下班状态失败"); } } catch (Exception e) { logger.error("getStatusByUser", e); result.setCode(RpcError.FAIL.getCode()); result.setMessage("查询员工上下班状态失败"); } return result; } }
[ "522137140@qq.com" ]
522137140@qq.com
de9919e68a9f878a6049efdae3cd47a7b7293838
13cbb329807224bd736ff0ac38fd731eb6739389
/sun/java2d/loops/RenderCache.java
f9c5d359263c1c951414d4764e407f265476eccc
[]
no_license
ZhipingLi/rt-source
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
refs/heads/master
2023-07-14T15:00:33.100256
2021-09-01T04:49:04
2021-09-01T04:49:04
401,933,858
0
0
null
null
null
null
UTF-8
Java
false
false
2,049
java
package sun.java2d.loops; public final class RenderCache { private Entry[] entries; public RenderCache(int paramInt) { this.entries = new Entry[paramInt]; } public Object get(SurfaceType paramSurfaceType1, CompositeType paramCompositeType, SurfaceType paramSurfaceType2) { int i = this.entries.length - 1; for (int j = i; j >= 0; j--) { Entry entry = this.entries[j]; if (entry == null) break; if (entry.matches(paramSurfaceType1, paramCompositeType, paramSurfaceType2)) { if (j < i - 4) { System.arraycopy(this.entries, j + 1, this.entries, j, i - j); this.entries[i] = entry; } return entry.getValue(); } } return null; } public void put(SurfaceType paramSurfaceType1, CompositeType paramCompositeType, SurfaceType paramSurfaceType2, Object paramObject) { Entry entry = new Entry(paramSurfaceType1, paramCompositeType, paramSurfaceType2, paramObject); int i = this.entries.length; System.arraycopy(this.entries, 1, this.entries, 0, i - 1); this.entries[i - 1] = entry; } final class Entry { private SurfaceType src; private CompositeType comp; private SurfaceType dst; private Object value; public Entry(SurfaceType param1SurfaceType1, CompositeType param1CompositeType, SurfaceType param1SurfaceType2, Object param1Object) { this.src = param1SurfaceType1; this.comp = param1CompositeType; this.dst = param1SurfaceType2; this.value = param1Object; } public boolean matches(SurfaceType param1SurfaceType1, CompositeType param1CompositeType, SurfaceType param1SurfaceType2) { return (this.src == param1SurfaceType1 && this.comp == param1CompositeType && this.dst == param1SurfaceType2); } public Object getValue() { return this.value; } } } /* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\sun\java2d\loops\RenderCache.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.0.7 */
[ "michael__lee@yeah.net" ]
michael__lee@yeah.net
b3e86c348552b182b38b3406aa851a024b1b0fd0
4ebc9c549a4f60c1e903924835984fdbd5d61b5f
/src/Evenements/FightEvent.java
b63f16e230f095678a11dce54c2166caacf00720
[]
no_license
rnoxiv/DeepSpace42
e97476273bc48c6bdf5edc4c81fcc2f583cf25ac
42656edb988e610b8800ae9908d1f6e059eaf2f3
refs/heads/master
2021-01-10T05:16:53.039132
2015-12-20T13:44:25
2015-12-20T13:44:25
43,808,785
0
1
null
null
null
null
UTF-8
Java
false
false
4,765
java
package Evenements; import GameObjects.Zones.Building; import Utilities.JukeBox; import java.util.ArrayList; import java.util.Random; import java.util.TimerTask; //Evennement Bagarre, hérite de la classe Evennement public class FightEvent extends Evenement{ public FightEvent(ArrayList<Building> l) { super(l); taskPerformer = new TimerTask() { @Override public void run() { x = x + 1; Random r = new Random(); if (x % 2 == 0) { if (x <= 10 && !buildingListEvent.isEmpty()) { for (int i = 0; i < buildingListEvent.size(); i++) { System.out.println("Attention ! Il y a une bagarre dans " + buildingListEvent.get(i).getName() + " !"); if (buildingListEvent.get(i).getHappiness()>= 5) { buildingListEvent.get(i).setHappinessInt(buildingListEvent.get(i).getHappiness()- 5); } if (buildingListEvent.get(i).getHappiness()< 5) { buildingListEvent.get(i).setHappinessInt(0); } if (buildingListEvent.get(i).getCurrentCapacity() <= 0) { buildingListEvent.get(i).setCapacity(0); System.out.println(buildingListEvent.get(i).getName() + " ne contient plus aucun habitant"); } } } if (x <= 10 && buildingListEvent.isEmpty()) { Building fightBuilding = buildingList.get(r.nextInt(buildingList.size())); if (!"COMMAND ROOM".equals(fightBuilding.getName()) && !"POLICE".equals(fightBuilding.getName()) && fightBuilding.getCurrentCapacity()>fightBuilding.getMaxCapacity()/10) { if (fightBuilding.getFight()) { System.out.println("La bagarre dégénère dans " +fightBuilding.getName() + " !"); if (fightBuilding.getCurrentCapacity() >= 1 && fightBuilding.getHappiness() >=10) { fightBuilding.setCapacity(fightBuilding.getCurrentCapacity() - 1); fightBuilding.setHappinessInt(fightBuilding.getHappiness()-10); } if (fightBuilding.getCurrentCapacity() >= 1 && fightBuilding.getHappiness() <10) { fightBuilding.setCapacity(fightBuilding.getCurrentCapacity() - 1); fightBuilding.setHappinessInt(0); } } if (!fightBuilding.getFight()) { System.out.println("Attention ! Une bagarre éclate dans " + fightBuilding.getName() + " !!!"); fightBuilding.setFight(true); buildingListEvent.add(fightBuilding); started = true; firstLoop = true; JukeBox.play("fight"); } }else{ x = 0; } } if (x > 10 && !buildingListEvent.isEmpty()) { for (int i = 0; i < buildingListEvent.size(); i++) { if (buildingListEvent.get(i).getFight()){ System.out.println("La bagarre dégénère dans " +buildingListEvent.get(i).getName() + " !"); if (buildingListEvent.get(i).getCurrentCapacity() >= 1 && buildingListEvent.get(i).getHappiness() >=10) { buildingListEvent.get(i).setCapacity(buildingListEvent.get(i).getCurrentCapacity() - 1); buildingListEvent.get(i).setHappinessInt(buildingListEvent.get(i).getHappiness()-10); } if (buildingListEvent.get(i).getCurrentCapacity() >= 1 && buildingListEvent.get(i).getHappiness() <10) { buildingListEvent.get(i).setCapacity(buildingListEvent.get(i).getCurrentCapacity() - 1); buildingListEvent.get(i).setHappinessInt(0); } } } x = 0; } } } }; } }
[ "sabatier.david.93@gmail.com" ]
sabatier.david.93@gmail.com
29b972fa52db623e38d49d2816563f20bb4edf9d
cc3806d1276f7df3062d9a294592d600c21ff3fb
/IBFbStudyExplorer/src/ibfb/studyexplorer/core/nodes/MainStudyRootNode.java
a8440a3f08e74498088232a6ee3673f2737c7840
[]
no_license
digitalabs/IBFb
7f59be1f87b40d8073e3b2551be1f1228678ccda
12cf95c296c01324489c061b4a161d459312c3ab
refs/heads/master
2021-01-10T21:15:46.823523
2013-12-27T01:59:00
2013-12-27T01:59:00
12,491,100
0
0
null
null
null
null
UTF-8
Java
false
false
1,514
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package ibfb.studyexplorer.core.nodes; import ibfb.studyexplorer.actions.NewStudyAction; import ibfb.studyexplorer.actions.RefreshStudiesAction; import ibfb.studyexplorer.explorer.StudyExplorerTopComponent; import java.util.ResourceBundle; import javax.swing.Action; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; /** * Main node for Study explorer * @author TMSANCHEZ */ public class MainStudyRootNode extends AbstractNode { private ResourceBundle bundle = NbBundle.getBundle(StudyExplorerTopComponent.class); public MainStudyRootNode(Children children) { super(children); setIconBaseWithExtension("ibfb/studyexplorer/core/nodes/rooticon.png"); setDisplayName(bundle.getString("MainStudyRootNode.Studies")); } @Override public SystemAction[] getActions() { SystemAction[] actions = new SystemAction[0]; if (this.getDisplayName().equals(bundle.getString("MainStudyRootNode.Studies"))) { actions = new SystemAction[2]; actions[0] = SystemAction.get(NewStudyAction.class); actions[1] = SystemAction.get(RefreshStudiesAction.class); } return actions; } @Override public Action getPreferredAction() { return SystemAction.get(NewStudyAction.class); } }
[ "alvince@4ebb2e00-0138-4608-bc6e-edf3948d4863" ]
alvince@4ebb2e00-0138-4608-bc6e-edf3948d4863
4ec442b9b297beefa4f49007c3ac20f3f35d60b1
f7295dfe3c303e1d656e7dd97c67e49f52685564
/smali/com/xiaomi/gamecenter/sdk/web/d.java
2e2a8e6610759e4b883548158fc33ca1a66038f6
[]
no_license
Eason-Chen0452/XiaoMiGame
36a5df0cab79afc83120dab307c3014e31f36b93
ba05d72a0a0c7096d35d57d3b396f8b5d15729ef
refs/heads/master
2022-04-14T11:08:31.280151
2020-04-14T08:57:25
2020-04-14T08:57:25
255,541,211
0
1
null
null
null
null
UTF-8
Java
false
false
1,420
java
package com.xiaomi.gamecenter.sdk.web; import android.view.KeyEvent; import android.view.View; import android.view.View.OnKeyListener; import android.webkit.WebView; import com.xiaomi.gamecenter.sdk.utils.ReporterUtils; final class d implements View.OnKeyListener { d(VerifyIDWebFragment paramVerifyIDWebFragment) {} public final boolean onKey(View paramView, int paramInt, KeyEvent paramKeyEvent) { if ((paramInt == 4) && (paramKeyEvent.getAction() == 1)) { if (VerifyIDWebFragment.a(this.a) == null) { VerifyIDWebFragment.b(this.a); return true; } if (VerifyIDWebFragment.c(this.a) == null) { VerifyIDWebFragment.a(this.a).a(); return true; } paramView = VerifyIDWebFragment.c(this.a).getUrl(); if ((VerifyIDWebFragment.c(this.a).canGoBack()) && (!VerifyIDWebFragment.d(this.a).equals(paramView))) { if (paramView != null) { VerifyIDWebFragment.a(this.a, paramView); } VerifyIDWebFragment.c(this.a).goBack(); return true; } ReporterUtils.getInstance().xmsdkReport(2024); VerifyIDWebFragment.e(this.a); return true; } return false; } } /* Location: C:\Users\Administrator\Desktop\apk\dex2jar\classes-dex2jar.jar!\com\xiaomi\gamecenter\sdk\web\d.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "chen_guiq@163.com" ]
chen_guiq@163.com
2a6b058fd97a0de62ed0ab10c02f1d9c4dd34ae7
e3be36449b38a10f596a6040d8a89508936e74bb
/app/src/main/java/com/example/wb/nettynode/codec/NetEncoder.java
f54a8740a664a465265acc646b01ab4882135747
[]
no_license
wblt/NettyNode
13c1d7cba57c1bf03f6a0d41019cd555d2bdd4c2
08f53021d2a4939183288f7a09c0468d11bf79ad
refs/heads/master
2021-06-30T06:07:30.146613
2017-09-18T08:27:18
2017-09-18T08:27:18
103,611,852
3
1
null
null
null
null
UTF-8
Java
false
false
984
java
package com.example.wb.nettynode.codec; //import org.slf4j.Logger; //import org.slf4j.LoggerFactory; import com.example.wb.nettynode.codec.BBBNetUtil; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToByteEncoder; public class NetEncoder extends MessageToByteEncoder<NetCommand> { // public final static Logger log = LoggerFactory.getLogger(NetEncoder.class); @Override protected void encode(ChannelHandlerContext ctx, NetCommand msg, ByteBuf out) throws Exception { try { byte[] outData = msg.encodeCmd(); out.writeBytes(outData); } catch (Exception e) { e.printStackTrace(); System.out.println("encode exception, " + BBBNetUtil.parseChannelRemoteAddr(ctx.channel())+ e); if (null != msg) { System.out.println(msg.toString()); } BBBNetUtil.closeChannel(ctx.channel()); } } }
[ "940422068@qq.com" ]
940422068@qq.com
4d56d1c7216b3f1fcbe5d04e89e8fde206195cfd
98afa6b600ca438c04f4084dc56e61f871c8bcb9
/hms-common/src/main/java/com/hyniva/sms/ws/vo/CasteSettingsMainVO.java
0ffecd2bb18798a9462ab60c5a01b03deb827df9
[]
no_license
RaviThejaGoud/hospital
88d2f4fc8c3152af2411d0a8f722e7528e6a008d
55a4a51f31b988d82c432474e62fde611f5622d8
refs/heads/master
2021-04-10T01:18:30.174761
2018-03-19T15:47:09
2018-03-19T15:47:09
125,875,662
0
0
null
null
null
null
UTF-8
Java
false
false
675
java
package com.hyniva.sms.ws.vo; import java.util.ArrayList; import java.util.List; import com.churchgroup.util.object.ObjectFunctions; import com.hyniva.sms.ws.vo.base.SMSBaseVO; public class CasteSettingsMainVO extends SMSBaseVO{ private List<CasteSettingsVO> casteSettingsVOList; public List<CasteSettingsVO> getCasteSettingsVOList() { if(ObjectFunctions.isNullOrEmpty(this.casteSettingsVOList)) { this.casteSettingsVOList = new ArrayList<CasteSettingsVO>(); } return casteSettingsVOList; } public void setCasteSettingsVOList(List<CasteSettingsVO> casteSettingsVOList) { this.casteSettingsVOList = casteSettingsVOList; } }
[ "ravisiva523@gmail.com" ]
ravisiva523@gmail.com
1d12cd45fa74d8eb8a8017cf69e010c8bc5f33f4
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/HBase/3820_2.java
4ae5f2d9ac79efa66de8cc85eea77f2904fc2419
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
767
java
//,temp,THBaseService.java,6889,6902,temp,Hbase.java,7243,7256 //,2 public class xxx { public void onComplete(java.lang.Integer o) { scannerOpen_result result = new scannerOpen_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
c3adbf5116dd64224741df2adb72e5f848d3bf7f
aa82c44707cbb70da67c3dabdde11e162e56a1b6
/com.jtrent238.jtcraft/src/main/java/ate.java
38af6e8b15a28da884605befaf8fc0f5092bf204
[]
no_license
jtrent238/jtcraft
c6804899969c7e5776253c5122539848c7de5f50
290820012690e87a491eaa450b9154fd9cf96115
refs/heads/master
2021-01-10T09:28:28.084577
2016-03-03T02:52:04
2016-03-03T02:52:04
53,013,456
0
0
null
null
null
null
UTF-8
Java
false
false
1,758
java
/* */ import java.util.ArrayList; /* */ import java.util.LinkedList; /* */ import java.util.Random; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class ate /* */ extends avm /* */ { /* */ public ate() {} /* */ /* */ public ate(ahb paramahb, Random paramRandom, int paramInt1, int paramInt2) /* */ { /* 70 */ super(paramInt1, paramInt2); /* */ /* 72 */ atw localatw = new atw(paramRandom, (paramInt1 << 4) + 2, (paramInt2 << 4) + 2); /* 73 */ this.a.add(localatw); /* 74 */ localatw.a(localatw, this.a, paramRandom); /* */ /* 76 */ ArrayList localArrayList = localatw.e; /* 77 */ while (!localArrayList.isEmpty()) { /* 78 */ int i = paramRandom.nextInt(localArrayList.size()); /* 79 */ avk localavk = (avk)localArrayList.remove(i); /* 80 */ localavk.a(localatw, this.a, paramRandom); /* */ } /* */ /* 83 */ c(); /* 84 */ a(paramahb, paramRandom, 48, 70); /* */ } /* */ } /* Location: C:\Users\trent\.gradle\caches\minecraft\net\minecraft\minecraft\1.7.10\minecraft-1.7.10.jar!\ate.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "jtrent238@outlook.com" ]
jtrent238@outlook.com
2ed3ccf5c1374d0f6df51ac4934e0f7b0fe696eb
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/23/23_fe73bc24c4b70721e1963147883c0a7c0c3ed62e/R/23_fe73bc24c4b70721e1963147883c0a7c0c3ed62e_R_t.java
7ee6d3fac4feef60fe45f9cd60154417e9fcd78d
[]
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
3,379
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package de.questmaster.tudmensa; public final class R { public static final class array { public static final int MensaLocations=0x7f040000; public static final int MensaLocationsValues=0x7f040001; } public static final class attr { } public static final class drawable { public static final int essen_d=0x7f020000; public static final int essenlogo=0x7f020001; public static final int meal_f_d=0x7f020002; public static final int meal_g_d=0x7f020003; public static final int meal_k_d=0x7f020004; public static final int meal_r_d=0x7f020005; public static final int meal_rs_d=0x7f020006; public static final int meal_s_d=0x7f020007; public static final int meal_v_d=0x7f020008; public static final int trans_pix=0x7f020009; } public static final class id { public static final int counter=0x7f060000; public static final int meal=0x7f060004; public static final int meal_type=0x7f060002; public static final int price=0x7f060005; public static final int widget35=0x7f060001; public static final int widget37=0x7f060003; } public static final class layout { public static final int meals_list=0x7f030000; public static final int simple_expandable_list_item_1=0x7f030001; public static final int simple_expandable_list_item_2=0x7f030002; } public static final class string { public static final int antioxidant=0x7f050013; public static final int app_name=0x7f050001; public static final int beef=0x7f05000a; public static final int beefpig=0x7f05000f; public static final int blackened =0x7f050017; public static final int calf=0x7f05000c; public static final int colorant=0x7f050011; public static final int delete_db=0x7f05001b; public static final int dialog_updating_text=0x7f050003; public static final int fish=0x7f05000b; public static final int flavor_enhancer=0x7f050014; public static final int menu_of=0x7f050010; public static final int menu_settings=0x7f050007; public static final int menu_update=0x7f050008; public static final int no_meals=0x7f050002; public static final int phenylalanine_source=0x7f050019; public static final int phosphate=0x7f050018; public static final int pig=0x7f05000d; public static final int poultry=0x7f050009; public static final int pref_MensaLocationLabel=0x7f050006; public static final int pref_MensaLocationSummary=0x7f050005; public static final int pref_cat_mensa=0x7f050004; public static final int preservative=0x7f050012; public static final int settings_name=0x7f050000; public static final int sulphur_treated=0x7f050015; public static final int sweetening=0x7f05001a; public static final int vegie=0x7f05000e; public static final int waxed=0x7f050016; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9ba104c4b03efb33e4ffeec3e8c59940f3e70ccd
0308ca5b152a082c1a206a1a136fd45e79b48143
/usvao/VAO/software/security/vaosso/rc/1.0rc4/apps/purse/src/main/org/globus/purse/registration/mailProcessing/MessageComposer.java
b06e355b736799744cef0abe2217453b363857d3
[]
no_license
Schwarzam/usvirtualobservatory
b609bf21a09c187b70e311a4c857516284049c31
53fe6c14cc9312d048326acfa25377e3eac59858
refs/heads/master
2022-03-28T23:38:58.847018
2019-11-27T16:05:47
2019-11-27T16:05:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
846
java
/* This file is licensed under the terms of the Globus Toolkit Public License, found at http://www.globus.org/toolkit/download/license.html. */ package org.globus.purse.registration.mailProcessing; import java.io.Writer; import java.io.IOException; import java.util.Properties; /** * an interface used for assembling the body of a message to be * sent to a user. */ public interface MessageComposer { /** * write the message to the given output stream. * @param info a list of properties representing information to be * incorporated into the message. The expected * properties and their use is implementation dependent. * @param out the output stream to write the message to. */ public void compose(Properties info, Writer out) throws IOException; }
[ "usvirtualobservatory@5a1e9bf7-f4d4-f7d4-5b89-e7d39643c4b5" ]
usvirtualobservatory@5a1e9bf7-f4d4-f7d4-5b89-e7d39643c4b5
0c1df867c1565e057adc718395c49199e195c379
8b261b77c9bd77b360a4473f92aec27b9b55d9c1
/ZBLibrary/src/main/java/zuo/biao/library/versionchecklib/callback/CommitClickListener.java
fb054787cc4f6cc1225f46bc3478d17837b389f3
[]
no_license
kh1011/Master
f8f66d5d3126f626e4f06debbc5983a302a385ed
5b9d36f6922f9dd2833f06c60eacc502e3e39b81
refs/heads/master
2020-03-14T00:48:48.841358
2018-04-28T02:32:02
2018-04-28T02:32:02
131,364,497
0
0
null
null
null
null
UTF-8
Java
false
false
165
java
package zuo.biao.library.versionchecklib.callback; /** * Created by Allen Liu on 2017/2/23. */ public interface CommitClickListener { void onCommitClick(); }
[ "782818448@qq.com" ]
782818448@qq.com
dc9d28b64089af19487e69eeb3079da055377339
89e623815feb73650630b4b252f50a6b24d187f4
/src/main/java/com/yundao/tenant/dto/field/ImageDto.java
ec63cb8b6984b5d693cd51be2b50ca93f5ea91aa
[]
no_license
wucaiqiang/yundao-tenant
19b673eabdd79df9680bd6738eea283b9d696c31
660eea5ce4e324d3b4db538ee26ecbf83241043a
refs/heads/master
2021-08-30T20:53:00.708567
2017-12-19T11:35:36
2017-12-19T11:35:36
114,628,331
1
0
null
null
null
null
UTF-8
Java
false
false
613
java
package com.yundao.tenant.dto.field; import io.swagger.annotations.ApiModelProperty; public class ImageDto { @ApiModelProperty("附件id") private Long id; /** * 文件名称 */ @ApiModelProperty("图片名称") private String name; /** * url */ @ApiModelProperty("url") private String url; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
[ "wucaiqiang@zcmall.com" ]
wucaiqiang@zcmall.com
4746406872a923b30283b1e0145b226ab85951e5
3de3dae722829727edfdd6cc3b67443a69043475
/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SkinTempTempToPixelConverter.java
ef11658cd788b3be7593da66d0f7a314aedb42f1
[ "LicenseRef-scancode-public-domain", "Apache-2.0" ]
permissive
Unidata/awips2
9aee5b7ec42c2c0a2fa4d877cb7e0b399db74acb
d76c9f96e6bb06f7239c563203f226e6a6fffeef
refs/heads/unidata_18.2.1
2023-08-18T13:00:15.110785
2023-08-09T06:06:06
2023-08-09T06:06:06
19,332,079
161
75
NOASSERTION
2023-09-13T19:06:40
2014-05-01T00:59:04
Java
UTF-8
Java
false
false
2,973
java
/** * This software was developed and / or modified by Raytheon Company, * pursuant to Contract DG133W-05-CQ-1067 with the US Government. * * U.S. EXPORT CONTROLLED TECHNICAL DATA * This software product contains export-restricted data whose * export/transfer/disclosure is restricted by U.S. law. Dissemination * to non-U.S. persons whether in the United States or abroad requires * an export license or other authorization. * * Contractor Name: Raytheon Company * Contractor Address: 6825 Pine Street, Suite 340 * Mail Stop B8 * Omaha, NE 68106 * 402.291.0100 * * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ package com.raytheon.uf.common.dataplugin.satellite.units.goes.convert; import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a skin temperature in Kelvin to a pixel value * * <pre> * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 30, 2007 njensen Initial creation * * </pre> * * @author njensen */ public class SkinTempTempToPixelConverter extends UnitConverter { private static final long serialVersionUID = 1L; private static UnitConverter kelvinToCelsius = SI.KELVIN .getConverterTo(SI.CELSIUS); /* * (non-Javadoc) * * @see javax.measure.converter.UnitConverter#convert(double) */ @Override public double convert(double aTemp) throws ConversionException { // value is in kelvin, but below calculates pixel based on value being // celsius aTemp = kelvinToCelsius.convert(aTemp); double result = (63.0 - aTemp) * 2.0; if (result < 0) { result = 0; } else if (result > 255) { result = 255; } return result; } /* * (non-Javadoc) * * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) */ @Override public boolean equals(Object aConverter) { return (aConverter instanceof SkinTempTempToPixelConverter); } /* * (non-Javadoc) * * @see javax.measure.converter.UnitConverter#hashCode() */ @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } /* * (non-Javadoc) * * @see javax.measure.converter.UnitConverter#inverse() */ @Override public UnitConverter inverse() { return new SkinTempPixelToTempConverter(); } /* * (non-Javadoc) * * @see javax.measure.converter.UnitConverter#isLinear() */ @Override public boolean isLinear() { return true; } }
[ "mjames@unidata.ucar.edu" ]
mjames@unidata.ucar.edu