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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8b100d0827542a30f5f0a3741e00092044bc180d | ceeacb5157b67b43d40615daf5f017ae345816db | /generated/sdk/compute/azure-resourcemanager-compute-generated/src/main/java/com/azure/resourcemanager/compute/generated/models/TargetRegion.java | 9e5ecd680a0d0c7f787d4b1b88f561a2463d1b2f | [
"LicenseRef-scancode-generic-cla"
] | no_license | ChenTanyi/autorest.java | 1dd9418566d6b932a407bf8db34b755fe536ed72 | 175f41c76955759ed42b1599241ecd876b87851f | refs/heads/ci | 2021-12-25T20:39:30.473917 | 2021-11-07T17:23:04 | 2021-11-07T17:23:04 | 218,717,967 | 0 | 0 | null | 2020-11-18T14:14:34 | 2019-10-31T08:24:24 | Java | UTF-8 | Java | false | false | 4,568 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.compute.generated.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Describes the target region information. */
@Fluent
public final class TargetRegion {
@JsonIgnore private final ClientLogger logger = new ClientLogger(TargetRegion.class);
/*
* The name of the region.
*/
@JsonProperty(value = "name", required = true)
private String name;
/*
* The number of replicas of the Image Version to be created per region.
* This property is updatable.
*/
@JsonProperty(value = "regionalReplicaCount")
private Integer regionalReplicaCount;
/*
* Specifies the storage account type to be used to store the image. This
* property is not updatable.
*/
@JsonProperty(value = "storageAccountType")
private StorageAccountType storageAccountType;
/*
* Optional. Allows users to provide customer managed keys for encrypting
* the OS and data disks in the gallery artifact.
*/
@JsonProperty(value = "encryption")
private EncryptionImages encryption;
/**
* Get the name property: The name of the region.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Set the name property: The name of the region.
*
* @param name the name value to set.
* @return the TargetRegion object itself.
*/
public TargetRegion withName(String name) {
this.name = name;
return this;
}
/**
* Get the regionalReplicaCount property: The number of replicas of the Image Version to be created per region. This
* property is updatable.
*
* @return the regionalReplicaCount value.
*/
public Integer regionalReplicaCount() {
return this.regionalReplicaCount;
}
/**
* Set the regionalReplicaCount property: The number of replicas of the Image Version to be created per region. This
* property is updatable.
*
* @param regionalReplicaCount the regionalReplicaCount value to set.
* @return the TargetRegion object itself.
*/
public TargetRegion withRegionalReplicaCount(Integer regionalReplicaCount) {
this.regionalReplicaCount = regionalReplicaCount;
return this;
}
/**
* Get the storageAccountType property: Specifies the storage account type to be used to store the image. This
* property is not updatable.
*
* @return the storageAccountType value.
*/
public StorageAccountType storageAccountType() {
return this.storageAccountType;
}
/**
* Set the storageAccountType property: Specifies the storage account type to be used to store the image. This
* property is not updatable.
*
* @param storageAccountType the storageAccountType value to set.
* @return the TargetRegion object itself.
*/
public TargetRegion withStorageAccountType(StorageAccountType storageAccountType) {
this.storageAccountType = storageAccountType;
return this;
}
/**
* Get the encryption property: Optional. Allows users to provide customer managed keys for encrypting the OS and
* data disks in the gallery artifact.
*
* @return the encryption value.
*/
public EncryptionImages encryption() {
return this.encryption;
}
/**
* Set the encryption property: Optional. Allows users to provide customer managed keys for encrypting the OS and
* data disks in the gallery artifact.
*
* @param encryption the encryption value to set.
* @return the TargetRegion object itself.
*/
public TargetRegion withEncryption(EncryptionImages encryption) {
this.encryption = encryption;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (name() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException("Missing required property name in model TargetRegion"));
}
if (encryption() != null) {
encryption().validate();
}
}
}
| [
"actions@github.com"
] | actions@github.com |
140c6bc8a4a09bd00c56e7e58bccc764b90eac3d | 77b66aed9bee9ab634b80f356c263daeaad2fc77 | /app/src/main/java/com/sunbaby/app/presenter/JoinmemberPresenter.java | b3f3c806546f526f9c291028c617a2868ada99cb | [] | no_license | wangjingbo520/Baby | 0c755dea788a9bb626b8af8a7d9c36a49b38f954 | 83d55254382aac8e8591d67a001925b93aac599e | refs/heads/master | 2020-03-22T11:22:25.196747 | 2018-08-04T03:57:41 | 2018-08-04T03:57:41 | 139,966,946 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,620 | java | package com.sunbaby.app.presenter;
import android.content.Context;
import com.sunbaby.app.bean.AddVipBean;
import com.sunbaby.app.bean.Areabean;
import com.sunbaby.app.bean.VipBean;
import com.sunbaby.app.callback.IJoinView;
import com.sunbaby.app.common.api.ProgressSubscriber;
import com.sunbaby.app.common.base.BasePresenter;
/**
* @author wangjingbo
* @date 2018/7/17
* describe 加入会员
*/
public class JoinmemberPresenter extends BasePresenter {
private IJoinView iJoinView;
public JoinmemberPresenter(Context context, IJoinView iJoinView) {
super(context);
this.iJoinView = iJoinView;
}
/**
* 查找对应的会员类型
*/
public void queryVipType() {
mRequestClient.queryVipType().subscribe(new ProgressSubscriber<VipBean>
(mContext) {
@Override
public void onNext(VipBean vipBean) {
if (null != iJoinView) {
iJoinView.queryVipType(vipBean);
}
}
});
}
/**
* 立即开通会员
*
* @param userId
* @param vipTypeId
* @param amount
*/
public void addOrder(String userId, String vipTypeId, String vipPriceId,String amount) {
mRequestClient.addOrder(userId,vipTypeId,vipPriceId,amount).subscribe(new ProgressSubscriber<AddVipBean>
(mContext) {
@Override
public void onNext(AddVipBean addVipBean) {
if (null != iJoinView) {
iJoinView.addOrder(addVipBean);
}
}
});
}
}
| [
"18120446428@163.com"
] | 18120446428@163.com |
dafe3075617c1c7801e44a1160ed7c92eecff112 | a3e9b29faae804b59d784d6a26cdd2f8ca842af4 | /test/org/springframework/web/servlet/view/ResourceBundleViewResolverTests.java | cd6eba757aeca6860e1c4dbd2ceddc645633d1aa | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | enrpan/spring-framework-2.5 | 29d8326c3535ecafd25ba9ca65c1907807f192a2 | e375bb6d66cdaf06ce764bb05e213af78aa5c8e9 | refs/heads/master | 2021-01-17T16:20:57.811749 | 2017-03-06T21:56:33 | 2017-03-06T21:56:33 | 84,124,820 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,449 | java | /*
* Copyright 2002-2007 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.web.servlet.view;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import junit.framework.TestCase;
import org.springframework.beans.factory.BeanIsAbstractException;
import org.springframework.core.io.Resource;
import org.springframework.mock.web.MockServletContext;
import org.springframework.web.context.support.ServletContextResource;
import org.springframework.web.context.support.StaticWebApplicationContext;
import org.springframework.web.servlet.View;
/**
* @author Rod Johnson
* @author Juergen Hoeller
*/
public class ResourceBundleViewResolverTests extends TestCase {
/** Comes from this package */
private static String PROPS_FILE = "org.springframework.web.servlet.view.testviews";
private ResourceBundleViewResolver rb;
private StaticWebApplicationContext wac;
protected void setUp() throws Exception {
rb = new ResourceBundleViewResolver();
rb.setBasename(PROPS_FILE);
rb.setCache(getCache());
rb.setDefaultParentView("testParent");
wac = new StaticWebApplicationContext();
wac.setServletContext(new MockServletContext());
wac.refresh();
// This will be propagated to views, so we need it.
rb.setApplicationContext(wac);
}
/**
* Not a constant: allows overrides.
* Controls whether to cache views.
*/
protected boolean getCache() {
return true;
}
public void testParentsAreAbstract() throws Exception {
try {
View v = rb.resolveViewName("debug.Parent", Locale.ENGLISH);
fail("Should have thrown BeanIsAbstractException");
}
catch (BeanIsAbstractException ex) {
// expected
}
try {
View v = rb.resolveViewName("testParent", Locale.ENGLISH);
fail("Should have thrown BeanIsAbstractException");
}
catch (BeanIsAbstractException ex) {
// expected
}
}
public void testDebugViewEnglish() throws Exception {
View v = rb.resolveViewName("debugView", Locale.ENGLISH);
assertTrue("debugView must be of type InternalResourceView", v instanceof InternalResourceView);
InternalResourceView jv = (InternalResourceView) v;
assertTrue("debugView must have correct URL", "jsp/debug/debug.jsp".equals(jv.getUrl()));
Map m = jv.getStaticAttributes();
assertTrue("Must have 2 static attributes, not " + m.size(), m.size() == 2);
assertTrue("attribute foo = bar, not '" + m.get("foo") + "'", m.get("foo").equals("bar"));
assertTrue("attribute postcode = SE10 9JY", m.get("postcode").equals("SE10 9JY"));
assertTrue("Correct default content type", jv.getContentType().equals(AbstractView.DEFAULT_CONTENT_TYPE));
}
public void testDebugViewFrench() throws Exception {
View v = rb.resolveViewName("debugView", Locale.FRENCH);
assertTrue("French debugView must be of type InternalResourceView", v instanceof InternalResourceView);
InternalResourceView jv = (InternalResourceView) v;
assertTrue("French debugView must have correct URL", "jsp/debug/deboug.jsp".equals(jv.getUrl()));
assertTrue(
"Correct overridden (XML) content type, not '" + jv.getContentType() + "'",
jv.getContentType().equals("text/xml;charset=ISO-8859-1"));
}
public void testEagerInitialization() throws Exception {
ResourceBundleViewResolver rb = new ResourceBundleViewResolver();
rb.setBasename(PROPS_FILE);
rb.setCache(getCache());
rb.setDefaultParentView("testParent");
rb.setLocalesToInitialize(new Locale[] {Locale.ENGLISH, Locale.FRENCH});
rb.setApplicationContext(wac);
View v = rb.resolveViewName("debugView", Locale.FRENCH);
assertTrue("French debugView must be of type InternalResourceView", v instanceof InternalResourceView);
InternalResourceView jv = (InternalResourceView) v;
assertTrue("French debugView must have correct URL", "jsp/debug/deboug.jsp".equals(jv.getUrl()));
assertTrue(
"Correct overridden (XML) content type, not '" + jv.getContentType() + "'",
jv.getContentType().equals("text/xml;charset=ISO-8859-1"));
}
public void testSameBundleOnlyCachedOnce() throws Exception {
if (rb.isCache()) {
View v1 = rb.resolveViewName("debugView", Locale.ENGLISH);
View v2 = rb.resolveViewName("debugView", Locale.UK);
assertSame(v1, v2);
}
}
public void testNoSuchViewEnglish() throws Exception {
View v = rb.resolveViewName("xxxxxxweorqiwuopeir", Locale.ENGLISH);
assertTrue(v == null);
}
public void testOnSetContextCalledOnce() throws Exception {
TestView tv = (TestView) rb.resolveViewName("test", Locale.ENGLISH);
tv = (TestView) rb.resolveViewName("test", Locale.ENGLISH);
tv = (TestView) rb.resolveViewName("test", Locale.ENGLISH);
assertTrue("test has correct name", "test".equals(tv.getBeanName()));
assertTrue("test should have been initialized once, not " + tv.initCount + " times", tv.initCount == 1);
}
public void testNoSuchBasename() throws Exception {
try {
rb.setBasename("weoriwoierqupowiuer");
View v = rb.resolveViewName("debugView", Locale.ENGLISH);
fail("No such basename: all requests should fail with exception");
}
catch (MissingResourceException ex) {
// OK
}
}
public static class TestView extends AbstractView {
public int initCount;
public void setLocation(Resource location) {
if (!(location instanceof ServletContextResource)) {
throw new IllegalArgumentException("Expecting ServletContextResource, not " + location.getClass().getName());
}
}
protected void renderMergedOutputModel(Map model, HttpServletRequest request, HttpServletResponse response) {
}
protected void initApplicationContext() {
++initCount;
}
}
}
| [
"epsbgt@gmail.com"
] | epsbgt@gmail.com |
7276619ff4bc4f3604977e458c87fbf515bed6f8 | 7dbbe21b902fe362701d53714a6a736d86c451d7 | /BzenStudio-5.6/Source/com/zend/ide/hb/wb.java | 08cbc3313978be913a7c3bc983a3ed88164cb307 | [] | no_license | HS-matty/dev | 51a53b4fd03ae01981549149433d5091462c65d0 | 576499588e47e01967f0c69cbac238065062da9b | refs/heads/master | 2022-05-05T18:32:24.148716 | 2022-03-20T16:55:28 | 2022-03-20T16:55:28 | 196,147,486 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 449 | java | package com.zend.ide.hb;
import java.awt.event.ActionEvent;
import javax.swing.text.TextAction;
class wb extends TextAction
{
final pb a;
public wb(pb parampb)
{
super(pb.j(parampb));
}
public void actionPerformed(ActionEvent paramActionEvent)
{
pb.f(this.a).a(-1);
}
}
/* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar
* Qualified Name: com.zend.ide.hb.wb
* JD-Core Version: 0.6.0
*/ | [
"byqdes@gmail.com"
] | byqdes@gmail.com |
744efad36edc107f3d85e339440311231757b4e7 | f64a79c712ce9659cb1e7c27c15a766163e030ef | /webauthn4j-util/src/main/java/com/webauthn4j/util/MessageDigestUtil.java | 57155ca0cc88646573ffb926a82d045c6c9e9d84 | [
"Apache-2.0"
] | permissive | kg0r0/webauthn4j | 9ac73269b99ee57748b3639e0c4809dfa74f07b9 | bcac44bb5f5ca9cd7f2d4aafbe49477caedf6f4a | refs/heads/master | 2020-04-27T23:19:15.411039 | 2019-04-07T02:28:27 | 2019-04-07T02:28:27 | 174,770,911 | 0 | 0 | Apache-2.0 | 2019-03-10T02:54:53 | 2019-03-10T02:54:52 | null | UTF-8 | Java | false | false | 1,594 | java | /*
* Copyright 2002-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 com.webauthn4j.util;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* A Utility class for MessageDigest
*/
public class MessageDigestUtil {
private MessageDigestUtil() {
}
public static MessageDigest createMessageDigest(String hashAlgorithm) {
try {
switch (hashAlgorithm) {
case "S256":
return MessageDigest.getInstance("SHA-256");
case "S384":
return MessageDigest.getInstance("SHA-384");
case "S512":
return MessageDigest.getInstance("SHA-512");
default:
return MessageDigest.getInstance(hashAlgorithm);
}
} catch (NoSuchAlgorithmException e) {
throw new IllegalArgumentException(e);
}
}
public static MessageDigest createSHA256() {
return createMessageDigest("SHA-256");
}
}
| [
"mail@ynojima.net"
] | mail@ynojima.net |
efa80a0da51e719fa3b9f2c3cdb533e1332f41fd | 472738b349c3456daca4a9a2e8b17c54ca4ccee9 | /src/main/java/com/yoyound/sync/stock/test/BasePtOrderRefund.java | 6a071284d21814379b964b87fe17c347b0272377 | [] | no_license | luotianwen/sgssstockapi | 1d952e3e3716f05a5058655866ba1f06515bb730 | 1f1d7a6883375e357be14b8c51ad01b05783299e | refs/heads/master | 2022-09-30T14:50:41.588559 | 2019-11-05T03:46:00 | 2019-11-05T03:46:00 | 186,592,124 | 0 | 0 | null | 2022-09-01T23:07:26 | 2019-05-14T09:40:39 | Java | UTF-8 | Java | false | false | 4,956 | java | package com.yoyound.sync.stock.test;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.IBean;
/**
* Generated by JFinal, do not modify this file.
*/
@SuppressWarnings("serial")
public abstract class BasePtOrderRefund<M extends BasePtOrderRefund<M>> extends Model<M> implements IBean {
public void setId(java.lang.Integer id) {
set("id", id);
}
public java.lang.Integer getId() {
return getInt("id");
}
public void setStoreId(java.lang.Integer storeId) {
set("store_id", storeId);
}
public java.lang.Integer getStoreId() {
return getInt("store_id");
}
public void setUserId(java.lang.Integer userId) {
set("user_id", userId);
}
public java.lang.Integer getUserId() {
return getInt("user_id");
}
public void setOrderId(java.lang.Integer orderId) {
set("order_id", orderId);
}
public java.lang.Integer getOrderId() {
return getInt("order_id");
}
public void setOrderDetailId(java.lang.Integer orderDetailId) {
set("order_detail_id", orderDetailId);
}
public java.lang.Integer getOrderDetailId() {
return getInt("order_detail_id");
}
/**
* 退款单号
*/
public void setOrderRefundNo(java.lang.String orderRefundNo) {
set("order_refund_no", orderRefundNo);
}
/**
* 退款单号
*/
public java.lang.String getOrderRefundNo() {
return getStr("order_refund_no");
}
/**
* 售后类型:1=退货退款,2=换货
*/
public void setType(java.lang.Integer type) {
set("type", type);
}
/**
* 售后类型:1=退货退款,2=换货
*/
public java.lang.Integer getType() {
return getInt("type");
}
/**
* 退款金额
*/
public void setRefundPrice(java.math.BigDecimal refundPrice) {
set("refund_price", refundPrice);
}
/**
* 退款金额
*/
public java.math.BigDecimal getRefundPrice() {
return get("refund_price");
}
/**
* 退款说明
*/
public void setDesc(java.lang.String desc) {
set("desc", desc);
}
/**
* 退款说明
*/
public java.lang.String getDesc() {
return getStr("desc");
}
/**
* 凭证图片列表:json格式
*/
public void setPicList(java.lang.String picList) {
set("pic_list", picList);
}
/**
* 凭证图片列表:json格式
*/
public java.lang.String getPicList() {
return getStr("pic_list");
}
/**
* 状态:0=待商家处理,1=同意并已退款,2=已同意换货,3=已拒绝退换货
*/
public void setStatus(java.lang.Integer status) {
set("status", status);
}
/**
* 状态:0=待商家处理,1=同意并已退款,2=已同意换货,3=已拒绝退换货
*/
public java.lang.Integer getStatus() {
return getInt("status");
}
/**
* 拒绝退换货原因
*/
public void setRefuseDesc(java.lang.String refuseDesc) {
set("refuse_desc", refuseDesc);
}
/**
* 拒绝退换货原因
*/
public java.lang.String getRefuseDesc() {
return getStr("refuse_desc");
}
public void setAddtime(java.lang.Integer addtime) {
set("addtime", addtime);
}
public java.lang.Integer getAddtime() {
return getInt("addtime");
}
public void setIsDelete(java.lang.Integer isDelete) {
set("is_delete", isDelete);
}
public java.lang.Integer getIsDelete() {
return getInt("is_delete");
}
/**
* 商家处理时间
*/
public void setResponseTime(java.lang.Integer responseTime) {
set("response_time", responseTime);
}
/**
* 商家处理时间
*/
public java.lang.Integer getResponseTime() {
return getInt("response_time");
}
/**
* 是否已同意退、换货:0=待处理,1=已同意,2=已拒绝
*/
public void setIsAgree(java.lang.Integer isAgree) {
set("is_agree", isAgree);
}
/**
* 是否已同意退、换货:0=待处理,1=已同意,2=已拒绝
*/
public java.lang.Integer getIsAgree() {
return getInt("is_agree");
}
/**
* 用户已发货:0=未发货,1=已发货
*/
public void setIsUserSend(java.lang.Integer isUserSend) {
set("is_user_send", isUserSend);
}
/**
* 用户已发货:0=未发货,1=已发货
*/
public java.lang.Integer getIsUserSend() {
return getInt("is_user_send");
}
/**
* 用户发货快递公司
*/
public void setUserSendExpress(java.lang.String userSendExpress) {
set("user_send_express", userSendExpress);
}
/**
* 用户发货快递公司
*/
public java.lang.String getUserSendExpress() {
return getStr("user_send_express");
}
/**
* 用户发货快递单号
*/
public void setUserSendExpressNo(java.lang.String userSendExpressNo) {
set("user_send_express_no", userSendExpressNo);
}
/**
* 用户发货快递单号
*/
public java.lang.String getUserSendExpressNo() {
return getStr("user_send_express_no");
}
/**
* 退货 换货地址id
*/
public void setAddressId(java.lang.Integer addressId) {
set("address_id", addressId);
}
/**
* 退货 换货地址id
*/
public java.lang.Integer getAddressId() {
return getInt("address_id");
}
}
| [
"luotianwen456123@126.com"
] | luotianwen456123@126.com |
63f95f3971df4ec8cea30843f316b50f16a913e2 | 9a0bd6f86d6e20eceaf3e444795a71fb839f5a85 | /src/main/play_algorithm_interview/chap9/House_Robber.java | 3eb358c82d96dd515c52af2f126e31a2c625950b | [] | no_license | minsuoqingcheng/LintCode | 0472274dd882d17e8f96b5125a415fe19dfb299c | 780f658875d5ffba2b717c9bf3bd63436b017194 | refs/heads/master | 2021-06-04T13:15:58.381943 | 2021-04-06T15:03:30 | 2021-04-06T15:03:30 | 111,205,136 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,263 | java | package main.play_algorithm_interview.chap9;
import java.util.Arrays;
public class House_Robber {
public int rob(int[] nums) {
int length = nums.length;
int[] memo = new int[length];
Arrays.fill(memo, -1);
return tryRob(nums, length, 0, memo);
}
private int tryRob(int[] nums, int length, int index, int[] memo) {
if (index >= length) {
return 0;
}
if (memo[index] != -1) {
return memo[index];
}
int result = 0;
for (int i = index; i < length; i++) {
result = Math.max(result, nums[i] + tryRob(nums, length, i+2, memo));
}
memo[index] = result;
return result;
}
public int rob1(int[] nums) {
if (nums.length == 0) {
return 0;
}
int[] dp = new int[nums.length+1];
dp[0] = 0;
dp[1] = nums[0];
for (int i = 1; i < nums.length; i++) {
int val = nums[i];
dp[i+1] = Math.max(dp[i], dp[i-1]+val);
}
return dp[nums.length];
}
public static void main(String[] args) {
House_Robber house_robber = new House_Robber();
System.out.println(house_robber.rob(new int[]{1, 2}));
}
}
| [
"1397004810@qq.com"
] | 1397004810@qq.com |
425b04877459d6d508ab533ff9aa2420752e892a | 3bd697c75ab493227c2e84572955352db24805e0 | /ZX2000OnlineVideo/app/src/main/java/com/zx/zx2000onlinevideo/adapter/ConditionsAdapter.java | 01cfe7e4f672e8370586df51d971a6453b523689 | [] | no_license | ShelleyXiao/ZXTV | 9870029865b156865be242f03c5260bbd79c0b0e | c8dca6ef33bfce7ff7b78b75d314b01c00283ebb | refs/heads/master | 2020-04-06T07:09:59.703746 | 2017-05-25T07:34:53 | 2017-05-25T07:34:53 | 65,435,866 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,682 | java | package com.zx.zx2000onlinevideo.adapter;
import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.zx.zx2000onlinevideo.R;
import java.util.List;
public class ConditionsAdapter extends BaseAdapter {
private List<String> menuList;
private Context context;
public ConditionsAdapter(List<String> conditionsArrayList, Context context) {
this.menuList = conditionsArrayList;
this.context = context;
}
@Override
public int getCount() {
return menuList.size();
}
@Override
public Object getItem(int position) {
return menuList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View view, ViewGroup parent) {
ViewHolder holder;
if (view != null) {
holder = (ViewHolder) view.getTag();
} else {
view = View.inflate(context, R.layout.video_menu_item, null);
holder = new ViewHolder(view);
view.setTag(holder);
}
// QueryConditions queryConditions = menuList.get(position);
holder.lemon_video_tv.setText(menuList.get(position));
if (position == 0) {
holder.lemon_video_tv.setTextColor(Color.WHITE);
}
return view;
}
private static class ViewHolder {
TextView lemon_video_tv;
public ViewHolder(View view) {
lemon_video_tv = (TextView) view.findViewById(R.id.lemon_video_tv);
}
}
}
| [
"xiao244164200@qq.com"
] | xiao244164200@qq.com |
8d3377d03205fb225714e8ce5ec04a7f531c9c2b | 14eeb49612d4b4bbdf30491889f5f8a5adc748c8 | /src/action/UpdateProductAction.java | ddd345eeaa7df5614eb59d500f54c54bd986bc34 | [] | no_license | wangnaiwen/BabyTest | c2e4521f5bc7561c9bed8b0477c9092a8330e9e9 | 8c331b53fd7d27deb0b4b90185dedc18ce708678 | refs/heads/master | 2020-06-16T23:37:10.145824 | 2017-06-03T16:52:23 | 2017-06-03T16:52:23 | 75,057,758 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,974 | java | package action;
import java.util.HashMap;
import java.util.Map;
import org.apache.struts2.json.annotations.JSON;
import service.dao.UpdateProductServiceDAO;
import com.opensymphony.xwork2.ActionSupport;
import domain.Product;
public class UpdateProductAction extends ActionSupport{
/**
*
*/
private static final long serialVersionUID = 1L;
private Map<String,Object> dataMap;
private String key = "Just see see";
private int id;
private String numbering;
private String name;
private String brand;
private long retailPrice;
private long standardPrice;
private String description;
private String coverImg;
private int scId;
private int count;
private UpdateProductServiceDAO updateProductServiceDAO;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNumbering() {
return numbering;
}
public void setNumbering(String numbering) {
this.numbering = numbering;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand;
}
public long getRetailPrice() {
return retailPrice;
}
public void setRetailPrice(long retailPrice) {
this.retailPrice = retailPrice;
}
public long getStandardPrice() {
return standardPrice;
}
public void setStandardPrice(long standardPrice) {
this.standardPrice = standardPrice;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getCoverImg() {
return coverImg;
}
public void setCoverImg(String coverImg) {
this.coverImg = coverImg;
}
public int getScId() {
return scId;
}
public void setScId(int scId) {
this.scId = scId;
}
public UpdateProductServiceDAO getUpdateProductServiceDAO() {
return updateProductServiceDAO;
}
public void setUpdateProductServiceDAO(
UpdateProductServiceDAO updateProductServiceDAO) {
this.updateProductServiceDAO = updateProductServiceDAO;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public Map<String, Object> getDataMap() {
return dataMap;
}
//设置key属性不作为json的内容返回
@JSON(serialize=false)
public String getKey() {
return key;
}
@Override
public String execute() throws Exception {
Product product = new Product();
product.setId(id);
product.setBrand(brand);
product.setCoverImg(coverImg);
product.setDescription(description);
product.setName(name);
product.setNumbering(numbering);
product.setRetailPrice(retailPrice);
product.setScId(scId);
product.setCount(count);
product.setStandardPrice(standardPrice);
dataMap = new HashMap<String, Object>();
dataMap.put("updateProduct", updateProductServiceDAO.updateProduct(product));
return "success";
}
}
| [
"1464524269@qq.com"
] | 1464524269@qq.com |
33935806e89ef8b083402c055cdd50d6e946bcd8 | ddbb70f9e2caa272c05a8fa54c5358e2aeb507ad | /rimfile/src/main/java/com/rimdev/rimfile/Repo/RelationTypeRepo.java | 065787bc06d0e86aabea8175a01b1e3ebfb51bf1 | [] | no_license | ahmedhamed105/rimdev | 1e1aad2c4266dd20e402c566836b9db1f75d4643 | c5737a7463f0b80b49896a52f93acbb1e1823509 | refs/heads/master | 2023-02-05T15:18:20.829487 | 2021-04-04T08:10:19 | 2021-04-04T08:10:19 | 228,478,954 | 1 | 0 | null | 2023-01-11T19:57:52 | 2019-12-16T21:27:44 | JavaScript | UTF-8 | Java | false | false | 292 | java | package com.rimdev.rimfile.Repo;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import com.rimdev.rimfile.entities.RelationType;
@Repository
public interface RelationTypeRepo extends CrudRepository<RelationType, Integer>{
}
| [
"ahmed.elemam@its.ws"
] | ahmed.elemam@its.ws |
d29ba8cbe99a7aa93fe57462960ab335921f0650 | ce64b85caaa9ba8412ef395b2467db21bff2b964 | /thaumcraft/client/renderers/entity/projectile/RenderNoProjectile.java | 62b57806d7e2ddcc693d3cbd6710d0f185199a2b | [] | no_license | mem0rz/Thaumcraft-6 | a9e03cdb36edbb0f4fc1b152accb5c1083b6f22a | eab3b4be1e3bd160936b46aac3e5898dec818902 | refs/heads/master | 2022-03-08T10:09:24.709603 | 2019-10-27T00:40:15 | 2019-10-27T00:40:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,770 | java | /* */ package thaumcraft.client.renderers.entity.projectile;
/* */
/* */ import net.minecraft.client.renderer.entity.Render;
/* */ import net.minecraft.client.renderer.entity.RenderManager;
/* */ import net.minecraft.client.renderer.texture.TextureMap;
/* */ import net.minecraft.entity.Entity;
/* */ import net.minecraft.entity.projectile.EntityThrowable;
/* */ import net.minecraft.util.ResourceLocation;
/* */ import thaumcraft.common.entities.projectile.EntityFocusProjectile;
/* */
/* */
/* */ public class RenderNoProjectile
/* */ extends Render
/* */ {
/* */ public RenderNoProjectile(RenderManager rm) {
/* 16 */ super(rm);
/* 17 */ this.field_76989_e = 0.1F;
/* */ }
/* */
/* */
/* */
/* */ public void renderEntityAt(EntityThrowable tg, double x, double y, double z, float fq) {
/* 23 */ if (tg instanceof EntityFocusProjectile) {
/* 24 */ EntityFocusProjectile gp = (EntityFocusProjectile)tg;
/* 25 */ float qq = fq - gp.lastRenderTick;
/* 26 */ if (qq < 0.0F) qq++;
/* 27 */ if (qq > 0.2D) gp.renderParticle(fq);
/* */
/* */ }
/* */ }
/* */
/* */
/* */
/* 34 */ public void func_76986_a(Entity entity, double d, double d1, double d2, float f, float f1) { renderEntityAt((EntityThrowable)entity, d, d1, d2, f1); }
/* */
/* */
/* */
/* */
/* */
/* 40 */ protected ResourceLocation func_110775_a(Entity entity) { return TextureMap.field_110575_b; }
/* */ }
/* Location: D:\工程开发\Cracked\Thaumcraft-1.12.2-6.1.BETA26.jar!\thaumcraft\client\renderers\entity\projectile\RenderNoProjectile.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.0.7
*/ | [
"3293876954@qq.com"
] | 3293876954@qq.com |
cced2462319f52402f3bb68f0ed2b01aeb3874b4 | 25586116169a4805a6011e08e47c187096cb5fb4 | /fili-core/src/main/java/com/yahoo/bard/webservice/druid/model/query/TimeSeriesQuery.java | 60ecbfa9136367ba415c45ae3a9f470ffc633b0d | [
"Apache-2.0"
] | permissive | venisa/fili | a54b1184678420c9eb2588e348e91564f01b87db | ec2c7d0373c3156b880cccebf22c411ceb88f8ec | refs/heads/master | 2020-12-02T19:45:03.518305 | 2016-08-31T15:18:11 | 2016-09-08T19:16:02 | 67,046,802 | 0 | 0 | null | 2016-08-31T14:51:04 | 2016-08-31T14:51:04 | null | UTF-8 | Java | false | false | 4,952 | java | // Copyright 2016 Yahoo Inc.
// Licensed under the terms of the Apache license. Please see LICENSE file distributed with this work for terms.
package com.yahoo.bard.webservice.druid.model.query;
import com.yahoo.bard.webservice.data.dimension.Dimension;
import com.yahoo.bard.webservice.druid.model.QueryType;
import com.yahoo.bard.webservice.druid.model.aggregation.Aggregation;
import com.yahoo.bard.webservice.druid.model.datasource.DataSource;
import com.yahoo.bard.webservice.druid.model.filter.Filter;
import com.yahoo.bard.webservice.druid.model.postaggregation.PostAggregation;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.joda.time.Interval;
import java.util.Collection;
import java.util.Collections;
/**
* Druid timeseries query.
*/
public class TimeSeriesQuery extends AbstractDruidAggregationQuery<TimeSeriesQuery> {
/**
* Constructor.
*
* @param dataSource The datasource
* @param granularity The granularity
* @param filter The filter
* @param aggregations The aggregations
* @param postAggregations The post-aggregations
* @param intervals The intervals
* @param context The context
* @param doFork true to fork a new context and bump up the query id, or false to create an exact copy of the
* context.
*/
public TimeSeriesQuery(
DataSource dataSource,
Granularity granularity,
Filter filter,
Collection<Aggregation> aggregations,
Collection<PostAggregation> postAggregations,
Collection<Interval> intervals,
QueryContext context,
boolean doFork
) {
super(
QueryType.TIMESERIES,
dataSource,
granularity,
Collections.<Dimension>emptySet(),
filter,
aggregations,
postAggregations,
intervals,
context,
doFork
);
}
/**
* Constructor.
*
* @param dataSource The datasource
* @param granularity The granularity
* @param filter The filter
* @param aggregations The aggregations
* @param postAggregations The post-aggregations
* @param intervals The intervals
*/
public TimeSeriesQuery(
DataSource dataSource,
Granularity granularity,
Filter filter,
Collection<Aggregation> aggregations,
Collection<PostAggregation> postAggregations,
Collection<Interval> intervals
) {
this(
dataSource,
granularity,
filter,
aggregations,
postAggregations,
intervals,
(QueryContext) null,
false
);
}
//This method is overridden just to redefine its JSON scope
@JsonIgnore
@Override
public Collection<Dimension> getDimensions() {
return super.getDimensions();
}
// CHECKSTYLE:OFF
@Override
public TimeSeriesQuery withDataSource(DataSource dataSource) {
return new TimeSeriesQuery(dataSource, granularity, filter, aggregations, postAggregations, intervals, context, false);
}
@Override
public TimeSeriesQuery withInnermostDataSource(DataSource dataSource) {
return withDataSource(dataSource);
}
@Override
public TimeSeriesQuery withGranularity(Granularity granularity) {
return new TimeSeriesQuery(getDataSource(), granularity, filter, aggregations, postAggregations, intervals, context, false);
}
@Override
public TimeSeriesQuery withFilter(Filter filter) {
return new TimeSeriesQuery(getDataSource(), granularity, filter, aggregations, postAggregations, intervals, context, false);
}
@Override
public TimeSeriesQuery withAggregations(Collection<Aggregation> aggregations) {
return new TimeSeriesQuery(getDataSource(), granularity, filter, aggregations, postAggregations, intervals, context, false);
}
@Override
public TimeSeriesQuery withPostAggregations(Collection<PostAggregation> postAggregations) {
return new TimeSeriesQuery(getDataSource(), granularity, filter, aggregations, postAggregations, intervals, context, false);
}
@Override
public TimeSeriesQuery withIntervals(Collection<Interval> intervals) {
return new TimeSeriesQuery(getDataSource(), granularity, filter, aggregations, postAggregations, intervals, context, true);
}
@Override
public TimeSeriesQuery withAllIntervals(Collection<Interval> intervals) {
return withIntervals(intervals);
}
@Override
public TimeSeriesQuery withContext(QueryContext context) {
return new TimeSeriesQuery(getDataSource(), granularity, filter, aggregations, postAggregations, intervals, context, false);
}
// CHECKSTYLE:ON
}
| [
"mclawhor@yahoo-inc.com"
] | mclawhor@yahoo-inc.com |
9932e8466ca66bb4fdc2336b449fbf58d42efcc1 | 0a633ff415c395f22df865acddb3f41566c1e99b | /cascading-hadoop/src/main/shared/cascading/flow/hadoop/planner/rule/transformer/TapBalanceGroupSplitMergeTransformer.java | bbd974d5646945048acc940a3ae85cb73c1d9d56 | [
"Apache-2.0"
] | permissive | etleap/cascading | 8b37914f692b72b753c6dde855bf223c689e3a90 | f518308d47d6131cceaef9b7945396b3ff684bd1 | refs/heads/3.1 | 2021-01-20T21:38:15.147809 | 2016-09-11T03:08:10 | 2016-09-11T03:08:10 | 67,954,568 | 0 | 0 | null | 2016-09-11T21:11:14 | 2016-09-11T21:11:14 | null | UTF-8 | Java | false | false | 1,406 | java | /*
* Copyright (c) 2007-2016 Concurrent, Inc. All Rights Reserved.
*
* Project and contact information: http://www.cascading.org/
*
* This file is part of the Cascading project.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cascading.flow.hadoop.planner.rule.transformer;
import cascading.flow.hadoop.planner.rule.expression.BalanceGroupSplitMergeExpression;
import cascading.flow.planner.rule.transformer.IntermediateTapElementFactory;
import cascading.flow.planner.rule.transformer.RuleInsertionTransformer;
import static cascading.flow.planner.rule.PlanPhase.BalanceAssembly;
/**
*
*/
public class TapBalanceGroupSplitMergeTransformer extends RuleInsertionTransformer
{
public TapBalanceGroupSplitMergeTransformer()
{
super(
BalanceAssembly,
new BalanceGroupSplitMergeExpression(),
IntermediateTapElementFactory.TEMP_TAP
);
}
}
| [
"chris@wensel.net"
] | chris@wensel.net |
28114e43039b33350566d0826fe9fb8fbe9f86b4 | 76d925e0ce1f60ac5eb363eb99775dbed06a2c46 | /bit106-java-basic/src/step03/Exam04_4.java | 2d645e3c25de23f2db1e74bd3ca8cdf338d3004c | [] | no_license | psk041e/bitcamp | 44750dbf9644773b1822db31301d8f55218d9256 | 66e69439d00f989246a2866ecccab796ebce6997 | refs/heads/master | 2021-01-24T10:28:06.712161 | 2018-08-10T07:50:42 | 2018-08-10T07:50:42 | 123,054,168 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 881 | java | // 클래스 사용 - import
package step03;
// import는 패키지 선언 다음에 두어야 한다. 그렇지 않으면 에러
import step03.test.B;
public class Exam04_4 {
public static void main(String[] args) {
// 다른 패키지의 클래스 사용
// => 패키지 이름을 항상 붙여야 한다.
// 그래야만 컴파일러가 해당 클래스를 찾을 수 있다.
step03.test.B v1;
v1 = new step03.test.B();
// 그런데 다른 패키지의 클래스를 사용할 때 마다
// 매번 위와 같이 패키지명을 적는다면 너무 코드가 길어진다.
// 해결책!
// => 소스 파일 상단에 클래스의 패키지 정보를 미리 적어둔다.
// => import 패키지명.클래스명;
B v2;
v2 = new B();
}
} | [
"tjrud64@gmail.com"
] | tjrud64@gmail.com |
9acd9b3b673d4d980c25b391320d2272fd2f96f2 | 59c4256ce8801b7df24ee4b4688f4551130d45b0 | /src/main/java/com/haianh/myapp/repository/search/UserSearchRepository.java | 221f977609e3275f8c5210ec40368b7b7a7b906d | [] | no_license | parkhaianh/jhipster-uaa-application | d118e9c2d7e2c31d44393c3121bd9cae8fff8d3b | 9b575ee45dafc24c280f74c7b2f0b39328e22ccf | refs/heads/master | 2022-12-22T09:57:12.587254 | 2019-11-05T19:23:06 | 2019-11-05T19:23:06 | 219,832,957 | 0 | 0 | null | 2022-12-16T04:40:50 | 2019-11-05T19:22:57 | Java | UTF-8 | Java | false | false | 320 | java | package com.haianh.myapp.repository.search;
import com.haianh.myapp.domain.User;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
/**
* Spring Data Elasticsearch repository for the User entity.
*/
public interface UserSearchRepository extends ElasticsearchRepository<User, Long> {
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
7bb5420420278f43a28e0e85874a93b5e0ee0185 | 4927361cfd41599b111833cc770d0f5dd8dc81ab | /src/main/java/com/lordjoe/distributed/wordcount/ExampleSetAccumulator.java | 50fe617d8aec9566e33da21b1c4c05fc3c19bbfc | [
"Apache-2.0"
] | permissive | lordjoe/SparkHydraV2 | ac9b58e3d1ec4bd598f773e50a4147e9d10a15c3 | ab039d3bd93a06da442207eed709e8ceb0ccea26 | refs/heads/master | 2022-07-22T21:23:02.901862 | 2020-06-15T23:39:54 | 2020-06-15T23:39:54 | 132,197,816 | 0 | 0 | Apache-2.0 | 2020-06-15T20:54:46 | 2018-05-04T23:22:33 | Java | UTF-8 | Java | false | false | 2,898 | java | package com.lordjoe.distributed.wordcount;
import org.apache.spark.*;
import org.apache.spark.api.java.*;
import org.apache.spark.api.java.function.*;
import org.apache.spark.api.java.function.Function2;
import scala.*;
import java.util.*;
import java.util.regex.*;
/**
* com.lordjoe.distributed.wordcount.ExampleWordCount
* Demonstration of custom accumulators
* User: Steve
* Date: 9/2/2014
*/
public class ExampleSetAccumulator {
private static final Pattern SPACE = Pattern.compile(" ");
public static void main(final String[] args) {
SparkConf sparkConf = new SparkConf().setAppName("Sample Accumulator");
// if not on a cluster then run locally
Option<String> option = sparkConf.getOption("spark.master");
if (!option.isDefined()) { // use local over nothing
sparkConf.setMaster("local[*]");
}
JavaSparkContext ctx = new JavaSparkContext(sparkConf);
// make an accumulator
final Accumulator<Set<String>> wordsUsed = ctx.accumulator(new HashSet<String>(),
new SetAccumulableParam());
JavaRDD<String> lines = ctx.textFile(args[0]);
JavaRDD<String> words = lines.flatMap(new FlatMapFunction<String, String>() {
public Iterator<String> call(String s) {
List<String> stringList = Arrays.asList(s.split(" "));
wordsUsed.add(new HashSet<String>(stringList)); // accumulate words
return stringList.iterator();
}
});
JavaPairRDD<String, Integer> pairs = words.mapToPair(new PairFunction<String, String, Integer>() {
public Tuple2<String, Integer> call(String s) {
return new Tuple2<String, Integer>(s, 1);
}
});
JavaPairRDD<String, Integer> counts = pairs.reduceByKey(new Function2<Integer, Integer, Integer>() {
public Integer call(Integer a, Integer b) {
return a + b;
}
});
counts = counts.sortByKey();
List<Tuple2<String, Integer>> collect = counts.collect(); // make the count happen
for (Tuple2<String, Integer> wordAndCount : collect) {
System.out.println(wordAndCount._1() + "\t" + wordAndCount._2());
}
}
public static class SetAccumulableParam implements AccumulatorParam<Set<String>>, Serializable {
@Override
public Set<String> addAccumulator(final Set<String> r, final Set<String> t) {
HashSet<String> ret = new HashSet<String>(r);
ret.addAll(t);
return ret;
}
@Override
public Set<String> addInPlace(final Set<String> r1, final Set<String> r2) {
return addAccumulator(r1, r2);
}
@Override
public Set<String> zero(final Set<String> initialValue) {
return initialValue;
}
}
}
| [
"smlewis@lordjoe.com"
] | smlewis@lordjoe.com |
9d41da0b069be44c11ce8f46616389f19890b04c | 98110364a78727475cada902502faa95d1fef931 | /mybatis-generator-core/src/main/java/org/mybatis/generator/runtime/dynamic/sql/elements/BasicInsertMethodGenerator.java | c6ef4782d139a4afb91351024375e879d7588ae3 | [
"Apache-2.0"
] | permissive | linj1024/mybatis-generator-velocity | 0b7a8059adbcfb5fb94986187eb6fce2f59041b2 | 7f20e48411db33feee7be65ee2b0df8543c834fb | refs/heads/master | 2022-07-12T21:46:38.386524 | 2019-11-20T03:31:13 | 2019-11-20T03:31:13 | 188,947,631 | 0 | 0 | Apache-2.0 | 2022-06-20T22:41:38 | 2019-05-28T03:30:47 | Java | UTF-8 | Java | false | false | 4,299 | java | /**
* Copyright 2006-2019 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.mybatis.generator.runtime.dynamic.sql.elements;
import java.util.HashSet;
import java.util.Set;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.api.dom.java.Interface;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.api.dom.java.Parameter;
import org.mybatis.generator.config.GeneratedKey;
public class BasicInsertMethodGenerator extends AbstractMethodGenerator {
private FullyQualifiedJavaType recordType;
private FragmentGenerator fragmentGenerator;
private BasicInsertMethodGenerator(Builder builder) {
super(builder);
recordType = builder.recordType;
fragmentGenerator = builder.fragmentGenerator;
}
@Override
public MethodAndImports generateMethodAndImports() {
if (!introspectedTable.getRules().generateInsert()
&& !introspectedTable.getRules().generateInsertSelective()) {
return null;
}
Set<FullyQualifiedJavaType> imports = new HashSet<>();
FullyQualifiedJavaType adapter = new FullyQualifiedJavaType("org.mybatis.dynamic.sql.util.SqlProviderAdapter"); //$NON-NLS-1$
FullyQualifiedJavaType annotation = new FullyQualifiedJavaType("org.apache.ibatis.annotations.InsertProvider"); //$NON-NLS-1$
imports.add(new FullyQualifiedJavaType("org.mybatis.dynamic.sql.insert.render.InsertStatementProvider")); //$NON-NLS-1$
imports.add(adapter);
imports.add(annotation);
FullyQualifiedJavaType parameterType = new FullyQualifiedJavaType("org.mybatis.dynamic.sql.insert.render.InsertStatementProvider"); //$NON-NLS-1$
imports.add(recordType);
parameterType.addTypeArgument(recordType);
Method method = new Method("insert"); //$NON-NLS-1$
method.setAbstract(true);
method.setReturnType(FullyQualifiedJavaType.getIntInstance());
method.addParameter(new Parameter(parameterType, "insertStatement")); //$NON-NLS-1$
context.getCommentGenerator().addGeneralMethodAnnotation(method, introspectedTable, imports);
method.addAnnotation("@InsertProvider(type=SqlProviderAdapter.class, method=\"insert\")"); //$NON-NLS-1$
MethodAndImports.Builder builder = MethodAndImports.withMethod(method)
.withImports(imports);
GeneratedKey gk = introspectedTable.getGeneratedKey();
if (gk != null) {
MethodParts methodParts = fragmentGenerator.getGeneratedKeyAnnotation(gk);
acceptParts(builder, method, methodParts);
}
return builder.build();
}
@Override
public boolean callPlugins(Method method, Interface interfaze) {
return context.getPlugins().clientBasicInsertMethodGenerated(method, interfaze, introspectedTable);
}
public static class Builder extends BaseBuilder<Builder, BasicInsertMethodGenerator> {
private FullyQualifiedJavaType recordType;
private FragmentGenerator fragmentGenerator;
public Builder withRecordType(FullyQualifiedJavaType recordType) {
this.recordType = recordType;
return this;
}
public Builder withFragmentGenerator(FragmentGenerator fragmentGenerator) {
this.fragmentGenerator = fragmentGenerator;
return this;
}
@Override
public Builder getThis() {
return this;
}
@Override
public BasicInsertMethodGenerator build() {
return new BasicInsertMethodGenerator(this);
}
}
}
| [
"linj@yqc.com"
] | linj@yqc.com |
d9809f67b09a9e167b63d056106160c427e02fc8 | 84a2afe3aad3e6b6f806d2cb47457ec5a7314aa2 | /p4java/src/main/java/com/perforce/p4java/option/server/GetBranchSpecOptions.java | 641212271e5204f47e84d027f7e0cbe3c3eac11e | [
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"CC-BY-2.5"
] | permissive | groboclown/p4ic4idea | f8cf4d4dda8f9c0d2e30c4695d0dd40673e6a910 | 0395af66ee6c90e238b43994a42c940ef13c1905 | refs/heads/master | 2022-07-28T12:14:56.411884 | 2022-07-08T23:27:06 | 2022-07-08T23:27:06 | 30,258,802 | 35 | 15 | Apache-2.0 | 2022-03-14T16:03:55 | 2015-02-03T18:51:06 | Java | UTF-8 | Java | false | false | 2,921 | java | /**
*
*/
package com.perforce.p4java.option.server;
import java.util.List;
import com.perforce.p4java.exception.OptionsException;
import com.perforce.p4java.option.Options;
import com.perforce.p4java.server.IServer;
/**
* Options class for IOptionsServer.getBranchSpec method.
*
* @see com.perforce.p4java.server.IOptionsServer#getBranchSpec(java.lang.String, com.perforce.p4java.option.server.GetBranchSpecOptions)
*/
public class GetBranchSpecOptions extends Options {
/**
* Options: -S[stream], -P[parentStream]
*/
public static final String OPTIONS_SPECS = "s:S s:P";
/**
* If not null, the -S stream flag will expose the internally generated
* mapping. The stream's path in a stream depot, of the form //depotname/streamname.
*/
protected String stream = null;
/**
* If not null, the -P flag may be used with -S to treat the stream as if it
* were a child of a different parent. The parent stream's path in a stream
* depot, of the form //depotname/streamname.
*/
protected String parentStream = null;
/**
* Default constructor.
*/
public GetBranchSpecOptions() {
super();
}
/**
* Strings-based constructor; see 'p4 help [command]' for possible options.
* <p>
*
* <b>WARNING: you should not pass more than one option or argument in each
* string parameter. Each option or argument should be passed-in as its own
* separate string parameter, without any spaces between the option and the
* option value (if any).<b>
* <p>
*
* <b>NOTE: setting options this way always bypasses the internal options
* values, and getter methods against the individual values corresponding to
* the strings passed in to this constructor will not normally reflect the
* string's setting. Do not use this constructor unless you know what you're
* doing and / or you do not also use the field getters and setters.</b>
*
* @see com.perforce.p4java.option.Options#Options(java.lang.String...)
*/
public GetBranchSpecOptions(String... options) {
super(options);
}
/**
* Explicit value constructor.
*/
public GetBranchSpecOptions(String stream, String parentStream) {
super();
this.stream = stream;
this.parentStream = parentStream;
}
/**
* @see com.perforce.p4java.option.Options#processOptions(com.perforce.p4java.server.IServer)
*/
public List<String> processOptions(IServer server) throws OptionsException {
this.optionList = this.processFields(OPTIONS_SPECS,
this.getStream(),
this.getParentStream());
return this.optionList;
}
public String getStream() {
return stream;
}
public GetBranchSpecOptions setStream(String stream) {
this.stream = stream;
return this;
}
public String getParentStream() {
return parentStream;
}
public GetBranchSpecOptions setParentStream(String parentStream) {
this.parentStream = parentStream;
return this;
}
}
| [
"matt@groboclown.net"
] | matt@groboclown.net |
2097f0df3fcd5170cf293b77d959770a3d623077 | 37fe7efb0f3f6e266da113a66a8114da3fac88f0 | /Ver.2/2.00/source/JavaModel/web/StructSdtA212_SD01_LIST_A212_SD01_LISTItem.java | 5d3d76450b2db6a4288992b9449d301f35036c04 | [
"Apache-2.0",
"BSD-2-Clause"
] | permissive | epoc-software-open/SEDC | e07d62248e8c2ed020973edd251e79b140b9fb3d | 6327165f63e448af1b0460f7071d62b5c12c9f09 | refs/heads/master | 2021-08-11T05:56:09.625380 | 2021-08-10T03:41:45 | 2021-08-10T03:41:45 | 96,168,280 | 2 | 1 | BSD-2-Clause | 2021-08-10T03:41:45 | 2017-07-04T02:42:21 | Java | UTF-8 | Java | false | false | 3,267 | java | /*
File: StructSdtA212_SD01_LIST_A212_SD01_LISTItem
Description: A212_SD01_LIST
Author: GeneXus Java Generator version 10_3_3-92797
Generated on: July 3, 2017 17:20:55.35
Program type: Callable routine
Main DBMS: mysql
*/
import com.genexus.*;
public final class StructSdtA212_SD01_LIST_A212_SD01_LISTItem implements Cloneable, java.io.Serializable
{
public StructSdtA212_SD01_LIST_A212_SD01_LISTItem( )
{
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_dom_cd = "" ;
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_dom_var_nm = "" ;
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_var_desc = "" ;
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_version = "" ;
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_del_flg = "" ;
}
public Object clone()
{
Object cloned = null;
try
{
cloned = super.clone();
}catch (CloneNotSupportedException e){ ; }
return cloned;
}
public long getRow_no( )
{
return gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Row_no ;
}
public void setRow_no( long value )
{
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Row_no = value ;
}
public String getTbm03_dom_cd( )
{
return gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_dom_cd ;
}
public void setTbm03_dom_cd( String value )
{
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_dom_cd = value ;
}
public String getTbm03_dom_var_nm( )
{
return gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_dom_var_nm ;
}
public void setTbm03_dom_var_nm( String value )
{
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_dom_var_nm = value ;
}
public String getTbm03_var_desc( )
{
return gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_var_desc ;
}
public void setTbm03_var_desc( String value )
{
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_var_desc = value ;
}
public int getTbm03_order( )
{
return gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_order ;
}
public void setTbm03_order( int value )
{
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_order = value ;
}
public String getTbm03_version( )
{
return gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_version ;
}
public void setTbm03_version( String value )
{
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_version = value ;
}
public String getTbm03_del_flg( )
{
return gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_del_flg ;
}
public void setTbm03_del_flg( String value )
{
gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_del_flg = value ;
}
protected int gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_order ;
protected long gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Row_no ;
protected String gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_dom_cd ;
protected String gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_dom_var_nm ;
protected String gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_var_desc ;
protected String gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_version ;
protected String gxTv_SdtA212_SD01_LIST_A212_SD01_LISTItem_Tbm03_del_flg ;
}
| [
"t-shimotori@weing.co.jp"
] | t-shimotori@weing.co.jp |
83a45c9d39681366fab56bbc13ea5227e2486292 | d7c5121237c705b5847e374974b39f47fae13e10 | /airspan.netspan/src/main/java/Netspan/NBI_18_0/Statistics/RelayPdnAvailabilityPerApnHourlyGetResponse.java | 358edebd6cf048ddce294947128efe86e802ebb8 | [] | no_license | AirspanNetworks/SWITModules | 8ae768e0b864fa57dcb17168d015f6585d4455aa | 7089a4b6456621a3abd601cc4592d4b52a948b57 | refs/heads/master | 2022-11-24T11:20:29.041478 | 2020-08-09T07:20:03 | 2020-08-09T07:20:03 | 184,545,627 | 1 | 0 | null | 2022-11-16T12:35:12 | 2019-05-02T08:21:55 | Java | UTF-8 | Java | false | false | 2,173 | java |
package Netspan.NBI_18_0.Statistics;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="RelayPdnAvailabilityPerApnHourlyGetResult" type="{http://Airspan.Netspan.WebServices}StatsRelayPdnAvailabilityPerApnResponse" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"relayPdnAvailabilityPerApnHourlyGetResult"
})
@XmlRootElement(name = "RelayPdnAvailabilityPerApnHourlyGetResponse")
public class RelayPdnAvailabilityPerApnHourlyGetResponse {
@XmlElement(name = "RelayPdnAvailabilityPerApnHourlyGetResult")
protected StatsRelayPdnAvailabilityPerApnResponse relayPdnAvailabilityPerApnHourlyGetResult;
/**
* Gets the value of the relayPdnAvailabilityPerApnHourlyGetResult property.
*
* @return
* possible object is
* {@link StatsRelayPdnAvailabilityPerApnResponse }
*
*/
public StatsRelayPdnAvailabilityPerApnResponse getRelayPdnAvailabilityPerApnHourlyGetResult() {
return relayPdnAvailabilityPerApnHourlyGetResult;
}
/**
* Sets the value of the relayPdnAvailabilityPerApnHourlyGetResult property.
*
* @param value
* allowed object is
* {@link StatsRelayPdnAvailabilityPerApnResponse }
*
*/
public void setRelayPdnAvailabilityPerApnHourlyGetResult(StatsRelayPdnAvailabilityPerApnResponse value) {
this.relayPdnAvailabilityPerApnHourlyGetResult = value;
}
}
| [
"ggrunwald@airspan.com"
] | ggrunwald@airspan.com |
7752e6e07febd64e4f07fcf34a9ae61becd9d0d2 | 67d501ff9ceacca18f3259adc43d248b71569aa2 | /idm-api/src/main/java/org/openforis/idm/metamodel/validation/ValidationResult.java | 7e02fbb20c4b3af87ba78c102ed7562f059b149e | [] | no_license | Arbonaut/idm | ee4fa9941598ebbd8b34f97c77d420727e595294 | 8aa93d27da2073e57b4782c6b420e04a00dc251f | refs/heads/master | 2021-01-17T15:55:29.135456 | 2012-06-09T13:59:13 | 2012-06-09T13:59:13 | 2,926,342 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 665 | java | package org.openforis.idm.metamodel.validation;
/**
* @author G. Miceli
* @author M. Togna
*/
public final class ValidationResult {
private ValidationRule<?> validator;
private ValidationResultFlag flag;
public ValidationResult(ValidationRule<?> validator, ValidationResultFlag flag) {
this.validator = validator;
this.flag = flag;
}
public ValidationRule<?> getValidator() {
return validator;
}
public ValidationResultFlag getFlag() {
return flag;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(validator);
sb.append(flag);
return sb.toString();
}
}
| [
"stefano.ricci@fao.org"
] | stefano.ricci@fao.org |
03ea4a75176259e222e2a9282b3b9eb018288e2d | a47f5306c4795d85bf7100e646b26b614c32ea71 | /sphairas-libs/term-report/src/org/thespheres/betula/termreport/module/TargetAssessmentDelegate.java | befd42848e826d8e78bc4163673a8949cac27669 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | sphairas/sphairas-desktop | 65aaa0cd1955f541d3edcaf79442e645724e891b | f47c8d4ea62c1fc2876c0ffa44e5925bfaebc316 | refs/heads/master | 2023-01-21T12:02:04.146623 | 2020-10-22T18:26:52 | 2020-10-22T18:26:52 | 243,803,115 | 2 | 1 | Apache-2.0 | 2022-12-06T00:34:25 | 2020-02-28T16:11:33 | Java | UTF-8 | Java | false | false | 1,805 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.thespheres.betula.termreport.module;
import java.util.Set;
import java.util.stream.Collectors;
import org.thespheres.betula.StudentId;
import org.thespheres.betula.assess.Grade;
import org.thespheres.betula.assess.GradeTargetAssessment;
import org.thespheres.betula.document.Timestamp;
import org.thespheres.betula.termreport.model.XmlTargetAssessmentProvider;
/**
*
* @author boris.heithecker
*/
public class TargetAssessmentDelegate implements GradeTargetAssessment {
private final XmlTargetAssessmentProvider original;
public TargetAssessmentDelegate(final XmlTargetAssessmentProvider dataobj) {
this.original = dataobj;
}
public XmlTargetAssessmentProvider getOriginal() {
return original;
}
@Override
public void submit(StudentId student, Grade grade, Timestamp timestamp) {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public Grade select(StudentId student) {
return original.select(student);
}
@Override
public Timestamp timestamp(StudentId student) {
return original.timestamp(student);
}
@Override
public Set<StudentId> students() {
return original.students().stream().collect(Collectors.toSet());
}
@Override
public String getPreferredConvention() {
return original.getPreferredConvention();
}
@Override
public void addListener(Listener listener) {
original.addListener(listener);
}
@Override
public void removeListener(Listener listener) {
original.removeListener(listener);
}
}
| [
"boris.heithecker@gmx.net"
] | boris.heithecker@gmx.net |
077a44f26080ebe524ca98dcd6636c33903b6e2d | b21377ae881d9fe21b3866fecb48413b5054a858 | /src/main/java/org/silnith/parser/html5/lexical/state/AfterAttributeValueQuotedState.java | 538eb6b80532ad56efab400d2c2cbd499d5de575 | [] | no_license | silnith-org/html5-parser | 0e5794cf733ef92d3e3ed349a15d9bc5c2a59236 | 991190fdab51feb57a26d38f578c3c7e759980ff | refs/heads/master | 2021-01-19T03:30:33.067501 | 2016-01-20T22:51:56 | 2016-01-20T22:51:56 | 50,066,369 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,374 | java | package org.silnith.parser.html5.lexical.state;
import static org.silnith.parser.util.UnicodeCodePoints.CHARACTER_TABULATION;
import static org.silnith.parser.util.UnicodeCodePoints.FORM_FEED;
import static org.silnith.parser.util.UnicodeCodePoints.GREATER_THAN_SIGN;
import static org.silnith.parser.util.UnicodeCodePoints.LINE_FEED;
import static org.silnith.parser.util.UnicodeCodePoints.SOLIDUS;
import static org.silnith.parser.util.UnicodeCodePoints.SPACE;
import java.io.IOException;
import java.util.List;
import org.silnith.parser.ParseErrorException;
import org.silnith.parser.html5.lexical.Tokenizer;
import org.silnith.parser.html5.lexical.token.TagToken;
import org.silnith.parser.html5.lexical.token.Token;
/**
* @see <a href="http://www.w3.org/TR/html5/syntax.html#after-attribute-value-%28quoted%29-state">8.2.4.42 After attribute value (quoted) state</a>
* @author <a href="mailto:silnith@gmail.com">Kent Rosenkoetter</a>
*/
public class AfterAttributeValueQuotedState extends TokenizerState {
public AfterAttributeValueQuotedState(final Tokenizer tokenizer) {
super(tokenizer);
}
@Override
public int getMaxPushback() {
return 1;
}
@Override
public List<Token> getNextTokens() throws IOException {
final int ch = consume();
switch (ch) {
case CHARACTER_TABULATION: // fall through
case LINE_FEED: // fall through
case FORM_FEED: // fall through
case SPACE: {
setTokenizerState(Tokenizer.State.BEFORE_ATTRIBUTE_NAME);
return NOTHING;
} // break;
case SOLIDUS: {
setTokenizerState(Tokenizer.State.SELF_CLOSING_START_TAG);
return NOTHING;
} // break;
case GREATER_THAN_SIGN: {
setTokenizerState(Tokenizer.State.DATA);
final TagToken pendingToken = clearPendingTag();
return one(pendingToken);
} // break;
case EOF: {
if (isAllowParseErrors()) {
setTokenizerState(Tokenizer.State.DATA);
return NOTHING;
} else {
throw new ParseErrorException("Unexpected end-of-file after quoted attribute value.");
}
} // break;
default: {
if (isAllowParseErrors()) {
unconsume(ch);
setTokenizerState(Tokenizer.State.BEFORE_ATTRIBUTE_NAME);
return NOTHING;
} else {
throw new ParseErrorException("Illegal character after quoted attribute value: " + (char) ch);
}
} // break;
}
}
}
| [
"silnith@gmail.com"
] | silnith@gmail.com |
3b9ab852a91d8ce669570770f0046025e8f2b478 | 59335ee9c801c8661c5d7f609f48ad77ae189ce3 | /src/netty/test/obj/ConcurrencyTestHandler.java | afd3be00d46a620199ce2fed5fcb21bf436a1048 | [] | no_license | vonzhou/netty3-learn | 5b157ca677535a18a0d13cda71d4e70a1ae2d6f0 | 2717cc766f62d8b3c094988e00968b06fec0fba1 | refs/heads/master | 2020-04-10T12:19:14.111367 | 2014-05-31T16:14:01 | 2014-05-31T16:14:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,040 | java | package netty.test.obj;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
public class ConcurrencyTestHandler extends SimpleChannelHandler {
private static int count = 0;
@Override
public void channelConnected(ChannelHandlerContext ctx, final ChannelStateEvent e)
throws Exception {
for(int i = 0; i < 100000; i ++){
Thread t = new Thread(new Runnable() {
@Override
public void run() {
sendObj(e.getChannel());
}
});
System.out.println("Thread count: " + i);
t.run();
}
}
private void sendObj(Channel channel){
count ++;
Command cmd = new Command();
cmd.setActionName("Hello action");
System.out.println("Write :" + count);
channel.write(cmd);
}
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
throws Exception {
super.messageReceived(ctx, e);
}
}
| [
"vonzhou@163.com"
] | vonzhou@163.com |
f5ada27bfaa26b58537fbae87a39d4a6e336d2ac | 55eb24f599565e850dbe7d84a216756f6358ed45 | /sms/src/main/java/com/joh/sms/controller/EnrollmentPaymentController.java | 737da93119c639c257fa3240947d9d5ba93753ac | [] | no_license | jawharomer/sms | 302370a2fc4ba628e3e00a952096fdfd14824851 | bd5853f17fd28d0f4656b853b9d0dabc33291ddb | refs/heads/master | 2020-03-27T02:51:36.251176 | 2019-01-06T17:07:28 | 2019-01-06T17:07:28 | 145,822,598 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,135 | java | package com.joh.sms.controller;
import java.util.Date;
import java.util.List;
import javax.validation.Valid;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.joh.sms.model.Enrollment;
import com.joh.sms.model.EnrollmentPayment;
import com.joh.sms.model.Expense;
import com.joh.sms.service.EnrollmentPaymentService;
import com.joh.sms.service.EnrollmentService;
@Controller()
@RequestMapping(path = "/enrollmentPayments")
public class EnrollmentPaymentController {
private static final Logger logger = Logger.getLogger(EnrollmentPaymentController.class);
@Autowired
private EnrollmentPaymentService enrollmentPaymentService;
@Autowired
private EnrollmentService enrollmentService;
@GetMapping
private String getAllExpenses(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date from,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date to, Model model) {
logger.info("getAllExpenses->fired");
logger.info("from=" + from);
logger.info("to=" + to);
Iterable<EnrollmentPayment> enrollmentPayments = enrollmentPaymentService.findAllByTimeBetween(from, to);
logger.info("enrollmentPayments=" + enrollmentPayments);
model.addAttribute("enrollmentPayments", enrollmentPayments);
model.addAttribute("from", from);
model.addAttribute("to", to);
return "adminEnrollmentPayments";
}
@GetMapping(path = "/enrollment/{id}")
public String getAllEnrollmentPayment(@PathVariable int id, Model model) {
logger.info("getAllEnrollmentPayment->fired");
logger.info("enrollmentId=" + id);
model.addAttribute("enrollmentId", id);
Enrollment enrolllment = enrollmentService.findOne(id);
logger.info("enrolllment=" + enrolllment);
Iterable<EnrollmentPayment> enrollmentPayments = enrollmentPaymentService.findByEnrollmentId(id);
logger.info("enrollmentPayments=" + enrollmentPayments);
model.addAttribute("enrollmentPayments", enrollmentPayments);
model.addAttribute("enrolllment", enrolllment);
return "enrollmentPayments";
}
@GetMapping(path = "/add/{id}")
public String getAddingEnrollmentPayment(@PathVariable int id, Model model) {
logger.info("getAddingEnrollmentPayment->fired");
EnrollmentPayment enrollmentPayment = new EnrollmentPayment();
model.addAttribute("enrollmentId", id);
model.addAttribute("enrollmentPayment", enrollmentPayment);
return "enrollmentPayment/addEnrollmentPayment";
}
@PostMapping(path = "/add/{id}")
public String addEnrollmentPayment(@PathVariable int id, @RequestBody @Valid EnrollmentPayment enrollmentPayment,
BindingResult result, Model model) {
logger.info("addEnrollmentPayment->fired");
logger.info("enrollmentPayment=" + enrollmentPayment);
logger.info("error=" + result.getAllErrors());
if (result.hasErrors()) {
model.addAttribute("enrollmentId", id);
model.addAttribute("enrollmentPayment", enrollmentPayment);
return "enrollmentPayment/addEnrollmentPayment";
} else {
Enrollment enrollment = new Enrollment();
enrollment.setId(id);
enrollmentPayment.setEnrollment(enrollment);
enrollmentPaymentService.save(enrollmentPayment);
return "success";
}
}
@DeleteMapping(path = "/{id}")
@ResponseBody
public String deleteEnrollmentPayment(@PathVariable int id) {
logger.info("deleteEnrollmentPayment->fired");
logger.info("id=" + id);
enrollmentPaymentService.delete(id);
return "success";
}
@GetMapping(path = "/edit/{id}")
public String getEditingEnrollmentPayment(@PathVariable int id, Model model) {
logger.info("getEditingEnrollmentPayment->fired");
EnrollmentPayment enrollmentPayment = enrollmentPaymentService.findOne(id);
logger.info("enrollmentPayment=" + enrollmentPayment);
model.addAttribute("enrollmentPayment", enrollmentPayment);
return "enrollmentPayment/editEnrollmentPayment";
}
@PostMapping(path = "/edit/{id}")
public String updateEnrollmentPayment(@PathVariable int id, @RequestBody @Valid EnrollmentPayment enrollmentPayment,
BindingResult result, Model model) {
logger.info("updateEnrollmentPayment->fired");
logger.info("enrollmentPaymentId=" + id);
enrollmentPayment.setId(id);
logger.info("error=" + result.getAllErrors());
if (result.hasErrors()) {
model.addAttribute("enrollmentPayment", enrollmentPayment);
return "enrollmentPayment/editEnrollmentPayment";
} else {
enrollmentPaymentService.update(enrollmentPayment);
return "success";
}
}
}
| [
"jawhar.omar@yahoo.com"
] | jawhar.omar@yahoo.com |
3f2cdee65dc9d30b80eb991e38a62cf59913c19c | 582a3f197a7886344a3cdb74d45cf06b6e062817 | /2.JavaCore/src/com/javarush/task/task19/task1903/Solution.java | 30f92050a1fe7e7681fba12de57e9ae868e84b9b | [] | no_license | sfill70/JavaRushTasks | 66a15073945b5efd271bbbaa1d08df8b2d1185f2 | f5763c59989d82b85b2c00ebfbaceae80c30337e | refs/heads/master | 2021-09-14T18:47:04.840991 | 2018-05-17T13:56:16 | 2018-05-17T13:56:16 | 115,197,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,032 | java | package com.javarush.task.task19.task1903;
/*
Адаптация нескольких интерфейсов
*/
import java.util.HashMap;
import java.util.Map;
public class Solution {
public static Map<String, String> countries = new HashMap<String, String>();
static {
countries.put("UA", "Ukraine");
countries.put("RU", "Russia");
countries.put("CA", "Canada");
}
public static void main(String[] args) {
/* String line="1234567890";
int id2 = Integer.parseInt(line.substring(0, 8));
int code = 345;
String s= (String.format("%012d",id2));
System.out.println(s);
System.out.println(String.format( "+%d(%3.3s)",code,(String.format("%010d",id2)))+String.format("%010d",id2).substring(3,6)+"-"+String.format("%010d",id2).substring(6,8)+"-"+String.format("%010d",id2).substring(8,10));
String d = String.format( "+%s(%010d)",code,id2);
System.out.println(d);
String first = countries.get("RU");
System.out.println(first);*/
}
public static class IncomeDataAdapter implements Customer, Contact {
private IncomeData data;
public IncomeDataAdapter(IncomeData data) {
this.data = data;
}
@Override
public String getCompanyName(){return this.data.getCompany();}
@Override
public String getCountryName(){return countries.get(this.data.getCountryCode());}
@Override
public String getName() {return (this.data.getContactLastName()+", "+this.data.getContactFirstName());}
@Override
/*public String getPhoneNumber(){return String.format( "+%d(%3.3s)",this.data.getCountryPhoneCode(),(String.format("%010d",this.data.getPhoneNumber())))+
String.format("%010d",this.data.getPhoneNumber()).substring(3,6)+"-"+String.format("%010d",this.data.getPhoneNumber()).substring(6,8)+"-"
+String.format("%010d",this.data.getPhoneNumber()).substring(8,10);}
*/
public String getPhoneNumber() {
String s = String.format("%010d",this.data.getPhoneNumber());
return String.format("+%s(%s)%s-%s-%s", data.getCountryPhoneCode(),s.substring(0,3),
s.substring(3,6),s.substring(6,8),s.substring(8));
}
}
public static interface IncomeData {
String getCountryCode(); //example UA
String getCompany(); //example JavaRush Ltd.
String getContactFirstName(); //example Ivan
String getContactLastName(); //example Ivanov
int getCountryPhoneCode(); //example 38
int getPhoneNumber(); //example 501234567
}
public static interface Customer {
String getCompanyName(); //example JavaRush Ltd.
String getCountryName(); //example Ukraine
}
public static interface Contact {
String getName(); //example Ivanov, Ivan
String getPhoneNumber(); //example +38(050)123-45-67
}
} | [
"sergfill70@yandex.ru"
] | sergfill70@yandex.ru |
b713b3f1b483f31f5a72023788d339679efccdc6 | a3a5aeb018ab1c3e92f924e13c7e290eeec6bd06 | /day04/tast/WhileDemo.java | 36645ee4296a71ed88ae5ba808b3c6a834fd1984 | [] | no_license | qyl1006/JavaApps | bc21a25d9a28e98f83227af6b54b6b4859a7ff30 | e47445194677531babcc7a20c8fd334f253682e1 | refs/heads/master | 2021-05-15T07:44:26.776608 | 2018-03-09T14:37:21 | 2018-03-09T14:37:21 | 111,789,114 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 322 | java | /**
while循环:
格式:
while(boolean表达式)
{
循环体s
}
需求: 叫5声大哥大
*/
//测试类
public class WhileDemo
{
public static void main(String[] args)
{
int i = 0;
while (i < 5)
{
System.out.println("不做大哥好多年");
i ++;
}
}
}
//总结: 注意结构,boolean判断 | [
"yuelinshi@qq.com"
] | yuelinshi@qq.com |
862582516851c4f01ccce0c0cd82b9db0b852455 | 2d17b8bb715ea5a658c798a0cf735f444d3cae57 | /src/main/java/slimeknights/tconstruct/world/client/PiglinHeadModel.java | 961e99fe5724574c57a59e4d5915a6196f75247a | [
"MIT"
] | permissive | koh-gh/TinkersConstruct | ac077e30fcfe160dea19e1add3f5ec3346385d09 | 58104e74a4130169fb9695f9e0ec424f182344a7 | refs/heads/1.16 | 2023-04-01T23:52:28.222223 | 2022-03-18T01:50:44 | 2022-03-18T01:50:44 | 132,241,625 | 0 | 0 | MIT | 2022-02-03T13:35:44 | 2018-05-05T11:25:09 | Java | UTF-8 | Java | false | false | 1,770 | java | package slimeknights.tconstruct.world.client;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import net.minecraft.client.renderer.entity.model.GenericHeadModel;
import net.minecraft.client.renderer.model.ModelRenderer;
public class PiglinHeadModel extends GenericHeadModel {
private final ModelRenderer head;
public PiglinHeadModel() {
super(0, 0, 64, 64);
this.head = new ModelRenderer(this);
this.head.setTextureOffset( 0, 0).addBox(-5f, -8f, -4f, 10f, 8f, 8f, 0);
this.head.setTextureOffset(31, 1).addBox(-2f, -4f, -5f, 4f, 4f, 1f, 0);
this.head.setTextureOffset( 2, 4).addBox( 2f, -2f, -5f, 1f, 2f, 1f, 0);
this.head.setTextureOffset( 2, 0).addBox(-3f, -2f, -5f, 1f, 2f, 1f, 0);
// right ear
ModelRenderer rightEar = new ModelRenderer(this, 51, 6);
rightEar.setRotationPoint(4.5F, -6.0F, 0.0F);
rightEar.addBox(0f, 0f, -2f, 1f, 5f, 4f, 0f);
rightEar.rotateAngleZ = (float)(-Math.PI / 4.5f);
head.addChild(rightEar);
// left ear
ModelRenderer leftEar = new ModelRenderer(this, 39, 6);
leftEar.setRotationPoint(-4.5F, -6.0F, 0.0F);
leftEar.addBox(-1f, 0f, -2f, 1f, 5f, 4f, 0f);
leftEar.rotateAngleZ = (float)(Math.PI / 4.5f);
head.addChild(leftEar);
}
@Override
public void func_225603_a_(float animationProgress, float pitch, float yaw) {
this.head.rotateAngleY = pitch * ((float)Math.PI / 180F);
this.head.rotateAngleX = yaw * ((float)Math.PI / 180F);
}
@Override
public void render(MatrixStack matrices, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
this.head.render(matrices, buffer, packedLight, packedOverlay, red, green, blue, alpha);
}
}
| [
"knightminer4@gmail.com"
] | knightminer4@gmail.com |
ca8d4bc5b7b2ad537d35b0b0aee3843fa0ec023c | 73601deb01f3c3f90fbe6346c5d407653431609a | /First_Step/data/44/136/submittedfiles/Executable.java | 2da93c3b478684abce2c59f72ebcae7ad8393543 | [] | no_license | Benjam73/ComplexityAnalyzer | 145fbac896ac18e6239791a636fe871efc3de332 | 27a0f1d5528ee66f2913b18137425aae59d06b0f | refs/heads/master | 2020-03-17T09:25:31.308634 | 2018-07-20T13:34:17 | 2018-07-20T13:34:17 | 133,474,612 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 276 | java | /**
* A class to perform your own tests
* @author hadrien cambazard
*/
public class Executable {
public static void main(String[] args) {
int[] table = {1,6,8,3,9,0,0,21};
Scores scores = new Scores(table);
scores.podium();
}
} | [
"besnierbenjamin73@gmail.com"
] | besnierbenjamin73@gmail.com |
0131cdd103ab4723fb076c558a24f47208526def | 58df55b0daff8c1892c00369f02bf4bf41804576 | /src/crt.java | fda04573ac011973bf1620d07cd4bcc639f4865b | [] | 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 | 1,159 | java | import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.os.AsyncTask;
public final class crt
extends AsyncTask<String, Void, Void>
{
public crt(crr paramcrr) {}
private final Void a(String... paramVarArgs)
{
Object localObject = a.c;
paramVarArgs = paramVarArgs[0];
localObject = ((chc)localObject).a(false);
ContentValues localContentValues;
if (localObject != null)
{
localContentValues = new ContentValues(3);
localContentValues.put("display1", paramVarArgs);
localContentValues.put("query", paramVarArgs);
localContentValues.put("date", Long.valueOf(System.currentTimeMillis()));
}
try
{
((SQLiteDatabase)localObject).insert("suggestions", null, localContentValues);
return null;
}
catch (IllegalStateException paramVarArgs)
{
cvm.d(chc.a, paramVarArgs, "recent suggestions db save exception", new Object[0]);
}
return null;
}
protected final void onPreExecute()
{
a.j = true;
}
}
/* Location:
* Qualified Name: crt
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
8fa75229d69d6d4abc37560ca5379f0473aef7c9 | 038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad | /schemaOrgDomaConv/src/org/kyojo/schemaOrg/m3n3/doma/healthLifesci/medicalTrialDesign/SingleBlindedTrialConverter.java | e0e741b07dff166ddf287e5ab193201a7124f45d | [
"Apache-2.0"
] | permissive | nagaikenshin/schemaOrg | 3dec1626781913930da5585884e3484e0b525aea | 4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8 | refs/heads/master | 2021-06-25T04:52:49.995840 | 2019-05-12T06:22:37 | 2019-05-12T06:22:37 | 134,319,974 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 684 | java | package org.kyojo.schemaorg.m3n3.doma.healthLifesci.medicalTrialDesign;
import org.seasar.doma.ExternalDomain;
import org.seasar.doma.jdbc.domain.DomainConverter;
import org.kyojo.schemaorg.m3n3.healthLifesci.medicalTrialDesign.SINGLE_BLINDED_TRIAL;
import org.kyojo.schemaorg.m3n3.healthLifesci.MedicalTrialDesign.SingleBlindedTrial;
@ExternalDomain
public class SingleBlindedTrialConverter implements DomainConverter<SingleBlindedTrial, String> {
@Override
public String fromDomainToValue(SingleBlindedTrial domain) {
return domain.getNativeValue();
}
@Override
public SingleBlindedTrial fromValueToDomain(String value) {
return new SINGLE_BLINDED_TRIAL(value);
}
}
| [
"nagai@nagaikenshin.com"
] | nagai@nagaikenshin.com |
b3f244d18e61717ce3a914517a4983578e4b8816 | c9186452afdc8a7bfc44408c12a03c5f065dc276 | /chapter-08/springboot-multiple-datasources-demo/src/main/java/com/apress/demo/config/WebMvcConfig.java | 9093ce794cee4a0609c6c566bc6fc6b5893f01ce | [] | no_license | Tushar456/beginning-spring-boot-2 | 4bcaebbcf7b86308608c64b0b8373ab19cb391a2 | 8d00a801ed06f97f2f584fe830e1264636ec8c34 | refs/heads/master | 2022-04-25T13:47:04.749390 | 2020-02-06T01:22:43 | 2020-02-06T01:22:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,939 | java | /**
*
*/
package com.apress.demo.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
* @author Siva
*
*/
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter
{
@Bean
public OpenEntityManagerInViewFilter securityOpenEntityManagerInViewFilter()
{
OpenEntityManagerInViewFilter osivFilter = new OpenEntityManagerInViewFilter();
osivFilter.setEntityManagerFactoryBeanName("securityEntityManagerFactory");
return osivFilter;
}
@Bean
public OpenEntityManagerInViewFilter ordersOpenEntityManagerInViewFilter()
{
OpenEntityManagerInViewFilter osivFilter = new OpenEntityManagerInViewFilter();
osivFilter.setEntityManagerFactoryBeanName("ordersEntityManagerFactory");
return osivFilter;
}
/*@Bean
public FilterRegistrationBean securityOSIVFilter() {
OpenEntityManagerInViewFilter securityOsivFilter = new OpenEntityManagerInViewFilter();
securityOsivFilter.setEntityManagerFactoryBeanName("securityEntityManagerFactory");
FilterRegistrationBean registration = new FilterRegistrationBean(securityOsivFilter);
registration.addUrlPatterns("/app/*");
//registration.addUrlPatterns("/*");
return registration;
}
@Bean
public FilterRegistrationBean ordersOSIVFilter() {
OpenEntityManagerInViewFilter ordersOsivFilter = new OpenEntityManagerInViewFilter();
ordersOsivFilter.setEntityManagerFactoryBeanName("ordersEntityManagerFactory");
FilterRegistrationBean registration = new FilterRegistrationBean(ordersOsivFilter);
registration.addUrlPatterns("/orders/*");
// registration.addUrlPatterns("/*");
return registration;
}*/
} | [
"sivaprasadreddy.k@gmail.com"
] | sivaprasadreddy.k@gmail.com |
9cec3b3fb294ed16ad3cef77376e4a53f7092d17 | 3534bc9ad76465d9a237ff34ce9352e15e359cb4 | /app/src/main/java/com/dream/myliu/liangwarehouse/entity/MzgWebDataTopicEty.java | c355d93ec99a2cb84f34a97733dfe0313f623d05 | [] | no_license | dearHaoGeGe/LiangWarehouse | e1f6e51423b25b6fd3cdf007501f6cb284556d77 | 38e3137ae5add467ff05b7fcb0cf791f022657e9 | refs/heads/master | 2021-01-01T05:07:37.149441 | 2016-05-13T07:18:15 | 2016-05-13T07:18:15 | 58,711,483 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 851 | java | package com.dream.myliu.liangwarehouse.entity;
/**
* Created by Amethyst on 16/1/21/14/25.
*/
public class MzgWebDataTopicEty {
private String taid;
private String topic_name;
private String content;
private String topic_url;
public String getTopic_url() {
return topic_url;
}
public void setTopic_url(String topic_url) {
this.topic_url = topic_url;
}
public String getTaid() {
return taid;
}
public void setTaid(String taid) {
this.taid = taid;
}
public String getTopic_name() {
return topic_name;
}
public void setTopic_name(String topic_name) {
this.topic_name = topic_name;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
| [
"862157904@qq.com"
] | 862157904@qq.com |
b0c171346946281bdec867d43924f81202e841f7 | 1dc0487cfaa450e9e6a30963d3f4596f3e9de7f6 | /almightyjava/src/main/java/com/mightyjava/validator/Validate.java | 3bbf3d382c3522377c83c736b395b1a2208b8905 | [] | no_license | nouriforever/mightyjava | 106b600e737ea53a60e65d04b2342c44271e2622 | 0e1cb8db0b9bba77e224d6c633474ae9835e582f | refs/heads/master | 2020-05-04T23:10:07.300450 | 2019-03-24T16:33:10 | 2019-03-24T16:33:10 | 179,534,952 | 2 | 7 | null | null | null | null | UTF-8 | Java | false | false | 665 | java | package com.mightyjava.validator;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;
@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = FieldValidator.class)
@Documented
public @interface Validate {
int min();
int max();
String regexp();
String message();
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
| [
"jeetparmar949@gmail.com"
] | jeetparmar949@gmail.com |
27595bb0bab0a467127b7ce8fa38cd3ac143ff27 | 3dd35c0681b374ce31dbb255b87df077387405ff | /generated/com/guidewire/_generated/entity/IMExcludedAccountInternalAccess.java | 134475997cefb23fa97b4f5c0f15c57147e85e4e | [] | no_license | walisashwini/SBTBackup | 58b635a358e8992339db8f2cc06978326fed1b99 | 4d4de43576ec483bc031f3213389f02a92ad7528 | refs/heads/master | 2023-01-11T09:09:10.205139 | 2020-11-18T12:11:45 | 2020-11-18T12:11:45 | 311,884,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 857 | java | package com.guidewire._generated.entity;
@javax.annotation.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "IMExcludedAccount.eti;IMExcludedAccount.eix;IMExcludedAccount.etx")
@java.lang.SuppressWarnings(value = {"deprecation", "unchecked"})
public class IMExcludedAccountInternalAccess {
public static final com.guidewire.pl.system.internal.FriendAccessor<com.guidewire.pl.persistence.code.InstantiableEntityFriendAccess<entity.IMExcludedAccount, com.guidewire._generated.entity.IMExcludedAccountInternal>> FRIEND_ACCESSOR = new com.guidewire.pl.system.internal.FriendAccessor<com.guidewire.pl.persistence.code.InstantiableEntityFriendAccess<entity.IMExcludedAccount, com.guidewire._generated.entity.IMExcludedAccountInternal>>(entity.IMExcludedAccount.class);
private IMExcludedAccountInternalAccess() {
}
} | [
"ashwini@cruxxtechnologies.com"
] | ashwini@cruxxtechnologies.com |
c645621aab6708b1e69bf24885c6f9796c25cbe5 | 6695714059b4049e0484dda0b820537a9a245a32 | /EasyPortalGWT/src/java/br/com/easyportal/gwt/client/admin/AdminMenuHandlerWeb.java | 8b7830523cfe33b194231ab482baaf8c8a9043e5 | [] | no_license | geoleite/EasyNetSolution | 440bd16b5775e89bf4e48742cdaef4ec56c6f429 | 1a0690859a2306f5ad53099b0ea7939611e7b6b1 | refs/heads/master | 2021-01-12T08:22:36.557272 | 2017-11-28T23:06:29 | 2017-11-28T23:06:29 | 76,559,640 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 453 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package br.com.easyportal.gwt.client.admin;
import br.com.easyportal.gwt.client.webModel.AMenuHandler;
/**
*
* @author geoleite
*/
public class AdminMenuHandlerWeb extends AMenuHandler{
public AdminMenuHandlerWeb() {
setSystem("PORTAL");
}
@Override
public void actionEventMenu(Object me, String acao) {
}
}
| [
"georgeleitejunior@gmail.com"
] | georgeleitejunior@gmail.com |
e50ff6212a7fe41cca4c826583d09094e22a4b7b | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.minihd.qq/assets/exlibs.2.jar/classes.jar/ebz.java | 08352fbb6cd00cf01f921f417699aa5e53c96261 | [] | 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 | 985 | java | import android.view.View;
import com.tencent.mobileqq.activity.FriendProfileImageActivity;
import com.tencent.mobileqq.activity.FriendProfileImageModel.ProfileImageInfo;
import com.tencent.widget.ActionSheet;
import com.tencent.widget.ActionSheet.OnButtonClickListener;
class ebz
implements ActionSheet.OnButtonClickListener
{
ebz(eby parameby, FriendProfileImageModel.ProfileImageInfo paramProfileImageInfo, ActionSheet paramActionSheet) {}
public void OnClick(View paramView, int paramInt)
{
switch (paramInt)
{
}
for (;;)
{
this.jdField_a_of_type_ComTencentWidgetActionSheet.dismiss();
return;
this.jdField_a_of_type_Eby.a.b(this.jdField_a_of_type_ComTencentMobileqqActivityFriendProfileImageModel$ProfileImageInfo);
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.2.jar\classes.jar
* Qualified Name: ebz
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
e9ae94849ed94e9bb2a18d024fcd761afd03ede2 | 0054a5e800e5a67dad19346af8034b25a12e12ef | /src/com/julyerr/leetcode/array/BuyAndSellStockII.java | 11c8a83ec364d7c445ec1be4e6166e3a37ce777f | [] | no_license | julyerr/algo | 3cd75afc7b660c3942975759582029f794af5d75 | f05de5ff57e4696e87d63e53f3ffc5b09433ee99 | refs/heads/master | 2021-05-12T12:50:20.231013 | 2018-10-05T09:08:11 | 2018-10-05T09:08:11 | 117,422,528 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 894 | java | package com.julyerr.leetcode.array;
/**
* Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit.
You may complete as many transactions as you like (ie, buy one0327 and sell one0327 share of the stock multiple times).
However, you may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).
*/
/**
* if gains the profit , just sell it out
*/
public class BuyAndSellStockII {
public int maxProfit(int[] prices){
//check if the prices is valid
if(prices == null || prices.length<=1){
return 0;
}
int profit = 0;
for (int i = 0; i < prices.length; i++) {
if(prices[i-1]<prices[i]){
profit+= prices[i] - prices[i-1];
}
}
return profit;
}
}
| [
"julyerr.test@gmail.com"
] | julyerr.test@gmail.com |
9be58fc50550c8d6e6a4a495791b21f385c0bf67 | b23e3675bbf253c17f22de097ca73b6d2555bc2f | /bitcamp-web-11/src/main/java/bitcamp/pms/dao/MemberDao.java | 6f60216dc62c4804042a5e766d42a2e2961ab253 | [] | no_license | tjr7788/bitcamp-cloud-computing | 0f088dc8c84fe4d4a3adee7e61a53830517f88d8 | 982a32718868c4aac6ed5e2103252f4d8871c9b7 | refs/heads/master | 2020-03-22T04:48:18.497052 | 2018-09-05T02:03:45 | 2018-09-05T02:03:45 | 139,522,345 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 553 | java | package bitcamp.pms.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import bitcamp.pms.domain.Member;
public interface MemberDao {
List<Member> selectList(Map<String, Object> params);
Member selectOne(String id);
int update(Member member);
int delete(String id);
int insert(Member member);
}
| [
"sig4213@naver.com"
] | sig4213@naver.com |
da677f759212804d6a246750742cec9c946d706f | 473c3e2078051eaa8c969e2c2614384050eb4d09 | /API/Content Service/src/test/java/examapi/contentservice/unitTest/CategoryServiceTest.java | cfb0f4c8e88da1f17527366f8702ab2401456b4e | [] | no_license | kostovvl/Angular-Demo-Exam | 46cd27a11a72528ef28b14e0d59c0bfedb0ac9f9 | 12b172d3c68e57efb1ad77dcab49acdabeb0f3b5 | refs/heads/master | 2023-01-03T21:24:18.013893 | 2020-10-21T08:09:40 | 2020-10-21T08:09:40 | 304,608,128 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,189 | java | package examapi.contentservice.unitTest;
import examapi.contentservice.domain.dto.CategoryDto;
import examapi.contentservice.domain.entity.Category;
import examapi.contentservice.repository.CategoryRepository;
import examapi.contentservice.repository.CommentRepository;
import examapi.contentservice.repository.PostRepository;
import examapi.contentservice.service.CategoryService;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import static org.mockito.Mockito.when;
@ExtendWith(MockitoExtension.class)
public class CategoryServiceTest {
@Autowired
private CategoryService categoryService;
@Mock
private CategoryRepository categoryRepository;
@Mock
private PostRepository postRepository;
@Mock
private CommentRepository commentRepository;
@BeforeEach
public void setUp() {
this.categoryService = new CategoryService(this.categoryRepository,
this.postRepository, this.commentRepository, new ModelMapper());
}
@Test
public void should_Return_All_Categories() {
//assert
Category category1 = new Category();
category1.setId(1);
category1.setCreatedOn(LocalDateTime.now());
category1.setName("Category1");
Category category2 = new Category();
category2.setId(2);
category2.setCreatedOn(LocalDateTime.now());
category2.setName("Category2");
List<Category> repoCategories = new ArrayList<>();
repoCategories.add(category1);
repoCategories.add(category2);
when(this.categoryRepository.findAll()).thenReturn(repoCategories);
//act
List<CategoryDto> result = this.categoryService.getAll();
//assert
Assertions.assertEquals(2, result.size());
}
}
| [
"53002640+kostovvl@users.noreply.github.com"
] | 53002640+kostovvl@users.noreply.github.com |
404c8f3357059c95668d6402cfe69079b83c9096 | 7c130d68a4deaaab53af90c978869bf934db8956 | /AIM-4.0-Data-Model/src/edu/emory/cci/aim/model/QSPMO.java | 7a8335749bc81168f5942273ccd28d937f824b88 | [] | no_license | nadirsaghar/AIM-4.0-Data-Model-Java-bindings | a70eeb0d6388d227649efe3af5d2260d3180085f | 79428f32748c319f638498a5f5baebf4c2d36bef | refs/heads/master | 2016-08-06T14:52:31.093028 | 2013-05-25T02:50:43 | 2013-05-25T02:50:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,218 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.05.24 at 10:41:57 PM EDT
//
package edu.emory.cci.aim.model;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for QSP_MO complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="QSP_MO">
* <complexContent>
* <extension base="{uri:iso.org:21090}QSET_MO">
* <sequence>
* <element name="first" type="{uri:iso.org:21090}QSET_MO" minOccurs="0"/>
* <element name="second" type="{uri:iso.org:21090}QSET_MO" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "QSP_MO", propOrder = {
"first",
"second"
})
public class QSPMO
extends QSETMO
{
protected QSETMO first;
protected QSETMO second;
/**
* Gets the value of the first property.
*
* @return
* possible object is
* {@link QSETMO }
*
*/
public QSETMO getFirst() {
return first;
}
/**
* Sets the value of the first property.
*
* @param value
* allowed object is
* {@link QSETMO }
*
*/
public void setFirst(QSETMO value) {
this.first = value;
}
/**
* Gets the value of the second property.
*
* @return
* possible object is
* {@link QSETMO }
*
*/
public QSETMO getSecond() {
return second;
}
/**
* Sets the value of the second property.
*
* @param value
* allowed object is
* {@link QSETMO }
*
*/
public void setSecond(QSETMO value) {
this.second = value;
}
}
| [
"nadirsaghar@yahoo.com"
] | nadirsaghar@yahoo.com |
c7205434b994eaefa85f1713053e65fcd0fae619 | f822e4abb0ca705bb0ed3d4cf0ed4a3bf9be11ed | /src/main/java/org/zmlx/hg4idea/action/mq/HgMqAppliedPatchAction.java | dc96831a61ec318cbc061381a8e8392798569a02 | [
"Apache-2.0"
] | permissive | consulo/consulo-mercurial | 4c642efb28bb7ef2809df1d3bd827d75221cf40e | 58bc2eb6353f348254be1e716c05156040e6acae | refs/heads/master | 2023-07-20T06:35:47.330892 | 2023-06-05T13:32:57 | 2023-06-05T13:32:57 | 19,280,973 | 0 | 0 | null | 2015-02-20T22:20:22 | 2014-04-29T15:14:40 | Python | UTF-8 | Java | false | false | 1,567 | java | /*
* Copyright 2000-2015 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 org.zmlx.hg4idea.action.mq;
import jakarta.annotation.Nonnull;
import consulo.util.lang.function.Condition;
import consulo.util.collection.ContainerUtil;
import consulo.versionControlSystem.log.Hash;
import org.zmlx.hg4idea.HgNameWithHashInfo;
import org.zmlx.hg4idea.action.HgLogSingleCommitAction;
import org.zmlx.hg4idea.repo.HgRepository;
public abstract class HgMqAppliedPatchAction extends HgLogSingleCommitAction {
@Override
protected boolean isEnabled(@Nonnull HgRepository repository, @Nonnull Hash commit) {
return super.isEnabled(repository, commit) && isAppliedPatch(repository, commit);
}
public static boolean isAppliedPatch(@Nonnull HgRepository repository, @Nonnull final Hash hash) {
return ContainerUtil.exists(repository.getMQAppliedPatches(), new Condition<HgNameWithHashInfo>() {
@Override
public boolean value(HgNameWithHashInfo info) {
return info.getHash().equals(hash);
}
});
}
}
| [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
abd019967e4eb26867fa56ffaebec168304a16a2 | 7f365c45418251b2f930d4ea9926f69f6acf4dd1 | /library/src/main/java/androidprojects/com/library/sticky_decoration/listener/PowerGroupListener.java | d4853e3b55687cf75d876f1eee88b6bb420852a8 | [] | no_license | pxfile/Android_Projects | 31c90e0e5c9ccd14b7465a67c2b1b4e327c5763e | 4b3c3a7cbe48f1be9b9c006b8067b4ebe9d4ea4f | refs/heads/master | 2020-04-05T13:33:45.807545 | 2017-09-16T08:53:04 | 2017-09-16T08:53:07 | 94,861,413 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 300 | java | package androidprojects.com.library.sticky_decoration.listener;
import android.view.View;
/**
* Created by gavin
* Created date 17/5/25
* 显示自定义View的Group监听
*/
public interface PowerGroupListener {
String getGroupName(int position);
View getGroupView(int position);
}
| [
"pxfile@163.com"
] | pxfile@163.com |
f8adf416d9c07f897410b1bac298a22c3ecd1fd1 | f51d683e32d8045caceb51f0dd565ee6fb764658 | /SmartAdmin/app/src/main/java/com/example/thebeast/smartadmin/FirstAidWeb_model.java | 79c69b5b491221cdf80a7b547e6110b8bcd8d59c | [] | no_license | FidelM345/AndroidProProjects | b94f1a44428e01b6f775cdbdd295d18eb70d0298 | f2127ae3bf9c2f71fd8f438272684c3e4fbee290 | refs/heads/master | 2020-05-30T14:04:41.918261 | 2019-06-01T21:34:14 | 2019-06-01T21:34:14 | 189,779,285 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,279 | java | package com.example.thebeast.smartadmin;
public class FirstAidWeb_model extends BlogPostId{
String thumbUri, imageUri,title,weburl;
Long timestamp;
public FirstAidWeb_model() {
}
public FirstAidWeb_model(String thumbUri, String imageUri,
String title, String weburl,
Long timestamp) {
this.thumbUri = thumbUri;
this.imageUri = imageUri;
this.title = title;
this.weburl = weburl;
this.timestamp = timestamp;
}
public Long getTimestamp() {
return timestamp;
}
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
public String getThumbUri() {
return thumbUri;
}
public void setThumbUri(String thumbUri) {
this.thumbUri = thumbUri;
}
public String getImageUri() {
return imageUri;
}
public void setImageUri(String imageUri) {
this.imageUri = imageUri;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getWeburl() {
return weburl;
}
public void setWeburl(String weburl) {
this.weburl = weburl;
}
}
| [
"fidelomolo7@gmail.com"
] | fidelomolo7@gmail.com |
078e0bf9c734b509a13b745e36f80134f890c1d4 | 5f7cb3ab554545306e901b9fe15ac10407fdd76e | /HBProj36-Tools in hibernate/src/com/nt/test/ToolsTest.java | 71a1ae9b5deb239b4531a3ca7983501485e9fb8d | [] | no_license | papupanda/Hibernate | a39dfd189f5252bcdee0b3e10f1ec459bdb5f2fe | 4f59602a060052c370091628d6953d63b48b8b69 | refs/heads/master | 2022-12-01T20:45:34.249304 | 2020-03-10T19:09:26 | 2020-03-10T19:09:26 | 246,118,088 | 0 | 0 | null | 2022-11-25T08:02:27 | 2020-03-09T18:57:59 | Java | UTF-8 | Java | false | false | 649 | java | package com.nt.test;
import java.sql.SQLException;
import org.hibernate.Session;
import org.hibernate.Transaction;
import com.nt.entity.Employee;
import com.nt.utility.HibernateUtil;
public class ToolsTest {
public static void main(String[] args) {
Session ses=null;
Employee emp=null,emp1=null;
//get Session
ses=HibernateUtil.getSession();
System.out.println("session created....");
try {
Thread.sleep(40000);
}
catch(Exception e) {
e.printStackTrace();
}
//close objs
HibernateUtil.closeSession(ses);
HibernateUtil.closeSessionFactory();
System.out.println("End of App");
}//main
}//class
| [
"satyaranjanpanda993@gmail.com"
] | satyaranjanpanda993@gmail.com |
2434dc61013e72895299b60bde0300591901faaf | be87d1e4bf86d635ecff77abb27e623ca33eeb3c | /19-CorrecaoNAC/src/br/com/fiap/teste/Teste.java | 7f3858dc865e1c4bd9056c4cc1205d63230f020f | [] | no_license | CielloArc/WorkspaceEAD | 7ed0b64107fb28d24811932c3b5a185f4210df62 | 9c0cbedc1a4bc142ff228025a9cbb394ef854e21 | refs/heads/master | 2021-01-20T09:26:25.229659 | 2017-05-25T14:13:13 | 2017-05-25T14:13:13 | 90,253,954 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,126 | java | package br.com.fiap.teste;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import javax.persistence.EntityManager;
import br.com.fiap.dao.LivroDAO;
import br.com.fiap.dao.impl.LivroDAOImpl;
import br.com.fiap.entity.Autor;
import br.com.fiap.entity.Editora;
import br.com.fiap.entity.Livro;
import br.com.fiap.exception.CommitErrorException;
import br.com.fiap.singleton.EntityManagerFactorySingleton;
public class Teste {
public static void main(String[] args) throws Exception {
EntityManager em = EntityManagerFactorySingleton.getInstance().createEntityManager();
LivroDAO dao = new LivroDAOImpl(em);
Editora editora = new Editora("Delicia", null);
Autor autor = new Autor("Guina", new GregorianCalendar(24, 06, 1969),null);
Livro livro = new Livro("y723y21731", "Aventuras de Jailson", null, editora);
List<Autor> lista = new ArrayList<>();
lista.add(autor);
livro.setAutores(lista);
try {
dao.cadastrar(livro);
dao.commit();
} catch (CommitErrorException e) {
e.printStackTrace();
}finally {
em.close();
System.exit(0);
}
}
}
| [
"logonrm@fiap.com.br"
] | logonrm@fiap.com.br |
de7437184c47b8b87b4d46ff2bf165535bec8e94 | d977306cf57f1ec90063fd93b1b398ded16259b7 | /trunk/ faic/FAIC/src/chromosomes/Chromosome.java | c9a8770c00e974f1658c99e98f8ae7edf910f630 | [] | no_license | BGCX067/faic-svn-to-git | 3015f1cbb4b258153182a72deaf56c38ae9fee2f | 02981da52e715c855b7dbf8210837e99324e51ac | refs/heads/master | 2021-01-13T00:56:26.628877 | 2015-12-28T14:20:19 | 2015-12-28T14:20:19 | 48,834,670 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,615 | java | package chromosomes;
import java.util.ArrayList;
import org.omg.CORBA.RepositoryIdHelper;
import crossingMethods.Reproductor;
import exceptions.ExceptionWrongParameterClass;
public abstract class Chromosome {
protected ArrayList geneStrip;
private double fitnessValue;
protected double crossingProbability;
protected double mutationProbability;
protected Reproductor reproductor;
protected int age;
protected int chromosomeSize;
protected int geneSize;
public Chromosome(int size, int geneSize,Reproductor rep)
{
//nacen con edad 0
age=0;
this.chromosomeSize=size;
this.reproductor=rep;
this.geneSize=geneSize;
}
public void setGeneSize(int geneSize) {
this.geneSize = geneSize;
}
public ArrayList<?> getGeneStrip() {
return geneStrip;
}
public double getCrossingProbability() {
return crossingProbability;
}
public double getMutationProbability() {
return mutationProbability;
}
public void setGeneStrip(ArrayList<?> geneStrip) {
this.geneStrip = geneStrip;
}
public Reproductor getReproductor() {
return reproductor;
}
public void setReproductor(Reproductor reproductor) {
this.reproductor = reproductor;
}
public abstract int getSize();
public double getFitnessValue() {
return fitnessValue;
}
public void setFitnessValue(double fitnessValue) {
this.fitnessValue = fitnessValue;
}
public ArrayList<Chromosome> crossover(Chromosome otherChromosome) throws ExceptionWrongParameterClass
{
//creo la pareja de reproduccion
ArrayList<Chromosome> parents = new ArrayList<Chromosome>();
parents.add(otherChromosome);
parents.add(this);
ArrayList<Chromosome> children = this.reproductor.getCrossing(parents);
return children;
}
/**
*
* @return "edad" o generaciones que lleva en la poblacion del cromosoma
*/
public int getAge() {
return this.age;
}
public abstract void addGene(Object gene);
public Object getGene(int pos)
{
return this.geneStrip.get(pos);
}
public abstract void flipGene(int i) ;
public abstract void setGeneValue(Object valuePos1, int pos2);
public int getGeneSize() {
return this.geneSize;
}
public int getChromosomeSize() {
return chromosomeSize;
}
public void setChromosomeSize(int chromosomeSize) {
this.chromosomeSize = chromosomeSize;
}
public abstract double getGeneToWeight(int j);
public void print() {
for(int i=0;i<this.chromosomeSize;i++)
{
System.out.print(this.geneStrip.get(i)+"-");
}
}
}
| [
"you@example.com"
] | you@example.com |
0414e8c267972ae7e3e73d4e33c275bb3cfbe957 | 353e6dbf1b9280c4f2fd52bce3ea703b6e22df1d | /src/autogenerated/java/net/minestom/server/instance/block/states/CaveVinesPlant.java | 8fad9d0cf312650b59093715cb28b5769ae2bc2f | [
"Apache-2.0"
] | permissive | MTGPROD/Minestom | 7e61e68850a414b8eb63a46efe2b92d8469baef5 | d7a68911539a00b27adbdb61fc0d56dec7d2f51c | refs/heads/master | 2023-06-29T15:23:58.699038 | 2021-07-30T12:01:54 | 2021-07-30T12:01:54 | 392,658,425 | 0 | 0 | Apache-2.0 | 2021-08-04T11:14:07 | 2021-08-04T11:14:07 | null | UTF-8 | Java | false | false | 859 | java | package net.minestom.server.instance.block.states;
import net.minestom.server.instance.block.Block;
import net.minestom.server.instance.block.BlockAlternative;
/**
* Completely internal. DO NOT USE. IF YOU ARE A USER AND FACE A PROBLEM WHILE USING THIS CODE, THAT'S ON YOU.
*/
@Deprecated(
since = "forever",
forRemoval = false
)
public final class CaveVinesPlant {
/**
* Completely internal. DO NOT USE. IF YOU ARE A USER AND FACE A PROBLEM WHILE USING THIS CODE, THAT'S ON YOU.
*/
@Deprecated(
since = "forever",
forRemoval = false
)
public static void initStates() {
Block.CAVE_VINES_PLANT.addBlockAlternative(new BlockAlternative((short) 18617, "berries=true"));
Block.CAVE_VINES_PLANT.addBlockAlternative(new BlockAlternative((short) 18618, "berries=false"));
}
}
| [
"themode@outlook.fr"
] | themode@outlook.fr |
52192fb0517a69f09f241dd5c53883170d3e2ba7 | 9233d0f3e118a9e2fdb91e8f81570a7ae28200bd | /src/main/java/com/thinkgem/jeesite/modules/partyManage/service/SPmMinutesService.java | 9e555b505778d5c3060ebc1756bc28ebd51129ab | [
"Apache-2.0"
] | permissive | heavendarren/dangqun | 1abd84e3e4e24c0749933eeb26fd43a1aa835dc5 | 4bac7855d99377b3934e19be0e2d5e2f69cefd51 | refs/heads/master | 2020-12-30T10:24:05.562670 | 2017-07-31T09:26:28 | 2017-07-31T09:26:28 | 98,871,830 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,225 | java | package com.thinkgem.jeesite.modules.partyManage.service;
import com.google.common.collect.Lists;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.partyManage.dao.SPmJionFilesDao;
import com.thinkgem.jeesite.modules.partyManage.dao.SPmMinutesDao;
import com.thinkgem.jeesite.modules.partyManage.entity.SPmJionFiles;
import com.thinkgem.jeesite.modules.partyManage.entity.SPmMinutes;
import com.thinkgem.jeesite.modules.sys.dao.UserDao;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 会议记录Service
*
* @author psy
* @version 2017-04-18
*/
@Service
@Transactional(readOnly = true)
public class SPmMinutesService extends CrudService<SPmMinutesDao, SPmMinutes> {
@Autowired
private UserDao userDao;
@Autowired
private DQRecordService DQRecordService;
@Autowired
private SPmJionFilesDao sPmJionFilesDao;
public SPmMinutes get(String id) {
return super.get(id);
}
public SPmMinutes getByproId(String proId) {
SPmMinutes sPmMinutes = dao.getByproId(proId);
if (sPmMinutes == null) {
return sPmMinutes;
}
List<SPmMinutes> list = Lists.newArrayList();
list.add(sPmMinutes);
List<SPmMinutes> list1 = convert(list);
return list1.get(0);
}
/**
* 通过编号获取用户名
*
* @return new Object[]{}
*/
public List<Object[]> findByIds(String ids) {
if (ids == null || ids == "") {
return new ArrayList<Object[]>();
}
List<Object[]> list = Lists.newArrayList();
String[] idss = StringUtils.split(ids, ",");
User user = null;
for (int i = 0; (idss.length - i) > 0; i++) {
user = UserUtils.get(idss[i]);
list.add(new Object[]{user.getProId(), user.getId(), user.getName()});
}
return list;
}
public SPmMinutes getByproIds(String proId) {
SPmMinutes sPmMinutes = dao.getByproId(proId);
if (sPmMinutes == null) {
return sPmMinutes;
} else {
if (sPmMinutes.getHost() != null) {
sPmMinutes.setHostName(UserUtils.get(sPmMinutes.getHost()).getName());
}
if (sPmMinutes.getNoteTaker() != null) {
sPmMinutes.setNoteTakerName(UserUtils.get(sPmMinutes.getNoteTaker()).getName());
}
return sPmMinutes;
}
}
public List<SPmMinutes> findList(SPmMinutes sPmMinutes) {
return super.findList(sPmMinutes);
}
public Page<SPmMinutes> findPage(Page<SPmMinutes> page,
SPmMinutes sPmMinutes) {
Page<SPmMinutes> tempPage = super.findPage(page, sPmMinutes);
tempPage.setList(convert(tempPage.getList()));
return tempPage;
}
public Page<SPmMinutes> findPage(Page<SPmMinutes> page,
SPmMinutes sPmMinutes, String proId) {
Page<SPmMinutes> tempPage = super.findPage(page, sPmMinutes);
tempPage.setList(convert(tempPage.getList()));
return tempPage;
}
public SPmMinutes getForms(SPmMinutes sPmMinutes) {
SPmJionFiles sPmJionFiles = sPmJionFilesDao.getByformId(sPmMinutes.getId());
User user = UserUtils.getUser();
if (sPmJionFiles == null) {
sPmMinutes.setUploader(user.getName());
sPmMinutes.setUploadTime(new Date());
} else {
sPmMinutes.setFileUrl(sPmJionFiles.getFileUrl());
sPmMinutes.setFileName(sPmJionFiles.getFileName());
sPmMinutes.setUploader(sPmJionFiles.getUploader());
sPmMinutes.setUploadTime(sPmJionFiles.getUploadTime());
}
return sPmMinutes;
}
/**
* 查找用户list
*
* @return
*/
public List<User> findUserList() {
return dao.findUserList();
}
//显示节点名称
private List<SPmMinutes> convert(List<SPmMinutes> dataList) {
// 查询全部用户
List<User> list = findUserList();
// 循环展示数据
for (SPmMinutes sPmMinutes2 : dataList) {
// 循环用户list
for (User o : list) {
// 每循环一次展示数据,就循环全部用户,直到查找对应数据
// 当数据id等于用户id就取用户名字放临时变量 用作展示
if (StringUtils.isNotBlank(sPmMinutes2.getHost())) {
if (sPmMinutes2.getHost().equals(o.getId())) {
sPmMinutes2.setHostName(o.getName());
}
}
if (StringUtils.isNotBlank(sPmMinutes2.getNoteTaker())) {
if (sPmMinutes2.getNoteTaker().equals(o.getId())) {
sPmMinutes2.setNoteTakerName(o.getName());
}
}
}
StringBuffer sb = new StringBuffer("");
// 参加人员
if (StringUtils.isNotBlank(sPmMinutes2.getAttenList())) {
// 声明数组 根据逗号劈开
String[] attenList = sPmMinutes2.getAttenList().split(",");
// 循环数组 当数据id等于用户id就取用户名字放StringBuffer 并追加
for (String atten : attenList) {
// 循环用户
for (User o : list) {
if (atten.equals(o.getId())) {
sb.append(o.getName() + ",");
}
}
}
// 截取转换过后拼接的参加人员并放置
sPmMinutes2.setAttenList(sb.substring(0, sb.length() - 1));
}
// 缺勤人员
if (StringUtils.isNotBlank(sPmMinutes2.getAbsList())) {
sb = new StringBuffer("");
// 声明数组 根据逗号劈开
String[] attenList = sPmMinutes2.getAbsList().split(",");
// 循环数组 当数据id等于用户id就取用户名字放StringBuffer 并追加
for (String atten : attenList) {
// 循环用户
for (User o : list) {
if (atten.equals(o.getId())) {
sb.append(o.getName() + ",");
}
}
}
// 截取转换过后拼接的参加人员并放置
sPmMinutes2.setAbsList(sb.substring(0, sb.length() - 1));
}
}
return dataList;
}
@Transactional(readOnly = false)
public String save(SPmMinutes sPmMinutes, String proId) {
SPmJionFiles sPmJionFiles = new SPmJionFiles();
sPmJionFiles.preInsert();
sPmJionFiles.setFileUrl(sPmMinutes.getFileUrl());
sPmJionFiles.setFileName(sPmMinutes.getFileName());
sPmJionFiles.setUploader(sPmMinutes.getUploader());
sPmJionFiles.setUploadTime(sPmMinutes.getUploadTime());
sPmJionFiles.setFormName("会议记录");
if (proId != null && proId != "") {
SPmMinutes sPmMinutes1 = dao.getByproId(proId);
if (sPmMinutes1 == null) {
sPmMinutes.setProId(proId);
super.save(sPmMinutes);
sPmJionFiles.setFormId(sPmMinutes.getId());
DQRecordService.fillIn(proId);
sPmJionFiles.setFormId(sPmMinutes.getId());
sPmJionFilesDao.insert(sPmJionFiles);
SPmJionFiles sPmJionFileses = sPmJionFilesDao.getByformId(sPmMinutes.getId());
if (sPmJionFileses != null) {
sPmJionFiles.setId(sPmJionFileses.getId());
sPmJionFiles.preUpdate();
sPmJionFilesDao.update(sPmJionFiles);
} else {
sPmJionFilesDao.insert(sPmJionFiles);
}
return "success";
} else {
sPmMinutes.setId(sPmMinutes1.getId());
sPmMinutes.setProId(sPmMinutes1.getProId());
super.save(sPmMinutes);
sPmJionFiles.setFormId(sPmMinutes.getId());
DQRecordService.fillIn(proId);
SPmJionFiles sPmJionFileses = sPmJionFilesDao.getByformId(sPmMinutes.getId());
if (sPmJionFileses != null) {
sPmJionFiles.setId(sPmJionFileses.getId());
sPmJionFiles.preUpdate();
sPmJionFilesDao.update(sPmJionFiles);
} else {
sPmJionFilesDao.insert(sPmJionFiles);
}
return "success";
}
}
return "error proId is not found";
}
@Transactional(readOnly = false)
public void delete(SPmMinutes sPmMinutes) {
super.delete(sPmMinutes);
}
} | [
"heavendarren@126.com"
] | heavendarren@126.com |
1cd89e68405bb3e4c7f3e2e47ebb712846062d89 | 3e519985adc42b000f3888b9ba00e59bfe6ccee9 | /mall_boss_site/src/test/java/com/junit/market/marketing/service/CodexServiceImpTest.java | fba6a511d093033d8349a785d35c0c14ded8fa9a | [] | no_license | zhenchai/mall | 8475077cf7a5fe5208510a3408502143667e9f17 | c6fa070691bd62c53dbaa0b467bcb389bc66a373 | refs/heads/master | 2020-04-13T10:10:49.514859 | 2018-11-18T10:45:42 | 2018-11-18T10:45:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,086 | java | /*
* Copyright 2013 NingPai, Inc. All rights reserved.
* NINGPAI PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.junit.market.marketing.service;
import com.alibaba.fastjson.JSON;
import com.ningpai.marketing.bean.Codex;
import com.ningpai.marketing.dao.CodexMapper;
import com.ningpai.marketing.service.CodexService;
import com.ningpai.marketing.service.impl.CodexServiceImpl;
import com.ningpai.util.MapUtil;
import com.ningpai.util.PageBean;
import org.junit.Test;
import org.unitils.UnitilsJUnit3;
import org.unitils.inject.annotation.InjectIntoByType;
import org.unitils.inject.annotation.TestedObject;
import org.unitils.io.annotation.FileContent;
import org.unitils.mock.Mock;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 规则service
*/
public class CodexServiceImpTest extends UnitilsJUnit3 {
/**
* 需要测试的Service
*/
@TestedObject
private CodexService codexService = new CodexServiceImpl();
/**
* 模拟Mock
*/
@InjectIntoByType
Mock<CodexMapper> codexMapperMock;
@FileContent("codexList.js")
private String codexListJs;
/**
* 共享数据
*/
List<Codex> codexList;
/**
* 初始化
*/
@Override
public void setUp(){
codexList= JSON.parseArray(codexListJs,Codex.class);
}
/**
* 查询规则列表
*/
@Test
public void testSelectCodexList(){
/** 定义一个分页对象 */
PageBean pb =new PageBean();
/** 定义一个codex对象 */
Codex codex = new Codex();
codex.setFlag("0");
/** 定义一个HashMap集合 */
Map<String, Object> paramMap = MapUtil.getParamsMap(codex);
/** 设置pageBean的行数 */
pb.setRows(codexMapperMock.returns(1).selectCodexListCount(paramMap));
/** 设置开始行数 */
paramMap.put("start", pb.getStartRowNum());
/** 设置结束行数 */
paramMap.put("number", pb.getEndRowNum());
/** 设置pageBean的集合数据 */
pb.setList(codexMapperMock.returns(codexList).selectCodexList(paramMap));
/** 返回结果 */
assertEquals(1, codexService.selectCodexList(codex,pb).getList().size());
}
/**
* 添加规则
*/
@Test
public void testAddCodex(){
/** 定义一个codex对象 */
Codex codex = new Codex();
/** 设置codeId */
codex.setCodexId(2L);
/** 设置codexName */
codex.setCodexName("qpmall");
/** 设置codexDes */
codex.setCodexDes("qpmallAdd");
/** 设置createTime */
codex.setCreateTime(new Date());
/** 设置modTime */
codex.setModTime(new Date());
/** 设置flag */
codex.setFlag("0");
/** 设置codexType */
codex.setCodexType("1");
/** 设置codexImg */
codex.setCodexImg("images/marketing/2.png");
/** 设置codexStatus */
codex.setCodexStatus(1L);
/** 模拟dao */
codexMapperMock.returns(1).addCodex(codex);
/** 返回结果 */
assertEquals(1,codexService.addCodex(codex));
}
/**
* 查询所有促销规则
*/
@Test
public void testSelectCodexListUseBox(){
/** 模拟dao */
codexMapperMock.returns(codexList).selectCodexListUseBox();
/** 返回结果 */
assertEquals(1,codexService.selectCodexListUseBox().size());
}
/**
* 查询规则明细
*/
@Test
public void testQueryCodexDetail(){
/** 模拟dao */
codexMapperMock.returns(codexList.get(0)).queryCodexDetail(1L);
/** 返回结果 */
assertNotNull(codexService.queryCodexDetail(1L));
}
/**
* 查询规则列表
*/
@Test
public void testQueryCodexListByParam(){
/** 模拟dao */
codexMapperMock.returns(codexList).queryCodexListByParam(1L);
/** 返回结果 */
assertEquals(1,codexService.queryCodexListByParam(1L).size());
}
}
| [
"wdpxl@sina.com"
] | wdpxl@sina.com |
aba72fd6bc95a73ebd897c0435db4e42f7e35bfe | ad22bf8b08395b6251558a803ff34d380b16a4c2 | /src/main/java/com/yundao/core/threadlocal/config/ThreadLocalConfigEnum.java | 7a214e7489bbaca62d26aea4b8de2c1dde0e0dc8 | [] | no_license | wucaiqiang/yundao-core | 111f2bae0c27b918eae88ef2bf7dba175241edc6 | ce64929a726064be6d326689800f21668f13d5a8 | refs/heads/master | 2021-08-30T13:57:52.639535 | 2017-12-18T07:37:09 | 2017-12-18T07:37:09 | 114,609,766 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 626 | java | package com.yundao.core.threadlocal.config;
/**
* 本地线程配置文件枚举类
*
* @author wupengfei wupf86@126.com
*
*/
public enum ThreadLocalConfigEnum {
/**
* 是否需要校验请求的时间,0:否 1:是
*/
IS_VALIDATE_REQUEST_TIME("is.validate.request.time"),
/**
* 请求的过期时间,单位秒
*/
REQUEST_TIME_EXPIRE("request.time.expire"),
/**
* 请求的加密类型,若多个以逗号分隔
*/
REQUEST_SIGN_TYPE("request.sign.type");
private String key;
private ThreadLocalConfigEnum(String key) {
this.key = key;
}
public String getKey() {
return key;
}
}
| [
"wucaiqiang@zcmall.com"
] | wucaiqiang@zcmall.com |
0b4d9cb13ea5285ffd263864a687cbc75aebeb07 | fcbcf7df970656e0bf0776e3bb56c9effd1c3ff5 | /apis/api-core/api-core-common/src/main/java/org/hoteia/qalingo/core/pojo/retailer/RetailerCustomerRatePojo.java | 810210b01bae20b46f23e1e78d4ee2cb515ba145 | [
"Apache-2.0"
] | permissive | cnshjack/qalingo-engine | 0b1596481521cca95400c38fdab8d1224e2d0e6a | 2ada471f1aff4e3880a775c5ae808f118806ceab | refs/heads/master | 2021-01-15T20:23:16.811138 | 2016-05-17T19:50:26 | 2016-05-17T19:50:26 | 59,075,320 | 1 | 0 | null | 2016-05-18T02:31:11 | 2016-05-18T02:31:11 | null | UTF-8 | Java | false | false | 1,450 | java | /**
* Most of the code in the Qalingo project is copyrighted Hoteia and licensed
* under the Apache License Version 2.0 (release version 0.8.0)
* http://www.apache.org/licenses/LICENSE-2.0
*
* Copyright (c) Hoteia, 2012-2014
* http://www.hoteia.com - http://twitter.com/hoteia - contact@hoteia.com
*
*/
package org.hoteia.qalingo.core.pojo.retailer;
public class RetailerCustomerRatePojo {
private Long id;
private Integer rate;
private String type;
private Long retailerId;
private Long customerId;
private boolean processed;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getRate() {
return rate;
}
public void setRate(Integer rate) {
this.rate = rate;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Long getRetailerId() {
return retailerId;
}
public void setRetailerId(Long retailerId) {
this.retailerId = retailerId;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public boolean isProcessed() {
return processed;
}
public void setProcessed(boolean processed) {
this.processed = processed;
}
}
| [
"denis@Hoteia-Laptop.home"
] | denis@Hoteia-Laptop.home |
0efdcc8ed5d216ef41d4e46f548154ed5ee737fa | 8dacfd21e8c0debf7cc7b7a207eb144f71a848b4 | /lint/src/com/android/tools/idea/lint/common/DefaultLintQuickFix.java | 328924e3223ed507c1bcf3d089b6953338608516 | [
"Apache-2.0"
] | permissive | Ret-Mode/android | 510efe5f5a892f997ed937cb54852dd747168b02 | 5b427d1fc6a66ff4db09a9e2f02ae61292ccd797 | refs/heads/master | 2023-03-23T16:27:19.490681 | 2021-03-11T17:25:44 | 2021-03-11T17:25:44 | 346,621,241 | 0 | 0 | Apache-2.0 | 2021-03-11T17:25:29 | 2021-03-11T07:53:20 | null | UTF-8 | Java | false | false | 1,899 | java | /*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tools.idea.lint.common;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class DefaultLintQuickFix implements LintIdeQuickFix {
protected final String myName;
protected final String myFamilyName;
public DefaultLintQuickFix(String name) {
this(name, null);
}
public DefaultLintQuickFix(String name, @Nullable String familyName) {
myName = name;
myFamilyName = familyName;
}
public DefaultLintQuickFix(String name, boolean useAsFamilyNameToo) { // to use as family name, the description must be general
myName = name;
myFamilyName = useAsFamilyNameToo ? myName : null;
}
@Override
public void apply(@NotNull PsiElement startElement, @NotNull PsiElement endElement, @NotNull AndroidQuickfixContexts.Context context) {
}
@Override
public boolean isApplicable(@NotNull PsiElement startElement,
@NotNull PsiElement endElement,
@NotNull AndroidQuickfixContexts.ContextType contextType) {
return true;
}
@NotNull
@Override
public String getName() {
return myName;
}
@Nullable
@Override
public String getFamilyName() {
return myFamilyName;
}
}
| [
"tnorbye@google.com"
] | tnorbye@google.com |
0a55457b745a3a70b86e17a5275369dad6cdf259 | cd26ac2a326410d9e6d50bb1b7c9129afe556ddf | /src/com/wyy/myhealth/db/utils/MsgDatabaseUtils.java | af7c7c90eef5d394e0dd36ba3cc172a6e74854a1 | [] | no_license | bingdon/Classe-Nutrizione-delle-applicazioni | 864003bb247ef5890cbaf6a72202d3d7f4b9a21b | 7c000c95babe78e23ed90544002484f9e5131be1 | refs/heads/master | 2021-01-20T08:48:52.384884 | 2014-07-22T10:58:17 | 2014-07-22T10:58:17 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 3,939 | java | package com.wyy.myhealth.db.utils;
import java.util.ArrayList;
import java.util.List;
import com.wyy.myhealth.bean.ListDataBead;
import com.wyy.myhealth.bean.MsgData;
import com.wyy.myhealth.db.WyyDatebase;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
public class MsgDatabaseUtils implements DatebaseInterface {
public MsgDatabaseUtils(Context context){
WyyDatebase.getMyDatabase(context);
}
@Override
public Object update(String json, int id) {
// TODO Auto-generated method stub
return null;
}
@Override
public long update(String json, int postion, int id) {
// TODO Auto-generated method stub
return 0;
}
@Override
public Object delete(long id) {
// TODO Auto-generated method stub
int del=-1;
try{
String where = MsgData._ID+" = ?";
String[] whereArgs = {String.valueOf(id)};
del=WyyDatebase.wyyDatabase.delete(MsgData.TABLE_NAME, where, whereArgs);
}catch (Exception e){
e.printStackTrace();
}
return del;
}
@Override
public long insert(String json, int postion) {
// TODO Auto-generated method stub
long id = -1;
try {
ContentValues values = new ContentValues();
values.put(MsgData.JSONDATA, json);
values.put(MsgData.TIME_STRING, ""+postion);
//调用方法插入数据
id = WyyDatebase.wyyDatabase.insert(MsgData.TABLE_NAME, null, values);
} catch (Exception e) {
e.printStackTrace();
}
return id;
}
@Override
public Object queryData() {
// TODO Auto-generated method stub
List<ListDataBead> list=new ArrayList<ListDataBead>();
Cursor cursor = null;
try {
//获得数据库对象,如过数据库不存在则创建
//查询表中数据,获取游标
cursor = WyyDatebase.wyyDatabase.query(MsgData.TABLE_NAME,null,null,null,null,null,"_ID desc");
//获取name列的索引
int idIndex = cursor.getColumnIndex(MsgData._ID);
//获取json列的索引
int jsonIndex = cursor.getColumnIndex(MsgData.JSONDATA);
int postionIndex=cursor.getColumnIndex(MsgData.TIME_STRING);
//遍历查询结果集,将数据提取出来
for(cursor.moveToFirst();!(cursor.isAfterLast());cursor.moveToNext()){
ListDataBead listDataBead=new ListDataBead();
listDataBead.setJsondata(cursor.getString(jsonIndex));
listDataBead.setTime(cursor.getString(postionIndex));
listDataBead.set_id(cursor.getInt(idIndex));
list.add(listDataBead);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
if(cursor!=null){
//关闭游标
cursor.close();
}
}
return list;
}
@Override
public Object queryDataId(long id) {
// TODO Auto-generated method stub
return null;
}
@Override
public Object deleteAll() {
// TODO Auto-generated method stub
long del=-1;
try {
del=WyyDatebase.wyyDatabase.delete(MsgData.TABLE_NAME, null, null);
} catch (Exception e) {
// TODO: handle exception
}
return del;
}
@Override
public void close() {
// TODO Auto-generated method stub
if(WyyDatebase.wyyDatabase!=null && WyyDatebase.wyyDatabase.isOpen()){
//关闭数据库对象
WyyDatebase.wyyDatabase.close();
WyyDatebase.wyyDatabase=null;
}
}
@Override
public long insert(String json, String time) {
// TODO Auto-generated method stub
long id = -1;
try {
ContentValues values = new ContentValues();
values.put(MsgData.JSONDATA, json);
values.put(MsgData.TIME_STRING, ""+time);
//调用方法插入数据
id = WyyDatebase.wyyDatabase.insert(MsgData.TABLE_NAME, null, values);
} catch (Exception e) {
e.printStackTrace();
}
return id;
}
}
| [
"1525218075@qq.com"
] | 1525218075@qq.com |
3b382b2f969a5502ca97b6f222b3013116a7deeb | 0721305fd9b1c643a7687b6382dccc56a82a2dad | /src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/com/google/android/gms/signin/internal/C10683b.java | f39784de8f619a0cebb252399f8353fc89b6f7d0 | [] | no_license | a2en/Zenly_re | 09c635ad886c8285f70a8292ae4f74167a4ad620 | f87af0c2dd0bc14fd772c69d5bc70cd8aa727516 | refs/heads/master | 2020-12-13T17:07:11.442473 | 2020-01-17T04:32:44 | 2020-01-17T04:32:44 | 234,470,083 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,256 | java | package com.google.android.gms.signin.internal;
import android.content.Intent;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
/* renamed from: com.google.android.gms.signin.internal.b */
public final class C10683b implements Creator<zab> {
public final /* synthetic */ Object createFromParcel(Parcel parcel) {
int b = SafeParcelReader.m25542b(parcel);
int i = 0;
Intent intent = null;
int i2 = 0;
while (parcel.dataPosition() < b) {
int a = SafeParcelReader.m25536a(parcel);
int a2 = SafeParcelReader.m25535a(a);
if (a2 == 1) {
i = SafeParcelReader.m25568y(parcel, a);
} else if (a2 == 2) {
i2 = SafeParcelReader.m25568y(parcel, a);
} else if (a2 != 3) {
SafeParcelReader.m25534D(parcel, a);
} else {
intent = (Intent) SafeParcelReader.m25537a(parcel, a, Intent.CREATOR);
}
}
SafeParcelReader.m25561r(parcel, b);
return new zab(i, i2, intent);
}
public final /* synthetic */ Object[] newArray(int i) {
return new zab[i];
}
}
| [
"developer@appzoc.com"
] | developer@appzoc.com |
c441b259753492d10ceb29b188f175343fcf80e3 | e124c06aa37b93502a84f8931e1e792539883b9d | /JDiveLog/jdivelog/src/net/sf/jdivelog/gui/LogbookChangeNotifier.java | 45a624b3af2feb8959c908997de0162fb2b0b64d | [] | no_license | m-shayanshafi/FactRepositoryProjects | 12d7b65505c1e0a8e0ec3577cf937a1e3d17c417 | 1d45d667b454064107d78213e8cd3ec795827b41 | refs/heads/master | 2020-06-13T12:04:53.891793 | 2016-12-02T11:30:49 | 2016-12-02T11:30:49 | 75,389,381 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,796 | java | /*
* Project: JDiveLog: A Dive Logbook written in Java
* File: LogbookChangeNotifier.java
*
* @author Pascal Pellmont <jdivelog@pellmont.dyndns.org>
*
* This file is part of JDiveLog.
* JDiveLog is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* JDiveLog 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 JDiveLog; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package net.sf.jdivelog.gui;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
public class LogbookChangeNotifier {
private Set<LogbookChangeListener> listeners;
private boolean changed;
public LogbookChangeNotifier() {
listeners = new HashSet<LogbookChangeListener>();
changed = false;
}
public synchronized void addLogbookChangeListener(LogbookChangeListener l) {
listeners.add(l);
}
public synchronized void removeLogbookChangeListener(LogbookChangeListener l) {
listeners.remove(l);
}
public synchronized void notifyLogbookLoaded() {
LogbookChangeEvent e = new LogbookChangeEvent(LogbookChangeEvent.EventType.LOGBOOK_LOADED);
notify(e);
}
public synchronized void notifyLogbookUnloaded() {
LogbookChangeEvent e = new LogbookChangeEvent(LogbookChangeEvent.EventType.LOGBOOK_UNLOADED);
notify(e);
}
public synchronized void notifyLogbookDataChanged() {
LogbookChangeEvent e = new LogbookChangeEvent(LogbookChangeEvent.EventType.LOGBOOK_DATA_CHANGED);
notify(e);
}
public synchronized void notifyLogbookTitleChanged() {
LogbookChangeEvent e = new LogbookChangeEvent(LogbookChangeEvent.EventType.LOGBOOK_TITLE_CHANGED);
notify(e);
}
private synchronized void notify(LogbookChangeEvent e) {
ArrayList<LogbookChangeListener> ls = new ArrayList<LogbookChangeListener>(listeners);
for (LogbookChangeListener l : ls) {
l.logbookChanged(e);
}
}
public boolean isChanged() {
return changed;
}
public void setChanged(boolean changed) {
boolean oldChanged = this.changed;
this.changed = changed;
if (changed != oldChanged) {
this.notifyLogbookTitleChanged();
}
}
}
| [
"mshayanshafi@gmail.com"
] | mshayanshafi@gmail.com |
a01f455968940fbf8ebdb2706b236d9d0047bc6c | 5eb61dc67145c1b1d5a908b803520ba9da83f82d | /Store/src/main/java/com/nys/store/store_article/domain/Article.java | b89d916f7e61dc45d9ec6a46401fbdcd2c88130c | [] | no_license | OnTheRightWay/workspace | 27549e5344a8d56575a5b5798bdabf9fe661872d | f6767929db06f66defdee50dcf87fb7441207e87 | refs/heads/master | 2021-09-09T15:06:33.482564 | 2018-03-17T06:07:57 | 2018-03-17T06:07:57 | 113,117,366 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,765 | java | package com.nys.store.store_article.domain;
import java.io.Serializable;
public class Article implements Serializable {
public static final int PAGE_SIZE=6;
private int goods_id;
private String goods_name;
private String goods_code;
private int goods_count;
private String file_id;
private String sponsor;
private String memo;
private int dekete_flag;
private int price;
private String discount;
private int type;
public Article() {
}
public int getGoods_id() {
return goods_id;
}
public void setGoods_id(int goods_id) {
this.goods_id = goods_id;
}
public String getGoods_name() {
return goods_name;
}
public void setGoods_name(String goods_name) {
this.goods_name = goods_name;
}
public String getGoods_code() {
return goods_code;
}
public void setGoods_code(String goods_code) {
this.goods_code = goods_code;
}
public int getGoods_count() {
return goods_count;
}
public void setGoods_count(int goods_count) {
this.goods_count = goods_count;
}
public String getFile_id() {
return file_id;
}
public void setFile_id(String file_id) {
this.file_id = file_id;
}
public String getSponsor() {
return sponsor;
}
public void setSponsor(String sponsor) {
this.sponsor = sponsor;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public int getDekete_flag() {
return dekete_flag;
}
public void setDekete_flag(int dekete_flag) {
this.dekete_flag = dekete_flag;
}
public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
public String getDiscount() {
return discount;
}
public void setDiscount(String discount) {
this.discount = discount;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
@Override
public String toString() {
return "Article{" +
"goods_id=" + goods_id +
", goods_name='" + goods_name + '\'' +
", goods_code='" + goods_code + '\'' +
", goods_count=" + goods_count +
", file_id='" + file_id + '\'' +
", sponsor='" + sponsor + '\'' +
", memo='" + memo + '\'' +
", dekete_flag=" + dekete_flag +
", price=" + price +
", discount='" + discount + '\'' +
", type='" + type + '\'' +
'}';
}
}
| [
"34029301+OnTheRightWay@users.noreply.github.com"
] | 34029301+OnTheRightWay@users.noreply.github.com |
6f7c4813789d0282034cb6fb6fbd3326e70c572e | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/14/14_138c282790a49926799a0885fb6219feb72fcbb0/TryCatch/14_138c282790a49926799a0885fb6219feb72fcbb0_TryCatch_s.java | c1417b14820ad44aea8fa6f827c9910925a0cc78 | [] | 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 | 369 | java | package com.dj.example;
public class TryCatch {
public static void main(String[] args) {
int d, a;
try {
d = 0;
a = 42 / d;
System.out.println("This should not be printed");
} catch (ArithmeticException e) {
System.out.println("This is in Exception:");
e.printStackTrace();
}
System.out.println("After the exception");
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
01e19edb9d3c44a7d240582f1404f166721f68d2 | a9a404bcfc36e3b5e475d715aec3cb3a54d493cd | /apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/compute/functions/ServerInZoneToNodeMetadata.java | bc0cf80e53be55c311fa02bcd69ff89a22ccf741 | [
"Apache-2.0"
] | permissive | mrttufekci/jclouds | e7a0648984e756993ed0d9fa3adf944da222dfa0 | 37e2cc7c1ba70960124b63fa0db010371dc673f4 | refs/heads/master | 2020-12-30T19:12:06.037417 | 2012-06-05T00:19:24 | 2012-06-05T00:19:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,783 | java | /**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds 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.jclouds.openstack.nova.v1_1.compute.functions;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.Iterables.filter;
import static com.google.common.collect.Iterables.find;
import static com.google.common.collect.Iterables.transform;
import static org.jclouds.compute.util.ComputeServiceUtils.addMetadataAndParseTagsFromCommaDelimitedValue;
import java.net.Inet4Address;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import javax.annotation.Resource;
import javax.inject.Inject;
import javax.inject.Named;
import org.jclouds.collect.Memoized;
import org.jclouds.compute.domain.ComputeMetadata;
import org.jclouds.compute.domain.Hardware;
import org.jclouds.compute.domain.Image;
import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.domain.NodeMetadataBuilder;
import org.jclouds.compute.domain.OperatingSystem;
import org.jclouds.compute.functions.GroupNamingConvention;
import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.domain.Location;
import org.jclouds.domain.LocationBuilder;
import org.jclouds.domain.LocationScope;
import org.jclouds.logging.Logger;
import org.jclouds.openstack.nova.v1_1.domain.Address;
import org.jclouds.openstack.nova.v1_1.domain.Server;
import org.jclouds.openstack.nova.v1_1.domain.Server.Status;
import org.jclouds.openstack.nova.v1_1.domain.zonescoped.ServerInZone;
import org.jclouds.openstack.nova.v1_1.domain.zonescoped.ZoneAndId;
import org.jclouds.util.InetAddresses2;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.base.Supplier;
import com.google.common.net.InetAddresses;
/**
* A function for transforming a nova-specific Server into a generic
* NodeMetadata object.
*
* @author Matt Stephenson, Adam Lowe, Adrian Cole
*/
public class ServerInZoneToNodeMetadata implements Function<ServerInZone, NodeMetadata> {
@Resource
@Named(ComputeServiceConstants.COMPUTE_LOGGER)
protected Logger logger = Logger.NULL;
protected Map<Status, org.jclouds.compute.domain.NodeMetadata.Status> toPortableNodeStatus;
protected final Supplier<Map<String, Location>> locationIndex;
protected final Supplier<Set<? extends Image>> images;
protected final Supplier<Set<? extends Hardware>> hardwares;
protected final GroupNamingConvention nodeNamingConvention;
@Inject
public ServerInZoneToNodeMetadata(Map<Server.Status, NodeMetadata.Status> toPortableNodeStatus,
Supplier<Map<String, Location>> locationIndex, @Memoized Supplier<Set<? extends Image>> images,
@Memoized Supplier<Set<? extends Hardware>> hardwares, GroupNamingConvention.Factory namingConvention) {
this.toPortableNodeStatus = checkNotNull(toPortableNodeStatus, "toPortableNodeStatus");
this.nodeNamingConvention = checkNotNull(namingConvention, "namingConvention").createWithoutPrefix();
this.locationIndex = checkNotNull(locationIndex, "locationIndex");
this.images = checkNotNull(images, "images");
this.hardwares = checkNotNull(hardwares, "hardwares");
}
@Override
public NodeMetadata apply(ServerInZone serverInZone) {
Location zone = locationIndex.get().get(serverInZone.getZone());
checkState(zone != null, "location %s not in locationIndex: %s", serverInZone.getZone(), locationIndex.get());
Server from = serverInZone.getServer();
NodeMetadataBuilder builder = new NodeMetadataBuilder();
builder.id(serverInZone.slashEncode());
builder.providerId(from.getId());
builder.name(from.getName());
builder.hostname(from.getName());
builder.location(from.getHostId() != null ? new LocationBuilder().scope(LocationScope.HOST).id(from.getHostId())
.description(from.getHostId()).parent(zone).build() : zone);
addMetadataAndParseTagsFromCommaDelimitedValue(builder, from.getMetadata());
builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName()));
builder.imageId(ZoneAndId.fromZoneAndId(serverInZone.getZone(), from.getImage().getId()).slashEncode());
builder.operatingSystem(findOperatingSystemForServerOrNull(serverInZone));
builder.hardware(findHardwareForServerOrNull(serverInZone));
builder.status(toPortableNodeStatus.get(from.getStatus()));
builder.publicAddresses(filter(
transform(filter(from.getAddresses().values(), Predicates.not(isPrivateAddress)),
AddressToStringTransformationFunction.INSTANCE), isInet4Address));
builder.privateAddresses(filter(
transform(filter(from.getAddresses().values(), isPrivateAddress), AddressToStringTransformationFunction.INSTANCE), isInet4Address));
return builder.build();
}
private static final Predicate<Address> isPrivateAddress = new Predicate<Address>() {
public boolean apply(Address in) {
return InetAddresses2.IsPrivateIPAddress.INSTANCE.apply(in.getAddr());
}
};
public static final Predicate<String> isInet4Address = new Predicate<String>() {
@Override
public boolean apply(String input) {
try {
// Note we can do this, as InetAddress is now on the white list
return (InetAddresses.forString(input) instanceof Inet4Address);
} catch (IllegalArgumentException e) {
// could be a hostname
return true;
}
}
};
private enum AddressToStringTransformationFunction implements Function<Address, String> {
INSTANCE;
@Override
public String apply(Address address) {
return address.getAddr();
}
}
protected Hardware findHardwareForServerOrNull(ServerInZone serverInZone) {
return findObjectOfTypeForServerOrNull(hardwares.get(), "hardware", serverInZone.getServer().getFlavor().getId(),
serverInZone);
}
protected OperatingSystem findOperatingSystemForServerOrNull(ServerInZone serverInZone) {
Image image = findObjectOfTypeForServerOrNull(images.get(), "image", serverInZone.getServer().getImage().getId(),
serverInZone);
return (image != null) ? image.getOperatingSystem() : null;
}
public <T extends ComputeMetadata> T findObjectOfTypeForServerOrNull(Set<? extends T> supply, String type,
final String objectId, final ZoneAndId serverInZone) {
try {
return find(supply, new Predicate<T>() {
@Override
public boolean apply(T input) {
return input.getId().equals(ZoneAndId.fromZoneAndId(serverInZone.getZone(), objectId).slashEncode());
}
});
} catch (NoSuchElementException e) {
logger.debug("could not find %s with id(%s) for server(%s)", type, objectId, serverInZone);
}
return null;
}
}
| [
"adrian@jclouds.org"
] | adrian@jclouds.org |
dcc69946b1a7248f9ebbd786f71de3eac0165ca6 | 9923e30eb99716bfc179ba2bb789dcddc28f45e6 | /openapi-generator/jaxrs-cxf-client/src/gen/java/org/openapitools/model/InlineObject10.java | d6de9c1c1b47653f4c4934be1b93284b8bd04284 | [] | no_license | silverspace/samsara-sdks | cefcd61458ed3c3753ac5e6bf767229dd8df9485 | c054b91e488ab4266f3b3874e9b8e1c9e2d4d5fa | refs/heads/master | 2020-04-25T13:16:59.137551 | 2019-03-01T05:49:05 | 2019-03-01T05:49:05 | 172,804,041 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,495 | java | package org.openapitools.model;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class InlineObject10 {
@ApiModelProperty(example = "101", required = true, value = "Group ID to query.")
/**
* Group ID to query.
**/
private Long groupId;
/**
* Group ID to query.
* @return groupId
**/
@JsonProperty("groupId")
public Long getGroupId() {
return groupId;
}
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
public InlineObject10 groupId(Long groupId) {
this.groupId = groupId;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject10 {\n");
sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"greg@samsara.com"
] | greg@samsara.com |
9c4a038901e2aee90bf8970350c7e84bb0a049d4 | 8eb059ab34cb24751e9d9a04d49c4cd5d53d20ce | /core/src/test/java/org/jboss/ejb3/core/test/ejbthree1358/MockBeanContext.java | 6dfbfd1d55abd43b7042c52398c31f1d43d7fc6f | [] | no_license | wolfc/jboss-ejb3.obsolete | 0109c9f12100e0983333cb11803d18b073b0dbb5 | 4df1234e2f81312b3ff608f9965f9a6ad4191c92 | refs/heads/master | 2020-04-07T03:03:19.723537 | 2009-12-02T11:37:57 | 2009-12-02T11:37:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,700 | java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2009, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This 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 software 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 software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.ejb3.core.test.ejbthree1358;
import javax.ejb.EJBContext;
import org.jboss.ejb3.BaseContext;
/**
* @author <a href="mailto:cdewolf@redhat.com">Carlo de Wolf</a>
* @version $Revision: $
*/
public class MockBeanContext extends BaseContext<MockContainer>
{
protected MockBeanContext(MockContainer container)
{
super(container);
}
public EJBContext getEJBContext()
{
// TODO Auto-generated method stub
throw new RuntimeException("NYI");
}
@Override
public void initialiseInterceptorInstances()
{
// do nothing, because we don't have interceptors
}
public void remove()
{
}
}
| [
"cdewolf@redhat.com"
] | cdewolf@redhat.com |
c950ff774b1800c69a24a8dbe6efa8508c62d233 | 414ebc48c256fccbefd35a3705be64879f4bd62c | /src/main/java/cn/mauth/account/aspect/BaseLog.java | dea8d0608c37915d87c30efbb96ee64cbdc91ac7 | [] | no_license | hzw123/account | 46837f5125b3e470c26360867f5caf21ce996083 | 82126dde8e8e9f79364b92528958fe1274a5f889 | refs/heads/master | 2020-04-16T09:32:27.579322 | 2019-02-12T08:33:49 | 2019-02-12T08:33:49 | 165,467,854 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,928 | java | package cn.mauth.account.aspect;
import cn.mauth.account.common.util.HttpUtils;
import com.alibaba.fastjson.JSON;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
@Aspect
public abstract class BaseLog {
private ThreadLocal<Long> threadLocal=new ThreadLocal<>();
protected static final Logger logger= LoggerFactory.getLogger(BaseLog.class);
@Pointcut
public abstract void pointcutMethod();
@Before("pointcutMethod()")
public void before(JoinPoint joinPoint){
threadLocal.set(System.currentTimeMillis());
}
@After("pointcutMethod()")
public void after(JoinPoint joinPoint){
String info=this.addAfter();
this.log(joinPoint,info);
}
protected void log(JoinPoint joinPoint,String info){
HttpServletRequest request= HttpUtils.getRequest();
String uri=request.getRequestURI();
String type=request.getMethod();
String method=joinPoint.getSignature().getName();
String className=joinPoint.getSignature().getDeclaringTypeName();
String param= Arrays.toString(joinPoint.getArgs());
long time=System.currentTimeMillis()-threadLocal.get();
logger.info("\n{}\n{\n\turi:{},\n\ttype:{},\n\tclassName:{}," +
"\n\tmethod:{},\n\tparam:{},\n\ttimeLong:{}\n}",
info,uri,type,className,method, param,time);
}
protected abstract String addAfter();
protected String info(String info){
StringBuffer sb=new StringBuffer();
sb.append("---------------");
sb.append(info);
sb.append("---------------");
return sb.toString();
}
}
| [
"1127835288@qq.com"
] | 1127835288@qq.com |
bd5c67526244134ce9e1620b0c9500ae966b0823 | c4623aa95fb8cdd0ee1bc68962711c33af44604e | /src/com/yelp/android/h/g.java | e735f31bf1170aa2d861f2d311a94a226081c546 | [] | no_license | reverseengineeringer/com.yelp.android | 48f7f2c830a3a1714112649a6a0a3110f7bdc2b1 | b0ac8d4f6cd5fc5543f0d8de399b6d7b3a2184c8 | refs/heads/master | 2021-01-19T02:07:25.997811 | 2016-07-19T16:37:24 | 2016-07-19T16:37:24 | 38,555,675 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 379 | java | package com.yelp.android.h;
import android.view.View;
import android.view.accessibility.AccessibilityNodeInfo;
class g
{
public static void a(Object paramObject, View paramView)
{
((AccessibilityNodeInfo)paramObject).setLabelFor(paramView);
}
}
/* Location:
* Qualified Name: com.yelp.android.h.g
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
db5cf21abbf398525a0db4589b1969b2fe8a3ec3 | 6a6a5415da867fc35c82329713bbb4efcd955aad | /src/main/java/org/codinjutsu/tools/mongo/view/editor/MongoValueCellEditor.java | ad91e58e17109f7d6c4b25f5f5b082d08d52c9b3 | [
"Apache-2.0"
] | permissive | rlurie/mongo4idea | ef38006c4a512c73e81cecfccc451d4411b064f9 | 050ee3199d24322024480d1707c93c4681fbc17c | refs/heads/master | 2021-01-15T13:07:21.405429 | 2013-11-22T12:29:00 | 2013-11-22T12:29:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,021 | java | package org.codinjutsu.tools.mongo.view.editor;
import com.intellij.ui.treeStructure.treetable.TreeTable;
import com.intellij.util.ui.AbstractTableCellEditor;
import org.codinjutsu.tools.mongo.view.model.JsonTreeNode;
import org.jdesktop.swingx.JXTextField;
import javax.swing.*;
import java.awt.*;
public class MongoValueCellEditor extends DefaultCellEditor {
public MongoValueCellEditor() {
super(new JTextField());
}
@Override
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
JTextField stringEditor = (JTextField) getComponent();
final JsonTreeNode jsonNode = (JsonTreeNode)((TreeTable)table).getTree().
getPathForRow(row).getLastPathComponent();
stringEditor.setText(String.valueOf(jsonNode.getDescriptor().getValue()));
return stringEditor;
}
@Override
public Object getCellEditorValue() {
return ((JTextField) getComponent()).getText();
}
}
| [
"david.boissier@gmail.com"
] | david.boissier@gmail.com |
3a65911f413dcbc8a050cc29b84a449963b5b940 | a6c43718e039df0ba1c2d7c19ae7052575a241fd | /base/src/main/java/com/learn/base/java/concurrent/util/MyArrayBlockingQueue.java | 8e8186f5265a8f87626526c2cf623ca69dd8928c | [] | no_license | hnustlizeming/learn | 0fc8bfa5dd8ed257fe0843c51cfb92bde20d24c5 | b2fa92b1239318218370ce46f783af0972544e60 | refs/heads/master | 2022-12-31T22:08:36.416006 | 2020-08-15T03:31:07 | 2020-08-15T03:31:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,615 | java | package com.learn.base.java.concurrent.util;
import java.util.Collection;
import java.util.Iterator;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* @program: learn
* @description: 自制阻塞队列 循环队列模式
* @author: Elliot
* @create: 2019-08-17 01:02
**/
public class MyArrayBlockingQueue<E> implements BlockingQueue<E> {
private final Lock lock = new ReentrantLock();
private final Condition empty = lock.newCondition();
private final Condition full = lock.newCondition();
private final int len;
/**
* 数据
*/
private final Object[] data;
/**
* size
*/
private int size;
/**
* 数据区域尾结点
*/
private int rear;
/**
* 数据区域头结点
*/
private int front;
public MyArrayBlockingQueue(int cap) {
data = new Object[cap];
len = cap;
}
/******************** implements of BlockingQueue *********************/
@Override
public boolean add(E e) {
if (isFull()){
try {
full.await();
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
data[++rear % len] = e;
size++;
return false;
}
private boolean isFull() {
return len == size;
}
@Override
public boolean offer(E e) {
return false;
}
@Override
public void put(E e) throws InterruptedException {
}
@Override
public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException {
return false;
}
@Override
public E take() throws InterruptedException {
return null;
}
@Override
public E poll(long timeout, TimeUnit unit) throws InterruptedException {
return null;
}
@Override
public int remainingCapacity() {
return 0;
}
@Override
public boolean remove(Object o) {
return false;
}
@Override
public boolean contains(Object o) {
return false;
}
@Override
public int drainTo(Collection<? super E> c) {
return 0;
}
@Override
public int drainTo(Collection<? super E> c, int maxElements) {
return 0;
}
/**************** implements of Queue ****************/
@Override
public E remove() {
return null;
}
@Override
public E poll() {
return null;
}
@Override
public E element() {
return null;
}
@Override
public E peek() {
return null;
}
/************* implements of Collections ************/
@Override
public int size() {
return 0;
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public Iterator<E> iterator() {
return null;
}
@Override
public Object[] toArray() {
return new Object[0];
}
@Override
public <T> T[] toArray(T[] a) {
return null;
}
@Override
public boolean containsAll(Collection<?> c) {
return false;
}
@Override
public boolean addAll(Collection<? extends E> c) {
return false;
}
@Override
public boolean removeAll(Collection<?> c) {
return false;
}
@Override
public boolean retainAll(Collection<?> c) {
return false;
}
@Override
public void clear() {
}
}
| [
"2039176261@qq.com"
] | 2039176261@qq.com |
f5aebb4ba44d702ea2ca3af0d3accdbed4bdb4d5 | 31b177dbd7f9cfee9aed2bfcaf8c0af3f03e38ff | /support/cas-server-support-reports/src/main/java/org/apereo/cas/config/CasReportsConfiguration.java | a0c0e6b607fb510899d4088a5cd705861cf15f27 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | catherinesnow/cas | 1bbafc22ede3f87bb008297bd1e21be6b9dd16ac | 7aab261b9bcd0182991f794a7adba2b2f48f92db | refs/heads/master | 2020-03-29T10:04:25.526556 | 2018-09-21T11:04:04 | 2018-09-21T11:04:04 | 149,788,323 | 0 | 0 | Apache-2.0 | 2018-09-21T16:16:32 | 2018-09-21T16:16:31 | null | UTF-8 | Java | false | false | 7,714 | java | package org.apereo.cas.config;
import org.apereo.cas.CentralAuthenticationService;
import org.apereo.cas.audit.AuditTrailExecutionPlan;
import org.apereo.cas.authentication.AuthenticationSystemSupport;
import org.apereo.cas.authentication.principal.PrincipalFactory;
import org.apereo.cas.authentication.principal.PrincipalResolver;
import org.apereo.cas.authentication.principal.ServiceFactory;
import org.apereo.cas.authentication.principal.WebApplicationService;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.services.ServicesManager;
import org.apereo.cas.ticket.registry.TicketRegistrySupport;
import org.apereo.cas.web.report.AuditLogEndpoint;
import org.apereo.cas.web.report.CasInfoEndpointContributor;
import org.apereo.cas.web.report.CasReleaseAttributesReportEndpoint;
import org.apereo.cas.web.report.CasResolveAttributesReportEndpoint;
import org.apereo.cas.web.report.ExportRegisteredServicesEndpoint;
import org.apereo.cas.web.report.LoggingConfigurationEndpoint;
import org.apereo.cas.web.report.RegisteredServicesEndpoint;
import org.apereo.cas.web.report.SingleSignOnSessionStatusEndpoint;
import org.apereo.cas.web.report.SingleSignOnSessionsEndpoint;
import org.apereo.cas.web.report.SpringWebflowEndpoint;
import org.apereo.cas.web.report.StatisticsEndpoint;
import org.apereo.cas.web.report.StatusEndpoint;
import org.apereo.cas.web.support.CookieRetrievingCookieGenerator;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint;
import org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.core.env.Environment;
import org.springframework.core.io.ResourceLoader;
/**
* This this {@link CasReportsConfiguration}.
*
* @author Misagh Moayyed
* @author Dmitriy Kopylenko
* @since 5.3.0
*/
@Configuration("casReportsConfiguration")
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class CasReportsConfiguration {
@Autowired
private ResourceLoader resourceLoader;
@Autowired
private Environment environment;
@Autowired
@Qualifier("defaultTicketRegistrySupport")
private ObjectProvider<TicketRegistrySupport> ticketRegistrySupport;
@Autowired
@Qualifier("ticketGrantingTicketCookieGenerator")
private ObjectProvider<CookieRetrievingCookieGenerator> ticketGrantingTicketCookieGenerator;
@Autowired
@Qualifier("auditTrailExecutionPlan")
private ObjectProvider<AuditTrailExecutionPlan> auditTrailExecutionPlan;
@Autowired
private ApplicationContext applicationContext;
@Autowired
@Qualifier("defaultAuthenticationSystemSupport")
private ObjectProvider<AuthenticationSystemSupport> authenticationSystemSupport;
@Autowired
@Qualifier("webApplicationServiceFactory")
private ObjectProvider<ServiceFactory<WebApplicationService>> webApplicationServiceFactory;
@Autowired
@Qualifier("personDirectoryPrincipalResolver")
private ObjectProvider<PrincipalResolver> personDirectoryPrincipalResolver;
@Autowired
@Qualifier("centralAuthenticationService")
private ObjectProvider<CentralAuthenticationService> centralAuthenticationService;
@Autowired
private CasConfigurationProperties casProperties;
@Autowired
@Qualifier("servicesManager")
private ObjectProvider<ServicesManager> servicesManager;
@Autowired
@Qualifier("principalFactory")
private ObjectProvider<PrincipalFactory> principalFactory;
@Bean
@ConditionalOnEnabledEndpoint
public SpringWebflowEndpoint springWebflowEndpoint() {
return new SpringWebflowEndpoint(casProperties, applicationContext);
}
@Bean
@ConditionalOnEnabledEndpoint
public AuditLogEndpoint auditLogEndpoint() {
return new AuditLogEndpoint(auditTrailExecutionPlan.getIfAvailable(), casProperties);
}
@Bean
@ConditionalOnEnabledEndpoint
public LoggingConfigurationEndpoint loggingConfigurationEndpoint() {
return new LoggingConfigurationEndpoint(casProperties, resourceLoader, environment);
}
@Bean
@ConditionalOnEnabledEndpoint
public RegisteredServicesEndpoint registeredServicesReportEndpoint() {
return new RegisteredServicesEndpoint(casProperties, servicesManager.getIfAvailable());
}
@Bean
@ConditionalOnEnabledEndpoint
public ExportRegisteredServicesEndpoint exportRegisteredServicesEndpoint() {
return new ExportRegisteredServicesEndpoint(casProperties, servicesManager.getIfAvailable());
}
@Bean
public CasInfoEndpointContributor casInfoEndpointContributor() {
return new CasInfoEndpointContributor();
}
@Bean
@ConditionalOnEnabledEndpoint
public SingleSignOnSessionsEndpoint singleSignOnSessionsEndpoint() {
return new SingleSignOnSessionsEndpoint(centralAuthenticationService.getIfAvailable(), casProperties);
}
@Bean
@ConditionalOnEnabledEndpoint
public SingleSignOnSessionStatusEndpoint singleSignOnSessionStatusEndpoint() {
return new SingleSignOnSessionStatusEndpoint(ticketGrantingTicketCookieGenerator.getIfAvailable(), ticketRegistrySupport.getIfAvailable());
}
@Bean
@ConditionalOnEnabledEndpoint
public StatisticsEndpoint statisticsReportEndpoint() {
return new StatisticsEndpoint(centralAuthenticationService.getIfAvailable(), casProperties);
}
@Bean
@ConditionalOnEnabledEndpoint
public CasResolveAttributesReportEndpoint resolveAttributesReportEndpoint() {
return new CasResolveAttributesReportEndpoint(casProperties, personDirectoryPrincipalResolver.getIfAvailable());
}
@Bean
@ConditionalOnEnabledEndpoint
public CasReleaseAttributesReportEndpoint releaseAttributesReportEndpoint() {
return new CasReleaseAttributesReportEndpoint(casProperties,
servicesManager.getIfAvailable(),
authenticationSystemSupport.getIfAvailable(),
webApplicationServiceFactory.getIfAvailable(),
principalFactory.getIfAvailable());
}
/**
* This this {@link ConditionalDataSourceHealthIndicatorConfiguration}.
*
* @author Misagh Moayyed
* @since 6.0.0
*/
@ConditionalOnBean(name = "dataSource")
@Configuration("conditionalDataSourceHealthIndicatorConfiguration")
@Import(DataSourceHealthIndicatorAutoConfiguration.class)
public static class ConditionalDataSourceHealthIndicatorConfiguration {
}
/**
* This this {@link StatusEndpointConfiguration}.
*
* @author Misagh Moayyed
* @since 6.0.0
*/
@Configuration("statusEndpointConfiguration")
public static class StatusEndpointConfiguration {
@Autowired
private CasConfigurationProperties casProperties;
@Autowired
@Bean
@ConditionalOnEnabledEndpoint
public StatusEndpoint statusEndpoint(final HealthEndpoint healthEndpoint) {
return new StatusEndpoint(casProperties, healthEndpoint);
}
}
}
| [
"mmoayyed@unicon.net"
] | mmoayyed@unicon.net |
a7054c7b6d857b0b965a48ac5343e73e5b28800d | 5ede9e2a71c281998072a21f2d0dbc5fe9e4e858 | /server/src/main/java/com/blocklang/release/service/ProjectReleaseTaskService.java | 2d6c6370e0bd273207a03cafe33ccd595b07120d | [] | no_license | wepoiuopijsdfnxcvl/blocklang.com | 507be94fe569fd9fee0db0c122a8d454ee243cc9 | 94b102e82d10c43e42fbd5296868ce39e5534928 | refs/heads/master | 2020-05-15T23:23:28.523619 | 2019-04-21T02:50:03 | 2019-04-21T02:50:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 641 | java | package com.blocklang.release.service;
import java.nio.file.Path;
import java.util.List;
import java.util.Optional;
import com.blocklang.release.model.ProjectReleaseTask;
public interface ProjectReleaseTaskService {
ProjectReleaseTask save(ProjectReleaseTask projectReleaseTask);
List<ProjectReleaseTask> findAllByProjectId(Integer projectId);
Long count(Integer projectId);
Optional<ProjectReleaseTask> findByProjectIdAndVersion(Integer projectId, String version);
/**
* 获取日志文件的内容。
*
* @param logFilePath
* @return
*/
List<String> getLogContent(Path logFilePath);
}
| [
"idocument@qq.com"
] | idocument@qq.com |
994a8a68c052f6c42f1dd5947ba6715e9270f521 | 51fa3cc281eee60058563920c3c9059e8a142e66 | /Java/src/testcases/CWE400_Resource_Exhaustion/s02/CWE400_Resource_Exhaustion__max_value_for_loop_53c.java | d827ab6d66cacd3ab6b6051f567d6955a18a8da6 | [] | no_license | CU-0xff/CWE-Juliet-TestSuite-Java | 0b4846d6b283d91214fed2ab96dd78e0b68c945c | f616822e8cb65e4e5a321529aa28b79451702d30 | refs/heads/master | 2020-09-14T10:41:33.545462 | 2019-11-21T07:34:54 | 2019-11-21T07:34:54 | 223,105,798 | 1 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,480 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE400_Resource_Exhaustion__max_value_for_loop_53c.java
Label Definition File: CWE400_Resource_Exhaustion.label.xml
Template File: sources-sinks-53c.tmpl.java
*/
/*
* @description
* CWE: 400 Resource Exhaustion
* BadSource: max_value Set count to a hardcoded value of Integer.MAX_VALUE
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: for_loop
* GoodSink: Validate count before using it as the loop variant in a for loop
* BadSink : Use count as the loop variant in a for loop
* Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package
*
* */
package testcases.CWE400_Resource_Exhaustion.s02;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE400_Resource_Exhaustion__max_value_for_loop_53c
{
public void badSink(int count ) throws Throwable
{
(new CWE400_Resource_Exhaustion__max_value_for_loop_53d()).badSink(count );
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(int count ) throws Throwable
{
(new CWE400_Resource_Exhaustion__max_value_for_loop_53d()).goodG2BSink(count );
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(int count ) throws Throwable
{
(new CWE400_Resource_Exhaustion__max_value_for_loop_53d()).goodB2GSink(count );
}
}
| [
"frank@fischer.com.mt"
] | frank@fischer.com.mt |
a36d56b3ce2b8b8407c6b8b92edbe150289e07fd | 46d16ea3500e9d0aca1cecdd56c936b1277d72bf | /src/com/edu/kygroup/task/AbstractTaskPostCallBack.java | a61bc1dac18819d99bc2cf5f76759dbfe75c7917 | [] | no_license | tank2014gz/kaoyanqun | d5c3be6b6a8a023655df422ed50b3fa2ed719893 | 80c7c91f8e6efa7dd17de6b770bf7f35ee16c691 | refs/heads/master | 2021-01-15T10:13:46.865118 | 2015-04-06T04:49:42 | 2015-04-06T04:49:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 158 | java | package com.edu.kygroup.task;
public class AbstractTaskPostCallBack<K> implements TaskPostCallBack<K> {
@Override
public void taskFinish(K result) {
}
}
| [
"774663576@qq.com"
] | 774663576@qq.com |
df556e396dcc789d772a7775a663c64dc8676503 | 680af372bb28a9260874f84186c1ba89906df291 | /points-app/src/main/java/com/tianbao/points/app/controller/migration/RankMigrationController.java | d0517262cd6609633a625601f224c3e1cc72b433 | [] | no_license | BlueJack1984/points | 227a87104e8c72b73f534bcd1062aa4d9e84f7f0 | def6343243f90f52ee6d78a8dba736bf2d178d78 | refs/heads/master | 2022-02-21T01:34:32.684941 | 2020-02-12T02:46:02 | 2020-02-12T02:46:02 | 158,225,099 | 0 | 0 | null | 2022-02-09T22:11:00 | 2018-11-19T13:11:20 | Java | UTF-8 | Java | false | false | 3,124 | java | package com.tianbao.points.app.controller.migration;
import com.tianbao.points.app.controller.migration.input.PersonalBonusMigrationInput;
import com.tianbao.points.app.controller.migration.input.RankMigrationInput;
import com.tianbao.points.core.constant.StatusCode;
import com.tianbao.points.core.dto.response.OutputResult;
import com.tianbao.points.core.entity.PersonalBonus;
import com.tianbao.points.core.entity.Rank;
import com.tianbao.points.core.entity.User;
import com.tianbao.points.core.exception.ApplicationException;
import com.tianbao.points.core.service.IRankService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.Date;
/**
* @desc 数据迁移的会员等级入口
* @author lushusheng
* @date 2019-01-28
*/
@Api(value = "rank", description = "会员等级")
@RestController
@RequiredArgsConstructor
@RequestMapping("/migration/rank")
@Slf4j
public class RankMigrationController {
private final IRankService rankService;
/**
* @desc 新建保存一条会员等级信息
* @author lushusheng 2019-1-28
* @param currentId 当前用户id
* @param rankMigrationInput 实体参数
* @return 返回数据
* @throws ApplicationException 保存异常
*/
@ApiOperation(value = "新建保存一条会员等级信息", notes = "新建保存一条会员等级信息")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", dataType = "Long", name = "currentId", value = "当前用户id", required = true),
@ApiImplicitParam(paramType = "body", dataType = "RankMigrationInput", name = "rankMigrationInput", value = "实体参数", required = true)})
@CrossOrigin
@PostMapping("/save")
//@RequiresPermissions({"app:user:save"})
//@RequiresAuthentication
public OutputResult<Rank> save(
@RequestHeader(value = "_current_id", required = false, defaultValue = "110") Long currentId,
@RequestBody @Valid RankMigrationInput rankMigrationInput)throws ApplicationException {
Rank rank = new Rank();
copyProperties(rank, rankMigrationInput);
rank.setStatus(StatusCode.NORMAL.getCode());
rank.setCreateTime(new Date());
rank.setCreateUserId(currentId);
rank.setUpdateTime(new Date());
rank.setUpdateUserId(currentId);
rankService.save(rank);
return new OutputResult<>(rank);
}
private void copyProperties(Rank target, RankMigrationInput source) {
target.setId(source.getId());
target.setName(source.getName());
target.setAlias(source.getAlias());
target.setBasePoints(source.getBasePoints());
target.setBaseMoney(source.getBaseMoney());
target.setColor(source.getColor());
target.setMaxBonus(source.getMaxBonus());
target.setOrder(source.getOrder());
}
}
| [
"lushushen8@163.com"
] | lushushen8@163.com |
c61c7a91a11a18662e4e6838abc013c3fe74f1ca | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /single-large-project/src/test/java/org/gradle/test/performancenull_141/Testnull_14038.java | 7da5c220fcfc96f7b15eef2d41cf216badfe0198 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 308 | java | package org.gradle.test.performancenull_141;
import static org.junit.Assert.*;
public class Testnull_14038 {
private final Productionnull_14038 production = new Productionnull_14038("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
e69d11d644e3c3266f568f54a8fde49373738c21 | 4777a0c394979a3786fb1d255ec4d815b2a1d2f3 | /retail-stock/src/main/java/com/morning/star/retail/stock/service/SupplierStockService.java | e77bae1717f861445eb806bf4bc8914984b665ee | [] | no_license | chaoren007/big-middle | 0d98ea0ce7b2c892eb249dbbd116b4e0767686c5 | 29952ea01f0af89847286fa7d910640b1c83e3db | refs/heads/master | 2022-12-15T13:29:44.555680 | 2019-07-29T08:47:03 | 2019-07-29T08:47:03 | 199,414,109 | 0 | 3 | null | 2022-12-10T03:18:29 | 2019-07-29T08:45:13 | Java | UTF-8 | Java | false | false | 1,706 | java | package com.morning.star.retail.stock.service;
import java.util.List;
import com.morning.star.retail.stock.bean.SupplierStockDO;
import com.morning.star.retail.stock.dto.SupplierStockQueryDTO;
import com.morning.star.retail.stock.po.SupplierStockPO;
/**
* 供应商库存
*
* @author jiangyf
* @date 2017/11/16
*/
public interface SupplierStockService {
/**
* 盘点是否存在
*
* @param queryDTO
* @return
*/
boolean isExist(SupplierStockQueryDTO queryDTO);
/**
* 检查是否存在,不存在,抛异常
*
* @param queryDTO
* @return
*/
boolean checkExist(SupplierStockQueryDTO queryDTO);
/**
* 检查是否不存在,存在,抛异常
*
* @param queryDTO
* @return
*/
boolean checkNotExist(SupplierStockQueryDTO queryDTO);
/**
* 新增供应商库存
*
* @param supplierStockDO
* @return
*/
int add(SupplierStockDO supplierStockDO);
/**
* 增量修改供应商库存
*
* @param supplierStockDO
* @return
*/
int modifyByInc(SupplierStockDO supplierStockDO);
/**
* 增量修改供应商库存(不存在,则新增)
*
* @param supplierStockDO
* @return
*/
int checkModifyByInc(SupplierStockDO supplierStockDO);
/**
* 查询供应商库存
*
* @param queryDTO
* @return
*/
List<SupplierStockPO> query(SupplierStockQueryDTO queryDTO);
/**
* 查询指定公司,门店,货品,供应商和销售类型的供应商库存
*
* @param queryDTO
* @return
*/
SupplierStockPO queryOne(SupplierStockQueryDTO queryDTO);
}
| [
"liquorsea@163.com"
] | liquorsea@163.com |
0983cebd29ac2d73cee020f39667783f143a3458 | 9254e7279570ac8ef687c416a79bb472146e9b35 | /smartag-20180313/src/main/java/com/aliyun/smartag20180313/models/DescribeSagCurrentDnsRequest.java | f7f17bd08caba3dc2df8410be0e2f488532c472e | [
"Apache-2.0"
] | permissive | lquterqtd/alibabacloud-java-sdk | 3eaa17276dd28004dae6f87e763e13eb90c30032 | 3e5dca8c36398469e10cdaaa34c314ae0bb640b4 | refs/heads/master | 2023-08-12T13:56:26.379027 | 2021-10-19T07:22:15 | 2021-10-19T07:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,412 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.smartag20180313.models;
import com.aliyun.tea.*;
public class DescribeSagCurrentDnsRequest extends TeaModel {
@NameInMap("OwnerAccount")
public String ownerAccount;
@NameInMap("OwnerId")
public Long ownerId;
@NameInMap("ResourceOwnerAccount")
public String resourceOwnerAccount;
@NameInMap("ResourceOwnerId")
public Long resourceOwnerId;
@NameInMap("RegionId")
public String regionId;
@NameInMap("SmartAGId")
public String smartAGId;
@NameInMap("SmartAGSn")
public String smartAGSn;
public static DescribeSagCurrentDnsRequest build(java.util.Map<String, ?> map) throws Exception {
DescribeSagCurrentDnsRequest self = new DescribeSagCurrentDnsRequest();
return TeaModel.build(map, self);
}
public DescribeSagCurrentDnsRequest setOwnerAccount(String ownerAccount) {
this.ownerAccount = ownerAccount;
return this;
}
public String getOwnerAccount() {
return this.ownerAccount;
}
public DescribeSagCurrentDnsRequest setOwnerId(Long ownerId) {
this.ownerId = ownerId;
return this;
}
public Long getOwnerId() {
return this.ownerId;
}
public DescribeSagCurrentDnsRequest setResourceOwnerAccount(String resourceOwnerAccount) {
this.resourceOwnerAccount = resourceOwnerAccount;
return this;
}
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
public DescribeSagCurrentDnsRequest setResourceOwnerId(Long resourceOwnerId) {
this.resourceOwnerId = resourceOwnerId;
return this;
}
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
public DescribeSagCurrentDnsRequest setRegionId(String regionId) {
this.regionId = regionId;
return this;
}
public String getRegionId() {
return this.regionId;
}
public DescribeSagCurrentDnsRequest setSmartAGId(String smartAGId) {
this.smartAGId = smartAGId;
return this;
}
public String getSmartAGId() {
return this.smartAGId;
}
public DescribeSagCurrentDnsRequest setSmartAGSn(String smartAGSn) {
this.smartAGSn = smartAGSn;
return this;
}
public String getSmartAGSn() {
return this.smartAGSn;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
f3ae9ae0d92ac6466fe522f8d6db53f81cdd2c80 | 2c1cc40c25e9ad32f5fdcef8d96eb70b4cf9c34c | /assembly-nosql/src/main/java/com/cache/mongodb/model/User.java | 43c35c9fb12813bec09474afdf977dbb09217edc | [] | no_license | TheCodeYinChao/assembly | 233196f11a4b971aacaaeb098bfb932380ee2219 | 9a867a0c7583c1a837e1feb4f28f42c4e200bf73 | refs/heads/master | 2022-06-26T02:38:18.304678 | 2020-12-03T16:42:17 | 2020-12-03T16:42:17 | 135,567,767 | 0 | 1 | null | 2022-06-21T04:09:39 | 2018-05-31T10:15:15 | JavaScript | UTF-8 | Java | false | false | 288 | java | package com.cache.mongodb.model;
import lombok.Data;
import java.io.Serializable;
@Data
public class User implements Serializable {
private static final long serialVersionUID = -3258839839160856613L;
private Long id;
private String userName;
private String passWord;
}
| [
"292306404@qq.com"
] | 292306404@qq.com |
44e4ab07cf4237d6ebd14cdf18a2b3fe260b7186 | 0984796781db79930ef5be6e93db65ccf30c1692 | /handlingerrors/src/main/java/com/fpinjava/handlingerrors/exercise07_08/Result.java | 66c85133fd5ff7d5590916e08c0b63d3511c3a4e | [] | no_license | mosoft521/fpinjava-Use-Maven | bfe3d146941b16f5706e6b00d0f7e020209c720b | 899f79c89d0182b67c1792dd6ee23f81ba840007 | refs/heads/main | 2023-03-19T17:10:09.992752 | 2021-03-12T07:37:17 | 2021-03-12T07:37:17 | 346,532,278 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,015 | java | package com.fpinjava.handlingerrors.exercise07_08;
import com.fpinjava.common.Function;
import com.fpinjava.common.Supplier;
import java.io.Serializable;
public abstract class Result<T> implements Serializable {
@SuppressWarnings("rawtypes")
private static Result empty = new Empty();
private Result() {
}
public static <T> Result<T> failure(String message) {
return new Failure<>(message);
}
public static <T> Result<T> failure(Exception e) {
return new Failure<>(e);
}
public static <T> Result<T> failure(RuntimeException e) {
return new Failure<>(e);
}
public static <T> Result<T> success(T value) {
return new Success<>(value);
}
@SuppressWarnings("unchecked")
public static <T> Result<T> empty() {
return empty;
}
public static <T> Result<T> of(T value) {
return value != null
? success(value)
: empty();
}
public static <T> Result<T> of(T value, String message) {
return value != null
? success(value)
: failure(message);
}
public static <T> Result<T> of(Function<T, Boolean> predicate, T value) {
try {
return predicate.apply(value)
? success(value)
: empty();
} catch (Exception e) {
String errMessage =
String.format("Exception while evaluating predicate: %s", value);
return Result.failure(new IllegalStateException(errMessage, e));
}
}
public static <T> Result<T> of(Function<T, Boolean> predicate,
T value, String message) {
try {
return predicate.apply(value)
? Result.success(value)
: Result.failure(String.format(message, value));
} catch (Exception e) {
String errMessage =
String.format("Exception while evaluating predicate: %s",
String.format(message, value));
return Result.failure(new IllegalStateException(errMessage, e));
}
}
public abstract T getOrElse(final T defaultValue);
public abstract T getOrElse(final Supplier<T> defaultValue);
public abstract <U> Result<U> map(Function<T, U> f);
public abstract <U> Result<U> flatMap(Function<T, Result<U>> f);
public abstract Result<T> mapFailure(String s);
public abstract Result<T> mapFailure(String s, Exception e);
public abstract Result<T> mapFailure(Exception e);
public abstract Result<T> failIfEmpty(String message);
public Result<T> orElse(Supplier<Result<T>> defaultValue) {
return map(x -> this).getOrElse(defaultValue);
}
public Result<T> filter(Function<T, Boolean> p) {
return flatMap(x -> p.apply(x)
? this
: failure("Condition not matched"));
}
public Result<T> filter(Function<T, Boolean> p, String message) {
return flatMap(x -> p.apply(x)
? this
: failure(message));
}
public boolean exists(Function<T, Boolean> p) {
return map(p).getOrElse(false);
}
private static class Empty<T> extends Result<T> {
public Empty() {
super();
}
@Override
public T getOrElse(final T defaultValue) {
return defaultValue;
}
@Override
public <U> Result<U> map(Function<T, U> f) {
return empty();
}
@Override
public <U> Result<U> flatMap(Function<T, Result<U>> f) {
return empty();
}
@Override
public Result<T> mapFailure(String s) {
return this;
}
@Override
public Result<T> mapFailure(String s, Exception e) {
return this;
}
@Override
public Result<T> mapFailure(Exception e) {
return this;
}
@Override
public Result<T> failIfEmpty(String message) {
return failure(message);
}
@Override
public String toString() {
return "Empty()";
}
@Override
public T getOrElse(Supplier<T> defaultValue) {
return defaultValue.get();
}
}
private static class Failure<T> extends Empty<T> {
private final RuntimeException exception;
private Failure(String message) {
super();
this.exception = new IllegalStateException(message);
}
private Failure(RuntimeException e) {
super();
this.exception = e;
}
private Failure(Exception e) {
super();
this.exception = new IllegalStateException(e.getMessage(), e);
}
@Override
public String toString() {
return String.format("Failure(%s)", exception.getMessage());
}
@Override
public <U> Result<U> map(Function<T, U> f) {
return failure(exception);
}
@Override
public <U> Result<U> flatMap(Function<T, Result<U>> f) {
return failure(exception);
}
@Override
public Result<T> mapFailure(String s) {
return failure(new IllegalStateException(s, exception));
}
@Override
public Result<T> mapFailure(String s, Exception e) {
return failure(new IllegalStateException(s, e));
}
@Override
public Result<T> mapFailure(Exception e) {
return failure(e);
}
@Override
public Result<T> failIfEmpty(String message) {
return failure(message);
}
}
private static class Success<T> extends Result<T> {
private final T value;
private Success(T value) {
super();
this.value = value;
}
@Override
public String toString() {
return String.format("Success(%s)", value.toString());
}
@Override
public T getOrElse(T defaultValue) {
return value;
}
@Override
public T getOrElse(Supplier<T> defaultValue) {
return value;
}
@Override
public <U> Result<U> map(Function<T, U> f) {
return success(f.apply(value));
}
@Override
public <U> Result<U> flatMap(Function<T, Result<U>> f) {
return f.apply(value);
}
@Override
public Result<T> mapFailure(String s) {
return this;
}
@Override
public Result<T> mapFailure(String s, Exception e) {
return this;
}
@Override
public Result<T> mapFailure(Exception e) {
return this;
}
@Override
public Result<T> failIfEmpty(String message) {
return this;
}
}
}
| [
"mosoft521@gmail.com"
] | mosoft521@gmail.com |
ca68ee7b76db15f9395b3ff1cecf8ec528b22e38 | 23f4d78623458d375cf23b7017c142dd45c32481 | /Core/orient-businesscore/com/orient/sqlengine/internal/SqlEngineHelper.java | dbf3419fdd716f303420780457be84021fa142a7 | [] | no_license | lcr863254361/weibao_qd | 4e2165efec704b81e1c0f57b319e24be0a1e4a54 | 6d12c52235b409708ff920111db3e6e157a712a6 | refs/heads/master | 2023-04-03T00:37:18.947986 | 2021-04-11T15:12:45 | 2021-04-11T15:12:45 | 356,436,350 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,018 | java | package com.orient.sqlengine.internal;
import com.orient.businessmodel.Util.EnumInter.BusinessModelEnum.BusinessColumnEnum;
import com.orient.businessmodel.bean.IBusinessColumn;
import com.orient.metamodel.operationinterface.IRelationColumn;
import net.java.dev.eval.Expression;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import java.math.BigDecimal;
import java.util.*;
public class SqlEngineHelper {
/**
* 把业务字段根据类型转成字符串输出的sql
*
* @param col
* @return String
*/
public static String columnConvertSelectSql(IBusinessColumn col) {
StringBuilder colSql = new StringBuilder();
BusinessColumnEnum colEnum = (BusinessColumnEnum)col.getColType();
switch(colEnum){
case C_Relation:
if(4==col.getCol().getRelationColumnIF().getRelationType()){
colSql.append("CWM_RELATION_CONVERT(");
colSql.append("'").append(col.getParentModel().getS_table_name()).append("', ");
colSql.append(col.getParentModel().getS_table_name()).append(".id, ");
colSql.append("'").append(col.getCol().getRelationColumnIF().getRefTable().getTableName()).append("'");
colSql.append(") ").append(col.getS_column_name());
}else{
/*除多对多外的关系属性*/
IRelationColumn relColumn = col.getCol().getRelationColumnIF();
colSql.append(relColumn.getRefTable().getTableName() + "_ID");
}
break;
case C_Date:
colSql.append("TO_CHAR(").append(col.getCol().getColumnName()).append(",'YYYY-MM-DD') ");
colSql.append(col.getCol().getColumnName());
break;
case C_DateTime:
colSql.append("TO_CHAR(").append(col.getCol().getColumnName()).append(",'YYYY-MM-DD HH24:MI:SS') ");
colSql.append(col.getCol().getColumnName());
break;
case C_Boolean:
colSql.append("TO_CHAR(").append(col.getCol().getColumnName()).append(") ");
colSql.append(col.getCol().getColumnName());
break;
case C_BigInteger:
colSql.append("TO_CHAR(").append(col.getCol().getColumnName()).append(") ");
colSql.append(col.getCol().getColumnName());
break;
case C_Decimal:
colSql.append("TO_CHAR(").append(col.getCol().getColumnName()).append(") ");
colSql.append(col.getCol().getColumnName());
break;
case C_Double:
colSql.append("TO_CHAR(").append(col.getCol().getColumnName()).append(") ");
colSql.append(col.getCol().getColumnName());
break;
case C_Float:
colSql.append("TO_CHAR(").append(col.getCol().getColumnName()).append(") ");
colSql.append(col.getCol().getColumnName());
break;
case C_Integer:
colSql.append("TO_CHAR(").append(col.getCol().getColumnName()).append(") ");
colSql.append(col.getCol().getColumnName());
break;
default:
colSql.append(col.getCol().getColumnName());
}
return colSql.toString();
}
/**
* 根据业务字段类型,返回数据插入或更新的表达式
*
* @param col
* @return String
*/
public static String columnConvertInsUpSql(IBusinessColumn col){
StringBuilder colSql = new StringBuilder();
BusinessColumnEnum colEnum = (BusinessColumnEnum)col.getColType();
switch(colEnum){
case C_Relation:
if(4!=col.getCol().getRelationColumnIF().getRelationType()){
colSql.append("?");
}
break;
case C_Date:
colSql.append("TO_DATE(?,'YYYY-MM-DD') ");
break;
case C_DateTime:
colSql.append("TO_DATE(?,'YYYY-MM-DD HH24:MI:SS') ");
break;
default:
colSql.append("?");
}
return colSql.toString();
}
/**
* 获取自增值
* @param seqName 自增脚本的函数名
* @param seqContent 自增脚本的内容
* @param seqVal 自增脚本的输入参数
* @return
*/
public static String getAutoIncValue(String seqName,
String seqContent, int seqVal) {
String sequence_result = "";
if (isNullString(seqName)) {
sequence_result = String.valueOf(seqVal);
} else {
sequence_result = AutoIncScriptTool.invoke(seqName, seqContent,
seqVal);
}
return sequence_result;
}
/**
* 判断字符串是否是空串
*
* @param str
* @return boolean
*/
public static boolean isNullString(String str) {
if (str == null || str.trim().equals("")
|| str.trim().equalsIgnoreCase("NULL"))
return true;
else
return false;
}
/**
* 把对象转成字符串,Null转成""
*
* @param obj
* @return String
*/
public static String Obj2String(Object obj) {
return obj == null ? "" : obj.toString();
}
/**
* 把String类型的List转成字符串数组
*
* @param list
* @return String[]
*/
public static String[] list2stringArray(List<String> list){
String[] result = new String[list.size()];
for(int i = 0; i < list.size(); i++){
result[i] = list.get(i);
}
return result;
}
/**
* 把String类型的List转成倒序字符串数组
*
* @param list
* @return String[]
*/
public static String[] list2StringArrayDesc(List<String> list){
String[] result = new String[list.size()];
for(int i = list.size()-1; i>=0; i--){
result[list.size()-1-i] = list.get(i);
}
return result;
}
/**
* 调用JS脚本
* @param expression
* 格式:"(new RegExp('\\\\bdd\\\\b').test(['asd','asda'].join(' ')))";
* @param value:JS所用到的参数
* @return
*/
public static Object scriptExpression(String expression, Map<String, ?> value) {
Object result = null;
// 创建脚本引擎管理器
ScriptEngineManager sem = new ScriptEngineManager();
// 创建一个处理JavaScript的脚本引擎
ScriptEngine engine = sem.getEngineByExtension("js");
try {
// 遍历传过来Map值 并把它传到脚本引擎中
Set<String> keySet = value.keySet();
Iterator<String> keys = keySet.iterator();
while (keys.hasNext()) {
String key = keys.next();
engine.put(key, value.get(key));
}
// 执行javaScript表达式
System.out.println("expression>>>>>"+expression);
result = engine.eval(expression);
} catch (ScriptException ex) {
ex.printStackTrace();
}
return result;
}
/**
* 带单位数值类型字段的计算
*@Function Name: unitCalculateIn
*@Description: @param value
*@Description: @param formulaIn
*@Description: @return
*@Date Created: 2015-11-30 上午09:57:53
*@Author: changxk
*@Last Modified: , Date Modified:
*/
public static String unitCalculate(String value, String unit ,String formula){
if("".equals(formula)){
return value;
}
else if (isNullString(value)){
return "";
}
else{
Map<String,BigDecimal> map = new HashMap<String, BigDecimal>();
map.put(unit,BigDecimal.valueOf(Double.valueOf(value)));
BigDecimal result = Expression.eval(formula, map);
return result.toString();
}
}
}
| [
"lcr18015367626"
] | lcr18015367626 |
c038d94013d4fedb29f213503e76818e8d1e81e8 | 6811fd178ae01659b5d207b59edbe32acfed45cc | /jira-project/jira-components/jira-plugins/jira-issue-link-confluence-plugin/src/main/java/com/atlassian/jira/plugin/link/confluence/ConfluenceApplicationLinks.java | 23553f9c27b3f10229f88fd99b94a61bc26f9396 | [] | no_license | xiezhifeng/mysource | 540b09a1e3c62614fca819610841ddb73b12326e | 44f29e397a6a2da9340a79b8a3f61b3d51e331d1 | refs/heads/master | 2023-04-14T00:55:23.536578 | 2018-04-19T11:08:38 | 2018-04-19T11:08:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,707 | java | package com.atlassian.jira.plugin.link.confluence;
import com.atlassian.applinks.api.ApplicationLink;
import com.atlassian.applinks.api.ApplicationLinkService;
import com.atlassian.applinks.api.application.confluence.ConfluenceApplicationType;
import com.atlassian.fugue.Option;
import com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport;
import com.google.common.collect.ImmutableList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import static com.atlassian.jira.util.UriMatcher.isBaseEqual;
/**
* Represents the Applications Links pointing to Confluence instances from this JIRA instance.
*/
@Component
public class ConfluenceApplicationLinks
{
private final ApplicationLinkService applicationLinkService;
@Autowired
public ConfluenceApplicationLinks(@ComponentImport final ApplicationLinkService applicationLinkService)
{
this.applicationLinkService = applicationLinkService;
}
/**
* Returns all the application links that point to a Confluence instance.
* @return The application links that point to a Confluence instance.
*/
public Collection<ApplicationLink> getAppLinks()
{
return ImmutableList.copyOf(applicationLinkService.getApplicationLinks(ConfluenceApplicationType.class));
}
/**
* Returns the {@link ApplicationLink} that corresponds to the given Confluence page uri.
* @param pageUri The uri for the Confluence page.
* @return The corresponding ApplicationLink for the given page uri, if there is any.
*/
public Option<ApplicationLink> forPage(final URI pageUri)
{
List<ApplicationLink> candidateAppLinks = getCandidateAppLinksForPage(pageUri);
if (candidateAppLinks.isEmpty())
{
return Option.none();
}
for (ApplicationLink matchingAppLink : candidateAppLinks)
{
if (matchingAppLink.isPrimary())
{
return Option.some(matchingAppLink);
}
}
return Option.some(candidateAppLinks.get(0));
}
private List<ApplicationLink> getCandidateAppLinksForPage(final URI pageUri)
{
List<ApplicationLink> matchingAppLinks = new ArrayList<ApplicationLink>();
for (final ApplicationLink appLink : getAppLinks())
{
if (isBaseEqual(appLink.getDisplayUrl(), pageUri) || isBaseEqual(appLink.getRpcUrl(), pageUri))
{
matchingAppLinks.add(appLink);
}
}
return matchingAppLinks;
}
}
| [
"moink635@gmail.com"
] | moink635@gmail.com |
6269a7ffd398a64ca7da86bdadb8087d5750c7a8 | 42f0830f758ba1b9b20aee01249b503ae743c05c | /app/src/main/java/com/core/op/feature/main/tweet/TweetPagerFragment.java | cde735eefad06770c506a4ba1f7cdfc202fe0111 | [] | no_license | lwns/OSChina | 7d2fb97b0a624f8e4d5b0bc3a71e82733b007c0b | d0cf183654b309a6412baedf48a8a892dd1f69e5 | refs/heads/master | 2022-04-07T17:20:13.468989 | 2020-03-05T01:16:08 | 2020-03-05T01:16:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 788 | java | package com.core.op.feature.main.tweet;
import com.core.op.R;
import com.core.op.base.BaseFragment;
import com.core.op.databinding.FrgTweetpagerBinding;
import com.core.op.di.components.MainComponent;
import com.core.op.lib.utils.inject.AfterViews;
import com.core.op.lib.utils.inject.BeforeViews;
import com.core.op.lib.utils.inject.RootView;
@RootView(R.layout.frg_tweetpager)
public final class TweetPagerFragment extends BaseFragment<TweetPagerViewModel, FrgTweetpagerBinding> {
public static TweetPagerFragment instance() {
return new TweetPagerFragment();
}
@BeforeViews
void beforViews() {
getComponent(MainComponent.class).inject(this);
}
@AfterViews
void afterViews() {
binding.viewPager.setOffscreenPageLimit(3);
}
}
| [
"871373988@qq.com"
] | 871373988@qq.com |
f2921f658f086890a10d9ce57eb7e5fd4116ba75 | 793c62c2034119829bf18e801ee1912a8b7905a7 | /base/src/main/java/com/luolei/base/thread/join_sleep2/Run.java | ffbff1b4ac27b895d605c6ab423b9335894450f8 | [] | no_license | askluolei/practice | 5b087a40535b5fb038fb9aa25831d884476d27c9 | 044b13781bc876fd2472d7dfc3e709544d26c546 | refs/heads/master | 2021-09-10T15:15:58.199101 | 2018-03-28T09:17:57 | 2018-03-28T09:17:57 | 108,428,724 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 328 | java | package com.luolei.base.thread.join_sleep2;
public class Run {
public static void main(String[] args) {
try {
ThreadB b = new ThreadB();
ThreadA a = new ThreadA(b);
a.start();
Thread.sleep(1000);
ThreadC c = new ThreadC(b);
c.start();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
| [
"askluolei@gmail.com"
] | askluolei@gmail.com |
bcb7b3fefb745b736347f38d4b372870e81c70bb | f82bcfb9afe11e2ebad32054c887a2eb524ad006 | /dentaku-persistence-service/src/java/javax/olap/query/enumerations/DAOperator.java | d26b77e78681d3d2a25eda0feb485c321ce32604 | [
"Apache-2.0"
] | permissive | codehaus/dentaku | 8655e76c29e207156f175fd61360fe270bc528d7 | c916d029069b84ee444d3606fa28db79cf5a6ba8 | refs/heads/master | 2023-07-20T00:36:04.244855 | 2006-03-18T06:43:18 | 2006-03-18T06:43:18 | 36,364,422 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 164 | java | /*
* Java(TM) OLAP Interface
*/
package javax.olap.query.enumerations;
public interface DAOperator
extends javax.olap.query.enumerations.ElementOperators {
}
| [
"topping@51e4faab-3f0f-0410-8d7f-865566f634a9"
] | topping@51e4faab-3f0f-0410-8d7f-865566f634a9 |
5d7ee630073cea5fcabe9dbcaf1eb14f5b7388e4 | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_3/src/b/f/h/d/Calc_1_3_15736.java | 5394a8461c48a353c4e0108d66b58e9b0b256b41 | [] | no_license | chalstrick/bigRepo1 | ac7fd5785d475b3c38f1328e370ba9a85a751cff | dad1852eef66fcec200df10083959c674fdcc55d | refs/heads/master | 2016-08-11T17:59:16.079541 | 2015-12-18T14:26:49 | 2015-12-18T14:26:49 | 48,244,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 134 | java | package b.f.h.d;
public class Calc_1_3_15736 {
/** @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 |
ad8404acd16979c0a00b1853ffec70a2e6f90771 | eb3327bf7bbd2537efeeef54de6e1ed692a68f35 | /lichkin-projects-pss-entities/src/main/java/com/lichkin/springframework/entities/suppers/PssOrderEntity.java | 87bb48ad2014b8f896aba29bb13b0a1adb22d2ff | [
"MIT"
] | permissive | LichKinContributor/lichkin-projects-pss | 8bea645882b098db443280ee899506c11911b63e | ce4e540dba03741964d59d7588bfa90d05277520 | refs/heads/master | 2020-03-30T09:18:10.492983 | 2019-02-24T04:35:08 | 2019-02-24T04:35:08 | 151,070,257 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,107 | java | package com.lichkin.springframework.entities.suppers;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import com.lichkin.framework.defines.annotations.FieldGenerator;
import com.lichkin.framework.defines.annotations.InsertType;
import lombok.Getter;
import lombok.Setter;
/**
* 订单表实体类
* @author SuZhou LichKin Information Technology Co., Ltd.
*/
@Getter
@Setter
@MappedSuperclass
public abstract class PssOrderEntity extends ActivitiProcessEntity {
/** serialVersionUID */
private static final long serialVersionUID = 1L;
/** 订单号(yyyyMMddHHmmssSSS+15位随即) */
@FieldGenerator(resultColumn = true, queryCondition = true, insertType = InsertType.HANDLE_RETAIN, updateable = false)
@Column(length = 32, nullable = false)
private String orderNo;
/** 订单日期(yyyy-MM-dd) */
@FieldGenerator(resultColumn = true, insertType = InsertType.COPY_COPY)
@Column(length = 10, nullable = false)
private String billDate;
/** 备注 */
@FieldGenerator(insertType = InsertType.COPY_COPY)
@Column(length = 512)
private String remarks;
}
| [
"zhuangxuxin@hotmail.com"
] | zhuangxuxin@hotmail.com |
ac3535f2efbe42fcbcb14c605054b21ab957fb04 | 217e44b1dad361145b400f3c413d12e4342f7413 | /javatest/src/K1_배열심화_level1/K1_배열심화1_압축풀기.java | 86e42912adc80313e93295e86b0bee6a8969c46c | [] | no_license | s02asy/study | 7e5cc299edf2848aeba5a8fa7909fb06bd4b7f5d | 55a1a6f9ae3a9bc83702c9679d239bbab7f4ede8 | refs/heads/master | 2023-08-15T14:15:31.652270 | 2021-09-06T08:56:55 | 2021-09-06T08:56:55 | 403,499,304 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 822 | java | package K1_배열심화_level1;
import java.util.Random;
public class K1_배열심화1_압축풀기 {
public static void main(String[] args) {
int arr[][] = {
{3,2},{5,3},{3,1},{5,3}
};
// 위 데이터는 압축한 데이터이다.
// 위데이터의 규칙은 2개씩 짝을 이룬다.
// 1) 앞의 숫자 ==> 데이터
// 2) 뒤의 숫자 ==> 개수이다.
// 예) {3,2} ==> 33
// 예) {5,3} ==> 555
// 예) {2,1} ==> 2
// 예) {4,3} ==> 444
// 실제 데이터는 335552444 인것이다.
// 문제) 위 데이터의 전체 합 출력
// 예) 3 + 3 + 5 + 5 + 5 + 2 + 4 +4 + 4
int total = 0;
for(int i = 0; i < arr.length; i++) {
for(int j = 0; j < arr[i][1]; j++) {
System.out.println(arr[i][0]);
total += arr[i][0];
}
}
System.out.println(total);
}
} | [
"A@DESKTOP-H0948LR"
] | A@DESKTOP-H0948LR |
4a754fc3a9c7f2f41ccd33da976be7321d205ee8 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_fb1c2c5a81b1d02e6b98f99f68b1a7a241de942c/ItemManager/2_fb1c2c5a81b1d02e6b98f99f68b1a7a241de942c_ItemManager_t.java | 9e9aa50a51a0b592eebfb7a7a325951270658fad | [] | 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 | 1,893 | java | package net.sacredlabyrinth.Phaed.TelePlusPlus.managers;
import net.sacredlabyrinth.Phaed.TelePlusPlus.TelePlusPlus;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
public class ItemManager
{
private TelePlusPlus plugin;
public ItemManager(TelePlusPlus plugin)
{
this.plugin = plugin;
}
public boolean isThroughBlock(int itemid)
{
return plugin.sm.isSeeThrough(itemid);
}
public boolean PutItemInHand(Player player, Material item)
{
ItemStack handitem = player.getItemInHand();
Inventory inv = player.getInventory();
if (!handitem.getType().equals(item))
{
if (!handitem.getType().equals(Material.AIR))
{
if (inv.firstEmpty() == -1)
{
player.sendMessage(ChatColor.RED + "No space in your inventory");
return false;
}
inv.setItem(inv.firstEmpty(), handitem);
}
if (inv.contains(item))
{
Integer slotId = inv.first(item);
ItemStack stack = inv.getItem(slotId);
Integer stackAmount = stack.getAmount();
if (stackAmount > 1)
{
stack.setAmount(stackAmount - 1);
}
else
{
inv.clear(slotId);
}
}
player.setItemInHand(new ItemStack(item, 1));
}
else
{
player.sendMessage(ChatColor.RED + "Can't you feel it? You already have this item in hand");
return false;
}
return true;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
5476c59111479c5c2f72e3eeb64c530d0ebb7774 | 84125a032c2b2e150f62616c15f0089016aca05d | /src/com/prep2020/medium/Problem1861.java | b4b6c5be23c86e1ce590cd096f4a14389edc9571 | [] | no_license | achowdhury80/leetcode | c577acc1bc8bce3da0c99e12d6d447c74fbed5c3 | 5ec97794cc5617cd7f35bafb058ada502ee7d802 | refs/heads/master | 2023-02-06T01:08:49.888440 | 2023-01-22T03:23:37 | 2023-01-22T03:23:37 | 115,574,715 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 980 | java | package com.prep2020.medium;
public class Problem1861 {
/**
* O(M * N)
* @param box
* @return
*/
public char[][] rotateTheBox(char[][] box) {
int m = box.length, n = box[0].length;
char[][] result = new char[n][m];
for (int i = 0; i < m; i++) {
char[] rePositioned = findRePositioned(box[i]);
for (int j = 0; j < rePositioned.length; j++) {
result[j][m - i - 1] = rePositioned[j];
}
}
return result;
}
private char[] findRePositioned(char[] row) {
int n = row.length;
char[] rePositioned = new char[n];
rePositioned[n - 1] = row[n - 1];
for (int i = n - 2; i > -1; i--) {
rePositioned[i] = row[i];
if (row[i] != '#' || rePositioned[i + 1] != '.') continue;
int j = i;
while(j < n - 1) {
if (rePositioned[j + 1] == '.') {
rePositioned[j + 1] = rePositioned[j];
rePositioned[j] = '.';
j++;
} else break;
}
}
return rePositioned;
}
}
| [
"aychowdh@microsoft.com"
] | aychowdh@microsoft.com |
3b7120807dc8879e7f6fbdb4a837e36f6ee27ae1 | 439c418a165b35d2efe49a71acdea0484c29209a | /Study/src/main/java/com/example/study/model/rule/hasTargetArea/CarNumXml.java | ae1fe396312dcaac2abf7e81a15625caaa18157d | [
"MIT"
] | permissive | inzahgi/java_train | 1eae0a80bf84cf64ff24ec3d5c9bdddfda3d1bad | 6f546359b7bf50555074456c04dc0c9fa4bc02b3 | refs/heads/master | 2022-12-24T09:25:43.036761 | 2020-02-29T11:12:30 | 2020-02-29T11:12:30 | 47,551,241 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,993 | java | package com.example.study.model.rule.hasTargetArea;
import com.example.study.model.rule.AreaListXml;
import com.example.study.model.rule.MemberListXml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.FIELD)
// XML文件中的根标识
@XmlRootElement(name = "condition")
public class CarNumXml {
@XmlElement(name = "members")
private MemberListXml memberListXml;
@XmlElement(name = "dynamicmembers")
private DynamicmembersXml dynamicmembersXml;
@XmlElement(name = "arealist")
private AreaListXml areaListXml;
@XmlElement(name = "rules")
private RulesForCarNumXml rulesForCarNumXml;
@XmlElement(name = "appearcity")
private String appearcity;
@XmlElement(name = "inOutType")
private String inOutType;
@XmlElement(name = "calType")
private String calType;
@XmlElement(name = "statusHist")
private String statusHist;
@XmlElement(name = "leaveSpan")
private String leaveSpan;
@XmlElement(name = "staySpan")
private String staySpan;
public MemberListXml getMemberListXml() {
return memberListXml;
}
public void setMemberListXml(MemberListXml memberListXml) {
this.memberListXml = memberListXml;
}
public DynamicmembersXml getDynamicmembersXml() {
return dynamicmembersXml;
}
public void setDynamicmembersXml(DynamicmembersXml dynamicmembersXml) {
this.dynamicmembersXml = dynamicmembersXml;
}
public AreaListXml getAreaListXml() {
return areaListXml;
}
public void setAreaListXml(AreaListXml areaListXml) {
this.areaListXml = areaListXml;
}
public RulesForCarNumXml getRulesForCarNumXml() {
return rulesForCarNumXml;
}
public void setRulesForCarNumXml(RulesForCarNumXml rulesForCarNumXml) {
this.rulesForCarNumXml = rulesForCarNumXml;
}
public String getAppearcity() {
return appearcity;
}
public void setAppearcity(String appearcity) {
this.appearcity = appearcity;
}
public String getInOutType() {
return inOutType;
}
public void setInOutType(String inOutType) {
this.inOutType = inOutType;
}
public String getCalType() {
return calType;
}
public void setCalType(String calType) {
this.calType = calType;
}
public String getStatusHist() {
return statusHist;
}
public void setStatusHist(String statusHist) {
this.statusHist = statusHist;
}
public String getLeaveSpan() {
return leaveSpan;
}
public void setLeaveSpan(String leaveSpan) {
this.leaveSpan = leaveSpan;
}
public String getStaySpan() {
return staySpan;
}
public void setStaySpan(String staySpan) {
this.staySpan = staySpan;
}
}
| [
"inzahgi@126.com"
] | inzahgi@126.com |
6688fa18fb7f47f4e07c1bae2efe45d996cbac89 | 64e9564057bde505f590d3bb595e796ff2fb596a | /education/projects/ThunderReportEZ/base/com/teamsun/framework/ui/component/TABLE_rows.java | e0e057cb390b58ef116a44f437135ad282d00b46 | [] | no_license | zhanght86/medical | c305031e04165eaaebafa8c7863ca1516db3ddfa | 30d9e1e6d631584ed2f109cc9e07f29aef3d4920 | refs/heads/master | 2021-05-15T17:10:52.980787 | 2015-01-04T06:54:50 | 2015-01-04T06:54:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,026 | java | package com.teamsun.framework.ui.component;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
public class TABLE_rows extends AbstractComponent {
private List rows;
/**
* 构造函数:TABLE_rows()
*
* @param rows
* TABLE的行的List
*/
public TABLE_rows(List rows) {
this.rows = rows;
}
public String toHtmlString() {
String htmlString = "";
String propString = "";
String trString = "";
// 得到tr对象集合返回的字符串
if (rows.isEmpty()) {
trString += "";
} else {
Iterator trIter = rows.iterator();
while (trIter.hasNext()) {
trString += ((TR_cells) trIter.next()).toHtmlString();
}
}
// 添加属性
if (propMap.isEmpty()) {
htmlString += "<table>" + trString + "</table>";
} else {
Set propSet = propMap.keySet();
Iterator propIter = propSet.iterator();
while (propIter.hasNext()) {
String propName = propIter.next().toString();
String propValue = this.propMap.get(propName).toString();
propString += " " + propName + "=\"" + propValue + "\"";
}
htmlString += "<table" + propString + ">" + trString + "</table>";
}
return htmlString;
}
public List getRows() {
return rows;
}
public void addRow(TR_cells tr) {
rows.add(tr);
}
public void addRows(List trs) {
rows.addAll(trs);
}
public static void main(String[] args) {
TD td1 = new TD("aaa");
TD td2 = new TD("bbb");
td1.addProp("id", "001");
List TDlist = new ArrayList();
TDlist.add(0, td1);
TDlist.add(1, td2);
TR_cells tr1 = new TR_cells(TDlist);
TR_cells tr2 = new TR_cells(TDlist);
tr1.addProp("id", "001");
tr1.addCell(td1);
List TRlist = new ArrayList();
TRlist.add(0, tr1);
TRlist.add(1, tr2);
TABLE_rows table = new TABLE_rows(TRlist);
table.addRow(tr1);
table.addRows(TRlist);
String toHtmlString = table.toHtmlString();
System.out.print(toHtmlString);
}
}
| [
"wei.wang30@pactera.com"
] | wei.wang30@pactera.com |
42400cea5007282bc3d2d8c647768ab54c25fd68 | 1422f2138f4ff2834b11dd36a5a256e3bd7813fb | /core/src/main/java/nl/inl/blacklab/analysis/BLStandardAnalyzer.java | 783fffc03a1960303fa658243ae46bd61587ccbd | [
"Apache-2.0"
] | permissive | ponsonio/BlackLab | 9c701feaabe2da8c820beb2966c1381b26c32e98 | d55b205a239e537687262999c0b7826baede4832 | refs/heads/master | 2021-05-02T12:14:44.494495 | 2016-10-06T08:33:12 | 2016-10-06T08:33:12 | 70,182,421 | 0 | 10 | null | null | null | null | UTF-8 | Java | false | false | 4,015 | java | /*******************************************************************************
* Copyright (c) 2010, 2012 Institute for Dutch Lexicology
*
* 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 nl.inl.blacklab.analysis;
import java.io.IOException;
import java.io.StringReader;
import java.util.Collections;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.LowerCaseFilter;
import org.apache.lucene.analysis.standard.StandardTokenizerFactory;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import nl.inl.blacklab.filter.RemoveAllAccentsFilter;
import nl.inl.blacklab.filter.RemovePunctuationFilter;
import nl.inl.blacklab.index.complex.ComplexFieldUtil;
/**
* A simple analyzer based on StandardTokenizer that isn't limited to Latin.
*
* Has the option of analyzing case-/accent-sensitive or -insensitive, depending on the field name.
*/
public class BLStandardAnalyzer extends Analyzer {
@Override
protected TokenStreamComponents createComponents(String fieldName) {
Tokenizer source = new StandardTokenizerFactory(Collections.<String,String>emptyMap()).create();
TokenStream filter = source;
boolean caseSensitive = ComplexFieldUtil.isCaseSensitive(fieldName);
if (!caseSensitive)
{
filter = new LowerCaseFilter(filter);// lowercase all
}
boolean diacSensitive = ComplexFieldUtil.isDiacriticsSensitive(fieldName);
if (!diacSensitive)
{
filter = new RemoveAllAccentsFilter(filter); // remove accents
}
if (!(caseSensitive && diacSensitive))
{
// Is this necessary and does it do what we want?
// e.g. do we want "zon" to ever match "zo'n"? Or are there examples
// where this is useful/required?
filter = new RemovePunctuationFilter(filter); // remove punctuation
}
return new TokenStreamComponents(source, filter);
}
public static void main(String[] args) throws IOException {
String TEST_STR = "Hé jij И! раскази и повѣсти. Ст]' Дѣдо Нисторъ. Ива";
try (Analyzer a = new BLStandardAnalyzer()) {
TokenStream ts = a.tokenStream("test", new StringReader(TEST_STR));
CharTermAttribute ta = ts.addAttribute(CharTermAttribute.class);
while (ts.incrementToken()) {
System.out.println(new String(ta.buffer(), 0, ta.length()));
}
TokenStream ts2 = a.tokenStream(ComplexFieldUtil.propertyField("test", null, "s"),
new StringReader(TEST_STR));
ta = ts2.addAttribute(CharTermAttribute.class);
while (ts2.incrementToken()) {
System.out.println(new String(ta.buffer(), 0, ta.length()));
}
}
}
/* CODE JESSE: */
static Pattern prePunctuationPattern = Pattern.compile("(^|\\s)\\p{P}+");
static Pattern postPunctuationPattern = Pattern.compile("\\p{P}+($|\\s)");
public String prePunctuation = "";
public String postPunctuation = "";
public String trimmedToken = "";
public void tokenize(String t) {
Matcher m1 = prePunctuationPattern.matcher(t);
Matcher m2 = postPunctuationPattern.matcher(t);
int s = 0;
int e = t.length();
if (m1.find())
s = m1.end();
if (m2.find())
e = m2.start();
if (e < s)
e = s;
trimmedToken = t.substring(s, e);
prePunctuation = t.substring(0, s);
postPunctuation = t.substring(e, t.length());
}
}
| [
"jan.niestadt@inl.nl"
] | jan.niestadt@inl.nl |
f3956f3d40eea5bec52f339ef7e343721f5be798 | 6e5342fd8e6e8f553b59550cfb372d6e2ce2324b | /icklebot/src/main/java/com/lonepulse/icklebot/annotation/inject/WindowFeatures.java | 3da54f970d4868faeec75337a23504408ad62a0a | [
"Apache-2.0"
] | permissive | sahan/IckleBot | 0e953fafeb45e236fd71fa532a6f2c805d5ba0fa | a19003ceb3ad7c7ee508dc23a8cb31b5676aa499 | refs/heads/master | 2023-08-27T03:57:25.334253 | 2014-01-20T18:28:40 | 2014-01-20T18:30:33 | 7,507,017 | 1 | 2 | null | 2013-08-30T18:59:41 | 2013-01-08T18:44:36 | Java | UTF-8 | Java | false | false | 1,662 | java | package com.lonepulse.icklebot.annotation.inject;
/*
* #%L
* IckleBot
* %%
* Copyright (C) 2013 Lonepulse
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import android.view.Window;
import com.lonepulse.icklebot.activity.IckleActivity;
/**
* <p>Used to annotate an {@link IckleActivity} with <i>Window
* Feature</i> metadata using the constants declared in {@link Window}.</p>
*
* @version 1.0.0
* <br><br>
* @author <a href="mailto:lahiru@lonepulse.com">Lahiru Sahan Jayasinghe</a>
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface WindowFeatures {
/**
* <p>The array of {@code int}s containing the IDs of the
* <i>window features</i> to be applied. These constants
* can be found in {@link Window}.</p>
*
* <p>Empty by default.</p>
*
* @return the constant {@code int} IDs representing the
* {@link Window} features to be used.
* <br><br>
* @since 1.0.0
*/
int[] value() default {};
}
| [
"lahiru@lonepulse.com"
] | lahiru@lonepulse.com |
533f4de446dd96ce9453a3105c41ce59b392e958 | 21bcd1da03415fec0a4f3fa7287f250df1d14051 | /sources/com/google/android/gms/common/api/C4255z.java | d0bf55fff3f446b43fa23bfb26929aa8d9f2cf6e | [] | no_license | lestseeandtest/Delivery | 9a5cc96bd6bd2316a535271ec9ca3865080c3ec8 | bc3fae8f30804a2520e6699df92c2e6a4a0a7cfc | refs/heads/master | 2022-04-24T12:14:22.396398 | 2020-04-25T21:50:29 | 2020-04-25T21:50:29 | 258,875,870 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,427 | java | package com.google.android.gms.common.api;
import android.app.PendingIntent;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
/* renamed from: com.google.android.gms.common.api.z */
public final class C4255z implements Creator<Status> {
public final /* synthetic */ Object createFromParcel(Parcel parcel) {
int b = SafeParcelReader.m18926b(parcel);
int i = 0;
String str = null;
PendingIntent pendingIntent = null;
int i2 = 0;
while (parcel.dataPosition() < b) {
int a = SafeParcelReader.m18920a(parcel);
int a2 = SafeParcelReader.m18919a(a);
if (a2 == 1) {
i2 = SafeParcelReader.m18912T(parcel, a);
} else if (a2 == 2) {
str = SafeParcelReader.m18898F(parcel, a);
} else if (a2 == 3) {
pendingIntent = (PendingIntent) SafeParcelReader.m18921a(parcel, a, PendingIntent.CREATOR);
} else if (a2 != 1000) {
SafeParcelReader.m18918Z(parcel, a);
} else {
i = SafeParcelReader.m18912T(parcel, a);
}
}
SafeParcelReader.m18902J(parcel, b);
return new Status(i, i2, str, pendingIntent);
}
public final /* synthetic */ Object[] newArray(int i) {
return new Status[i];
}
}
| [
"zsolimana@uaedomain.local"
] | zsolimana@uaedomain.local |
c8726ad8cd75e1b3751b8d8bfb69aad1aa2dae2d | b2a635e7cc27d2df8b1c4197e5675655add98994 | /e/f/a/e/i/j/h5.java | e56b26be94fadbe1cba1bd8e7605253d6c8e7e77 | [] | no_license | history-purge/LeaveHomeSafe-source-code | 5f2d87f513d20c0fe49efc3198ef1643641a0313 | 0475816709d20295134c1b55d77528d74a1795cd | refs/heads/master | 2023-06-23T21:38:37.633657 | 2021-07-28T13:27:30 | 2021-07-28T13:27:30 | 390,328,492 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 204 | java | package e.f.a.e.i.j;
public final class h5 {}
/* Location: /home/yc/Downloads/LeaveHomeSafe.jar!/e/f/a/e/i/j/h5.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"game0427game@gmail.com"
] | game0427game@gmail.com |
6a19042b76a68cd6d8cafe22c131a9a5aed8c723 | 4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849 | /aliyun-java-sdk-unimkt/src/main/java/com/aliyuncs/unimkt/model/v20181212/QueryTenantUserByUserIdResponse.java | a524e16df87b24d6c5d218d32799dfd8080849d3 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-java-sdk | a263fa08e261f12d45586d1b3ad8a6609bba0e91 | e19239808ad2298d32dda77db29a6d809e4f7add | refs/heads/master | 2023-09-03T12:28:09.765286 | 2023-09-01T09:03:00 | 2023-09-01T09:03:00 | 39,555,898 | 1,542 | 1,317 | NOASSERTION | 2023-09-14T07:27:05 | 2015-07-23T08:41:13 | Java | UTF-8 | Java | false | false | 4,446 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.unimkt.model.v20181212;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.unimkt.transform.v20181212.QueryTenantUserByUserIdResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class QueryTenantUserByUserIdResponse extends AcsResponse {
private String code;
private String message;
private String requestId;
private Boolean success;
private Model model;
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getMessage() {
return this.message;
}
public void setMessage(String message) {
this.message = message;
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Boolean getSuccess() {
return this.success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public Model getModel() {
return this.model;
}
public void setModel(Model model) {
this.model = model;
}
public static class Model {
private String status;
private String originSiteUserId;
private Long createTime;
private String tenantName;
private String originSiteUserName;
private String userId;
private String business;
private String extInfo;
private Long version;
private String originSite;
private String userName;
private Long modifyTime;
private String tenantId;
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
public String getOriginSiteUserId() {
return this.originSiteUserId;
}
public void setOriginSiteUserId(String originSiteUserId) {
this.originSiteUserId = originSiteUserId;
}
public Long getCreateTime() {
return this.createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public String getTenantName() {
return this.tenantName;
}
public void setTenantName(String tenantName) {
this.tenantName = tenantName;
}
public String getOriginSiteUserName() {
return this.originSiteUserName;
}
public void setOriginSiteUserName(String originSiteUserName) {
this.originSiteUserName = originSiteUserName;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getBusiness() {
return this.business;
}
public void setBusiness(String business) {
this.business = business;
}
public String getExtInfo() {
return this.extInfo;
}
public void setExtInfo(String extInfo) {
this.extInfo = extInfo;
}
public Long getVersion() {
return this.version;
}
public void setVersion(Long version) {
this.version = version;
}
public String getOriginSite() {
return this.originSite;
}
public void setOriginSite(String originSite) {
this.originSite = originSite;
}
public String getUserName() {
return this.userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Long getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Long modifyTime) {
this.modifyTime = modifyTime;
}
public String getTenantId() {
return this.tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
}
@Override
public QueryTenantUserByUserIdResponse getInstance(UnmarshallerContext context) {
return QueryTenantUserByUserIdResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
b079a9ddfdd2c2184d6ef245ce31ba17027195a8 | 94228df04c8d71ef72d0278ed049e9eac43566bc | /modules/attainment/attainment-api/src/main/java/com/bjike/goddess/attainment/api/SurveyActualizeAPI.java | 17c3591e0dd2099764be768184acb448d7355413 | [] | no_license | yang65700/goddess-java | b1c99ac4626c29651250969d58d346b7a13eb9ad | 3f982a3688ee7c97d8916d9cb776151b5af8f04f | refs/heads/master | 2021-04-12T11:10:39.345659 | 2017-09-12T02:32:51 | 2017-09-12T02:32:51 | 126,562,737 | 0 | 0 | null | 2018-03-24T03:33:53 | 2018-03-24T03:33:53 | null | UTF-8 | Java | false | false | 2,138 | java | package com.bjike.goddess.attainment.api;
import com.bjike.goddess.attainment.bo.SurveyActualizeBO;
import com.bjike.goddess.attainment.dto.SurveyActualizeDTO;
import com.bjike.goddess.attainment.to.SurveyActualizeTO;
import com.bjike.goddess.common.api.exception.SerException;
import java.util.List;
/**
* 调研实施记录业务接口
*
* @Author: [ dengjunren ]
* @Date: [ 2017-04-06 10:58 ]
* @Description: [ 调研实施记录业务接口 ]
* @Version: [ v1.0.0 ]
* @Copy: [ com.bjike ]
*/
public interface SurveyActualizeAPI {
/**
* 保存
*
* @param to 调研实施记录传输对象
* @return
* @throws SerException
*/
default SurveyActualizeBO save(SurveyActualizeTO to) throws SerException {
return null;
}
/**
* 修改
*
* @param to 调研实施记录传输对象
* @return
* @throws SerException
*/
default SurveyActualizeBO update(SurveyActualizeTO to) throws SerException {
return null;
}
/**
* 删除
*
* @param id 调研实施记录数据id
* @return
* @throws SerException
*/
default SurveyActualizeBO delete(String id) throws SerException {
return null;
}
/**
* 结束调研
*
* @param id 调研实施记录数据id
* @return
* @throws SerException
*/
default SurveyActualizeBO over(String id) throws SerException {
return null;
}
/**
* 列表
*
* @param dto 调研实施记录数据传输对象
* @return
* @throws SerException
*/
default List<SurveyActualizeBO> maps(SurveyActualizeDTO dto) throws SerException {
return null;
}
/**
* 根据id获取调研实施记录数据
*
* @param id 调研实施记录数据id
* @return
* @throws SerException
*/
default SurveyActualizeBO getById(String id) throws SerException {
return null;
}
/**
* 获取总条数
*
* @return
* @throws SerException
*/
default Long getTotal() throws SerException {
return null;
}
} | [
"196329217@qq.com"
] | 196329217@qq.com |
b533cbd4a1c113cf3963ac5e41cf3b520afd8862 | ad6b38e9559dff7129de46a3298cf43c1af73dd3 | /src/main/java/com/org/thedevbridge/app/Application.java | f5e6e35d3d401466530456fc251c8d59e8c3655d | [] | no_license | augustingims/JhipsterAgenceDeVoyage | 91ce3bd41592b189531b8a5bd02c2cf3d44ceb5d | a051095d8f59ad4ad725fb42466a92962b662d1c | refs/heads/master | 2016-08-12T03:04:23.521549 | 2016-03-13T14:35:45 | 2016-03-13T14:35:45 | 53,605,836 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,479 | java | package com.org.thedevbridge.app;
import com.org.thedevbridge.app.config.Constants;
import com.org.thedevbridge.app.config.JHipsterProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.MetricRepositoryAutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.core.env.SimpleCommandLinePropertySource;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.Collection;
@ComponentScan
@EnableAutoConfiguration(exclude = { MetricFilterAutoConfiguration.class, MetricRepositoryAutoConfiguration.class })
@EnableConfigurationProperties({ JHipsterProperties.class, LiquibaseProperties.class })
public class Application {
private static final Logger log = LoggerFactory.getLogger(Application.class);
@Inject
private Environment env;
/**
* Initializes Agence_de_voyage.
* <p/>
* Spring profiles can be configured with a program arguments --spring.profiles.active=your-active-profile
* <p/>
* <p>
* You can find more information on how profiles work with JHipster on <a href="http://jhipster.github.io/profiles.html">http://jhipster.github.io/profiles.html</a>.
* </p>
*/
@PostConstruct
public void initApplication() throws IOException {
if (env.getActiveProfiles().length == 0) {
log.warn("No Spring profile configured, running with default configuration");
} else {
log.info("Running with Spring profile(s) : {}", Arrays.toString(env.getActiveProfiles()));
Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles());
if (activeProfiles.contains(Constants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(Constants.SPRING_PROFILE_PRODUCTION)) {
log.error("You have misconfigured your application! " +
"It should not run with both the 'dev' and 'prod' profiles at the same time.");
}
if (activeProfiles.contains(Constants.SPRING_PROFILE_PRODUCTION) && activeProfiles.contains(Constants.SPRING_PROFILE_FAST)) {
log.error("You have misconfigured your application! " +
"It should not run with both the 'prod' and 'fast' profiles at the same time.");
}
if (activeProfiles.contains(Constants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(Constants.SPRING_PROFILE_CLOUD)) {
log.error("You have misconfigured your application! " +
"It should not run with both the 'dev' and 'cloud' profiles at the same time.");
}
}
}
/**
* Main method, used to run the application.
*/
public static void main(String[] args) throws UnknownHostException {
SpringApplication app = new SpringApplication(Application.class);
SimpleCommandLinePropertySource source = new SimpleCommandLinePropertySource(args);
addDefaultProfile(app, source);
Environment env = app.run(args).getEnvironment();
log.info("Access URLs:\n----------------------------------------------------------\n\t" +
"Local: \t\thttp://127.0.0.1:{}\n\t" +
"External: \thttp://{}:{}\n----------------------------------------------------------",
env.getProperty("server.port"),
InetAddress.getLocalHost().getHostAddress(),
env.getProperty("server.port"));
}
/**
* If no profile has been configured, set by default the "dev" profile.
*/
private static void addDefaultProfile(SpringApplication app, SimpleCommandLinePropertySource source) {
if (!source.containsProperty("spring.profiles.active") &&
!System.getenv().containsKey("SPRING_PROFILES_ACTIVE")) {
app.setAdditionalProfiles(Constants.SPRING_PROFILE_DEVELOPMENT);
}
}
}
| [
"augustingims@gmail.com"
] | augustingims@gmail.com |
7d25321b6ab9ee02453fa30c02080f42d681e83e | 885e2667ceb32b82fa18bd5808ac315143003aa1 | /AtCoder/ABC/ABC162/F/Main.java | 5f16f384a86a679890a41ebc9ed2a6f5f2ae47a5 | [] | no_license | T45K/kyopuro | f804b1c73c8c1404ffcc5e2070ad518495abf4e7 | 74df98c0b83be246fdcc8846fec5cbfdcf29e6bc | refs/heads/master | 2023-06-29T14:14:49.033389 | 2023-06-11T14:14:32 | 2023-06-11T14:14:32 | 154,971,544 | 2 | 0 | null | 2020-07-25T14:14:24 | 2018-10-27T14:08:20 | Java | UTF-8 | Java | false | false | 2,007 | java | package AtCoder.ABC.ABC162.F;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
/*
DP 基本的には1つ飛ばしで数字を選んでいく nが偶数だと2つ飛ばし1回,奇数だと2つ飛ばし*2 or 3つ飛ばしができると考えてDP
*/
public class Main {
public static void main(final String[] args) {
final Scanner scanner = new Scanner(System.in);
final int n = scanner.nextInt();
final List<Long> list = IntStream.range(0, n)
.mapToObj(i -> scanner.nextLong())
.collect(Collectors.toList());
if (n % 2 == 0) {
final long[][] dpTable = new long[n][2];
dpTable[0][0] = list.get(0);
dpTable[1][1] = list.get(1);
for (int i = 2; i < n; i++) {
final long tmp = list.get(i);
dpTable[i][0] = dpTable[i - 2][0] + tmp;
if (i >= 3) {
dpTable[i][1] = max(dpTable[i - 2][1], dpTable[i - 3][0]) + tmp;
}
}
System.out.println(max(dpTable[n - 1][1], dpTable[n - 2][0]));
return;
}
final long[][] dpTable = new long[n][3];
dpTable[0][0] = list.get(0);
dpTable[1][1] = list.get(1);
dpTable[2][2] = list.get(2);
for (int i = 2; i < n; i++) {
final long tmp = list.get(i);
dpTable[i][0] = dpTable[i - 2][0] + tmp;
if (i >= 3) {
dpTable[i][1] = max(dpTable[i - 2][1], dpTable[i - 3][0]) + tmp;
}
if (i >= 4) {
dpTable[i][2] = max(dpTable[i - 2][2], dpTable[i - 3][1], dpTable[i - 4][0]) + tmp;
}
}
System.out.println(max(dpTable[n - 1][2], dpTable[n - 2][1], dpTable[n - 3][0]));
}
private static long max(long... numbers) {
return Arrays.stream(numbers).max().orElseThrow();
}
}
| [
"tasktas9@gmail.com"
] | tasktas9@gmail.com |
d0f3f5c40bbbd9d91e3fc4a0b14519fddc5d592d | b15e201c34088796b2ab7f258e548c472c31056b | /src/main/java/org/jtheque/books/view/controllers/EditorController.java | 32f6e3f5d2d5f13e5fe3e6b10e408d2ccc607dbb | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | wichtounet/jtheque-books-module | 204197adc9dfcd5fd47a29720df6e95b577b0367 | d70df2b50ae5b8ba14fc7d559dd6519dcbc1345d | refs/heads/master | 2020-12-24T13:52:14.792967 | 2010-07-05T14:41:39 | 2010-07-05T14:41:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,695 | java | package org.jtheque.books.view.controllers;
/*
* Copyright JTheque (Baptiste Wicht)
*
* 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.
*/
import org.jtheque.books.persistence.od.able.Editor;
import org.jtheque.books.services.able.IEditorsService;
import org.jtheque.books.view.able.IEditorView;
import org.jtheque.books.view.controllers.able.IEditorController;
import org.jtheque.core.managers.Managers;
import org.jtheque.core.managers.undo.IUndoRedoManager;
import org.jtheque.core.managers.view.able.controller.AbstractController;
import org.jtheque.primary.controller.impl.undo.GenericDataCreatedEdit;
import org.jtheque.primary.view.able.ViewMode;
import javax.annotation.Resource;
/**
* A controller for the editor view.
*
* @author Baptiste Wicht
*/
public final class EditorController extends AbstractController implements IEditorController {
private ViewMode state = ViewMode.NEW;
private Editor currentEditor;
@Resource
private IEditorsService editorsService;
@Resource
private IEditorView editorView;
@Override
public void newEditor() {
state = ViewMode.NEW;
editorView.reload();
currentEditor = editorsService.getEmptyEditor();
}
@Override
public void editEditor(Editor editor) {
state = ViewMode.EDIT;
editorView.reload(editor);
currentEditor = editor;
displayView();
}
@Override
public void save(String name) {
if (currentEditor == null) {
if (state == ViewMode.NEW) {
currentEditor = editorsService.getEmptyEditor();
} else {
throw new IllegalStateException("The current editor cannot be null in EDIT mode. ");
}
}
currentEditor.setName(name);
if (state == ViewMode.NEW) {
editorsService.create(currentEditor);
Managers.getManager(IUndoRedoManager.class).addEdit(
new GenericDataCreatedEdit<Editor>("editorsService", currentEditor));
} else {
editorsService.save(currentEditor);
}
}
@Override
public IEditorView getView() {
return editorView;
}
}
| [
"baptistewicht@gmail.com"
] | baptistewicht@gmail.com |
b0ab4e1cacca3998d2310717a567503e71704e15 | d217153d3a9ae32e3dab6a91e1e05a9aa881c074 | /src/com/huiyin/adapter/AttributeListNameAdapter.java | 8c50a9ab478c68f45bc15f3fe88ace0436a7a60d | [] | no_license | sengeiou/huiyinlehu | c892c6d804a5410de9d1f56db34b5df0f407be58 | 47a6523104746353950a482ab95600e19887b2e0 | refs/heads/master | 2020-05-30T11:00:09.656997 | 2015-07-28T07:32:52 | 2015-07-28T07:32:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,237 | java | package com.huiyin.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.custom.vg.list.CustomAdapter;
import com.huiyin.R;
import com.huiyin.bean.CommodityTypeName;
import java.util.ArrayList;
public class AttributeListNameAdapter extends CustomAdapter {
private Context context;
private ArrayList<CommodityTypeName.TypeName> VALUE_LIST;
public AttributeListNameAdapter(Context context,ArrayList<CommodityTypeName.TypeName> VALUE_LIST1){
VALUE_LIST=VALUE_LIST1;
this.context=context;
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return null != VALUE_LIST ? VALUE_LIST.size() : 0;
}
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return VALUE_LIST.get(position);
}
@Override
public long getItemId(int arg0) {
// TODO Auto-generated method stub
return arg0;
}
@Override
public View getView(final int position, View contentView, ViewGroup parent) {
// TODO Auto-generated method stub
final ViewHolder viewHolder;
if (null == contentView) {
viewHolder = new ViewHolder();
contentView = LayoutInflater.from(context).inflate(R.layout.layout_ex_child_item_cus, null);
viewHolder.name = (TextView) contentView.findViewById(R.id.tv_attribute_name);
contentView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) contentView.getTag();
}
viewHolder.name.setBackgroundResource(R.drawable.common_btn_white_selector);
viewHolder.name.setTextColor(context.getResources().getColor(R.color.deep_gray));
if(VALUE_LIST.get(position).isSelected()){
viewHolder.name.setBackgroundResource(R.drawable.common_btn_red_selector);
viewHolder.name.setTextColor(context.getResources().getColor(R.color.white));
}
viewHolder.name.setText(VALUE_LIST.get(position).NAME);
return contentView;
}
private static class ViewHolder {
private TextView name;
}
}
| [
"293575570@qq.com"
] | 293575570@qq.com |
b4c1b2618749c689a82a404acb198ad153ef4be3 | 5a86421f61da5c7faf7443defb06423f18565332 | /jdisc_messagebus_service/src/test/java/com/yahoo/messagebus/jdisc/MbusResponseTestCase.java | 7a778dc057c55759f14a787b9f70227d47218328 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | t1707/vespa | 1d62116f4345dbc5020dbfcab1fc2934e82e5d68 | 9f4859e9996ac9913ce80ed9b209f683507fe157 | refs/heads/master | 2021-04-03T06:24:10.556834 | 2018-03-08T17:02:09 | 2018-03-08T17:02:09 | 124,473,863 | 0 | 0 | Apache-2.0 | 2018-03-15T06:06:27 | 2018-03-09T02:07:53 | Java | UTF-8 | Java | false | false | 1,139 | java | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.messagebus.jdisc;
import com.yahoo.jdisc.Response;
import com.yahoo.messagebus.Reply;
import com.yahoo.text.Utf8String;
import org.junit.Test;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.fail;
/**
* @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
*/
public class MbusResponseTestCase {
@Test
public void requireThatAccessorsWork() {
MyReply reply = new MyReply();
MbusResponse response = new MbusResponse(Response.Status.OK, reply);
assertSame(reply, response.getReply());
}
@Test
public void requireThatReplyCanNotBeNull() {
try {
new MbusResponse(Response.Status.OK, null);
fail();
} catch (NullPointerException e) {
}
}
private class MyReply extends Reply {
@Override
public Utf8String getProtocol() {
return null;
}
@Override
public int getType() {
return 0;
}
}
}
| [
"bratseth@yahoo-inc.com"
] | bratseth@yahoo-inc.com |
eee56607c98cb1fb1694f2954cc4869b302e3ee9 | 421f0a75a6b62c5af62f89595be61f406328113b | /generated_tests/model_seeding/102_squirrel-sql-net.sourceforge.squirrel_sql.fw.util.SystemProperties-0.5-7/net/sourceforge/squirrel_sql/fw/util/SystemProperties_ESTest_scaffolding.java | f4a26078ecd52e2cd5de40b51455dee458054e36 | [] | no_license | tigerqiu712/evosuite-model-seeding-empirical-evaluation | c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6 | 11a920b8213d9855082d3946233731c843baf7bc | refs/heads/master | 2020-12-23T21:04:12.152289 | 2019-10-30T08:02:29 | 2019-10-30T08:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 559 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Oct 29 15:45:39 GMT 2019
*/
package net.sourceforge.squirrel_sql.fw.util;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class SystemProperties_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pderakhshanfar@bsr01.win.tue.nl"
] | pderakhshanfar@bsr01.win.tue.nl |
8da70b6c44bfa0df77f21548b4d23556bce52c5d | 6336562f24e69a6503e940217d9cff44669d55ca | /src/main/java/com/zaxxer/hikari/util/UtilityElf.java | 61d4c063844d6a3a050387607ece5be7169e736b | [
"Apache-2.0"
] | permissive | mrwindit/HikariCP | 2ffdda2c4708c3548acb32df04fdb0b5cad149a0 | b08b0d76566e4a0c45be7b63ef4403147d697166 | refs/heads/master | 2021-01-18T03:08:45.807279 | 2015-03-28T15:10:11 | 2015-03-28T15:10:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,359 | java | /*
* Copyright (C) 2013 Brett Wooldridge
*
* 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.zaxxer.hikari.util;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.sql.Connection;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
*
* @author Brett Wooldridge
*/
public final class UtilityElf
{
/**
* Get the elapsed time in millisecond between the specified start time and now.
*
* @param start the start time
* @return the elapsed milliseconds
*/
public static long elapsedTimeMs(final long start)
{
return System.currentTimeMillis() - start;
}
/**
* Sleep and transform an InterruptedException into a RuntimeException.
*
* @param millis the number of milliseconds to sleep
*/
public static void quietlySleep(final long millis)
{
try {
Thread.sleep(millis);
}
catch (InterruptedException e) {
// I said be quiet!
}
}
/**
* Create and instance of the specified class using the constructor matching the specified
* arguments.
*
* @param <T> the class type
* @param className the name of the classto instantiate
* @param clazz a class to cast the result as
* @param args arguments to a constructor
* @return an instance of the specified class
*/
@SuppressWarnings("unchecked")
public static <T> T createInstance(final String className, final Class<T> clazz, final Object... args)
{
if (className == null) {
return null;
}
try {
Class<?> loaded = UtilityElf.class.getClassLoader().loadClass(className);
Class<?>[] argClasses = new Class<?>[args.length];
for (int i = 0; i < args.length; i++) {
argClasses[i] = args[i].getClass();
}
if (args.length > 0) {
Constructor<?> constructor = loaded.getConstructor(argClasses);
return (T) constructor.newInstance(args);
}
return (T) loaded.newInstance();
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* Create a ThreadPoolExecutor.
*
* @param queueSize the queue size
* @param threadName the thread name
* @param threadFactory an optional ThreadFactory
* @param policy the RejectedExecutionHandler policy
* @return a ThreadPoolExecutor
*/
public static ThreadPoolExecutor createThreadPoolExecutor(final int queueSize, final String threadName, ThreadFactory threadFactory, final RejectedExecutionHandler policy)
{
if (threadFactory == null) {
threadFactory = new DefaultThreadFactory(threadName, true);
}
LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>(queueSize);
ThreadPoolExecutor executor = new ThreadPoolExecutor(1, 1, 5, TimeUnit.SECONDS, queue, threadFactory, policy);
executor.allowCoreThreadTimeOut(true);
return executor;
}
/**
* Get the int value of a transaction isolation level by name.
*
* @param transactionIsolationName the name of the transaction isolation level
* @return the int value of the isolation level or -1
*/
public static int getTransactionIsolation(final String transactionIsolationName)
{
if (transactionIsolationName != null) {
try {
Field field = Connection.class.getField(transactionIsolationName);
return field.getInt(null);
}
catch (Exception e) {
throw new IllegalArgumentException("Invalid transaction isolation value: " + transactionIsolationName);
}
}
return -1;
}
}
| [
"brett.wooldridge@gmail.com"
] | brett.wooldridge@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.