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
82467d34c79ad28d8993a74b482d4e6b515808e2
36073e09d6a12a275cc85901317159e7fffa909e
/nuxeo_nuxeo/modifiedFiles/2/fix/AnnotationFeature.java
0a51e07b9849d9b9c4b6d761e583656e697d67f1
[]
no_license
monperrus/bug-fixes-saner16
a867810451ddf45e2aaea7734d6d0c25db12904f
9ce6e057763db3ed048561e954f7aedec43d4f1a
refs/heads/master
2020-03-28T16:00:18.017068
2018-11-14T13:48:57
2018-11-14T13:48:57
148,648,848
3
0
null
null
null
null
UTF-8
Java
false
false
1,132
java
package org.nuxeo.ecm.platform.annotations.repository.service; import org.nuxeo.ecm.platform.test.PlatformFeature; import org.nuxeo.runtime.api.Framework; import org.nuxeo.runtime.test.runner.Deploy; import org.nuxeo.runtime.test.runner.Features; import org.nuxeo.runtime.test.runner.FeaturesRunner; import org.nuxeo.runtime.test.runner.LocalDeploy; import org.nuxeo.runtime.test.runner.SimpleFeature; @Features(PlatformFeature.class) @Deploy({ "org.nuxeo.ecm.platform.url.core", "org.nuxeo.ecm.relations.api", "org.nuxeo.ecm.relations", "org.nuxeo.ecm.relations.jena", "org.nuxeo.ecm.platform.types.api", "org.nuxeo.ecm.platform.types.core", "org.nuxeo.ecm.annotations", "org.nuxeo.ecm.annotations.contrib", "org.nuxeo.ecm.annotations.repository", "org.nuxeo.ecm.annotations.repository.test", "org.nuxeo.runtime.jtajca", "org.nuxeo.runtime.datasource" }) @LocalDeploy({ "org.nuxeo.runtime.datasource:anno-ds.xml" }) public class AnnotationFeature extends SimpleFeature { @Override public void initialize(FeaturesRunner runner) { Framework.addListener(new AnnotationsJenaSetup()); } }
[ "martin.monperrus@gnieh.org" ]
martin.monperrus@gnieh.org
1b7e05e1eb1f4c0998e52df3bbcbedfcf7bdb154
e5b193babffd9501adb9de6d079127ece94d06b3
/hotdog-after-end-master/hotdog-trade/src/main/java/com/pmzhongguo/ex/datalab/manager/AccountFeeReductionManager.java
9ebe250930ca14478b3924bc4babd10ee78dd473
[]
no_license
wh0amis/caex
8ff4ffd5aacd4f04f9ab936eb24943e291d2ddd4
701cac06f7f2894c7a6dd02ea90a36459643ae63
refs/heads/main
2023-05-11T11:47:46.954443
2021-06-06T17:35:18
2021-06-06T17:35:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,403
java
package com.pmzhongguo.ex.datalab.manager; import com.pmzhongguo.ex.core.web.ErrorInfoEnum; import com.pmzhongguo.ex.core.web.resp.ObjResp; import com.pmzhongguo.ex.core.web.resp.Resp; import com.pmzhongguo.ex.datalab.entity.AccountFee; import com.pmzhongguo.ex.datalab.entity.AccountFeeDetail; import com.pmzhongguo.ex.datalab.enums.AccountFeeDetailEnum; import com.pmzhongguo.ex.datalab.service.AccountFeeService; import com.qiniu.util.DateStyleEnum; import com.qiniu.util.DateUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.math.BigDecimal; import java.util.Date; /** * 手续费资产还原 * * @author jary * @creatTime 2019/12/6 10:00 AM */ @Component public class AccountFeeReductionManager implements AccountFeeChangeService { @Autowired private AccountFeeService accountFeeService; @Override public ObjResp executeAccountFeeChange(AccountFee accountFeeChane, AccountFee accountFeeDB) { if (accountFeeDB.getId() == null){ return new ObjResp(Resp.FAIL,ErrorInfoEnum.SYMBOL_FEE_ACCOUNT_NOT_EXIST.getErrorENMsg(),null); } BigDecimal subtract = accountFeeDB.getForzenAmount().add(accountFeeChane.getForzenAmount()); if (subtract.compareTo(BigDecimal.ZERO) < 0) { return compareAccountFeeAmount(); } accountFeeDB.setForzenAmount(subtract); accountFeeDB.setTotalAmount(accountFeeDB.getTotalAmount().add(accountFeeChane.getForzenAmount().abs())); accountFeeService.accountFeeFrozen(accountFeeDB,executeAccountFeeChange(accountFeeDB,accountFeeChane.getForzenAmount())); return new ObjResp(Resp.SUCCESS, Resp.SUCCESS_MSG, null); } @Override public AccountFeeDetail executeAccountFeeChange(AccountFee accountFeeDB, BigDecimal floatAmount) { return new AccountFeeDetail( accountFeeDB.getMemberId(), accountFeeDB.getFeeCurrency(), AccountFeeDetailEnum.REDUCTION.getType(), accountFeeDB.getTotalAmount(), floatAmount.abs().negate(), DateUtil.dateToString(new Date(), DateStyleEnum.YYYY_MM_DD_HH_MM_SS), null); } @Override public ObjResp compareAccountFeeAmount() { return new ObjResp(Resp.FAIL, ErrorInfoEnum.NOT_SUFFICIENT_FROZEN_FUNDS.getErrorENMsg(), null); } }
[ "ph_lantian@163.com" ]
ph_lantian@163.com
122a9bae8253044a043078d6cb1c5142e23f4afe
280a9cdbc08ad5d4999ba4e528eec9432058383e
/orders-and-customers/src/main/java/io/eventuate/examples/tram/sagas/ordersandcustomers/orders/domain/Order.java
f53980857072d437c16fac2c31d1692e14e13a12
[ "Apache-2.0" ]
permissive
shyding/eventuate-tram-sagas
b0c09490c5cdcc265b7884f89f6e209219d90e00
b41a0558a14cafc1074a4bf88acdcda1ef987510
refs/heads/master
2020-05-28T02:13:27.756339
2019-05-22T17:51:07
2019-05-22T17:51:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,282
java
package io.eventuate.examples.tram.sagas.ordersandcustomers.orders.domain; import io.eventuate.examples.tram.sagas.ordersandcustomers.orders.service.OrderDetails; import io.eventuate.tram.events.ResultWithEvents; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import java.util.Collections; @Entity @Table(name="orders") @Access(AccessType.FIELD) public class Order { @Id @GeneratedValue private Long id; private OrderState state; @Embedded private OrderDetails orderDetails; public Order() { } public Order(OrderDetails orderDetails) { this.orderDetails = orderDetails; this.state = OrderState.PENDING; } public static ResultWithEvents<Order> createOrder(OrderDetails orderDetails) { return new ResultWithEvents<Order>(new Order(orderDetails), Collections.emptyList()); } public Long getId() { return id; } public void noteCreditReserved() { this.state = OrderState.APPROVED; } public void noteCreditReservationFailed() { this.state = OrderState.REJECTED; } public OrderState getState() { return state; } }
[ "chris@chrisrichardson.net" ]
chris@chrisrichardson.net
2677042883a86aab4a608fe1fe224078f6f07aa0
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/imm-20200930/src/main/java/com/aliyun/imm20200930/models/TrimPolicy.java
fba38ddf1e8f6de516776ad4839cd822ea32e45e
[ "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
1,847
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.imm20200930.models; import com.aliyun.tea.*; public class TrimPolicy extends TeaModel { @NameInMap("DisableDeleteEmptyCell") public Boolean disableDeleteEmptyCell; @NameInMap("DisableDeleteRepeatedStyle") public Boolean disableDeleteRepeatedStyle; @NameInMap("DisableDeleteUnusedPicture") public Boolean disableDeleteUnusedPicture; @NameInMap("DisableDeleteUnusedShape") public Boolean disableDeleteUnusedShape; public static TrimPolicy build(java.util.Map<String, ?> map) throws Exception { TrimPolicy self = new TrimPolicy(); return TeaModel.build(map, self); } public TrimPolicy setDisableDeleteEmptyCell(Boolean disableDeleteEmptyCell) { this.disableDeleteEmptyCell = disableDeleteEmptyCell; return this; } public Boolean getDisableDeleteEmptyCell() { return this.disableDeleteEmptyCell; } public TrimPolicy setDisableDeleteRepeatedStyle(Boolean disableDeleteRepeatedStyle) { this.disableDeleteRepeatedStyle = disableDeleteRepeatedStyle; return this; } public Boolean getDisableDeleteRepeatedStyle() { return this.disableDeleteRepeatedStyle; } public TrimPolicy setDisableDeleteUnusedPicture(Boolean disableDeleteUnusedPicture) { this.disableDeleteUnusedPicture = disableDeleteUnusedPicture; return this; } public Boolean getDisableDeleteUnusedPicture() { return this.disableDeleteUnusedPicture; } public TrimPolicy setDisableDeleteUnusedShape(Boolean disableDeleteUnusedShape) { this.disableDeleteUnusedShape = disableDeleteUnusedShape; return this; } public Boolean getDisableDeleteUnusedShape() { return this.disableDeleteUnusedShape; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
6025994d39feae52e4d41fe25aa45be105785373
f232c2c7966e5769d1f68af87c83615fe4202870
/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java
ccc3e0832cf7a693ec794264f0a6fee7befadd8e
[]
no_license
BillTheBest/ovirt-engine
54d0d3cf5b103c561c4e72e65856948f252b41a1
7d5d711b707e080a69920eb042f6f547dfa9443f
refs/heads/master
2016-08-05T16:52:16.557733
2011-11-07T02:49:42
2011-11-07T02:49:42
2,938,776
1
1
null
null
null
null
UTF-8
Java
false
false
2,572
java
package org.ovirt.engine.core.bll; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; import org.junit.runner.RunWith; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import org.ovirt.engine.core.common.action.ImportVmParameters; import org.ovirt.engine.core.common.businessentities.VM; import org.ovirt.engine.core.common.config.Config; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.dal.VdcBllMessages; @RunWith(PowerMockRunner.class) @PrepareForTest({ Config.class, ImportExportCommon.class }) public class ImportVmCommandTest { @Test public void insufficientDiskSpace() { final int lotsOfSpace = 1073741824; final int diskSpacePct = 0; final ImportVmCommand<ImportVmParameters> c = setupDiskSpaceTest(lotsOfSpace, diskSpacePct); assertFalse(c.canDoAction()); assertTrue(c.getReturnValue() .getCanDoActionMessages() .contains(VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW.toString())); } @Test public void sufficientDiskSpace() { final int extraDiskSpaceRequired = 0; final int diskSpacePct = 0; final ImportVmCommand<ImportVmParameters> c = setupDiskSpaceTest(extraDiskSpaceRequired, diskSpacePct); assertTrue(c.canDoAction()); } private ImportVmCommand<ImportVmParameters> setupDiskSpaceTest(final int diskSpaceRequired, final int diskSpacePct) { ConfigMocker cfgMocker = new ConfigMocker(); cfgMocker.mockConfigLowDiskSpace(diskSpaceRequired); cfgMocker.mockConfigLowDiskPct(diskSpacePct); cfgMocker.mockLimitNumberOfNetworkInterfaces(Boolean.TRUE); mockImportExportCommonAlwaysTrue(); return new TestHelperImportVmCommand(createParameters()); } protected ImportVmParameters createParameters() { final VM v = createVM(); v.setvm_name("testVm"); final ImportVmParameters p = new ImportVmParameters(v, Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid()); return p; } protected VM createVM() { final VM v = new VM(); v.setvm_guid(Guid.NewGuid()); v.setDiskSize(2); return v; } protected static void mockImportExportCommonAlwaysTrue() { ImportExportCommonMocker mocker = new ImportExportCommonMocker(); mocker.mockCheckStorageDomain(true); mocker.mockCheckStoragePool(true); } }
[ "liuyang3240@gmail.com" ]
liuyang3240@gmail.com
f26198c188ade76a097ab1157251a1f4d71280f2
13f27bcd537dec2bf19c4d8c4913b338b4d47e26
/src/com/dhc/pos/dynamic/template/os/struct/FunctionPageTemplate.java
bc9ff49ce0162a2df277e3f4e96f43eb30663e51
[]
no_license
suntinghui/POS2Android_Standard
b3e54ef00609599238a73776e0f889e73b3e4054
9507550943c3279afdbe4cea23fc0251a7e65500
refs/heads/master
2020-06-02T11:02:13.596017
2013-12-19T15:06:12
2013-12-19T15:06:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,907
java
package com.dhc.pos.dynamic.template.os.struct; import java.util.Vector; import android.view.View; import com.dhc.pos.dynamic.core.ViewPage; import com.dhc.pos.dynamic.template.StructTemplate; public class FunctionPageTemplate extends StructTemplate { public FunctionPageTemplate(String id, String name) { super(id, name); } @Override public void dateInit() { ViewPage templatePage = this.getTemplatePage(); if (null == templatePage) { return; } if (null != templatePage.getTarget()) { int i =0; /** * 标注已经加载过模板了 */ this.getCurrentPage().setTemplate(null); if (templatePage.getTarget().isPage()) { Vector<String> comIndex = new Vector<String>(); for ( ;i<templatePage.getViewIndex().size(); i++) { if (null != this.getCurrentPage().getComponent(templatePage.getViewIndex().get(i))) { continue; } if (templatePage.getViewIndex().get(i).equals(templatePage.getTarget().getId())) { i++; break; } /** * 定位到标签前的所有组件 */ comIndex.add(templatePage.getViewIndex().get(i)); } this.getCurrentPage().getViewIndex().addAll(0, comIndex); /** * 增加标签后的所有的组件 */ for (; i<templatePage.getViewIndex().size(); i++) { if (null != this.getCurrentPage().getComponent(templatePage.getViewIndex().get(i))) { continue; } this.getCurrentPage().getViewIndex().add(templatePage.getViewIndex().get(i)); } } else { // TODO 针对某一类标签进行替换 } } else { /** * 没有替换标签,则全部加载到当前界面之后 */ this.getCurrentPage().getViewIndex().addAll(templatePage.getViewIndex()); } } @Override public Vector<View> excute() { // TODO Auto-generated method stub return null; } }
[ "tinghuisun@163.com" ]
tinghuisun@163.com
00299542bccef91a722cb8c2effd871faa51f2f0
e304b9cd2840b35c484540289dda475d900c1052
/new-api-gateway/src/main/java/com/open/capacity/client/filter/RateLimitFilter.java
1bf5e97cbbf608e86d6651107f7e119ad3302299
[ "Apache-2.0" ]
permissive
pq1518110364/open-capacity-platform
9ce7b380e71ea01e594a4775df84477df8ef982f
feb46e49c496bd9aea8908fc577d6773f50a0619
refs/heads/master
2022-07-01T06:35:54.500928
2020-01-07T06:39:38
2020-01-07T06:39:38
232,259,768
2
1
Apache-2.0
2022-06-21T02:35:27
2020-01-07T06:39:07
JavaScript
UTF-8
Java
false
false
5,415
java
package com.open.capacity.client.filter; import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.gateway.filter.GatewayFilterChain; import org.springframework.cloud.gateway.filter.GlobalFilter; import org.springframework.core.Ordered; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.stereotype.Component; import org.springframework.util.AntPathMatcher; import org.springframework.web.server.ServerWebExchange; import com.alibaba.fastjson.JSONObject; import com.fasterxml.jackson.databind.ObjectMapper; import com.open.capacity.client.service.impl.SysClientServiceImpl; import com.open.capacity.client.utils.RedisLimiterUtils; import com.open.capacity.common.web.Result; import com.open.capacity.redis.util.RedisUtil; import lombok.extern.slf4j.Slf4j; import reactor.core.publisher.Mono; /** * Created by owen on 2018/12/10. 根据应用 url 限流 oauth_client_details if_limit 限流开关 * limit_count 阈值 */ @Slf4j @Component public class RateLimitFilter implements GlobalFilter, Ordered { // url匹配器 private final AntPathMatcher pathMatcher = new AntPathMatcher(); @Resource private RedisUtil redisUtil; @Resource private RedisTemplate<String, Object> redisTemplate ; @Autowired private RedisLimiterUtils redisLimiterUtils; @Autowired private ObjectMapper objectMapper; @Resource SysClientServiceImpl sysClientServiceImpl; @Override public int getOrder() { return -500; } /** * 1. 判断token是否有效 * 2. 如果token有对应clientId * 2.1 判断clientId是否有效 * 2.2 判断请求的服务service是否有效 * 2.3 判断clientId是否有权限访问service * 3. 判断 clientId+service 每日限流 * @param exchange * @param accessToken * @return */ @Override public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { String accessToken = extractToken(exchange.getRequest()); if (!checkRateLimit(exchange, accessToken)) { log.error("TOO MANY REQUESTS!"); exchange.getResponse().setStatusCode(HttpStatus.TOO_MANY_REQUESTS); ServerHttpResponse response = exchange.getResponse(); JSONObject message = new JSONObject(); message.put("resp_code", -1); message.put("resp_msg", "TOO MANY REQUESTS!"); byte[] bits = message.toJSONString().getBytes(StandardCharsets.UTF_8); DataBuffer buffer = response.bufferFactory().wrap(bits); response.setStatusCode(HttpStatus.TOO_MANY_REQUESTS); //指定编码,否则在浏览器中会中文乱码 response.getHeaders().add("Content-Type", "application/json;charset=UTF-8"); return response.writeWith(Mono.just(buffer)); } return chain.filter(exchange); } private String extractToken(ServerHttpRequest request) { List<String> strings = request.getHeaders().get("Authorization"); String authToken = null; if (strings != null) { authToken = strings.get(0).substring("Bearer".length()).trim(); } if (StringUtils.isBlank(authToken)) { strings = request.getQueryParams().get("access_token"); if (strings != null) { authToken = strings.get(0); } } return authToken; } private Boolean checkRateLimit(ServerWebExchange exchange, String accessToken) { try { String reqUrl = exchange.getRequest().getPath().value(); // 1. 按accessToken查找对应的clientId Map<String, Object> params = (Map<String, Object>) redisTemplate.opsForValue().get("token:" + accessToken) ; // if(params!=null){ String clientId = String.valueOf(params.get("clientId")) ; Map client = sysClientServiceImpl.getClient(clientId); if(client!=null){ String flag = String.valueOf(client.get("if_limit") ) ; if("1".equals(flag)){ String accessLimitCount = String.valueOf(client.get("limit_count") ) ; if (!accessLimitCount.isEmpty()) { Result result = redisLimiterUtils.rateLimitOfDay(clientId, reqUrl , Long.parseLong(accessLimitCount)); if (-1 == result.getResp_code()) { log.error("token:" + accessToken + result.getResp_msg()); // ((ResultMsg) // this.error_info.get()).setMsg("clientid:" + // client_id + ":token:" + accessToken + ":" + // result.getMsg()); // ((ResultMsg) this.error_info.get()).setCode(401); return false; } } } } } } catch (Exception e) { StackTraceElement stackTraceElement= e.getStackTrace()[0]; log.error("checkRateLimit:" + "---|Exception:" +stackTraceElement.getLineNumber()+"----"+ e.getMessage()); } return true; } }
[ "33628596+pq1518110364@users.noreply.github.com" ]
33628596+pq1518110364@users.noreply.github.com
1bc0238e4a9cd2f28797878825a2cc15eaa360a3
f3bf13101bfa0a9b8c3363684de9fcd7d0e35de6
/examples/tasks/src/test/java/org/jboss/seam/rest/example/tasks/ftest/TaskPage.java
51dc6fa036a269a638bc9f48c730632d4b73b3c3
[]
no_license
maschmid/rest
be1be2a1b41ba8437d421d8f3316a2f48c3f8eb8
c2e00bbd866c55e1c82bb0e4f371b545bc24d943
refs/heads/master
2021-01-16T20:11:41.638737
2011-02-16T13:01:14
2011-02-16T13:01:14
1,373,680
0
0
null
null
null
null
UTF-8
Java
false
false
4,461
java
/* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat, Inc., and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * 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.jboss.seam.rest.example.tasks.ftest; import java.net.URL; import org.jboss.test.selenium.framework.AjaxSelenium; import org.jboss.test.selenium.locator.JQueryLocator; import org.jboss.test.selenium.locator.option.OptionLocator; import org.jboss.test.selenium.locator.option.OptionValueLocator; import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.waitXhr; import static org.jboss.test.selenium.locator.LocatorFactory.jq; import static org.jboss.test.selenium.locator.option.OptionLocatorFactory.optionValue; /** * Page object for the tasks page (tasks.html) * @author <a href="http://community.jboss.org/people/jharting">Jozef Hartinger</a> * */ public class TaskPage extends AbstractPage { public static final JQueryLocator NEW_TASK_NAME_FIELD = jq("#editTaskName"); public static final JQueryLocator NEW_TASK_CATEGORY_SELECT = jq("#editTaskCategory"); public static final JQueryLocator NEW_TASK_SUBMIT = jq("#editTaskSubmit"); public static final JQueryLocator TASK_BY_NAME = jq(".name:contains('{0}')"); public static final JQueryLocator TASK_BY_ID_AND_CATEGORY = jq("#{0} ~ #{1}:first .name"); public static final JQueryLocator TASK_DONE_BUTTON = jq("#{0} img:first"); public static final JQueryLocator TASK_DELETE_BUTTON = jq("#{0} img:last"); public static final JQueryLocator TASK_EDIT_BUTTON = jq("#{0} img:nth-child(2)"); public static final JQueryLocator TASK_EDIT_FORM = jq("#{0} .updateTask"); public static final JQueryLocator TASK_EDIT_NAME_FIELD = jq("#{0} .nameField"); public static final JQueryLocator TASK_EDIT_CATEGORY_SELECT = jq("#{0} #editTaskCategory"); public static final OptionLocator<OptionValueLocator> TASK_CATEGORY_OPTION = optionValue("{0}"); public static final JQueryLocator TASK_EDIT_UPDATE_BUTTON = jq("#{0} #update"); public TaskPage(AjaxSelenium selenium, URL contextPath) { super(selenium, contextPath); reload(); } @Override public String getPageSuffix() { return "tasks.html"; } public void newTask(String name, String category) { selenium.type(NEW_TASK_NAME_FIELD, name); selenium.select(NEW_TASK_CATEGORY_SELECT, TASK_CATEGORY_OPTION.format(category)); waitXhr(selenium).click(NEW_TASK_SUBMIT); } public boolean isTaskPresent(String taskName) { return selenium.isElementPresent(TASK_BY_NAME.format(taskName)); } public boolean isTaskPresent(String categoryName, int taskId) { return selenium.isElementPresent(TASK_BY_ID_AND_CATEGORY.format(categoryName, taskId)); } public boolean isTaskPresent(String categoryName, int taskId, String taskName) { return isTaskPresent(categoryName, taskId) && selenium.getText(TASK_BY_ID_AND_CATEGORY.format(categoryName, taskId)).equals(taskName); } public void resolveTask(int id) { waitXhr(selenium).click(TASK_DONE_BUTTON.format(id)); } public void editTask(int id, String taskName, String categoryName) { selenium.click(TASK_EDIT_BUTTON.format(id)); waitForJQuery(); selenium.type(TASK_EDIT_NAME_FIELD.format(id), taskName); // for some reason we need to hit the select first selenium.isElementPresent(TASK_EDIT_CATEGORY_SELECT.format(id)); selenium.select(TASK_EDIT_CATEGORY_SELECT.format(id), TASK_CATEGORY_OPTION.format(categoryName)); waitXhr(selenium).click(TASK_EDIT_UPDATE_BUTTON.format(id)); } public void removeTask(int id) { waitXhr(selenium).click(TASK_DELETE_BUTTON.format(id)); } public boolean isEditFormPresent(int id) { return selenium.isElementPresent(TASK_EDIT_FORM.format(id)); } }
[ "jharting@redhat.com" ]
jharting@redhat.com
c9fe8b23f0ea1484b544c86edc6c8bbd87f19991
9d9c0d9aba0c3102787a0215621b24dbe7f64b59
/jeecms-front/src/main/java/com/jeecms/common/FrontDispatcherConfig.java
e7bbd76c71c96955087fe29c01508ad4fcb75548
[]
no_license
hd19901110/jeecms1.4.1test
b354019c57a06384524d53aa667614c1f4e5a743
4e3e0cb31513e53004aa20c108f79741203becb0
refs/heads/master
2022-12-08T06:10:06.868825
2020-08-31T09:59:19
2020-08-31T09:59:19
285,445,431
0
1
null
null
null
null
UTF-8
Java
false
false
2,388
java
package com.jeecms.common; import com.jeecms.front.config.FrontConfig; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; import javax.servlet.MultipartConfigElement; /** * 注册前端Dispatcher * * @author: tom * @date: 2019年1月5日 下午2:06:38 * @Copyright: 江西金磊科技发展有限公司 All rights reserved.Notice * 仅限于授权后使用,禁止非授权传阅以及私自用于商业目的。 */ @Component public class FrontDispatcherConfig { /** * 前端 DispatcherServlet bean * @Title: frontDispatcherServlet * @return: DispatcherServlet */ @Bean(name = "frontDispatcherServlet") public DispatcherServlet frontDispatcherServlet() { AnnotationConfigWebApplicationContext servletAppContext = new AnnotationConfigWebApplicationContext(); /*** 使用FrontConfig作为配置类 */ servletAppContext.register(FrontConfig.class); DispatcherServlet dispatcherServlet = new DispatcherServlet(servletAppContext); return dispatcherServlet; } /** * 注册 前端 DispatcherServlet * @Title: dispatcherServletRegistration * @param multipartConfigProvider MultipartConfigElement * @return: ServletRegistrationBean ServletRegistrationBean */ @Bean(name = "frontDispatcherServletRegistration") public ServletRegistrationBean<DispatcherServlet> dispatcherServletRegistration( ObjectProvider<MultipartConfigElement> multipartConfigProvider,DispatcherServlet frontDispatcherServlet) { ServletRegistrationBean<DispatcherServlet> registration = new ServletRegistrationBean<DispatcherServlet>(frontDispatcherServlet); // 必须指定启动优先级,否则无法生效 registration.setLoadOnStartup(1); registration.setName("frontDispatcherServlet"); // 注册上传配置对象,否则后台不能处理上传 /*MultipartConfigElement multipartConfig = multipartConfigProvider.getIfAvailable(); if (multipartConfig != null) { registration.setMultipartConfig(multipartConfig); }*/ return registration; } }
[ "2638177992@qq.com" ]
2638177992@qq.com
171dbd1abac1f290b5a38a7893dfa146571473c3
f763af9d7f3cb2d9015e512e353385bc5abc8318
/CTCI-Ch3-StacksAndQueues-Ex1-ThreeStacksInOneArray/src/Demo.java
3ef152b9e557f61641031db278ec48a4c178bcfa
[]
no_license
shonessy/Data_Structures_And_Algorithms_in_Java-AND-Programming_Interviews_Exposed
18b66b5656cf577b88189fadad79c940800835f0
c1c8fd74385fcae1ee2ec0b7e84a68de4bcbc2b6
refs/heads/master
2021-09-03T03:50:12.432391
2017-12-18T23:37:56
2017-12-18T23:37:56
109,734,362
0
0
null
null
null
null
UTF-8
Java
false
false
1,295
java
public class Demo { public static void main(String[] args) { FixedSizeMultiStacks stack = new FixedSizeMultiStacks(3, 10); stack.push(5, 1); stack.push(10, 1); stack.push(15, 1); stack.push(20, 1); stack.push(3, 2); stack.push(6, 2); stack.push(9, 2); stack.push(12, 2); stack.push(7, 3); stack.push(14, 3); stack.push(21, 3); stack.push(28, 3); System.out.println("Prvi Stack: "); stack.displayStack(1); System.out.println(); System.out.println("Drugi Stack: "); stack.displayStack(2); System.out.println(); System.out.println("Treci Stack: "); stack.displayStack(3); System.out.println(); System.out.println("Peek 1: " + stack.peek(1)); System.out.println("Peek 2: " + stack.peek(2)); System.out.println("Peek 3: " + stack.peek(3)); System.out.println(); System.out.println("Pop 1: " + stack.pop(1)); System.out.println("Peek 1: " + stack.peek(1)); stack.displayStack(1); System.out.println(); System.out.println("Pop 2: " + stack.pop(2)); System.out.println("Peek 2: " + stack.peek(2)); stack.displayStack(2); System.out.println(); System.out.println("Pop 3: " + stack.pop(3)); System.out.println("Peek 3: " + stack.peek(3)); stack.displayStack(3); System.out.println(); } }
[ "nemanja.el@hotmail.com" ]
nemanja.el@hotmail.com
eca37fc9dbc03aa1220c16e3cc3e579133ae8c1e
c11b3a3a2909c185f349843531061581272bbcd3
/src/main/java/z38/Main.java
cb6f903ae1f9c33495a5c64482ff9bf562140c59
[]
no_license
MikiKru/javaadv_programming
02ef2533021afa18133d055509690fd2b5dfccfc
770cc6f430ecc8cc53362e7dc27a4dcc3cee3e7c
refs/heads/master
2022-11-24T21:35:15.210144
2020-08-01T20:00:17
2020-08-01T20:00:17
282,399,397
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
package z38; public class Main { public static void main(String[] args) { CoffeeMachine coffeeMachine = new CoffeeMachine(5); Thread thread = new Thread(new CoffeeMachineMaker(coffeeMachine)); thread.start(); while(true) { try { thread.sleep(10000); } catch (InterruptedException e) { e.printStackTrace(); } Thread thread1 = new Thread(new CoffeeMachineFiller(coffeeMachine)); thread1.start(); System.out.println("==="); } } }
[ "michal_kruczkowski@o2.pl" ]
michal_kruczkowski@o2.pl
45f17a4c101c839bc4eaa9e047234daa01b2b778
14288df45ef583a37c7d2d893f20034d9fb45e83
/Company/Consumer/consumer/src/main/java/yitgogo/consumer/order/model/ModelDiliver.java
c7e8b814024cd37e08e8d89ef88632db66974620
[]
no_license
KungFuBrother/AndroidStudio
a1ce284f44f20bbdd1d90df356eed898137e7ebe
990a687ed0b4c29208f7df91ad94fc61ed9cc282
refs/heads/master
2016-08-12T19:01:09.548129
2015-12-05T07:04:11
2015-12-05T07:04:11
47,050,899
0
0
null
null
null
null
UTF-8
Java
false
false
1,011
java
package yitgogo.consumer.order.model; import org.json.JSONException; import org.json.JSONObject; /** * 配送方式 * * @author Tiger * */ public class ModelDiliver { public final static int TYPE_SELF = 0; public final static int TYPE_HOME = 1; public final static String NAME_SELF = "自取"; public final static String NAME_HOME = "送货上门"; int type = TYPE_SELF; String name = NAME_SELF; public ModelDiliver() { } public ModelDiliver(JSONObject object) { if (object != null) { type = object.optInt("type"); name = object.optString("name"); } } public ModelDiliver(int type, String name) { this.type = type; this.name = name; } public int getType() { return type; } public String getName() { return name; } public JSONObject toJsonObject() throws JSONException { JSONObject jsonObject = new JSONObject(); jsonObject.put("type", type); jsonObject.put("name", name); return jsonObject; } }
[ "1076192306@qq.com" ]
1076192306@qq.com
1b95cb74ff340143e1b148245c8e2cc15da133ab
6ea4e4b76ea385a63fa36bfaa9d59118b71aa141
/src/main/java/labprograms/ACMS/mutants/SDL_22/AirlinesBaggageBillingService.java
a6d7404a772d82ac64c5d42f626b3e1a1e0dfdb0
[]
no_license
phantomDai/DMT
4e0d691b6f9cdec0909f49a10a48f5174de23986
ec9efe5f3ccd30df7a512c0def948e87b6b9d884
refs/heads/master
2022-07-04T08:15:13.700999
2021-03-17T03:24:15
2021-03-17T03:24:15
186,924,147
0
2
null
2022-06-17T02:09:57
2019-05-16T00:54:46
Java
UTF-8
Java
false
false
1,918
java
package labprograms.ACMS.mutants.SDL_22; // Author : ysma public class AirlinesBaggageBillingService { int airClass = 0; int area = 0; double luggage = 0; double benchmark = 0; double takealong = 0; double luggagefee = 0; int tln = 0; boolean isStudent = false; double economicfee = 0; public double feeCalculation( int airClass, int area, boolean isStudent, double luggage, double economicfee ) { this.airClass = this.preairclass( airClass ); this.area = this.prearea( area ); switch (this.airClass) { case 0 : benchmark = 40; break; case 1 : benchmark = 30; break; case 2 : benchmark = 20; break; case 3 : benchmark = 0; break; } if (true) { takealong = 7; tln = 1; if (isStudent) { benchmark = 30; } } if (this.area == 0) { switch (this.airClass) { case 0 : tln = 2; takealong = 5; break; case 1 : tln = 1; takealong = 5; break; case 2 : tln = 1; takealong = 5; break; case 3 : tln = 1; takealong = 5; break; } } if (benchmark > luggage) { luggage = benchmark; } return luggagefee = (luggage - benchmark) * economicfee * 0.015; } public int preairclass( int airClass ) { int result = 0; result = airClass % 4; return result; } public int prearea( int area ) { int result = 0; result = area % 2; return result; } }
[ "daihepeng@sina.cn" ]
daihepeng@sina.cn
3675bfb22f0cbc61896da7cff662ae0d7dff809f
e08314b8c22df72cf3aa9e089624fc511ff0d808
/src/sdk4.0/ces/sdk/system/dao/impl/DBOrgUserInfoDao.java
685606c7d7b33d9c9324c43e675191f44d7283ee
[]
no_license
quxiongwei/qhzyc
46acd4f6ba41ab3b39968071aa114b24212cd375
4b44839639c033ea77685b98e65813bfb269b89d
refs/heads/master
2020-12-02T06:38:21.581621
2017-07-12T02:06:10
2017-07-12T02:06:10
96,864,946
0
3
null
null
null
null
UTF-8
Java
false
false
4,015
java
package ces.sdk.system.dao.impl; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.commons.dbutils.handlers.ArrayListHandler; import org.apache.commons.dbutils.handlers.BeanHandler; import org.apache.commons.dbutils.handlers.BeanListHandler; import org.apache.commons.lang.StringUtils; import ces.sdk.system.bean.OrgTypeInfo; import ces.sdk.system.bean.OrgUserInfo; import ces.sdk.system.common.StandardSQLHelper; import ces.sdk.system.common.decorator.SdkQueryRunner; import ces.sdk.system.dao.OrgUserInfoDao; import ces.sdk.system.factory.SdkQueryRunnerFactory; import ces.sdk.util.JdbcUtil; import ces.sdk.util.StringUtil; public class DBOrgUserInfoDao extends DBBaseDao implements OrgUserInfoDao{ /** * 查询参数 */ private static String ORG_USER_SELECT_PARAM = null; /** * 更新参数 */ private static String ORG_USER_UPDATE_PARAM = null; static { String[] columnsNameArray = ORG_USER_COLUMNS_NAME.split(","); String[] param = JdbcUtil.getSelectParamAndUpdateParam(columnsNameArray); ORG_USER_SELECT_PARAM = param[0]; ORG_USER_UPDATE_PARAM = param[1]; } @Override public OrgUserInfo save(OrgUserInfo orgUserInfo) { //建立一条标准的sql String sql = StandardSQLHelper.standardInsertSql(ORG_USER_COLUMNS_NAME, ORG_USER_TABLE_NAME, JdbcUtil.generatorPlaceHolder(orgUserInfo.getClass().getDeclaredFields()).toString()); orgUserInfo.setId(super.generateUUID()); SdkQueryRunner qr = SdkQueryRunnerFactory.createSdkQueryRunner(); qr.update(sql,JdbcUtil.getColumnsValueByBean(ORG_USER_COLUMNS_NAME, orgUserInfo,ADD_STATUS)); return orgUserInfo; } @Override public void delete(String id) { Object[] idsArray = id.split(","); String sql = StandardSQLHelper.standardDeleteSql(ORG_USER_TABLE_NAME, "id in " + JdbcUtil.generatorPlaceHolder(idsArray)); SdkQueryRunner qr = SdkQueryRunnerFactory.createSdkQueryRunner(); qr.update(sql,idsArray); } @Override public int delete(String orgId, String userId, String userType) { List<String> condition = new ArrayList<String>(); List<Object> values = new ArrayList<Object>(); if(StringUtils.isNotBlank(orgId)){ condition.add("org_id = ?"); values.add(orgId); } if(StringUtils.isNotBlank(userId)){ condition.add("user_id = ?"); // values.add(userId); } if(StringUtils.isNotBlank(userType)){ condition.add("user_type = ?"); values.add(userType); } String sql = StandardSQLHelper.standardDeleteSql(ORG_USER_TABLE_NAME, condition.toArray()); SdkQueryRunner qr = SdkQueryRunnerFactory.createSdkQueryRunner(); return qr.update(sql,values.toArray()); } @Override public List<OrgUserInfo> findByCondition(Map<String,String> param) { List<String> condition = new ArrayList<String>(); List<Object> values = new ArrayList<Object>(); if(null!=param&&param.size()!=0){ String orgId = param.get("orgId"); String userId = param.get("userId"); String userType = param.get("userType"); if(StringUtils.isNotBlank(orgId)){ condition.add("org_id = ?"); values.add(orgId); } if(StringUtils.isNotBlank(userId)){ condition.add("user_id = ?"); // values.add(userId); } if(StringUtils.isNotBlank(userType)){ condition.add("user_type = ?"); values.add(userType); } } String sql = StandardSQLHelper.standardSelectSql(ORG_USER_SELECT_PARAM, ORG_USER_TABLE_NAME,null,condition.toArray()); SdkQueryRunner qr = SdkQueryRunnerFactory.createSdkQueryRunner(); List<OrgUserInfo> orgUserInfo = new ArrayList<OrgUserInfo>(); orgUserInfo = qr.query(sql, new BeanListHandler<OrgUserInfo>(OrgUserInfo.class),values.toArray()); return orgUserInfo; } @Override public void changeOrgUser(String userId, String orgId, String userType) { String sql = "update " + ORG_USER_TABLE_NAME + " set org_id = ? where user_id = ? and user_type = ?"; SdkQueryRunner qr = SdkQueryRunnerFactory.createSdkQueryRunner(); qr.update(sql,orgId,userId,userType); } }
[ "qu.xiongwei@cesgroup.com.cn" ]
qu.xiongwei@cesgroup.com.cn
caf5eb5ce141b9d539120cc121015eda247ef8df
8bad6d131117e98c0ba45d97cc68547c94a7fe15
/JavaSwing/Swing2-BorderLayoutAndTextAreas/src/main/java/client/MainFrame.java
c330d0f7c2d634d5a9d0f95712b9aff0c83dbccf
[]
no_license
barcvilla/Java-Swing
51b0163e5f35a86126fa80ad2aa1f1b776b24de9
8b296ad0d5d5f0896ef778aa1e9ccde6940468ae
refs/heads/master
2020-03-27T09:28:50.441499
2019-01-07T16:17:42
2019-01-07T16:17:42
146,344,984
1
0
null
null
null
null
UTF-8
Java
false
false
1,100
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 client; import java.awt.BorderLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JTextArea; import javax.swing.SwingUtilities; /** * * @author PC */ public class MainFrame extends JFrame { private JButton btn; private JTextArea textArea; public MainFrame() { super("Hello World"); setLayout(new BorderLayout()); textArea = new JTextArea(); btn = new JButton("Click me!"); add(textArea, BorderLayout.CENTER); add(btn, BorderLayout.SOUTH); setSize(600, 500); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new MainFrame(); } }); } }
[ "ceva_19@hotmail.com" ]
ceva_19@hotmail.com
2ec145e7040efdf76ffb637f5b477bdfed85bba2
da96fdc11a55ba5bec0cff3564f68acded854c51
/src/main/java/org/drip/sequence/functional/IdempotentUnivariateRandom.java
d033f94134f0c7e21c70ecb666c0d3658ee7bbd0
[ "Apache-2.0" ]
permissive
fairhopeweb/DROP
f1f67118f7f4fce7eedc09ff22e97be96df1e9ca
6f300961478394e3d00b1621ad59575c2bcec7dd
refs/heads/master
2023-06-24T12:55:02.919973
2021-07-24T23:50:15
2021-07-24T23:50:15
389,572,649
0
0
Apache-2.0
2021-07-26T10:00:05
2021-07-26T09:05:37
null
UTF-8
Java
false
false
6,535
java
package org.drip.sequence.functional; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*! * Copyright (C) 2019 Lakshmi Krishnamurthy * Copyright (C) 2018 Lakshmi Krishnamurthy * Copyright (C) 2017 Lakshmi Krishnamurthy * Copyright (C) 2016 Lakshmi Krishnamurthy * Copyright (C) 2015 Lakshmi Krishnamurthy * * This file is part of DROP, an open-source library targeting risk, transaction costs, exposure, margin * calculations, and portfolio construction within and across fixed income, credit, commodity, equity, * FX, and structured products. * * https://lakshmidrip.github.io/DROP/ * * DROP is composed of three main modules: * * - DROP Analytics Core - https://lakshmidrip.github.io/DROP-Analytics-Core/ * - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ * - DROP Numerical Core - https://lakshmidrip.github.io/DROP-Numerical-Core/ * * DROP Analytics Core implements libraries for the following: * - Fixed Income Analytics * - Asset Backed Analytics * - XVA Analytics * - Exposure and Margin Analytics * * DROP Portfolio Core implements libraries for the following: * - Asset Allocation Analytics * - Transaction Cost Analytics * * DROP Numerical Core implements libraries for the following: * - Statistical Learning Library * - Numerical Optimizer Library * - Machine Learning Library * - Spline Builder Library * * Documentation for DROP is Spread Over: * * - Main => https://lakshmidrip.github.io/DROP/ * - Wiki => https://github.com/lakshmiDRIP/DROP/wiki * - GitHub => https://github.com/lakshmiDRIP/DROP * - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html * - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal * - Release Versions => https://lakshmidrip.github.io/DROP/version.html * - Community Credits => https://lakshmidrip.github.io/DROP/credits.html * - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues * - JUnit => https://lakshmidrip.github.io/DROP/junit/index.html * - Jacoco => https://lakshmidrip.github.io/DROP/jacoco/index.html * * 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. */ /** * <i>IdempotentUnivariateRandom</i> contains the Implementation of the OffsetIdempotent Objective Function * dependent on Univariate Random Variable. * * <br><br> * <ul> * <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/NumericalCore.md">Numerical Core Module</a></li> * <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/StatisticalLearningLibrary.md">Statistical Learning Library</a></li> * <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/sequence">Sequence</a></li> * <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/sequence/functional">Functional</a></li> * </ul> * <br><br> * * @author Lakshmi Krishnamurthy */ public class IdempotentUnivariateRandom extends org.drip.function.r1tor1.OffsetIdempotent { private org.drip.measure.continuous.R1Univariate _dist = null; /** * IdempotentUnivariateRandom Constructor * * @param dblOffset The Idempotent Offset * @param dist The Underlying Distribution * * @throws java.lang.Exception Thrown if the Inputs are invalid */ public IdempotentUnivariateRandom ( final double dblOffset, final org.drip.measure.continuous.R1Univariate dist) throws java.lang.Exception { super (dblOffset); _dist = dist; } /** * Generate the Function Metrics for the specified Variate Sequence and its corresponding Weight * * @param adblVariateSequence The specified Variate Sequence * @param adblVariateWeight The specified Variate Weight * * @return The Function Sequence Metrics */ public org.drip.sequence.metrics.SingleSequenceAgnosticMetrics sequenceMetrics ( final double[] adblVariateSequence, final double[] adblVariateWeight) { if (null == adblVariateSequence || null == adblVariateWeight) return null; int iNumVariate = adblVariateSequence.length; double[] adblFunctionSequence = new double[iNumVariate]; if (0 == iNumVariate || iNumVariate != adblVariateWeight.length) return null; try { for (int i = 0; i < iNumVariate; ++i) adblFunctionSequence[i] = adblVariateWeight[i] * evaluate (adblVariateSequence[i]); return new org.drip.sequence.metrics.SingleSequenceAgnosticMetrics (adblFunctionSequence, null); } catch (java.lang.Exception e) { e.printStackTrace(); } return null; } /** * Generate the Function Metrics for the specified Variate Sequence * * @param adblVariateSequence The specified Variate Sequence * * @return The Function Sequence Metrics */ public org.drip.sequence.metrics.SingleSequenceAgnosticMetrics sequenceMetrics ( final double[] adblVariateSequence) { if (null == adblVariateSequence) return null; int iNumVariate = adblVariateSequence.length; double[] adblVariateWeight = new double[iNumVariate]; for (int i = 0; i < iNumVariate; ++i) adblVariateWeight[i] = 1.; return sequenceMetrics (adblVariateSequence, adblVariateWeight); } /** * Generate the Function Metrics using the Underlying Variate Distribution * * @return The Function Sequence Metrics */ public org.drip.sequence.metrics.SingleSequenceAgnosticMetrics sequenceMetrics() { if (null == _dist) return null; org.drip.numerical.common.Array2D a2DHistogram = _dist.histogram(); return null == a2DHistogram ? null : sequenceMetrics (a2DHistogram.x(), a2DHistogram.y()); } /** * Retrieve the Underlying Distribution * * @return The Underlying Distribution */ public org.drip.measure.continuous.R1Univariate underlyingDistribution() { return _dist; } }
[ "lakshmimv7977@gmail.com" ]
lakshmimv7977@gmail.com
d738cc26d1a24327963aeaa5f2afe5faff941dc8
456689979987458788ede43c508b1e3f06fb56bc
/src/main/java/com/socodd/entities/Analyse.java
95568686fee365a1aea3aec91222e06cc54c5673
[]
no_license
said321/socodd
cff313e93e35342791d25bbc98e6721071c6dd82
caeb1829fedea3c2447e4d3bcdc1406f6b4fa160
refs/heads/master
2020-03-23T21:36:13.081992
2018-09-12T05:08:48
2018-09-12T05:08:48
141,448,187
0
0
null
null
null
null
UTF-8
Java
false
false
3,720
java
package com.socodd.entities; // Generated 7 sept. 2018 13:04:21 by Hibernate Tools 3.6.0.Final import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import static javax.persistence.GenerationType.IDENTITY; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; /** * Analyse generated by hbm2java */ @Entity @Table(name = "analyse", catalog = "db_socodd") public class Analyse implements java.io.Serializable { private Integer id; private Produit produit; private String code; private String nom; private String abrege; private boolean ecranLot; private boolean ecranReception; private boolean etatLot; private boolean etatReception; private String formuleCalcul; private float norme; private int ordre; public Analyse() { } public Analyse(Produit produit, String code, String nom, String abrege, boolean ecranLot, boolean ecranReception, boolean etatLot, boolean etatReception, String formuleCalcul, float norme, int ordre) { this.produit = produit; this.code = code; this.nom = nom; this.abrege = abrege; this.ecranLot = ecranLot; this.ecranReception = ecranReception; this.etatLot = etatLot; this.etatReception = etatReception; this.formuleCalcul = formuleCalcul; this.norme = norme; this.ordre = ordre; } @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "id", unique = true, nullable = false) public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "produit", nullable = false) public Produit getProduit() { return this.produit; } public void setProduit(Produit produit) { this.produit = produit; } @Column(name = "code", nullable = false, length = 5) public String getCode() { return this.code; } public void setCode(String code) { this.code = code; } @Column(name = "nom", nullable = false, length = 50) public String getNom() { return this.nom; } public void setNom(String nom) { this.nom = nom; } @Column(name = "abrege", nullable = false, length = 50) public String getAbrege() { return this.abrege; } public void setAbrege(String abrege) { this.abrege = abrege; } @Column(name = "ecran_lot", nullable = false) public boolean isEcranLot() { return this.ecranLot; } public void setEcranLot(boolean ecranLot) { this.ecranLot = ecranLot; } @Column(name = "ecran_reception", nullable = false) public boolean isEcranReception() { return this.ecranReception; } public void setEcranReception(boolean ecranReception) { this.ecranReception = ecranReception; } @Column(name = "etat_lot", nullable = false) public boolean isEtatLot() { return this.etatLot; } public void setEtatLot(boolean etatLot) { this.etatLot = etatLot; } @Column(name = "etat_reception", nullable = false) public boolean isEtatReception() { return this.etatReception; } public void setEtatReception(boolean etatReception) { this.etatReception = etatReception; } @Column(name = "formule_calcul", nullable = false, length = 100) public String getFormuleCalcul() { return this.formuleCalcul; } public void setFormuleCalcul(String formuleCalcul) { this.formuleCalcul = formuleCalcul; } @Column(name = "norme", nullable = false, precision = 12, scale = 0) public float getNorme() { return this.norme; } public void setNorme(float norme) { this.norme = norme; } @Column(name = "ordre", nullable = false) public int getOrdre() { return this.ordre; } public void setOrdre(int ordre) { this.ordre = ordre; } }
[ "you@example.com" ]
you@example.com
4a2f2004d6d1adf773d2b27b71628af8cfdc298f
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2009-05-19/seasar2-2.4.37/seasar2/s2-framework/src/main/java/org/seasar/framework/container/IllegalAutoBindingDefRuntimeException.java
86653605d8d2bb34b0d6b216a35f471257f333c2
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
1,890
java
/* * Copyright 2004-2009 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.seasar.framework.container; import org.seasar.framework.exception.SRuntimeException; /** * 不正な自動バインディング定義が指定された場合にスローされます。 * * @author higa * @author jundu * * @see AutoBindingDef * @see org.seasar.framework.container.assembler.AutoBindingDefFactory#getAutoBindingDef(String) */ public class IllegalAutoBindingDefRuntimeException extends SRuntimeException { private static final long serialVersionUID = 3640106715772309404L; private String autoBindingName; /** * <code>IllegalAutoBindingDefRuntimeException</code>を構築します。 * * @param autoBindingName * 指定された不正な自動バインディング定義名 */ public IllegalAutoBindingDefRuntimeException(String autoBindingName) { super("ESSR0077", new Object[] { autoBindingName }); this.autoBindingName = autoBindingName; } /** * 例外の原因となった不正な自動バインディング定義名を返します。 * * @return 自動バインディング定義名 */ public String getAutoBindingName() { return autoBindingName; } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
5d74c729383b468e43d1cf11813768975dc860e3
b8d8f2461643f49f7acebb112c1339c62c7dde25
/popgog/java/com/qinnuan/engine/api/UpdateUserPopgog.java
b31d5ec35d249a085e36ee8fed253d94ca2f6020
[]
no_license
johndpope/firstproject
cf1d387da32016ff4594339a3938e45c867a7c72
d28bf29c0b7798b8e2e39209adcec708cb0e739b
refs/heads/master
2021-12-02T16:49:28.902405
2013-11-07T01:33:29
2013-11-07T01:33:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
package com.qinnuan.engine.api; import com.qinnuan.common.http.HttpMethod; import com.qinnuan.common.http.RequestType; @RequestType(type = HttpMethod.POST) public class UpdateUserPopgog extends AbstractParam { private final String api="/api/user/update_user_popgog.api"; @Override public String getApi() { return api; } private String userid; //用户ID private String deviceidentifyid; //设备ID private String devicetype; //设备类型 0=ios 1=android private String popgogid; //爆谷号 public String getUserid() { return userid; } public void setUserid(String userid) { this.userid = userid; } public String getDeviceidentifyid() { return deviceidentifyid; } public void setDeviceidentifyid(String deviceidentifyid) { this.deviceidentifyid = deviceidentifyid; } public String getDevicetype() { return devicetype; } public void setDevicetype(String devicetype) { this.devicetype = devicetype; } public String getPopgogid() { return popgogid; } public void setPopgogid(String popgogid) { this.popgogid = popgogid; } }
[ "lihongbo2011@gmail.com" ]
lihongbo2011@gmail.com
755d856029128f5b750c021fa5b088b2a399a706
42e72f98c2eeb668fb411569e15a50324d6bbc25
/src/main/java/leetcode/rank/may30/Ex2.java
7677d80cddd09827d90972983f625d3ce094f11e
[]
no_license
GONGMING13/algorithm4
b6173ef6b62baae3b1d3d18fd69c6927c22d6f25
9001cac3e77187564634de53955943b3723ba5ab
refs/heads/master
2023-06-04T04:41:34.833780
2021-06-27T05:51:12
2021-06-27T05:51:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
753
java
package leetcode.rank.may30; /** * @author yuzhang * @date 2021/5/30 上午10:35 * TODO */ public class Ex2 { public static void main(String[] args) { Ex2 ex2 = new Ex2(); System.out.println(ex2.maxValue("99",9)); } public String maxValue(String n, int x) { StringBuilder sb = new StringBuilder(n); int idx = 0; if (sb.charAt(0) == '-') { idx++; while (idx < sb.length() && sb.charAt(idx) - '0' <= x) { idx++; } sb.insert(idx, x); } else { while (idx < sb.length() && sb.charAt(idx) - '0' >= x){ idx++; } sb.insert(idx, x); } return sb.toString(); } }
[ "18681820448@163.com" ]
18681820448@163.com
76737e038c4e7262dbc0cf75136b9e8362bf770d
d74c2ca437a58670dc8bfbf20a3babaecb7d0bea
/SAP_858310_lines/Source - 963k/js.sl.utility.lib/dev/src/_tc~bl~sl~utility/java/com/sap/sl/util/sduread/api/sdufileexception.java
8e49f0f37119291503c67d806acaf2102ade05f6
[]
no_license
javafullstackstudens/JAVA_SAP
e848e9e1a101baa4596ff27ce1aedb90e8dfaae8
f1b826bd8a13d1432e3ddd4845ac752208df4f05
refs/heads/master
2023-06-05T20:00:48.946268
2021-06-30T10:07:39
2021-06-30T10:07:39
381,657,064
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package com.sap.sl.util.sduread.api; /** * Thrown to indicate that an error concerning an SDU file has occurred. */ public abstract class SduFileException extends SduManifestException { SduFileException(String message) { super(message); } SduFileException(String message, Throwable e) { super(message,e); } }
[ "Yalin.Arie@checkmarx.com" ]
Yalin.Arie@checkmarx.com
8113031faa3c5d7e278057a799178adc27521eda
bf44677a3d1806134653acb6a3548e585028c535
/src/main/java/com/glacialrush/api/game/obtainable/item/Weapon.java
ccd309bab450879cc89a94fae00c8ce28278da19
[]
no_license
cyberpwnn/GlacialAPI
2dd90d1d20aac7ccae157b8578b256992f1c7188
8202bb166be0b705cb117ddcde0dec96818381f9
refs/heads/master
2021-01-19T09:49:45.162070
2016-11-27T22:15:11
2016-11-27T22:15:11
74,915,598
0
0
null
null
null
null
UTF-8
Java
false
false
1,011
java
package com.glacialrush.api.game.obtainable.item; import com.glacialrush.api.game.obtainable.Item; import com.glacialrush.api.game.obtainable.ObtainableBank; public class Weapon extends Item { private WeaponType weaponType; private WeaponEnclosureType weaponEnclosureType; private WeaponEffect weaponEffect; public Weapon(ObtainableBank obtainableBank) { super(obtainableBank); setItemType(ItemType.WEAPON); setWeaponEffect(WeaponEffect.NONE); } public WeaponType getWeaponType() { return weaponType; } public void setWeaponType(WeaponType weaponType) { this.weaponType = weaponType; } public WeaponEnclosureType getWeaponEnclosureType() { return weaponEnclosureType; } public void setWeaponEnclosureType(WeaponEnclosureType weaponEnclosureType) { this.weaponEnclosureType = weaponEnclosureType; } public WeaponEffect getWeaponEffect() { return weaponEffect; } public void setWeaponEffect(WeaponEffect weaponEffect) { this.weaponEffect = weaponEffect; } }
[ "danielmillst@gmail.com" ]
danielmillst@gmail.com
a7a4358697e36242ade178aca439bbc7812742c6
536656cd89e4fa3a92b5dcab28657d60d1d244bd
/base/android/java/src/org/chromium/base/task/SingleThreadTaskRunnerImpl.java
099b0bf32b20f458f19b299a8bbcbe7fe860f99a
[ "BSD-3-Clause" ]
permissive
ECS-251-W2020/chromium
79caebf50443f297557d9510620bf8d44a68399a
ac814e85cb870a6b569e184c7a60a70ff3cb19f9
refs/heads/master
2022-08-19T17:42:46.887573
2020-03-18T06:08:44
2020-03-18T06:08:44
248,141,336
7
8
BSD-3-Clause
2022-07-06T20:32:48
2020-03-18T04:52:18
null
UTF-8
Java
false
false
3,338
java
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.base.task; import android.annotation.SuppressLint; import android.os.Build; import android.os.Handler; import android.os.Message; import androidx.annotation.Nullable; import org.chromium.base.annotations.JNINamespace; /** * Implementation of the abstract class {@link SingleThreadTaskRunner}. Before native initialization * tasks are posted to the {@link java android.os.Handler}, after native initialization they're * posted to a base::SingleThreadTaskRunner which runs on the same thread. */ @JNINamespace("base") public class SingleThreadTaskRunnerImpl extends TaskRunnerImpl implements SingleThreadTaskRunner { @Nullable private final Handler mHandler; private final boolean mPostTaskAtFrontOfQueue; /** * @param handler The backing Handler if any. Note this must run tasks on the * same thread that the native code runs a task with |traits|. * If handler is null then tasks won't run until native has * initialized. * @param traits The TaskTraits associated with this SingleThreadTaskRunnerImpl. * @param postTaskAtFrontOfQueue If true, tasks posted to the backing Handler will be posted at * the front of the queue. */ public SingleThreadTaskRunnerImpl( Handler handler, TaskTraits traits, boolean postTaskAtFrontOfQueue) { super(traits, "SingleThreadTaskRunnerImpl", TaskRunnerType.SINGLE_THREAD); mHandler = handler; mPostTaskAtFrontOfQueue = postTaskAtFrontOfQueue; } public SingleThreadTaskRunnerImpl(Handler handler, TaskTraits traits) { this(handler, traits, false); } @Override public boolean belongsToCurrentThread() { synchronized (mLock) { if (mNativeTaskRunnerAndroid != 0) return TaskRunnerImplJni.get().belongsToCurrentThread(mNativeTaskRunnerAndroid); } if (mHandler != null) return mHandler.getLooper().getThread() == Thread.currentThread(); assert (false); return false; } @Override protected void schedulePreNativeTask() { // if |mHandler| is null then pre-native task execution is not supported. if (mHandler == null) { return; } else if (mPostTaskAtFrontOfQueue) { postAtFrontOfQueue(); } else { mHandler.post(mRunPreNativeTaskClosure); } } @SuppressLint("NewApi") private void postAtFrontOfQueue() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { // The mHandler.postAtFrontOfQueue() API uses fences which batches messages up per // frame. We want to bypass that for performance, hence we use async messages where // possible. Message message = Message.obtain(mHandler, mRunPreNativeTaskClosure); message.setAsynchronous(true); mHandler.sendMessageAtFrontOfQueue(message); } else { mHandler.postAtFrontOfQueue(mRunPreNativeTaskClosure); } } }
[ "pcding@ucdavis.edu" ]
pcding@ucdavis.edu
46aced5b304d1c9f4c5081a473b8364f6de2252c
32de861bc2cccaf59b84c18f77a40b80743af084
/artifact/release/JPonyo/trunk/jponyo/src/main/java/net/sf/ponyo/jponyo/user/UserModule.java
47d1cda5985b556fa8ae991fe1bf404a806fe449
[]
no_license
christophpickl/ponyo-svn
f2419d9e880c3dc0da2f8863fb5766a94b60ac4a
99971a27e7f9ee803ac70e5aabbaccaa3a82c1ed
refs/heads/master
2021-03-08T19:28:49.379381
2012-09-14T20:50:57
2012-09-14T20:50:57
56,807,836
1
0
null
null
null
null
UTF-8
Java
false
false
401
java
package net.sf.ponyo.jponyo.user; import com.google.inject.AbstractModule; import com.google.inject.assistedinject.FactoryModuleBuilder; public class UserModule extends AbstractModule { @Override protected void configure() { install(new FactoryModuleBuilder() .implement(UserManager.class, RunningSessionUserManager.class) .build(RunningSessionUserManagerFactory.class)); } }
[ "christoph.pickl@gmail.com" ]
christoph.pickl@gmail.com
326e5ee2b2657aed4bfb899cfc000b395d611e0f
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mapsdk/internal/nu.java
a77538fc74cbfb6098314c1354ccb4453f0e9f7d
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
290
java
package com.tencent.mapsdk.internal; public abstract interface nu { public abstract boolean g_(); } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes11.jar * Qualified Name: com.tencent.mapsdk.internal.nu * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
a7ab539c2dd2ac19cdd18e7238375da51627e7d9
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/Alluxio--alluxio/d0c67d85433df0a1059f1a0069550dc23eaf2ccf/after/FileInStreamTest.java
ac426ad08586b5f68e7b7a387c38d980c643a114
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
8,099
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 tachyon.client; import java.io.IOException; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import tachyon.TestUtils; import tachyon.master.LocalTachyonCluster; /** * Unit tests for <code>tachyon.client.FileInStream</code>. */ public class FileInStreamTest { private final int BLOCK_SIZE = 30; private final int MIN_LEN = BLOCK_SIZE + 1; private final int MAX_LEN = 255; private final int MEAN = (MIN_LEN + MAX_LEN) / 2; private final int DELTA = 33; private LocalTachyonCluster mLocalTachyonCluster = null; private TachyonFS mTfs = null; @Before public final void before() throws IOException { System.setProperty("tachyon.user.quota.unit.bytes", "1000"); System.setProperty("tachyon.user.default.block.size.byte", String.valueOf(BLOCK_SIZE)); mLocalTachyonCluster = new LocalTachyonCluster(10000); mLocalTachyonCluster.start(); mTfs = mLocalTachyonCluster.getClient(); } @After public final void after() throws Exception { mLocalTachyonCluster.stop(); System.clearProperty("tachyon.user.quota.unit.bytes"); System.clearProperty("tachyon.user.default.block.size.byte"); } /** * Test <code>void read()</code>. */ @Test public void readTest1() throws IOException { for (int k = MIN_LEN; k <= MAX_LEN; k += DELTA) { for (WriteType op : WriteType.values()) { int fileId = TestUtils.createByteFile(mTfs, "/root/testFile_" + k + "_" + op, op, k); TachyonFile file = mTfs.getFile(fileId); InStream is = (k < MEAN ? file.getInStream(ReadType.CACHE) : file.getInStream(ReadType.NO_CACHE)); Assert.assertTrue(is instanceof FileInStream); byte[] ret = new byte[k]; int value = is.read(); int cnt = 0; while (value != -1) { Assert.assertTrue(value >= 0); Assert.assertTrue(value < 256); ret[cnt ++] = (byte) value; value = is.read(); } Assert.assertEquals(cnt, k); Assert.assertTrue(TestUtils.equalIncreasingByteArray(k, ret)); is.close(); is = (k < MEAN ? file.getInStream(ReadType.CACHE) : file.getInStream(ReadType.NO_CACHE)); Assert.assertTrue(is instanceof FileInStream); ret = new byte[k]; value = is.read(); cnt = 0; while (value != -1) { Assert.assertTrue(value >= 0); Assert.assertTrue(value < 256); ret[cnt ++] = (byte) value; value = is.read(); } Assert.assertEquals(cnt, k); Assert.assertTrue(TestUtils.equalIncreasingByteArray(k, ret)); is.close(); } } } /** * Test <code>void read(byte b[])</code>. */ @Test public void readTest2() throws IOException { for (int k = MIN_LEN; k <= MAX_LEN; k += DELTA) { for (WriteType op : WriteType.values()) { int fileId = TestUtils.createByteFile(mTfs, "/root/testFile_" + k + "_" + op, op, k); TachyonFile file = mTfs.getFile(fileId); InStream is = (k < MEAN ? file.getInStream(ReadType.CACHE) : file.getInStream(ReadType.NO_CACHE)); Assert.assertTrue(is instanceof FileInStream); byte[] ret = new byte[k]; Assert.assertEquals(k, is.read(ret)); Assert.assertTrue(TestUtils.equalIncreasingByteArray(k, ret)); is.close(); is = (k < MEAN ? file.getInStream(ReadType.CACHE) : file.getInStream(ReadType.NO_CACHE)); Assert.assertTrue(is instanceof FileInStream); ret = new byte[k]; Assert.assertEquals(k, is.read(ret)); Assert.assertTrue(TestUtils.equalIncreasingByteArray(k, ret)); is.close(); } } } /** * Test <code>void read(byte[] b, int off, int len)</code>. */ @Test public void readTest3() throws IOException { for (int k = MIN_LEN; k <= MAX_LEN; k += DELTA) { for (WriteType op : WriteType.values()) { int fileId = TestUtils.createByteFile(mTfs, "/root/testFile_" + k + "_" + op, op, k); TachyonFile file = mTfs.getFile(fileId); InStream is = (k < MEAN ? file.getInStream(ReadType.CACHE) : file.getInStream(ReadType.NO_CACHE)); Assert.assertTrue(is instanceof FileInStream); byte[] ret = new byte[k / 2]; Assert.assertEquals(k / 2, is.read(ret, 0, k / 2)); Assert.assertTrue(TestUtils.equalIncreasingByteArray(k / 2, ret)); is.close(); is = (k < MEAN ? file.getInStream(ReadType.CACHE) : file.getInStream(ReadType.NO_CACHE)); Assert.assertTrue(is instanceof FileInStream); ret = new byte[k]; Assert.assertEquals(k, is.read(ret, 0, k)); Assert.assertTrue(TestUtils.equalIncreasingByteArray(k, ret)); is.close(); } } } /** * Test <code>long skip(long len)</code>. */ @Test public void skipTest() throws IOException { for (int k = MIN_LEN; k <= MAX_LEN; k += DELTA) { for (WriteType op : WriteType.values()) { int fileId = TestUtils.createByteFile(mTfs, "/root/testFile_" + k + "_" + op, op, k); TachyonFile file = mTfs.getFile(fileId); InStream is = (k < MEAN ? file.getInStream(ReadType.CACHE) : file.getInStream(ReadType.NO_CACHE)); Assert.assertTrue(is instanceof FileInStream); Assert.assertEquals(k / 2, is.skip(k / 2)); Assert.assertEquals(k / 2, is.read()); is.close(); is = (k < MEAN ? file.getInStream(ReadType.CACHE) : file.getInStream(ReadType.NO_CACHE)); Assert.assertTrue(is instanceof FileInStream); Assert.assertEquals(k / 3, is.skip(k / 3)); Assert.assertEquals(k / 3, is.read()); is.close(); } } } /** * Test <code>void seek(long pos)</code>. * @throws IOException */ @Test public void seekExceptionTest() throws IOException { for (int k = MIN_LEN; k <= MAX_LEN; k += DELTA) { for (WriteType op : WriteType.values()) { int fileId = TestUtils.createByteFile(mTfs, "/root/testFile_" + k + "_" + op, op, k); TachyonFile file = mTfs.getFile(fileId); InStream is = (k < MEAN ? file.getInStream(ReadType.CACHE) : file.getInStream(ReadType.NO_CACHE)); try { is.seek(-1); } catch (IOException e) { // This is expected continue; } is.close(); throw new IOException("Except seek IOException"); } } } /** * Test <code>void seek(long pos)</code>. * @throws IOException */ @Test public void seekTest() throws IOException { for (int k = MIN_LEN; k <= MAX_LEN; k += DELTA) { for (WriteType op : WriteType.values()) { int fileId = TestUtils.createByteFile(mTfs, "/root/testFile_" + k + "_" + op, op, k); TachyonFile file = mTfs.getFile(fileId); InStream is = (k < MEAN ? file.getInStream(ReadType.CACHE) : file.getInStream(ReadType.NO_CACHE)); Assert.assertTrue(is instanceof FileInStream); is.seek(k / 3); Assert.assertEquals(k / 3, is.read()); is.seek(k / 2); Assert.assertEquals(k / 2, is.read()); is.seek(k / 4); Assert.assertEquals(k / 4, is.read()); is.close(); } } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
9f311d5a5a52c95db4444846f542ecd34f90b398
4f7161af2b5d6e4f5fbd042aaddbbfc43bce22b3
/src/com/wx/mapper/ProductTypeMapper.java
2909be704ebdae200f0460054c024a0cf70ebe88
[]
no_license
wangwenteng/ParseLogTest
f84a4ca0a1bd9ae3e306f09ec1c138f801b877b3
eb4b7c79e700e8c9ea1f54619f7420a9e6fdd9c0
refs/heads/master
2022-03-07T21:13:44.107187
2017-06-05T08:25:14
2017-06-05T08:25:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
911
java
package com.wx.mapper; import com.wx.pojo.ProductType; import com.wx.pojo.ProductTypeExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface ProductTypeMapper { int countByExample(ProductTypeExample example); int deleteByExample(ProductTypeExample example); int deleteByPrimaryKey(Integer id); int insert(ProductType record); int insertSelective(ProductType record); List<ProductType> selectByExample(ProductTypeExample example); ProductType selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") ProductType record, @Param("example") ProductTypeExample example); int updateByExample(@Param("record") ProductType record, @Param("example") ProductTypeExample example); int updateByPrimaryKeySelective(ProductType record); int updateByPrimaryKey(ProductType record); }
[ "120591516@qq.com" ]
120591516@qq.com
d29ec664abea900f6348d3fe13404cb267f4331d
573bde908382efc86e9e0d4d5ef923a2d07ecb3b
/src/main/java/com/tvd12/ezyfox/sfs2x/extension/BaseExtension.java
3d722417f27531dbf4cdbdf9b913d0d7225fa8e5
[ "Apache-2.0" ]
permissive
xty88645/ezyfox-sfs2x
a72fea8be791b4955344d4c3464e53fc808dc55d
34c4f89c2a58ded2f858745d2141ed13522e2d66
refs/heads/master
2021-01-12T04:12:17.182324
2016-11-08T15:58:26
2016-11-08T15:58:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,497
java
package com.tvd12.ezyfox.sfs2x.extension; import java.util.Set; import com.smartfoxserver.v2.extensions.SFSExtension; import com.tvd12.ezyfox.core.content.impl.BaseContext; import com.tvd12.ezyfox.sfs2x.clienthandler.ClientEventHandler; import com.tvd12.ezyfox.sfs2x.clienthandler.ClientRequestHandler; import com.tvd12.ezyfox.sfs2x.content.impl.SmartFoxContext; /** * @author tavandung12 * Created on Sep 26, 2016 * */ public abstract class BaseExtension extends SFSExtension { protected BaseContext context; @Override public void init() { initContext(); before(); addClientRequestHandlers(); config(); after(); } /** * Add client request handlers */ protected void addClientRequestHandlers() { Set<String> commands = context.getClientRequestCommands(); for(String command : commands) addClientRequestHandler(command); } /** * Add client request handler and map its to the command * * @param command the command */ protected void addClientRequestHandler(String command) { addClientRequestHandler(newClientEventHandler(command)); } /** * Create new client event handler * * @param command the command * @return the client event handler */ protected ClientEventHandler newClientEventHandler(String command) { return new ClientEventHandler(context, command); } /** * Add client request handle * * @param handler client request handle */ protected void addClientRequestHandler(ClientRequestHandler handler) { addRequestHandler(handler.getCommand(), handler); } /** * Initialize application context */ protected void initContext() { context = createContext(); SmartFoxContext sfsContext = (SmartFoxContext)context; sfsContext.setApi(getApi()); sfsContext.setExtension(this); } /** * Create the context * * @return the context */ protected abstract BaseContext createContext(); /** * Override this function to add custom configuration */ protected void config() { } /** * Invoke after initializing application and before initialize anything */ protected void before() { } /** * Invoke after initialized all */ protected void after() { } }
[ "dungtv@puppetteam.com" ]
dungtv@puppetteam.com
e088baf0bf3cdc9e59995cd408b9875223c71204
0dccef976f19741f67479f32f15d76c1e90e7f94
/db.java
e35345583380bf8d769a12e242758fded4d2b9fe
[]
no_license
Tominous/LabyMod-1.9
a960959d67817b1300272d67bd942cd383dfd668
33e441754a0030d619358fc20ca545df98d55f71
refs/heads/master
2020-05-24T21:35:00.931507
2017-02-06T21:04:08
2017-02-06T21:04:08
187,478,724
1
0
null
2019-05-19T13:14:46
2019-05-19T13:14:46
null
UTF-8
Java
false
false
199
java
import java.util.Set; public abstract interface db<K, V> extends Iterable<V> { public abstract V c(K paramK); public abstract void a(K paramK, V paramV); public abstract Set<K> c(); }
[ "admin@timo.de.vc" ]
admin@timo.de.vc
84c680947c21d0d99c5498f905364fa4c45da9b0
5b8337c39cea735e3817ee6f6e6e4a0115c7487c
/sources/com/pierfrancescosoffritti/androidyoutubeplayer/BuildConfig.java
0c13c441b8319b9be6ac7860279d416b704f8ebf
[]
no_license
karthik990/G_Farm_Application
0a096d334b33800e7d8b4b4c850c45b8b005ccb1
53d1cc82199f23517af599f5329aa4289067f4aa
refs/heads/master
2022-12-05T06:48:10.513509
2020-08-10T14:46:48
2020-08-10T14:46:48
286,496,946
1
0
null
null
null
null
UTF-8
Java
false
false
439
java
package com.pierfrancescosoffritti.androidyoutubeplayer; public final class BuildConfig { public static final String APPLICATION_ID = "com.pierfrancescosoffritti.androidyoutubeplayer"; public static final String BUILD_TYPE = "release"; public static final boolean DEBUG = false; public static final String FLAVOR = ""; public static final int VERSION_CODE = 8; public static final String VERSION_NAME = "8.0.1"; }
[ "knag88@gmail.com" ]
knag88@gmail.com
37cc3ca48f78f5ae1d3a09302f6fdb14d57e4b90
5a8fc00e07c1503215c85e544fa1f3bb9b4706ce
/app/src/main/java/com/movies/fragment/CategoryFragment.java
f3a46ace5fc68fc822dc9d7a16e6d43ed33168b0
[]
no_license
fandofastest/radjamovies
29eb7d6329c7b9e74c72073527ef0d2959152742
b97d62c991a15186a8aa16ae1a285b0668b1f7cd
refs/heads/master
2020-11-29T18:55:39.906552
2019-12-26T04:26:30
2019-12-26T04:26:30
230,194,498
1
0
null
null
null
null
UTF-8
Java
false
false
4,048
java
package com.movies.fragment; import android.os.AsyncTask; import android.os.Bundle; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import com.movies.adapter.ApCategory; import com.movies.setting.config; import com.movies.setting.item_ctgory; import com.statailo.cinemaxhd.R; import com.movies.setting.JsonUtils; import com.wang.avi.AVLoadingIndicatorView; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; public class CategoryFragment extends Fragment { ArrayList<item_ctgory> mListItem; public RecyclerView recyclerView; ApCategory adapter; private AVLoadingIndicatorView progressBar; private LinearLayout lyt_not_found; @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.item_more, container, false); mListItem = new ArrayList<>(); lyt_not_found = (LinearLayout) rootView.findViewById(R.id.lyt_not_found); progressBar = (AVLoadingIndicatorView) rootView.findViewById(R.id.progressBar); recyclerView = (RecyclerView) rootView.findViewById(R.id.vertical_courses_list); int columns = getResources().getInteger(R.integer.col_cat); recyclerView.setHasFixedSize(true); recyclerView.setLayoutManager(new GridLayoutManager(getActivity(), columns)); if (JsonUtils.isNetworkAvailable(getActivity())) { new getCategory().execute(config.CATEGORY_LINK); } return rootView; } private class getCategory extends AsyncTask<String, Void, String> { @Override protected void onPreExecute() { super.onPreExecute(); showProgress(true); } @Override protected String doInBackground(String... params) { return JsonUtils.getJSONString(params[0]); } @Override protected void onPostExecute(String result) { super.onPostExecute(result); showProgress(false); if (null == result || result.length() == 0) { lyt_not_found.setVisibility(View.VISIBLE); } else { try { JSONObject mainJson = new JSONObject(result); JSONArray jsonArray = mainJson.getJSONArray(config.ARRAY_NAME); JSONObject objJson; for (int i = 0; i < jsonArray.length(); i++) { objJson = jsonArray.getJSONObject(i); item_ctgory objItem = new item_ctgory(); objItem.setCategoryId(objJson.getInt(config.CAT_CID)); objItem.setCatName(objJson.getString(config.CAT_NAME)); objItem.setCatImage(objJson.getString(config.CAT_IMAGE)); mListItem.add(objItem); } } catch (JSONException e) { e.printStackTrace(); } displayData(); } } } private void displayData() { adapter = new ApCategory(getActivity(), mListItem); recyclerView.setAdapter(adapter); if (adapter.getItemCount() == 0) { lyt_not_found.setVisibility(View.VISIBLE); } else { lyt_not_found.setVisibility(View.GONE); } } private void showProgress(boolean show) { if (show) { progressBar.setVisibility(View.VISIBLE); recyclerView.setVisibility(View.GONE); lyt_not_found.setVisibility(View.GONE); } else { progressBar.setVisibility(View.GONE); recyclerView.setVisibility(View.VISIBLE); } } }
[ "fandofast@gmail.com" ]
fandofast@gmail.com
431e084b63354060a80a6040acb1f5d410ede1f9
c890e2c73323267f4d23c3020dcaeb7d89830e66
/app/src/main/java/com/vijayelectronics/utils/ValidateInputs.java
30f298f4f35cd26c344ffadc4db254b13ece4f73
[]
no_license
KarthikDigit/VijayElectronics
07d841ba62b1bbca3fdebffd734a77302bd73e38
b3852bffa212e3ec01c1434e2f414b00391a0574
refs/heads/master
2022-05-29T22:07:48.729717
2020-04-30T07:04:10
2020-04-30T07:04:10
260,137,591
0
0
null
null
null
null
UTF-8
Java
false
false
3,991
java
package com.vijayelectronics.utils; import android.text.TextUtils; import android.util.Patterns; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * ValidateInputs class has different static methods, to validate different types of user Inputs **/ public class ValidateInputs { private static String blockCharacters = "[$&+~;=\\\\?|/'<>^*%!-]"; //*********** Validate Email Address ********// public static boolean isValidEmail(String email) { return !TextUtils.isEmpty(email) && Patterns.EMAIL_ADDRESS.matcher(email).matches(); } //*********** Validate Name Input ********// public static boolean isValidName(String name) { String regExpn = "^([a-zA-Z ]{1,24})+$"; if (name.equalsIgnoreCase("")) return false; CharSequence inputStr = name; Pattern pattern = Pattern.compile(blockCharacters, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); return !pattern.matcher(inputStr).find(); } //*********** Validate User Login ********// public static boolean isValidLogin(String login) { String regExpn = "^([a-zA-Z]{4,24})?([a-zA-Z][a-zA-Z0-9_]{4,24})$"; CharSequence inputStr = login; Pattern pattern = Pattern.compile(regExpn, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); return matcher.matches(); } //*********** Validate Password Input ********// public static boolean isValidPassword(String password) { String regExpn = "^[a-z0-9_$@.!%*?&]{6,24}$"; CharSequence inputStr = password; Pattern pattern = Pattern.compile(regExpn, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); return matcher.matches(); } //*********** Validate Phone Number********// public static boolean isValidPhoneNo(String phoneNo) { return !TextUtils.isEmpty(phoneNo) && Patterns.PHONE.matcher(phoneNo).matches(); } //*********** Validate Number Input ********// public static boolean isValidNumber(String number) { String regExpn = "^[0-9]{1,24}$"; CharSequence inputStr = number; Pattern pattern = Pattern.compile(regExpn, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); return matcher.matches(); } //*********** Validate Any Input ********// public static boolean isValidInput(String input) { String regExpn = "(.*?)?((?:[a-z][a-z]+))"; if (input.equalsIgnoreCase("")) return false; CharSequence inputStr = input; Pattern pattern = Pattern.compile(blockCharacters, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); return !pattern.matcher(inputStr).find(); } //*********** Validate Any Input ********// public static boolean isIfValidInput(String input) { CharSequence inputStr = input; Pattern pattern = Pattern.compile(blockCharacters, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); return !pattern.matcher(inputStr).find(); } //*********** Validate Search Query ********// public static boolean isValidSearchQuery(String query) { String regExpn = "^([a-zA-Z]{1,24})?([a-zA-Z][a-zA-Z0-9_]{1,24})$"; CharSequence inputStr = query; Pattern pattern = Pattern.compile(regExpn, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); return matcher.matches(); } }
[ "kapw001@gmail.com" ]
kapw001@gmail.com
1f7f8b2e4417e88b74e6087eb2e2d5c1a5f117b1
87901d9fd3279eb58211befa5357553d123cfe0c
/bin/ext-commerce/commercefacades/testsrc/de/hybris/platform/commercefacades/order/converters/populator/ZoneDeliveryModePopulatorTest.java
38460dcfa9d1f1ba66f0bb24f602a850e2ba2b6a
[]
no_license
prafullnagane/learning
4d120b801222cbb0d7cc1cc329193575b1194537
02b46a0396cca808f4b29cd53088d2df31f43ea0
refs/heads/master
2020-03-27T23:04:17.390207
2014-02-27T06:19:49
2014-02-27T06:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,092
java
/* * [y] hybris Platform * * Copyright (c) 2000-2013 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.platform.commercefacades.order.converters.populator; import de.hybris.bootstrap.annotations.UnitTest; import de.hybris.platform.commercefacades.order.data.ZoneDeliveryModeData; import de.hybris.platform.commerceservices.util.ConverterFactory; import de.hybris.platform.converters.impl.AbstractPopulatingConverter; import de.hybris.platform.deliveryzone.model.ZoneDeliveryModeModel; import org.junit.Before; import org.junit.Test; import junit.framework.Assert; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; @UnitTest public class ZoneDeliveryModePopulatorTest { private AbstractPopulatingConverter<ZoneDeliveryModeModel, ZoneDeliveryModeData> zoneDeliveryModeConverter = new ConverterFactory<ZoneDeliveryModeModel, ZoneDeliveryModeData, ZoneDeliveryModePopulator>().create(ZoneDeliveryModeData.class, new ZoneDeliveryModePopulator()); @Before public void setUp() { //Do Nothing } @Test public void testConvert() { final ZoneDeliveryModeModel zoneDeliveryModeModel = mock(ZoneDeliveryModeModel.class); given(zoneDeliveryModeModel.getCode()).willReturn("code"); given(zoneDeliveryModeModel.getName()).willReturn("name"); given(zoneDeliveryModeModel.getDescription()).willReturn("desc"); final ZoneDeliveryModeData zoneDeliveryModeData = zoneDeliveryModeConverter.convert(zoneDeliveryModeModel); Assert.assertEquals("code", zoneDeliveryModeData.getCode()); Assert.assertEquals("name", zoneDeliveryModeData.getName()); Assert.assertEquals("desc", zoneDeliveryModeData.getDescription()); } @Test(expected = IllegalArgumentException.class) public void testConvertNull() { zoneDeliveryModeConverter.convert(null); } }
[ "admin1@neev31.(none)" ]
admin1@neev31.(none)
8d837309a18b991f4c54dd647dec8f246786730b
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/yauaa/learning/2188/ParseUserAgentFunction.java
d1a3155f0f4f75c6c21e492739bbf60d7ab82b3c
[]
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
3,088
java
/* * Yet Another UserAgent Analyzer * Copyright (C) 2013-2018 Niels Basjes * * 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 * * https://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 nl.basjes.parse.useragent.drill; import io.netty.buffer.DrillBuf; import org.apache.drill.exec.expr.DrillSimpleFunc; import org.apache.drill.exec.expr.annotations.FunctionTemplate; import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.NullableVarCharHolder; import org.apache.drill.exec.vector.complex.writer.BaseWriter; import javax.inject.Inject; @FunctionTemplate( name = "parse_user_agent", scope = FunctionTemplate.FunctionScope.SIMPLE, nulls = FunctionTemplate.NullHandling.NULL_IF_NULL ) public class ParseUserAgentFunction implements DrillSimpleFunc { @Param NullableVarCharHolder input; @Output BaseWriter.ComplexWriter outWriter; @Inject DrillBuf outBuffer; @Workspace nl.basjes.parse .useragent.UserAgentAnalyzer uaa; @Workspace java.util.List<String> allFields; public void setup() { uaa = nl.basjes.parse.useragent.drill.UserAgentAnalyzerPreLoader.getInstance(); allFields = uaa.getAllPossibleFieldNamesSorted(); } public void eval() { org.apache.drill.exec.vector.complex.writer.BaseWriter.MapWriter queryMapWriter = outWriter.rootAsMap(); if (input.buffer == null) { return; } String userAgentString = org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(input.start, input.end, input.buffer); if (userAgentString.isEmpty() || userAgentString.equals("null")) { userAgentString = ""; } nl.basjes.parse.useragent.UserAgent agent = uaa.parse(userAgentString); for (String fieldName: agent.getAvailableFieldNamesSorted()) { org.apache.drill.exec.expr.holders.VarCharHolder rowHolder = new org.apache.drill.exec.expr.holders.VarCharHolder(); String field = agent.getValue(fieldName); if (field == null) { field = "Unknown"; } byte[] rowStringBytes = field.getBytes(); outBuffer.reallocIfNeeded(rowStringBytes.length); outBuffer.setBytes(0, rowStringBytes); rowHolder.start = 0; rowHolder.end = rowStringBytes.length; rowHolder.buffer = outBuffer; queryMapWriter.varChar(fieldName).write(rowHolder); } } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
dfff2a33cfb309a3b6f381d81d6d26b37835485d
09171166d8be8e35a4b6dbde8beacd27460dabbb
/lib/src/main/java/com/dyh/common/lib/weigit/picker/entity/Province.java
0596db93a47edaf05f83dc53f2e31bfb1fd6fda4
[ "ICU" ]
permissive
dongyonghui/CommonLib
d51c99f15258e54344fed6dfdacc0c3aa0c08017
a57fb995898644bb7b4bcd259417aca1e11944c9
refs/heads/master
2021-07-20T06:58:19.536087
2021-01-11T09:05:26
2021-01-11T09:05:26
233,981,794
12
2
null
null
null
null
UTF-8
Java
false
false
783
java
package com.dyh.common.lib.weigit.picker.entity; import java.util.ArrayList; import java.util.List; /** * 省份 * <br/> * Author:李玉江[QQ:1032694760] * DateTime:2016-10-15 19:06 * Builder:Android Studio */ public class Province extends Area implements LinkageFirst<City> { private List<City> cities = new ArrayList<>(); public Province() { super(); } public Province(String areaName) { super(areaName); } public Province(String areaId, String areaName) { super(areaId, areaName); } public List<City> getCities() { return cities; } public void setCities(List<City> cities) { this.cities = cities; } @Override public List<City> getSeconds() { return cities; } }
[ "648731994@qq.com" ]
648731994@qq.com
21462713f930046e87729f0745cf190eaad29034
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_22620.java
c27e977c243ac510d34b8b7b28282df5752a7e01
[]
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
848
java
/** * Set the default L & F. While I enjoy the bounty of the sixteen possible exception types that this UIManager method might throw, I feel that in just this one particular case, I'm being spoiled by those engineers at Sun, those Masters of the Abstractionverse. So instead, I'll pretend that I'm not offered eleven dozen ways to report to the user exactly what went wrong, and I'll bundle them all into a single catch-all "Exception". Because in the end, all I really care about is whether things worked or not. And even then, I don't care. * @throws Exception Just like I said. */ public void setLookAndFeel() throws Exception { String laf=Preferences.get("editor.laf"); if (laf == null || laf.length() == 0) { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } else { UIManager.setLookAndFeel(laf); } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
3da4cea4e5d6338f7867a4cc675951f8dc51db20
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.3.5/sources/io/fabric/sdk/android/services/persistence/PreferenceStore.java
67bf398daf58d87eb5cc29c777480cf2197eb2a0
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
265
java
package io.fabric.sdk.android.services.persistence; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; public interface PreferenceStore { Editor edit(); SharedPreferences get(); boolean save(Editor editor); }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
0504dc070a85470c735a9ce3674d604b290ceaa2
6d01d0b0ed45a318ca3f4eb1baa215cbe458139e
/programprocessor/experiment-dataset/TrainingData/51CTO-java1200221/MR/077/src/FrameShowException.java
9fb359341a1ec9ab052d0605b6c1f22a4ccef05d
[]
no_license
yangyixiaof/gitcrawler
83444de5de1e0e0eb1cb2f1e2f39309f10b52eb5
f07f0525bcb33c054820cf27e9ff73aa591ed3e0
refs/heads/master
2022-09-16T20:07:56.380308
2020-04-12T17:03:02
2020-04-12T17:03:02
46,218,938
0
1
null
2022-09-01T22:36:18
2015-11-15T13:36:48
Java
GB18030
Java
false
false
3,644
java
import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.border.EmptyBorder; public class FrameShowException extends JFrame { private JPanel contentPane; private JTextField textField; private JTextArea textArea; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { FrameShowException frame = new FrameShowException(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ public FrameShowException() { setTitle("\u663E\u793A\u5F02\u5E38\u4FE1\u606F"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 450, 253); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JLabel label = new JLabel( "\u8BF7\u8F93\u5165\u975E\u6570\u5B57\u5B57\u7B26\u4E32\uFF0C\u67E5\u770B\u8F6C\u6362\u4E3A\u6570\u5B57\u65F6\u53D1\u751F\u7684\u5F02\u5E38\u3002"); label.setBounds(10, 10, 414, 15); contentPane.add(label); textField = new JTextField(); textField.setBounds(10, 32, 248, 21); contentPane.add(textField); textField.setColumns(10); JButton btninteger = new JButton( "\u8F6C\u6362\u4E3AInteger\u7C7B\u578B"); btninteger.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { do_btninteger_actionPerformed(e); } }); btninteger.setBounds(268, 31, 156, 23); contentPane.add(btninteger); JScrollPane scrollPane = new JScrollPane(); scrollPane.setOpaque(false); scrollPane.setBounds(10, 63, 414, 142); contentPane.add(scrollPane); textArea = new JTextArea(); textArea.setText("\u4FE1\u606F\u63D0\u793A\u6846"); textArea.setEditable(false); scrollPane.setViewportView(textArea); } protected void do_btninteger_actionPerformed(ActionEvent e) { // 创建字节数组输出流 ByteArrayOutputStream stream = new ByteArrayOutputStream(); System.setErr(new PrintStream(stream));// 重定向err输出流 String numStr = textField.getText();// 获取用户输入 try { Integer value = Integer.valueOf(numStr);// 字符串转整数 } catch (NumberFormatException e1) { e1.printStackTrace();// 输出错误异常信息 } String info = stream.toString();// 获取字节输出流的字符串 if (info.isEmpty()) {// 显示正常转换的提示信息 textArea.setText("字符串到Integer的转换没有发生异常。"); } else {// 显示出现异常的提示信息与异常 textArea.setText("错错啦!转换过程中出现了如下异常错误:\n" + info); } } }
[ "yyx@ubuntu" ]
yyx@ubuntu
f9c4960f455b35ac2d00bf88ebbb24ddfb1cbdd8
6082617095733f812176af96d92c6ced1c0ab5e9
/app/src/androidTest/java/com/qdxiaogutou/eye/ApplicationTest.java
e50d9f6e9861c2c0ab48cb46634dc0799f2366f4
[]
no_license
IceSeaOnly/SmsMailerBoss
7de3847a1271a69acf795d9d5ce6be89173bc2b4
2a00f04c29c496a27bda7cf295d32ed1b07c521d
refs/heads/master
2021-01-11T15:26:49.636287
2017-02-27T13:44:30
2017-02-27T13:44:30
80,343,652
1
1
null
null
null
null
UTF-8
Java
false
false
350
java
package com.qdxiaogutou.eye; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "1041414957@qq.com" ]
1041414957@qq.com
8c5f00e72b2a6fd719c9641ebcedcae98cde484d
fda1ee633e8dbaae791da9a5e6c747c4d3cf50df
/faceye-hadoop-manager/src/main/java/com/faceye/component/hadoop/service/stock/mapreduce/DailyDataKeyComparator.java
2632e44ac77b20abb6e915839c99fea47b53607e
[]
no_license
haipenge/faceye-hadoop
4670fbd55f1cd63bbeb0e962c3851cef3426b48a
1dff867c820eee16da408ec4d91a089f2a1b0e1b
refs/heads/master
2021-01-22T02:17:17.733570
2018-04-02T13:08:08
2018-04-02T13:08:08
92,345,654
1
0
null
null
null
null
UTF-8
Java
false
false
743
java
package com.faceye.component.hadoop.service.stock.mapreduce; import org.apache.hadoop.io.WritableComparable; import org.apache.hadoop.io.WritableComparator; public class DailyDataKeyComparator extends WritableComparator { public DailyDataKeyComparator() { super(DailyDataKey.class, true); } public int compare(WritableComparable combinationKeyOne, WritableComparable combinationKeyOther) { int res = 0; DailyDataKey key1 = (DailyDataKey) combinationKeyOne; DailyDataKey key2 = (DailyDataKey) combinationKeyOther; // res=key1.getDate().compareTo(key2.getDate()); // return res; res = key1.getStockId().compareTo(key2.getStockId()); if (res == 0) { res = key2.getDate().compareTo(key1.getDate()); } return res; } }
[ "haipenge@gmail.com" ]
haipenge@gmail.com
2622de6d4fdec1b0bbd633aba6d81e530572a965
3c9a3770e21b032b10f128f5c82e95600daf7fdb
/src/main/java/io/github/ititus/commons/math/expression/Expression.java
3721b53cd88389e8768f96551713040824892820
[ "MIT" ]
permissive
iTitus/commons
fcfdde28741693a25d5aedd7cd39583e48f0f825
5cf41dc4570bc2a0f8d37c6d0ab2f7d3c2a5136a
refs/heads/main
2023-08-05T09:36:22.550572
2023-07-24T21:20:07
2023-07-24T21:20:07
217,306,753
0
2
MIT
2023-09-04T18:53:28
2019-10-24T13:31:34
Java
UTF-8
Java
false
false
476
java
package io.github.ititus.commons.math.expression; import io.github.ititus.commons.math.number.BigComplex; public abstract class Expression { public abstract BigComplex evaluate(ComplexEvaluationContext ctx); protected abstract String toString(boolean inner); @Override public final String toString() { return toString(false); } @Override public abstract boolean equals(Object o); @Override public abstract int hashCode(); }
[ "iTitus@users.noreply.github.com" ]
iTitus@users.noreply.github.com
4c0b1d1119f8a43cb953520b4621996427c8f7e0
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/devops-20210625/src/main/java/com/aliyun/devops20210625/models/ListHostGroupsResponse.java
9de596b0e50e1a88981a194cc437e6fe9b2539bd
[ "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
1,360
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.devops20210625.models; import com.aliyun.tea.*; public class ListHostGroupsResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public ListHostGroupsResponseBody body; public static ListHostGroupsResponse build(java.util.Map<String, ?> map) throws Exception { ListHostGroupsResponse self = new ListHostGroupsResponse(); return TeaModel.build(map, self); } public ListHostGroupsResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public ListHostGroupsResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public ListHostGroupsResponse setBody(ListHostGroupsResponseBody body) { this.body = body; return this; } public ListHostGroupsResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
59a9b2fb319d27e78a9a50dc1c11bc8879413ba1
41db913e9df0d55af2c3ed47f61e4d4659e81d38
/src/main/java/cn/ccb/pattern/creational/abstractfactory/JavaVideo.java
e4a706547f46c3a46e8fb5de3e2aa65cd862bd58
[]
no_license
2568808909/desgin_pattern
522df720066b8e3c8d4a00b7aff762a45f1a8cb6
9bb56e1a77cd8e94fc851c44bdd9d64ddda17e7d
refs/heads/master
2020-07-26T09:06:32.255446
2020-06-21T13:05:50
2020-06-21T13:05:50
208,598,592
0
0
null
null
null
null
UTF-8
Java
false
false
175
java
package cn.ccb.pattern.creational.abstractfactory; public class JavaVideo extends Video { public void produce() { System.out.println("录制java视频"); } }
[ "2568808909@qq.com" ]
2568808909@qq.com
081fe1a9738419fd967cba64ff7486df7779fd1b
8692972314994b8923b6f12b7ae9e76b30a36391
/memory_managment/ClassesList/src/Class156.java
e66a77d432e33723cdbfe3f70dab93cfb7e23055
[]
no_license
Petrash-Samoilenka/2017W-D2D3-ST-Petrash-Samoilenka
d2cd65c1d10bec3c4d1b69b124d4f0aeef1d7308
214fbb3682ef6714514af86cc9eaca62f02993e1
refs/heads/master
2020-05-27T15:04:52.163194
2017-06-16T14:19:38
2017-06-16T14:19:38
82,560,968
1
0
null
null
null
null
UTF-8
Java
false
false
3,746
java
public class Class156 extends Class1 { private String _s1; private String _s2; private String _s3; private String _s4; private String _s5; private String _s6; private String _s7; private String _s8; public Class156() { } public void getValue1(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue2(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue3(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue4(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue5(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue6(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue7(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue8(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue9(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue10(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue11(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue12(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue13(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue14(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue15(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue16(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue17(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue18(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue19(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } public void getValue20(String s1, String s2, String s3, String s4, String s5, String s6, String s7, String s8) { _s1 = s1; _s2 = s2; _s3 = s3; _s4 = s4; } }
[ "rn.samoylenko@gmail.com" ]
rn.samoylenko@gmail.com
39864829e8672a911303113436eeae9725c31fb8
7c31053c98962d5405b5be629f528c03d12fc256
/common/net/minecraftforge/inventory/IStackFilter.java
4c2983ed0c97056e01c0a7ac494f16528d2899a0
[]
no_license
immibis/MinecraftForge
6f950179617f5f38eea907263160a0f5658c724c
ab7f9bef46b9709472bd338115860688bcc48da1
refs/heads/master
2021-01-17T22:33:26.947373
2013-02-26T09:29:08
2013-02-26T09:29:08
8,178,403
0
0
null
null
null
null
UTF-8
Java
false
false
625
java
package net.minecraftforge.inventory; import net.minecraft.item.ItemStack; public interface IStackFilter { /** * Returns true if the given item matches this filter. The stack size is * ignored. * * @param item * The item to match. * @return True if the item matches the filter. */ boolean matchesItem(ItemStack item); /** * A default filter that matches any item. */ static final IStackFilter MATCH_ANY = new IStackFilter() { @Override public boolean matchesItem(ItemStack item) { return true; } }; }
[ "immibis@gmail.com" ]
immibis@gmail.com
002673b05e5a240eda54569a5d19008cc99e0639
b34654bd96750be62556ed368ef4db1043521ff2
/cockpit_facade_util/branches/bugr_r3/src/java/tests/com/topcoder/service/util/UnitTests.java
3f99a7fab617b2f8f87d916e3ec5fb747ed3f2ba
[]
no_license
topcoder-platform/tcs-cronos
81fed1e4f19ef60cdc5e5632084695d67275c415
c4ad087bb56bdaa19f9890e6580fcc5a3121b6c6
refs/heads/master
2023-08-03T22:21:52.216762
2019-03-19T08:53:31
2019-03-19T08:53:31
89,589,444
0
1
null
2019-03-19T08:53:32
2017-04-27T11:19:01
null
UTF-8
Java
false
false
683
java
/* * Copyright (C) 2010 TopCoder Inc., All Rights Reserved. */ package com.topcoder.service.util; import com.topcoder.service.util.gameplan.SoftwareProjectDataTests; import com.topcoder.service.util.gameplan.StudioProjectDataTests; import com.topcoder.service.util.gameplan.TCDirectProjectGamePlanDataTests; import org.junit.runner.RunWith; import org.junit.runners.Suite; /** * <p>This test case aggregates all Unit test cases.</p> * * @author FireIce * @version 1.0 */ @RunWith(Suite.class) @Suite.SuiteClasses( {SoftwareProjectDataTests.class, StudioProjectDataTests.class, TCDirectProjectGamePlanDataTests.class }) public class UnitTests { }
[ "mashannon168@fb370eea-3af6-4597-97f7-f7400a59c12a" ]
mashannon168@fb370eea-3af6-4597-97f7-f7400a59c12a
ecb1e4001ca78ed9cbec8501109552ebc569c057
10378c580b62125a184f74f595d2c37be90a5769
/org/apache/commons/lang3/concurrent/ConcurrentUtils.java
97185d17a6ff075a1a147f4a5e22d0a6fb20e833
[]
no_license
ClientPlayground/Melon-Client
4299d7f3e8f2446ae9f225c0d7fcc770d4d48ecb
afc9b11493e15745b78dec1c2b62bb9e01573c3d
refs/heads/beta-v2
2023-04-05T20:17:00.521159
2021-03-14T19:13:31
2021-03-14T19:13:31
347,509,882
33
19
null
2021-03-14T19:13:32
2021-03-14T00:27:40
null
UTF-8
Java
false
false
3,414
java
package org.apache.commons.lang3.concurrent; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; public class ConcurrentUtils { public static ConcurrentException extractCause(ExecutionException ex) { if (ex == null || ex.getCause() == null) return null; throwCause(ex); return new ConcurrentException(ex.getMessage(), ex.getCause()); } public static ConcurrentRuntimeException extractCauseUnchecked(ExecutionException ex) { if (ex == null || ex.getCause() == null) return null; throwCause(ex); return new ConcurrentRuntimeException(ex.getMessage(), ex.getCause()); } public static void handleCause(ExecutionException ex) throws ConcurrentException { ConcurrentException cex = extractCause(ex); if (cex != null) throw cex; } public static void handleCauseUnchecked(ExecutionException ex) { ConcurrentRuntimeException crex = extractCauseUnchecked(ex); if (crex != null) throw crex; } static Throwable checkedException(Throwable ex) { if (ex != null && !(ex instanceof RuntimeException) && !(ex instanceof Error)) return ex; throw new IllegalArgumentException("Not a checked exception: " + ex); } private static void throwCause(ExecutionException ex) { if (ex.getCause() instanceof RuntimeException) throw (RuntimeException)ex.getCause(); if (ex.getCause() instanceof Error) throw (Error)ex.getCause(); } public static <T> T initialize(ConcurrentInitializer<T> initializer) throws ConcurrentException { return (initializer != null) ? initializer.get() : null; } public static <T> T initializeUnchecked(ConcurrentInitializer<T> initializer) { try { return initialize(initializer); } catch (ConcurrentException cex) { throw new ConcurrentRuntimeException(cex.getCause()); } } public static <K, V> V putIfAbsent(ConcurrentMap<K, V> map, K key, V value) { if (map == null) return null; V result = map.putIfAbsent(key, value); return (result != null) ? result : value; } public static <K, V> V createIfAbsent(ConcurrentMap<K, V> map, K key, ConcurrentInitializer<V> init) throws ConcurrentException { if (map == null || init == null) return null; V value = map.get(key); if (value == null) return putIfAbsent(map, key, init.get()); return value; } public static <K, V> V createIfAbsentUnchecked(ConcurrentMap<K, V> map, K key, ConcurrentInitializer<V> init) { try { return createIfAbsent(map, key, init); } catch (ConcurrentException cex) { throw new ConcurrentRuntimeException(cex.getCause()); } } public static <T> Future<T> constantFuture(T value) { return new ConstantFuture<T>(value); } static final class ConstantFuture<T> implements Future<T> { private final T value; ConstantFuture(T value) { this.value = value; } public boolean isDone() { return true; } public T get() { return this.value; } public T get(long timeout, TimeUnit unit) { return this.value; } public boolean isCancelled() { return false; } public boolean cancel(boolean mayInterruptIfRunning) { return false; } } }
[ "Hot-Tutorials@users.noreply.github.com" ]
Hot-Tutorials@users.noreply.github.com
4ac35a8ddec362987943bda4d8fc19d34e70e3d8
eeffa8e086068b3b1986b220a1a158de902a7ac1
/app/src/main/java/com/kunminx/puremusic/ui/page/adapter/PlaylistAdapter.java
1db86eccc3307f81d38c5d4e488746127effe5f3
[ "Apache-2.0" ]
permissive
yangyugee/Jetpack-MVVM-Best-Practice
cc81a41c7122ac7302c95948aeb58c556172cf36
6b69074580a920aca6e5abb5b0e4c1363d76455c
refs/heads/master
2023-07-07T08:57:15.101098
2020-07-18T17:25:36
2020-07-18T17:25:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,902
java
/* * Copyright 2018-2020 KunMinX * * 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.kunminx.puremusic.ui.page.adapter; import android.content.Context; import android.graphics.Color; import androidx.recyclerview.widget.RecyclerView; import com.kunminx.architecture.ui.adapter.SimpleDataBindingAdapter; import com.kunminx.puremusic.R; import com.kunminx.puremusic.data.bean.TestAlbum; import com.kunminx.puremusic.databinding.AdapterPlayItemBinding; import com.kunminx.puremusic.player.PlayerManager; /** * Create by KunMinX at 20/4/19 */ public class PlaylistAdapter extends SimpleDataBindingAdapter<TestAlbum.TestMusic, AdapterPlayItemBinding> { public PlaylistAdapter(Context context) { super(context, R.layout.adapter_play_item, DiffUtils.getInstance().getTestMusicItemCallback()); setOnItemClickListener(((item, position) -> { PlayerManager.getInstance().playAudio(position); })); } @Override protected void onBindItem(AdapterPlayItemBinding binding, TestAlbum.TestMusic item, RecyclerView.ViewHolder holder) { binding.setAlbum(item); int currentIndex = PlayerManager.getInstance().getAlbumIndex(); binding.ivPlayStatus.setColor(currentIndex == holder.getAdapterPosition() ? binding.getRoot().getContext().getResources().getColor(R.color.gray) : Color.TRANSPARENT); } }
[ "kunminx@gmail.com" ]
kunminx@gmail.com
1177fff63249c44226cd3c73cc98c37c0c9b630f
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes2.dex_source_from_JADX/com/facebook/photos/creativeediting/swipeable/prompt/FramePromptProvider.java
d9efe65eeb31fd79e238f7dd867ec34774f33bdb
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
233
java
package com.facebook.photos.creativeediting.swipeable.prompt; import com.facebook.inject.AbstractAssistedProvider; /* compiled from: mobile_data */ public class FramePromptProvider extends AbstractAssistedProvider<FramePrompt> { }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
62bafc6678b68680f17555ad0efbda3f5b0a5252
88cfbdc25670de1fba59c029d96acb3abf9900e6
/JavaLectures/src/Week8_ogrenci/Ogr.java
b814fa56e28e7bcbc74e51ab016b6bfff3352522
[]
no_license
hakankocaknyc/JavaLectures
e6c6754280ed6d4e1a4294df798db95e51369085
940b5c9a1ea45d47bd9b6a157549d1a57c1e9571
refs/heads/master
2022-12-05T05:10:13.468985
2020-08-22T17:36:43
2020-08-22T17:36:43
286,625,020
0
0
null
null
null
null
UTF-8
Java
false
false
487
java
package Week8_ogrenci; public abstract class Ogr { private String isim; private int no; public Ogr(String isim, int no) { super(); this.isim = isim; this.no = no; } public abstract void bolumSoyle(); public void adsoyle(){ System.out.println(" Adim : " + isim); } public String getIsim() { return isim; } public void setIsim(String isim) { this.isim = isim; } public int getNo() { return no; } public void setNo(int no) { this.no = no; } }
[ "you@example.com" ]
you@example.com
94328a863beef0a2a6e8bb765af57e86c583978c
4cebe0d2407e5737a99d67c99ab84ca093f11cff
/src/multithread/chapter6/demo04DCLofLasySingleton/Run.java
94782ebb5923aa6a3baddd72715ca9a4b10c3bef
[]
no_license
MoXiaogui0301/MultiThread-Program
049be7ca7084955cb2a2372bf5acb3e9584f4086
1492e1add980342fbbcc2aed7866efca119998c9
refs/heads/master
2020-04-28T00:14:37.871448
2019-04-02T04:20:04
2019-04-02T04:20:04
174,808,187
1
0
null
null
null
null
UTF-8
Java
false
false
531
java
package multithread.chapter6.demo04DCLofLasySingleton; /** * P270 * DCL(双检查锁机制)实现多线程环境中的延迟加载单例设计模式 * 在同步代码块(创建对象)之前进行两次非空判断 * * Result: * 438618715 * 438618715 * 438618715 * */ public class Run { public static void main(String[] args) { MyThread th1 = new MyThread(); MyThread th2 = new MyThread(); MyThread th3 = new MyThread(); th1.start(); th2.start(); th3.start(); } }
[ "361941176@qq.com" ]
361941176@qq.com
e36be0b7a4725ac5d47a541362ad8f310ad09d10
ed28460c5d24053259ab189978f97f34411dfc89
/Software Engineering/Java Fundamentals/Java OOP Advanced/Lab/BashSoft/src/main/bg/softuni/io/commands/MakeDirectoryCommand.java
f69b83c7ad56a528fc3cab405bb88178768b0cd2
[]
no_license
Dimulski/SoftUni
6410fa10ba770c237bac617205c86ce25c5ec8f4
7954b842cfe0d6f915b42702997c0b4b60ddecbc
refs/heads/master
2023-01-24T20:42:12.017296
2020-01-05T08:40:14
2020-01-05T08:40:14
48,689,592
2
1
null
2023-01-12T07:09:45
2015-12-28T11:33:32
Java
UTF-8
Java
false
false
767
java
package main.bg.softuni.io.commands; import main.bg.softuni.annotations.Alias; import main.bg.softuni.annotations.Inject; import main.bg.softuni.contracts.DirectoryManager; import main.bg.softuni.exceptions.InvalidInputException; @Alias("mkdir") public class MakeDirectoryCommand extends Command { @Inject private DirectoryManager ioManager; public MakeDirectoryCommand(String input,String[] data) { super(input, data); } @Override public void execute() throws Exception { String[] data = this.getData(); if (data.length != 2) { throw new InvalidInputException(this.getInput()); } String folderName = data[1]; this.ioManager.createDirectoryInCurrentFolder(folderName); } }
[ "george.dimulski@gmail.com" ]
george.dimulski@gmail.com
a5a9efa5b71b38d2cdfad398e0f45c921026c52a
6482753b5eb6357e7fe70e3057195e91682db323
/io/netty/util/Timeout.java
4005a32bd0263e0df43bb1c1b70ba323763d60e0
[]
no_license
TheShermanTanker/Server-1.16.3
45cf9996afa4cd4d8963f8fd0588ae4ee9dca93c
48cc08cb94c3094ebddb6ccfb4ea25538492bebf
refs/heads/master
2022-12-19T02:20:01.786819
2020-09-18T21:29:40
2020-09-18T21:29:40
296,730,962
0
1
null
null
null
null
UTF-8
Java
false
false
188
java
package io.netty.util; public interface Timeout { Timer timer(); TimerTask task(); boolean isExpired(); boolean isCancelled(); boolean cancel(); }
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
9b9999f855608ccd622d1878ea5acaf67e4a2db7
35e5dc561b69b8014fb579d5cd671aa646ad5605
/serv/src/main/java/at/tugraz/sss/serv/datatype/par/SSEntitiesSharedWithUsersPar.java
8dbbaf54d3ed4d477a9f5fc4dc7bfb049d6a9e95
[ "Apache-2.0" ]
permissive
learning-layers/SocialSemanticServer
6a36e426586b6e73e0328a0d38b3a790417b8752
4d9402e11275b0cbbcb858f4c83d3ada165f3b91
refs/heads/master
2020-04-05T18:57:33.012817
2016-08-22T09:24:50
2016-08-22T09:24:50
17,632,122
6
4
null
2015-10-15T07:40:03
2014-03-11T13:54:18
Java
UTF-8
Java
false
false
1,557
java
/** * Code contributed to the Learning Layers project * http://www.learning-layers.eu * Development is partly funded by the FP7 Programme of the European Commission under * Grant Agreement FP7-ICT-318209. * Copyright (c) 2015, Graz University of Technology - KTI (Knowledge Technologies Institute). * For a list of contributors see the AUTHORS file at the top-level directory of this distribution. * * 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 at.tugraz.sss.serv.datatype.par; import at.tugraz.sss.serv.datatype.*; import at.tugraz.sss.serv.datatype.*; public class SSEntitiesSharedWithUsersPar { public SSUri user = null; public SSEntity circle = null; public boolean withUserRestriction = true; public SSEntitiesSharedWithUsersPar( final SSUri user, final SSEntity circle, final boolean withUserRestriction){ this.user = user; this.circle = circle; this.withUserRestriction = withUserRestriction; } }
[ "dtheiler@tugraz.at" ]
dtheiler@tugraz.at
788884536b56d4cd3979f9f798cc3426c653e7b7
67ec60c810cdd63eab37d54056a56f8094026065
/app/src/com/d2cmall/buyer/bean/PhotoDirectory.java
3a0161ac8796c188e08f9a3ee37a9b0a0fd2dfcb
[]
no_license
sinbara0813/fashion
2e2ef73dd99c71f2bebe0fc984d449dc67d5c4c5
4127db4963b0633cc3ea806851441bc0e08e6345
refs/heads/master
2020-08-18T04:43:25.753009
2019-10-25T02:28:47
2019-10-25T02:28:47
215,748,112
1
0
null
null
null
null
UTF-8
Java
false
false
2,032
java
package com.d2cmall.buyer.bean; import java.util.ArrayList; import java.util.List; /** * Created by donglua on 15/6/28. */ public class PhotoDirectory { private int id; private String coverPath; private String name; private long dateAdded; private List<Photo> photos = new ArrayList<>(); private boolean selected = false; @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof PhotoDirectory)) return false; PhotoDirectory directory = (PhotoDirectory) o; return id == directory.getId(); } public boolean isSelected() { return selected; } public void setSelected(boolean selected) { this.selected = selected; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getCoverPath() { return coverPath; } public void setCoverPath(String coverPath) { this.coverPath = coverPath; } public String getName() { return name; } public void setName(String name) { this.name = name; } public long getDateAdded() { return dateAdded; } public void setDateAdded(long dateAdded) { this.dateAdded = dateAdded; } public List<Photo> getPhotos() { return photos; } public void setPhotos(List<Photo> photos) { if (photos == null) return; for (int i = 0, j = 0, num = photos.size(); i < num; i++) { Photo p = photos.get(j); if (p == null) { photos.remove(j); } else { j++; } } this.photos = photos; } public List<String> getPhotoPaths() { List<String> paths = new ArrayList<>(photos.size()); for (Photo photo : photos) { paths.add(photo.getPath()); } return paths; } public void addPhoto(Photo photo) { photos.add(photo); } }
[ "940258169@qq.com" ]
940258169@qq.com
0eef3183769e7645b0c5051779aaf73cd15a498f
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_1/src/j/j/i/Calc_1_1_9984.java
65d54e6f67755e59677617bde064b54e4acce9f5
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package j.j.i; public class Calc_1_1_9984 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
5473b70a0af70d81674a9105981d82f0ace8ee29
425888a80686bb31f64e0956718d81efef5f208c
/src/test/java/com/aol/cyclops/react/base/BaseNumberOperationsTest.java
ca0cc7f4e311b97d74b35c51ab3e5322cb45421d
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
cybernetics/cyclops-react
ca34140519abfbe76750131f39133d31ba6770f2
f785d9bbe773acee5b07b602c0476dd58e19ef19
refs/heads/master
2021-01-22T13:08:10.590701
2016-04-22T12:41:13
2016-04-22T12:41:13
56,901,547
1
0
null
2016-04-23T05:07:15
2016-04-23T05:07:15
null
UTF-8
Java
false
false
2,970
java
package com.aol.cyclops.react.base; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.function.Supplier; import org.junit.Before; import org.junit.Test; import com.aol.cyclops.types.futurestream.LazyFutureStream; public abstract class BaseNumberOperationsTest { abstract protected <U> LazyFutureStream<U> of(U... array); abstract protected <U> LazyFutureStream<U> ofThread(U... array); abstract protected <U> LazyFutureStream<U> react(Supplier<U>... array); LazyFutureStream<Integer> empty; LazyFutureStream<Integer> nonEmpty; private static final Executor exec = Executors.newFixedThreadPool(1); @Before public void setup(){ empty = of(); nonEmpty = of(1); } @Test public void sumInt(){ assertThat(of(1,2,3,4).futureOperations(exec).sumInt(i->i).join(), equalTo(10)); } @Test public void sumDouble(){ assertThat(of(1.0,2.0,3.0,4.0).futureOperations(exec).sumDouble(i->i).join(), equalTo(10.0)); } @Test public void sumLong(){ assertThat(of(1l,2l,3l,4l).futureOperations(exec).sumLong(i->i).join(), equalTo(10l)); } @Test public void maxInt(){ assertThat(of(1,2,3,4).futureOperations(exec).maxInt(i->i).join().getAsInt(), equalTo(4)); } @Test public void maxDouble(){ assertThat(of(1.0,2.0,3.0,4.0).futureOperations(exec).maxDouble(i->i).join().getAsDouble(), equalTo(4.0)); } @Test public void maxLong(){ assertThat(of(1l,2l,3l,4l).futureOperations(exec).maxLong(i->i).join().getAsLong(), equalTo(4l)); } @Test public void minInt(){ assertThat(of(1,2,3,4).futureOperations(exec).minInt(i->i).join().getAsInt(), equalTo(1)); } @Test public void minDouble(){ assertThat(of(1.0,2.0,3.0,4.0).futureOperations(exec).minDouble(i->i).join().getAsDouble(), equalTo(1.0)); } @Test public void minLong(){ assertThat(of(1l,2l,3l,4l).futureOperations(exec).minLong(i->i).join().getAsLong(), equalTo(1l)); } @Test public void averageInt(){ assertThat(of(1,2,3,4).futureOperations(exec).averageInt(i->i).join().getAsDouble(), equalTo(2.5)); } @Test public void averageDouble(){ assertThat(of(1.0,2.0,3.0,4.0).futureOperations(exec).averageDouble(i->i).join().getAsDouble(), equalTo(2.5)); } @Test public void averageLong(){ assertThat(of(1l,2l,3l,4l).futureOperations(exec).averageLong(i->i).join().getAsDouble(), equalTo(2.5)); } @Test public void summaryStatsInt(){ assertThat(of(1,2,3,4).futureOperations(exec).summaryStatisticsInt(i->i).join().getSum(), equalTo(10L)); } @Test public void summaryStatsDouble(){ assertThat(of(1.0,2.0,3.0,4.0).futureOperations(exec) .summaryStatisticsDouble(i->i).join().getSum(), equalTo(10.0)); } @Test public void summaryStatsLong(){ assertThat(of(1l,2l,3l,4l).futureOperations(exec).summaryStatisticsLong(i->i).join().getSum(), equalTo(10l)); } }
[ "john.mcclean@teamaol.com" ]
john.mcclean@teamaol.com
2375b54329f756ca90fdbc3d8c4e9690b8cd4900
0d86a98cd6a6477d84152026ffc6e33e23399713
/kata/8-kyu/keep-hydrated-1/test/SolutionTest.java
8c5df6da7404206c6c84917e8e8832ed2551d03f
[ "MIT" ]
permissive
ParanoidUser/codewars-handbook
0ce82c23d9586d356b53070d13b11a6b15f2d6f7
692bb717aa0033e67995859f80bc7d034978e5b9
refs/heads/main
2023-07-28T02:42:21.165107
2023-07-27T12:33:47
2023-07-27T12:33:47
174,944,458
224
65
MIT
2023-09-14T11:26:10
2019-03-11T07:07:34
Java
UTF-8
Java
false
false
423
java
import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; class SolutionTest { @Test void sample() { assertEquals(1, new KeepHydrated().Liters(2)); assertEquals(0, new KeepHydrated().Liters(0.97)); assertEquals(7, new KeepHydrated().Liters(14.64)); assertEquals(40, new KeepHydrated().Liters(80)); assertEquals(800, new KeepHydrated().Liters(1600.20)); } }
[ "5120290+ParanoidUser@users.noreply.github.com" ]
5120290+ParanoidUser@users.noreply.github.com
9560927c1de55988d5139467d781841418222e0b
4804af90ee3408a9d8ac2516c3dc4d4487635ea5
/06_HelloMVC/src/com/kh/board/model/vo/Board.java
7ecf31e3a3baba0bce9dfdd40c4d4d9a62412178
[]
no_license
jiyeon0327/HelloMVC
3437aab706a99d3cb525b5f33efb4f7a3ddc8289
d690b7b1eb61990433eca17d2a11eda0f63f85d5
refs/heads/master
2020-07-19T18:13:57.494025
2019-09-25T12:53:49
2019-09-25T12:53:49
206,491,637
0
0
null
null
null
null
UTF-8
Java
false
false
2,690
java
package com.kh.board.model.vo; import java.sql.Date; public class Board { private int Board_no; private String Board_title; private String Board_writer; private String Board_content; private String Board_original_filename; private String Board_rename_filename; private Date Board_date; private int board_readcount; public Board() { // TODO Auto-generated constructor stub } public Board(int board_no, String board_title, String board_writer, String board_content, String board_original_filename, String board_rename_filename, Date board_date, int board_readcount) { super(); Board_no = board_no; Board_title = board_title; Board_writer = board_writer; Board_content = board_content; Board_original_filename = board_original_filename; Board_rename_filename = board_rename_filename; Board_date = board_date; this.board_readcount = board_readcount; } public int getBoard_no() { return Board_no; } public void setBoard_no(int board_no) { Board_no = board_no; } public String getBoard_title() { return Board_title; } public void setBoard_title(String board_title) { Board_title = board_title; } public String getBoard_writer() { return Board_writer; } public void setBoard_writer(String board_writer) { Board_writer = board_writer; } public String getBoard_content() { return Board_content; } public void setBoard_content(String board_content) { Board_content = board_content; } public String getBoard_original_filename() { return Board_original_filename; } public void setBoard_original_filename(String board_original_filename) { Board_original_filename = board_original_filename; } public String getBoard_rename_filename() { return Board_rename_filename; } public void setBoard_rename_filename(String board_rename_filename) { Board_rename_filename = board_rename_filename; } public Date getBoard_date() { return Board_date; } public void setBoard_date(Date board_date) { Board_date = board_date; } public int getBoard_readcount() { return board_readcount; } public void setBoard_readcount(int board_readcount) { this.board_readcount = board_readcount; } @Override public String toString() { return "Board [Board_no=" + Board_no + ", Board_title=" + Board_title + ", Board_writer=" + Board_writer + ", Board_content=" + Board_content + ", Board_original_filename=" + Board_original_filename + ", Board_rename_filename=" + Board_rename_filename + ", Board_date=" + Board_date + ", board_readcount=" + board_readcount + "]"; } }
[ "user2@user2-PC" ]
user2@user2-PC
6f628ba07ec253968621b0eeccd9323d79455bd4
558ad40723ed9c8298ec52bd93aab94516c5b686
/Clase2020/src/tema9/sincronizacion/PruebaInteraccionProblemaHilos.java
25ec1dc1ec5ae7a8533e9ecb821c91d9646af2f6
[]
no_license
andoni-eguiluz/ud-prog2-clase-2020
a46a9addf160974b7b28924f8180b7cc560dd941
92847a201d13920ff7b0308e8c07bb85e6fb8259
refs/heads/master
2021-07-17T02:53:41.199615
2021-02-14T16:37:25
2021-02-14T16:37:25
237,613,459
3
4
null
null
null
null
UTF-8
Java
false
false
2,213
java
package tema9.sincronizacion; import java.util.*; /** Problema de interacción entre hilos concurrentes sobre la misma estructura de datos * @author andoni.eguiluz at ingenieria.deusto.es */ public class PruebaInteraccionProblemaHilos { private static int tipoProblema = 2; // 1 - string único manipulado por partes 2 - ArrayList de chars public static void main(String[] args) { Thread hilo1 = new Hilo1(); Thread hilo2 = new Hilo2(); hilo1.start(); hilo2.start(); } private static String datoCompartido = ""; // problema 1 private static ArrayList<Character> listaCompartida = new ArrayList<>(); // problema 2 private static char[] cars = { 'a', 'b', 'c', 'd', 'e', 'f' }; private static int cont = 0; // Mete un carácter en datoCompartido por la derecha private static /*synchronized*/ void metecaracter(char car) { // System.out.println( "Entra MC"); if (tipoProblema == 1) { String antiguo = datoCompartido + ""; antiguo = antiguo + car; datoCompartido = antiguo; } else if (tipoProblema == 2) { listaCompartida.add( car ); } // System.out.println( "Sale MC"); } // Saca y visualiza un carácter en datoCompartido por la izquierda private static /*synchronized*/ void sacaCaracter() { // System.out.println( "Entra SC"); if (tipoProblema == 1) { if (datoCompartido.length()>0) { String dato = datoCompartido + ""; char car = dato.charAt(0); System.out.print( car ); cont++; if (cont==60) { cont = 0; System.out.println(); } dato = dato.substring( 1 ); datoCompartido = dato; } } else if (tipoProblema == 2) { if (!listaCompartida.isEmpty()) { char car = listaCompartida.remove( 0 ); System.out.print( car ); cont++; if (cont==60) { cont = 0; System.out.println(); } } } // System.out.println( "Sale SC"); } // Clase productora de datos static class Hilo1 extends Thread { public void run() { while (true) { for (char car : cars) metecaracter( car ); } } } // Clase consumidora de datos static class Hilo2 extends Thread { public void run() { while (true) { sacaCaracter(); } } } }
[ "andoni.eguiluz@deusto.es" ]
andoni.eguiluz@deusto.es
64dae8d55b36df2fc3090b284f0acafb274234a1
5e53cea57be97f773db2567667beb3941488358b
/src/main/java/io/github/vvd/hellobank/service/mapper/package-info.java
375e1cba7f21549b542f3c2a9429ecc63c02b28d
[]
no_license
BulkSecurityGeneratorProject/HelloBank
00db8e1222c0ad20da948c8e1c3f6fe9982d7c5f
5a131d9dcbccd3e61aae4e9a76e433bb57707dcc
refs/heads/master
2022-12-16T18:55:01.539928
2018-01-08T20:57:02
2018-01-08T20:57:02
296,637,515
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
/** * MapStruct mappers for mapping domain objects and Data Transfer Objects. */ package io.github.vvd.hellobank.service.mapper;
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
bdd82f36854c81aa793f96af4b1f97fb4431d604
58df55b0daff8c1892c00369f02bf4bf41804576
/src/fuc.java
9de1e052cfe9293db72d3a4f167b27174b93d39c
[]
no_license
gafesinremedio/com.google.android.gm
0b0689f869a2a1161535b19c77b4b520af295174
278118754ea2a262fd3b5960ef9780c658b1ce7b
refs/heads/master
2020-05-04T15:52:52.660697
2016-07-21T03:39:17
2016-07-21T03:39:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
import android.os.Parcelable.Creator; import com.google.android.gms.people.identity.internal.models.DefaultPersonImpl.RelationshipStatuses; public final class fuc implements Parcelable.Creator<DefaultPersonImpl.RelationshipStatuses> {} /* Location: * Qualified Name: fuc * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
5a81dfc90be4ba52e03e3bd5c7d04fb25fa7bea1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/23/23_41f64317212d7be90eb1432f1f327f5ec2d7946c/CorrelatorDAOImpl/23_41f64317212d7be90eb1432f1f327f5ec2d7946c_CorrelatorDAOImpl_s.java
f464b8b5c9a2c706e57eae26245d4e2da4656d72
[]
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,777
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.ode.dao.jpa; import org.apache.ode.bpel.common.CorrelationKey; import org.apache.ode.bpel.dao.CorrelatorDAO; import org.apache.ode.bpel.dao.MessageExchangeDAO; import org.apache.ode.bpel.dao.MessageRouteDAO; import org.apache.ode.bpel.dao.ProcessInstanceDAO; import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; @Entity @Table(name="ODE_CORRELATOR") public class CorrelatorDAOImpl implements CorrelatorDAO { @Id @Column(name="CORRELATOR_ID") @GeneratedValue(strategy=GenerationType.AUTO) private Long _correlatorId; @Basic @Column(name="CORRELATOR_KEY") private String _correlatorKey; @OneToMany(targetEntity=MessageRouteDAOImpl.class,mappedBy="_correlator",fetch=FetchType.EAGER,cascade={CascadeType.ALL}) private Collection<MessageRouteDAOImpl> _routes = new ArrayList<MessageRouteDAOImpl>(); @OneToMany(targetEntity=MessageExchangeDAOImpl.class,mappedBy="_correlator",fetch=FetchType.LAZY,cascade={CascadeType.ALL}) private Collection<MessageExchangeDAOImpl> _exchanges = new ArrayList<MessageExchangeDAOImpl>(); @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="PROC_ID") private ProcessDAOImpl _process; public CorrelatorDAOImpl(){} public CorrelatorDAOImpl(String correlatorKey) { _correlatorKey = correlatorKey; } public void addRoute(String routeGroupId, ProcessInstanceDAO target, int index, CorrelationKey correlationKey) { MessageRouteDAOImpl mr = new MessageRouteDAOImpl(correlationKey, routeGroupId, index, (ProcessInstanceDAOImpl) target, this); _routes.add(mr); } public MessageExchangeDAO dequeueMessage(CorrelationKey correlationKey) { for (Iterator itr=_exchanges.iterator(); itr.hasNext();){ MessageExchangeDAOImpl mex = (MessageExchangeDAOImpl)itr.next(); if (mex.getCorrelationKeys().contains(correlationKey)) { itr.remove(); return mex; } } return null; } public void enqueueMessage(MessageExchangeDAO mex, CorrelationKey[] correlationKeys) { MessageExchangeDAOImpl mexImpl = (MessageExchangeDAOImpl) mex; for (CorrelationKey key : correlationKeys ) { mexImpl.addCorrelationKey(key); } _exchanges.add(mexImpl); mexImpl.setCorrelator(this); } public MessageRouteDAO findRoute(CorrelationKey correlationKey) { for (MessageRouteDAOImpl mr : _routes ) { if ( mr.getCorrelationKey().equals(correlationKey)) return mr; } return null; } public String getCorrelatorId() { return _correlatorKey; } public void removeRoutes(String routeGroupId, ProcessInstanceDAO target) { // remove route across all correlators of the process ((ProcessInstanceDAOImpl)target).removeRoutes(routeGroupId); } void removeLocalRoutes(String routeGroupId, ProcessInstanceDAO target) { for (Iterator itr=_routes.iterator(); itr.hasNext(); ) { MessageRouteDAOImpl mr = (MessageRouteDAOImpl)itr.next(); if ( mr.getGroupId().equals(routeGroupId) && mr.getTargetInstance().equals(target)) itr.remove(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
93e069edac28a3f69399c27e751398f2e54bd4d5
49612a92f84368176ac693cb062ded42bf8697ce
/app/src/main/java/com/example/wangchao/androidcamerabase/utils/thread/WorkThreadUtils.java
7a8876bc6769c1c8fdd970bfbcc4cf90d7c2db7b
[]
no_license
wangchao1994/AndroidCamera2Demo
ee9f3bce595d8f7fd88cb7dbbe53e0fffb276021
6728be5d23098337d81f299da288ca9cb51c2839
refs/heads/master
2020-04-13T07:39:47.372227
2018-12-25T07:38:51
2018-12-25T07:38:51
163,058,370
0
0
null
null
null
null
UTF-8
Java
false
false
1,611
java
package com.example.wangchao.androidcamerabase.utils.thread; import android.os.Handler; import android.os.HandlerThread; /** * 后台线程和对应Handler的管理类 */ public class WorkThreadUtils { private final String thread_name = "Camera2WorkThread"; /** * 后台线程处理 */ private HandlerThread mBackgroundThread; private Handler mBackgroundHandler; public static WorkThreadUtils newInstance() { return new WorkThreadUtils(); } /** * 开启一个线程和对应的Handler */ public void startWorkThread() { startWorkThread(thread_name); } public void startWorkThread(String thread_name) { this.mBackgroundThread = new HandlerThread(thread_name); this.mBackgroundThread.start(); this.mBackgroundHandler = new Handler(this.mBackgroundThread.getLooper()); } /** * 安全停止后台线程和对应的Handler */ public void stopBackgroundThread() { if (mBackgroundThread != null) { mBackgroundThread.quitSafely(); } try { if (mBackgroundThread != null) { mBackgroundThread.join(); mBackgroundThread = null; } if (mBackgroundHandler != null) { mBackgroundHandler = null; } } catch (InterruptedException e) { e.printStackTrace(); } } public HandlerThread getBackgroundThread() { return mBackgroundThread; } public Handler getBackgroundHandler() { return mBackgroundHandler; } }
[ "wchao0829@163.com" ]
wchao0829@163.com
80fb9f240066891ef81d9ef7fef187b33569c5b6
7a3d7e0d2cdc349b03ebfdfdf2ad1274765a0aba
/app/src/main/java/com/soe/sharesoe/base/PermissionCompat.java
f77f844e75863b69cebe03d9b5184c07786e8aa9
[]
no_license
zhangyizhangyiran/share-user
596c0e40685664e959f5dba52933a09bae5f5df0
ff420c02c19d145fbf8c9b18e6d6b58228ab7647
refs/heads/master
2020-03-29T21:50:27.041912
2018-09-26T08:06:09
2018-09-26T08:06:09
150,390,128
0
0
null
null
null
null
UTF-8
Java
false
false
5,374
java
package com.soe.sharesoe.base; import android.app.Activity; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.text.TextUtils; import android.widget.Toast; import java.util.ArrayList; import java.util.List; /** * @author wangxiaofa * @version ${VERSIONCODE} * @project sharesoe * @Description 权限管理基类 * @encoding UTF-8 * @date 2017/11/11 * @time 下午3:13 * @修改记录 <pre> * 版本 修改人 修改时间 修改内容描述 * -------------------------------------------------- * <p> * -------------------------------------------------- * </pre> */ public class PermissionCompat implements ActivityCompat.OnRequestPermissionsResultCallback { private String hint; public static final int REQUESTCODE = 1000; private Activity mContext; public PermissionCompat(Activity mContext) { this.mContext = mContext; } //单个权限请求检测,true不需要请求权限,false需要请求权限 public boolean isPermissionGranted(String permissionName) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { return true; } //判断是否需要请求允许权限 int hasPermision = ActivityCompat.checkSelfPermission(mContext, permissionName); if (hasPermision != PackageManager.PERMISSION_GRANTED) { return false; } return true; } //多个权限请求检测,返回list,如果list.size为空说明权限全部有了不需要请求,否则请求没有的 public List<String> isPermissionsAllGranted(String[] permArray) { List<String> list = new ArrayList<>(); //获得批量请求但被禁止的权限列表 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { return list; } for (int i = 0; permArray != null && i < permArray.length; i++) { if (PackageManager.PERMISSION_GRANTED != ActivityCompat.checkSelfPermission(mContext, permArray[i])) { list.add(permArray[i]); } } return list; } //单个权限请求 public boolean Requestpermission(String s, int requestCode, String defeat) { boolean flag = false; hint = defeat; if (!TextUtils.isEmpty(s)) { boolean granted = isPermissionGranted(s); if (granted) { //有权限,调用方法 // okPermissionResult(requestCode); flag = true; } else { ActivityCompat.requestPermissions(mContext, new String[]{s}, requestCode); flag = false; } } return flag; } //多个权限请求 public boolean Requestpermission(String s[], int requestCode, String defeat) { boolean flag = false; hint = defeat; if (s.length != 0) { List<String> perList = isPermissionsAllGranted(s); if (perList.size() == 0) { //有权限,调用方法 // okPermissionResult(requestCode); flag = true; } else { ActivityCompat.requestPermissions(mContext, perList.toArray(new String[perList.size()]), requestCode); flag = false; } } return flag; } public void popAlterDialog() { new AlertDialog.Builder(mContext) .setTitle("提示") .setMessage(hint) .setNegativeButton("取消", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }) .setPositiveButton("设置", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { //前往应用详情界面 try { Uri packUri = Uri.parse("package:" + mContext.getPackageName()); Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS, packUri); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mContext.startActivity(intent); } catch (Exception e) { Toast.makeText(mContext, "跳转失败", Toast.LENGTH_SHORT).show(); } dialog.dismiss(); } }).create().show(); } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { Toast.makeText(mContext, "xxxxx", Toast.LENGTH_SHORT).show(); for (int i : grantResults) { if (i != PackageManager.PERMISSION_GRANTED) { //有权限未通过 return; } } // okPermissionResult(requestCode); } //有权限调用 public void okPermissionResult(int requestCode) { } }
[ "1104745049@qq.com" ]
1104745049@qq.com
0e5b8d87f49862be5be094a2125f9cd6101fcf28
64d741dbd05849d7c0eca4593407c1f8ea24533f
/src/test/java/com/acme/test/vetobean/EntityVetoExtensionTest.java
7876dbd84230d64c6906b9dfd557225a6fcf1cb0
[]
no_license
mojavelinux/cdi-extension-showcase
a9b5f7712082c7c48bc5a176e5d76c923a8d2fda
d32907ef71a02165ddc4dbc3aff89bc046370614
refs/heads/master
2020-06-30T04:15:34.118479
2011-07-26T13:11:04
2011-07-26T13:11:04
1,585,763
1
2
null
null
null
null
UTF-8
Java
false
false
1,160
java
package com.acme.test.vetobean; import javax.enterprise.inject.Instance; import javax.enterprise.inject.spi.Extension; import javax.inject.Inject; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import com.acme.vetobean.EntityVetoExtension; @RunWith(Arquillian.class) public class EntityVetoExtensionTest { @Deployment public static Archive<?> createArchive() { return ShrinkWrap.create(JavaArchive.class) .addClass(EntityVetoExtension.class) .addClass(SampleEntity.class) .addAsServiceProvider(Extension.class, EntityVetoExtension.class) .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); } @Inject Instance<SampleEntity> sampleEntity; @Test public void shouldVetoEntity() { Assert.assertTrue(sampleEntity.isUnsatisfied()); } }
[ "dan.j.allen@gmail.com" ]
dan.j.allen@gmail.com
9882cd845c4fdee9edabcac95e5602e8143013a2
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/location/model/l$6.java
da17e378607c08b86aaee53d98ba1dfbd4d46871
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
584
java
package com.tencent.mm.plugin.location.model; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.ai.e.a; import com.tencent.mm.model.bz.a; final class l$6 implements bz.a { l$6(l paraml) { } public final void a(e.a parama) { AppMethodBeat.i(113352); new n().b(parama); AppMethodBeat.o(113352); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.location.model.l.6 * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
bcf991caf94373bdc1d601e154baae4be7dc9910
e01dc5993b7ac310c346763d46e900f3b2d5db5e
/jasperserver-dto/src/main/java/com/jaspersoft/jasperserver/dto/resources/ClientProperty.java
5cdae7dcb84bbcae1bffeb8f747a5575b214ae93
[]
no_license
yohnniebabe/jasperreports-server-ce
ed56548a2ee18d37511c5243ffd8e0caff2be8f7
e65ce85a5dfca8d9002fcabc172242f418104453
refs/heads/master
2023-08-26T00:01:23.634829
2021-10-22T14:15:32
2021-10-22T14:15:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,930
java
/* * Copyright (C) 2005 - 2020 TIBCO Software Inc. All rights reserved. * http://www.jaspersoft.com. * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.jaspersoft.jasperserver.dto.resources; import com.jaspersoft.jasperserver.dto.common.DeepCloneable; import javax.xml.bind.annotation.XmlRootElement; import static com.jaspersoft.jasperserver.dto.utils.ValueObjectUtils.checkNotNull; /** * <p></p> * * @author Yaroslav.Kovalchyk * @version $Id$ */ @XmlRootElement(name = "property") public class ClientProperty implements DeepCloneable<ClientProperty> { private String key; private String value; public ClientProperty(){ } public ClientProperty (ClientProperty source){ checkNotNull(source); key = source.getKey(); value = source.getValue(); } public ClientProperty(String key, String value){ this.key = key; this.value = value; } public String getKey() { return key; } public ClientProperty setKey(String key) { this.key = key; return this; } public String getValue() { return value; } public ClientProperty setValue(String value) { this.value = value; return this; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ClientProperty that = (ClientProperty) o; if (key != null ? !key.equals(that.key) : that.key != null) return false; if (value != null ? !value.equals(that.value) : that.value != null) return false; return true; } @Override public int hashCode() { int result = key != null ? key.hashCode() : 0; result = 31 * result + (value != null ? value.hashCode() : 0); return result; } @Override public String toString() { return "ClientProperty{" + "key='" + key + '\'' + ", value='" + value + '\'' + '}'; } /* * DeepCloneable */ @Override public ClientProperty deepClone() { return new ClientProperty(this); } }
[ "hguntupa@tibco.com" ]
hguntupa@tibco.com
f7b6a19e8a55e3112dde7b70ef009705c23ea958
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
/laravel-converted/src/main/java/com/project/convertedCode/globalNamespace/classes/PHP_Token_INCLUDE_ONCE.java
c4c8c2fe5e0e193b2beffb3c113bbff47242aa69
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
RuntimeConverter/RuntimeConverterLaravelJava
657b4c73085b4e34fe4404a53277e056cf9094ba
7ae848744fbcd993122347ffac853925ea4ea3b9
refs/heads/master
2020-04-12T17:22:30.345589
2018-12-22T10:32:34
2018-12-22T10:32:34
162,642,356
0
0
null
null
null
null
UTF-8
Java
false
false
2,984
java
package com.project.convertedCode.globalNamespace.classes; import java.lang.invoke.MethodHandles; import com.runtimeconverter.runtime.passByReference.PassByReferenceArgs; import com.project.convertedCode.globalNamespace.classes.PHP_Token_Includes; import com.runtimeconverter.runtime.classes.NoConstructor; import com.runtimeconverter.runtime.classes.RuntimeClassBase; import com.runtimeconverter.runtime.RuntimeEnv; import com.runtimeconverter.runtime.reflection.ReflectionClassData; import com.runtimeconverter.runtime.arrays.ZPair; /* Converted with The Runtime Converter (runtimeconverter.com) vendor/phpunit/php-token-stream/src/Token.php */ public class PHP_Token_INCLUDE_ONCE extends PHP_Token_Includes { public PHP_Token_INCLUDE_ONCE(RuntimeEnv env, Object... args) { super(env); if (this.getClass() == PHP_Token_INCLUDE_ONCE.class) { this.__construct(env, args); } } public PHP_Token_INCLUDE_ONCE(NoConstructor n) { super(n); } public static final Object CONST_class = "PHP_Token_INCLUDE_ONCE"; // Runtime Converter Internals // RuntimeStaticCompanion contains static methods // RequestStaticProperties contains static (per-request) properties // ReflectionClassData contains php reflection data used by the runtime library public static class RuntimeStaticCompanion extends PHP_Token_Includes.RuntimeStaticCompanion { private static final MethodHandles.Lookup staticCompanionLookup = MethodHandles.lookup(); } public static final RuntimeStaticCompanion runtimeStaticObject = new RuntimeStaticCompanion(); private static final ReflectionClassData runtimeConverterReflectionData = ReflectionClassData.builder() .setName("PHP_Token_INCLUDE_ONCE") .setLookup( PHP_Token_INCLUDE_ONCE.class, MethodHandles.lookup(), RuntimeStaticCompanion.staticCompanionLookup) .setLocalProperties("id", "line", "name", "text", "tokenStream", "type") .setFilename("vendor/phpunit/php-token-stream/src/Token.php") .addExtendsClass("PHP_Token_Includes") .addExtendsClass("PHP_Token") .get(); @Override public ReflectionClassData getRuntimeConverterReflectionData() { return runtimeConverterReflectionData; } @Override public Object converterRuntimeCallExtended( RuntimeEnv env, String method, Class<?> caller, PassByReferenceArgs passByReferenceArgs, Object... args) { return RuntimeClassBase.converterRuntimeCallExtendedWithDataStatic( this, runtimeConverterReflectionData, env, method, caller, passByReferenceArgs, args); } }
[ "git@runtimeconverter.com" ]
git@runtimeconverter.com
1107f9cbb7317d17ecafd129d49db28897ff858a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_70ef7805163b1dd39ff5da1ff50babfd42e898b8/TabataActivity/27_70ef7805163b1dd39ff5da1ff50babfd42e898b8_TabataActivity_s.java
5d27d497a2cb41f13ea162a638b3d04eda9920a6
[]
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,271
java
package com.vorsk.crossfitr; import com.vorsk.crossfitr.models.WorkoutModel; import com.vorsk.crossfitr.models.WorkoutRow; import android.app.Activity; import android.content.Intent; import android.graphics.Color; import android.graphics.Typeface; import android.media.MediaPlayer; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Handler; import android.os.Message; import android.text.method.ScrollingMovementMethod; import android.view.View; import android.widget.Button; import android.widget.TextView; public class TabataActivity extends Activity { private static final int TOTAL_TIME = 30000 * 8; // View elements in stopwatch.xml private TextView mWorkoutDescription, mStateLabel, mWorkoutName; private Button mStartStop, mReset, mFinish; private Time tabata = new Time(); private boolean newStart, cdRun, goStop; private long id; private MediaPlayer mp; // Timer to update the elapsedTime display private final long mFrequency = 100; // milliseconds private final int TICK_WHAT = 2; private Handler mHandler = new Handler() { public void handleMessage(Message m) { updateElapsedTime(); sendMessageDelayed(Message.obtain(this, TICK_WHAT), mFrequency); } }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tabata_tab); cdRun = false; //open model to put data into database //get the id passed from previous activity (workout lists) id = getIntent().getLongExtra("ID", -1); //if ID is invalid, go back to home screen if(id < 0) { getParent().setResult(RESULT_CANCELED); finish(); } newStart = true; //create model object WorkoutModel model = new WorkoutModel(this); model.open(); WorkoutRow workout = model.getByID(id); model.close(); Typeface roboto = Typeface.createFromAsset(getAssets(),"fonts/Roboto-Light.ttf"); mStateLabel = (TextView)findViewById(R.id.state_label); mStateLabel.setTypeface(roboto); mStateLabel.setText(""); mWorkoutDescription = (TextView)findViewById(R.id.workout_des_time); mWorkoutDescription.setMovementMethod(new ScrollingMovementMethod()); mWorkoutDescription.setTypeface(roboto); mWorkoutDescription.setText(workout.description); mWorkoutName = (TextView)findViewById(R.id.workout_name_time); mWorkoutName.setText(workout.name); mWorkoutName.setTypeface(roboto); mStartStop = (Button)findViewById(R.id.start_stop_button); mStartStop.setTypeface(roboto); mReset = (Button)findViewById(R.id.reset_button); mReset.setTypeface(roboto); mReset.setEnabled(false); mFinish = (Button)findViewById(R.id.finish_workout_button); mFinish.setTypeface(roboto); mFinish.setEnabled(false); mHandler.sendMessageDelayed(Message.obtain(mHandler, TICK_WHAT), mFrequency); } @Override protected void onDestroy() { super.onDestroy(); } public void onStartStopClicked(View V) { if(!tabata.isRunning()){ newStart = false; ((TimeTabWidget) getParent()).getTabHost().getTabWidget().getChildTabViewAt(0).setEnabled(false); ((TimeTabWidget) getParent()).getTabHost().getTabWidget().getChildTabViewAt(1).setEnabled(false); playSound(R.raw.countdown_3_0); new CountDownTimer(3000, 100) { public void onTick(long millisUntilFinished) { mStartStop.setText("" + (millisUntilFinished / 1000 + 1)); mStartStop.setEnabled(false); mStateLabel.setText("Press To Stop"); mStateLabel.setTextColor(-65536); mReset.setEnabled(false); mFinish.setEnabled(false); cdRun = true; } public void onFinish() { goStop = true; playSound(R.raw.bell_ring); //mStartStop.setText("Go!"); tabata.start(); cdRun = false; mStartStop.setEnabled(true); } }.start(); } else{ tabata.stop(); newStart = false; ((TimeTabWidget) getParent()).getTabHost().getTabWidget().getChildTabViewAt(0).setEnabled(true); ((TimeTabWidget) getParent()).getTabHost().getTabWidget().getChildTabViewAt(1).setEnabled(true); mStateLabel.setText("Press To Start"); mStateLabel.setTextColor(-16711936); mReset.setEnabled(true); mFinish.setEnabled(true); } } public void onResetClicked(View v) { newStart = true; tabata.reset(); mReset.setEnabled(false); mFinish.setEnabled(false); } public void onFinishClicked(View v) { Intent result = new Intent(); result.putExtra("time", getFormattedElapsedTime()); getParent().setResult(RESULT_OK, result); finish(); } /** * method to do when 8 sets are done */ private void endTabata() { newStart = true; //playSound(R.raw.boxing_bellx3); tabata.reset(); } public void updateElapsedTime() { if(!cdRun) mStartStop.setText(getFormattedElapsedTime()); } private String formatElapsedTime(long now, int set) { long seconds = 0, tenths = 0; StringBuilder sb = new StringBuilder(); if(newStart){ now = 20000; } if (now < 1000) { tenths = now / 100; } else if (now < 60000) { seconds = now / 1000; now -= seconds * 1000; tenths = now / 100; } sb.append("SET : ").append(set).append("\n").append(formatDigits(seconds)).append(".").append(tenths); return sb.toString(); } private String formatDigits(long num) { return (num < 10) ? "0" + num : new Long(num).toString(); } public String getFormattedElapsedTime() { long time = tabata.getElapsedTime(); int set = 1 + ((int)time / 30000); long diff = TOTAL_TIME - time; long remain = diff % 30000; int green = Color.GREEN; int red = Color.RED; //reset at end of set 8 workout. no last 10 sec break if(diff <= 10000){ set = 1; this.endTabata(); } // if logic to display sets and time for tabata if(remain > 10000 ){ if(!goStop){ playSound(R.raw.bell_ring); goStop = true; } this.setActivityBackgroundColor(green); return formatElapsedTime(20000 - (time % 30000), set); }else if(remain == 10000){ return formatElapsedTime(0, set); }else{ if(goStop){ playSound(R.raw.air_horn); goStop = false; } this.setActivityBackgroundColor(red); return formatElapsedTime(30000 - (time % 30000), set); } } /** * method to change background color * @param color */ public void setActivityBackgroundColor(int color){ View view = this.getWindow().getDecorView(); view.setBackgroundColor(color); } /** * method to play sound file * @param r */ private void playSound(int r) { //Release any resources from previous MediaPlayer if (mp != null) { mp.release(); } // Create a new MediaPlayer to play this sound mp = MediaPlayer.create(this, r); mp.start(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
311cbcb39df73033ccf5c532773ba0848c99428b
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/com/github/salomonbrys/kotson/GsonKt$fromJson$$inlined$typeToken$2.java
eba0072026251e9d62d0adaf0c4dc17286acddcb
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
635
java
package com.github.salomonbrys.kotson; import com.google.gson.reflect.TypeToken; import kotlin.Metadata; @Metadata(bv = {1, 0, 0}, d1 = {"\u0000\r\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00028\u00000\u0001B\u0005¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"com/github/salomonbrys/kotson/GsonBuilderKt$gsonTypeToken$1", "Lcom/google/gson/reflect/TypeToken;", "()V", "kotson_main"}, k = 1, mv = {1, 1, 1}) /* compiled from: GsonBuilder.kt */ public final class GsonKt$fromJson$$inlined$typeToken$2 extends TypeToken<T> { GsonKt$fromJson$$inlined$typeToken$2() { } }
[ "test@gmail.com" ]
test@gmail.com
e174fe5b8107bf77c775d9aaa27e97734b4fdaba
7c82db10fc0d0448460f5cd308465c555967b081
/tcc/src/main/java/io/mmtx/rm/tcc/remoting/RemotingDesc.java
2b7dec836ed6b1459874ba8d002282be0a92a520
[ "Apache-2.0" ]
permissive
qq962155660/mmtx
0d1dbf24f89180f9dec893459f0a577d04a8551b
b62729f464a97f065cf5c50c8b07026ddec6246a
refs/heads/master
2022-11-24T06:17:16.308311
2020-02-05T02:06:13
2020-02-05T02:06:13
235,230,686
0
0
Apache-2.0
2022-11-16T12:26:09
2020-01-21T01:19:03
Java
UTF-8
Java
false
false
3,901
java
/* * Copyright 1999-2019 Mmtx.io Group. * * 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 io.mmtx.rm.tcc.remoting; /** * remoting bean info * * @author zhangsen */ public class RemotingDesc { /** * is referenc bean ? */ private boolean isReference = false; /** * rpc target bean, the service bean has this property */ private Object targetBean; /** * the tcc interface tyep */ private Class<?> interfaceClass; /** * interface class name */ private String interfaceClassName; /** * rpc uniqueId: hsf, dubbo's version, sofa-rpc's uniqueId */ private String uniqueId; /** * dubbo/hsf 's group */ private String group; /** * protocol: sofa-rpc, dubbo, injvm etc. */ private short protocol; /** * Gets target bean. * * @return the target bean */ public Object getTargetBean() { return targetBean; } /** * Sets target bean. * * @param targetBean the target bean */ public void setTargetBean(Object targetBean) { this.targetBean = targetBean; } /** * Gets interface class. * * @return the interface class */ public Class<?> getInterfaceClass() { return interfaceClass; } /** * Sets interface class. * * @param interfaceClass the interface class */ public void setInterfaceClass(Class<?> interfaceClass) { this.interfaceClass = interfaceClass; } /** * Gets interface class name. * * @return the interface class name */ public String getInterfaceClassName() { return interfaceClassName; } /** * Sets interface class name. * * @param interfaceClassName the interface class name */ public void setInterfaceClassName(String interfaceClassName) { this.interfaceClassName = interfaceClassName; } /** * Gets unique id. * * @return the unique id */ public String getUniqueId() { return uniqueId; } /** * Sets unique id. * * @param uniqueId the unique id */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } /** * Gets group. * * @return the group */ public String getGroup() { return group; } /** * Sets group. * * @param group the group */ public void setGroup(String group) { this.group = group; } /** * Gets protocol. * * @return the protocol */ public short getProtocol() { return protocol; } /** * Sets protocol. * * @param protocol the protocol */ public void setProtocol(short protocol) { this.protocol = protocol; } /** * Is reference boolean. * * @return the boolean */ public boolean isReference() { return isReference; } /** * Sets reference. * * @param reference the reference */ public void setReference(boolean reference) { isReference = reference; } }
[ "962155660@qq.com" ]
962155660@qq.com
1dbe3ac501aaf391dda5d144306187fe9154112b
354ed8b713c775382b1e2c4d91706eeb1671398b
/spring-context/src/main/java/org/springframework/instrument/classloading/package-info.java
a96b965b3cd01eb9d22893df7ab3ed087d44b018
[]
no_license
JessenPan/spring-framework
8c7cc66252c2c0e8517774d81a083664e1ad4369
c0c588454a71f8245ec1d6c12f209f95d3d807ea
refs/heads/master
2021-06-30T00:54:08.230154
2019-10-08T10:20:25
2019-10-08T10:20:25
91,221,166
2
0
null
2017-05-14T05:01:43
2017-05-14T05:01:42
null
UTF-8
Java
false
false
183
java
/** * Support package for load time weaving based on class loaders, * as required by JPA providers (but not JPA-specific). */ package org.springframework.instrument.classloading;
[ "jessenpan@qq.com" ]
jessenpan@qq.com
93004102448063957f604e7f57bdf63cb50f71e1
6f9a534c8e1b46f300be6bdeec99b0b0ed5236b0
/dfgx/sceneTask/src/main/java/com/bonc/common/thread/ThreadPoolManage.java
c09292628e091946f5d7590989a17d76aec05f2e
[]
no_license
snailshen2014/career
4ffd7e30fdc2e4ae74b990e679ac3f1c2998d588
c5f08e0f007d23b13150ef18e999a39f87e64b17
refs/heads/master
2020-04-10T12:15:58.280308
2018-12-09T09:32:16
2018-12-09T09:32:16
161,016,843
1
0
null
null
null
null
UTF-8
Java
false
false
2,773
java
package com.bonc.common.thread; /* * 线程管理类 * @author:曾定勇 */ import java.lang.Thread; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; //import com.dave.jfs.core.base.SysGlobal; public class ThreadPoolManage { private final static Logger log= LoggerFactory.getLogger(ThreadPoolManage.class); ThreadBaseFunction ThreadBaseFunctionIns = null; int iThreadNum = 5; boolean bNodataQuitFlag = true; public ThreadPoolManage(ThreadBaseFunction func){ if(func == null) return ; this.ThreadBaseFunctionIns = func; } public ThreadPoolManage(int threadNum,ThreadBaseFunction func){ if(func == null) return ; if(threadNum <= 0 || threadNum >50) iThreadNum = 5; else this.iThreadNum = threadNum; this.ThreadBaseFunctionIns = func; } public ThreadPoolManage(int threadNum,ThreadBaseFunction func,boolean bNodataQuit){ if(func == null) return ; if(threadNum <= 0 || threadNum >50) iThreadNum = 25; else this.iThreadNum = threadNum; this.ThreadBaseFunctionIns = func; this.bNodataQuitFlag = bNodataQuit; } public void start(){ log.info(" --- 线程任务执行开始 ---"); ThreadBaseFunctionIns.begin(); //创建一个可重用固定线程数的线程池 ExecutorService pool = Executors.newFixedThreadPool(iThreadNum); for(int i=0;i < iThreadNum;++i){ //log.debug("--- create thread :{}",i); Thread ThreadIns = new PoolThread(ThreadBaseFunctionIns,bNodataQuitFlag); pool.execute(ThreadIns); } //关闭线程池 pool.shutdown(); try{ //pool.awaitTermination(3600, TimeUnit.SECONDS); // --- 等待1小时--- pool.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS); ThreadBaseFunctionIns.end(); }catch(Exception e){ log.error(e.toString()); } log.info(" --- 线程任务执行结束 ---"); } /* * 网上参考代码 * void shutdownAndAwaitTermination(ExecutorService pool) { pool.shutdown(); // Disable new tasks from being submitted try { // Wait a while for existing tasks to terminate if (!pool.awaitTermination(60, TimeUnit.SECONDS)) { pool.shutdownNow(); // Cancel currently executing tasks // Wait a while for tasks to respond to being cancelled if (!pool.awaitTermination(60, TimeUnit.SECONDS)) System.err.println("Pool did not terminate"); } } catch (InterruptedException ie) { // (Re-)Cancel if current thread also interrupted pool.shutdownNow(); // Preserve interrupt status Thread.currentThread().interrupt(); } } */ }
[ "shenyanjun1@jd.com" ]
shenyanjun1@jd.com
b5982a26d3a73dffd62d5cf0899cef59950de941
83080abf46771f90236e4ebb09799e559770f27f
/src/TermBrowser/src/java/de/fhdo/collaboration/discgroup/DiscGroupData.java
9252cfbf4f65939c6a9a72b7a19a3c619845b484
[ "Apache-2.0" ]
permissive
vonkc2/Termserver
a82babd23aaee7bee660f443faea254161d30a24
5bc2652f27eca7c559ed69b2600d6872f4ad52e5
refs/heads/master
2021-01-15T18:51:40.562365
2015-03-11T13:39:50
2015-03-11T13:39:50
31,499,798
0
0
null
2015-03-01T15:03:00
2015-03-01T15:03:00
null
UTF-8
Java
false
false
1,346
java
/* * CTS2 based Terminology Server and Terminology Browser * Copyright (C) 2014 FH Dortmund: Peter Haas, Robert Muetzner * * 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 de.fhdo.collaboration.discgroup; import de.fhdo.collaboration.db.classes.Collaborationuser; import de.fhdo.collaboration.db.classes.Discussiongroup; /** * * @author Philipp Urbauer */ public class DiscGroupData { private Discussiongroup group; private Collaborationuser headOfGroup; public Discussiongroup getGroup() { return group; } public void setGroup(Discussiongroup group) { this.group = group; } public Collaborationuser getHeadOfGroup() { return headOfGroup; } public void setHeadOfGroup(Collaborationuser headOfGroup) { this.headOfGroup = headOfGroup; } }
[ "robert.muetzner@fh-dortmund.de" ]
robert.muetzner@fh-dortmund.de
d8270519a176bdbaaa099425f45171fb4e948ac1
c4eb564ebb1cb98b513698dd074d943488d0dc89
/icc-wechat-api/src/main/java/com/icc/common/IdFactory.java
e6fec4542e2675303e8d96159cbc63130a839186
[]
no_license
csiizhur/iccspace_projects
92d3df66754db6668042c9ce4743d4ef1a48cac8
e4b944a7f74469cb55ba11e753493a97bba9982a
refs/heads/master
2021-01-11T21:33:50.875197
2017-01-13T06:43:26
2017-01-13T06:43:26
78,807,738
0
0
null
null
null
null
UTF-8
Java
false
false
380
java
package com.icc.common; import java.util.UUID; /** * * @description 主键工厂 * @author zhur * @date 2016年9月23日上午11:53:21 */ public class IdFactory { /** * 获取uuid并且去掉- * @return */ public String getUUID(){ UUID uuid=UUID.randomUUID(); String replUUID=uuid.toString().replaceAll("-", ""); return replUUID; } }
[ "691529382@qq.com" ]
691529382@qq.com
cc11215a0f7f5c1360759f4d071c13dcba47a241
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/17/17_a77682d4012f36b1a678a450bff12d829ad8e963/SMSParser/17_a77682d4012f36b1a678a450bff12d829ad8e963_SMSParser_s.java
1ff2010f7a70d86780f38ab275d3582588984fce
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,514
java
package mobserv.smsgaming; import java.util.ArrayList; import android.app.Activity; import android.database.Cursor; import android.net.Uri; import android.util.Log; /** * Provides methods to see if a given challenge has been completed * @author lolo * */ public class SMSParser { ArrayList<Group> groups = new ArrayList<Group>(); Player user; SMSParser() { groups = null; } SMSParser(Player user, ArrayList<Group> groups) { this.groups = groups; this.user = user; if (null == user){ Log.e("SMSParser", "No user provided !"); } } /** * Looks through the SMS inbox for messages containing * <code>chall.objective</code>. * * @param chall(Challenge) challenge we're looking for * @param act(Activity) activity the method was called from * @return first matching SMS, null if nothing found */ public String searchSMS(Challenge chall, Activity act){ if (chall.isCompleted()){ return "challenge already completed"; } String[] projection = {"address","date","body", "_id"};//The informations we are interested in the SMSs Group group = null; ArrayList<String> playerNumbers; Cursor cursor = act.getContentResolver().query(Uri.parse("content://sms/inbox"), projection, null, null, null); //int lastSearch = chall.lastSearch; Log.d("SMSParser", "Searching for challenge "+chall.toString()); //Try to find the group... for (Group g : groups){ if (g.getName() == chall.getGroupname()){ group = g; } } if (null == group){ Log.e("SMSParser", "Group "+chall.getGroupname()+" was not found."); // return "No group !"; } playerNumbers = group.getPlayerNumbers(); if (cursor.getCount() == 0){ Log.e("SMSParser", "You don't have any SMS, loser !"); return "No SMS !"; } //cursor.moveToPosition(cursor.getCount() - lastSearch - 1);//Go to the last message checked, according to the Challenge object cursor.moveToLast(); do{ String msgData = cursor.getString(2); String sender = cursor.getString(0); //Log.d("SMSParser", "Message "+cursor.getString(3)+" from : "+cursor.getString(0)+" : "+msgData); //if (msgData.contains(chall.objective) ){ if (msgData.contains(chall.objective) && playerNumbers.contains(sender) ){ Log.d("SMSParser", " Challenge completed : "+msgData); user.challengeCompleted(group,chall); return "Success"; } }while(cursor.moveToPrevious()); chall.lastSearch = cursor.getCount(); return "No matching sms !!"; } /** * Looks through the SMS inbox for messages containing <code>obj</code>. * * @param obj string we're looking for * @param act activity the method was called for * @return first matching SMS */ public String searchSMS(String obj, Activity act){ return searchSMS( new Challenge(act, obj, 0, null, false), act); } /** * This method is called by SMSReceiver when messages are incoming * Currently only printing the SMS * * @param msg : String containing one or more SMS */ @Deprecated public void parse(String msg){ Log.i("SMSParser", msg); try{ //groups.get(0).getUser().challengeCompleted(groups.get(0), groups.get(0).getChallenges().get(0)); //groups.get(0).getChallenges().get(0).setCompleted(); } catch (java.lang.NullPointerException e){ Log.e("SMSParser", "I don't know where the 'groups' is !!!"); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
691d1df12cd6d6f1a05cec1b9ef1550c145c71e4
38ee0271dd601420dba9dd133343a6d06a2880d7
/EasyTest/src/main/java/com/java/singleAsync/TaskHelper.java
a60800719d8f5e6c14a1693c6d924b718b5c32ec
[]
no_license
tankmyb/EasyProject
c630ba69f458fe13449c0ff5b88d797bb46e90cf
e699826d41c034d1ca1f8092463e7426e85778b3
refs/heads/master
2016-09-06T02:36:59.128880
2015-02-17T02:03:51
2015-02-17T02:03:51
30,898,342
2
0
null
null
null
null
UTF-8
Java
false
false
3,188
java
package com.java.singleAsync; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.IOException; public class TaskHelper { public static TaskEventEmitter createIOTask(TaskExecutor executor, String fileName){ final IOTask task = new IOTask(executor, fileName, "UTF-8"); task.on("open", new EventHandler() { @Override public void handle(EventObject event) { String fileName = (String) event.getArgs()[0]; System.out.println(Thread.currentThread() + " - " + fileName + " has been opened."); } }); task.on("next", new EventHandler() { @Override public void handle(EventObject event) { BufferedReader reader = (BufferedReader) event.getArgs()[0]; try { String line = reader.readLine(); if (line != null) { task.emit("ready", line); task.emit("next", reader); } else { task.emit("close", task.getFileName()); } } catch (IOException e) { task.emit(e.getClass().getName(), e, task.getFileName()); try { reader.close(); task.emit("close", task.getFileName()); } catch (IOException e1) { e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } } }); task.on("ready", new EventHandler() { @Override public void handle(EventObject event) { String line = (String) event.getArgs()[0]; int len = line.length(); int wordCount = line.split("[\\s+,.]+").length; System.out.println(Thread.currentThread()+" - word count: "+wordCount+" length: "+len); } }); task.on(IOException.class.getName(), new EventHandler() { @Override public void handle(EventObject event) { Object[] args = event.getArgs(); IOException e = (IOException) args[0]; String fileName = (String) args[1]; System.out.println(Thread.currentThread()+ " - An IOException occurred while reading " + fileName + ", error: " + e.getMessage()); } }); task.on("close", new EventHandler() { @Override public void handle(EventObject event) { String fileName = (String) event.getArgs()[0]; System.out.println(Thread.currentThread() + " - " + fileName + " has been closed."); } }); task.on(FileNotFoundException.class.getName(), new EventHandler() { @Override public void handle(EventObject event) { FileNotFoundException e = (FileNotFoundException) event.getArgs()[0]; e.printStackTrace(); System.exit(1); } }); return task; } }
[ "=" ]
=
7158441c30f9958e533c7595b239c74c54e1a038
47034e7fcb058b3df4bf5928455951e5f455897e
/javatools/hserranalysis/src/main/java/me/hatter/tools/hserranalysis/sun/jvm/hotspot/asm/x86/X86CondJmpInstruction.java
8e494d90328b45015c5ac6d153247f39d05c4f8a
[]
no_license
KingBowser/hatter-source-code
2858a651bc557e3aacb4a07133450f62dc7a15c6
f10d4f0ec5f5adda1baa942e179f76301ebc328a
refs/heads/master
2021-01-01T06:49:52.889183
2015-03-21T17:00:28
2015-03-21T17:00:28
32,662,581
3
1
null
null
null
null
UTF-8
Java
false
false
2,277
java
/* * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ package me.hatter.tools.hserranalysis.sun.jvm.hotspot.asm.x86; import me.hatter.tools.hserranalysis.sun.jvm.hotspot.asm.*; public class X86CondJmpInstruction extends X86Instruction implements BranchInstruction { final private X86PCRelativeAddress addr; public X86CondJmpInstruction(String name, X86PCRelativeAddress addr, int size, int prefixes) { super(name, size, prefixes); this.addr = addr; if(addr instanceof X86PCRelativeAddress) { addr.setInstructionSize(getSize()); } } public String asString(long currentPc, SymbolFinder symFinder) { StringBuffer buf = new StringBuffer(); buf.append(getPrefixString()); buf.append(getName()); buf.append(spaces); if(addr instanceof X86PCRelativeAddress) { long disp = ((X86PCRelativeAddress)addr).getDisplacement(); long address = disp + currentPc; buf.append(symFinder.getSymbolFor(address)); } return buf.toString(); } public Address getBranchDestination() { return addr; } public boolean isBranch() { return true; } public boolean isConditional() { return true; } }
[ "jht5945@gmail.com@dd6f9e7e-b4fe-0bd6-ab9c-0ed876a8e821" ]
jht5945@gmail.com@dd6f9e7e-b4fe-0bd6-ab9c-0ed876a8e821
9fdf9bf6b86984e945c7b2275034bc959c48d6a0
9cd8e7c05b59e247e07d9f3e8db8ed91b2ed205e
/src/main/java/org/fpml/fpml_5/master/AbstractEvent.java
ab812d4e25adf435954b73cc8c27dd1269bed9b8
[]
no_license
silvionetto/gapp
d534f919cf732b0eb475abfd46e3dd5a213d7e6d
655e3740216d2a7e55625d5c1ebfcbe3b72ef1af
refs/heads/master
2022-01-09T03:35:18.331184
2022-01-04T10:03:41
2022-01-04T10:03:41
113,552,613
0
0
null
2022-01-04T10:03:42
2017-12-08T08:46:54
Java
UTF-8
Java
false
false
2,644
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-b170531.0717 // See <a href="https://jaxb.java.net/">https://jaxb.java.net/</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2018.02.10 at 05:14:53 PM CET // package org.fpml.fpml_5.master; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * Abstract base type for all events. * * <p>Java class for AbstractEvent complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="AbstractEvent"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="eventIdentifier" type="{http://www.fpml.org/FpML-5/master}BusinessEventIdentifier" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AbstractEvent", propOrder = { "eventIdentifier" }) @XmlSeeAlso({ AdditionalEvent.class, ChangeEvent.class, OptionEvent.class, OptionExercise.class, OptionExpiry.class, TradeAmendmentContent.class, TradeChangeBase.class, TradeNovationContent.class }) public abstract class AbstractEvent { protected List<BusinessEventIdentifier> eventIdentifier; /** * Gets the value of the eventIdentifier property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the eventIdentifier property. * * <p> * For example, to add a new item, do as follows: * <pre> * getEventIdentifier().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link BusinessEventIdentifier } * * */ public List<BusinessEventIdentifier> getEventIdentifier() { if (eventIdentifier == null) { eventIdentifier = new ArrayList<BusinessEventIdentifier>(); } return this.eventIdentifier; } }
[ "silvio.netto@gmail.com" ]
silvio.netto@gmail.com
37f4bae5b07c77df33a8aa5820e48ac37db34af0
6e0fe0c6b38e4647172259d6c65c2e2c829cdbc5
/modules/base/indexing-impl/src/main/java/com/intellij/psi/search/GlobalSearchScopeUtil.java
77549114f739be90bedfd219d6651f8ce0d11db9
[ "Apache-2.0", "LicenseRef-scancode-jgraph" ]
permissive
TCROC/consulo
3f9a6df84e0fbf2b6211457b8a5f5857303b3fa6
cda24a03912102f916dc06ffce052892a83dd5a7
refs/heads/master
2023-01-30T13:19:04.216407
2020-12-06T16:57:00
2020-12-06T16:57:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,115
java
/* * Copyright 2000-2016 JetBrains s.r.o. * * 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.intellij.psi.search; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Computable; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.util.containers.ContainerUtil; import javax.annotation.Nonnull; import java.util.LinkedHashSet; import java.util.Set; public class GlobalSearchScopeUtil { @Nonnull public static GlobalSearchScope toGlobalSearchScope(@Nonnull final SearchScope scope, @Nonnull Project project) { if (scope instanceof GlobalSearchScope) { return (GlobalSearchScope)scope; } return ApplicationManager.getApplication() .runReadAction((Computable<GlobalSearchScope>)() -> GlobalSearchScope.filesScope(project, getLocalScopeFiles((LocalSearchScope)scope))); } @Nonnull public static Set<VirtualFile> getLocalScopeFiles(@Nonnull final LocalSearchScope scope) { return ApplicationManager.getApplication().runReadAction((Computable<Set<VirtualFile>>)() -> { Set<VirtualFile> files = new LinkedHashSet<>(); for (PsiElement element : scope.getScope()) { PsiFile file = element.getContainingFile(); if (file != null) { ContainerUtil.addIfNotNull(files, file.getVirtualFile()); ContainerUtil.addIfNotNull(files, file.getNavigationElement().getContainingFile().getVirtualFile()); } } return files; }); } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
acc4252ab26004c529515bfcacd4a73c03849838
dbad3213f6544564d580932e20dca31c7c1943da
/src/org/apache/catalina/storeconfig/StoreRegistry.java
7fb6e21e61f219cc58b35b0e7b258548ebac5452
[]
no_license
Lyon1994/MyTomcatServerApp
0ef3db59bc3bc0ecdbd35e4d616ca75d082420be
37304fdfa03a7d03f119ae7eaa54f13539021b50
refs/heads/master
2021-01-19T03:19:02.243034
2015-07-28T06:21:44
2015-07-28T06:58:51
39,816,568
1
0
null
null
null
null
UTF-8
Java
false
false
6,537
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.catalina.storeconfig; import java.util.HashMap; import java.util.Map; import javax.naming.directory.DirContext; import org.apache.catalina.CredentialHandler; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Manager; import org.apache.catalina.Realm; import org.apache.catalina.Valve; import org.apache.catalina.WebResourceRoot; import org.apache.catalina.WebResourceSet; import org.apache.catalina.ha.CatalinaCluster; import org.apache.catalina.ha.ClusterDeployer; import org.apache.catalina.ha.ClusterListener; import org.apache.catalina.tribes.Channel; import org.apache.catalina.tribes.ChannelInterceptor; import org.apache.catalina.tribes.ChannelReceiver; import org.apache.catalina.tribes.ChannelSender; import org.apache.catalina.tribes.Member; import org.apache.catalina.tribes.MembershipService; import org.apache.catalina.tribes.MessageListener; import org.apache.catalina.tribes.transport.DataSender; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; /** * Central StoreRegistry for all server.xml elements */ public class StoreRegistry { private static Log log = LogFactory.getLog(StoreRegistry.class); private Map<String, StoreDescription> descriptors = new HashMap<>(); private String encoding = "UTF-8"; private String name; private String version; // Access Information private static Class<?> interfaces[] = { CatalinaCluster.class, ChannelSender.class, ChannelReceiver.class, Channel.class, MembershipService.class, ClusterDeployer.class, Realm.class, Manager.class, DirContext.class, LifecycleListener.class, Valve.class, ClusterListener.class, MessageListener.class, DataSender.class, ChannelInterceptor.class, Member.class, WebResourceRoot.class, WebResourceSet.class, CredentialHandler.class }; /** * @return Returns the name. */ public String getName() { return name; } /** * @param name * The name to set. */ public void setName(String name) { this.name = name; } /** * @return Returns the version. */ public String getVersion() { return version; } /** * @param version * The version to set. */ public void setVersion(String version) { this.version = version; } /** * Find a description for id. Handle interface search when no direct match * found. * * @param id * @return The description */ public StoreDescription findDescription(String id) { if (log.isDebugEnabled()) log.debug("search descriptor " + id); StoreDescription desc = descriptors.get(id); if (desc == null) { Class<?> aClass = null; try { aClass = Class.forName(id, true, this.getClass() .getClassLoader()); } catch (ClassNotFoundException e) { log.error("ClassName:" + id, e); } if (aClass != null) { desc = descriptors.get(aClass.getName()); for (int i = 0; desc == null && i < interfaces.length; i++) { if (interfaces[i].isAssignableFrom(aClass)) { desc = descriptors.get(interfaces[i].getName()); } } } } if (log.isDebugEnabled()) if (desc != null) log.debug("find descriptor " + id + "#" + desc.getTag() + "#" + desc.getStoreFactoryClass()); else log.debug(("Can't find descriptor for key " + id)); return desc; } /** * Find Description by class * * @param aClass * @return The description */ public StoreDescription findDescription(Class<?> aClass) { return findDescription(aClass.getName()); } /** * Find factory from classname * * @param aClassName * @return The factory */ public IStoreFactory findStoreFactory(String aClassName) { StoreDescription desc = findDescription(aClassName); if (desc != null) return desc.getStoreFactory(); else return null; } /** * find factory from class * * @param aClass * @return The factory */ public IStoreFactory findStoreFactory(Class<?> aClass) { return findStoreFactory(aClass.getName()); } /** * Register a new description * * @param desc */ public void registerDescription(StoreDescription desc) { String key = desc.getId(); if (key == null || "".equals(key)) key = desc.getTagClass(); descriptors.put(key, desc); if (log.isDebugEnabled()) log.debug("register store descriptor " + key + "#" + desc.getTag() + "#" + desc.getTagClass()); } public StoreDescription unregisterDescription(StoreDescription desc) { String key = desc.getId(); if (key == null || "".equals(key)) key = desc.getTagClass(); return descriptors.remove(key); } // Attributes /** * @return The encoding */ public String getEncoding() { return encoding; } /** * @param string */ public void setEncoding(String string) { encoding = string; } }
[ "765211630@qq.com" ]
765211630@qq.com
d71144ca0b38647e55ae92dbfa06afa71736fd9c
bb21a6c41649faf4d53c05a479ee221b57f3c570
/app/src/main/java/com/hencoder/hencoderpracticedraw2/practice/Practice13ShadowLayerView.java
a9fd0d2ea4c21a1ee0edb6cedd78c50e312ec2f9
[]
no_license
bihailantian/PracticeDraw2-master
af19045485c6bc6e1a0a2907ad5caa57fcd81f56
2451182947739130dd52eff757cba9320652df01
refs/heads/master
2021-08-16T22:08:44.215800
2017-11-20T11:38:50
2017-11-20T11:38:50
111,402,761
0
0
null
null
null
null
UTF-8
Java
false
false
1,065
java
package com.hencoder.hencoderpracticedraw2.practice; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.View; public class Practice13ShadowLayerView extends View { Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); public Practice13ShadowLayerView(Context context) { super(context); } public Practice13ShadowLayerView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); } public Practice13ShadowLayerView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } { // 使用 Paint.setShadowLayer() 设置阴影 paint.setShadowLayer(20,10,10, Color.RED); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); paint.setTextSize(120); canvas.drawText("Hello HenCoder", 50, 200, paint); } }
[ "you@example.com" ]
you@example.com
f9819a0051b8617effa22d0d06a7b4a625bbb975
7822eb2f86317aebf6e689da2a6708e9cc4ee1ea
/Rachio_apk/sources/com/squareup/okhttp/internal/http/HttpMethod.java
c356a83601cb627c6f0a6a08189770ad4f1c2e26
[ "BSD-2-Clause" ]
permissive
UCLA-ECE209AS-2018W/Haoming-Liang
9abffa33df9fc7be84c993873dac39159b05ef04
f567ae0adc327b669259c94cc49f9b29f50d1038
refs/heads/master
2021-04-06T20:29:41.296769
2018-03-21T05:39:43
2018-03-21T05:39:43
125,328,864
0
0
null
null
null
null
UTF-8
Java
false
false
540
java
package com.squareup.okhttp.internal.http; public final class HttpMethod { public static boolean requiresRequestBody(String method) { return method.equals("POST") || method.equals("PUT") || method.equals("PATCH") || method.equals("PROPPATCH") || method.equals("REPORT"); } public static boolean permitsRequestBody(String method) { return requiresRequestBody(method) || method.equals("OPTIONS") || method.equals("DELETE") || method.equals("PROPFIND") || method.equals("MKCOL") || method.equals("LOCK"); } }
[ "zan@s-164-67-234-113.resnet.ucla.edu" ]
zan@s-164-67-234-113.resnet.ucla.edu
3f07865ffb7c8afeb409bf811c8e4ad56621259d
753244933fc4465b0047821aea81c311738e1732
/promise/target/java-D no-opt/ts3/src/thx/promise/PromiseTuple2_mapTuplePromise_445__Fun_0.java
fa1268b05bbde92af9320507ff871411a672c39d
[ "MIT" ]
permissive
mboussaa/HXvariability
abfaba5452fecb1b83bc595dc3ed942a126510b8
ea32b15347766b6e414569b19cbc113d344a56d9
refs/heads/master
2021-01-01T17:45:54.656971
2017-07-26T01:27:49
2017-07-26T01:27:49
98,127,672
0
0
null
null
null
null
UTF-8
Java
false
true
1,101
java
// Generated by Haxe 3.3.0 package thx.promise; import haxe.root.*; @SuppressWarnings(value={"rawtypes", "unchecked"}) public class PromiseTuple2_mapTuplePromise_445__Fun_0<TOut, T2, T1> extends haxe.lang.Function { public PromiseTuple2_mapTuplePromise_445__Fun_0(haxe.lang.Function success) { //line 446 "/HXvariability/promise/src/thx/promise/Promise.hx" super(1, 0); //line 446 "/HXvariability/promise/src/thx/promise/Promise.hx" this.success = success; } @Override public java.lang.Object __hx_invoke1_o(double __fn_float1, java.lang.Object __fn_dyn1) { //line 445 "/HXvariability/promise/src/thx/promise/Promise.hx" java.lang.Object t = ( (( __fn_dyn1 == haxe.lang.Runtime.undefined )) ? (((java.lang.Object) (__fn_float1) )) : (((java.lang.Object) (__fn_dyn1) )) ); //line 446 "/HXvariability/promise/src/thx/promise/Promise.hx" return ((thx.promise.Future<thx.Either>) (this.success.__hx_invoke2_o(0.0, ((T1) (haxe.lang.Runtime.getField(t, "_0", true)) ), 0.0, ((T2) (haxe.lang.Runtime.getField(t, "_1", true)) ))) ); } public haxe.lang.Function success; }
[ "mohamed.boussaa@inria.fr" ]
mohamed.boussaa@inria.fr
958c69450b8ae7b2399838361a12a6ad63abaf36
58cd843ee0ab084aeb3b27699d748fd434a15e35
/easycode-common/src/main/java/com/easycodebox/common/file/UploadFileInfo.java
059d25c8732f76414b0e943751eb0f7ccd838fc1
[ "Apache-2.0" ]
permissive
yuanzj/easycode
b9f55560d93b66bcae117ba6731db36ba2636330
b3de71c3c28aca85c61f7514d2d759b8ec28889b
refs/heads/master
2021-01-12T08:01:38.874325
2016-12-20T13:34:24
2016-12-20T13:34:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
666
java
package com.easycodebox.common.file; import java.io.InputStream; /** * @author WangXiaoJin * */ public class UploadFileInfo extends FileInfo { private static final long serialVersionUID = -5758401252814280071L; /** * 上传图片时用到的参数名 */ private String paramKey; private InputStream inputStream; public UploadFileInfo() { super(); } public InputStream getInputStream() { return inputStream; } public void setInputStream(InputStream inputStream) { this.inputStream = inputStream; } public String getParamKey() { return paramKey; } public void setParamKey(String paramKey) { this.paramKey = paramKey; } }
[ "381954728@qq.com" ]
381954728@qq.com
37ad2889094253a6a1079df38c4a1977cb2646a5
7c29eb22c9d4a55b87c1cb4c9e31b04c2a9b2b31
/kettle-scheduler-backstage/src/main/java/com/piesat/kettlescheduler/mapper/KTransRecordDao.java
da5193f3adc0ef721179d8cdecba6a5c3efda585
[]
no_license
523499159/kettle-web
afa9f60958c86a3119bba406edf434d63a3d3c4a
d55c8a38c572cf58d34d3fee243a9026bb4b5b69
refs/heads/master
2023-03-17T22:50:28.851262
2020-08-31T07:02:53
2020-08-31T07:02:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
646
java
package com.piesat.kettlescheduler.mapper; import com.piesat.kettlescheduler.model.*; import org.beetl.sql.core.annotatoin.SqlStatement; import org.beetl.sql.core.mapper.BaseMapper; import java.util.List; public interface KTransRecordDao extends BaseMapper<KTransRecord> { @SqlStatement(params = "kTransRecord,start,size") List<KTransRecord> pageQuery(KTransRecord kTransRecord, Integer start, Integer size); @SqlStatement(params = "kTransRecord") Long allCount(KTransRecord kTrans); @SqlStatement(params = "kTransId,startTime,endTime") List<KTransRecord> getAll(int kTransId, String startTime, String endTime); }
[ "18309292271@163.com" ]
18309292271@163.com
3f48059bbfe256ff3ca4a8eefeedc8c3ac10b54d
802bd0e3175fe02a3b6ca8be0a2ff5347a1fd62c
/recyclerviewlibrary/src/main/java/com/chad/library/adapter/base/listener/IDraggableListener.java
3ffb323ce83d8004495084b8c06603d9c2781fac
[]
no_license
wuwind/CstFramePub
87b8534d85cabcf6b8ca58077ef54d706c8a6a91
4059789b42224fe53806569673065a207c0890dd
refs/heads/master
2023-04-11T20:58:37.505639
2021-04-14T06:11:29
2021-04-14T06:11:29
351,687,796
0
0
null
null
null
null
UTF-8
Java
false
false
1,720
java
package com.chad.library.adapter.base.listener; import android.graphics.Canvas; import android.support.v7.widget.RecyclerView; /** * <pre> * @author : xyk * e-mail : yaxiaoke@163.com * time : 2019/07/29 * desc : 抽取拖拽功能,为了兼容新旧实现 * version: 1.0 * </pre> */ public interface IDraggableListener { /** * @return boolean */ boolean isItemSwipeEnable(); /** * @return boolean */ boolean isItemDraggable(); /** * Is there a toggle view which will trigger drag event. * * @return boolean */ boolean hasToggleView(); /** * @param viewHolder viewHolder */ void onItemDragStart(RecyclerView.ViewHolder viewHolder); /** * @param viewHolder viewHolder */ void onItemDragEnd(RecyclerView.ViewHolder viewHolder); /** * @param viewHolder viewHolder */ void onItemSwipeClear(RecyclerView.ViewHolder viewHolder); /** * @param source source * @param target target */ void onItemDragMoving(RecyclerView.ViewHolder source, RecyclerView.ViewHolder target); /** * @param viewHolder viewHolder */ void onItemSwiped(RecyclerView.ViewHolder viewHolder); /** * @param canvas canvas * @param viewHolder viewHolder * @param x x * @param y y * @param isCurrentlyActive isCurrentlyActive */ void onItemSwiping(Canvas canvas, RecyclerView.ViewHolder viewHolder, float x, float y, boolean isCurrentlyActive); /** * @param viewHolder viewHolder */ void onItemSwipeStart(RecyclerView.ViewHolder viewHolder); }
[ "412719784@qq.com" ]
412719784@qq.com
876b16057661a92793a5a12338dc28e215acfb00
d523206fce46708a6fe7b2fa90e81377ab7b6024
/com/google/android/gms/wearable/DataItemAsset.java
cb593bd5ac69abeae9f2eeef6190a6b41b4bd6ba
[]
no_license
BlitzModder/BlitzJava
0ee94cc069dc4b7371d1399ff5575471bdc88aac
6c6d71d2847dfd5f9f4f7c716cd820aeb7e45f2c
refs/heads/master
2021-06-11T15:04:05.571324
2017-02-04T16:04:55
2017-02-04T16:04:55
77,459,517
1
2
null
null
null
null
UTF-8
Java
false
false
479
java
package com.google.android.gms.wearable; import com.google.android.gms.common.data.Freezable; public abstract interface DataItemAsset extends Freezable<DataItemAsset> { public abstract String getDataItemKey(); public abstract String getId(); } /* Location: /Users/subdiox/Downloads/dex2jar-2.0/net.wargaming.wot.blitz-dex2jar.jar!/com/google/android/gms/wearable/DataItemAsset.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "subdiox@gmail.com" ]
subdiox@gmail.com
8a912ea356a6c06e9dfc329afd0d8fea130d8807
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13372-3-7-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/objects/BaseCollection_ESTest_scaffolding.java
b2f0abd3a3f22b16b1049610c56cd228661af8e9
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
440
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Apr 02 00:22:28 UTC 2020 */ package com.xpn.xwiki.objects; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class BaseCollection_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
7518ee64a01730a1ebc3f8f7f4ca8d65970477f7
25570b72527a67169856c574570bfc5dd88da850
/net/suberic/util/swing/ThemeListener.java
fa30c2d1c67dc0e397499d947cbd3f204133fee1
[]
no_license
JavaQualitasCorpus/pooka-3.0-080505
c83ec4809435f49c8907752cc7103ec989056f41
871be6d1c1fa76d16020bdc4300ba06a8eb8264d
refs/heads/master
2023-08-12T09:29:35.956486
2019-03-13T17:50:47
2019-03-13T17:50:47
167,005,052
0
1
null
null
null
null
UTF-8
Java
false
false
267
java
package net.suberic.util.swing; /** * An interface which allows classes to listen to changes to Themes. */ public interface ThemeListener { /** * Called when the specifics of a Theme change. */ public void themeChanged(ConfigurableMetalTheme theme); }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
f2dcf87d995ffc68b327eb41569b2ae7e38dca25
cada108fe7eb04f03cb22ae6295d1f77f1bdde0b
/spring-dsl-jsonrpc/src/test/java/org/springframework/dsl/jsonrpc/codec/JsonRpcExtractorStrategiesTests.java
d2592c1e8b83559726e38ed86a897c93b26a7cdf
[ "Apache-2.0" ]
permissive
jvalkeal/spring-dsl-wip
89ec1e93b73319db0a0ffe0498a0c368e971f46b
cc13c572921fecad8e29f7ffc8489e00b5e54d33
refs/heads/master
2021-04-15T08:27:48.916000
2018-11-04T13:31:05
2018-11-04T13:31:05
126,695,221
0
1
null
null
null
null
UTF-8
Java
false
false
2,108
java
/* * Copyright 2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.dsl.jsonrpc.codec; import static org.assertj.core.api.Assertions.assertThat; import org.junit.Test; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.ObjectMapper; public class JsonRpcExtractorStrategiesTests { @Test public void test1() { JsonRpcExtractorStrategies strategies = JsonRpcExtractorStrategies.builder().build(); ObjectMapper objectMapper = strategies.objectMapper(); assertThat(objectMapper).isNotNull(); assertThat(objectMapper.getSerializationConfig().getDefaultPropertyInclusion().getValueInclusion()) .isEqualTo(JsonInclude.Include.USE_DEFAULTS); } @Test public void test2() { JsonRpcExtractorStrategies strategies = JsonRpcExtractorStrategies.withDefaults(); ObjectMapper objectMapper = strategies.objectMapper(); assertThat(objectMapper).isNotNull(); assertThat(objectMapper.getSerializationConfig().getDefaultPropertyInclusion().getValueInclusion()) .isEqualTo(JsonInclude.Include.USE_DEFAULTS); } @Test public void test3() { JsonRpcExtractorStrategies strategies = JsonRpcExtractorStrategies.builder() .jackson(builder -> { builder.serializationInclusion(JsonInclude.Include.NON_NULL); }) .build(); ObjectMapper objectMapper = strategies.objectMapper(); assertThat(objectMapper).isNotNull(); assertThat(objectMapper.getSerializationConfig().getDefaultPropertyInclusion().getValueInclusion()) .isEqualTo(JsonInclude.Include.NON_NULL); } }
[ "janne.valkealahti@gmail.com" ]
janne.valkealahti@gmail.com
eefdf1e34e4e879a7d65cf584971238c8f355944
99a15911a848676894f7cbae01d514d052f16043
/ai-soccer/SimpleSoccer/src/SimpleSoccer/FieldPlayerStates/ReturnToHomeRegion.java
8c4363dba71b0adbed7702ffae15eedbd4732cfd
[ "MIT" ]
permissive
algerd/ai
13f2adb6a7c7eea27e64c23912186513a9dc8baf
4fa0212d4fe30106b497fd4f9c44399866185b76
refs/heads/master
2021-01-11T10:16:28.198572
2016-11-01T15:49:14
2016-11-01T15:49:14
72,550,742
0
0
null
null
null
null
UTF-8
Java
false
false
2,538
java
package SimpleSoccer.FieldPlayerStates; import SimpleSoccer.Define; import SimpleSoccer.FieldPlayer; import common.Debug.DbgConsole; import common.FSM.State; import common.Game.Region; import common.Messaging.Telegram; public class ReturnToHomeRegion extends State<FieldPlayer> { private static ReturnToHomeRegion instance = new ReturnToHomeRegion(); private ReturnToHomeRegion() {} public static ReturnToHomeRegion getInstance() { return instance; } @Override public void enter(FieldPlayer player) { player.getSteering().arriveOn(); if (!player.getHomeRegion().inside(player.getSteering().getTarget(), Region.halfsize)) { player.getSteering().setTarget(player.getHomeRegion().center()); } if (Define.def(Define.PLAYER_STATE_INFO_ON)) { DbgConsole.debugConsole.print("Player ").print(player.getId()).print(" enters ReturnToHome state").print(""); } } @Override public void execute(FieldPlayer player) { if (player.getPitch().isGameOn()) { //if the ball is nearer this player than any other team member && //there is not an assigned receiver && the goalkeeper does not gave //the ball, go chase it if (player.isClosestTeamMemberToBall() && (player.getTeam().getReceivingPlayer() == null) && !player.getPitch().getGoalKeeperHasBall()) { player.getStateMachine().changeState(ChaseBall.getInstance()); return; } } //if game is on and close enough to home, change state to wait and set the //player target to his current position.(so that if he gets jostled out of //position he can move back to it) if (player.getPitch().isGameOn() && player.getHomeRegion().inside(player.getPosition(), Region.halfsize)) { player.getSteering().setTarget(player.getPosition()); player.getStateMachine().changeState(Wait.getInstance()); } //if game is not on the player must return much closer to the center of his home region else if (!player.getPitch().isGameOn() && player.isAtTarget()) { player.getStateMachine().changeState(Wait.getInstance()); } } @Override public void exit(FieldPlayer player) { player.getSteering().arriveOff(); } @Override public boolean onMessage(FieldPlayer e, final Telegram t) { return false; } }
[ "algerd75@mail.ru" ]
algerd75@mail.ru
c498e20bc1bc5bfbb0969147327bf6b5875c31b4
139b96e65688b2a8b09cab0b070a8f50a630f6ed
/Project/ebweb2019/src/main/java/vn/softdreams/ebweb/domain/IARegisterInvoice.java
19fc4bb4b87ac8cfe994901b30559a4d989ace5a
[]
no_license
hoangpham1997/ChanDoi
785945b93c11c0081888f45c93b57de7de5d45f7
2e62bf65b690ebbf36a7f14bdbdaedae4fe16b36
refs/heads/master
2022-09-14T08:08:58.914426
2020-07-06T15:10:18
2020-07-06T15:10:18
242,865,582
0
0
null
2022-09-01T23:29:37
2020-02-24T23:24:29
Java
UTF-8
Java
false
false
5,582
java
package vn.softdreams.ebweb.domain; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; import java.time.LocalDate; import java.util.*; /** * A IARegisterInvoice. */ @Entity @Table(name = "iaregisterinvoice") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public class IARegisterInvoice implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) @SequenceGenerator(name = "sequenceGenerator") private UUID id; @Column(name = "companyid") private UUID companyID; @Column(name = "typeid") private Integer typeId; @Column(name = "date") private LocalDate date; @Column(name = "no") private String no; @Column(name = "description") private String description; @Column(name = "signer") private String signer; @Column(name = "status") private Integer status; @Column(name = "attachfilename") private String attachFileName; @Column(name = "attachfilecontent") private byte[] attachFileContent; @OneToMany(cascade = {CascadeType.ALL}, orphanRemoval = true, fetch = FetchType.EAGER) @JoinColumn(name = "iaregisterinvoiceid", nullable = false) private Set<IARegisterInvoiceDetails> iaRegisterInvoiceDetails = new HashSet<>(); // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove public UUID getCompanyID() { return companyID; } public void setCompanyID(UUID companyID) { this.companyID = companyID; } public Set<IARegisterInvoiceDetails> getIaRegisterInvoiceDetails() { return iaRegisterInvoiceDetails; } public void setIaRegisterInvoiceDetails(Set<IARegisterInvoiceDetails> iaRegisterInvoiceDetail) { this.iaRegisterInvoiceDetails = iaRegisterInvoiceDetail; } public UUID getId() { return id; } public void setId(UUID id) { this.id = id; } public Integer getTypeId() { return typeId; } public void setTypeId(Integer typeId) { this.typeId = typeId; } public LocalDate getDate() { return date; } public IARegisterInvoice date(LocalDate date) { this.date = date; return this; } public void setDate(LocalDate date) { this.date = date; } public String getNo() { return no; } public IARegisterInvoice no(String no) { this.no = no; return this; } public void setNo(String no) { this.no = no; } public String getDescription() { return description; } public IARegisterInvoice description(String description) { this.description = description; return this; } public void setDescription(String description) { this.description = description; } public String getSigner() { return signer; } public IARegisterInvoice signer(String signer) { this.signer = signer; return this; } public void setSigner(String signer) { this.signer = signer; } public Integer getStatus() { return status; } public IARegisterInvoice status(Integer status) { this.status = status; return this; } public void setStatus(Integer status) { this.status = status; } public String getAttachFileName() { return attachFileName; } public IARegisterInvoice attachFileName(String attachFileName) { this.attachFileName = attachFileName; return this; } public void setAttachFileName(String attachFileName) { this.attachFileName = attachFileName; } public byte[] getAttachFileContent() { return attachFileContent; } public void setAttachFileContent(byte[] attachFileContent) { this.attachFileContent = attachFileContent; } public void resetAttachFileContent() { this.attachFileContent = new byte[]{}; } public void setAttachFileContent(String attachFileContent) throws UnsupportedEncodingException { this.attachFileContent = Base64.getDecoder().decode(attachFileContent.getBytes(StandardCharsets.UTF_8)); } // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } IARegisterInvoice iARegisterInvoice = (IARegisterInvoice) o; if (iARegisterInvoice.getId() == null || getId() == null) { return false; } return Objects.equals(getId(), iARegisterInvoice.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } @Override public String toString() { return "IARegisterInvoice{" + "id=" + getId() + ", date='" + getDate() + "'" + ", no='" + getNo() + "'" + ", description='" + getDescription() + "'" + ", signer='" + getSigner() + "'" + ", status=" + getStatus() + ", attachFileName='" + getAttachFileName() + "'" + ", attachFileContent='" + getAttachFileContent() + "'" + "}"; } }
[ "hoangpham28121997@gmail.com" ]
hoangpham28121997@gmail.com
fc20ae122ba71bb40b0df7f60510c345fc98cc61
956e027703ef83b8dcf3020c6bf4b2d45c4c4e97
/src/main/java/com/wisdom/common/datasource/DatabasePasswordCallback.java
f0d464fbb29e4c4d0ae2e4b87439c43203245dfe
[]
no_license
water-fu/ehelp
79c04e654a81f3d7621bb18436bc02f85cb265eb
d328707412529273e6270a788f51ae841a4b0525
refs/heads/master
2021-01-19T11:31:27.299415
2016-04-16T01:47:46
2016-04-16T01:47:46
82,249,796
0
0
null
null
null
null
UTF-8
Java
false
false
1,424
java
package com.wisdom.common.datasource; import javax.security.auth.callback.PasswordCallback; import com.wisdom.common.encrypt.EncryptFactory; import com.wisdom.web.common.constants.CommonConstant; import com.wisdom.web.common.constants.SysParamDetailConstant; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * 加密数据库的密码,防止明文密码泄露. */ public class DatabasePasswordCallback extends PasswordCallback { private static final Logger logger = LoggerFactory.getLogger(DatabasePasswordCallback.class); private static final long serialVersionUID = 1L; public DatabasePasswordCallback(String prompt, boolean echoOn) { super(prompt, echoOn); } public DatabasePasswordCallback() { super("DatabasePasswordCallback", true); } @Override public void setPassword(char[] password) { String pwd = EncryptFactory.getInstance(SysParamDetailConstant.AES).decodePassword(new String(password), CommonConstant.DB_SALT); if(logger.isDebugEnabled()) { logger.debug("decode the text is : " + pwd); } super.setPassword(pwd.toCharArray()); } private static void passwordEncode() { System.out.println(EncryptFactory.getInstance(SysParamDetailConstant.AES).encodePassword("root", CommonConstant.DB_SALT)); } public static void main(String[] args) { passwordEncode(); } }
[ "fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1" ]
fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1
ca225e92827bc33e102ec89b4226202083c1a42a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/17/17_8e8b7f6ea51aa35ec226b51cfa7594b2fe231f1e/SqlServerSQLTranslator/17_8e8b7f6ea51aa35ec226b51cfa7594b2fe231f1e_SqlServerSQLTranslator_t.java
42127c38a8e099c6ce0ac1ebb901e19226806c68
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,037
java
/* * JBoss, Home of Professional Open Source. * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * 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., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ /* */ package org.teiid.connector.jdbc.sqlserver; import java.util.Arrays; import java.util.List; import org.teiid.connector.api.ConnectorCapabilities; import org.teiid.connector.api.ConnectorException; import org.teiid.connector.api.ExecutionContext; import org.teiid.connector.api.TypeFacility; import org.teiid.connector.jdbc.sybase.SybaseSQLTranslator; import org.teiid.connector.language.IElement; import org.teiid.connector.language.IFunction; import org.teiid.connector.language.ILanguageObject; import com.metamatrix.core.MetaMatrixRuntimeException; /** * Updated to assume the use of the DataDirect, 2005 driver, or later. */ public class SqlServerSQLTranslator extends SybaseSQLTranslator { //TEIID-31 remove mod modifier for SQL Server 2008 @Override protected List<Object> convertDateToString(IFunction function) { return Arrays.asList("replace(convert(varchar, ", function.getParameters().get(0), ", 102), '.', '-')"); //$NON-NLS-1$ //$NON-NLS-2$ } @Override protected List<?> convertTimestampToString(IFunction function) { return Arrays.asList("convert(varchar, ", function.getParameters().get(0), ", 21)"); //$NON-NLS-1$ //$NON-NLS-2$ } @Override public Class<? extends ConnectorCapabilities> getDefaultCapabilities() { return SqlServerCapabilities.class; } @Override public List<?> translate(ILanguageObject obj, ExecutionContext context) { if (obj instanceof IElement) { IElement elem = (IElement)obj; try { if (TypeFacility.RUNTIME_TYPES.STRING.equals(elem.getType()) && elem.getMetadataObject() != null && "uniqueidentifier".equalsIgnoreCase(elem.getMetadataObject().getNativeType())) { //$NON-NLS-1$ return Arrays.asList("cast(", elem, " as char(36))"); //$NON-NLS-1$ //$NON-NLS-2$ } } catch (ConnectorException e) { throw new MetaMatrixRuntimeException(e); } } return super.translate(obj, context); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ddbcf879ac3fe9efed69c0173aa8d00d7755cfdc
8f072aa06f9d6d41e57a47967f134e1c859f8239
/app/src/main/java/com/nick/bb/fitness/api/entity/decor/BaseData.java
455fccbe734158bd2f098bd54480a72036a55b48
[]
no_license
sharpayzara/Fitness
3f401ce9fd135d18bcf9ecb8e3fb7d5d3651bc39
e8cf69bf283a5bb8014f845afc762972fbffe7a7
refs/heads/master
2021-01-23T01:52:24.800235
2017-05-24T10:16:48
2017-05-24T10:16:48
85,943,872
2
1
null
null
null
null
UTF-8
Java
false
false
331
java
package com.nick.bb.fitness.api.entity.decor; import java.io.Serializable; /** * Created by sharpay on 17-3-22. */ public class BaseData implements Serializable{ public boolean error; @Override public String toString() { return "BaseData{" + "error=" + error + '}'; } }
[ "864064269@qq.com" ]
864064269@qq.com
a7ad29be5ea5e28b12d2b4b2381283bb31e56953
4fab44e9f3205863c0c4e888c9de1801919dc605
/AL-Game/src/com/aionemu/gameserver/skillengine/effect/BoostHealEffect.java
54d1cbab6aabf7df4d3e3ce5dce8562952a16355
[]
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
1,080
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.skillengine.effect; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * @author ATracer */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BoostHealEffect") public class BoostHealEffect extends BufEffect { }
[ "michelgorter@outlook.com" ]
michelgorter@outlook.com
55530289be7cdaf50fffb577cc61bc64958f65e3
7081905ae50ca07d06565b984566b90014350283
/Prj_17_BabboServlet/src/model/Bimbo.java
18b9338e0f5c2bacd574226ca681cd46db1fdc93
[]
no_license
maboglia/TSS2021
32fe7ccc66d5c572af8b4df9a899ed8652c24687
cf848aeae759e0be9d4e6c8a796e56adc6281bb3
refs/heads/main
2023-06-29T10:54:11.210034
2021-07-13T17:32:37
2021-07-13T17:32:37
317,783,420
4
2
null
null
null
null
UTF-8
Java
false
false
566
java
package model; public class Bimbo { private String nome; private String cognome; private int anno; public Bimbo(String nome, String cognome, int anno) { this.nome = nome; this.cognome = cognome; this.anno = anno; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public String getCognome() { return cognome; } public void setCognome(String cognome) { this.cognome = cognome; } public int getAnno() { return anno; } public void setAnno(int anno) { this.anno = anno; } }
[ "mauro.bogliaccino@gmail.com" ]
mauro.bogliaccino@gmail.com
dcbeebd354ef4fc4e1dcedaf428cb281f13f86ef
a55817cb0abb161e1fa3f732e595c66082ee7844
/app/src/main/java/com/gbq/myproject/base/BaseVm.java
9373e11fe5b238b9b5d2ddddab8cc645e6219ee2
[]
no_license
gaobingqiu/MyProject
a30ce7f5786d63ff35cc636e948e7f0a0dd1e6ac
d8a7b8f1091c2a160f7bd1bbb9a1a2bd374414ae
refs/heads/master
2021-06-26T12:32:33.990290
2020-10-28T12:24:25
2020-10-28T12:24:25
147,099,540
1
0
null
null
null
null
UTF-8
Java
false
false
382
java
package com.gbq.myproject.base; import android.app.Application; import android.arch.lifecycle.AndroidViewModel; import android.arch.lifecycle.LifecycleObserver; import android.support.annotation.NonNull; public abstract class BaseVm extends AndroidViewModel implements LifecycleObserver { public BaseVm(@NonNull Application application) { super(application); } }
[ "990924291@qq.com" ]
990924291@qq.com