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
c4f4656d9b8d9654a1e853369c6b568ac7f6b1cb
828b5327357d0fb4cb8f3b4472f392f3b8b10328
/flink-java/src/main/java/org/apache/flink/api/java/operators/MapPartitionOperator.java
bc8664fc5b20fab5c96c04a9f5a2e0f91fe3ecc8
[ "CC-BY-3.0", "LicenseRef-scancode-unknown-license-reference", "Unlicense", "ISC", "MIT-0", "GPL-2.0-only", "BSD-2-Clause-Views", "OFL-1.1", "Apache-2.0", "LicenseRef-scancode-jdom", "GCC-exception-3.1", "MPL-2.0", "CC-PDDC", "AGPL-3.0-only", "MPL-2.0-no-copyleft-exception", "LicenseRef-scancode-public-domain", "LGPL-2.1-only", "BSD-2-Clause", "CDDL-1.1", "CDDL-1.0", "LicenseRef-scancode-other-permissive", "LicenseRef-scancode-proprietary-license", "BSD-3-Clause", "MIT", "EPL-1.0", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-free-unknown", "CC0-1.0", "Classpath-exception-2.0", "CC-BY-2.5" ]
permissive
Romance-Zhang/flink_tpc_ds_game
7e82d801ebd268d2c41c8e207a994700ed7d28c7
8202f33bed962b35c81c641a05de548cfef6025f
refs/heads/master
2022-11-06T13:24:44.451821
2019-09-27T09:22:29
2019-09-27T09:22:29
211,280,838
0
1
Apache-2.0
2022-10-06T07:11:45
2019-09-27T09:11:11
Java
UTF-8
Java
false
false
3,021
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.api.java.operators; import org.apache.flink.annotation.Public; import org.apache.flink.api.common.functions.MapPartitionFunction; import org.apache.flink.api.common.operators.Operator; import org.apache.flink.api.common.operators.UnaryOperatorInformation; import org.apache.flink.api.common.operators.base.MapPartitionOperatorBase; import org.apache.flink.api.common.typeinfo.TypeInformation; import org.apache.flink.api.java.DataSet; /** * This operator represents the application of a "mapPartition" function on a data set, and the * result data set produced by the function. * * @param <IN> The type of the data set consumed by the operator. * @param <OUT> The type of the data set created by the operator. * * @see MapPartitionFunction */ @Public public class MapPartitionOperator<IN, OUT> extends SingleInputUdfOperator<IN, OUT, MapPartitionOperator<IN, OUT>> { protected final MapPartitionFunction<IN, OUT> function; protected final String defaultName; public MapPartitionOperator(DataSet<IN> input, TypeInformation<OUT> resultType, MapPartitionFunction<IN, OUT> function, String defaultName) { super(input, resultType); this.function = function; this.defaultName = defaultName; } @Override protected MapPartitionFunction<IN, OUT> getFunction() { return function; } @Override protected MapPartitionOperatorBase<IN, OUT, MapPartitionFunction<IN, OUT>> translateToDataFlow(Operator<IN> input) { String name = getName() != null ? getName() : "MapPartition at " + defaultName; // create operator MapPartitionOperatorBase<IN, OUT, MapPartitionFunction<IN, OUT>> po = new MapPartitionOperatorBase<IN, OUT, MapPartitionFunction<IN, OUT>>(function, new UnaryOperatorInformation<IN, OUT>(getInputType(), getResultType()), name); // set input po.setInput(input); // set parallelism if (this.getParallelism() > 0) { // use specified parallelism po.setParallelism(this.getParallelism()); } else { // if no parallelism has been specified, use parallelism of input operator to enable chaining po.setParallelism(input.getParallelism()); } return po; } }
[ "1003761104@qq.com" ]
1003761104@qq.com
2cc389eab150d161b28e0c535e23b10c9e1e62a4
f45f13360e35f7c72d83811d73448dc833208f0d
/ApuestaAmerica/app/src/main/java/castro/willy/globalhub/pe/apuestaamerica/Pais.java
d2596a2ae765cdc978a8aca526fc7bee41962c6e
[]
no_license
cequattro/obras
f42c78de62e55b562c6d98fe12b83245c0738ac0
f0090b73fce499cc349fcc7d6659c6b1082164df
refs/heads/master
2021-01-13T09:50:28.833568
2020-02-11T22:28:09
2020-02-11T22:28:09
72,766,955
0
0
null
null
null
null
UTF-8
Java
false
false
1,289
java
package castro.willy.globalhub.pe.apuestaamerica; import android.graphics.Bitmap; /** * Created by Android on 05/11/2016. */ public class Pais { private String nombre; private String descripcion; private int imagen; private Bitmap imagenBitmap; public Pais() { } public Pais(String nombre, String descripcion, int imagen, Bitmap imagenBitmap) { this.nombre = nombre; this.descripcion = descripcion; this.imagen = imagen; this.imagenBitmap = imagenBitmap; } public Pais(String nombre, String descripcion) { this.nombre = nombre; this.descripcion = descripcion; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public String getDescripcion() { return descripcion; } public void setDescripcion(String descripcion) { this.descripcion = descripcion; } public int getImagen() { return imagen; } public void setImagen(int imagen) { this.imagen = imagen; } public Bitmap getImagenBitmap() { return imagenBitmap; } public void setImagenBitmap(Bitmap imagenBitmap) { this.imagenBitmap = imagenBitmap; } }
[ "cequattro@gmail.com" ]
cequattro@gmail.com
211205a461ccabfe7049d799f2898adaf27f3ace
5e4100a6611443d0eaa8774a4436b890cfc79096
/src/main/java/com/alipay/api/response/AlipayEbppIndustryApplyflowQueryResponse.java
3ddd03cb389c5ab442c2986b907a7cbc6105e604
[ "Apache-2.0" ]
permissive
coderJL/alipay-sdk-java-all
3b471c5824338e177df6bbe73ba11fde8bc51a01
4f4ed34aaf5a320a53a091221e1832f1fe3c3a87
refs/heads/master
2020-07-15T22:57:13.705730
2019-08-14T10:37:41
2019-08-14T10:37:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,804
java
package com.alipay.api.response; import java.util.Date; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.ebpp.industry.applyflow.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayEbppIndustryApplyflowQueryResponse extends AlipayResponse { private static final long serialVersionUID = 5235683322847513775L; /** * 业务能力码,标识业务场景 */ @ApiField("ability_code") private String abilityCode; /** * 支付宝办理流水号,支持幂等 */ @ApiField("apply_flow_no") private String applyFlowNo; /** * 业务账户号,例如水费单号,手机号,电费号。没有唯一性要求。 */ @ApiField("bill_key") private String billKey; /** * 业务机构简称 */ @ApiField("biz_inst") private String bizInst; /** * 业务类型 */ @ApiField("biz_type") private String bizType; /** * 流水创建时间 */ @ApiField("gmt_create") private Date gmtCreate; /** * 办理流水最近修改时间 */ @ApiField("gmt_modified") private Date gmtModified; /** * 机构结果码 */ @ApiField("org_result_code") private String orgResultCode; /** * 外部申请流水号 */ @ApiField("out_apply_no") private String outApplyNo; /** * 业务结果码 */ @ApiField("result_code") private String resultCode; /** * 结果上下文,json格式 */ @ApiField("result_context") private String resultContext; /** * 结果码描述文案 */ @ApiField("result_msg") private String resultMsg; /** * 办理状态,SUCCESS:成功;FAILURE:失败;PROCESS:处理中 */ @ApiField("status") private String status; public void setAbilityCode(String abilityCode) { this.abilityCode = abilityCode; } public String getAbilityCode( ) { return this.abilityCode; } public void setApplyFlowNo(String applyFlowNo) { this.applyFlowNo = applyFlowNo; } public String getApplyFlowNo( ) { return this.applyFlowNo; } public void setBillKey(String billKey) { this.billKey = billKey; } public String getBillKey( ) { return this.billKey; } public void setBizInst(String bizInst) { this.bizInst = bizInst; } public String getBizInst( ) { return this.bizInst; } public void setBizType(String bizType) { this.bizType = bizType; } public String getBizType( ) { return this.bizType; } public void setGmtCreate(Date gmtCreate) { this.gmtCreate = gmtCreate; } public Date getGmtCreate( ) { return this.gmtCreate; } public void setGmtModified(Date gmtModified) { this.gmtModified = gmtModified; } public Date getGmtModified( ) { return this.gmtModified; } public void setOrgResultCode(String orgResultCode) { this.orgResultCode = orgResultCode; } public String getOrgResultCode( ) { return this.orgResultCode; } public void setOutApplyNo(String outApplyNo) { this.outApplyNo = outApplyNo; } public String getOutApplyNo( ) { return this.outApplyNo; } public void setResultCode(String resultCode) { this.resultCode = resultCode; } public String getResultCode( ) { return this.resultCode; } public void setResultContext(String resultContext) { this.resultContext = resultContext; } public String getResultContext( ) { return this.resultContext; } public void setResultMsg(String resultMsg) { this.resultMsg = resultMsg; } public String getResultMsg( ) { return this.resultMsg; } public void setStatus(String status) { this.status = status; } public String getStatus( ) { return this.status; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
7ae484c99ca441a7799b3c72cecdb399cc58817b
1264ce4f7240a56b39b99bbfcdf7c59131cac5db
/5674-640/Chapter08/src/jp/co/se/android/recipe/chapter08/Ch0815.java
4bd72a4869b09a54c303d3f00dba5054f75df662
[]
no_license
danielkulcsar/webhon
7ea0caef64fc7ddec691f809790c5aa1d960635a
c6a25cc2fd39dda5907ee1b5cb875a284aa6ce3d
refs/heads/master
2021-06-23T08:06:48.890022
2017-08-27T05:28:19
2017-08-27T05:28:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,740
java
package jp.co.se.android.recipe.chapter08; import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.widget.TextView; public class Ch0815 extends Activity { private TextView mTextView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ch0815_main); mTextView = (TextView) findViewById(R.id.text); // URL을 Uri형으로 변환 Uri uri = Uri .parse("https://user:pass@www.example.com:8080/path/to/index.html?parameter1=parameter1value&parameter2=value#fragment"); String parsedUriMessage = getParsedUriMessage(uri); mTextView.setText(parsedUriMessage); } private String getParsedUriMessage(Uri uri) { StringBuilder sb = new StringBuilder(); sb.append("URI: ").append(uri.toString()).append("\n\n"); sb.append("scheme: ").append(uri.getScheme()).append("\n"); sb.append("scheme-specific-part:").append(uri.getSchemeSpecificPart()) .append("\n"); sb.append("userinfo: ").append(uri.getUserInfo()).append("\n"); sb.append("authority: ").append(uri.getAuthority()).append("\n"); sb.append("host: ").append(uri.getHost()).append("\n"); sb.append("port: ").append(uri.getPort()).append("\n"); sb.append("path-segments: ").append(uri.getPathSegments()).append("\n"); sb.append("last-path-segment: ").append(uri.getLastPathSegment()) .append("\n"); sb.append("query: ").append(uri.getQuery()).append("\n"); sb.append("fragment: ").append(uri.getFragment()).append("\n"); return sb.toString(); } }
[ "webhon747@gmail.com" ]
webhon747@gmail.com
ae62da52b4b5e21a00d0b2a5837be12603503a6b
9df552a636a3f6c77bb309d18ea8e62c6ed8f2ef
/src/main/java/com/frankcooper/platform/lintcode/_860.java
dbc4903d6c7a96a22a8333b8965644aeaefd9408
[]
no_license
wat1r/geek-algorithm-leetcode
a1bef16541f771bec5c5dd44d8b4634a6251dc08
46c0ced5bb069b33bc253366f30feb52b5fb0fa9
refs/heads/master
2023-07-19T17:52:41.153871
2023-07-19T14:01:14
2023-07-19T14:01:14
245,184,502
19
4
null
2022-06-17T03:38:06
2020-03-05T14:28:48
Java
UTF-8
Java
false
false
3,570
java
package com.frankcooper.platform.lintcode; import java.util.HashSet; import java.util.Set; /** * @Date 2020/8/17 * @Author Frank Cooper * @Description */ public class _860 { static _860 handler = new _860(); public static void main(String[] args) { int[][] grid = new int[][]{{1, 1, 0, 0, 1}, {1, 0, 0, 0, 0}, {1, 1, 0, 0, 1}, {0, 1, 0, 1, 1}}; // handler.numberofDistinctIslands1st(grid); } static class _1st { int m, n; int[][] directions = new int[][]{{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; public int numberofDistinctIslands1st(int[][] grid) { if (grid == null || grid.length == 0 || grid[0].length == 0) return 0; m = grid.length; n = grid[0].length; Set<String> set = new HashSet<>(); for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (grid[i][j] == 1) { StringBuilder path = new StringBuilder(); dfs(grid, i, j, path, i, j); System.out.println(path.toString()); set.add(path.toString()); } } } return set.size(); } /** * @param grid * @param i * @param j * @param path 路径 * @param seedI 种子坐标 * @param seedJ 种子坐标 */ private void dfs(int[][] grid, int i, int j, StringBuilder path, int seedI, int seedJ) { if (!inArea(i, j) || grid[i][j] != 1) return; grid[i][j] = 2; path.append(i - seedI).append(j - seedJ); for (int[] direction : directions) { int nextI = i + direction[0]; int nextJ = j + direction[1]; dfs(grid, nextI, nextJ, path, seedI, seedJ); } } private boolean inArea(int i, int j) { return i >= 0 && i < m && j >= 0 && j < n; } } static class _2nd { static _2nd handler = new _2nd(); public static void main(String[] args) { int[][] grid = new int[][]{{1, 1, 0, 0, 1}, {1, 0, 0, 0, 0}, {1, 1, 0, 0, 1}, {0, 1, 0, 1, 1}}; handler.numberofDistinctIslands(grid); } int m, n; public int numberofDistinctIslands(int[][] grid) { if (grid == null || grid.length == 0 || grid[0].length == 0) return 0; m = grid.length; n = grid[0].length; Set<String> set = new HashSet<>(); for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (grid[i][j] == 1) { StringBuilder path = new StringBuilder(); dfs(grid, i, j, path); System.out.println(path.toString()); set.add(path.toString()); } } } return set.size(); } private void dfs(int[][] grid, int i, int j, StringBuilder path) { if (!inArea(i, j) || grid[i][j] != 1) return; grid[i][j] = 2; dfs(grid, i - 1, j, path.append("u")); //up; dfs(grid, i, j + 1, path.append("r")); //right; dfs(grid, i + 1, j, path.append("d")); //down; dfs(grid, i, j - 1, path.append("l")); //left; } private boolean inArea(int i, int j) { return i >= 0 && i < m && j >= 0 && j < n; } } }
[ "cnwangzhou@hotmail.com" ]
cnwangzhou@hotmail.com
9927e4ac8771e2f00127c602f5485c157ab4215b
2daea090c54d11688b7e2f40fbeeda22fe3d01f6
/test/src/test/java/org/zstack/test/eip/TestPolicyForEip1.java
2c2c9548e396b40a5d45e959f3835ff6f39496ec
[ "Apache-2.0" ]
permissive
jxg01713/zstack
1f0e474daa6ca4647d0481c7e44d86a860ac209c
182fb094e9a6ef89cf010583d457a9bf4f033f33
refs/heads/1.0.x
2021-06-20T12:36:16.609798
2016-03-17T08:03:29
2016-03-17T08:03:29
197,339,567
0
0
Apache-2.0
2021-03-19T20:23:19
2019-07-17T07:36:39
Java
UTF-8
Java
false
false
3,574
java
package org.zstack.test.eip; import junit.framework.Assert; import org.junit.Before; import org.junit.Test; import org.zstack.core.cloudbus.CloudBus; import org.zstack.core.componentloader.ComponentLoader; import org.zstack.core.db.DatabaseFacade; import org.zstack.header.identity.AccountConstant.StatementEffect; import org.zstack.header.identity.AccountInventory; import org.zstack.header.identity.IdentityErrors; import org.zstack.header.identity.PolicyInventory.Statement; import org.zstack.header.identity.SessionInventory; import org.zstack.header.network.l3.L3NetworkConstant; import org.zstack.header.network.l3.L3NetworkInventory; import org.zstack.header.query.QueryCondition; import org.zstack.header.vm.VmInstanceInventory; import org.zstack.header.vm.VmNicInventory; import org.zstack.network.service.eip.*; import org.zstack.network.service.vip.APICreateVipMsg; import org.zstack.network.service.vip.VipConstant; import org.zstack.network.service.vip.VipInventory; import org.zstack.simulator.kvm.KVMSimulatorConfig; import org.zstack.simulator.virtualrouter.VirtualRouterSimulatorConfig; import org.zstack.test.Api; import org.zstack.test.ApiSenderException; import org.zstack.test.DBUtil; import org.zstack.test.WebBeanConstructor; import org.zstack.test.deployer.Deployer; import org.zstack.test.identity.IdentityCreator; import java.util.ArrayList; /** * test quota */ public class TestPolicyForEip1 { Deployer deployer; Api api; ComponentLoader loader; CloudBus bus; DatabaseFacade dbf; SessionInventory session; VirtualRouterSimulatorConfig vconfig; KVMSimulatorConfig kconfig; @Before public void setUp() throws Exception { DBUtil.reDeployDB(); WebBeanConstructor con = new WebBeanConstructor(); deployer = new Deployer("deployerXml/eip/TestPolicyForEip.xml", con); deployer.addSpringConfig("VirtualRouter.xml"); deployer.addSpringConfig("VirtualRouterSimulator.xml"); deployer.addSpringConfig("KVMRelated.xml"); deployer.addSpringConfig("vip.xml"); deployer.addSpringConfig("eip.xml"); deployer.build(); api = deployer.getApi(); loader = deployer.getComponentLoader(); vconfig = loader.getComponent(VirtualRouterSimulatorConfig.class); kconfig = loader.getComponent(KVMSimulatorConfig.class); bus = loader.getComponent(CloudBus.class); dbf = loader.getComponent(DatabaseFacade.class); session = api.loginAsAdmin(); } private EipInventory createEip(String l3Uuid, String nicUuid, SessionInventory session) throws ApiSenderException { VipInventory vip = api.acquireIp(l3Uuid, session); return api.createEip("eip", vip.getUuid(), nicUuid, session); } @Test public void test() throws ApiSenderException { L3NetworkInventory l3 = deployer.l3Networks.get("PublicNetwork"); IdentityCreator identityCreator = new IdentityCreator(api); AccountInventory test = identityCreator.useAccount("test"); SessionInventory session = identityCreator.getAccountSession(); createEip(l3.getUuid(), null, session); api.updateQuota(test.getUuid(), EipConstant.QUOTA_EIP_NUM, 1); boolean success = false; try { createEip(l3.getUuid(), null, session); } catch (ApiSenderException e) { if (IdentityErrors.QUOTA_EXCEEDING.toString().equals(e.getError().getCode())) { success = true; } } Assert.assertTrue(success); } }
[ "xing5820@gmail.com" ]
xing5820@gmail.com
e6c25f9b49a5503118b334be2e1d78485d1448bd
61ba272925e10ac051b1c9f484825f5832013ee9
/src/main/java/com/xdl/p2p/manger/system/service/IBannerService.java
72a1c7dc2b474895f8ad984c6a9fb9a7c63ee1c4
[]
no_license
siknight/p2p
4be972a578c703231a332d33e9bc7e8ebd1b67c1
18808fb47db1eafcf39aaa8f4c21ca3cf839a8b9
refs/heads/master
2022-12-25T00:55:43.828386
2019-11-14T01:49:59
2019-11-14T01:50:20
220,993,307
0
0
null
2022-12-16T11:18:10
2019-11-11T13:59:03
JavaScript
UTF-8
Java
false
false
1,052
java
package com.xdl.p2p.manger.system.service; import java.sql.Timestamp; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.xdl.p2p.manger.system.entity.Banner; import com.xdl.p2p.manger.system.entity.BannerExample; import com.xdl.p2p.manger.system.entity.BannerExample.Criteria; @Service public class IBannerService { @Autowired private BannerMapper bannerMapper; public void saveBanner(Banner banner) { banner.setDr(0); banner.setIsUse(1); banner.setCreateTime(new Timestamp(System.currentTimeMillis())); bannerMapper.insert(banner); } public List<Banner> queryBannerList() { return bannerMapper.selectByExample(null); } public List<Banner> queryBannerByType(String imgType) { BannerExample bannerExample = new BannerExample(); Criteria criteria = bannerExample.createCriteria(); criteria.andTerminalTypeEqualTo(Integer.valueOf(imgType)); List<Banner> list = bannerMapper.selectByExample(bannerExample); return list; } }
[ "1786678583@qq.com" ]
1786678583@qq.com
4c612114341759ab7df1448b419525c1837f7fe5
b1628d5ab22d52b08dfa72dc9e7bd79a537e9820
/eventuate-local-java-jdbc-tests/src/test/java/io/eventuate/local/java/jdbckafkastore/JdbcAutoConfigurationWithSnapshotsIntegrationTest.java
a1287703c871613f8d9b173d0dffe84fbbeb97ed
[ "Apache-2.0" ]
permissive
narraboss/eventuate-local
c212ef9820bbe506db6a0b63b68fd667b4dda151
713f78f225eef3e99b9b6a66b8bdeab317f2539d
refs/heads/master
2023-02-05T00:33:10.296557
2017-06-27T22:56:41
2017-06-27T22:56:41
95,931,603
0
0
NOASSERTION
2023-01-27T02:50:48
2017-06-30T23:56:55
JavaScript
UTF-8
Java
false
false
2,525
java
package io.eventuate.local.java.jdbckafkastore; import io.eventuate.EntityWithIdAndVersion; import io.eventuate.EntityWithMetadata; import io.eventuate.example.banking.domain.Account; import io.eventuate.example.banking.domain.AccountCommand; import io.eventuate.example.banking.domain.AccountSnapshotStrategy; import io.eventuate.example.banking.domain.CreateAccountCommand; import io.eventuate.example.banking.domain.DebitAccountCommand; import io.eventuate.sync.AggregateRepository; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.IntegrationTest; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.math.BigDecimal; import java.util.concurrent.ExecutionException; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.any; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = JdbcAutoConfigurationIntegrationWithSnapshotsTestConfiguration.class) @IntegrationTest public class JdbcAutoConfigurationWithSnapshotsIntegrationTest { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private AggregateRepository<Account, AccountCommand> accountRepository; @Autowired private AccountSnapshotStrategy accountSnapshotStrategy; @Test public void shouldCreateAndUpdateAccounts() throws ExecutionException, InterruptedException { verify(accountSnapshotStrategy).getAggregateClass(); BigDecimal initialBalance = new BigDecimal(12345); BigDecimal debitAmount = new BigDecimal(12); EntityWithIdAndVersion<Account> saveResult = accountRepository.save(new CreateAccountCommand(initialBalance)); EntityWithIdAndVersion<Account> updateResult = accountRepository.update(saveResult.getEntityId(), new DebitAccountCommand(debitAmount, null)); verify(accountSnapshotStrategy).possiblySnapshot(any(), any(), any(), any()); EntityWithMetadata<Account> findResult = accountRepository.find(saveResult.getEntityId()); assertEquals(initialBalance.subtract(debitAmount), findResult.getEntity().getBalance()); verify(accountSnapshotStrategy).recreateAggregate(any(), any()); verifyNoMoreInteractions(accountSnapshotStrategy); } }
[ "chris@chrisrichardson.net" ]
chris@chrisrichardson.net
26e0ab72cc4eee3b2ce6bd53eac2b70ddbca81c7
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/ros-20190910/src/main/java/com/aliyun/ros20190910/models/ExecuteChangeSetResponseBody.java
c4a3812bc2aa06bac65927a0639a007f0214a3bc
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
735
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.ros20190910.models; import com.aliyun.tea.*; public class ExecuteChangeSetResponseBody extends TeaModel { /** * <p>The ID of the request.</p> */ @NameInMap("RequestId") public String requestId; public static ExecuteChangeSetResponseBody build(java.util.Map<String, ?> map) throws Exception { ExecuteChangeSetResponseBody self = new ExecuteChangeSetResponseBody(); return TeaModel.build(map, self); } public ExecuteChangeSetResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
f59181a4cc23327c12ed0de06551994aa00064a0
c379866bdfbdb1fce8444243bca31e2adb5d5d39
/Mage.Sets/src/mage/sets/theros/TempleOfMystery.java
5c2fb7c22078028d8bc3010858b272323ccdb4c3
[]
no_license
Agrajagd/mage
15c1516d75702638128f271e42003f8923e6277e
89aa727e05fc4dac90ca8c8c21fac98da9c72716
refs/heads/master
2021-01-18T02:43:20.054782
2014-05-07T19:44:53
2014-05-07T19:44:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,016
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ package mage.sets.theros; import java.util.UUID; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.ScryEffect; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; /** * * @author LevelX2 */ public class TempleOfMystery extends CardImpl<TempleOfMystery> { public TempleOfMystery(UUID ownerId) { super(ownerId, 226, "Temple of Mystery", Rarity.RARE, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "THS"; // Temple of Mystery enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); // When Temple of Mystery enters the battlefield, scry 1.</i> this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(1))); // {T}: Add {G} or {U} to your mana pool. this.addAbility(new GreenManaAbility()); this.addAbility(new BlueManaAbility()); } public TempleOfMystery(final TempleOfMystery card) { super(card); } @Override public TempleOfMystery copy() { return new TempleOfMystery(this); } }
[ "ludwig.hirth@online.de" ]
ludwig.hirth@online.de
61de967997c2a297ac3adcb8d7f326a557c5418c
f1807eaa59584353294af73e8a34abbda63c080d
/dbsaving/DBSAVINGSvc_IFR/src/com/encocns/id/dao/ID1042DAO.java
edca50697fb6f8e66061db0dcbd9f6f2cf2ff3a5
[]
no_license
jkkim444/flow-demo
b9756f1b24fb917e60be9e489d45296263e777b2
7113f02e0f9e4623553263270825b2e275b2833f
refs/heads/main
2023-04-01T23:12:24.474064
2021-04-14T06:38:30
2021-04-14T06:38:30
357,788,546
0
0
null
null
null
null
UTF-8
Java
false
false
1,523
java
/* * Copyright ENCOCNS.,LTD. * All rights reserved. * * This software is the confidential and proprietary information * of ENCOCNS.,LTD. ("Confidential Information"). */ /** * @file ID1042DAO.java * @brief 산출정보조회 DAO * @section Major History * <pre> * - 차상길 | 2020. 11. 26. | First Created * </pre> */ /** * @namespace com.encocns.id.dao * @brief ID DAO Package */ package com.encocns.id.dao; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import com.encocns.fw.config.db.SqlMapClient; import com.encocns.id.dto.ID104201DTO; import com.encocns.id.service.svo.ID104201IN; /** * @brief 산출정보조회 DAO * @details 산출정보조회 DAO * @author : 차상길 * @date : 2020. 11. 26. * @version : 1.0.0 */ @Repository public class ID1042DAO { private static final Logger LOGGER = LoggerFactory.getLogger(ID1042DAO.class); @Autowired private SqlMapClient session; /** * @brief selectClclIstgList * @details 보고서 산출정보 조회 * @author : 차상길 * @date : 2020. 11. 26. * @version : 1.0.0 * @param ID104201IN * @return List<ID104201DTO> */ public List<ID104201DTO> selectClclIstgList(ID104201IN in) { if(LOGGER.isDebugEnabled()) LOGGER.debug("----- selectClclIstgList -----"); return session.selectList("ID1042.selectClclIstgList", in); } }
[ "jk.kim@daeunextier.com" ]
jk.kim@daeunextier.com
e5c668937cef38b627d78e7f6d16fb23e65008f2
1c99931e81886ebecb758d68003f22e072951ff9
/alipay/api/domain/AlipayUserCharityForestsendpicSendModel.java
fe16d16e576140714c9220d4852f1d3f463ecc32
[]
no_license
futurelive/vscode
f402e497933c12826ef73abb14506aab3c541c98
9f8d1da984cf4f9f330af2b75ddb21a7fff00eb9
refs/heads/master
2020-04-08T06:30:13.208537
2018-11-26T07:09:55
2018-11-26T07:09:55
159,099,314
0
0
null
null
null
null
UTF-8
Java
false
false
1,743
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 发送蚂蚁森林林区实时图片 * * @author auto create * @since 1.0, 2017-10-17 17:06:30 */ public class AlipayUserCharityForestsendpicSendModel extends AlipayObject { private static final long serialVersionUID = 5649844741933243372L; /** * 蚂蚁森林林区ID */ @ApiField("forest_id") private String forestId; /** * 图片唯一编号,用于幂等控制 */ @ApiField("out_biz_no") private String outBizNo; /** * 拍摄图片时的气象信息,包括温度(temperature °C)、湿度(humidity %)、气压(pressure hPa)和光照强度(illumination Lux)等,json格式 */ @ApiField("pic_ext_info") private String picExtInfo; /** * 蚂蚁森林实时图像地址,必须是阿里云地址,包含"aliyun"信息 */ @ApiField("pic_url") private String picUrl; /** * 图片拍摄时间,format: YYYY-MM-DDTHH:MM:SS */ @ApiField("shoot_time") private String shootTime; public String getForestId() { return this.forestId; } public void setForestId(String forestId) { this.forestId = forestId; } public String getOutBizNo() { return this.outBizNo; } public void setOutBizNo(String outBizNo) { this.outBizNo = outBizNo; } public String getPicExtInfo() { return this.picExtInfo; } public void setPicExtInfo(String picExtInfo) { this.picExtInfo = picExtInfo; } public String getPicUrl() { return this.picUrl; } public void setPicUrl(String picUrl) { this.picUrl = picUrl; } public String getShootTime() { return this.shootTime; } public void setShootTime(String shootTime) { this.shootTime = shootTime; } }
[ "1052418627@qq.com" ]
1052418627@qq.com
8a9107b8f22bd8c4f837877a6caf272a4e90693e
fccb8543fbd1a835e09499ce0df5d6677d4484df
/metric-client/src/main/java/org/loxf/metric/client/QuotaService.java
76c30f6e92d86e69ebd8dda5e8fc8fa86da607b0
[]
no_license
loxf/Metric
b8e88819e46e045f58968bda1a557e8a7bca17ab
e3e8dbfc4a73d1dbaa5080376d7fd1714b5ed8b8
refs/heads/master
2020-04-05T13:00:48.127296
2017-06-21T14:36:23
2017-06-21T14:36:23
95,014,769
2
1
null
null
null
null
UTF-8
Java
false
false
1,188
java
package org.loxf.metric.client; import org.loxf.metric.common.dto.*; import java.util.List; import java.util.Map; /** * Created by luohj on 2017/5/4. */ public interface QuotaService { public BaseResult<String> createQuota(QuotaDto quotaDto); public BaseResult<String> updateQuota(QuotaDto quotaDto); public BaseResult<String> delQuota(QuotaDto quotaDto); public QuotaData getQuotaData(String quotaId, ConditionVo condition); public QuotaData getChartData(ChartDto chartDto, ConditionVo condition); public BaseResult<List<QuotaDto>> queryQuotaNameAndId(QuotaDto quotaDto); public BaseResult<QuotaDto> getQuotaByCode(String quotaCode); public BaseResult<QuotaDto> getQuota(String quotaId); public List<QuotaDimensionDto> queryDimenListByChartId(String chartId); public List<QuotaDimensionDto> queryDimenListByBoardId(String boardId); public List<QuotaDimensionDto> queryDimenListByQuotaId(String quotaId); public List<String> getExecuteSql(String id, String type, ConditionVo condition); public PageData<QuotaDto> listQuotaPage(QuotaDto quotaDto); public List<Map> queryDimenListByQuotaCode(String[] quotaCodes); }
[ "myself35335@163.com" ]
myself35335@163.com
8c699c0dcd6c4a789cc74286d862263c5c61d900
995f73d30450a6dce6bc7145d89344b4ad6e0622
/MATE-20_EMUI_11.0.0/src/main/java/ohos/sensor/bean/CoreOther.java
f6e6b8cee5a2f2a7399a2e13f2dd17978f345de9
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
460
java
package ohos.sensor.bean; import ohos.media.camera.mode.adapter.utils.constant.ConstantValue; public final class CoreOther extends SensorBean { public CoreOther() { this(0, null, null, 0, ConstantValue.MIN_ZOOM_VALUE, ConstantValue.MIN_ZOOM_VALUE, 0, 0, 0, 0); } public CoreOther(int i, String str, String str2, int i2, float f, float f2, int i3, int i4, long j, long j2) { super(i, str, str2, i2, f, f2, i3, i4, j, j2); } }
[ "dstmath@163.com" ]
dstmath@163.com
12609195d8c72d738e8f6f19dc8689797ee3af38
29d3e33060d40042a452f4edc6f8980077b1d371
/solutions/NgnSip/app/src/main/java/ro/pub/cs/systems/eim/lab09/ngnsip/view/InstantMessagingActivity.java
df893c861a5cc6e6a4e9fde9346caf0a0f388730
[ "Apache-2.0" ]
permissive
mihnean9/EIM_Lab09
b1105d00c1bbb958acea53d2ac8c5abe1a539a69
fe0cbeb58381c905962d6f9b314f7913efa8b73d
refs/heads/master
2023-04-22T22:59:42.696565
2021-05-17T10:59:01
2021-05-17T10:59:01
368,135,792
1
0
null
null
null
null
UTF-8
Java
false
false
4,218
java
package ro.pub.cs.systems.eim.lab09.ngnsip.view; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.text.method.ScrollingMovementMethod; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import org.doubango.ngn.events.NgnMessagingEventArgs; import org.doubango.ngn.sip.NgnMessagingSession; import ro.pub.cs.systems.eim.lab09.ngnsip.R; import ro.pub.cs.systems.eim.lab09.ngnsip.broadcastreceiver.InstantMessagingBroadcastReceiver; import ro.pub.cs.systems.eim.lab09.ngnsip.general.Constants; public class InstantMessagingActivity extends AppCompatActivity { private IntentFilter instantMessagingIntentFilter; private InstantMessagingBroadcastReceiver instantMessagingBroadcastReceiver; private String SIPAddress = null; private EditText messageEditText = null; private Button sendButton = null; private TextView conversationTextView = null; private SendButtonClickListener sendButtonClickListener = new SendButtonClickListener(); private class SendButtonClickListener implements Button.OnClickListener { @Override public void onClick(View view) { if (VoiceCallActivity.getInstance().getNgnSipService() != null) { String remotePartyUri = SIPAddress; NgnMessagingSession instantMessagingSession = NgnMessagingSession.createOutgoingSession( VoiceCallActivity.getInstance().getNgnSipService().getSipStack(), remotePartyUri ); if (!instantMessagingSession.sendTextMessage(messageEditText.getText().toString())) { Log.e(Constants.TAG, "Failed to send message"); } else { String conversation = conversationTextView.getText().toString(); conversationTextView.setText(conversation + "Me: " + messageEditText.getText().toString() + "\n"); messageEditText.setText(""); Log.d(Constants.TAG, "Succeeded to send message"); } NgnMessagingSession.releaseSession(instantMessagingSession); } else { Toast.makeText(InstantMessagingActivity.this, "The SIP Service instance is null", Toast.LENGTH_SHORT).show(); } } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.i(Constants.TAG, "onCreate() callback method was invoked"); setContentView(R.layout.activity_instant_messaging); Intent intent = getIntent(); if (intent != null && intent.getExtras().containsKey(Constants.SIP_ADDRESS)) { SIPAddress = intent.getStringExtra(Constants.SIP_ADDRESS); } messageEditText = (EditText)findViewById(R.id.message_edit_text); sendButton = (Button)findViewById(R.id.send_button); sendButton.setOnClickListener(sendButtonClickListener); conversationTextView = (TextView)findViewById(R.id.conversation_text_view); conversationTextView.setMovementMethod(new ScrollingMovementMethod()); enableInstantMessagingBroadcastReceiver(); } @Override protected void onDestroy() { Log.i(Constants.TAG, "onDestroy() callback method was invoked"); super.onDestroy(); } public void enableInstantMessagingBroadcastReceiver() { instantMessagingBroadcastReceiver = new InstantMessagingBroadcastReceiver(conversationTextView); instantMessagingIntentFilter = new IntentFilter(); instantMessagingIntentFilter.addAction(NgnMessagingEventArgs.ACTION_MESSAGING_EVENT); registerReceiver(instantMessagingBroadcastReceiver, instantMessagingIntentFilter); } public void disableInstantMessagingBroadcastReceiver() { if (instantMessagingBroadcastReceiver != null) { unregisterReceiver(instantMessagingBroadcastReceiver); instantMessagingBroadcastReceiver = null; } } }
[ "andrei.rosucojocaru@gmail.com" ]
andrei.rosucojocaru@gmail.com
0ebc26c509654d03347b1a5f6cdf4237335baeaf
6d60a8adbfdc498a28f3e3fef70366581aa0c5fd
/codebase/selected/1106130.java
d477a33a745a5d079e7820b23f6dbeaa3cd3d2eb
[]
no_license
rayhan-ferdous/code2vec
14268adaf9022d140a47a88129634398cd23cf8f
c8ca68a7a1053d0d09087b14d4c79a189ac0cf00
refs/heads/master
2022-03-09T08:40:18.035781
2022-02-27T23:57:44
2022-02-27T23:57:44
140,347,552
0
1
null
null
null
null
UTF-8
Java
false
false
1,930
java
package monitor.io; import java.io.DataInputStream; import java.io.DataOutputStream; import java.net.ServerSocket; import java.net.Socket; public class Repeater implements Runnable { private int puerto; private IOManager receptor; private ServerSocket servidor; private Socket conexion; private DataInputStream dataIn; private DataOutputStream dataOut; private boolean seguirVivo; private int timeout; private boolean conexionActiva; private long frecuenciaChequeo; public Repeater(IOManager receptor, int puerto, int timeout, long frecuenciaChequeo) { this.puerto = puerto; this.receptor = receptor; this.timeout = timeout; seguirVivo = true; conexionActiva = false; this.frecuenciaChequeo = frecuenciaChequeo; } public void run() { receptor.log("Arrancando repetidor en puerto " + puerto); while (seguirVivo) { try { conexionActiva = false; servidor = new ServerSocket(puerto); servidor.setSoTimeout(timeout); conexion = servidor.accept(); conexionActiva = true; log("Conexion activa en el repetidor del puerto " + puerto); dataIn = new DataInputStream(conexion.getInputStream()); dataOut = new DataOutputStream(conexion.getOutputStream()); while (true) { while (dataIn.available() > 0) { dataOut.writeByte(dataIn.readByte()); dataOut.flush(); } Thread.sleep(frecuenciaChequeo); } } catch (Exception e) { e.printStackTrace(receptor.server.loggerError); conexionActiva = false; } } } private void log(String s) { receptor.log(s); } }
[ "aaponcseku@gmail.com" ]
aaponcseku@gmail.com
37c0b20e8ae998d2b22495dd6efae96ce1323170
1274a14cafff5c4394a70e9623c45c1dddb5ec26
/programming-practice/src/main/java/challenges/leetcode/IntersectionOfTwoArrays.java
2bee07eb1342699c4b7e865e659811735ff14b62
[]
no_license
Itsmayank10/algorithms-design-and-analysis
b9c2658145401f75d01844b03de6deeca9b9b193
03ef86de66f25fbf108e64e7b901535b4b844a8d
refs/heads/master
2023-01-02T09:54:18.321985
2019-09-21T05:02:55
2019-09-21T05:02:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,343
java
package challenges.leetcode; import challenges.AbstractCustomTestRunner; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import static com.google.common.truth.Truth.assertThat; /** * 349. Intersection of Two Arrays * * Given two arrays, write a function to compute their intersection. * * Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2] return [2]. * * @author Hxkandwal * */ public class IntersectionOfTwoArrays extends AbstractCustomTestRunner { private static IntersectionOfTwoArrays _instance = new IntersectionOfTwoArrays(); public int[] _intersection(int[] nums1, int[] nums2) { Arrays.sort (nums1); Arrays.sort (nums2); int count = 0; for (int idx1 = 0; idx1 < nums1.length; idx1 ++) if (idx1 == 0 || nums1 [idx1 - 1] != nums1 [idx1]) if (Arrays.binarySearch (nums2, nums1 [idx1]) >= 0) count ++; int [] ans = new int [count]; for (int idx1 = 0, idx = 0; idx1 < nums1.length; idx1 ++) if (idx1 == 0 || nums1 [idx1 - 1] != nums1 [idx1]) if (Arrays.binarySearch (nums2, nums1 [idx1]) >= 0) ans [idx ++] = nums1 [idx1]; return ans; } public int[] _intersectionOther(int[] nums1, int[] nums2) { Arrays.sort (nums1); Arrays.sort (nums2); List<Integer> ans = new ArrayList<>(); int idx1 = 0, idx2 = 0, idx = 0; while (idx1 < nums1.length && idx2 < nums2.length) { if (nums1 [idx1] == nums2 [idx2]) { if (ans.isEmpty() || ans.get (ans.size() - 1) != nums1 [idx1]) ans.add (nums1 [idx1]); idx1 ++; } else if (nums1 [idx1] > nums2 [idx2]) idx2 ++; else idx1 ++; } int[] ret = new int [ans.size()]; for (int val : ans) ret [idx ++] = val; return ret; } // driver method public static void main(String[] args) { _instance.runTest(new int[] {1, 2, 2, 1}, new int[] {2, 2}, new int[] {2}); _instance.runTest(new int[] {1, 2, 3, 1}, new int[] {2, 3}, new int[] {2, 3}); _instance.runTest(new int[] {}, new int[] {}, new int[] {}); } public void runTest(final int[] num1, final int[] num2, final int[] expectedOutput) { List<Object> answers = runAll(getClass(), new Object[] { num1, num2 }); for (Object answer : answers) assertThat((int[]) answer).isEqualTo(expectedOutput); System.out.println("ok!"); } }
[ "himanshuk.19@gmail.com" ]
himanshuk.19@gmail.com
e7fe1da0a013bc8d063d8c73741a5dbe8b878062
1d3b987d8ccc8373e688c5dbc02ff071db0be2b3
/src/main/java/com/yishenxiao/digitalwallet/beans/UserWithdrawCashInfo.java
ae2a8a2cd9a8d4d36cacb239d8c01d05b0e1a128
[]
no_license
3449708385/Both
876c59027abe9c19e50158a66f2e9cf448a7c978
48b29768e84acf43a2cdfb13268b336b4a759c85
refs/heads/master
2020-04-23T00:43:33.534525
2019-02-15T02:44:47
2019-02-15T02:45:06
170,789,716
0
1
null
null
null
null
UTF-8
Java
false
false
3,371
java
package com.yishenxiao.digitalwallet.beans; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; public class UserWithdrawCashInfo implements Serializable { private static final long serialVersionUID = 1L; private Long id; private Long userid; private Long digitalcurrencyinfoid; private Long realtransferaccountsid; private String withdrawaddr; private BigDecimal withdrawamount; private BigDecimal withdrawfee; private Short withdrawprogress; private Boolean handlestatus; private String remark; private Date createtime; private Date updatetime; private Boolean enabled; private Boolean deleted; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getUserid() { return userid; } public void setUserid(Long userid) { this.userid = userid; } public Long getDigitalcurrencyinfoid() { return digitalcurrencyinfoid; } public void setDigitalcurrencyinfoid(Long digitalcurrencyinfoid) { this.digitalcurrencyinfoid = digitalcurrencyinfoid; } public Long getRealtransferaccountsid() { return realtransferaccountsid; } public void setRealtransferaccountsid(Long realtransferaccountsid) { this.realtransferaccountsid = realtransferaccountsid; } public String getWithdrawaddr() { return withdrawaddr; } public void setWithdrawaddr(String withdrawaddr) { this.withdrawaddr = withdrawaddr == null ? null : withdrawaddr.trim(); } public BigDecimal getWithdrawamount() { return withdrawamount; } public void setWithdrawamount(BigDecimal withdrawamount) { this.withdrawamount = withdrawamount; } public BigDecimal getWithdrawfee() { return withdrawfee; } public void setWithdrawfee(BigDecimal withdrawfee) { this.withdrawfee = withdrawfee; } public Short getWithdrawprogress() { return withdrawprogress; } public void setWithdrawprogress(Short withdrawprogress) { this.withdrawprogress = withdrawprogress; } public Boolean getHandlestatus() { return handlestatus; } public void setHandlestatus(Boolean handlestatus) { this.handlestatus = handlestatus; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark == null ? null : remark.trim(); } public Date getCreatetime() { return createtime; } public void setCreatetime(Date createtime) { this.createtime = createtime; } public Date getUpdatetime() { return updatetime; } public void setUpdatetime(Date updatetime) { this.updatetime = updatetime; } public Boolean getEnabled() { return enabled; } public void setEnabled(Boolean enabled) { this.enabled = enabled; } public Boolean getDeleted() { return deleted; } public void setDeleted(Boolean deleted) { this.deleted = deleted; } @Override public String toString() { return "UserWithdrawCashInfo [id=" + id + ", userid=" + userid + ", digitalcurrencyinfoid=" + digitalcurrencyinfoid + ", realtransferaccountsid=" + realtransferaccountsid + ", withdrawaddr=" + withdrawaddr + ", withdrawamount=" + withdrawamount + ", withdrawfee=" + withdrawfee + ", withdrawprogress=" + withdrawprogress + ", handlestatus=" + handlestatus + ", remark=" + remark + ", createtime=" + createtime + ", updatetime=" + updatetime + ", enabled=" + enabled + ", deleted=" + deleted + "]"; } }
[ "991335931@qq.com" ]
991335931@qq.com
41fb6e2025b9350f168746b332aaec797db7ee75
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/java-design-patterns/learning/6066/UnitExtension.java
1ea5b1393e7909773cc1a2dda9c6c368aad2ff8c
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
/** * The MIT License * Copyright (c) 2014 Ilkka Seppälä * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package abstractextensions; /** * Other Extensions will extend this interface */ public interface UnitExtension { }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
1a1877e37ee749e7b54cdc4a65f89c4e24e7391c
5308297e063c59a065a025711ae62b0b7b015886
/SDK/src/com/skyworth/mobileui/voicecontrol/IVisualizer.java
996eecd6fbeb9881339b6f9aa748c7218088282b
[]
no_license
bibiRe/AppStore
77ddde3261cabe9294ffb74714c00febd0ec7268
06f5e05050ad01753fd9e6a9f6ec251474e3c6f1
refs/heads/master
2020-12-29T01:54:54.175750
2014-02-12T07:30:44
2014-02-12T07:30:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
281
java
package com.skyworth.mobileui.voicecontrol; import com.skyworth.mobileui.IFileUploader.IUploaderListener; public interface IVisualizer extends IUploaderListener { public void onInited(UIData data); public void onUninited(Controller nextController, UIData data); }
[ "haotie1990@gmail.com" ]
haotie1990@gmail.com
c0d58c9a4d20893dab100e604cf9fc39554c21c8
c0744fca880b4c88a3f84fd7dde6e580539d8b09
/JDBC/src/tuincentrum/CallableStatement.java
8c457bcb6f78f9d6562ff83f5b14c31056e99238
[]
no_license
YThibos/JavaEEProjects
c2907d18c45a11988d4c5c33db07e5197b41728d
96de0fb88b60ebed0dc6db9ad8a0242f3320f7a5
refs/heads/master
2016-08-12T09:33:04.297757
2016-02-17T11:25:09
2016-02-17T11:25:09
51,911,293
0
0
null
null
null
null
UTF-8
Java
false
false
1,407
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 tuincentrum; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.util.Scanner; /** * * @author Yannick.Thibos */ public class CallableStatement { private static final String URL = "jdbc:mysql://localhost/tuincentrum?noAccessToProcedureBodies=true&setSSL=false"; private static final String USER = "cursist"; private static final String PASSWORD = "cursist"; private static final String CALL = "{call PlantenMetEenWoord(?)}"; public static void main(String[] args) { try (Connection connection = DriverManager.getConnection(URL, USER, PASSWORD); java.sql.CallableStatement statement = connection.prepareCall(CALL); Scanner scanner = new Scanner(System.in)){ System.out.println("Zoekterm: "); String woord = scanner.nextLine(); statement.setString(1, '%' + woord + '%'); ResultSet results = statement.executeQuery(); while (results.next()) { System.out.println(results.getString("naam")); } } catch (Exception e) { } } }
[ "yannick.thibos@gmail.com" ]
yannick.thibos@gmail.com
66935feadbf31c46cf4b02e6a58b7d0dc52a0f4a
b46ed4b614d0b5abce6f581f973bd0d79d5d6b6b
/app/src/main/java/com/lingkai/mymusic/activity/GuideActivity.java
ce19865079011bff371414e56b26b6b6529c9bc2
[]
no_license
LingkaiZhang/MyMusicDemo
e2430c85f08e5e9335527d2880e8c8b709686cca
8c2651d4572725e07e1a664dd7a056c1569389a2
refs/heads/master
2020-06-06T07:29:25.667483
2019-07-10T06:01:52
2019-07-10T06:01:52
192,677,926
1
0
null
null
null
null
UTF-8
Java
false
false
2,122
java
package com.lingkai.mymusic.activity; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.WindowManager; import com.lingkai.mymusic.MainActivity; import com.lingkai.mymusic.R; import com.lingkai.mymusic.adapter.GuideAdapter; import com.lingkai.mymusic.util.PackageUtil; import java.util.ArrayList; import butterknife.BindView; import butterknife.OnClick; import me.relex.circleindicator.CircleIndicator; public class GuideActivity extends BaseCommonActivity { @BindView(R.id.vp) ViewPager vp; @BindView(R.id.indicator) CircleIndicator indicator; private GuideAdapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_guide); //去除状态栏 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } @Override protected void initDatas() { super.initDatas(); adapter = new GuideAdapter(getActivity(), getSupportFragmentManager()); vp.setAdapter(adapter); indicator.setViewPager(vp); adapter.registerDataSetObserver(indicator.getDataSetObserver()); ArrayList<Integer> datas = new ArrayList<>(); datas.add(R.drawable.guide1); datas.add(R.drawable.guide2); datas.add(R.drawable.guide3); adapter.setDatas(datas); } @OnClick(R.id.bt_login_or_register) public void bt_login_or_register() { setFirst(); startActivityAfterFinishThis(LoginActivity.class); } @OnClick(R.id.bt_enter) public void bt_enter() { setFirst(); startActivityAfterFinishThis(MainActivity.class); } private void setFirst() { sp.putBoolean(String.valueOf(PackageUtil.getVersionCode(getApplicationContext())),false); } /** * 不调用父类方法,用户按返回键就不能关闭当前页面了 */ @Override public void onBackPressed() { } }
[ "lingkai2313@163.com" ]
lingkai2313@163.com
a2e9d9310acbcb13c5acb953a63f2bd15867e850
d322635e6a55856d046280ebdbf9b3771efc12ee
/src/main/java/myannocation/AnnocationTest.java
935f0c54d5a4230b9e4d0d5d867ea7c79bff4bda
[]
no_license
gaohe1227/javademo
2b1d37c986416633bfa1a684524b0874a960408b
756b62db3a8aaf6ace6ea47a8b048f9d0717f202
refs/heads/master
2020-05-21T14:58:56.206409
2017-01-12T08:29:53
2017-01-12T08:29:53
61,277,652
0
0
null
null
null
null
UTF-8
Java
false
false
2,078
java
package myannocation; import java.lang.reflect.Field; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.apache.log4j.Logger; import org.junit.Test; public class AnnocationTest { Logger log = Logger.getLogger(AnnocationTest.class); String url; String username; String password; String driverName="com.mysql.jdbc.Driver"; { try { Class.forName(driverName); url = "jdbc:mysql://localhost/myplan"; username = "root";// 杩欓噷鏇挎崲鎴愪綘鑷凡鐨勬暟鎹簱鐢ㄦ埛鍚� password = "root";// 杩欓噷鏇挎崲鎴愪綘鑷凡鐨勬暟鎹簱鐢ㄦ埛瀵嗙爜 } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } /** * 娉ㄨВ澶勭悊鍣ㄥ簲鐢� */ @Test public void testTable() { TableAnnocation table = Table.class.getAnnotation(TableAnnocation.class); String sql = "select * from " + table.name() + " where 1=1"; String tableName = table.name(); log.info(tableName); Field[] fields = Table.class.getDeclaredFields(); Table table2 = new Table(); if (null != fields && fields.length > 0) { for (Field field : fields) { if(field.isAnnotationPresent(FieldAnnocation.class)){ log.info(field.getName() + "-----------" + field.getType().getName()); }else{ System.err.println("娌℃湁娉ㄨВ"); } } } log.info("杩涘叆鏁版嵁搴撴搷浣�-------------------------"); Connection connection; try { connection = DriverManager.getConnection(url, username, password); System.out.println("杩炴帴鎴愬姛"); Statement statement= connection.createStatement(); System.out.println( "鍒涘缓Statement鎴愬姛!" ); ResultSet rs= statement.executeQuery(sql); while(rs.next()){ Object obj=rs.getString("name"); System.out.println(obj); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "904724283@qq.com" ]
904724283@qq.com
c6c6b9ae855afe52271697ecd1fc62689c879136
7b969dea4cad153c8c1296434dec2c8f3daea517
/fixflow-core/src/com/founder/fix/fixflow/core/impl/threadpool/FixThreadPoolExecutor.java
e2751ebbc740eda9fb7c79ccfef3be17416c6988
[]
no_license
eseawind/fixflow
7bf848f2108f945c3cbe5dca559934df3451a5d1
61bbebec4b3238401271d143394160d8cdfa83e3
refs/heads/master
2021-01-18T11:17:07.727356
2013-08-01T03:05:22
2013-08-01T03:05:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,374
java
package com.founder.fix.fixflow.core.impl.threadpool; import java.util.Date; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; import com.founder.fix.fixflow.core.impl.log.LogFactory; public class FixThreadPoolExecutor extends ThreadPoolExecutor { private String threadPoolKey; private String threadPoolName; private static com.founder.fix.fixflow.core.impl.log.DebugLog debugLog = LogFactory.getDebugLog(FixThreadPoolExecutor.class); private boolean isPaused; private ReentrantLock pauseLock = new ReentrantLock(); private Condition unpaused = pauseLock.newCondition(); public FixThreadPoolExecutor(String threadPoolKey,String threadPoolName,int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) { super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue); this.threadPoolKey=threadPoolKey; this.threadPoolName=threadPoolName; } @Override protected void beforeExecute(Thread t, Runnable r) { super.beforeExecute(t, r); pauseLock.lock(); try { while (isPaused) unpaused.await(); } catch (InterruptedException ie) { t.interrupt(); } finally { pauseLock.unlock(); } debugLog.debug("线程 ["+threadPoolName +"] 开始执行."); debugLog.debug("开始时间 ["+new Date()+"]"); } @Override protected void afterExecute(Runnable r, Throwable t) { super.afterExecute(r, t); debugLog.debug("线程 ["+threadPoolName +"] 执行结束."); debugLog.debug("结束时间 ["+new Date()+"]"); } /** * 暂停线程池 */ public void pause() { pauseLock.lock(); debugLog.debug("线程 ["+threadPoolName +"] 暂停."); debugLog.debug("暂停时间 ["+new Date()+"]"); try { isPaused = true; } finally { pauseLock.unlock(); } } /** * 恢复线程池 */ public void resume() { pauseLock.lock(); debugLog.debug("线程 ["+threadPoolName +"] 恢复."); debugLog.debug("恢复时间 ["+new Date()+"]"); try { isPaused = false; unpaused.signalAll(); } finally { pauseLock.unlock(); } } public String getThreadPoolKey() { return threadPoolKey; } public String getThreadPoolName() { return threadPoolName; } }
[ "kenshin.net@gmail.com" ]
kenshin.net@gmail.com
68119035850139fadb883766c75e6f8f0e8877b8
cec1602d23034a8f6372c019e5770773f893a5f0
/sources/io/reactivex/internal/subscribers/SinglePostCompleteSubscriber.java
080d3ec52620b6402d2b2c1cab3023444ad3615b
[]
no_license
sengeiou/zeroner_app
77fc7daa04c652a5cacaa0cb161edd338bfe2b52
e95ae1d7cfbab5ca1606ec9913416dadf7d29250
refs/heads/master
2022-03-31T06:55:26.896963
2020-01-24T09:20:37
2020-01-24T09:20:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,620
java
package io.reactivex.internal.subscribers; import io.reactivex.FlowableSubscriber; import io.reactivex.internal.subscriptions.SubscriptionHelper; import io.reactivex.internal.util.BackpressureHelper; import java.util.concurrent.atomic.AtomicLong; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; public abstract class SinglePostCompleteSubscriber<T, R> extends AtomicLong implements FlowableSubscriber<T>, Subscription { static final long COMPLETE_MASK = Long.MIN_VALUE; static final long REQUEST_MASK = Long.MAX_VALUE; private static final long serialVersionUID = 7917814472626990048L; protected final Subscriber<? super R> actual; protected long produced; protected Subscription s; protected R value; public SinglePostCompleteSubscriber(Subscriber<? super R> actual2) { this.actual = actual2; } public void onSubscribe(Subscription s2) { if (SubscriptionHelper.validate(this.s, s2)) { this.s = s2; this.actual.onSubscribe(this); } } /* access modifiers changed from: protected */ public final void complete(R n) { long p = this.produced; if (p != 0) { BackpressureHelper.produced(this, p); } while (true) { long r = get(); if ((r & Long.MIN_VALUE) != 0) { onDrop(n); return; } else if ((Long.MAX_VALUE & r) != 0) { lazySet(-9223372036854775807L); this.actual.onNext(n); this.actual.onComplete(); return; } else { this.value = n; if (!compareAndSet(0, Long.MIN_VALUE)) { this.value = null; } else { return; } } } } /* access modifiers changed from: protected */ public void onDrop(R r) { } public final void request(long n) { long r; if (SubscriptionHelper.validate(n)) { do { r = get(); if ((r & Long.MIN_VALUE) != 0) { if (compareAndSet(Long.MIN_VALUE, -9223372036854775807L)) { this.actual.onNext(this.value); this.actual.onComplete(); return; } return; } } while (!compareAndSet(r, BackpressureHelper.addCap(r, n))); this.s.request(n); } } public void cancel() { this.s.cancel(); } }
[ "johan@sellstrom.me" ]
johan@sellstrom.me
3032040e4caf92003ff276696d887ecc1c6bfbca
a3bce33e0c73f714017d656982eecd5dde635245
/ASMSample01/jars/asm-4.0/src/org/objectweb/asm/tree/LocalVariableNode.java
24aa701af6e351b9a41265940bd8f4d51b83dcc8
[ "BSD-3-Clause" ]
permissive
miho/asm-playground
08079e345fa8aaacc72ad6b66936cc499c8937df
6c73c1b915eef1dfcb56ce03703f7ca7fbe701e6
refs/heads/master
2021-01-01T17:37:27.376002
2012-05-09T21:07:45
2012-05-09T21:07:45
4,276,476
9
2
null
null
null
null
UTF-8
Java
false
false
3,811
java
/*** * ASM: a very small and fast Java bytecode manipulation framework * Copyright (c) 2000-2011 INRIA, France Telecom * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ package org.objectweb.asm.tree; import org.objectweb.asm.MethodVisitor; /** * A node that represents a local variable declaration. * * @author Eric Bruneton */ public class LocalVariableNode { /** * The name of a local variable. */ public String name; /** * The type descriptor of this local variable. */ public String desc; /** * The signature of this local variable. May be <tt>null</tt>. */ public String signature; /** * The first instruction corresponding to the scope of this local variable * (inclusive). */ public LabelNode start; /** * The last instruction corresponding to the scope of this local variable * (exclusive). */ public LabelNode end; /** * The local variable's index. */ public int index; /** * Constructs a new {@link LocalVariableNode}. * * @param name the name of a local variable. * @param desc the type descriptor of this local variable. * @param signature the signature of this local variable. May be * <tt>null</tt>. * @param start the first instruction corresponding to the scope of this * local variable (inclusive). * @param end the last instruction corresponding to the scope of this local * variable (exclusive). * @param index the local variable's index. */ public LocalVariableNode( final String name, final String desc, final String signature, final LabelNode start, final LabelNode end, final int index) { this.name = name; this.desc = desc; this.signature = signature; this.start = start; this.end = end; this.index = index; } /** * Makes the given visitor visit this local variable declaration. * * @param mv a method visitor. */ public void accept(final MethodVisitor mv) { mv.visitLocalVariable(name, desc, signature, start.getLabel(), end.getLabel(), index); } }
[ "info@michaelhoffer.de" ]
info@michaelhoffer.de
526d4a0010497a4a46e103d34c0066f7d39ec83f
cd73733881f28e2cd5f1741fbe2d32dafc00f147
/app/src/main/java/com/hjhq/teamface/oa/approve/bean/PassTypeResponseBean.java
b83d70bcb186323c66079943addf16413243e846
[]
no_license
XiaoJon/20180914
45cfac9f7068ad85dee26e570acd2900796cbcb1
6c0759d8abd898f1f5dba77eee45cbc3d218b2e0
refs/heads/master
2020-03-28T16:48:36.275700
2018-09-14T04:10:27
2018-09-14T04:10:27
148,730,363
0
1
null
null
null
null
UTF-8
Java
false
false
7,359
java
package com.hjhq.teamface.oa.approve.bean; import com.hjhq.teamface.basis.bean.BaseBean; import java.util.List; /** * Created by Administrator on 2018/1/18. */ public class PassTypeResponseBean extends BaseBean { /** * data : {"approvalFlag":1,"employeeList":[{"id":1,"employee_name":"曹建华","picture":"","leader":"0","phone":"18975520503","mobile_phone":"","email":"","status":"0","account":"","is_enable":"1","post_id":1,"role_id":1,"del_status":"0","microblog_background":"","sex":"0","sign":"","personnel_create_by":"","datetime_create_time":"","post_name":"产品总监"}]} */ private DataBean data; public DataBean getData() { return data; } public void setData(DataBean data) { this.data = data; } public static class DataBean { /** * "processType":1,//0固定流程 1自由流程 * approvalFlag : 1 * employeeList : [{"id":1,"employee_name":"曹建华","picture":"","leader":"0","phone":"18975520503","mobile_phone":"","email":"","status":"0","account":"","is_enable":"1","post_id":1,"role_id":1,"del_status":"0","microblog_background":"","sex":"0","sign":"","personnel_create_by":"","datetime_create_time":"","post_name":"产品总监"}] */ private String processType; private String approvalFlag; private List<EmployeeListBean> employeeList; public String getApprovalFlag() { return approvalFlag; } public void setApprovalFlag(String approvalFlag) { this.approvalFlag = approvalFlag; } public List<EmployeeListBean> getEmployeeList() { return employeeList; } public void setEmployeeList(List<EmployeeListBean> employeeList) { this.employeeList = employeeList; } public String getProcessType() { return processType; } public void setProcessType(String processType) { this.processType = processType; } public static class EmployeeListBean { /** * id : 1 * employee_name : 曹建华 * picture : * leader : 0 * phone : 18975520503 * mobile_phone : * email : * status : 0 * account : * is_enable : 1 * post_id : 1 * role_id : 1 * del_status : 0 * microblog_background : * sex : 0 * sign : * personnel_create_by : * datetime_create_time : * post_name : 产品总监 */ private String id; private String employee_name; private String picture; private String leader; private String phone; private String mobile_phone; private String email; private String status; private String account; private String is_enable; private String post_id; private String role_id; private String del_status; private String microblog_background; private String sex; private String sign; private String personnel_create_by; private String datetime_create_time; private String post_name; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getEmployee_name() { return employee_name; } public void setEmployee_name(String employee_name) { this.employee_name = employee_name; } public String getPicture() { return picture; } public void setPicture(String picture) { this.picture = picture; } public String getLeader() { return leader; } public void setLeader(String leader) { this.leader = leader; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getMobile_phone() { return mobile_phone; } public void setMobile_phone(String mobile_phone) { this.mobile_phone = mobile_phone; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public String getIs_enable() { return is_enable; } public void setIs_enable(String is_enable) { this.is_enable = is_enable; } public String getPost_id() { return post_id; } public void setPost_id(String post_id) { this.post_id = post_id; } public String getRole_id() { return role_id; } public void setRole_id(String role_id) { this.role_id = role_id; } public String getDel_status() { return del_status; } public void setDel_status(String del_status) { this.del_status = del_status; } public String getMicroblog_background() { return microblog_background; } public void setMicroblog_background(String microblog_background) { this.microblog_background = microblog_background; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public String getSign() { return sign; } public void setSign(String sign) { this.sign = sign; } public String getPersonnel_create_by() { return personnel_create_by; } public void setPersonnel_create_by(String personnel_create_by) { this.personnel_create_by = personnel_create_by; } public String getDatetime_create_time() { return datetime_create_time; } public void setDatetime_create_time(String datetime_create_time) { this.datetime_create_time = datetime_create_time; } public String getPost_name() { return post_name; } public void setPost_name(String post_name) { this.post_name = post_name; } } } }
[ "xiaojun6909@gmail.com" ]
xiaojun6909@gmail.com
ca11076ed7583a8c9507befbbe327562f7d26f94
288151cf821acf7fe9430c2b6aeb19e074a791d4
/mfoyou-agent-server/mfoyou-agent-taobao/src/main/java/com/alipay/api/response/AlipayMpointprodBenefitDetailGetResponse.java
2f3a0c65d29221c74f3a22126566b52b15696b22
[]
no_license
jiningeast/distribution
60022e45d3a401252a9c970de14a599a548a1a99
c35bfc5923eaecf2256ce142955ecedcb3c64ae5
refs/heads/master
2020-06-24T11:27:51.899760
2019-06-06T12:52:59
2019-06-06T12:52:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,191
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.BenefitInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.mpointprod.benefit.detail.get response. * * @author auto create * @since 1.0, 2015-01-29 15:46:36 */ public class AlipayMpointprodBenefitDetailGetResponse extends AlipayResponse { private static final long serialVersionUID = 2429364185126361584L; /** * 权益详情列表 */ @ApiListField("benefit_infos") @ApiField("benefit_info") private List<BenefitInfo> benefitInfos; /** * 响应码 */ @ApiField("code") private String code; /** * 响应描述 */ @ApiField("msg") private String msg; public void setBenefitInfos(List<BenefitInfo> benefitInfos) { this.benefitInfos = benefitInfos; } public List<BenefitInfo> getBenefitInfos( ) { return this.benefitInfos; } public void setCode(String code) { this.code = code; } public String getCode( ) { return this.code; } public void setMsg(String msg) { this.msg = msg; } public String getMsg( ) { return this.msg; } }
[ "15732677882@163.com" ]
15732677882@163.com
3322bde3804593b92f9383e940158da01b6cfae9
8b52705e2d4a7fb9a5ad955430cf4c92816f9097
/src/main/java/com/infinities/skyport/model/PoolConfig.java
140894c948e1227dfd41fd45dc1bd628cd16171c
[ "Apache-2.0" ]
permissive
infinitiessoft/skyport-api
6b5150f2e36962acef858bbacba5362db42d2093
7f6f4f288951e973b1f1c93ae7a8f0bed300c5f0
refs/heads/master
2021-01-10T09:47:43.045552
2016-03-28T03:20:11
2016-03-28T03:20:11
48,160,848
0
0
null
null
null
null
UTF-8
Java
false
false
4,438
java
/******************************************************************************* * Copyright 2015 InfinitiesSoft Solutions Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. *******************************************************************************/ package com.infinities.skyport.model; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import com.infinities.skyport.exception.SkyportException; @XmlAccessorType(XmlAccessType.FIELD) public class PoolConfig implements Serializable, Cloneable { /** * */ private static final long serialVersionUID = 1L; public static final int DEFAULT_SHORT_MIN = 15; public static final int DEFAULT_SHORT_MAX = 15; public static final int DEFAULT_SHORT_QUEUE = 70; public static final int DEFAULT_MEDIUM_MIN = 10; public static final int DEFAULT_MEDIUM_MAX = 10; public static final int DEFAULT_MEDIUM_QUEUE = 50; public static final int DEFAULT_LONG_MIN = 5; public static final int DEFAULT_LONG_MAX = 5; public static final int DEFAULT_LONG_QUEUE = 20; public static final int DEFAULT_IDLE = 120; private int coreSize; private int maxSize; private int keepAlive; private int queueCapacity; public PoolConfig() { } public PoolConfig(int coreSize, int maxSize, int keepAlive, int queueCapacity) { this.coreSize = coreSize; this.maxSize = maxSize; this.keepAlive = keepAlive; this.queueCapacity = queueCapacity; } public PoolConfig(int coreSize, int maxSize, int queueCapacity) { this(coreSize, maxSize, DEFAULT_IDLE, queueCapacity); } public PoolConfig(PoolSize poolSize) { switch (poolSize) { case SHORT: this.coreSize = DEFAULT_SHORT_MIN; this.maxSize = DEFAULT_SHORT_MAX; this.queueCapacity = DEFAULT_SHORT_QUEUE; break; case MEDIUM: this.coreSize = DEFAULT_MEDIUM_MIN; this.maxSize = DEFAULT_MEDIUM_MAX; this.queueCapacity = DEFAULT_MEDIUM_QUEUE; break; case LONG: this.coreSize = DEFAULT_LONG_MIN; this.maxSize = DEFAULT_LONG_MAX; this.queueCapacity = DEFAULT_LONG_QUEUE; break; default: throw new SkyportException("No thread pool with size: " + poolSize); } this.keepAlive = DEFAULT_IDLE; } public int getCoreSize() { return coreSize; } public void setCoreSize(int coreSize) { this.coreSize = coreSize; } public int getMaxSize() { return maxSize; } public void setMaxSize(int maxSize) { this.maxSize = maxSize; } public int getKeepAlive() { return keepAlive; } public void setKeepAlive(int keepAlive) { this.keepAlive = keepAlive; } public int getQueueCapacity() { return queueCapacity; } public void setQueueCapacity(int queueCapacity) { this.queueCapacity = queueCapacity; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + coreSize; result = prime * result + keepAlive; result = prime * result + maxSize; result = prime * result + queueCapacity; return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (obj == null) { return false; } else if (getClass() != obj.getClass()) { return false; } PoolConfig other = (PoolConfig) obj; if (coreSize != other.coreSize) { return false; } else if (keepAlive != other.keepAlive) { return false; } else if (maxSize != other.maxSize) { return false; } else if (queueCapacity != other.queueCapacity) { return false; } return true; } @Override public String toString() { return "PoolConfig [coreSize=" + coreSize + ", maxSize=" + maxSize + ", keepAlive=" + keepAlive + ", queueCapacity=" + queueCapacity + "]"; } @Override public PoolConfig clone() { PoolConfig clone = new PoolConfig(); clone.coreSize = coreSize; clone.maxSize = maxSize; clone.keepAlive = keepAlive; clone.queueCapacity = queueCapacity; return clone; } }
[ "pohsun@infinitiesoft.com" ]
pohsun@infinitiesoft.com
020d77854e61fe652c32ecbf9229a56bc9f92aea
e7982898cf2460350e9834d2e8d89a6351e1c1a4
/Test/cn/test/Cat.java
4ad4013607dc2374a2f102b9fda680776e8ad260
[]
no_license
ili-z/Exercise1
484a5884b46d5954bcff50b0c3c011773f1acd79
e189cbef9d9c1b281ed901a32f14fe990ec4fbeb
refs/heads/master
2023-04-18T07:54:54.263754
2021-04-28T07:52:22
2021-04-28T07:52:22
362,022,537
0
0
null
null
null
null
UTF-8
Java
false
false
243
java
package cn.test; public class Cat { private String name; public Cat (String name) { this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "goodMorning_pro@at.bdqn.com" ]
goodMorning_pro@at.bdqn.com
5294d618c1f28a0af18693f85fa7c20e79c9822d
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/BrandroidTools_OpenExplorer/src/com/box/androidlib/AddCommentListener.java
024575b546854d22fbf5e4eaa947f20943160578
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
380
java
// isComment package com.box.androidlib; /** * isComment */ public interface isClassOrIsInterface extends ResponseListener { /** * isComment */ String isVariable = "isStringConstant"; /** * isComment */ String isVariable = "isStringConstant"; /** * isComment */ void isMethod(Comment isParameter, String isParameter); }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
9314bf1e810646dffedffcc7c7f048f94439f36f
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/hd/srch/dm/HD_SRCH_5101_LDM.java
4a34591387ec4776c64984cb7fff2045bb1a5f45
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
5,350
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.hd.srch.dm; import java.sql.*; import oracle.jdbc.driver.*; import somo.framework.db.*; import somo.framework.util.*; import chosun.ciis.hd.srch.ds.*; import chosun.ciis.hd.srch.rec.*; /** * */ public class HD_SRCH_5101_LDM extends somo.framework.db.BaseDM implements java.io.Serializable{ public String cmpy_cd; public String basi_dt; public String clsf1; public String clsf2; public HD_SRCH_5101_LDM(){} public HD_SRCH_5101_LDM(String cmpy_cd, String basi_dt, String clsf1, String clsf2){ this.cmpy_cd = cmpy_cd; this.basi_dt = basi_dt; this.clsf1 = clsf1; this.clsf2 = clsf2; } public void setCmpy_cd(String cmpy_cd){ this.cmpy_cd = cmpy_cd; } public void setBasi_dt(String basi_dt){ this.basi_dt = basi_dt; } public void setClsf1(String clsf1){ this.clsf1 = clsf1; } public void setClsf2(String clsf2){ this.clsf2 = clsf2; } public String getCmpy_cd(){ return this.cmpy_cd; } public String getBasi_dt(){ return this.basi_dt; } public String getClsf1(){ return this.clsf1; } public String getClsf2(){ return this.clsf2; } public String getSQL(){ return "{ call MISHDL.SP_HD_SRCH_5101_L(? ,? ,? ,? ,? ,? ,?) }"; } public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{ HD_SRCH_5101_LDM dm = (HD_SRCH_5101_LDM)bdm; cstmt.registerOutParameter(1, Types.VARCHAR); cstmt.registerOutParameter(2, Types.VARCHAR); cstmt.setString(3, dm.cmpy_cd); cstmt.setString(4, dm.basi_dt); cstmt.setString(5, dm.clsf1); cstmt.setString(6, dm.clsf2); cstmt.registerOutParameter(7, Types.VARCHAR); } public BaseDataSet createDataSetObject(){ return new chosun.ciis.hd.srch.ds.HD_SRCH_5101_LDataSet(); } public void print(){ System.out.println("SQL = " + this.getSQL()); System.out.println("cmpy_cd = [" + getCmpy_cd() + "]"); System.out.println("basi_dt = [" + getBasi_dt() + "]"); System.out.println("clsf1 = [" + getClsf1() + "]"); System.out.println("clsf2 = [" + getClsf2() + "]"); } } /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오. String cmpy_cd = req.getParameter("cmpy_cd"); if( cmpy_cd == null){ System.out.println(this.toString+" : cmpy_cd is null" ); }else{ System.out.println(this.toString+" : cmpy_cd is "+cmpy_cd ); } String basi_dt = req.getParameter("basi_dt"); if( basi_dt == null){ System.out.println(this.toString+" : basi_dt is null" ); }else{ System.out.println(this.toString+" : basi_dt is "+basi_dt ); } String clsf1 = req.getParameter("clsf1"); if( clsf1 == null){ System.out.println(this.toString+" : clsf1 is null" ); }else{ System.out.println(this.toString+" : clsf1 is "+clsf1 ); } String clsf2 = req.getParameter("clsf2"); if( clsf2 == null){ System.out.println(this.toString+" : clsf2 is null" ); }else{ System.out.println(this.toString+" : clsf2 is "+clsf2 ); } ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.checkString(req.getParameter("cmpy_cd")); String basi_dt = Util.checkString(req.getParameter("basi_dt")); String clsf1 = Util.checkString(req.getParameter("clsf1")); String clsf2 = Util.checkString(req.getParameter("clsf2")); ----------------------------------------------------------------------------------------------------*//*---------------------------------------------------------------------------------------------------- Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("cmpy_cd"))); String basi_dt = Util.Uni2Ksc(Util.checkString(req.getParameter("basi_dt"))); String clsf1 = Util.Uni2Ksc(Util.checkString(req.getParameter("clsf1"))); String clsf2 = Util.Uni2Ksc(Util.checkString(req.getParameter("clsf2"))); ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 DM 파일의 변수를 설정시 사용하십시오. dm.setCmpy_cd(cmpy_cd); dm.setBasi_dt(basi_dt); dm.setClsf1(clsf1); dm.setClsf2(clsf2); ----------------------------------------------------------------------------------------------------*/ /* 작성시간 : Mon Jun 04 18:38:10 KST 2018 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
5ca230bafee3e50d012c36d34570d01c3441d6df
1dd82f072faa645188991554f41316ef0cd27a9a
/xtce-emf/src/org/omg/space/xtce/SyncPatternType1.java
704235dc0968a4f742f84b51985285a8d19e124b
[]
no_license
markjohndoyle/hummingbird-gui
ae51a8a9efbf8a30b251c165ae1d186c09ed2871
72f674edb5f756ee2b8edc6e44c83b3d56953ac9
refs/heads/master
2021-01-23T12:10:19.534048
2012-05-31T14:41:40
2012-05-31T14:41:40
602,452
3
1
null
null
null
null
UTF-8
Java
false
false
7,405
java
/** * <copyright> * </copyright> * * $Id$ */ package org.omg.space.xtce; import java.math.BigInteger; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Sync Pattern Type1</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link org.omg.space.xtce.SyncPatternType1#getBitLocationFromStartOfContainer <em>Bit Location From Start Of Container</em>}</li> * <li>{@link org.omg.space.xtce.SyncPatternType1#getMask <em>Mask</em>}</li> * <li>{@link org.omg.space.xtce.SyncPatternType1#getMaskLengthInBits <em>Mask Length In Bits</em>}</li> * <li>{@link org.omg.space.xtce.SyncPatternType1#getPattern <em>Pattern</em>}</li> * <li>{@link org.omg.space.xtce.SyncPatternType1#getPatternLengthInBits <em>Pattern Length In Bits</em>}</li> * </ul> * </p> * * @see org.omg.space.xtce.XtcePackage#getSyncPatternType1() * @model extendedMetaData="name='SyncPattern_._1_._type' kind='empty'" * @generated */ public interface SyncPatternType1 extends EObject { /** * Returns the value of the '<em><b>Bit Location From Start Of Container</b></em>' attribute. * The default value is <code>"0"</code>. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Bit Location From Start Of Container</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Bit Location From Start Of Container</em>' attribute. * @see #isSetBitLocationFromStartOfContainer() * @see #unsetBitLocationFromStartOfContainer() * @see #setBitLocationFromStartOfContainer(BigInteger) * @see org.omg.space.xtce.XtcePackage#getSyncPatternType1_BitLocationFromStartOfContainer() * @model default="0" unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.Integer" * extendedMetaData="kind='attribute' name='bitLocationFromStartOfContainer'" * @generated */ BigInteger getBitLocationFromStartOfContainer(); /** * Sets the value of the '{@link org.omg.space.xtce.SyncPatternType1#getBitLocationFromStartOfContainer <em>Bit Location From Start Of Container</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Bit Location From Start Of Container</em>' attribute. * @see #isSetBitLocationFromStartOfContainer() * @see #unsetBitLocationFromStartOfContainer() * @see #getBitLocationFromStartOfContainer() * @generated */ void setBitLocationFromStartOfContainer(BigInteger value); /** * Unsets the value of the '{@link org.omg.space.xtce.SyncPatternType1#getBitLocationFromStartOfContainer <em>Bit Location From Start Of Container</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isSetBitLocationFromStartOfContainer() * @see #getBitLocationFromStartOfContainer() * @see #setBitLocationFromStartOfContainer(BigInteger) * @generated */ void unsetBitLocationFromStartOfContainer(); /** * Returns whether the value of the '{@link org.omg.space.xtce.SyncPatternType1#getBitLocationFromStartOfContainer <em>Bit Location From Start Of Container</em>}' attribute is set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return whether the value of the '<em>Bit Location From Start Of Container</em>' attribute is set. * @see #unsetBitLocationFromStartOfContainer() * @see #getBitLocationFromStartOfContainer() * @see #setBitLocationFromStartOfContainer(BigInteger) * @generated */ boolean isSetBitLocationFromStartOfContainer(); /** * Returns the value of the '<em><b>Mask</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Mask</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Mask</em>' attribute. * @see #setMask(byte[]) * @see org.omg.space.xtce.XtcePackage#getSyncPatternType1_Mask() * @model dataType="org.eclipse.emf.ecore.xml.type.HexBinary" * extendedMetaData="kind='attribute' name='mask'" * @generated */ byte[] getMask(); /** * Sets the value of the '{@link org.omg.space.xtce.SyncPatternType1#getMask <em>Mask</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Mask</em>' attribute. * @see #getMask() * @generated */ void setMask(byte[] value); /** * Returns the value of the '<em><b>Mask Length In Bits</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * truncate the mask from the left * <!-- end-model-doc --> * @return the value of the '<em>Mask Length In Bits</em>' attribute. * @see #setMaskLengthInBits(BigInteger) * @see org.omg.space.xtce.XtcePackage#getSyncPatternType1_MaskLengthInBits() * @model dataType="org.eclipse.emf.ecore.xml.type.PositiveInteger" * extendedMetaData="kind='attribute' name='maskLengthInBits'" * @generated */ BigInteger getMaskLengthInBits(); /** * Sets the value of the '{@link org.omg.space.xtce.SyncPatternType1#getMaskLengthInBits <em>Mask Length In Bits</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Mask Length In Bits</em>' attribute. * @see #getMaskLengthInBits() * @generated */ void setMaskLengthInBits(BigInteger value); /** * Returns the value of the '<em><b>Pattern</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * CCSDS ASM for non-turbocoded frames = 1acffc1d * <!-- end-model-doc --> * @return the value of the '<em>Pattern</em>' attribute. * @see #setPattern(byte[]) * @see org.omg.space.xtce.XtcePackage#getSyncPatternType1_Pattern() * @model dataType="org.eclipse.emf.ecore.xml.type.HexBinary" required="true" * extendedMetaData="kind='attribute' name='pattern'" * @generated */ byte[] getPattern(); /** * Sets the value of the '{@link org.omg.space.xtce.SyncPatternType1#getPattern <em>Pattern</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Pattern</em>' attribute. * @see #getPattern() * @generated */ void setPattern(byte[] value); /** * Returns the value of the '<em><b>Pattern Length In Bits</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * truncate the pattern from the left * <!-- end-model-doc --> * @return the value of the '<em>Pattern Length In Bits</em>' attribute. * @see #setPatternLengthInBits(BigInteger) * @see org.omg.space.xtce.XtcePackage#getSyncPatternType1_PatternLengthInBits() * @model dataType="org.eclipse.emf.ecore.xml.type.PositiveInteger" required="true" * extendedMetaData="kind='attribute' name='patternLengthInBits'" * @generated */ BigInteger getPatternLengthInBits(); /** * Sets the value of the '{@link org.omg.space.xtce.SyncPatternType1#getPatternLengthInBits <em>Pattern Length In Bits</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Pattern Length In Bits</em>' attribute. * @see #getPatternLengthInBits() * @generated */ void setPatternLengthInBits(BigInteger value); } // SyncPatternType1
[ "markjohndoyle@googlemail.com" ]
markjohndoyle@googlemail.com
7454bca62ed65d00eaecc449781591cb281ae379
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/com/google/android/gms/phenotype/C10673h.java
4eca159608bd03267c75c0a653b4edbe284e4ad0
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
471
java
package com.google.android.gms.phenotype; import java.util.Comparator; /* renamed from: com.google.android.gms.phenotype.h */ final class C10673h implements Comparator<zzi> { C10673h() { } public final /* synthetic */ int compare(Object obj, Object obj2) { zzi zzi = (zzi) obj; zzi zzi2 = (zzi) obj2; int i = zzi.f27754l; int i2 = zzi2.f27754l; return i == i2 ? zzi.f27747e.compareTo(zzi2.f27747e) : i - i2; } }
[ "developer@appzoc.com" ]
developer@appzoc.com
ef63201bea6053c236aeeaabf14d37c8ae7f59e2
fef87e0c53ae3a2431d6e77331bfbbe68b51c97a
/portlet-api/src/main/java/javax/portlet/annotations/RenderParam.java
8271a9006b64508c575849a86848fb721f09d750
[ "Apache-2.0" ]
permissive
mahmedk91/portals-pluto
578a947479c43dc57364a80a3365b2daf540e869
912df3dd82322c5d7a975e61327fd54323c28b4c
refs/heads/master
2021-01-15T19:30:40.426861
2016-08-05T16:37:14
2016-08-05T16:37:14
60,347,628
0
0
null
2016-06-03T12:56:35
2016-06-03T12:56:34
null
UTF-8
Java
false
false
2,383
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. */ /* * This source code implements specifications defined by the Java * Community Process. In order to remain compliant with the specification * DO NOT add / change / or delete method signatures! */ package javax.portlet.annotations; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.enterprise.util.Nonbinding; import javax.inject.Qualifier; import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.*; /** * <div class='changed_added_3_0'> * Qualifier that specifies an action parameter for injection. * The parameter will be <code>null</code> if accessed during action * request execution. * <p> * The type of the injection target must be <code>String</code> or <code>String[]</code>. * <p> * This annotation may only be used in an <code>{@literal @}RequestScoped</code> or * <code>{@literal @}RenderStateScoped</code> bean. * <p> * Example: * <div class='codebox'> * {@literal @}Inject {@literal @}RenderParam("paramName")<br/> * private String param; * </div> * </div> * * @see javax.portlet.PortletRequest#getParameter(String) getParameter * @see javax.portlet.PortletRequest#getParameterValues(String) getParameterValues */ @Qualifier @Retention(RUNTIME) @Target({METHOD, FIELD, PARAMETER}) public @interface RenderParam { /** * The parameter name. * * @return The parameter name. */ @Nonbinding String value(); }
[ "msnicklous@apache.org" ]
msnicklous@apache.org
c02d3ee6da7c464f2860b4f732d2e5181b7b4d53
40665051fadf3fb75e5a8f655362126c1a2a3af6
/flyleft-spring-cloud-base/256c5117402b0efd9688e8ee0e2765de3c43c140/5/ConfigClientTwoApplication.java
579b82f2a7100a5ff1b99ff3cfd3392eada1c611
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
1,033
java
package me.jcala.config.client.two; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.core.env.Environment; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; /** * @author flyleft * @date 2018/4/24 */ @SpringBootApplication @RefreshScope @RestController @EnableEurekaClient public class ConfigClientTwoApplication { @Autowired private Environment env; public static void main(String[] args) { new SpringApplicationBuilder(ConfigClientTwoApplication.class).web(true).run(args); } @GetMapping("/info_by_env") public String getInfoByEnv() { return env.getProperty("site.info", "undefined"); } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
e380ebd22228589a6d154c6e3b3d644d048f039e
4d23656a534288c430a1472b1136e76c2cc5de31
/scriptlandia-tech-examples/DSL/StateMachine-Java-ANTLR/src/test/java/com/devx/sparql/parser/ExpressionTest.java
9d93d17f84aaf5bba606a5139eef6da4547a6f32
[]
no_license
shvets/scriptlandia
25ab27e2b02c4b00411bb528fe6fab28ad89b55e
0456f9e85749593154001b627c069e8e82b11914
refs/heads/master
2021-01-01T05:24:07.281918
2008-11-13T19:17:36
2008-11-13T19:17:36
56,731,562
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
package com.devx.sparql.parser; import org.antlr.runtime.RecognitionException; import org.antlr.runtime.tree.Tree; import com.devx.sparql.SparqlParser; public class ExpressionTest extends ConditionalOrExpressionTest { @Override protected Tree fireParserRule( SparqlParser parser ) throws RecognitionException { return (Tree) parser.expression().getTree(); } }
[ "shvets@9700c210-9314-0410-bd77-8714033700fb" ]
shvets@9700c210-9314-0410-bd77-8714033700fb
81131dde622a2951ce858f43fe3971d201226013
b00c54389a95d81a22e361fa9f8bdf5a2edc93e3
/external/okhttp/benchmarks/src/main/java/com/squareup/okhttp/benchmarks/NettyHttpClient.java
9044d0a33c9b103efdc23d082d2218fc2e6752fd
[ "Apache-2.0" ]
permissive
mirek190/x86-android-5.0
9d1756fa7ff2f423887aa22694bd737eb634ef23
eb1029956682072bb7404192a80214189f0dc73b
refs/heads/master
2020-05-27T01:09:51.830208
2015-10-07T22:47:36
2015-10-07T22:47:36
41,942,802
15
20
null
2020-03-09T00:21:03
2015-09-05T00:11:19
null
UTF-8
Java
false
false
7,057
java
/* * Copyright (C) 2014 Square, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.squareup.okhttp.benchmarks; import com.squareup.okhttp.internal.SslContextBuilder; import com.squareup.okhttp.internal.Util; import io.netty.bootstrap.Bootstrap; import io.netty.buffer.ByteBuf; import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.ChannelPipeline; import io.netty.channel.SimpleChannelInboundHandler; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.handler.codec.http.DefaultFullHttpRequest; import io.netty.handler.codec.http.HttpClientCodec; import io.netty.handler.codec.http.HttpContent; import io.netty.handler.codec.http.HttpContentDecompressor; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpMethod; import io.netty.handler.codec.http.HttpObject; import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.codec.http.HttpResponse; import io.netty.handler.codec.http.HttpVersion; import io.netty.handler.codec.http.LastHttpContent; import io.netty.handler.ssl.SslHandler; import java.net.URL; import java.util.ArrayDeque; import java.util.Deque; import java.util.concurrent.TimeUnit; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLEngine; /** Netty isn't an HTTP client, but it's almost one. */ class NettyHttpClient implements HttpClient { private static final boolean VERBOSE = false; // Guarded by this. Real apps need more capable connection management. private final Deque<HttpChannel> freeChannels = new ArrayDeque<HttpChannel>(); private final Deque<URL> backlog = new ArrayDeque<URL>(); private int totalChannels = 0; private int concurrencyLevel; private int targetBacklog; private Bootstrap bootstrap; @Override public void prepare(final Benchmark benchmark) { this.concurrencyLevel = benchmark.concurrencyLevel; this.targetBacklog = benchmark.targetBacklog; ChannelInitializer<SocketChannel> channelInitializer = new ChannelInitializer<SocketChannel>() { @Override public void initChannel(SocketChannel channel) throws Exception { ChannelPipeline pipeline = channel.pipeline(); if (benchmark.tls) { SSLContext sslContext = SslContextBuilder.localhost(); SSLEngine engine = sslContext.createSSLEngine(); engine.setUseClientMode(true); pipeline.addLast("ssl", new SslHandler(engine)); } pipeline.addLast("codec", new HttpClientCodec()); pipeline.addLast("inflater", new HttpContentDecompressor()); pipeline.addLast("handler", new HttpChannel(channel)); } }; bootstrap = new Bootstrap(); bootstrap.group(new NioEventLoopGroup(concurrencyLevel)) .option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT) .channel(NioSocketChannel.class) .handler(channelInitializer); } @Override public void enqueue(URL url) throws Exception { HttpChannel httpChannel = null; synchronized (this) { if (!freeChannels.isEmpty()) { httpChannel = freeChannels.pop(); } else if (totalChannels < concurrencyLevel) { totalChannels++; // Create a new channel. (outside of the synchronized block). } else { backlog.add(url); // Enqueue this for later, to be picked up when another request completes. return; } } if (httpChannel == null) { Channel channel = bootstrap.connect(url.getHost(), Util.getEffectivePort(url)) .sync().channel(); httpChannel = (HttpChannel) channel.pipeline().last(); } httpChannel.sendRequest(url); } @Override public synchronized boolean acceptingJobs() { return backlog.size() < targetBacklog || hasFreeChannels(); } private boolean hasFreeChannels() { int activeChannels = totalChannels - freeChannels.size(); return activeChannels < concurrencyLevel; } private void release(HttpChannel httpChannel) { URL url; synchronized (this) { url = backlog.pop(); if (url == null) { // There were no URLs in the backlog. Pool this channel for later. freeChannels.push(httpChannel); return; } } // We removed a URL from the backlog. Schedule it right away. httpChannel.sendRequest(url); } class HttpChannel extends SimpleChannelInboundHandler<HttpObject> { private final SocketChannel channel; byte[] buffer = new byte[1024]; int total; long start; public HttpChannel(SocketChannel channel) { this.channel = channel; } private void sendRequest(URL url) { start = System.nanoTime(); total = 0; HttpRequest request = new DefaultFullHttpRequest( HttpVersion.HTTP_1_1, HttpMethod.GET, url.getPath()); request.headers().set(HttpHeaders.Names.HOST, url.getHost()); request.headers().set(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP); channel.writeAndFlush(request); } @Override protected void channelRead0( ChannelHandlerContext context, HttpObject message) throws Exception { if (message instanceof HttpResponse) { receive((HttpResponse) message); } if (message instanceof HttpContent) { receive((HttpContent) message); if (message instanceof LastHttpContent) { release(this); } } } @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { super.channelInactive(ctx); } void receive(HttpResponse response) { // Don't do anything with headers. } void receive(HttpContent content) { // Consume the response body. ByteBuf byteBuf = content.content(); for (int toRead; (toRead = byteBuf.readableBytes()) > 0; ) { byteBuf.readBytes(buffer, 0, Math.min(buffer.length, toRead)); total += toRead; } if (VERBOSE && content instanceof LastHttpContent) { long finish = System.nanoTime(); System.out.println(String.format("Transferred % 8d bytes in %4d ms", total, TimeUnit.NANOSECONDS.toMillis(finish - start))); } } @Override public void exceptionCaught(ChannelHandlerContext context, Throwable cause) { System.out.println("Failed: " + cause); } } }
[ "mirek190@gmail.com" ]
mirek190@gmail.com
1522282f9f7c8ca77edbcc9feafc73a31e0377b0
f4b7924a03289706c769aff23abf4cce028de6bc
/smart_logic/src/main/java/plan_pro/modell/bahnuebergang/_1_9_0/TCOptikSymbolmaske.java
4b8153b67d8e6ba4d3151309fb21ef2f3639e372
[]
no_license
jimbok8/ebd
aa18a2066b4a873bad1551e1578a7a1215de9b8b
9b0d5197bede5def2972cc44e63ac3711010eed4
refs/heads/main
2023-06-17T21:16:08.003689
2021-07-05T14:53:38
2021-07-05T14:53:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,889
java
// // Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 generiert // Siehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // �nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. // Generiert: 2020.01.16 um 04:27:51 PM CET // package plan_pro.modell.bahnuebergang._1_9_0; import plan_pro.modell.basistypen._1_9_0.CBasisAttribut; import javax.xml.bind.annotation.*; /** * <p>Java-Klasse f�r TCOptik_Symbolmaske complex type. * * <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist. * * <pre> * &lt;complexType name="TCOptik_Symbolmaske"> * &lt;complexContent> * &lt;extension base="{http://www.plan-pro.org/modell/BasisTypen/1.9.0.2}CBasisAttribut"> * &lt;sequence> * &lt;element name="Wert" type="{http://www.plan-pro.org/modell/Bahnuebergang/1.9.0.2}ENUMOptik_Symbol"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TCOptik_Symbolmaske", propOrder = { "wert" }) public class TCOptikSymbolmaske extends CBasisAttribut { @XmlElement(name = "Wert", required = true, nillable = true) @XmlSchemaType(name = "string") protected ENUMOptikSymbol wert; /** * Ruft den Wert der wert-Eigenschaft ab. * * @return * possible object is * {@link ENUMOptikSymbol } * */ public ENUMOptikSymbol getWert() { return wert; } /** * Legt den Wert der wert-Eigenschaft fest. * * @param value * allowed object is * {@link ENUMOptikSymbol } * */ public void setWert(ENUMOptikSymbol value) { this.wert = value; } }
[ "iberl@verkehr.tu-darmstadt.de" ]
iberl@verkehr.tu-darmstadt.de
f2e088ae1a6bcf358ea55c5abf87a565660772d4
3334bee9484db954c4508ad507f6de0d154a939f
/d3n/java-src/f4m-default-service-api/src/main/java/de/ascendro/f4m/service/json/model/JsonRequiredNullable.java
4702919af8aaef0fdf56d6504c4c1bd1be1f56b6
[]
no_license
VUAN86/d3n
c2fc46fc1f188d08fa6862e33cac56762e006f71
e5d6ac654821f89b7f4f653e2aaef3de7c621f8b
refs/heads/master
2020-05-07T19:25:43.926090
2019-04-12T07:25:55
2019-04-12T07:25:55
180,806,736
0
1
null
null
null
null
UTF-8
Java
false
false
416
java
package de.ascendro.f4m.service.json.model; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation specifying fields that should include null value in output, since are required. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface JsonRequiredNullable { }
[ "vuan86@ya.ru" ]
vuan86@ya.ru
f38f59bd2a5b075c78054b2f9efb1d39538272eb
4fab44e9f3205863c0c4e888c9de1801919dc605
/AL-Game/src/com/aionemu/gameserver/network/aion/clientpackets/CM_ATREIAN_PASSPORT.java
fb7300e754800b37f63aba43b455e0490db2fb4a
[]
no_license
YggDrazil/AionLight9
fce24670dcc222adb888f4a5d2177f8f069fd37a
81f470775c8a0581034ed8c10d5462f85bef289a
refs/heads/master
2021-01-11T00:33:15.835333
2016-07-29T19:20:11
2016-07-29T19:20:11
70,515,345
2
0
null
null
null
null
UTF-8
Java
false
false
2,340
java
/** * This file is part of Aion-Lightning <aion-lightning.org>. * * Aion-Lightning 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-Lightning 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-Lightning. * If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.network.aion.clientpackets; import java.util.ArrayList; import java.util.List; import com.aionemu.gameserver.model.gameobjects.player.Player; import com.aionemu.gameserver.network.aion.AionClientPacket; import com.aionemu.gameserver.network.aion.AionConnection.State; import com.aionemu.gameserver.services.AtreianPassportService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author Alcapwnd */ public class CM_ATREIAN_PASSPORT extends AionClientPacket { private static final Logger log = LoggerFactory.getLogger(CM_ATREIAN_PASSPORT.class); private List<Integer> passportId; private int timestamp; private int count; /** * @param opcode * @param state * @param restStates */ public CM_ATREIAN_PASSPORT(int opcode, State state, State... restStates) { super(opcode, state, restStates); } /* (non-Javadoc) * @see com.aionemu.commons.network.packet.BaseClientPacket#readImpl() */ @Override protected void readImpl() { passportId = new ArrayList<Integer>(); count = readH(); for (int i = 0; i < count; i++) { passportId.add(readD()); timestamp = readD(); } } /* (non-Javadoc) * @see com.aionemu.commons.network.packet.BaseClientPacket#runImpl() */ @Override protected void runImpl() { Player player = getConnection().getActivePlayer(); if (player == null) return; AtreianPassportService.getInstance().onGetReward(player, timestamp, passportId); } }
[ "michelgorter@outlook.com" ]
michelgorter@outlook.com
6600aae40ee268579ea522a6117dfa49d95eed9d
04aa7c7146c9e6df793b7f7e9f352b86dac462ec
/src/main/java/com/service/MovieServIntf.java
dfb97f0460c4cb6aa7e3be27e592e4659e920f6a
[]
no_license
udhaya97/BookMyShow
0c60745e71ea96e5315eeba7f7f7418ac172621e
0013cc926002b258a7f8c61eb7096f39feb3c175
refs/heads/master
2021-05-16T23:12:55.056891
2020-04-22T15:51:33
2020-04-22T15:51:33
257,951,912
1
1
null
null
null
null
UTF-8
Java
false
false
365
java
package com.service; import java.util.List; import org.springframework.stereotype.Service; import com.model.Movie; @Service public interface MovieServIntf { void save(Movie movie); List<Movie> fetchById(int id); Movie findmov(int id); Movie findmovname(String name); List<Movie> findMvAll(); Movie updateMov(Movie movie); void deleteMovi(int id); }
[ "udhaya2cse@gmail.com" ]
udhaya2cse@gmail.com
4f932a96780b72ace017f154ec16a2b182bb5d62
7af4696e1be38e22025a9662ba9591ba7fc83965
/components/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Constants.java
d6e4f56ad9e761ca8a5f21f9c738a3e002ce44fc
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown", "Apache-2.0" ]
permissive
aashnajena/camel
740249630a720ae81294a43452c8789cdbf7bc00
e03647b378e10c99b44aab2ef56e134289816dbf
refs/heads/master
2021-03-12T03:06:31.216298
2020-07-19T23:51:13
2020-07-19T23:51:13
251,257,144
1
1
Apache-2.0
2020-03-30T09:20:10
2020-03-30T09:20:09
null
UTF-8
Java
false
false
1,268
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.camel.component.aws2.kinesis; public interface Kinesis2Constants { String SEQUENCE_NUMBER = "CamelAwsKinesisSequenceNumber"; String APPROX_ARRIVAL_TIME = "CamelAwsKinesisApproximateArrivalTimestamp"; String PARTITION_KEY = "CamelAwsKinesisPartitionKey"; /** * in a Kinesis Record object, the shard ID is used on writes to indicate * where the data was stored */ String SHARD_ID = "CamelAwsKinesisShardId"; }
[ "ancosen@gmail.com" ]
ancosen@gmail.com
ba25e7d433738ea618920535fbf936ce88cbaa1d
e5aba87bca4ffa4ab986451625d84632a81a15c1
/resilience4j-spring-cloud2/src/test/java/io/github/resilience4j/RefreshScopedAutoConfigurationTest.java
2844600fb86f3ac68f40aceb398396176023b895
[ "Apache-2.0" ]
permissive
eddumelendez/resilience4j
d1cb1a170a1ce81cc6eb04f00fdfc6166025d0de
3e1ce36fe664f8adc0653437d696eec49a704ab1
refs/heads/master
2020-04-08T03:42:00.346985
2020-01-02T13:50:44
2020-01-02T13:50:44
158,986,622
0
0
Apache-2.0
2018-11-25T01:03:57
2018-11-25T01:03:57
null
UTF-8
Java
false
false
3,161
java
package io.github.resilience4j; import io.github.resilience4j.bulkhead.autoconfigure.BulkheadAutoConfiguration; import io.github.resilience4j.bulkhead.autoconfigure.RefreshScopedBulkheadAutoConfiguration; import io.github.resilience4j.circuitbreaker.autoconfigure.CircuitBreakerAutoConfiguration; import io.github.resilience4j.circuitbreaker.autoconfigure.RefreshScopedCircuitBreakerAutoConfiguration; import io.github.resilience4j.ratelimiter.autoconfigure.RateLimiterAutoConfiguration; import io.github.resilience4j.ratelimiter.autoconfigure.RefreshScopedRateLimiterAutoConfiguration; import io.github.resilience4j.retry.autoconfigure.RefreshScopedRetryAutoConfiguration; import io.github.resilience4j.retry.autoconfigure.RetryAutoConfiguration; import org.junit.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.assertj.AssertableApplicationContext; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.core.type.MethodMetadata; import static org.junit.Assert.assertTrue; public class RefreshScopedAutoConfigurationTest { private final ApplicationContextRunner contextRunner = new ApplicationContextRunner(); private static void testRefreshScoped(AssertableApplicationContext context, String beanName) { BeanDefinition beanDefinition = context.getBeanFactory().getBeanDefinition(beanName); MethodMetadata beanMethod = (MethodMetadata) beanDefinition.getSource(); assertTrue(beanMethod.isAnnotated(RefreshScope.class.getName())); } @Test public void refreshScopedBulkheadRegistry() { contextRunner .withConfiguration(AutoConfigurations.of( RefreshScopedBulkheadAutoConfiguration.class, BulkheadAutoConfiguration.class)) .run(context -> { testRefreshScoped(context, "bulkheadRegistry"); testRefreshScoped(context, "threadPoolBulkheadRegistry"); }); } @Test public void refreshScopedCircuitBreakerRegistry() { contextRunner .withConfiguration(AutoConfigurations.of( RefreshScopedCircuitBreakerAutoConfiguration.class, CircuitBreakerAutoConfiguration.class)) .run(context -> testRefreshScoped(context, "circuitBreakerRegistry")); } @Test public void refreshScopedRateLimiterRegistry() { contextRunner .withConfiguration(AutoConfigurations.of( RefreshScopedRateLimiterAutoConfiguration.class, RateLimiterAutoConfiguration.class)) .run(context -> testRefreshScoped(context, "rateLimiterRegistry")); } @Test public void refreshScopedRetryRegistry() { contextRunner .withConfiguration(AutoConfigurations.of( RefreshScopedRetryAutoConfiguration.class, RetryAutoConfiguration.class)) .run(context -> testRefreshScoped(context, "retryRegistry")); } }
[ "robwin@t-online.de" ]
robwin@t-online.de
867e6993d10a5eed86bf0946cbf0fad504230aea
35fa2da28a3f71a277e93b0ad89436e1ddf85c3c
/src/zadaca3/Sortiranje/Person.java
f2f2363297e01ac01541e69a0c0272e979754d74
[]
no_license
Amra7/ZADACA_S09
7b8f3d7afc92bf5c90ef94b3f1bac2cd880edb25
4e727c4c60a61811a9115c1c86160e73f580742e
refs/heads/master
2021-01-25T04:52:49.797916
2015-01-14T22:47:29
2015-01-14T22:47:29
29,091,005
0
0
null
null
null
null
UTF-8
Java
false
false
618
java
package zadaca3.Sortiranje; public class Person { private String firstName; private String lastName; public Person(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } @Override public String toString() { return String.format("%s, %s", lastName, firstName); } }
[ "amrapop@gmail.com" ]
amrapop@gmail.com
ed2a5874a06eb8fe6c37dc35e358ae98a16d96d0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_21ed2165bd08b97a405e1d5e234f43bef3274566/NamedObject/2_21ed2165bd08b97a405e1d5e234f43bef3274566_NamedObject_s.java
57c34ec4ec01aff3ff720242cfa7d118f6504e28
[]
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
468
java
/* * Copyright (C) 2013 mgm technology partners GmbH, Munich. * * See the LICENSE file distributed with this work for additional * information regarding copyright ownership and intellectual property rights. */ package com.mgmtp.jfunk.common.util; /** * Interface for classes the have a name. * * @author rnaegele */ public interface NamedObject { /** * Gets the ojbect's name. * * @return the name */ String getName(); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
98f6f5ba93a4632417ff81c24129a3a8216b26f8
84714ec1201114756324e4dca8f3730736f032a4
/ext/lanterna/src/main/java/org/minimalj/frontend/impl/lanterna/toolkit/LanternaSearchTable.java
766ebc5d406cd037205161f4615f1d523b5f3b3b
[ "Apache-2.0" ]
permissive
BrunoEberhard/minimal-j
5e896f244bcce11dbac5b4b2612814b877332fa2
6173c9ace6dcfc4232f31c47cc8286352a12a4ca
refs/heads/master
2023-08-29T02:45:08.860372
2023-07-08T04:55:34
2023-07-08T04:55:34
33,410,104
19
4
Apache-2.0
2023-07-08T04:55:35
2015-04-04T15:27:40
Java
UTF-8
Java
false
false
1,688
java
package org.minimalj.frontend.impl.lanterna.toolkit; import org.minimalj.frontend.Frontend.IContent; import org.minimalj.frontend.Frontend.Search; import org.minimalj.frontend.Frontend.TableActionListener; import com.googlecode.lanterna.TerminalSize; import com.googlecode.lanterna.gui2.Button; import com.googlecode.lanterna.gui2.Direction; import com.googlecode.lanterna.gui2.LinearLayout; import com.googlecode.lanterna.gui2.LinearLayout.Alignment; import com.googlecode.lanterna.gui2.Panel; import com.googlecode.lanterna.gui2.TextBox; public class LanternaSearchTable<T> extends Panel implements IContent { private final TextBox textBox; private final Button searchButton; private final LanternaTable<T> table; public LanternaSearchTable(Search<T> search, Object[] keys, boolean multiSelect, TableActionListener<T> listener) { super(new LinearLayout(Direction.VERTICAL)); setPreferredSize(new TerminalSize(30, 10)); Panel northPanel = new Panel(new LinearLayout(Direction.HORIZONTAL)); addComponent(northPanel, LinearLayout.createLayoutData(Alignment.Beginning)); table = new LanternaTable<>(keys, multiSelect, listener); table.setVisibleRows(5); addComponent(table, LinearLayout.createLayoutData(Alignment.Center)); this.textBox = new TextBox(); northPanel.addComponent(textBox, LinearLayout.createLayoutData(Alignment.Center)); Runnable runnable = () -> table.setObjects(search.search(textBox.getText())); this.searchButton = new Button("..", () -> LanternaFrontend.run(textBox, runnable)); searchButton.setRenderer(new Button.FlatButtonRenderer()); northPanel.addComponent(searchButton, LinearLayout.createLayoutData(Alignment.End)); } }
[ "bruno.eberhard@pop.ch" ]
bruno.eberhard@pop.ch
bd7c0bd09fd30614ae50db38dce488fb49a70deb
378a68563595a28019f37fb4c5f86699d875f005
/Auxiliary/RecipeManagers/CastingRecipes/Special/RepeaterTurboRecipe.java
94f636181ae22f5efa561b329c682a76d4d16c19
[]
no_license
ASpieler/ChromiCraft
eadd03d777a29e6ba9721c85f3c54381252603f2
fdea11229ca2eaee55906c57a0e283a91f70b581
refs/heads/master
2021-01-13T13:06:59.315205
2016-04-03T22:37:03
2016-04-03T22:37:03
55,671,200
0
0
null
null
null
null
UTF-8
Java
false
false
3,522
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2015 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.ChromatiCraft.Auxiliary.RecipeManagers.CastingRecipes.Special; import java.util.Collection; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import Reika.ChromatiCraft.Auxiliary.ChromaStacks; import Reika.ChromatiCraft.Auxiliary.ProgressionManager.ProgressStage; import Reika.ChromatiCraft.Auxiliary.Interfaces.EnergyLinkingRecipe; import Reika.ChromatiCraft.Auxiliary.RecipeManagers.CastingRecipe.PylonRecipe; import Reika.ChromatiCraft.Registry.ChromaSounds; import Reika.ChromatiCraft.Registry.ChromaTiles; import Reika.ChromatiCraft.Registry.CrystalElement; import Reika.ChromatiCraft.TileEntity.Recipe.TileEntityCastingTable; public class RepeaterTurboRecipe extends PylonRecipe implements EnergyLinkingRecipe { public RepeaterTurboRecipe(ChromaTiles rpt, int baseAura) { super(getOutputItem(rpt), rpt.getCraftedProduct()); this.addAuraRequirement(CrystalElement.BLACK, 5*baseAura); this.addAuraRequirement(CrystalElement.WHITE, 4*baseAura); this.addAuraRequirement(CrystalElement.PURPLE, 8*baseAura); this.addAuraRequirement(CrystalElement.BLUE, 10*baseAura); this.addAuraRequirement(CrystalElement.YELLOW, 15*baseAura); this.addAuraRequirement(CrystalElement.GRAY, 2*baseAura); this.addAuxItem(ChromaStacks.glowbeans, -2, -2); this.addAuxItem(ChromaStacks.glowbeans, 2, -2); this.addAuxItem(ChromaStacks.glowbeans, -2, 2); this.addAuxItem(ChromaStacks.glowbeans, 2, 2); this.addAuxItem(ChromaStacks.boostroot, 0, 2); this.addAuxItem(ChromaStacks.boostroot, 0, -2); this.addAuxItem(ChromaStacks.boostroot, 2, 0); this.addAuxItem(ChromaStacks.boostroot, -2, 0); this.addAuxItem(ChromaStacks.beaconDust, -4, -4); this.addAuxItem(ChromaStacks.beaconDust, 4, 4); this.addAuxItem(ChromaStacks.beaconDust, -4, 4); this.addAuxItem(ChromaStacks.beaconDust, 4, -4); this.addAuxItem(ChromaStacks.focusDust, 0, -4); this.addAuxItem(ChromaStacks.focusDust, 4, 0); this.addAuxItem(ChromaStacks.focusDust, 0, 4); this.addAuxItem(ChromaStacks.focusDust, -4, 0); this.addAuxItem(Items.glowstone_dust, -2, -4); this.addAuxItem(Items.glowstone_dust, 2, -4); this.addAuxItem(Items.glowstone_dust, 4, -2); this.addAuxItem(Items.glowstone_dust, 4, 2); this.addAuxItem(Items.glowstone_dust, 2, 4); this.addAuxItem(Items.glowstone_dust, -2, 4); this.addAuxItem(Items.glowstone_dust, -4, 2); this.addAuxItem(Items.glowstone_dust, -4, -2); } private static ItemStack getOutputItem(ChromaTiles rpt) { ItemStack is = rpt.getCraftedProduct(); is.stackTagCompound = new NBTTagCompound(); is.stackTagCompound.setBoolean("boosted", true); return is; } @Override public boolean isIndexed() { return false; } @Override public void onRecipeTick(TileEntityCastingTable te) { } @Override public ChromaSounds getSoundOverride(int soundTimer) { return null; } @Override protected void getRequiredProgress(Collection<ProgressStage> c) { c.add(ProgressStage.CTM); } @Override public int getExperience() { return super.getExperience()*20; } @Override public int getDuration() { return super.getDuration()*8; } }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
3c730d922fb67af12a5ac7a182063f32b1cd2a8d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_24745454d89debe37d64ff014946e069e3342882/MyDocListener/6_24745454d89debe37d64ff014946e069e3342882_MyDocListener_t.java
9efd8851bff4eecead854e765f76ad6745b67509
[]
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,622
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package frontend; import backend.Node; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JLabel; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.text.BadLocationException; /** * * */ public class MyDocListener implements DocumentListener{ private JLabel _label; public MyDocListener(JLabel label){ _label = label; } public void insertUpdate(DocumentEvent e) { try { setLabelText(e); } catch (BadLocationException ex) { Logger.getLogger(Node.class.getName()).log(Level.SEVERE, null, ex); } } public void removeUpdate(DocumentEvent e) { try { setLabelText(e); } catch (BadLocationException ex) { Logger.getLogger(Node.class.getName()).log(Level.SEVERE, null, ex); } } public void changedUpdate(DocumentEvent e) { try { setLabelText(e); } catch (BadLocationException ex) { Logger.getLogger(Node.class.getName()).log(Level.SEVERE, null, ex); } } /** * This method converts a string into an html string that displays subscripted integers and select greek characters. * @param e * @throws BadLocationException */ public void setLabelText(DocumentEvent e) throws BadLocationException{ String s = e.getDocument().getText(0, e.getDocument().getLength()); StringBuilder html = new StringBuilder("<html>"); int i = 0; String[] _greekChars = {"beta", "alpha", "epsilon", "theta", "Theta"}; String[] _greekCodes = {"&#x03B2;", "&#x03B1;","&#x03B5;", "&#x03B8;", "&#x0398;"}; while (i < e.getDocument().getLength()){ if (s.charAt(i) != '_'){ if (s.charAt(i)=='/'){ //special case because html. html.append("&#x2F;"); } else if (s.charAt(i)!= '\\'){ html.append(s.charAt(i)); } else { for (int j = 0; j < _greekChars.length; j++){ String greekChar = _greekChars[j]; if (i+greekChar.length() < s.length() && s.substring(i+1, i+greekChar.length()+1).equals(greekChar)){ i+=greekChar.length(); html.append(_greekCodes[j]); } } } i++; } else{ i++; html.append("<sub>"); while (i < e.getDocument().getLength() && s.charAt(i) <= '9' && s.charAt(i) >= '0' ){ html.append(s.charAt(i++)); } html.append("</sub>"); } } _label.setText(html.toString()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2bcc2c855ef46ede736e42e6fd4c46f96701d9e4
1517db1f887395c50e7e7d40779f70f5980687a3
/core/src/test/java/org/junithelper/core/meta/TestMethodMetaTest.java
22734faa1544d04da1eadb738ee818a4a51a22d0
[ "Apache-2.0" ]
permissive
fk-org/junithelper
0128c4d72b963d277589338dbeca0188a0eb696a
8c307eb05f762cf8030a3bd6d903228e0d5b98b2
refs/heads/master
2021-06-15T15:53:27.776110
2017-03-30T15:51:15
2017-03-30T15:51:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
409
java
package org.junithelper.core.meta; import static org.junit.Assert.*; import org.junit.Test; public class TestMethodMetaTest { @Test public void type() throws Exception { assertNotNull(TestMethodMeta.class); } @Test public void instantiation() throws Exception { TestMethodMeta target = new TestMethodMeta(); assertNotNull(target); } }
[ "seratch@gmail.com" ]
seratch@gmail.com
5089a6a544c683168afb4c485fc60504087bffb1
86215bd7ab2457497727be0193d3960feec3b524
/demo-fpml/src/main/generated-source/org/fpml/reporting/DividendPeriodDividend.java
8bdc8cd52a3bd26b3a1077bc4a2091324da5868c
[]
no_license
prasobhpk/stephennimmo-templates
4770d5619488fe39ffa289b6ede36578c29d6c4d
ce2b04c09b6352311df65ad8643f682452f9d6a7
refs/heads/master
2016-09-11T13:47:44.366025
2013-08-21T18:29:55
2013-08-21T18:29:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,825
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2011.06.01 at 08:58:10 AM CDT // package org.fpml.reporting; import java.io.Serializable; import java.math.BigDecimal; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * A time bounded dividend period, with an expected dividend for each period. * * <p>Java class for DividendPeriodDividend complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="DividendPeriodDividend"> * &lt;complexContent> * &lt;extension base="{http://www.fpml.org/FpML-5/reporting}DividendPeriod"> * &lt;sequence> * &lt;element name="dividend" type="{http://www.fpml.org/FpML-5/reporting}NonNegativeMoney" minOccurs="0"/> * &lt;element name="multiplier" type="{http://www.fpml.org/FpML-5/reporting}PositiveDecimal" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DividendPeriodDividend", propOrder = { "dividend", "multiplier" }) public class DividendPeriodDividend extends DividendPeriod implements Serializable { private final static long serialVersionUID = 1L; protected NonNegativeMoney dividend; protected BigDecimal multiplier; /** * Gets the value of the dividend property. * * @return * possible object is * {@link NonNegativeMoney } * */ public NonNegativeMoney getDividend() { return dividend; } /** * Sets the value of the dividend property. * * @param value * allowed object is * {@link NonNegativeMoney } * */ public void setDividend(NonNegativeMoney value) { this.dividend = value; } /** * Gets the value of the multiplier property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getMultiplier() { return multiplier; } /** * Sets the value of the multiplier property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setMultiplier(BigDecimal value) { this.multiplier = value; } }
[ "stephennimmo@gmail.com@ea902603-27ce-0092-70ca-3da810587992" ]
stephennimmo@gmail.com@ea902603-27ce-0092-70ca-3da810587992
b1d1f997ed9fe4b56de1796756927c6e78af1576
eb6ea40ac694da250d833922bce78a4eead9c8de
/server/src/com/thoughtworks/go/server/controller/ConsoleOutView.java
35ae9f6e8e4f21539894a8b86b5f3e9f0901deb1
[ "Apache-2.0" ]
permissive
ruckc/gocd
c2a7af6f0a069bba4bc5ae27aaf43707379b4c5f
0c8a39409ee1210db21994aeb05d6a7c20f86ce2
refs/heads/master
2022-07-20T02:22:54.182791
2014-12-08T03:26:56
2014-12-08T03:26:56
27,695,928
0
0
Apache-2.0
2022-07-13T18:28:21
2014-12-08T03:27:02
Java
UTF-8
Java
false
false
1,813
java
/*************************GO-LICENSE-START********************************* * Copyright 2014 ThoughtWorks, 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. *************************GO-LICENSE-END***********************************/ package com.thoughtworks.go.server.controller; import java.io.PrintWriter; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.thoughtworks.go.util.GoConstants; import org.springframework.web.servlet.View; public class ConsoleOutView implements View { private int offset; private String content; public ConsoleOutView(int offset, String content) { this.offset = offset; this.content = content; } public String getContentType() { return GoConstants.RESPONSE_CHARSET; } public void render(Map model, HttpServletRequest request, HttpServletResponse response) throws Exception { response.addHeader("X-JSON", "[" + getOffset() + "]"); PrintWriter writer = response.getWriter(); try { writer.write(getContent()); } finally { writer.close(); } } public int getOffset() { return offset; } public String getContent() { return content; } }
[ "godev@thoughtworks.com" ]
godev@thoughtworks.com
636f06b43ca1eb25bcc3179ab67fca9c1c7508fd
c726f082cdec145f724246f5faf23a00704406b7
/fop-1.0-sqs/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListStyleNumber.java
d3cb5f6f64a6e9ed091ca770d4ed350af198523f
[ "Apache-2.0" ]
permissive
freinhold/sqs
a8ef0b1a99b7891a676bd02f6040ef2080246efe
4c2b8fd41ec1ff18f4e2ac43c59860ff81950c6d
refs/heads/master
2020-09-09T12:58:58.287148
2012-05-04T08:04:23
2012-05-04T08:04:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,656
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. */ /* $Id: RtfListStyleNumber.java 679326 2008-07-24 09:35:34Z vhennebert $ */ package org.apache.fop.render.rtf.rtflib.rtfdoc; /* * This file is part of the RTF library of the FOP project, which was originally * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to * the FOP project. */ //Java import java.io.IOException; //FOP import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement; /** * Class to handle number list style. */ public class RtfListStyleNumber extends RtfListStyle { /** * Gets called before a RtfListItem has to be written. * @param item RtfListItem whose prefix has to be written * {@inheritDoc} * @throws IOException Thrown when an IO-problem occurs */ public void writeListPrefix(RtfListItem item) throws IOException { item.writeControlWord("pnlvlbody"); item.writeControlWord("ilvl0"); item.writeOneAttribute(RtfListTable.LIST_NUMBER, "0"); item.writeControlWord("pndec"); item.writeOneAttribute("pnstart", new Integer(1)); item.writeOneAttribute("pnindent", item.attrib.getValue(RtfListTable.LIST_INDENT)); item.writeControlWord("pntxta."); } /** * Gets called before a paragraph, which is contained by a RtfListItem has to be written. * * @param element RtfElement in whose context is to be written * {@inheritDoc} * @throws IOException Thrown when an IO-problem occurs */ public void writeParagraphPrefix(RtfElement element) throws IOException { element.writeGroupMark(true); element.writeControlWord("pntext"); element.writeControlWord("f" + RtfFontManager.getInstance().getFontNumber("Symbol")); element.writeControlWord("'b7"); element.writeControlWord("tab"); element.writeGroupMark(false); } /** * Gets called when the list table has to be written. * * @param element RtfElement in whose context is to be written * {@inheritDoc} * @throws IOException Thrown when an IO-problem occurs */ public void writeLevelGroup(RtfElement element) throws IOException { element.writeOneAttributeNS( RtfListTable.LIST_START_AT, new Integer(1)); element.attrib.set(RtfListTable.LIST_NUMBER_TYPE, 0); element.writeGroupMark(true); element.writeOneAttributeNS( RtfListTable.LIST_TEXT_FORM, "\\'03\\\'00. ;"); element.writeGroupMark(false); element.writeGroupMark(true); element.writeOneAttributeNS( RtfListTable.LIST_NUM_POSITION, "\\'01;"); element.writeGroupMark(false); element.writeOneAttribute(RtfListTable.LIST_FONT_TYPE, new Integer(0)); } }
[ "chikoski@gmail.com" ]
chikoski@gmail.com
28a5531d55b92f0f3ce6cd9d81ae79c47fa85594
a013759437c1fb59ec847dc9069209cf11ba340e
/src/main/java/co/comdor/github/CommandScripts.java
4ea026ba0cd91403da4a67f2bd9ca4546c9693e6
[ "BSD-3-Clause" ]
permissive
amihaiemil/comdor
21dff5477506d026d0ced3dacaa33d1b8d7b2b00
d97eb831192353ef2ee7ff1da5199385e95f8de9
refs/heads/master
2022-12-27T15:15:41.842320
2020-02-21T10:05:34
2020-02-21T10:05:34
108,583,437
12
0
BSD-3-Clause
2020-10-13T01:44:26
2017-10-27T18:57:01
Java
UTF-8
Java
false
false
2,427
java
/** * Copyright (c) 2017, Mihai Emil Andronache * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1)Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2)Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3)Neither the name of comdor nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package co.comdor.github; import co.comdor.Scripts; /** * Scripts found in a Command. * @author Mihai Andronache (amihaiemil@gmail.com) * @version $Id$ * @since 0.0.3 */ public final class CommandScripts implements Scripts { /** * Command which holds the scripts. */ private final Command command; /** * Ctor. * @param command Command which holds the scripts. */ public CommandScripts(final Command command) { this.command = command; } /** * In a command's text (body), the scripts are supposed to be between "```". * @return String. */ @Override public String asText() { final String body = this.command.json().getString("body"); final int start = body.indexOf("```") + 3; final int end = body.lastIndexOf("```"); return body.substring(start, end); } }
[ "amihaiemil@gmail.com" ]
amihaiemil@gmail.com
5cab026efdd23130493ea2433b9a1b5f90033428
5f82aae041ab05a5e6c3d9ddd8319506191ab055
/Projects/Mockito/27/test/org/mockito/internal/debugging/WarningsPrinterImplTest.java
a0bb7fe7baa9ee408d496ef26ef3aa9812edc406
[ "BSD-3-Clause", "MIT", "Apache-2.0" ]
permissive
lingming/prapr_data
e9ddabdf971451d46f1ef2cdbee15ce342a6f9dc
be9ababc95df45fd66574c6af01122ed9df3db5d
refs/heads/master
2023-08-14T20:36:23.459190
2021-10-17T13:49:39
2021-10-17T13:49:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,834
java
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.debugging; import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.internal.util.MockitoLogger; import org.mockitoutil.TestBase; public class WarningsPrinterImplTest extends TestBase { @Mock private MockitoLogger logger; @Mock private WarningsFinder finder; @Test public void shouldUseFinderCorrectly() { // given WarningsPrinterImpl printer = new WarningsPrinterImpl(false, finder); // when printer.print(logger); // then ArgumentCaptor<LoggingListener> arg = ArgumentCaptor.forClass(LoggingListener.class); verify(finder).find(arg.capture()); assertEquals(logger, arg.getValue().getLogger()); assertEquals(false, arg.getValue().isWarnAboutUnstubbed()); } @Test public void shouldPassCorrectWarningFlag() { // given WarningsPrinterImpl printer = new WarningsPrinterImpl(true, finder); // when printer.print(logger); // then ArgumentCaptor<LoggingListener> arg = ArgumentCaptor.forClass(LoggingListener.class); verify(finder).find(arg.capture()); assertEquals(true, arg.getValue().isWarnAboutUnstubbed()); } @Test public void shouldPrintToString() { // given WarningsPrinterImpl printer = spy(new WarningsPrinterImpl(true, finder)); // when String out = printer.print(); // then verify(printer).print((MockitoLogger) notNull()); assertNotNull(out); } }
[ "2890268106@qq.com" ]
2890268106@qq.com
5030a21a7d5a6d1c62ee2778cb2e397d63c8bccb
e054c1e6903e4b5eb166d107802c0c2cadd2eb03
/modules/datex-serializer/src/generated/java/eu/datex2/schema/_3/situation/_SeverityEnum.java
33fe87c8f0e957c050caed131b83d23aa74340df
[ "MIT" ]
permissive
svvsaga/gradle-modules-public
02dc90ad2feb58aef7629943af3e0d3a9f61d5cf
e4ef4e2ed5d1a194ff426411ccb3f81d34ff4f01
refs/heads/main
2023-05-27T08:25:36.578399
2023-05-12T14:15:47
2023-05-12T14:33:14
411,986,217
2
1
MIT
2023-05-12T14:33:15
2021-09-30T08:36:11
Java
UTF-8
Java
false
false
2,038
java
package eu.datex2.schema._3.situation; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlAttribute; import jakarta.xml.bind.annotation.XmlType; import jakarta.xml.bind.annotation.XmlValue; /** * <p>Java class for _SeverityEnum complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="_SeverityEnum"&gt; * &lt;simpleContent&gt; * &lt;extension base="&lt;http://datex2.eu/schema/3/situation&gt;SeverityEnum"&gt; * &lt;attribute name="_extendedValue" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; * &lt;/extension&gt; * &lt;/simpleContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "_SeverityEnum", propOrder = { "value" }) public class _SeverityEnum { @XmlValue protected SeverityEnum value; @XmlAttribute(name = "_extendedValue") protected String _ExtendedValue; /** * Gets the value of the value property. * * @return * possible object is * {@link SeverityEnum } * */ public SeverityEnum getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link SeverityEnum } * */ public void setValue(SeverityEnum value) { this.value = value; } /** * Gets the value of the _ExtendedValue property. * * @return * possible object is * {@link String } * */ public String get_ExtendedValue() { return _ExtendedValue; } /** * Sets the value of the _ExtendedValue property. * * @param value * allowed object is * {@link String } * */ public void set_ExtendedValue(String value) { this._ExtendedValue = value; } }
[ "geir.sagberg@gmail.com" ]
geir.sagberg@gmail.com
eb76c3fb0e96882303cc9a1cff3e82d8fa60d3f3
07ed9825a8cbc93d01133d31e29266ce911cd2a0
/src/sample/xi/yi/yao/xue/DictionaryFromDB.java
0bd97750a28a8c88e795ecc5c1fc7fba046c593e
[ "Apache-2.0" ]
permissive
lysdyt/HuaRuiJi2.8.0
4bd93d6b29feaf0bb0a1065b1345602be0ede5fb
8425fbb68abe982177fc2db6dd4fca902fb2fa3b
refs/heads/master
2022-04-24T02:37:19.473214
2020-04-26T00:55:58
2020-04-26T00:55:58
null
0
0
null
null
null
null
GB18030
Java
false
false
7,899
java
package sample.xi.yi.yao.xue; import java.io.BufferedReader; import org.tinos.language.plorm.PLORMImpl; import org.tinos.language.plorm.PLORMInterf; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.concurrent.ConcurrentHashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; @SuppressWarnings("unused") public class DictionaryFromDB{ // public List<String> dic_list; // public Map<String,Object> dic_map; // public Map<String,Object> dic_li; // public Map<String,Object> dic_hai; // public Map<String,Object> dic_xz; // public Map<String,Object> dic_xw; // public Map<String,Object> dic_jm; // public Map<String,Object> dic_ya; // public Map<String,Object> dic_cy; // public Map<String,Object> dic_cj; // public Map<String,Object> dic_jj; // public Map<String,Object> dic_zf; public List<String> txtToList() throws IOException{ List<String> dic_list= new ArrayList<>(); return dic_list; } // @SuppressWarnings({"unchecked", "rawtypes", "unused"}) public Map<String, Object> listToMap(List<String> dic_list) throws IOException{ Map<String, Object> dic_map= new ConcurrentHashMap<String, Object>(); Map<String, Object> map= null; //for(int i=0; i<) String plsql= "setRoot:C:/DetaDB;" + "baseName:ZYY;" + "tableName:xybg:select;" + "condition:or:ID|<=|3000;"; //"condition:or:ID|==|2;"; try { // Select orm= new Select().startAtRootDir("C:/DetaDB").withBaseName("ZYY") // .withTableSelect("xybg").withCondition("or", "ID|<=|3000"); //map= org.plsql.db.plsql.imp.ExecPLSQLImp.ExecPLSQL(plsql, true); // map= org.plsql.db.plsql.imp.ExecPLSQLImp.ExecPLORM(orm, true); }catch(Exception e1) { e1.printStackTrace(); } // ArrayList list= (ArrayList) map.get("obj"); // Iterator<HashMap<String, Object>> iterator= list.iterator(); return map; } @SuppressWarnings({ "unchecked", "rawtypes" }) public void txtToMap(Map<String, Object> dic_yao_ming, Map<String, Object> dic_chengfen_danwei, Map<String, Object> dic_yong_fa, Map<String, Object> dic_yao_li, Map<String, Object> dic_zhu_yi, Map<String, Object> dic_shi_ying, Map<String, Object> dic_bu_liang_fan_ying, Map<String, Object> dic_yao_wu_xiang_hu_zuo_yong, Map<String, Object> dic_qi_ta, Map<String, Object> dic_yong_liang, Map<String, Object> dic_jie_shao) throws IOException{ Map<String, Object> dic_map= new ConcurrentHashMap<String, Object>(); Map<String, Object> map= null; //for(int i=0; i<) String plsql= "setRoot:C:/DetaDB;" + "baseName:ZYY;" + "tableName:xybg:select;" + "condition:or:ID|<=|3000;"; //"condition:or:ID|==|2;"; try { PLORMInterf orm= new PLORMImpl(); map= orm.startAtRootDir("C:/DetaDB").withBaseName("ZYY") .withTableSelect("xybg").withCondition("or") .let("ID").lessThanAndEqualTo("3000") .checkAndFixPlsqlGrammarErrors()//准备完善plsql orm语言 的语法检查函数 和修复函数。 .checkAndFixSystemEnvironmentErrors()//准备完善plsql orm语言 的系统环境检查函数和修复函数。 .finalExec(true).returnAsMap(); //map= org.plsql.db.plsql.imp.ExecPLSQLImp.ExecPLSQL(plsql, true); //map= org.plsql.db.plsql.imp.ExecPLSQLImp.ExecPLORM(orm, true); }catch(Exception e1) { //准备写回滚 e1.printStackTrace(); } ArrayList list= (ArrayList) map.get("obj"); Iterator<HashMap<String, Object>> iterator= list.iterator(); while(iterator.hasNext()) { HashMap<String, Object> hashmap= iterator.next(); StringBuilder stringBuilder= new StringBuilder(); if(hashmap.containsKey("rowValue")) { HashMap<String, Object> rowValue= (HashMap<String, Object>) hashmap.get("rowValue"); String keyName= null; if(rowValue.containsKey("西药名")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("西药名"); keyName= temp.get("culumnValue").toString().replace("@biky@", ":"); dic_yao_ming.put(keyName, null== temp.get("culumnValue")?"":temp.get("culumnValue") .toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } if(rowValue.containsKey("介绍")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("介绍"); dic_jie_shao.put(keyName, null== temp.get("culumnValue")?"":temp.get("culumnValue") .toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } if(rowValue.containsKey("药理")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("药理"); dic_yao_li.put(keyName, null== temp.get("culumnValue")?"":temp.get("culumnValue") .toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } if(rowValue.containsKey("主要成分")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("主要成分"); dic_chengfen_danwei.put(keyName, null== temp.get("culumnValue")?"":temp.get("culumnValue") .toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } if(rowValue.containsKey("用法")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("用法"); dic_yong_fa.put(keyName, null== temp.get("culumnValue")?"":temp.get("culumnValue") .toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } if(rowValue.containsKey("注意事项")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("注意事项"); dic_zhu_yi.put(keyName, null== temp.get("culumnValue")?"":temp.get("culumnValue") .toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } if(rowValue.containsKey("适应症")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("适应症"); dic_shi_ying.put(keyName, null==temp.get("culumnValue")?"":temp.get("culumnValue") .toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } if(rowValue.containsKey("不良反应")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("不良反应"); dic_bu_liang_fan_ying.put(keyName, null==temp.get("culumnValue")?"":temp.get("culumnValue") .toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } if(rowValue.containsKey("用量")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("用量"); dic_yong_liang.put(keyName, null==temp.get("culumnValue")?"":temp.get("culumnValue") .toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } if(rowValue.containsKey("药物相互作用")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("药物相互作用"); dic_yao_wu_xiang_hu_zuo_yong.put(keyName, null==temp.get("culumnValue")?"":temp .get("culumnValue").toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } if(rowValue.containsKey("其他")) { HashMap<String, Object> temp= (HashMap<String, Object>) rowValue.get("其他"); dic_qi_ta.put(keyName, null==temp.get("culumnValue")?"":temp.get("culumnValue") .toString().replace("@biky@", ":")); stringBuilder.append(temp.get("culumnValue").toString()); } dic_map.put(keyName, stringBuilder.toString().replace("@biky@", ":")); } } // return dic_map; } }
[ "Lenovo@LAPTOP-352KOFCM 313699483" ]
Lenovo@LAPTOP-352KOFCM 313699483
340908b7ceccca29b88d9009aac150598b3dc0c0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_e208d34399136d1938e1177ddc56934b363cdde2/TestCaseRunLogReport/4_e208d34399136d1938e1177ddc56934b363cdde2_TestCaseRunLogReport_t.java
fbaac2260ce4cdb4d9a69d4af50a5df462cf639a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,872
java
/* * soapUI, copyright (C) 2004-2011 eviware.com * * soapUI is free software; you can redistribute it and/or modify it under the * terms of version 2.1 of the GNU Lesser General Public License as published by * the Free Software Foundation. * * soapUI 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 at gnu.org. */ package com.eviware.soapui.report; import java.io.File; import java.io.IOException; import org.apache.log4j.Logger; import com.eviware.soapui.config.TestCaseRunLogDocumentConfig; import com.eviware.soapui.config.TestCaseRunLogDocumentConfig.TestCaseRunLog; import com.eviware.soapui.config.TestCaseRunLogDocumentConfig.TestCaseRunLog.TestCaseRunLogTestStep; import com.eviware.soapui.impl.support.http.HttpRequestTestStep; import com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpRequestTransport; import com.eviware.soapui.impl.wsdl.submit.transports.http.ExtendedHttpMethod; import com.eviware.soapui.impl.wsdl.submit.transports.http.support.metrics.SoapUIMetrics; import com.eviware.soapui.model.support.TestRunListenerAdapter; import com.eviware.soapui.model.testsuite.TestCaseRunContext; import com.eviware.soapui.model.testsuite.TestCaseRunner; import com.eviware.soapui.model.testsuite.TestStepResult; /** * @author Erik R. Yverling * * Creates a report from the test case run log after a test has been * run. */ public class TestCaseRunLogReport extends TestRunListenerAdapter { private static final String REPORT_FILE_NAME = "test_case_run_log_report.xml"; private TestCaseRunLogDocumentConfig testCaseRunLogDocumentConfig; private Logger log = Logger.getLogger( TestCaseRunLogReport.class ); private TestCaseRunLog testCaseRunLog; private final String outputFolder; public TestCaseRunLogReport( String outputFolder ) { this.outputFolder = outputFolder; testCaseRunLogDocumentConfig = TestCaseRunLogDocumentConfig.Factory.newInstance(); testCaseRunLog = testCaseRunLogDocumentConfig.addNewTestCaseRunLog(); } @Override public void afterStep( TestCaseRunner testRunner, TestCaseRunContext runContext, TestStepResult result ) { TestCaseRunLogTestStep testCaseRunLogTestStep = testCaseRunLog.addNewTestCaseRunLogTestStep(); testCaseRunLogTestStep.setName( result.getTestStep().getName() ); testCaseRunLogTestStep.setTimeTaken( Long.toString( result.getTimeTaken() ) ); testCaseRunLogTestStep.setStatus( result.getStatus().toString() ); testCaseRunLogTestStep.setMessageArray( result.getMessages() ); ExtendedHttpMethod httpMethod = ( ExtendedHttpMethod )runContext .getProperty( BaseHttpRequestTransport.HTTP_METHOD ); // TODO seems that we need two configurations, metrics that handle // dns + connect time (from connection manager) // and all other (on request level) if( httpMethod != null && result.getTestStep() instanceof HttpRequestTestStep ) { testCaseRunLogTestStep.setEndpoint( httpMethod.getURI().toString() ); SoapUIMetrics metrics = ( SoapUIMetrics )httpMethod.getMetrics(); testCaseRunLogTestStep.setTimestamp( metrics.getFormattedTimeStamp() ); testCaseRunLogTestStep.setHttpStatus( String.valueOf( metrics.getHttpStatus() ) ); testCaseRunLogTestStep.setContentLength( String.valueOf( metrics.getContentLength() ) ); testCaseRunLogTestStep.setReadTime( String.valueOf( metrics.getReadTimer().getDuration() ) ); testCaseRunLogTestStep.setTotalTime( String.valueOf( metrics.getTotalTimer().getDuration() ) ); testCaseRunLogTestStep.setDnsTime( String.valueOf( metrics.getDNSTimer().getDuration() ) ); testCaseRunLogTestStep.setConnectTime( String.valueOf( metrics.getConnectTimer().getDuration() ) ); testCaseRunLogTestStep.setTimeToFirstByte( String.valueOf( metrics.getTimeToFirstByteTimer().getDuration() ) ); } Throwable error = result.getError(); if( error != null ) { testCaseRunLogTestStep.setErrorMessage( error.getMessage() ); } } @Override public void afterRun( TestCaseRunner testRunner, TestCaseRunContext runContext ) { testCaseRunLog.setTestCase( ( testRunner.getTestCase().getName() ) ); testCaseRunLog.setTimeTaken( Long.toString( testRunner.getTimeTaken() ) ); testCaseRunLog.setStatus( testRunner.getStatus().toString() ); final File newFile = new File( outputFolder, REPORT_FILE_NAME ); try { testCaseRunLogDocumentConfig.save( newFile ); } catch( IOException e ) { log.error( "Could not write " + REPORT_FILE_NAME + " to disk " ); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2d4dd97e1e2b107511bc630a9c5a86017b82bfee
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
/src/main/java/com/google/android/gms/vision/Tracker.java
9fd63230da51e4230f3791a8a703d94c147cec56
[]
no_license
redpicasso/fluffy-octo-robot
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
b2b62d7344da65af7e35068f40d6aae0cd0835a6
refs/heads/master
2022-11-15T14:43:37.515136
2020-07-01T22:19:16
2020-07-01T22:19:16
276,492,708
0
0
null
null
null
null
UTF-8
Java
false
false
350
java
package com.google.android.gms.vision; import com.google.android.gms.vision.Detector.Detections; public class Tracker<T> { public void onDone() { } public void onMissing(Detections<T> detections) { } public void onNewItem(int i, T t) { } public void onUpdate(Detections<T> detections, T t) { } }
[ "aaron@goodreturn.org" ]
aaron@goodreturn.org
ae4f608ae19db67b80ba2270a80a449949a0d991
71027e2310f9917cd46ccb6a21c0100487c6b43b
/math/freehep-jminuit/src/test/java/org/freehep/math/minuit/example/tutorial/Quad2F.java
7ae590185bda3d43a0b4d137058d388aca064f82
[]
no_license
kdk-pkg-soft/freehep-ncolor-pdf
f70f99ebdc7a78fc25960f42629e05d3c58f2b03
d317ea43554c75f8ff04e826b4361ad4326574b0
refs/heads/master
2021-01-23T12:18:26.502269
2012-08-22T23:22:21
2012-08-22T23:22:21
5,516,244
1
1
null
null
null
null
UTF-8
Java
false
false
530
java
package org.freehep.math.minuit.example.tutorial; import org.freehep.math.minuit.FCNGradientBase; /** * * @version $Id: Quad2F.java 8584 2006-08-10 23:06:37Z duns $ */ class Quad2F implements FCNGradientBase { public double valueOf(double[] par) { double x = par[0]; double y = par[1]; return x*x + y*y; } public double[] gradient(double[] par) { double x = par[0]; double y = par[1]; double[] result = { 2.*x, 2.*y }; return result; } }
[ "hamad.deshmukh@Kodak.com" ]
hamad.deshmukh@Kodak.com
07c4a16c131806cd92ec49ee5c5f389b3e641c15
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_18278.java
67b3a56799cf2417b4255a0d2f5f86dcb4da35f5
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,799
java
/** * Traverses the layoutTree and the diffTree recursively. If a layoutNode has a compatible host type {@link LayoutState#hostIsCompatible} it assigns the DiffNode to the layout node in orderto try to re-use the LayoutOutputs that will be generated by {@link LayoutState#collectResults(ComponentContext,InternalNode,LayoutState,DiffNode)}. If a layoutNode component returns false when shouldComponentUpdate is called with the DiffNode Component it also tries to re-use the old measurements and therefore marks as valid the cachedMeasures for the whole component subtree. * @param layoutNode the root of the LayoutTree * @param diffNode the root of the diffTree * @return true if the layout node requires updating, false if it can re-use the measurements fromthe diff node. */ static void applyDiffNodeToUnchangedNodes(InternalNode layoutNode,DiffNode diffNode){ try { final boolean isTreeRoot=layoutNode.getParent() == null; if (isLayoutSpecWithSizeSpec(layoutNode.getTailComponent()) && !isTreeRoot) { layoutNode.setDiffNode(diffNode); return; } if (!hostIsCompatible(layoutNode,diffNode)) { return; } layoutNode.setDiffNode(diffNode); final int layoutCount=layoutNode.getChildCount(); final int diffCount=diffNode.getChildCount(); if (layoutCount != 0 && diffCount != 0) { for (int i=0; i < layoutCount && i < diffCount; i++) { applyDiffNodeToUnchangedNodes(layoutNode.getChildAt(i),diffNode.getChildAt(i)); } } else if (!shouldComponentUpdate(layoutNode,diffNode)) { applyDiffNodeToLayoutNode(layoutNode,diffNode); } } catch ( Throwable t) { final Component c=layoutNode.getTailComponent(); if (c != null) { throw new ComponentsChainException(c,t); } throw t; } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
468266835e02c875956dde686f185cd8e653d9af
01e5c3987698ae57d113584836db28c11c028380
/camunda-example-customquery/src/test/java/de/holisticon/camunda/example/customquery/model/OrderEntityRepositoryTest.java
feef1f29dae671b7bdd100065dcd0f40b7227a95
[ "BSD-3-Clause" ]
permissive
akhanit/holunda
090e21862940ddfd5f2e734c20a72faeb9648c32
99f381c735533af9d100a16dde077749a62c58c4
refs/heads/master
2020-04-01T15:30:24.053076
2018-02-15T14:01:23
2018-02-15T14:01:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,874
java
package de.holisticon.camunda.example.customquery.model; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import java.util.stream.Stream; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) @DataJpaTest @SpringBootTest( classes = {OrderEntityRepositoryTest.Config.class}, webEnvironment = SpringBootTest.WebEnvironment.NONE, properties = {"camunda.bpm.enabled=false"} ) public class OrderEntityRepositoryTest { @SpringBootApplication public static class Config{ } @Autowired private TestEntityManager em; @Autowired private OrderRepository repository; @Autowired private BookRepository bookRepository; @Before public void setUp() throws Exception { TestData.create(bookRepository); } @Test public void create_orderEntity() throws Exception { repository.save(OrderEntity.builder() .id("o1") .name("foo") .position(OrderPositionEntity.builder() .id("o1-1") .book(bookRepository.findOne("1")) .build()) .position(OrderPositionEntity.builder() .id("o1-2") .book(bookRepository.findOne("2")) .build()) .position(OrderPositionEntity.builder() .id("o1-3") .book(bookRepository.findOne("4")) .build()) .build()); OrderEntity order = repository.findOne("o1"); assertThat(order.getPositions().get(0).getBook().getPrice()).isEqualTo(40); } }
[ "jan.galinski@holisticon.de" ]
jan.galinski@holisticon.de
aa9478de44bd93466add5db942bd5f2c79910014
62e9dfe335592757954beeba62156e3fdfae2cc2
/java-study-core/src/main/java/com/yee/study/java/netty/channel/HelloClient.java
9482dd5ab12ed8137527ce0880b76d9412e343d5
[]
no_license
rogeryee/JavaStudy
56f2fd1d30f30cf6830410610904e15ee82ce67b
cbbdbb67377a1346490e9cec87d3957f5f0503bb
refs/heads/master
2023-02-09T09:23:02.796092
2023-02-03T07:01:39
2023-02-03T07:01:39
82,032,356
0
0
null
2021-08-13T15:25:19
2017-02-15T07:26:50
Java
UTF-8
Java
false
false
1,583
java
package com.yee.study.java.netty.channel; import io.netty.bootstrap.Bootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; /** * Netty客户端 * 本例展示了如何使用多个OutboundChannelHandler、InboundChannelHandler处理消息 * * @author Roger.Yi */ public class HelloClient { public void connect(String host, int port) throws Exception { EventLoopGroup workerGroup = new NioEventLoopGroup(); try { Bootstrap b = new Bootstrap(); b.group(workerGroup); b.channel(NioSocketChannel.class); b.option(ChannelOption.SO_KEEPALIVE, true); b.handler(new ChannelInitializer<SocketChannel>() { @Override public void initChannel(SocketChannel ch) throws Exception { ch.pipeline().addLast(new HelloClientInboundHandler()); } }); ChannelFuture f = b.connect(host, port).sync(); f.channel().closeFuture().sync(); } finally { workerGroup.shutdownGracefully(); } } public static void main(String[] args) throws Exception { HelloClient client = new HelloClient(); client.connect("127.0.0.1", 8089); } }
[ "roger.yee@hotmail.com" ]
roger.yee@hotmail.com
14384ce431fe649515ac14c932d5559f115fbd4d
818e1c7e00933bf435f6fb24a8daca0b5e9aa786
/security/audit/src/main/java/in/clouthink/nextoa/security/audit/support/impl/AuditEventRestSupportImpl.java
58a7758b1a5b44c58e1cce47269363a2b2e36dd0
[]
no_license
next-teable/next-oa-service
d8ad7e9ff78ae0c2ad4b0de6bf4a33ac736b069a
21a3e1b89db16d12c6033b7727f4fd01ce3d0184
refs/heads/master
2021-06-12T21:13:20.132069
2020-06-07T09:39:14
2020-06-07T09:39:14
254,399,204
0
0
null
2020-06-07T09:39:16
2020-04-09T14:48:21
Java
UTF-8
Java
false
false
1,531
java
package in.clouthink.nextoa.security.audit.support.impl; import in.clouthink.nextoa.bl.model.User; import in.clouthink.nextoa.security.audit.model.AuditEvent; import in.clouthink.nextoa.security.audit.model.AuditEventQueryParameter; import in.clouthink.nextoa.security.audit.service.AuditEventService; import in.clouthink.nextoa.security.audit.support.AuditEventRestSupport; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.stereotype.Service; import java.util.Date; /** */ @Service public class AuditEventRestSupportImpl implements AuditEventRestSupport { @Autowired private AuditEventService auditEventService; @Override public Page<AuditEvent> listAuditEventPage(AuditEventQueryParameter queryRequest) { return auditEventService.findAuditEventPage(queryRequest); } @Override public AuditEvent getAuditEventDetail(String id) { return auditEventService.findById(id); } @Override public void deleteAuditEventsByDay(Date day, User byWho) { if (!"administrator".equals(byWho.getUsername())) { throw new RuntimeException("只有超级管理员能删除用户操作审计数据."); } auditEventService.deleteAuditEventsByDay(day); } @Override public void deleteAuditEventsBeforeDay(Date day, User byWho) { if (!"administrator".equals(byWho.getUsername())) { throw new RuntimeException("只有超级管理员能删除用户操作审计数据."); } auditEventService.deleteAuditEventsBeforeDay(day); } }
[ "melthaw@gmail.com" ]
melthaw@gmail.com
5e5910e739f606cbf7d6691c3eb4b89652aae6ae
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/smallest/c9d718f379a877bd04e4544ee830a1c4c256bb4f104f214afd1ccaf81e7b25dea689895678bb1e6f817d8b0939eb175f8e847130f30a9a22e980d38125933516/000/mutations/159/smallest_c9d718f3_000.java
092ce80c743dca3481b1363802da41a44dcbf952
[]
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,443
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 smallest_c9d718f3_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_c9d718f3_000 mainClass = new smallest_c9d718f3_000 (); 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 { DoubleObj num1 = new DoubleObj (), num2 = new DoubleObj (), num3 = new DoubleObj (), num4 = new DoubleObj (); output += (String.format ("Please enter 4 numbers separated by spaces > ")); num1.value = scanner.nextDouble (); num2.value = scanner.nextDouble (); num3.value = scanner.nextDouble (); num4.value = scanner.nextDouble (); if (num1.value < num2.value && num1.value < num3.value && num1.value < num4.value) { output += (String.format ("%.0f is the smallest\n", num1.value)); } if (num2.value < num1.value && num2.value < num3.value && num2.value < num4.value) { output += (String.format ("%.0f is the smallest\n", num2.value)); } if ((num4.value) < (num4.value) && num3.value < num4.value) { output += (String.format ("%.0f is the smallest\n", num3.value)); } if (num4.value < num1.value && num4.value < num2.value && num4.value < num4.value) { output += (String.format ("%.0f is the smallest\n", num4.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
58a9b5afc44bf6b1f5e1eaffacf5dee338e77fc8
e78d233c910fe87351380f4f483f4fad468ce1aa
/src/main/java/com/swingfrog/summer/meter/protobuf/AbstractMeterProtobufClient.java
94053dc50798c78b470db8f397ab70c45ae6dfaa
[ "Apache-2.0" ]
permissive
SwingFrog/Summer
665f9bacd514dbb77f05fa2800d3ae044dbea612
554af9af5b8f526e2f45bb1ce17a5eff11cbe482
refs/heads/master
2023-06-22T13:34:37.957151
2023-03-16T05:29:57
2023-03-16T05:29:57
160,478,462
568
154
Apache-2.0
2023-06-14T22:29:58
2018-12-05T07:30:01
Java
UTF-8
Java
false
false
7,507
java
package com.swingfrog.summer.meter.protobuf; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Message; import com.swingfrog.summer.meter.MeterClient; import com.swingfrog.summer.protocol.ProtocolConst; import com.swingfrog.summer.protocol.protobuf.Protobuf; import com.swingfrog.summer.protocol.protobuf.ReqProtobufMgr; import com.swingfrog.summer.protocol.protobuf.RespProtobufMgr; import com.swingfrog.summer.protocol.protobuf.proto.CommonProto; import io.netty.channel.Channel; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.Queue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentMap; public abstract class AbstractMeterProtobufClient implements MeterClient { protected final int id; private Channel channel; private int waitRespId; private Callback<? extends Message> waitCallback; private final Queue<WaitSendReq> waitSendReqQueue = new ConcurrentLinkedQueue<>(); private final ConcurrentMap<Integer, Push<? extends Message>> pushMap = new ConcurrentHashMap<>(); private final ConcurrentMap<Integer, Queue<Push<? extends Message>>> oncePushMap = new ConcurrentHashMap<>(); public AbstractMeterProtobufClient(int id) { this.id = id; } @Override public void sendHeartBeat() { CommonProto.HeartBeat_Req_0 req = CommonProto.HeartBeat_Req_0.getDefaultInstance(); write(ProtocolConst.PROTOBUF_HEART_BEAT_REQ_ID, req); } @Override public void close() { channel.close(); } @Override public boolean isActive() { return channel != null && channel.isActive(); } void recv(Protobuf msg) { int messageId = msg.getId(); byte[] bytes = msg.getBytes(); Message messageTemplate = RespProtobufMgr.get().getMessageTemplate(messageId); if (messageTemplate == null) { System.err.println("messageId:" + messageId + " message template not exist"); return; } try { Message message = messageTemplate.getParserForType().parseFrom(bytes); if (messageId == ProtocolConst.PROTOBUF_HEART_BEAT_REQ_ID) { CommonProto.HeartBeat_Resp_0 resp = (CommonProto.HeartBeat_Resp_0) message; heartBeat(resp.getTime()); } else if (messageId == ProtocolConst.PROTOBUF_ERROR_CODE_RESP_ID) { CommonProto.ErrorCode_Resp_1 resp = (CommonProto.ErrorCode_Resp_1) message; if (waitRespId == resp.getReqId()) { waitCallback.failure(resp.getCode(), resp.getMsg()); nextReq(); } } else { if (waitRespId == messageId) { waitCallback.accept(message); } else { Push<? extends Message> push = pushMap.get(messageId); if (push != null) { push.accept(message); } Queue<Push<? extends Message>> pushQueue = oncePushMap.remove(messageId); if (pushQueue != null) { push = pushQueue.poll(); while (push != null) { push.accept(message); push = pushQueue.poll(); } } } } } catch (InvalidProtocolBufferException e) { e.printStackTrace(); } } protected void req(Message message, Callback<? extends Message> callback) { Integer messageId = ReqProtobufMgr.get().getMessageId(message.getClass()); if (messageId == null) { throw new RuntimeException(message.getClass().getSimpleName() + "message id not exist"); } loadRespMessage(callback); if (waitSendReqQueue.isEmpty()) { sendReq(messageId, message, callback); return; } waitSendReqQueue.add(new WaitSendReq(messageId, message, callback)); } private void nextReq() { WaitSendReq waitSendReq = waitSendReqQueue.poll(); if (waitSendReq == null) return; sendReq(waitSendReq.messageId, waitSendReq.message, waitSendReq.callback); } private void sendReq(int messageId, Message message, Callback<? extends Message> callback) { waitRespId = messageId; waitCallback = callback; write(messageId, message); } protected void registerPush(Push<? extends Message> push) { int respId = loadRespMessage(push); pushMap.putIfAbsent(respId, push); } protected void oncePush(Push<? extends Message> push) { int respId = loadRespMessage(push); oncePushMap.computeIfAbsent(respId, (k) -> new ConcurrentLinkedQueue<>()).add(push); } private int loadRespMessage(Object object) { Class<? extends Message> messageClass = parseMessageClass(object); if (messageClass == null) { throw new RuntimeException("can not parse message class"); } Integer respId = RespProtobufMgr.get().getMessageId(messageClass); if (respId == null) { throw new RuntimeException(messageClass.getSimpleName() + "message id not exist"); } return respId; } @SuppressWarnings("unchecked") private Class<? extends Message> parseMessageClass(Object object) { Class<?> clazz = object.getClass(); Type superClass = clazz.getGenericSuperclass(); if (superClass instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) superClass; Type[] typeArgs = parameterizedType.getActualTypeArguments(); if (typeArgs != null && typeArgs.length > 0) { if (typeArgs[0] instanceof Class) { return (Class<? extends Message>) typeArgs[0]; } } } return null; } void write(int messageId, Message message) { if (!isActive()) return; channel.writeAndFlush(Protobuf.of(messageId, message)); } void setChannel(Channel channel) { this.channel = channel; } protected static class WaitSendReq { private final int messageId; private final Message message; private final Callback<? extends Message> callback; public WaitSendReq(int messageId, Message message, Callback<? extends Message> callback) { this.messageId = messageId; this.message = message; this.callback = callback; } } protected static abstract class Callback<T extends Message> { @SuppressWarnings("unchecked") private void accept(Message message) { success((T) message); } protected abstract void success(T resp); protected abstract void failure(long code, String msg); } protected static abstract class Push<T extends Message> { @SuppressWarnings("unchecked") private void accept(Message message) { handle((T) message); } protected abstract void handle(T resp); } protected abstract void online(); protected abstract void offline(); protected void heartBeat(long serverTime) {} protected int msgLength() { return 1024 * 1024 * 10; } }
[ "swingfrog@qq.com" ]
swingfrog@qq.com
d34a66443ae0916b02a2099fa8323af73d612a52
8430cd0a92af431fa85e92a7c5ea20b8efda949f
/Java Advanced/Abstraction-Lab/src/Pr5PascalsTriangle.java
b5d95ae852a1f3bee8b5ef0700bf641c6da0e1e4
[]
no_license
Joret0/Exercises-with-Java
9a93e39236b88bb55335e6cff62d2e774f78b054
a1b2f64aafdf8ce8b28fb20f31aa5e37b9643652
refs/heads/master
2021-09-16T04:28:49.605116
2018-06-16T14:32:52
2018-06-16T14:32:52
71,498,826
0
0
null
null
null
null
UTF-8
Java
false
false
1,071
java
import java.math.BigInteger; import java.util.Scanner; public class Pr5PascalsTriangle { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = Integer.parseInt(in.nextLine()); printPascalsTriangle(n); } private static void printPascalsTriangle(int n) { BigInteger[] previousRow; BigInteger[] currentRow = {BigInteger.ONE}; printArray(currentRow); previousRow = currentRow; for (int i = 2; i <= n; i++) { currentRow = new BigInteger[i]; currentRow[0] = BigInteger.ONE; currentRow[i - 1] = BigInteger.ONE; for (int j = 0; j <= i - 3; j++) { currentRow[j + 1] = previousRow[j].add(previousRow[j + 1]); } printArray(currentRow); previousRow = currentRow; } } private static void printArray(BigInteger[] array) { for (BigInteger anArray : array) { System.out.print(anArray + " "); } System.out.println(); } }
[ "georgi_stalev@abv.bg" ]
georgi_stalev@abv.bg
c2f13a283a0131617517c0e1b238d4b13ba9d867
f43504b11e935796128f07ab166e7d47a248f204
/Low_level_Design_Problems/Leetcode/G4G/src/SystemDesign/ReservationSystem/ReservationManager.java
6368ea4ee5695d6b7350c976da4a26749e6a89bb
[]
no_license
vish35/LLD
4e3b4b6a22e334e1ab69871e5ded526613bb73f8
1d8f209213f74395fc1121a5862ce2a467b09f94
refs/heads/main
2023-07-30T09:10:39.696754
2021-09-15T05:46:45
2021-09-15T05:46:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,097
java
package SystemDesign.ReservationSystem; import java.time.LocalDate; import java.util.*; public class ReservationManager { List<Reservation> reservations; List<Table> tables; Set<Customer> customers; private static ReservationManager instance; private ReservationManager(){ customers = new HashSet<>(); init(); } public ReservationManager getInstance(){ if(instance == null){ instance = new ReservationManager(); } return instance; } private void init(){ reservations = new ArrayList<>(); tables = new ArrayList<>(); // todo: add different types of tables } public void CreateNewProfile(int customerId, String fullName, String contactInfo){ // create profile for new customer } public boolean makeReservation(int customerId, LocalDate reservationTime, String otherRequirements){ Table table = null; for(Table t : tables){ if(t.isAvailable(reservationTime)){ table = t; break; } } if(table != null){ Reservation rsv = new Reservation(customerId, table.tableId, reservationTime, otherRequirements); return true; } return false; } private class Table{ int tableId; int numberOfSeats; TableType type; public Table(int id, int number, TableType type){ this.tableId = id; this.numberOfSeats = number; this.type = type; } public boolean isAvailable(LocalDate reservationTime){ // check if this table is available begin from reserve time, the default duration is 1 hour. return true; } } enum TableType{ Booth, HighTable } } class Reservation{ int reservationId; int customerId; int tableId; LocalDate creationTime; LocalDate reservationTime; String otherRequirements; public Reservation(int customerId, int tableId, LocalDate reservationTime, String otherRequirements){ this.reservationId = reservationId; this.tableId = tableId; this.customerId = customerId; this.reservationTime = reservationTime; this.otherRequirements = otherRequirements; } public void udpateTable() { // to change the table for customer } public void updateTime(){ // update the reservation time } public void updateRequirements(){ // update the requirements } } class Customer{ private int customerId; private String fullName; private String telephoneNumber; public Customer(int id, String name, String telePhoneNumber){ this.customerId = id; this.fullName = name; this.telephoneNumber = telePhoneNumber; } public int getId(){ return this.customerId; } public String getName(){ return this.fullName; } public String getTeleNumber(){ return this.telephoneNumber; } // update methods }
[ "gowtkum@amazon.com" ]
gowtkum@amazon.com
da22d28838bbd6b3566918eaffd034afa538df76
3c0e519e400526379df16320ef53bd3b1f18af5d
/routing-bird-server/src/main/java/com/jivesoftware/os/routing/bird/endpoints/logging/metric/LogMetricRestfulEndpoints.java
f2482f18bc0489c51019708a27c4a33d36c0575b
[ "Apache-2.0" ]
permissive
jivesoftware/routing-bird
1aee04b569af434951602873f26aa987cf899c04
c55049f30de272b3995e2e112696991e8e10c331
refs/heads/master
2020-05-21T23:44:33.383246
2018-02-05T23:07:13
2018-02-05T23:07:13
37,302,101
2
2
null
2017-05-07T16:02:09
2015-06-12T04:32:52
Java
UTF-8
Java
false
false
5,549
java
/* * Copyright 2013 Jive Software, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.jivesoftware.os.routing.bird.endpoints.logging.metric; import com.google.inject.Singleton; import com.jivesoftware.os.mlogger.core.Counter; import com.jivesoftware.os.mlogger.core.CountersAndTimers; import com.jivesoftware.os.mlogger.core.LoggerSummary; import com.jivesoftware.os.mlogger.core.TenantMetricStream; import com.jivesoftware.os.routing.bird.endpoints.logging.metric.LoggerMetrics.MetricsStream; import com.jivesoftware.os.routing.bird.shared.ResponseHelper; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map.Entry; import javax.ws.rs.DefaultValue; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; @Singleton @Path("/logging/metric") public class LogMetricRestfulEndpoints { @GET @Path("/listTenantMetrics") public Response listTenantCounters(@QueryParam("tenant") @DefaultValue("") String tenant, @QueryParam("callback") @DefaultValue("") String callback) { try { final Metrics metrics = new Metrics(); TenantMetricStream tenantMetricStream = (tenant1, cat) -> { if (cat != null) { for (Entry<String, Counter> c : cat.getCounters()) { metrics.metrics.add(new KeyAndMetric(c.getKey(), c.getValue().getValue())); } } return true; }; Collection<CountersAndTimers> all = CountersAndTimers.getAll(); for (CountersAndTimers a : all) { if (tenant.isEmpty()) { a.streamAllTenantMetrics(tenantMetricStream); } else { a.streamTenantMetrics(tenant, tenantMetricStream); } } if (callback.length() > 0) { return ResponseHelper.INSTANCE.jsonpResponse(callback, metrics); } else { return ResponseHelper.INSTANCE.jsonResponse(metrics); } } catch (Exception ex) { return ResponseHelper.INSTANCE.errorResponse("Failed to list counters.", ex); } } @GET @Path("/listCounters") public Response listCounters(@QueryParam("logger") @DefaultValue("ALL") String loggerName, @QueryParam("callback") @DefaultValue("") String callback) { try { if (loggerName.equals("ALL")) { loggerName = ""; } final Metrics metrics = new Metrics(); MetricsHelper.INSTANCE.getCounters(loggerName).getAll(new MetricsStream() { @Override public void callback(Entry<String, Long> v) throws Exception { if (v != null) { metrics.metrics.add(new KeyAndMetric(v.getKey(), v.getValue())); } } }); if (callback.length() > 0) { return ResponseHelper.INSTANCE.jsonpResponse(callback, metrics); } else { return ResponseHelper.INSTANCE.jsonResponse(metrics); } } catch (Exception ex) { return ResponseHelper.INSTANCE.errorResponse("Failed to list counters.", ex); } } @GET @Path("/listTimers") public Response listTimers(@QueryParam("logger") @DefaultValue("ALL") String loggerName, @QueryParam("callback") @DefaultValue("") String callback) { try { if (loggerName.equals("ALL")) { loggerName = ""; } final Metrics metrics = new Metrics(); MetricsHelper.INSTANCE.getTimers(loggerName).getAll(new MetricsStream() { @Override public void callback(Entry<String, Long> v) throws Exception { if (v != null) { metrics.metrics.add(new KeyAndMetric(v.getKey(), v.getValue())); } } }); if (callback.length() > 0) { return ResponseHelper.INSTANCE.jsonpResponse(callback, metrics); } else { return ResponseHelper.INSTANCE.jsonResponse(metrics); } } catch (Exception ex) { return ResponseHelper.INSTANCE.errorResponse("Failed to list timers.", ex); } } @GET @Path("/resetCounter") public String resetCounter() { CountersAndTimers.resetAll(); LoggerSummary.INSTANCE.reset(); return "counter were reset."; } static class Metrics { public List<KeyAndMetric> metrics = new ArrayList<>(); public Metrics() { } } static class KeyAndMetric { public String key; public double metric; public KeyAndMetric() { } public KeyAndMetric(String key, double metric) { this.key = key; this.metric = metric; } } }
[ "jonathan.colt@jivesoftware.com" ]
jonathan.colt@jivesoftware.com
8ab8e1835abd2458a611eddb69a113f4ae4e4eab
0ba73ffd4c12ef4c49674ce512ab12fbbb6227ea
/Java-Brains/Java-8-Java-Brains/Unit-1-Using-Lambdas/src/main/java/com/jurik99/TypeInferenceExample.java
3e998eebcc8b29f086173291977f592ccc488b50
[]
no_license
patrykgrudzien/code-from-learning
e5d6958baf3a44e3fc709f06837bad025b1db5df
382904b804afd95d9e5d450f61d2529415ddfe96
refs/heads/master
2021-07-05T08:41:22.267369
2020-01-13T10:37:25
2020-01-13T10:37:25
188,905,995
0
0
null
2020-10-13T13:30:12
2019-05-27T20:34:47
Java
UTF-8
Java
false
false
507
java
package com.jurik99; public class TypeInferenceExample { public static void main(final String[] args) { final StringLengthLambda myLambda = s -> s.length(); System.out.println(myLambda.getLength("Patryk")); // --- pass lambda into method --- printLambda(p -> p.length()); } private static void printLambda(final StringLengthLambda lambda) { System.out.println("Length: " + lambda.getLength("Patryk Hello Lambda")); } interface StringLengthLambda { int getLength(final String s); } }
[ "patryk.grudzien.91@gmail.com" ]
patryk.grudzien.91@gmail.com
04c256ce32768673bd74ca8e14fa6442385441df
50508d647ce6354c0a94a4b947606a0560527dbb
/Android-Everything-Test/libs/android-core/src/processing/android/PWallpaper.java
cdaab7163ab64e40c8f79b36471e6d64cdb05904
[]
no_license
codeanticode/processing-android-tests
cd05fb5dfdd4dbd1274a275ed706174cbe9a3b07
2d7f7afe712fda8b0ba64b2a78dab80d8c5a9f85
refs/heads/master
2021-01-21T11:44:55.799300
2016-05-18T03:07:24
2016-05-18T03:07:24
53,297,634
0
0
null
null
null
null
UTF-8
Java
false
false
5,905
java
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* Part of the Processing project - http://processing.org Copyright (c) 2016 The Processing Foundation This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package processing.android; import android.service.wallpaper.WallpaperService; import android.util.DisplayMetrics; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.WindowManager; import processing.core.PApplet; import android.util.Log; import android.os.Build; import android.view.WindowManager; import android.view.Display; import android.graphics.Point; public class PWallpaper extends WallpaperService implements AppComponent { String TAG = "PWallpaper"; private Point size; private DisplayMetrics metrics; private PEngine engine; public PWallpaper() { } public PWallpaper(PApplet sketch) { } public void initDimensions() { // metrics = new DisplayMetrics(); // getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics); // display.getRealMetrics(metrics); // API 17 or higher // display.getRealSize(size); // display.getMetrics(metrics); size = new Point(); WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); if (Build.VERSION.SDK_INT >= 17) { display.getRealSize(size); } else if (Build.VERSION.SDK_INT >= 14) { // Use undocumented methods getRawWidth, getRawHeight try { size.x = (Integer) Display.class.getMethod("getRawWidth").invoke(display); size.y = (Integer) Display.class.getMethod("getRawHeight").invoke(display); } catch (Exception e) { display.getSize(size); } } } public int getKind() { return WALLPAPER; } public int getWidth() { return size.x; // return metrics.widthPixels; } public int getHeight() { return size.y; // return metrics.heightPixels; } public void setSketch(PApplet sketch) { engine.sketch = sketch; } public PApplet createSketch() { return new PApplet(); } public void requestDraw() { } public boolean canDraw() { return true; } @Override public Engine onCreateEngine() { engine = new PEngine(); return engine; } public class PEngine extends Engine { private PApplet sketch = null; @Override public void onCreate(SurfaceHolder surfaceHolder) { super.onCreate(surfaceHolder); sketch = createSketch(); if (sketch != null) { sketch.initSurface(PWallpaper.this, getSurfaceHolder()); sketch.startSurface(); // By default we don't get touch events, so enable them. setTouchEventsEnabled(true); } } @Override public void onSurfaceCreated(SurfaceHolder surfaceHolder) { super.onSurfaceCreated(surfaceHolder); Log.d(TAG, "onSurfaceCreated()"); } @Override public void onSurfaceChanged(final SurfaceHolder holder, final int format, final int width, final int height) { super.onSurfaceChanged(holder, format, width, height); Log.d(TAG, "onSurfaceChanged()"); if (sketch != null) { sketch.g.setSize(width, height); } } @Override public void onVisibilityChanged(boolean visible) { // if (LoggerConfig.ON) { // Log.d(TAG, "onVisibilityChanged(" + visible + ")"); // } // super.onVisibilityChanged(visible); if (sketch != null) { if (visible) { sketch.onResume(); } else { sketch.onPause(); } } } /* * Store the position of the touch event so we can use it for drawing * later */ @Override public void onTouchEvent(MotionEvent event) { if (sketch != null) { sketch.surfaceTouchEvent(event); } super.onTouchEvent(event); } @Override public void onOffsetsChanged(float xOffset, float yOffset, float xStep, float yStep, int xPixels, int yPixels) { sketch.offsetX = xOffset; sketch.offsetY = yOffset; } @Override public void onSurfaceDestroyed(SurfaceHolder holder) { // This is called immediately before a surface is being destroyed. After returning from this // call, you should no longer try to access this surface. If you have a rendering thread that // directly accesses the surface, you must ensure that thread is no longer touching the // Surface before returning from this function. /* PApplet sketchToDestroy = null; if (deadSketch != null) { sketchToDestroy = deadSketch; } else { handler.removeCallbacks(drawRunnable); System.out.println("Removed handler draw callback!!!!!!!!!!!!!!!!"); sketchToDestroy = sketch; } if (sketchToDestroy != null) { System.out.println("Pausing sketch on surface destroy " + sketchToDestroy); sketchToDestroy.onPause(); } */ } @Override public void onDestroy() { // Called right before the engine is going away. // if (LoggerConfig.ON) { // Log.d(TAG, "onDestroy()"); // } // super.onDestroy(); sketch.onDestroy(); } } }
[ "andres.colubri@gmail.com" ]
andres.colubri@gmail.com
df58dd42459de931b09f195978c6d42ec83d75ea
e477d07753060cc8fb4c588d6d116617f73307ba
/gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/client/ser/UUIDJsonSerializer.java
6ffa76ab61377600d3298be9e4592dee4e5c4cec
[ "Apache-2.0" ]
permissive
StefanWokusch/gwt-jackson
4a669dc687ff6a9470e6931e056bc926251b51a3
669c06677b683868ae42e01e2a165d561c0c44a1
refs/heads/master
2021-01-20T05:40:48.993909
2014-11-23T14:24:11
2014-11-23T14:24:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,609
java
/* * Copyright 2013 Nicolas Morel * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.github.nmorel.gwtjackson.client.ser; import javax.annotation.Nonnull; import java.util.UUID; import com.github.nmorel.gwtjackson.client.JsonSerializationContext; import com.github.nmorel.gwtjackson.client.JsonSerializer; import com.github.nmorel.gwtjackson.client.JsonSerializerParameters; import com.github.nmorel.gwtjackson.client.stream.JsonWriter; /** * Default {@link JsonSerializer} implementation for {@link UUID}. * * @author Nicolas Morel */ public class UUIDJsonSerializer extends JsonSerializer<UUID> { private static final UUIDJsonSerializer INSTANCE = new UUIDJsonSerializer(); /** * @return an instance of {@link UUIDJsonSerializer} */ public static UUIDJsonSerializer getInstance() { return INSTANCE; } private UUIDJsonSerializer() { } @Override public void doSerialize( JsonWriter writer, @Nonnull UUID value, JsonSerializationContext ctx, JsonSerializerParameters params ) { writer.value( value.toString() ); } }
[ "nmr.morel@gmail.com" ]
nmr.morel@gmail.com
ad1a675cafff3a1d74b1bb425786e1d4faaaf7a8
9d32980f5989cd4c55cea498af5d6a413e08b7a2
/A92s_10_0_0/src/main/java/org/apache/http/conn/BasicManagedEntity.java
3d6677311c79adaafa1fbe33df4268b3990372d3
[]
no_license
liuhaosource/OppoFramework
e7cc3bcd16958f809eec624b9921043cde30c831
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
refs/heads/master
2023-06-03T23:06:17.572407
2020-11-30T08:40:07
2020-11-30T08:40:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,224
java
package org.apache.http.conn; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.apache.http.HttpEntity; import org.apache.http.entity.HttpEntityWrapper; @Deprecated public class BasicManagedEntity extends HttpEntityWrapper implements ConnectionReleaseTrigger, EofSensorWatcher { protected final boolean attemptReuse; protected ManagedClientConnection managedConn; public BasicManagedEntity(HttpEntity entity, ManagedClientConnection conn, boolean reuse) { super(entity); if (conn != null) { this.managedConn = conn; this.attemptReuse = reuse; return; } throw new IllegalArgumentException("Connection may not be null."); } @Override // org.apache.http.HttpEntity, org.apache.http.entity.HttpEntityWrapper public boolean isRepeatable() { return false; } @Override // org.apache.http.HttpEntity, org.apache.http.entity.HttpEntityWrapper public InputStream getContent() throws IOException { return new EofSensorInputStream(this.wrappedEntity.getContent(), this); } @Override // org.apache.http.HttpEntity, org.apache.http.entity.HttpEntityWrapper public void consumeContent() throws IOException { if (this.managedConn != null) { try { if (this.attemptReuse) { this.wrappedEntity.consumeContent(); this.managedConn.markReusable(); } } finally { releaseManagedConnection(); } } } @Override // org.apache.http.HttpEntity, org.apache.http.entity.HttpEntityWrapper public void writeTo(OutputStream outstream) throws IOException { super.writeTo(outstream); consumeContent(); } @Override // org.apache.http.conn.ConnectionReleaseTrigger public void releaseConnection() throws IOException { consumeContent(); } @Override // org.apache.http.conn.ConnectionReleaseTrigger public void abortConnection() throws IOException { ManagedClientConnection managedClientConnection = this.managedConn; if (managedClientConnection != null) { try { managedClientConnection.abortConnection(); } finally { this.managedConn = null; } } } /* JADX INFO: finally extract failed */ @Override // org.apache.http.conn.EofSensorWatcher public boolean eofDetected(InputStream wrapped) throws IOException { try { if (this.attemptReuse && this.managedConn != null) { wrapped.close(); this.managedConn.markReusable(); } releaseManagedConnection(); return false; } catch (Throwable th) { releaseManagedConnection(); throw th; } } /* JADX INFO: finally extract failed */ @Override // org.apache.http.conn.EofSensorWatcher public boolean streamClosed(InputStream wrapped) throws IOException { try { if (this.attemptReuse && this.managedConn != null) { wrapped.close(); this.managedConn.markReusable(); } releaseManagedConnection(); return false; } catch (Throwable th) { releaseManagedConnection(); throw th; } } @Override // org.apache.http.conn.EofSensorWatcher public boolean streamAbort(InputStream wrapped) throws IOException { ManagedClientConnection managedClientConnection = this.managedConn; if (managedClientConnection == null) { return false; } managedClientConnection.abortConnection(); return false; } /* access modifiers changed from: protected */ public void releaseManagedConnection() throws IOException { ManagedClientConnection managedClientConnection = this.managedConn; if (managedClientConnection != null) { try { managedClientConnection.releaseConnection(); } finally { this.managedConn = null; } } } }
[ "dstmath@163.com" ]
dstmath@163.com
96dd1cd971dd843c13da91feb2243b593e358d95
b60da22bc192211b3978764e63af23e2e24081f5
/cdc/build/linux-x86-generic/specjvm98/java_bak/org/apache/xml/utils/res/XResources_ja_JP_I.java
ffcbd79037f15001ce613c1326c55e5f6735f707
[]
no_license
clamp03/JavaAOTC
44d566927c057c013538ab51e086c42c6348554e
0ade633837ed9698cd74a3f6928ebde3d96bd3e3
refs/heads/master
2021-01-01T19:33:51.612033
2014-12-02T14:29:58
2014-12-02T14:29:58
27,435,591
5
4
null
null
null
null
UTF-8
Java
false
false
5,445
java
/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Xalan" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation and was * originally based on software copyright (c) 1999, Lotus * Development Corporation., http://www.lotus.com. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.xml.utils.res; import org.apache.xml.utils.res.XResourceBundle; import java.util.*; // // LangResources_en.properties // /** * <meta name="usage" content="internal"/> * The Japanese (Katakana) resource bundle. */ public class XResources_ja_JP_I extends XResourceBundle { /** * Get the association table for this resource. * * * @return the association table for this resource. */ protected Object[][] getContents() { // return a copy of contents; in theory we want a deep clone // of contents, but since it only contains (immutable) Strings, // this shallow copy is sufficient Object[][] msgCopy = new Object[contents.length][2]; for (int i = 0; i < contents.length; i++) { msgCopy[i][0] = contents[i][0]; msgCopy[i][1] = contents[i][1]; } return msgCopy; } /** The association table for this resource. */ static final Object[][] contents = { { "ui_language", "ja" }, { "help_language", "ja" }, { "language", "ja" }, { "alphabet", new char[]{ 0x30a4, 0x30ed, 0x30cf, 0x30cb, 0x30db, 0x30d8, 0x30c8, 0x30c1, 0x30ea, 0x30cc, 0x30eb, 0x30f2, 0x30ef, 0x30ab, 0x30e8, 0x30bf, 0x30ec, 0x30bd, 0x30c4, 0x30cd, 0x30ca, 0x30e9, 0x30e0, 0x30a6, 0x30f0, 0x30ce, 0x30aa, 0x30af, 0x30e4, 0x30de, 0x30b1, 0x30d5, 0x30b3, 0x30a8, 0x30c6, 0x30a2, 0x30b5, 0x30ad, 0x30e6, 0x30e1, 0x30df, 0x30b7, 0x30f1, 0x30d2, 0x30e2, 0x30bb, 0x30b9 } }, { "tradAlphabet", new char[]{ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' } }, //language orientation { "orientation", "LeftToRight" }, //language numbering { "numbering", "multiplicative-additive" }, { "multiplierOrder", "follows" }, // largest numerical value //{"MaxNumericalValue", new Integer(10000000000)}, //These would not be used for EN. Only used for traditional numbering { "numberGroups", new int[]{ 1 } }, //These only used for mutiplicative-additive numbering // Note that we are using longs and that the last two // multipliers are not supported. This is a known limitation. { "multiplier", new long[]{ Long.MAX_VALUE, Long.MAX_VALUE, 100000000, 10000, 1000, 100, 10 } }, { "multiplierChar", new char[]{ 0x4EAC, 0x5146, 0x5104, 0x4E07, 0x5343, 0x767e, 0x5341 } }, // chinese only?? { "zero", new char[0] }, { "digits", new char[]{ 0x4E00, 0x4E8C, 0x4E09, 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D } }, { "tables", new String[]{ "digits" } } }; }
[ "clamp03@gmail.com" ]
clamp03@gmail.com
fa0315adbe77feaab70ceb43da88bda9aff58d4f
03a6c8624d8322201d511bb2ab51e84aa66e0dbd
/component/dubbo-mw/src/test/java/mycodelearn/undergrowth/dubbo/test/DemoServiceImpl.java
d9aa87cf917a7748da62b5ff7c73bb1127fb34a4
[]
no_license
undergrowthlinear/MyCodeLearn
09cc73acccd554a730cbffc2416978006e948c8b
3b16c3e66a43ba23443dcebb723cd37d312f9532
refs/heads/master
2021-01-23T18:22:38.455202
2016-11-13T08:54:57
2016-11-13T08:54:57
59,792,659
0
0
null
null
null
null
UTF-8
Java
false
false
413
java
package mycodelearn.undergrowth.dubbo.test; import java.util.concurrent.atomic.AtomicInteger; public class DemoServiceImpl implements DemoService { private AtomicInteger count = new AtomicInteger(0); @Override public Person sayHello(String name) { // TODO Auto-generated method stub Person person = new Person(); person.setAge(count.incrementAndGet()); person.setName(name); return person; } }
[ "undergrowth@126.com" ]
undergrowth@126.com
60f2d4692e82e6bf5aa6ba7de831e62a1d92fc2c
2c42ff8e677790139f972934d0604ed9baf61930
/JavaIdea/Third_Stage/MavenCRUD/src/main/java/com/cxz/filter/MyFilter.java
0a10d705555cbd27cf2fe0c300b68f018cc0c492
[]
no_license
DukeTiny/education
ee845c0e5b0d171337c6f52052e054379e1ddc1b
8ec8aaec07897ca93d16b08a7ef431beb680eaf3
refs/heads/master
2022-12-25T03:46:06.741009
2019-10-15T17:11:04
2019-10-15T17:11:04
215,351,747
0
0
null
2022-12-16T09:59:04
2019-10-15T16:56:27
TSQL
UTF-8
Java
false
false
443
java
package com.cxz.filter; import javax.servlet.*; import javax.servlet.annotation.WebFilter; import java.io.IOException; public class MyFilter implements Filter { public void destroy() { } public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException { chain.doFilter(req, resp); } public void init(FilterConfig config) throws ServletException { } }
[ "329087464@qq.com" ]
329087464@qq.com
62c476394359c313113f03364f9f2499e3735a59
364bd91497a498b899c1de60e1ff028795eddbbc
/DTJVM/src/main/java/examples/HelloJVM.java
dc6f6dfccba4eef80e38fea74f55d6806945f3b4
[]
no_license
JavaTailor/CFSynthesis
8485f5d94cec335bedfdf18c88ddc523e05a0567
bf9421fea49469fbac554da91169cf07aae3e08c
refs/heads/master
2023-04-15T02:37:04.252151
2021-11-12T09:57:06
2021-11-12T09:57:06
402,928,654
4
1
null
null
null
null
UTF-8
Java
false
false
273
java
package examples; public class HelloJVM { public static void main(String[] args) { if (args.length > 0){ System.out.println("Hello " + args[0] + "!"); }else{ System.out.println("Hello JVM"); } } }
[ "JavaTailorZYQ@gmail.com" ]
JavaTailorZYQ@gmail.com
f6eb51514c8dd146ce6434dd23b746e839d50029
2ad68028b831d8833d5896a5ec2aef9e85e3464d
/src/sorucozumleri_26_temmuz_2021/soru1.java
178f4eb71988ed65dc5c81363afdbb6e308db006
[]
no_license
AydinTokuslu/JAVA
aa9fb49956032a2aed199a2b383a644600b1a3b8
89c3c2c193f787a690fec0553e82ebe159eb537f
refs/heads/master
2023-08-19T08:57:18.569795
2021-09-17T09:08:51
2021-09-17T09:08:51
407,475,612
0
0
null
null
null
null
UTF-8
Java
false
false
1,073
java
package sorucozumleri_26_temmuz_2021; import java.util.Scanner; public class soru1 { public static void main(String[] args) { // kullanıcıdan alınan bir sayinin Armstrong sayi olup olmadigini kontrol eden program yazin // Armstrong sayi rakamlarinin kuplerinin toplamina esit olan sayidir // 153 = (1*1*1) + (5*5*5) + (3*3*3) gibi Scanner scan=new Scanner(System.in); System.out.print("Lutfen Armstrong oldugunu kontrol edeceginiz tamsayiyi yaziniz : "); int sayi =scan.nextInt(); int ilkdeger=sayi;//ildeger atanmaz ise sayi degeri while işlemden sonra değiserek 0 oluyor. int rakam; int kuplerToplami=0; while (sayi!=0) { rakam=sayi%10; sayi/=10; kuplerToplami+=rakam*rakam*rakam; } if (kuplerToplami==ilkdeger) {System.out.println("gayet başarılı, girdiniz sayi amstrong sayidir :)"); } else System.out.println("maalesef giridiginiz sayi, amstrong sayi degildir :( "); } }
[ "eposta@site.com" ]
eposta@site.com
3ddb9b51152e5d6ce6d3a66dcd6273095a63febf
16212d742fc44742105d5bfa08ce025c0955df1c
/fix-dukascopy/src/main/java/quickfix/dukascopy/field/AutoAcceptIndicator.java
64b53d69098d3459fd73e1845b4bbb58b96992ab
[ "Apache-2.0" ]
permissive
WojciechZankowski/fix-dictionaries
83c7ea194f28edbaba2124418fa2ab05ad256114
94b299972ade7597c4b581d752858b873102796e
refs/heads/master
2021-01-19T13:26:18.927116
2017-04-14T22:09:15
2017-04-14T22:09:16
88,088,490
10
2
null
null
null
null
UTF-8
Java
false
false
1,168
java
/* Generated Java Source File */ /******************************************************************************* * Copyright (c) quickfixengine.org All rights reserved. * * This file is part of the QuickFIX FIX Engine * * This file may be distributed under the terms of the quickfixengine.org * license as defined by quickfixengine.org and appearing in the file * LICENSE included in the packaging of this file. * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. * * See http://www.quickfixengine.org/LICENSE for licensing information. * * Contact ask@quickfixengine.org if any conditions of this licensing * are not clear to you. ******************************************************************************/ package quickfix.dukascopy.field; import quickfix.BooleanField; public class AutoAcceptIndicator extends BooleanField { static final long serialVersionUID = 20050617; public static final int FIELD = 754; public AutoAcceptIndicator() { super(754); } public AutoAcceptIndicator(boolean data) { super(754, data); } }
[ "info@zankowski.pl" ]
info@zankowski.pl
f71c482cdf5f39d6dbeb0ced99faead2fd087e9c
32c3e8cc3a1347e81d37195cee74e82329d41b11
/app/src/main/java/todomore/android/TodoContentProvider.java
d4b371edcabc346877bec3749cd618e289cd19b3
[ "BSD-2-Clause" ]
permissive
IanDarwin/TodoAndroid
d3287338a380f8940f7a02e071d068f354ac55a8
a7ef8a7c2334ed2b89e6a15b15c0f4c235915b0d
refs/heads/master
2023-04-08T04:56:08.433954
2023-03-31T16:11:46
2023-03-31T16:11:46
47,377,976
1
0
BSD-2-Clause
2022-10-19T18:16:28
2015-12-04T03:14:15
Java
UTF-8
Java
false
false
1,446
java
package todomore.android; import android.content.ContentProvider; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; /* * This dummy ContentProvider stubs out all methods, but maybe someday we'll implement * a real ContentProvider in this space. Meanwhile, it seems to be needed to have * a working Sync Adapter... * @author http://developer.android.com/training/sync-adapters/creating-stub-provider.html */ public class TodoContentProvider extends ContentProvider { /* * Always return true, indicating that the * provider loaded correctly. */ @Override public boolean onCreate() { return true; } /* * Return no type for MIME type */ @Override public String getType(Uri uri) { return null; } /* * query() always returns no results * */ @Override public Cursor query( Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { return null; } /* * insert() always returns null (no URI) */ @Override public Uri insert(Uri uri, ContentValues values) { return null; } /* * delete() always returns "no rows affected" (0) */ @Override public int delete(Uri uri, String selection, String[] selectionArgs) { return 0; } /* * update() always returns "no rows affected" (0) */ public int update( Uri uri, ContentValues values, String selection, String[] selectionArgs) { return 0; } }
[ "ian@darwinsys.com" ]
ian@darwinsys.com
2f9b2fe44c43ec0fe69d60a601e554201cd8c0e4
6c643f311fc6c1590e903d6202856c942e0468ef
/sample_android/src/com/zsy/frame/sample/control/android/a01ui/a22notification/NiftyNotificationAct.java
fdac39bdfbac3ff4ca039c11a02c5b9f4e6e0205
[]
no_license
sy-and/sample_android
e4d7b664f82caf1170aa14634db562b256e3f046
a4b7193253e69ac4f68b60f6dff1b41513c8a604
refs/heads/main
2023-04-25T00:26:44.691024
2021-05-22T14:26:12
2021-05-22T14:26:12
336,550,278
0
0
null
null
null
null
UTF-8
Java
false
false
2,435
java
package com.zsy.frame.sample.control.android.a01ui.a22notification; import android.app.Activity; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.widget.Toast; import com.gitonway.lee.niftynotification.lib.Configuration; import com.gitonway.lee.niftynotification.lib.Effects; import com.gitonway.lee.niftynotification.lib.NiftyNotificationView; import com.zsy.frame.sample.R; public class NiftyNotificationAct extends Activity { private Effects effect; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_a01ui_a15dialog_niftynotificationeffects); } public void dialogShow(View v) { String msg = "Today we’d like to share a couple of simple styles and effects for android notifications."; switch (v.getId()) { case R.id.scale: effect = Effects.scale; break; case R.id.thumbSlider: effect = Effects.thumbSlider; break; case R.id.jelly: effect = Effects.jelly; break; case R.id.slidein: effect = Effects.slideIn; break; case R.id.flip: effect = Effects.flip; break; case R.id.slideOnTop: effect = Effects.slideOnTop; break; case R.id.standard: effect = Effects.standard; break; } // NiftyNotificationView // .build(this, msg, effect, R.id.mLyout) // .setIcon(R.drawable.ic_launcher) // You must call this method if you use ThumbSlider effect // .setOnClickListener(null) // .show(); // You can configure like this // The default Configuration cfg = new Configuration.Builder().setAnimDuration(700).setDispalyDuration(1500).setBackgroundColor("#FFBDC3C7").setTextColor("#FF444444").setIconBackgroundColor("#FFFFFFFF").setTextPadding(5) // dp .setViewHeight(48) // dp .setTextLines(2) // You had better use setViewHeight and setTextLines together .setTextGravity(Gravity.CENTER) // only text def Gravity.CENTER,contain icon Gravity.CENTER_VERTICAL .build(); NiftyNotificationView.build(this, msg, effect, R.id.mLyout, cfg).setIcon(R.drawable.ic_launcher) // remove this line ,only text .setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { // add your code Toast.makeText(view.getContext(), "niftyNotificaion click me ", Toast.LENGTH_LONG).show(); } }).show(); // show(boolean) allow duplicates } }
[ "shengyouzhang@qq.com" ]
shengyouzhang@qq.com
2c55c6fc45fac6d1ac2d8722128330beb568bba5
6bb92ce979a2065833759cc58c1cfbc93d115070
/domain/src/test/java/org/m4m/domain/dsl/CommandQueueAssert.java
19b0864585030098883ee687efeea8cb39dce5fc
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
daniloercoli/media-for-mobile
ace8fbd29edeb3dd2f0dd96e06e9229ccb06e885
d1fb2538f5af5992159857ac5744759923ef1e6a
refs/heads/master
2021-06-24T21:36:31.148400
2021-02-16T12:45:47
2021-02-16T12:45:47
94,329,893
0
0
Apache-2.0
2020-06-15T10:28:47
2017-06-14T12:44:01
Java
UTF-8
Java
false
false
1,981
java
/* * Copyright 2014-2016 Media for Mobile * * 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.m4m.domain.dsl; import org.m4m.domain.Command; import org.m4m.domain.CommandQueue; import org.m4m.domain.Pair; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertThat; public class CommandQueueAssert { private final CommandQueue queue; public CommandQueueAssert(CommandQueue queue) { this.queue = queue; } public void contains(Command command, int trackId) { assertThat(queue, hasItem(new Pair<Command, Integer>(command, trackId))); } public void equalsTo(Pair<Command, Integer>... expectedCommands) { List<Pair<Command, Integer>> actualCommands = new ArrayList<Pair<Command, Integer>>(); for (Pair<Command, Integer> actualCommand : queue) { actualCommands.add(actualCommand); } assertThat(actualCommands, is(equalTo(Arrays.asList(expectedCommands)))); } public void equalsTo(Command... expectedCommands) { List<Command> actualCommands = new ArrayList<Command>(); for (Pair<Command, Integer> actualCommand : queue) { actualCommands.add(actualCommand.left); } assertThat(actualCommands, is(equalTo(Arrays.asList(expectedCommands)))); } public void isEmpty() { assertThat(queue, emptyIterable()); } }
[ "alexey.suhov@intel.com" ]
alexey.suhov@intel.com
0f8355ab4797c75a760a5978ce204b0f3a149e09
719786b440bda077e4105a1c14a51a2751bca45d
/src/main/java/com.javarush.glushko/level19/lesson10/bonus01/Solution.java
3fad66a60b7b11c31fb91cc49c313d6f81542858
[]
no_license
dase1243/JavaRush
e486e6b135d0ac2ccc615c9b475290fad3bd7f9e
48553f8e5c7c34b9a568c99ae6b14c1358d5858e
refs/heads/master
2021-10-11T11:29:35.327809
2019-01-25T09:09:30
2019-01-25T09:09:30
74,195,817
0
0
null
null
null
null
UTF-8
Java
false
false
5,411
java
package com.javarush.glushko.level19.lesson10.bonus01; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /* Отслеживаем изменения Считать в консоли 2 имени файла - file1, file2. Файлы содержат строки, file2 является обновленной версией file1, часть строк совпадают. Нужно создать объединенную версию строк, записать их в список lines Операции ADDED и REMOVED не могут идти подряд, они всегда разделены SAME Пример: [Файл 1] строка1 строка2 строка3 [Файл 2] строка1 строка3 строка4 [Результат - список lines] SAME строка1 REMOVED строка2 SAME строка3 ADDED строка4 */ public class Solution { public static List<LineItem> lines = new ArrayList<LineItem>(); public static List<String> file1Lines = new ArrayList<String>(); public static List<String> file2Lines = new ArrayList<String>(); public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); BufferedReader file1Reader = new BufferedReader(new FileReader(reader.readLine())); BufferedReader file2Reader = new BufferedReader(new FileReader(reader.readLine())); reader.close(); while (file1Reader.ready()) file1Lines.add(file1Reader.readLine()); file1Reader.close(); while (file2Reader.ready()) file2Lines.add(file2Reader.readLine()); file2Reader.close(); int i1 = 0, i2 = 0; boolean list1Empty = false; boolean list2Empty = false; while (true) { if (i1 >= file1Lines.size()) list1Empty = true; if (i2 >= file2Lines.size()) list2Empty = true; //Only 1st list is empty. if (list1Empty && !list2Empty) { if (lines.get(lines.size() - 1).type.equals(Type.SAME)) { lines.add(new LineItem(Type.ADDED, file2Lines.get(i2))); break; } else return; } //Only 2nd list is empty. if (list2Empty && !list1Empty) { if (lines.get(lines.size() - 1).type.equals(Type.SAME)) { lines.add(new LineItem(Type.REMOVED, file1Lines.get(i1))); break; } else return; } //Both lists are empty. if (list1Empty && list2Empty) break; //if SAME if (file1Lines.get(i1).equals(file2Lines.get(i2))) { lines.add(new LineItem(Type.SAME, file1Lines.get(i1))); if (i1 < file1Lines.size()) i1++; else list1Empty = true; if (i2 < file2Lines.size()) i2++; else list2Empty = true; } //if not SAME else if (!list1Empty && !list2Empty) { //if ADD if ((i2 + 1 < file2Lines.size()) && file1Lines.get(i1).equals(file2Lines.get(i2 + 1))) { lines.add(new LineItem(Type.ADDED, file2Lines.get(i2))); lines.add(new LineItem(Type.SAME, file1Lines.get(i1))); if (i1 < file1Lines.size()) i1++; else list1Empty = true; if (i2 < file2Lines.size()) i2++; else list2Empty = true; if (i2 < file2Lines.size()) i2++; else list2Empty = true; } //if REMOVE else if ((i1 + 1 < file1Lines.size()) && file2Lines.get(i2).equals(file1Lines.get(i1 + 1))) { lines.add(new LineItem(Type.REMOVED, file1Lines.get(i1))); lines.add(new LineItem(Type.SAME, file2Lines.get(i2))); if (i1 < file1Lines.size()) i1++; else list1Empty = true; if (i1 < file1Lines.size()) i1++; else list1Empty = true; if (i2 < file2Lines.size()) i2++; else list2Empty = true; } } } for (LineItem line : lines) System.out.printf("%s %s%n", line.type, line.line); } public static enum Type { ADDED, //добавлена новая строка REMOVED, //удалена строка SAME //без изменений } public static class LineItem { public Type type; public String line; public LineItem(Type type, String line) { this.type = type; this.line = line; } } }
[ "dreiglushko@gmail.com" ]
dreiglushko@gmail.com
a6971703cf7aad4aff0f641a510fe936b139fcf6
a8a7cc6bae2a202941e504aea4356e2a959e5e95
/jenkow-activiti/modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/process/listener/EditModelClickListener.java
f25d5e803765acb3ee84971c96f6409951711814
[ "Apache-2.0" ]
permissive
jenkinsci/jenkow-plugin
aed5d5db786ad260c16cebecf5c6bbbcbf498be5
228748890476b2f17f80b618c8d474a4acf2af8b
refs/heads/master
2023-08-19T23:43:15.544100
2013-05-14T00:49:56
2013-05-14T00:49:56
4,395,961
2
4
null
2022-12-20T22:37:41
2012-05-21T16:58:26
Java
UTF-8
Java
false
false
875
java
package org.activiti.explorer.ui.process.listener; import org.activiti.explorer.ExplorerApp; import org.activiti.explorer.NotificationManager; import com.vaadin.terminal.ExternalResource; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; /** * @author Tijs Rademakers */ public class EditModelClickListener implements ClickListener { private static final long serialVersionUID = 1L; protected NotificationManager notificationManager; protected String modelId; public EditModelClickListener(String modelId) { this.notificationManager = ExplorerApp.get().getNotificationManager(); this.modelId = modelId; } public void buttonClick(ClickEvent event) { ExplorerApp.get().getMainWindow().open(new ExternalResource( ExplorerApp.get().getURL().toString() + "service/editor?id=" + modelId)); } }
[ "m2spring@springdot.org" ]
m2spring@springdot.org
2abd95db29cd5be99f31d6d1cec0096e3394415c
fbf44ff3348391045ae588f6308dd1d3ca9e2061
/bootstrap-core/src/main/java/com/gb/apm/bootstrap/core/interceptor/AroundInterceptor4.java
3b015451f3fd71d54868ed71ed83550ad16cdb22
[]
no_license
ayumiono/gbapm-agent
428488ffaa3aa25f4992d5381c80aed7f1cd0904
36b205b10981cfafb2a5706a44be89336cb697b1
refs/heads/master
2020-05-02T14:01:06.965399
2019-03-27T13:27:56
2019-03-27T13:27:56
177,998,864
2
3
null
null
null
null
UTF-8
Java
false
false
347
java
package com.gb.apm.bootstrap.core.interceptor; /** * @author Jongho Moon * */ public interface AroundInterceptor4 extends Interceptor { void before(Object target, Object arg0, Object arg1, Object arg2, Object arg3); void after(Object target, Object arg0, Object arg1, Object arg2, Object arg3, Object result, Throwable throwable); }
[ "xuelong.chen@goodbaby.com" ]
xuelong.chen@goodbaby.com
d8177b9a7774dc413825cabda49814cdcf3a87d8
7af9a322cbbab1eac9c70ade4b1be266c3392665
/src/main/java/week15d02/Quiz.java
f1882b6263bc7f616df76538ec7fc4ef13b2c5a1
[]
no_license
henimia/training-solutions
3ac8335120f5fa0b8979997bb29933a0683ded12
6fdbfd49baac584266b86c9dc35a9f6a7d1826eb
refs/heads/master
2023-03-25T04:25:14.148219
2021-03-16T10:01:15
2021-03-16T10:01:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,551
java
package week15d02; import java.io.BufferedReader; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.*; public class Quiz { private final List<Question> questions = new ArrayList<>(); public List<Question> getQuestions() { return questions; } public void readFile(BufferedReader reader) throws IOException { String line; while((line = reader.readLine()) != null){ String secondLine = reader.readLine(); String[] arr = secondLine.split(" "); String answer = arr[0]; int point = Integer.parseInt(arr[1]); String theme = arr[2]; questions.add(new Question(line, answer, point, theme)); } } public List<String> getQuestionsByTheme(String theme){ List<String> results = new ArrayList<>(); for(Question item : questions) { if(item.getTheme().equals(theme)){ results.add(item.getQuestion()); } }return results; } public Question randomQuestion(Random rnd){ int index = rnd.nextInt(questions.size()); return questions.get(index); } public Map<String,List<Question>> getAllQuestionsByTheme(){ Map<String,List<Question>> result = new HashMap<>(); for(Question item : questions) { if(!result.containsKey(item.getTheme())){ result.put(item.getTheme(), new ArrayList<>()); } result.get(item.getTheme()).add(item); } return result; } public String getTopTheme(){ Map<String, List<Question>> toProcess = getAllQuestionsByTheme(); String name = null; int count = 0; for (String item : toProcess.keySet()) { int sum = countPoints(item); if (sum > count) { count = sum; name = item; } } return name; } private int countPoints(String key) { Map<String, List<Question>> toProcess = getAllQuestionsByTheme(); int sum = 0; for (Question q : toProcess.get(key)) { sum += q.getPoint(); } return sum; } public static void main(String[] args) { Path path = Path.of("src/main/resources/kerdesek.txt"); try (BufferedReader reader = Files.newBufferedReader(path)) { } catch (IOException e) { throw new IllegalStateException("Can not read file",e); } } }
[ "66733574+manikola@users.noreply.github.com" ]
66733574+manikola@users.noreply.github.com
59422d2d4d0c21074924fdd001ee12a6c6ae60fb
b1744cdbd9ca5322077cdb399512a8f133718c8d
/trunk/LianLuoMms/src/com/haolianluo/sms2/data/HSmsApplication.java
9964c56e441ce68db8b257a32dd718676e4e8ed8
[]
no_license
BGCX067/familymanage-svn-to-git
420ba08d980cab57b248c90322b8dd993d5329ca
2611c822a6432975f013d9cf5688e399fd168a5c
refs/heads/master
2021-01-13T00:56:41.329897
2015-12-28T14:20:13
2015-12-28T14:20:13
48,840,431
0
0
null
null
null
null
UTF-8
Java
false
false
499
java
package com.haolianluo.sms2.data; import java.util.ArrayList; import java.util.List; import android.app.Application; import com.haolianluo.sms2.model.HSms; import com.haolianluo.sms2.ui.sms2.HThreadAdapter; /** * 数据共享 * @author jianhua 2011年11月15日18:36:32 */ public class HSmsApplication extends Application { public HThreadAdapter adapter = null; /** * 收到短信临时存储list */ public List<HSms> list = new ArrayList<HSms>(); }
[ "you@example.com" ]
you@example.com
74ef85ab43ce4e172901ab8abb6bec61aa8441b2
30539b4485cefbe1ffc6823634495a3126cc8af4
/src/test/java/com/mike/warmke/ArchTest.java
c325b25adbcfd7fba85de4d5213ec315816f6d31
[]
no_license
MichaelWarmke/jhipster-sample-application-mono
267d184cfdc345225efd167218fc2cdb0a2cdadb
d824d6978e5e3108506860852d808a2f95a96123
refs/heads/master
2022-11-18T22:27:37.983940
2020-06-13T00:24:09
2020-06-13T00:24:09
271,913,084
0
0
null
2020-07-21T03:12:56
2020-06-13T00:23:53
Java
UTF-8
Java
false
false
1,012
java
package com.mike.warmke; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; import com.tngtech.archunit.core.domain.JavaClasses; import com.tngtech.archunit.core.importer.ClassFileImporter; import com.tngtech.archunit.core.importer.ImportOption; import org.junit.jupiter.api.Test; class ArchTest { @Test void servicesAndRepositoriesShouldNotDependOnWebLayer() { JavaClasses importedClasses = new ClassFileImporter() .withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_TESTS) .importPackages("com.mike.warmke"); noClasses() .that() .resideInAnyPackage("com.mike.warmke.service..") .or() .resideInAnyPackage("com.mike.warmke.repository..") .should() .dependOnClassesThat() .resideInAnyPackage("..com.mike.warmke.web..") .because("Services and repositories should not depend on web layer") .check(importedClasses); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
1ba4c69b6911851a919765cd36b2a7b562e131f5
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE23_Relative_Path_Traversal/CWE23_Relative_Path_Traversal__console_readLine_52c.java
5dd2ad0f1b4236ed30dd92c73667cd909a370166
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
6,283
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE23_Relative_Path_Traversal__console_readLine_52c.java Label Definition File: CWE23_Relative_Path_Traversal.label.xml Template File: sources-sink-52c.tmpl.java */ /* * @description * CWE: 23 Relative Path Traversal * BadSource: console_readLine Read data from the console using readLine() * GoodSource: A hardcoded string * Sinks: readFile * BadSink : no validation * Flow Variant: 52 Data flow: data passed as an argument from one method to another to another in three different classes in the same package * * */ package testcases.CWE23_Relative_Path_Traversal; import testcasesupport.*; import java.io.*; import javax.servlet.http.*; import java.util.logging.Level; public class CWE23_Relative_Path_Traversal__console_readLine_52c { public void badSink(String data ) throws Throwable { String root; if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0) { /* running on Windows */ root = "C:\\uploads\\"; } else { /* running on non-Windows */ root = "/home/user/uploads/"; } if (data != null) { /* POTENTIAL FLAW: no validation of concatenated value */ File file = new File(root + data); FileInputStream streamFileInputSink = null; InputStreamReader readerInputStreamSink = null; BufferedReader readerBufferdSink = null; if (file.exists() && file.isFile()) { try { streamFileInputSink = new FileInputStream(file); readerInputStreamSink = new InputStreamReader(streamFileInputSink, "UTF-8"); readerBufferdSink = new BufferedReader(readerInputStreamSink); IO.writeLine(readerBufferdSink.readLine()); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* Close stream reading objects */ try { if (readerBufferdSink != null) { readerBufferdSink.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStreamSink != null) { readerInputStreamSink.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } try { if (streamFileInputSink != null) { streamFileInputSink.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } } } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(String data ) throws Throwable { String root; if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0) { /* running on Windows */ root = "C:\\uploads\\"; } else { /* running on non-Windows */ root = "/home/user/uploads/"; } if (data != null) { /* POTENTIAL FLAW: no validation of concatenated value */ File file = new File(root + data); FileInputStream streamFileInputSink = null; InputStreamReader readerInputStreamSink = null; BufferedReader readerBufferdSink = null; if (file.exists() && file.isFile()) { try { streamFileInputSink = new FileInputStream(file); readerInputStreamSink = new InputStreamReader(streamFileInputSink, "UTF-8"); readerBufferdSink = new BufferedReader(readerInputStreamSink); IO.writeLine(readerBufferdSink.readLine()); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* Close stream reading objects */ try { if (readerBufferdSink != null) { readerBufferdSink.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStreamSink != null) { readerInputStreamSink.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } try { if (streamFileInputSink != null) { streamFileInputSink.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } } } }
[ "you@example.com" ]
you@example.com
f4365f60faa5b2a17dfc7e5c0c1f895b4c675e0a
0729fc619f79c80567d7934c8379eb67b3ddd096
/jpos-common/src/main/java/ir/navaco/mcb/credit/card/parser/functionalInterface/CheckedFunction.java
0661a8d63ada8122084c9be2aaead42cb3a04389
[]
no_license
sarriaroman/jpos-server
25b872ba31de22a87b28d6c23f482f2ec36b81b3
2499780c0b15cdf9c02453686748a98fe523314a
refs/heads/master
2021-05-21T06:21:56.583455
2019-11-19T14:41:48
2019-11-19T14:41:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
package ir.navaco.mcb.credit.card.parser.functionalInterface; import ir.navaco.mcb.credit.card.parser.exception.IllegalAmountException; import ir.navaco.mcb.credit.card.parser.exception.IllegalCurrencyException; import org.jpos.iso.ISOException; import java.text.ParseException; /** * Standard Function (functional interface) with Exceptions * @author sa.gholizadeh <sa.gholizadeh@navaco.ir> * @author a.khatamidoost <alireza.khtm@gmail.com> */ @FunctionalInterface public interface CheckedFunction<T, R>{ R apply(T t) throws NumberFormatException, ParseException, IllegalAmountException, IllegalCurrencyException, ISOException;; }
[ "alireza.khtm@gmail.com" ]
alireza.khtm@gmail.com
2b8254d94020eb799a7b904d306d9a03db75658a
64557b31271afdc9511bff7799d178e9ae40410d
/subjects/src/main/java/com/wktx/www/subjects/ui/view/mine/resume/IWorksDetailsView.java
622b4e112db985c323d9abfdfc92910466c18feb
[]
no_license
yyj1204/junchenlun
d62e79f7e7773301b2798fc28eada3660ef0ee03
d4670b1c0702f25817bfe86649f199de3e0e8845
refs/heads/master
2020-04-08T01:24:13.675127
2018-11-24T01:34:56
2018-11-24T01:36:49
158,893,389
0
0
null
null
null
null
UTF-8
Java
false
false
1,413
java
package com.wktx.www.subjects.ui.view.mine.resume; import com.wktx.www.subjects.apiresult.mine.works.WorksDetailsInfoData; import com.wktx.www.subjects.apiresult.mine.works.condition.WorksConditionInfoData; import com.wktx.www.subjects.ui.view.IView; import java.util.ArrayList; /** * Created by yyj on 2018/1/15. * 我的作品 --- 作品详情(增删改) */ public interface IWorksDetailsView extends IView<WorksDetailsInfoData> { /** * 获取作品标题 */ String getWorksTitle(); /** * 获取类目id */ String getCategoryIds(); /** * 获取设计类型id */ String getDesignPatternId(); /** * 获取作品封面图片url */ String getCoverImgUrl(); /** * 获取作品简介 */ String getIntro(); /** * 获取多张作品图片 */ ArrayList<String> getWorksImgUrls(); /** * 获取参数(类目、设计类型)成功回调 */ void onGetConditionSuccess(WorksConditionInfoData result); /** * 获取参数(类目、设计类型)失败回调 */ void onGetConditionFailure(String result); /** * 获取图片路径是否成功的回调 */ void onGetImgUrlResult(boolean isSuccess, String result); /** * 获取编辑作品是否成功的回调 */ void onChangeWorksResult(boolean isSuccess, String result); }
[ "1036303629@qq.com" ]
1036303629@qq.com
a0b48a56bd5d305746325e10b6184bb16fe02fc4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_e91ae749732fa9df26bebe0d9b36ade501b45ff4/ESBExampleTest/2_e91ae749732fa9df26bebe0d9b36ade501b45ff4_ESBExampleTest_t.java
32609591c35bcdb4e9c3aa9c04b0d2d0ec56a48a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,321
java
package org.jboss.tools.esb.ui.bot.tests.examples; import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor; import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu; import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; import org.jboss.tools.ui.bot.ext.ExampleTest; import org.jboss.tools.ui.bot.ext.SWTEclipseExt; import org.jboss.tools.ui.bot.ext.Timing; import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper; import org.jboss.tools.ui.bot.ext.types.IDELabel; import org.jboss.tools.ui.bot.ext.view.ProblemsView; public class ESBExampleTest extends ExampleTest{ @Override public String getExampleCategory() { return getRunningSoaVersionTreeLabel(); } /** * called after example projects are imported, by default fixes both example project references and (if defined) client example references */ @Override protected void postImport() { fixExampleLibs(); if (getExampleClientProjectName()!=null) { fixExampleClientLibs(); } openESBConfig(); assertProblemsView(); } /** * opens up ESB config file contained in example project in ESB Editor */ protected void openESBConfig() { String[] config = {getExampleProjectName(),"esbcontent","META-INF","jboss-esb.xml"}; assertTrue("ESB config file does not exist",projectExplorer.existsResource(config)); SWTBotEditor editor = projectExplorer.openFile(getExampleProjectName(), "esbcontent","META-INF","jboss-esb.xml"); assertNotNull("No editor was opened", editor); assertEquals("Wrong editor was opened", "jboss-esb.xml", editor.getTitle()); editor.close(); } /** * executes (deploys) example project */ @Override protected void executeExample() { super.executeExample(); packageExplorer.runOnServer(getExampleProjectName()); util.waitForNonIgnoredJobs(); } /** * executes given class in given project (path must include project name) * @param path clientClass as could be seen in package explorer (e.g src, org.jboss.tools.test.Class.java) * @return string in server log console that was appended or null if nothing appended */ protected String executeClientGetServerOutput(String... clientClass) { String text = console.getConsoleText(); SWTBotTreeItem jmsCall = SWTEclipseExt.selectTreeLocation(packageExplorer.show().bot(),clientClass); eclipse.runTreeItemAsJavaApplication(jmsCall); bot.sleep(Timing.time5S()); console.switchConsole(configuredState.getServer().name); String text2 = console.getConsoleText(TIME_5S, TIME_20S, false); if (text.length()>=text2.length()) { return null; } return text2.substring(text.length()); } /** * executes given class in given project (path must include project name) * @param path clientClass as could be seen in package explorer (e.g src, org.jboss.tools.test.Class.java) * @return string in log console that was appended */ protected String executeClient(String... clientClass) { SWTBotTreeItem jmsCall = SWTEclipseExt.selectTreeLocation(packageExplorer.show().bot(),clientClass); eclipse.runTreeItemAsJavaApplication(jmsCall); bot.sleep(Timing.time5S()); String text = console.getConsoleText(TIME_5S, TIME_20S, false); console.switchConsole(configuredState.getServer().name); // switch console back for sure return text; } /** * executes given class in given project (path must include project name) * @param className full name of class to run * @param arguments arguments that should be passed to classes main method (can be null) * @return string in server log that was appended or null if nothing appended */ protected String executeClientGetServerOutput(String className, String arguments) { String text = console.getConsoleText(); eclipse.runJavaApplication(getExampleClientProjectName(), className, arguments); bot.sleep(Timing.time5S()); console.switchConsole(configuredState.getServer().name); String text2 = console.getConsoleText(TIME_5S, TIME_20S, false); if (text.length()>=text2.length()) { return null; } return text2.substring(text.length()); } protected void fixJREToWorkspaceDefault(String project) { SWTBotTree tree = projectExplorer.show().bot().tree(); SWTBotTreeItem proj = tree.select(project).getTreeItem(project); for (SWTBotTreeItem item : proj.getItems()) { if (item.getText().startsWith("JRE System")) { ContextMenuHelper.prepareTreeItemForContextMenu(tree, item); new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.PROPERTIES, false)).click(); SWTBotShell shell = bot.activeShell(); shell.bot().radio(2).click(); open.finish(shell.bot(),IDELabel.Button.OK); break; } } } protected void fixExampleLibs() { fixLibrary(getExampleProjectName(),"Server Library"); fixLibrary(getExampleProjectName(),"JBoss ESB Runtime"); util.waitForNonIgnoredJobs(); } protected void fixExampleClientLibs() { fixLibrary(getExampleClientProjectName(),"Server Library"); fixLibrary(getExampleClientProjectName(),"JBoss ESB Runtime"); fixJREToWorkspaceDefault(getExampleClientProjectName()); util.waitForNonIgnoredJobs(); } protected void assertProblemsView() { SWTBotTreeItem errors = ProblemsView.getErrorsNode(bot); assertNull("Project still contain problems :"+SWTEclipseExt.getFormattedTreeNode(errors),errors); } protected void fixLibrary(String project, String lib) { SWTBotTree tree = projectExplorer.show().bot().tree(); SWTBotTreeItem proj = tree.select(project).getTreeItem(project); proj.expand(); boolean fixed=false; boolean found=false; for (SWTBotTreeItem item : proj.getItems()) { if (item.getText().startsWith(lib)) { found = true; ContextMenuHelper.prepareTreeItemForContextMenu(tree, item); new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.PROPERTIES, false)).click(); SWTBotShell shell = bot.activeShell(); shell.bot().table().select(configuredState.getServer().name); open.finish(shell.bot(),IDELabel.Button.OK); fixed=true; break; } } if (!fixed && found) { log.error("Libray starting with '"+lib+"' in project '"+project+"' was not fixed."); bot.sleep(Long.MAX_VALUE); } if (!found) { log.info("Libray starting with '"+lib+"' in project '"+project+"' was not found."); } } /** * gets label in project examples tree derived by version of soa we currently run * @return */ protected String getRunningSoaVersionTreeLabel() { String ret = "ESB for SOA-P "; if (!configuredState.getServer().isConfigured) { throw new NullPointerException("No server was configured for test, but it is required"); } if (configuredState.getServer().version.equals("5.0")) { ret+="5.0"; } else if (configuredState.getServer().version.equals("5.1")) { ret+="5.0"; } else if (configuredState.getServer().version.equals("4.3")) { ret+="4.3"; } else { assertNotNull("We are running on unexpected SOA-P version "+configuredState.getServer().version+" update test source code "+this.getClass().getName(), null); return null; } return ret; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f59465fbe54820dcf897a8655dbaf950f63c11fb
fa7e89fe2e7ea936ff2634e3c9adf1a6aaf1ad29
/jaxb/extract-v5/net/opengis/gml/v_3_2_1/AbstractTopologyType.java
25cb33d1b0f8f1b355500a376f54d59eb73486a5
[ "MIT" ]
permissive
edigonzales-archiv/oereb-rahmenmodell-tests
b3da73e3f74536b97a132325e78cf05d887924d6
292adf552f37bc82d4164b7746884b998fdccc7e
refs/heads/master
2021-09-07T06:09:57.471579
2018-02-18T14:38:22
2018-02-18T14:38:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,528
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.12.24 at 07:38:08 PM CET // package net.opengis.gml.v_3_2_1; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * This abstract type supplies the root or base type for all topological elements including primitives and complexes. It inherits AbstractGMLType and hence can be identified using the gml:id attribute. * * <p>Java class for AbstractTopologyType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="AbstractTopologyType"> * &lt;complexContent> * &lt;extension base="{http://www.opengis.net/gml/3.2}AbstractGMLType"> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AbstractTopologyType") @XmlSeeAlso({ TopoPointType.class, TopoCurveType.class, TopoVolumeType.class, TopoSurfaceType.class, TopoComplexType.class, AbstractTopoPrimitiveType.class }) public abstract class AbstractTopologyType extends AbstractGMLType { }
[ "edi.gonzales@gmail.com" ]
edi.gonzales@gmail.com
ba60bfd93976ca60b46e7b8351a9cea06dfa9543
62c3dec09354e55c52ebce337a146bbac614682b
/src/structuralPatterns/adapterPattern/mediaPlayer/MediaAdapter.java
f28cd960a847fd623c6384677f10005b8a2834c0
[]
no_license
MJCoderMJCoder/designPatterns
6bcc65685cb27313cf62aa69ec7ad21cfb170bbc
91e3fdfb048c7c5d98cb50555b465924008227fb
refs/heads/master
2021-05-09T12:46:30.595218
2018-02-13T03:07:01
2018-02-13T03:07:01
118,995,869
0
0
null
null
null
null
UTF-8
Java
false
false
1,244
java
/** * */ package structuralPatterns.adapterPattern.mediaPlayer; import structuralPatterns.adapterPattern.mediaPlayer.advanced.AdvancedMediaPlayer; import structuralPatterns.adapterPattern.mediaPlayer.advanced.impl.Mp4Player; import structuralPatterns.adapterPattern.mediaPlayer.advanced.impl.VlcPlayer; /** * @author MJCoder * * 创建实现了 MediaPlayer 接口的适配器类。 */ public class MediaAdapter implements MediaPlayer { AdvancedMediaPlayer advancedMusicPlayer; /** * */ public MediaAdapter(String audioType) { // TODO Auto-generated constructor stub if (audioType.equalsIgnoreCase("vlc")) { advancedMusicPlayer = new VlcPlayer(); } else if (audioType.equalsIgnoreCase("mp4")) { advancedMusicPlayer = new Mp4Player(); } } /* * (non-Javadoc) * * @see adapterPattern.mediaPlayer.MediaPlayer#play(java.lang.String, * java.lang.String) */ @Override public void play(String audioType, String fileName) { // TODO Auto-generated method stub if (audioType.equalsIgnoreCase("vlc")) { advancedMusicPlayer.playVlc(fileName); } else if (audioType.equalsIgnoreCase("mp4")) { advancedMusicPlayer.playMp4(fileName); } } }
[ "598157378@qq.com" ]
598157378@qq.com
a634081a2cf24567647be8dc01572e951b29f970
43f69a91d8c1dd91b6a78a0fd8d64017b8cb5568
/src/com/Entitys/Truck/Dao/TruckDaoImpl.java
7103903c9d26e4c0530fe00f16503ebeccc3338b
[]
no_license
AssassinGQ/scsywh_behind
61901dba5f844cb863fdd7cf15edc92d2dd0bf95
8c3db14f374975a164f8cf28d0de78996dca0efa
refs/heads/master
2020-03-08T10:43:01.377664
2018-08-04T11:57:35
2018-08-04T11:57:35
128,080,208
0
1
null
null
null
null
UTF-8
Java
false
false
1,066
java
package com.Entitys.Truck.Dao; import java.util.ArrayList; import java.util.List; import org.hibernate.Session; import com.Common.Daos.QueryBean; import com.Common.Daos.SingTabBaseDaoImpl; import com.Common.Exceptions.DaoException; import com.Entitys.Truck.Entity.Truck; public class TruckDaoImpl extends SingTabBaseDaoImpl<Truck> implements TruckDao { public TruckDaoImpl(Session session) { super(session, Truck.class); this.pretname = "truck_"; this.tAliasname = "truck"; } @Override public Truck getByTrucknumber(String trucknumber, boolean needVaild) throws DaoException { List<QueryBean> queryList = new ArrayList<QueryBean>(); queryList.add(new QueryBean(Truck.class.getName(), "truck", "trucknumber", trucknumber, QueryBean.TYPE_EQUAL)); List<Truck> trucks = this.getListBy(queryList, true); if(trucks.size() == 0) return null; if(trucks.size() > 1) throw DaoException.DB_QUERY_EXCEPTION.newInstance("In %s.getByTrucknumber.{%s}", Daoname, "拖车数据库出错,车牌号"+trucknumber+"重复"); return trucks.get(0); } }
[ "hangq_zju@hotmail.com" ]
hangq_zju@hotmail.com
67f3114287105dca4d8e0688a09953de755d3d29
d57b3b513333e821bd85ac9d5f26749ff5917ad1
/SynergySpace2.1/src/synergyspace/utils/network/.svn/text-base/NetworkUtils.java.svn-base
03443b6cfc3baf5380d00921e1a8d1d573f9b9ab
[ "BSD-2-Clause" ]
permissive
synergynet/synergynet2.1
a65ed5010fde83b247b527093f65c97e758d7de4
034f11aa94304e7ba95c857fe4cf73bb8d8da4a2
refs/heads/master
2020-12-02T16:23:45.669295
2017-07-07T15:15:01
2017-07-07T15:15:01
96,545,952
0
1
null
null
null
null
UTF-8
Java
false
false
2,785
/* * Copyright (c) 2009 University of Durham, England * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'SynergySpace' nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package synergyspace.utils.network; //import java.net.InetAddress; //import java.net.NetworkInterface; //import java.net.SocketException; //import java.net.UnknownHostException; //import java.util.Formatter; //import java.util.Locale; public class NetworkUtils { // public static byte[] getMacAddressBytes() throws SocketException, UnknownHostException { // InetAddress address = InetAddress.getLocalHost(); // NetworkInterface ifa = NetworkInterface.getByInetAddress(address); // byte[] mac = ifa.getHardwareAddress(); // return mac; // } // public static String getMacAddressString() throws SocketException, UnknownHostException { // byte[] mac = getMacAddressBytes(); // StringBuffer sb = new StringBuffer(); // Formatter formatter = new Formatter(sb, Locale.UK); // for(int i = 0; i < mac.length; i++) { // formatter.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : ""); // } // return formatter.toString(); // } // public static void main(String[] args) { // try { // System.out.println(NetworkUtils.getMacAddressString()); // } catch (SocketException e) { // e.printStackTrace(); // } catch (UnknownHostException e) { // e.printStackTrace(); // } // } }
[ "james.andrew.mcnaughton@gmail.com" ]
james.andrew.mcnaughton@gmail.com
f3cedde4f1984a4f6b9569bdef655a1dcb9bed4c
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_1001767.java
478321fc86a5b7fbd6ff76471f7fdc9b1ff085fe
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
public boolean ready(){ final String text=getDataSource().peek(0).getElement(); if (text.equals("{") || text.equals("{+") || text.equals("{#") || text.equals("{!") || text.equals("{-")) { final String text1=getDataSource().peek(1).getElement(); if (text1.matches("[NSEW]=")) { return true; } return false; } return false; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
9d561738ecc12692dd83bd36897591cd7dd5d09b
e1730f457ac3db9fb79f6d862a35338c74f29173
/code-assert-gui/src/main/java/guru/nidi/codeassert/gui/CodeClassSerializer.java
2713daf011f36267f276764de7be2e3b1462b392
[ "Apache-2.0", "BSD-2-Clause" ]
permissive
nidi3/code-assert
e9f868bf3aa1414c0cd9f857ec2a1ea5ed6945b2
a722c20b1541cabc42f08eb4d33fd46e9745da84
refs/heads/master
2022-07-09T18:29:00.262502
2021-02-05T16:31:10
2021-02-05T16:31:10
48,196,746
109
8
Apache-2.0
2022-06-20T22:40:25
2015-12-17T20:30:58
Java
UTF-8
Java
false
false
1,959
java
/* * Copyright © 2015 Stefan Niederhauser (nidin@gmx.ch) * * 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 guru.nidi.codeassert.gui; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import guru.nidi.codeassert.model.CodeClass; import guru.nidi.codeassert.model.CodePackage; import java.io.IOException; import java.util.Map; public class CodeClassSerializer extends StdSerializer<CodeClass> { protected CodeClassSerializer(Class<CodeClass> t) { super(t); } @Override public void serialize(CodeClass value, JsonGenerator gen, SerializerProvider serializers) throws IOException { gen.writeStartObject(); gen.writeStringField("name", value.getName()); gen.writeStringField("package", value.getPackage().getName()); gen.writeNumberField("size", value.getTotalSize()); gen.writeArrayFieldStart("usePackages"); for (final CodePackage pack : value.usedPackages()) { gen.writeString(pack.getName()); } gen.writeEndArray(); gen.writeObjectFieldStart("useClasses"); for (final Map.Entry<CodeClass, Integer> entry : value.usedClassCounts().entrySet()) { gen.writeNumberField(entry.getKey().getName(), entry.getValue()); } gen.writeEndObject(); gen.writeEndObject(); } }
[ "ghuder5@gmx.ch" ]
ghuder5@gmx.ch
75cc226c19abbb338646e2ec2ac202067c063fcf
44fc7dec4335fee636ac71af6695be712908c94f
/_LECTIONS/9/Metaannotations.java
a0df0c4246c2c99575a45243ea74f9c34ed3643b
[]
no_license
alexey-palych/orion_se_2020
9bded4dbadfe7ed274c7bd16b871e3836c53309e
7b257fbb1b82547add9a0d3ecb6396235c14efa1
refs/heads/master
2023-03-23T08:04:55.698374
2020-12-18T16:02:04
2020-12-18T16:02:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
281
java
import java.lang.annotation.Repeatable; public class Metaannotations { @interface Categories { Category[] value(); } @Repeatable(Categories.class) @interface Category { String name(); } public static void main(String[] args) { } }
[ "atarasov@mera.ru" ]
atarasov@mera.ru
2bf825fb56332feeacf3f07684b0bfaeecbf1fc2
7404246265092d24fd5061de63cb229785290fc5
/skynet-api/src/main/java/com/moredian/skynet/auth/request/RoleQueryRequest.java
d27f3b7fe78a15d82eedfc9fabe27d8789b3aada
[]
no_license
zhutx/skynet
1bd6a1d01838365e6c6d8108525f117dc0c5b613
4d5c4fdafe97ac3743b058a2992001a10bac0914
refs/heads/master
2021-01-23T14:21:44.071060
2017-09-22T10:58:44
2017-09-22T10:58:44
102,680,954
0
0
null
null
null
null
UTF-8
Java
false
false
486
java
package com.moredian.skynet.auth.request; import java.io.Serializable; public class RoleQueryRequest implements Serializable { private static final long serialVersionUID = 5450779513475458197L; private Long orgId; private String roleName; public Long getOrgId() { return orgId; } public void setOrgId(Long orgId) { this.orgId = orgId; } public String getRoleName() { return roleName; } public void setRoleName(String roleName) { this.roleName = roleName; } }
[ "16530202@qq.com" ]
16530202@qq.com