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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e6a82e79f4e40474c5090717c8fa8ae064d690a8
|
13cde38f3ad2b71200d5bdc1e837ec1638f58591
|
/app/src/main/java/liuliu/demo/list/control/base/GouwucheAdapter.java
|
7b0be6e12c51bb7fec60f55c01ab1322d8c8bf8d
|
[] |
no_license
|
Finderchangchang/ListViewDemo
|
aae1faa022a7240c46fccf12bf584b31df030f86
|
93c84419a1364b6682b221d325ad1e15b39e2ae3
|
refs/heads/master
| 2021-01-10T17:19:08.595697
| 2016-01-18T12:49:19
| 2016-01-18T12:49:19
| 48,583,654
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,543
|
java
|
package liuliu.demo.list.control.base;
import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import com.nostra13.universalimageloader.core.ImageLoader;
import java.util.List;
public abstract class GouwucheAdapter<T> extends BaseAdapter {
protected Context mContext;
protected List<T> mDatas;
protected LayoutInflater mInflater;
private int layoutId;
public GouwucheAdapter(Context context, List<T> datas, int layoutId) {
this.mContext = context;
mInflater = LayoutInflater.from(context);
this.mDatas = datas;
this.layoutId = layoutId;
}
@Override
public int getCount() {
return mDatas.size();
}
@Override
public T getItem(int position) {
return mDatas.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
GouwucheViewHolder holder = getViewHolder(position, convertView, parent);
convert(holder, mDatas, position);
return holder.getConvertView();
}
private GouwucheViewHolder getViewHolder(int position, View convertView, ViewGroup parent) {
return GouwucheViewHolder.get(mContext, convertView, parent, layoutId, position);
}
public abstract void convert(GouwucheViewHolder holder, List<T> t, int position);
}
|
[
"1031066280@qq.com"
] |
1031066280@qq.com
|
45d6a4d2962e56f4e8f4a10bebc081bacae50bb9
|
377e5e05fb9c6c8ed90ad9980565c00605f2542b
|
/bin/ext-integration/sap/asynchronousOM/saporderexchange/src/de/hybris/platform/sap/orderexchange/outbound/impl/DefaultPartnerContributor.java
|
913868e8399c569620ab6602ffcb5555c8e54939
|
[] |
no_license
|
automaticinfotech/HybrisProject
|
c22b13db7863e1e80ccc29774f43e5c32e41e519
|
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
|
refs/heads/master
| 2021-07-20T18:41:04.727081
| 2017-10-30T13:24:11
| 2017-10-30T13:24:11
| 108,957,448
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,742
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE or an SAP affiliate company.
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.sap.orderexchange.outbound.impl;
import de.hybris.platform.core.model.order.OrderModel;
import de.hybris.platform.core.model.user.AddressModel;
import de.hybris.platform.core.model.user.UserModel;
import de.hybris.platform.sap.orderexchange.constants.OrderCsvColumns;
import de.hybris.platform.sap.orderexchange.constants.PartnerCsvColumns;
import de.hybris.platform.sap.orderexchange.constants.PartnerRoles;
import de.hybris.platform.sap.orderexchange.constants.SaporderexchangeConstants;
import de.hybris.platform.sap.orderexchange.outbound.B2CCustomerHelper;
import de.hybris.platform.sap.orderexchange.outbound.RawItemContributor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Builds the Row map for the CSV files for the Partner in an Order
*/
public class DefaultPartnerContributor implements RawItemContributor<OrderModel>
{
private B2CCustomerHelper b2CCustomerHelper;
@Override
public Set<String> getColumns()
{
return new HashSet<>(Arrays.asList(OrderCsvColumns.ORDER_ID, PartnerCsvColumns.PARTNER_ROLE_CODE,
PartnerCsvColumns.PARTNER_CODE, PartnerCsvColumns.DOCUMENT_ADDRESS_ID, PartnerCsvColumns.FIRST_NAME,
PartnerCsvColumns.LAST_NAME, PartnerCsvColumns.STREET, PartnerCsvColumns.CITY, PartnerCsvColumns.TEL_NUMBER,
PartnerCsvColumns.HOUSE_NUMBER, PartnerCsvColumns.POSTAL_CODE, PartnerCsvColumns.REGION_ISO_CODE,
PartnerCsvColumns.COUNTRY_ISO_CODE, PartnerCsvColumns.EMAIL, PartnerCsvColumns.LANGUAGE_ISO_CODE,
PartnerCsvColumns.MIDDLE_NAME, PartnerCsvColumns.MIDDLE_NAME2, PartnerCsvColumns.DISTRICT,
PartnerCsvColumns.BUILDING, PartnerCsvColumns.APPARTMENT, PartnerCsvColumns.POBOX, PartnerCsvColumns.FAX,
PartnerCsvColumns.TITLE));
}
@Override
public List<Map<String, Object>> createRows(final OrderModel order)
{
final List<Map<String, Object>> result = new ArrayList<>(4);
final AddressModel paymentAddress = order.getPaymentAddress();
AddressModel deliveryAddress = order.getDeliveryAddress();
if (deliveryAddress == null)
{
deliveryAddress = paymentAddress;
}
final String b2cCustomer = b2CCustomerHelper.determineB2CCustomer(order);
final String sapcommon_Customer = b2cCustomer != null ? b2cCustomer : order.getStore().getSAPConfiguration()
.getSapcommon_referenceCustomer();
final String deliveryAddressNumber = getShipToAddressNumber();
Map<String, Object> row = mapAddressData(order, deliveryAddress);
row.put(PartnerCsvColumns.PARTNER_ROLE_CODE, PartnerRoles.SHIP_TO.getCode());
row.put(PartnerCsvColumns.PARTNER_CODE, sapcommon_Customer);
row.put(PartnerCsvColumns.DOCUMENT_ADDRESS_ID, deliveryAddressNumber);
result.add(row);
String soldToAddressNumber;
if (paymentAddress != null)
{
final String paymentAddressNumber = getSoldToAddressNumber();
row = mapAddressData(order, paymentAddress);
row.put(PartnerCsvColumns.PARTNER_ROLE_CODE, PartnerRoles.BILL_TO.getCode());
row.put(PartnerCsvColumns.PARTNER_CODE, sapcommon_Customer);
row.put(PartnerCsvColumns.DOCUMENT_ADDRESS_ID, paymentAddressNumber);
result.add(row);
soldToAddressNumber = paymentAddressNumber;
row = mapAddressData(order, paymentAddress);
}
else
{
soldToAddressNumber = deliveryAddressNumber;
row = mapAddressData(order, deliveryAddress);
}
row.put(PartnerCsvColumns.PARTNER_ROLE_CODE, PartnerRoles.SOLD_TO.getCode());
row.put(PartnerCsvColumns.PARTNER_CODE, sapcommon_Customer);
row.put(PartnerCsvColumns.DOCUMENT_ADDRESS_ID, soldToAddressNumber);
result.add(row);
/*
* Add partner function for sale rep ID and partner function (VE) for Assisted Service Mode (ASM)
*/
UserModel salesRep = order.getPlacedBy();
if ( salesRep != null ) {
row = new HashMap<String, Object>();
row.put(OrderCsvColumns.ORDER_ID, order.getCode());
row.put(PartnerCsvColumns.LANGUAGE_ISO_CODE, order.getLanguage().getIsocode());
row.put(PartnerCsvColumns.PARTNER_ROLE_CODE, PartnerRoles.PLACED_BY.getCode());
row.put(PartnerCsvColumns.PARTNER_CODE, salesRep.getUid());
row.put(PartnerCsvColumns.DOCUMENT_ADDRESS_ID, "");
result.add(row);
}
return result;
}
protected String getSoldToAddressNumber()
{
return SaporderexchangeConstants.ADDRESS_ONE;
}
protected String getShipToAddressNumber()
{
return SaporderexchangeConstants.ADDRESS_TWO;
}
protected Map<String, Object> mapAddressData(final OrderModel order, final AddressModel address)
{
final Map<String, Object> row = new HashMap<>();
row.put(OrderCsvColumns.ORDER_ID, order.getCode());
row.put(PartnerCsvColumns.FIRST_NAME, address.getFirstname());
row.put(PartnerCsvColumns.LAST_NAME, address.getLastname());
row.put(PartnerCsvColumns.STREET, address.getStreetname());
row.put(PartnerCsvColumns.CITY, address.getTown());
row.put(PartnerCsvColumns.TEL_NUMBER, address.getPhone1());
row.put(PartnerCsvColumns.HOUSE_NUMBER, address.getStreetnumber());
row.put(PartnerCsvColumns.POSTAL_CODE, address.getPostalcode());
row.put(PartnerCsvColumns.REGION_ISO_CODE, (address.getRegion() != null) ? address.getRegion().getIsocodeShort() : "");
row.put(PartnerCsvColumns.COUNTRY_ISO_CODE, (address.getCountry() != null) ? address.getCountry().getIsocode() : "");
row.put(PartnerCsvColumns.EMAIL, address.getEmail());
row.put(PartnerCsvColumns.MIDDLE_NAME, address.getMiddlename());
row.put(PartnerCsvColumns.MIDDLE_NAME2, address.getMiddlename2());
row.put(PartnerCsvColumns.DISTRICT, address.getDistrict());
row.put(PartnerCsvColumns.BUILDING, address.getBuilding());
row.put(PartnerCsvColumns.APPARTMENT, address.getAppartment());
row.put(PartnerCsvColumns.POBOX, address.getPobox());
row.put(PartnerCsvColumns.FAX, address.getFax());
row.put(PartnerCsvColumns.LANGUAGE_ISO_CODE, order.getLanguage().getIsocode());
row.put(PartnerCsvColumns.TITLE, (address.getTitle() != null) ? address.getTitle().getCode() : "");
return row;
}
@SuppressWarnings("javadoc")
public B2CCustomerHelper getB2CCustomerHelper()
{
return b2CCustomerHelper;
}
@SuppressWarnings("javadoc")
public void setB2CCustomerHelper(final B2CCustomerHelper b2cCustomerHelper)
{
b2CCustomerHelper = b2cCustomerHelper;
}
}
|
[
"santosh.kshirsagar@automaticinfotech.com"
] |
santosh.kshirsagar@automaticinfotech.com
|
d07b6301a4fcc621b06d223f09eb9e0e39bf8f5b
|
11b9a30ada6672f428c8292937dec7ce9f35c71b
|
/src/main/java/org/omg/CORBA/AnyHolder.java
|
1e9fd45d103850a32b56a0c1aa159407ce6f0869
|
[] |
no_license
|
bogle-zhao/jdk8
|
5b0a3978526723b3952a0c5d7221a3686039910b
|
8a66f021a824acfb48962721a20d27553523350d
|
refs/heads/master
| 2022-12-13T10:44:17.426522
| 2020-09-27T13:37:00
| 2020-09-27T13:37:00
| 299,039,533
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,777
|
java
|
/***** Lobxxx Translate Finished ******/
/*
* Copyright (c) 1996, 2001, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.omg.CORBA;
import org.omg.CORBA.portable.Streamable;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
/**
* The Holder for <tt>Any</tt>. For more information on
* Holder files, see <a href="doc-files/generatedfiles.html#holder">
* "Generated Files: Holder Files"</a>.<P>
* A Holder class for <code>Any</code> objects
* that is used to store "out" and "inout" parameters in IDL methods.
* If an IDL method signature has an IDL <code>any</code> as an "out"
* or "inout" parameter, the programmer must pass an instance of
* <code>AnyHolder</code> as the corresponding
* parameter in the method invocation; for "inout" parameters, the programmer
* must also fill the "in" value to be sent to the server.
* Before the method invocation returns, the ORB will fill in the
* value corresponding to the "out" value returned from the server.
* <P>
* If <code>myAnyHolder</code> is an instance of <code>AnyHolder</code>,
* the value stored in its <code>value</code> field can be accessed with
* <code>myAnyHolder.value</code>.
*
* <p>
* <tt>任何</tt>的持有人。有关持有人文件的详细信息,请参见<a href="doc-files/generatedfiles.html#holder">"生成的文件:持有人文件"</a>。
* <P> <code>任何</code >用于在IDL方法中存储"out"和"inout"参数的对象。
* 如果IDL方法签名具有作为"out"或"inout"参数的IDL <code> any </code>,则程序员必须传递<code> AnyHolder </code>的实例作为方法调用中的相应参数;对
* 于"inout"参数,程序员还必须填写要发送到服务器的"in"值。
* <P> <code>任何</code >用于在IDL方法中存储"out"和"inout"参数的对象。在方法调用返回之前,ORB将填充从服务器返回的"out"值对应的值。
* <P>
* 如果<code> myAnyHolder </code>是<code> AnyHolder </code>的实例,则存储在其<code> value </code>字段中的值可以通过<code> my
* AnyHolder.value </code> 。
*
*
* @since JDK1.2
*/
public final class AnyHolder implements Streamable {
/**
* The <code>Any</code> value held by this <code>AnyHolder</code> object.
* <p>
* 由此<code> AnyHolder </code>对象持有的<code> Any </code>值。
*
*/
public Any value;
/**
* Constructs a new <code>AnyHolder</code> object with its
* <code>value</code> field initialized to <code>null</code>.
* <p>
* 构造一个新的<code> AnyHolder </code>对象,其<code> value </code>字段初始化为<code> null </code>。
*
*/
public AnyHolder() {
}
/**
* Constructs a new <code>AnyHolder</code> object for the given
* <code>Any</code> object.
* <p>
* 为给定的<code> Any </code>对象构造一个新的<code> AnyHolder </code>对象。
*
*
* @param initial the <code>Any</code> object with which to initialize
* the <code>value</code> field of the new
* <code>AnyHolder</code> object
*/
public AnyHolder(Any initial) {
value = initial;
}
/**
* Reads from <code>input</code> and initalizes the value in the Holder
* with the unmarshalled data.
*
* <p>
* 从<code>输入</code>读取,并使用未组合的数据初始化Holder中的值。
*
*
* @param input the InputStream containing CDR formatted data from the wire.
*/
public void _read(InputStream input) {
value = input.read_any();
}
/**
* Marshals to <code>output</code> the value in
* this <code>AnyHolder</code> object.
*
* <p>
* 在<code> AnyHolder </code>对象中输入<code>输出</code>的值。
*
*
* @param output the OutputStream which will contain the CDR formatted data.
*/
public void _write(OutputStream output) {
output.write_any(value);
}
/**
* Returns the <code>TypeCode</code> object corresponding to the value
* held in this <code>AnyHolder</code> object.
*
* <p>
* 返回与此<code> AnyHolder </code>对象中保存的值对应的<code> TypeCode </code>对象。
*
* @return the TypeCode of the value held in
* this <code>AnyHolder</code> object
*/
public TypeCode _type() {
return ORB.init().get_primitive_tc(TCKind.tk_any);
}
}
|
[
"zhaobo@MacBook-Pro.local"
] |
zhaobo@MacBook-Pro.local
|
592f6918868f0b8dcf9980ec41430acd1284c530
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/test/org/nd4j/parameterserver/distributed/logic/routing/InterleavedRouterTest.java
|
8e398c7e15e8104576ba8694f456181b5f271c18
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,781
|
java
|
package org.nd4j.parameterserver.distributed.logic.routing;
import org.junit.Assert;
import org.junit.Test;
import org.nd4j.parameterserver.distributed.conf.VoidConfiguration;
import org.nd4j.parameterserver.distributed.messages.VoidMessage;
import org.nd4j.parameterserver.distributed.messages.requests.InitializationRequestMessage;
import org.nd4j.parameterserver.distributed.messages.requests.SkipGramRequestMessage;
import org.nd4j.parameterserver.distributed.transport.Transport;
/**
*
*
* @author raver119@gmail.com
*/
public class InterleavedRouterTest {
VoidConfiguration configuration;
Transport transport;
long originator;
/**
* Testing default assignment for everything, but training requests
*
* @throws Exception
*
*/
@Test
public void assignTarget1() throws Exception {
InterleavedRouter router = new InterleavedRouter();
router.init(configuration, transport);
for (int i = 0; i < 100; i++) {
VoidMessage message = new InitializationRequestMessage(100, 10, 123, false, false, 10);
int target = router.assignTarget(message);
Assert.assertTrue(((target >= 0) && (target <= 3)));
Assert.assertEquals(originator, message.getOriginatorId());
}
}
/**
* Testing assignment for training message
*
* @throws Exception
*
*/
@Test
public void assignTarget2() throws Exception {
InterleavedRouter router = new InterleavedRouter();
router.init(configuration, transport);
int[] w1 = new int[]{ 512, 345, 486, 212 };
for (int i = 0; i < (w1.length); i++) {
SkipGramRequestMessage message = new SkipGramRequestMessage(w1[i], 1, new int[]{ 1, 2, 3 }, new byte[]{ 0, 0, 1 }, ((short) (0)), 0.02, 119);
int target = router.assignTarget(message);
Assert.assertEquals(((w1[i]) % (configuration.getNumberOfShards())), target);
Assert.assertEquals(originator, message.getOriginatorId());
}
}
/**
* Testing default assignment for everything, but training requests.
* Difference here is pre-defined default index, for everything but TrainingMessages
*
* @throws Exception
*
*/
@Test
public void assignTarget3() throws Exception {
InterleavedRouter router = new InterleavedRouter(2);
router.init(configuration, transport);
for (int i = 0; i < 3; i++) {
VoidMessage message = new InitializationRequestMessage(100, 10, 123, false, false, 10);
int target = router.assignTarget(message);
Assert.assertEquals(2, target);
Assert.assertEquals(originator, message.getOriginatorId());
}
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
ae69e15d67763ccb8e29cb3436ad6a0a2e763f7b
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/playstore_apps/com_idamob_tinkoff_android/source/ru/tinkoff/mb/api/entities/templates/regular/c.java
|
d85b422b1be25e40d4d62872ff40dfffc0504228
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 650
|
java
|
package ru.tinkoff.mb.api.entities.templates.regular;
import java.io.Serializable;
import org.apache.commons.a.a.b;
public final class c
implements Serializable
{
@com.google.gson.a.c(a="dayOfMonth")
public Integer a;
@com.google.gson.a.c(a="dayOfWeek")
public Integer b;
public c() {}
public final boolean equals(Object paramObject)
{
if (!(paramObject instanceof c)) {
return false;
}
paramObject = (c)paramObject;
return new b().a(this.a, paramObject.a).a(this.b, paramObject.b).a;
}
public final int hashCode()
{
return new org.apache.commons.a.a.c((byte)0).a(this.a).a(this.b).a;
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
e8668c47b1a08abcf8dd324c1ecf1ebf989b2c41
|
f11e4e1538589f1f56184745e5af7f7ba06a306b
|
/TxMgmt-Proj01-SpringAOP-Declarative/src/main/java/com/nt/dao/BankDAO.java
|
50a746bf699fc9bad46563117b7e369f44fd5613
|
[] |
no_license
|
varunraj2297/SpringFrameWorkWS
|
0473f140f7fd56a92402d69c9274a4c585ca51e8
|
16f54fa282710983e6714abb7dfe07c7f953d0de
|
refs/heads/master
| 2022-12-25T04:20:57.253135
| 2020-03-03T07:19:15
| 2020-03-03T07:19:15
| 176,875,084
| 0
| 0
| null | 2022-11-24T08:37:32
| 2019-03-21T05:19:19
|
Java
|
UTF-8
|
Java
| false
| false
| 137
|
java
|
package com.nt.dao;
public interface BankDAO {
public int withdraw(int accno,float amt);
public int deposite(int accno,float amt);
}
|
[
"varunraj2297@gmail.com"
] |
varunraj2297@gmail.com
|
788e46075b99bc4d2298b3e14c93ef2e2c327ccf
|
b3a02d5f1f60cd584fbb6da1b823899607693f63
|
/04_DB Frameworks_Hibernate+Spring Data/07_Hibernate Code First EX/hospitalDatabase/src/main/java/model/Patient.java
|
e0ed83f2d2f666d37172d89f04925ec2bfc8912d
|
[
"MIT"
] |
permissive
|
akkirilov/SoftUniProject
|
20bf0543c9aaa0a33364daabfddd5f4c3e400ba2
|
709d2d1981c1bb6f1d652fe4101c1693f5afa376
|
refs/heads/master
| 2021-07-11T02:53:18.108275
| 2018-12-04T20:14:19
| 2018-12-04T20:14:19
| 79,428,334
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,679
|
java
|
package model;
import java.sql.Date;
import java.util.Set;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name = "patients")
public class Patient {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "first_name")
private String firstName;
@Column(name = "last_name")
private String lastName;
@Basic
private String address;
@Basic
private String email;
@Column(name = "date_of_birth")
private Date dateOfBirth;
@Column(name = "picture_path")
private String picturePath;
@Column(name = "has_insurance")
private boolean hasInsurance;
@OneToMany(cascade = CascadeType.ALL)
private Set<Visitation> visitations;
@OneToMany(cascade = CascadeType.ALL)
private Set<Diagnose> diagnoses;
@OneToMany(cascade = CascadeType.ALL)
private Set<Medicament> medicaments;
public Patient() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Date getDateOfBirth() {
return dateOfBirth;
}
public void setDateOfBirth(Date dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
public String getPicturePath() {
return picturePath;
}
public void setPicturePath(String picturePath) {
this.picturePath = picturePath;
}
public boolean isHasInsurance() {
return hasInsurance;
}
public void setHasInsurance(boolean hasInsurance) {
this.hasInsurance = hasInsurance;
}
public Set<Visitation> getVisitations() {
return visitations;
}
public void setVisitations(Set<Visitation> visitations) {
this.visitations = visitations;
}
public Set<Diagnose> getDiagnoses() {
return diagnoses;
}
public void setDiagnoses(Set<Diagnose> diagnoses) {
this.diagnoses = diagnoses;
}
public Set<Medicament> getMedicaments() {
return medicaments;
}
public void setMedicaments(Set<Medicament> medicaments) {
this.medicaments = medicaments;
}
}
|
[
"akkirilov@mail.bg"
] |
akkirilov@mail.bg
|
3cb9f93feb3da801420f33570ac5f30a57769d6f
|
bfe767e5376cf55ddca3666b4d8eff39cc528b02
|
/PasswordValidator_Conformation/src/main/java/com/lsn/domain/Customer.java
|
6e03e343308d218634fe7aa9599b1abad16b1f2d
|
[] |
no_license
|
aakulasaikiran/SpringSecurity_CustomPasswordConformation
|
fc7af7444b8ad1f344b35770a625596e219f72fc
|
5b034372abc80d458c1f973214f71266b577c208
|
refs/heads/master
| 2020-03-27T19:30:17.381481
| 2018-09-01T11:44:40
| 2018-09-01T11:44:40
| 146,993,508
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 805
|
java
|
package com.lsn.domain;
public class Customer {
private int id;
private String name;
private String role;
private String password;
private String passwordconf;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getPasswordconf() {
return passwordconf;
}
public void setPasswordconf(String passwordconf) {
this.passwordconf = passwordconf;
}
}
|
[
"aakulasaikiran@gmail.com"
] |
aakulasaikiran@gmail.com
|
84c6f873dce86836867b746b14480050c4d0a002
|
9a70020d409332b7db0e2e5e087f500a0e58217c
|
/BOJ/1094/Main.java
|
2bed7835a5bbdd289d2bda214d3d4e3a8e24e3d7
|
[
"MIT"
] |
permissive
|
ISKU/Algorithm
|
daf5e9d5397eaf7dad2d6f7fb18c1c94d8f0246d
|
a51449e4757e07a9dcd1ff05f2ef4b53e25a9d2a
|
refs/heads/master
| 2021-06-22T09:42:45.033235
| 2021-02-01T12:45:28
| 2021-02-01T12:45:28
| 62,798,871
| 55
| 12
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 538
|
java
|
/*
* Author: Minho Kim (ISKU)
* Date: March 3, 2018
* E-mail: minho.kim093@gmail.com
*
* https://github.com/ISKU/Algorithm
* https://www.acmicpc.net/problem/1094
*/
import java.util.*;
public class Main {
public static void main(String... args) {
int X = new Scanner(System.in).nextInt();
int[] stick = new int[] { 64, 32, 16, 8, 4, 2, 1 };
int sum = 0;
int answer = 0;
for (int n : stick) {
int count = X / n;
answer += count;
X -= n * count;
if (X == 0)
break;
}
System.out.print(answer);
}
}
|
[
"minho.kim093@gmail.com"
] |
minho.kim093@gmail.com
|
079e83b4a8baa3277b45ce6a95988308937b6f93
|
55791da0600be8a15d345fc88efc369a82bad714
|
/core-ng/src/main/java/core/framework/util/Exceptions.java
|
5311c787aa515eed4e8a51b06e4e34effd53c63f
|
[
"Apache-2.0"
] |
permissive
|
movomoto/core-ng-project
|
3e597f9f111fb07e0aa77835f49a189b7770d44d
|
2880a1d904096efcff66386d494d49bc192593f6
|
refs/heads/master
| 2020-03-07T09:09:15.517332
| 2018-03-29T18:55:42
| 2018-03-29T18:55:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,003
|
java
|
package core.framework.util;
import java.io.PrintWriter;
import java.io.StringWriter;
/**
* @author neo
*/
public final class Exceptions {
public static String stackTrace(Throwable e) {
StringWriter writer = new StringWriter();
e.printStackTrace(new PrintWriter(writer));
return writer.toString();
}
public static Error error(String pattern, Object... arguments) { // follow convention of logger, if last arg is exception, make it cause
if (arguments.length > 0) {
Object lastArgument = arguments[arguments.length - 1];
if (lastArgument instanceof Throwable) {
Object[] messageArguments = new Object[arguments.length - 1];
System.arraycopy(arguments, 0, messageArguments, 0, arguments.length - 1);
return new Error(Strings.format(pattern, messageArguments), (Throwable) lastArgument);
}
}
return new Error(Strings.format(pattern, arguments));
}
}
|
[
"neowu.us@gmail.com"
] |
neowu.us@gmail.com
|
52995acd83cd57fdfa2c586730e72550325275e8
|
8ba27419c3c7624866ea5c44a5e6e02b3aed3d27
|
/source/i1/KDM2Model/src/subkdm/kdmRelations/impl/ClusterRelationImpl.java
|
4f7ff484132c6c7c88e886445b8a7cc549b50ea8
|
[
"MIT"
] |
permissive
|
lfmendivelso10/AppModernization
|
eeb8c4060f0ec9f5c30f3a4fbd1d9935a0ba1072
|
aec05796ba6ab2e39b3c227541c1c913785a7b12
|
refs/heads/master
| 2021-01-10T08:44:39.730111
| 2016-02-16T00:34:03
| 2016-02-16T00:34:03
| 51,155,887
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,327
|
java
|
/**
*/
package subkdm.kdmRelations.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import subkdm.kdmObjects.Cluster;
import subkdm.kdmObjects.CodeItem;
import subkdm.kdmObjects.impl.ModelElementImpl;
import subkdm.kdmRelations.ClusterRelation;
import subkdm.kdmRelations.KdmRelationsPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Cluster Relation</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link subkdm.kdmRelations.impl.ClusterRelationImpl#getTo <em>To</em>}</li>
* <li>{@link subkdm.kdmRelations.impl.ClusterRelationImpl#getFrom <em>From</em>}</li>
* <li>{@link subkdm.kdmRelations.impl.ClusterRelationImpl#getCodeElement <em>Code Element</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ClusterRelationImpl extends ModelElementImpl implements ClusterRelation {
/**
* The cached value of the '{@link #getTo() <em>To</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTo()
* @generated
* @ordered
*/
protected Cluster to;
/**
* The cached value of the '{@link #getFrom() <em>From</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getFrom()
* @generated
* @ordered
*/
protected Cluster from;
/**
* The cached value of the '{@link #getCodeElement() <em>Code Element</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCodeElement()
* @generated
* @ordered
*/
protected EList<CodeItem> codeElement;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ClusterRelationImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return KdmRelationsPackage.Literals.CLUSTER_RELATION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Cluster getTo() {
if (to != null && to.eIsProxy()) {
InternalEObject oldTo = (InternalEObject)to;
to = (Cluster)eResolveProxy(oldTo);
if (to != oldTo) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, KdmRelationsPackage.CLUSTER_RELATION__TO, oldTo, to));
}
}
return to;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Cluster basicGetTo() {
return to;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setTo(Cluster newTo) {
Cluster oldTo = to;
to = newTo;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, KdmRelationsPackage.CLUSTER_RELATION__TO, oldTo, to));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Cluster getFrom() {
if (from != null && from.eIsProxy()) {
InternalEObject oldFrom = (InternalEObject)from;
from = (Cluster)eResolveProxy(oldFrom);
if (from != oldFrom) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, KdmRelationsPackage.CLUSTER_RELATION__FROM, oldFrom, from));
}
}
return from;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Cluster basicGetFrom() {
return from;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setFrom(Cluster newFrom) {
Cluster oldFrom = from;
from = newFrom;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, KdmRelationsPackage.CLUSTER_RELATION__FROM, oldFrom, from));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<CodeItem> getCodeElement() {
if (codeElement == null) {
codeElement = new EObjectResolvingEList<CodeItem>(CodeItem.class, this, KdmRelationsPackage.CLUSTER_RELATION__CODE_ELEMENT);
}
return codeElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case KdmRelationsPackage.CLUSTER_RELATION__TO:
if (resolve) return getTo();
return basicGetTo();
case KdmRelationsPackage.CLUSTER_RELATION__FROM:
if (resolve) return getFrom();
return basicGetFrom();
case KdmRelationsPackage.CLUSTER_RELATION__CODE_ELEMENT:
return getCodeElement();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case KdmRelationsPackage.CLUSTER_RELATION__TO:
setTo((Cluster)newValue);
return;
case KdmRelationsPackage.CLUSTER_RELATION__FROM:
setFrom((Cluster)newValue);
return;
case KdmRelationsPackage.CLUSTER_RELATION__CODE_ELEMENT:
getCodeElement().clear();
getCodeElement().addAll((Collection<? extends CodeItem>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case KdmRelationsPackage.CLUSTER_RELATION__TO:
setTo((Cluster)null);
return;
case KdmRelationsPackage.CLUSTER_RELATION__FROM:
setFrom((Cluster)null);
return;
case KdmRelationsPackage.CLUSTER_RELATION__CODE_ELEMENT:
getCodeElement().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case KdmRelationsPackage.CLUSTER_RELATION__TO:
return to != null;
case KdmRelationsPackage.CLUSTER_RELATION__FROM:
return from != null;
case KdmRelationsPackage.CLUSTER_RELATION__CODE_ELEMENT:
return codeElement != null && !codeElement.isEmpty();
}
return super.eIsSet(featureID);
}
} //ClusterRelationImpl
|
[
"lf.mendivelso10@uniandes.edu.co"
] |
lf.mendivelso10@uniandes.edu.co
|
46f890aa51b7ad70dfc4696f99c04e0bd1f0fd85
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/19_jmca-com.soops.CEN4010.JMCA.JMCAParser-1.0-5/com/soops/CEN4010/JMCA/JMCAParser_ESTest_scaffolding.java
|
8a151341d2bb7e1057ce4c648c46295cb679fe5b
|
[] |
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
| 539
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Oct 25 19:48:05 GMT 2019
*/
package com.soops.CEN4010.JMCA;
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 JMCAParser_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
40a8c30afab2e736999f3ae258aa5b40886c2e25
|
a8aaeb7e9c95a72bfd0cccac2c9c82478c29fcb5
|
/app/src/main/java/com/verbosetech/yoohoo/models/LogCall.java
|
6ed3d710b4ffcd141a4bacfaed2b80f2f9b73f77
|
[] |
no_license
|
WafaaHarbJame/Tamazuj111
|
e03ec53eb90e608b2b3dc90dad93ef3936f1f2e3
|
d4a05a1c4735b8656ac26e32087bbfbb2410e4b3
|
refs/heads/master
| 2020-08-06T20:44:55.357852
| 2019-10-07T20:01:20
| 2019-10-07T20:01:20
| 213,146,722
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,619
|
java
|
package com.verbosetech.yoohoo.models;
import io.realm.RealmModel;
import io.realm.annotations.RealmClass;
@RealmClass
public class LogCall implements RealmModel {
private long timeUpdated;
private int timeDurationSeconds;
private String status, myId, userId, userName, userImage, userStatus;
private boolean isVideo;
public LogCall() {
}
public LogCall(User user, long timeUpdated, int timeDurationSeconds, boolean isVideo, String status, String myId) {
this.timeUpdated = timeUpdated;
this.timeDurationSeconds = timeDurationSeconds;
this.isVideo = isVideo;
this.status = status;
this.myId = myId;
this.userId = user.getId();
this.userName = user.getNameToDisplay();
this.userImage = user.getImage();
this.userStatus = user.getStatus();
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserImage() {
return userImage;
}
public String getUserStatus() {
return userStatus;
}
public long getTimeUpdated() {
return timeUpdated;
}
public int getTimeDuration() {
return timeDurationSeconds;
}
public int getTimeDurationSeconds() {
return timeDurationSeconds;
}
public String getMyId() {
return myId;
}
public String getUserId() {
return userId;
}
public boolean isVideo() {
return isVideo;
}
public String getStatus() {
return status;
}
}
|
[
"wafaajame@gmail.com"
] |
wafaajame@gmail.com
|
90cdca3cda1b7f7935124f65675bbd2d862893bf
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/iotda/src/main/java/com/huaweicloud/sdk/iotda/v5/model/CreateOtaPackageRequest.java
|
7344139e01efd840c6f234db2b82d735bcddbdb4
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 2,927
|
java
|
package com.huaweicloud.sdk.iotda.v5.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Request Object
*/
public class CreateOtaPackageRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "Instance-Id")
private String instanceId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "body")
private CreateOtaPackage body;
public CreateOtaPackageRequest withInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
/**
* **参数说明**:实例ID。物理多租下各实例的唯一标识,一般华为云租户无需携带该参数,仅在物理多租场景下从管理面访问API时需要携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID。
* @return instanceId
*/
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public CreateOtaPackageRequest withBody(CreateOtaPackage body) {
this.body = body;
return this;
}
public CreateOtaPackageRequest withBody(Consumer<CreateOtaPackage> bodySetter) {
if (this.body == null) {
this.body = new CreateOtaPackage();
bodySetter.accept(this.body);
}
return this;
}
/**
* Get body
* @return body
*/
public CreateOtaPackage getBody() {
return body;
}
public void setBody(CreateOtaPackage body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
CreateOtaPackageRequest that = (CreateOtaPackageRequest) obj;
return Objects.equals(this.instanceId, that.instanceId) && Objects.equals(this.body, that.body);
}
@Override
public int hashCode() {
return Objects.hash(instanceId, body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateOtaPackageRequest {\n");
sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
4c4da5bb66bf19142652ca9c252cb5bca291964e
|
4ef431684e518b07288e8b8bdebbcfbe35f364e4
|
/em-tests/test-core/src/main/java/com/ca/tas/role/ManagementModuleRole.java
|
916f734c03bb51472d702f710c67e649f8e7f1ea
|
[] |
no_license
|
Sarojkswain/APMAutomation
|
a37c59aade283b079284cb0a8d3cbbf79f3480e3
|
15659ce9a0030c2e9e5b992040e05311fff713be
|
refs/heads/master
| 2020-03-30T00:43:23.925740
| 2018-09-27T23:42:04
| 2018-09-27T23:42:04
| 150,540,177
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,067
|
java
|
/*
* Copyright (c) 2015 CA. All rights reserved.
*
* This software and all information contained therein is confidential and
* proprietary and shall not be duplicated, used, disclosed or disseminated in
* any way except as authorized by the applicable license agreement, without
* the express written permission of CA. All authorized reproductions must be
* marked with this language.
*
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO THE EXTENT
* PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS SOFTWARE WITHOUT WARRANTY OF
* ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL CA BE
* LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR
* INDIRECT, FROM THE USE OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, LOST
* PROFITS, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF CA IS
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
*/
package com.ca.tas.role;
import org.jetbrains.annotations.NotNull;
import com.ca.apm.automation.action.flow.FlowConfig;
import com.ca.apm.automation.action.flow.mm.DeployManagementModuleFlow;
import com.ca.apm.automation.action.flow.mm.DeployManagementModuleFlowContext;
import com.ca.tas.client.IAutomationAgentClient;
/**
* Install a management module to EM.
*
* @author Korcak, Zdenek <korzd01@ca.com>
*
*/
public class ManagementModuleRole extends AbstractRole {
@NotNull
private final String mmPathName;
private final String emInstallDir;
public ManagementModuleRole(String roleId, String mmPathName, String emInstallDir) {
super(roleId);
this.mmPathName = mmPathName;
this.emInstallDir = emInstallDir;
}
public void deploy(IAutomationAgentClient aaClient) {
aaClient.runJavaFlow(new FlowConfig.FlowConfigBuilder(DeployManagementModuleFlow.class,
new DeployManagementModuleFlowContext(mmPathName, emInstallDir), getHostingMachine()
.getHostnameWithPort()));
}
}
|
[
"sarojkswain@gmail.com"
] |
sarojkswain@gmail.com
|
b39afc0fd25267fca4afe86a83d73acae575e10d
|
639b55cf81462c7a1214e5dba37a5070cda0f260
|
/sourceanalysis/java/apache-tomcat-7.0.54/java/org/apache/catalina/websocket/MessageInbound.java
|
0684baa2fb98bc407b77ed82ec8697c0f8dda466
|
[] |
no_license
|
tangjiquan/sourceanalysis
|
93950c208de1f77c239d8e00ced0163648238193
|
b9aed83c6e48a8e74c250e88335bd16be5ef9722
|
refs/heads/master
| 2020-06-04T15:59:04.146212
| 2015-11-15T14:28:01
| 2015-11-15T14:28:01
| 34,946,151
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,221
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.websocket;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import org.apache.tomcat.util.res.StringManager;
/**
* Base implementation of the class used to process WebSocket connections based
* on messages. Applications should extend this class to provide application
* specific functionality. Applications that wish to operate on a stream basis
* rather than a message basis should use {@link StreamInbound}.
*
* @deprecated Replaced by the JSR356 WebSocket 1.0 implementation and will be
* removed in Tomcat 8.0.x.
*/
@Deprecated
public abstract class MessageInbound extends StreamInbound {
private static final StringManager sm =
StringManager.getManager(Constants.Package);
// 2MB - like maxPostSize
private int byteBufferMaxSize = 2097152;
private int charBufferMaxSize = 2097152;
private ByteBuffer bb = ByteBuffer.allocate(8192);
private CharBuffer cb = CharBuffer.allocate(8192);
@Override
protected final void onBinaryData(InputStream is) throws IOException {
int read = 0;
while (read > -1) {
bb.position(bb.position() + read);
if (bb.remaining() == 0) {
resizeByteBuffer();
}
read = is.read(bb.array(), bb.position(), bb.remaining());
}
bb.flip();
onBinaryMessage(bb);
bb.clear();
}
@Override
protected final void onTextData(Reader r) throws IOException {
int read = 0;
while (read > -1) {
cb.position(cb.position() + read);
if (cb.remaining() == 0) {
resizeCharBuffer();
}
read = r.read(cb.array(), cb.position(), cb.remaining());
}
cb.flip();
onTextMessage(cb);
cb.clear();
}
private void resizeByteBuffer() throws IOException {
int maxSize = getByteBufferMaxSize();
if (bb.limit() >= maxSize) {
throw new IOException(sm.getString("message.bufferTooSmall"));
}
long newSize = bb.limit() * 2;
if (newSize > maxSize) {
newSize = maxSize;
}
// Cast is safe. newSize < maxSize and maxSize is an int
ByteBuffer newBuffer = ByteBuffer.allocate((int) newSize);
bb.rewind();
newBuffer.put(bb);
bb = newBuffer;
}
private void resizeCharBuffer() throws IOException {
int maxSize = getCharBufferMaxSize();
if (cb.limit() >= maxSize) {
throw new IOException(sm.getString("message.bufferTooSmall"));
}
long newSize = cb.limit() * 2;
if (newSize > maxSize) {
newSize = maxSize;
}
// Cast is safe. newSize < maxSize and maxSize is an int
CharBuffer newBuffer = CharBuffer.allocate((int) newSize);
cb.rewind();
newBuffer.put(cb);
cb = newBuffer;
}
/**
* Obtain the current maximum size (in bytes) of the buffer used for binary
* messages.
*/
public final int getByteBufferMaxSize() {
return byteBufferMaxSize;
}
/**
* Set the maximum size (in bytes) of the buffer used for binary messages.
*/
public final void setByteBufferMaxSize(int byteBufferMaxSize) {
this.byteBufferMaxSize = byteBufferMaxSize;
}
/**
* Obtain the current maximum size (in characters) of the buffer used for
* binary messages.
*/
public final int getCharBufferMaxSize() {
return charBufferMaxSize;
}
/**
* Set the maximum size (in characters) of the buffer used for textual
* messages.
*/
public final void setCharBufferMaxSize(int charBufferMaxSize) {
this.charBufferMaxSize = charBufferMaxSize;
}
/**
* This method is called when there is a binary WebSocket message available
* to process. The message is presented via a ByteBuffer and may have been
* formed from one or more frames. The number of frames used to transmit the
* message is not made visible to the application.
*
* @param message The WebSocket message
*
* @throws IOException If a problem occurs processing the message. Any
* exception will trigger the closing of the WebSocket
* connection.
*/
protected abstract void onBinaryMessage(ByteBuffer message)
throws IOException;
/**
* This method is called when there is a textual WebSocket message available
* to process. The message is presented via a CharBuffer and may have been
* formed from one or more frames. The number of frames used to transmit the
* message is not made visible to the application.
*
* @param message The WebSocket message
*
* @throws IOException If a problem occurs processing the message. Any
* exception will trigger the closing of the WebSocket
* connection.
*/
protected abstract void onTextMessage(CharBuffer message)
throws IOException;
}
|
[
"2495527426@qq.com"
] |
2495527426@qq.com
|
a090f35c87c123842eedc79745cbe22351f784e2
|
e6ff78100cf6b90e415378ed8f56f9a73bdcf838
|
/src/main/java/cn/fty1/javase/lambda/predicate/Fty1Filter.java
|
416b8b89215864ca2873addc7dd7b63c3873d7fd
|
[
"MIT"
] |
permissive
|
Cray-Bear/java-technology
|
6cca5eae7619948352a1ff644b50d38e269038b1
|
c8bf82d60b556307d0d8ddfabfed0ef37f218c59
|
refs/heads/master
| 2020-03-09T09:19:57.364018
| 2018-04-24T06:29:07
| 2018-04-24T06:29:07
| 128,710,535
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 355
|
java
|
package cn.fty1.javase.lambda.predicate;
import java.util.Collection;
import java.util.function.Predicate;
import java.util.stream.Collectors;
public class Fty1Filter<T> {
public Collection<T> conditionFilter(Collection<T> iterable, Predicate<T> predicate) {
return iterable.stream().filter(predicate).collect(Collectors.toList());
}
}
|
[
"1798900899@qq.com"
] |
1798900899@qq.com
|
7977f929e7b1818f6132e0ee8ddd784275b323da
|
4c304a7a7aa8671d7d1b9353acf488fdd5008380
|
/src/main/java/com/alipay/api/response/AlipayInsAutoUserOilQueryResponse.java
|
9d4caefbb37a8870b848968c38ec00404c392bc0
|
[
"Apache-2.0"
] |
permissive
|
zhaorongxi/alipay-sdk-java-all
|
c658983d390e432c3787c76a50f4a8d00591cd5c
|
6deda10cda38a25dcba3b61498fb9ea839903871
|
refs/heads/master
| 2021-02-15T19:39:11.858966
| 2020-02-16T10:44:38
| 2020-02-16T10:44:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,657
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.ins.auto.user.oil.query response.
*
* @author auto create
* @since 1.0, 2019-07-04 17:22:37
*/
public class AlipayInsAutoUserOilQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 4791375984728487355L;
/**
* 累计攒油量(不包含未收取油量)
*/
@ApiField("accum_oil")
private Long accumOil;
/**
* 当前可兑换油量
*/
@ApiField("current_oil")
private Long currentOil;
/**
* 当前总油量(包含当前可兑换油量及未收取的油量 currentOil + unpickOil)
*/
@ApiField("total_oil")
private Long totalOil;
/**
* 未收取油滴
*/
@ApiField("unpick_oil")
private Long unpickOil;
/**
* 当前已使用油量
*/
@ApiField("use_oil")
private Long useOil;
public void setAccumOil(Long accumOil) {
this.accumOil = accumOil;
}
public Long getAccumOil( ) {
return this.accumOil;
}
public void setCurrentOil(Long currentOil) {
this.currentOil = currentOil;
}
public Long getCurrentOil( ) {
return this.currentOil;
}
public void setTotalOil(Long totalOil) {
this.totalOil = totalOil;
}
public Long getTotalOil( ) {
return this.totalOil;
}
public void setUnpickOil(Long unpickOil) {
this.unpickOil = unpickOil;
}
public Long getUnpickOil( ) {
return this.unpickOil;
}
public void setUseOil(Long useOil) {
this.useOil = useOil;
}
public Long getUseOil( ) {
return this.useOil;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
455a86cc25693e410255fe642bd8cf6073be71e4
|
39ae22aec150d1199605701e20b3b7cc9daa330e
|
/ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/BuildSVNInformationExtension.java
|
d8db6438ff6762ce9b6cff0a95d36f7077bfe05b
|
[
"MIT"
] |
permissive
|
marcomaccio/ontrack
|
26a10761022f8a43dde76511ef5fb5cd7bb15fec
|
fe82785cc68b26ccbdf17961e159cdbf05838841
|
refs/heads/master
| 2021-01-16T23:10:06.080297
| 2015-11-02T18:18:57
| 2015-11-02T18:18:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,417
|
java
|
package net.nemerosa.ontrack.extension.svn;
import net.nemerosa.ontrack.extension.api.EntityInformationExtension;
import net.nemerosa.ontrack.extension.support.AbstractExtension;
import net.nemerosa.ontrack.extension.svn.db.SVNRepository;
import net.nemerosa.ontrack.extension.svn.property.SVNBranchConfigurationProperty;
import net.nemerosa.ontrack.extension.svn.property.SVNBranchConfigurationPropertyType;
import net.nemerosa.ontrack.extension.svn.property.SVNProjectConfigurationProperty;
import net.nemerosa.ontrack.extension.svn.property.SVNProjectConfigurationPropertyType;
import net.nemerosa.ontrack.extension.svn.service.SVNChangeLogService;
import net.nemerosa.ontrack.extension.svn.service.SVNService;
import net.nemerosa.ontrack.model.structure.Build;
import net.nemerosa.ontrack.model.structure.ProjectEntity;
import net.nemerosa.ontrack.model.structure.Property;
import net.nemerosa.ontrack.model.structure.PropertyService;
import net.nemerosa.ontrack.tx.Transaction;
import net.nemerosa.ontrack.tx.TransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Optional;
/**
* This {@link net.nemerosa.ontrack.extension.api.EntityInformationExtension extension} adds some information
* about the SVN source for a build.
*/
@Component
public class BuildSVNInformationExtension extends AbstractExtension implements EntityInformationExtension {
private final PropertyService propertyService;
private final SVNService svnService;
private final SVNChangeLogService svnChangeLogService;
private final TransactionService transactionService;
@Autowired
public BuildSVNInformationExtension(
SVNExtensionFeature extensionFeature,
PropertyService propertyService,
SVNService svnService,
SVNChangeLogService svnChangeLogService,
TransactionService transactionService) {
super(extensionFeature);
this.propertyService = propertyService;
this.svnService = svnService;
this.svnChangeLogService = svnChangeLogService;
this.transactionService = transactionService;
}
@Override
public Optional<Object> getInformation(ProjectEntity entity) {
if (entity instanceof Build) {
Build build = (Build) entity;
// Gets the branch SVN information
Property<SVNBranchConfigurationProperty> branchConfigurationProperty = propertyService.getProperty(build.getBranch(), SVNBranchConfigurationPropertyType.class);
Property<SVNProjectConfigurationProperty> projectConfigurationProperty = propertyService.getProperty(build.getBranch().getProject(), SVNProjectConfigurationPropertyType.class);
if (branchConfigurationProperty.isEmpty() || projectConfigurationProperty.isEmpty()) {
return Optional.empty();
} else {
// Loads the repository
SVNRepository repository = svnService.getRepository(projectConfigurationProperty.getValue().getConfiguration().getName());
// Gets the build history
try (Transaction ignored = transactionService.start()) {
return Optional.of(svnChangeLogService.getBuildSVNHistory(repository, build));
}
}
} else {
return Optional.empty();
}
}
}
|
[
"damien.coraboeuf@gmail.com"
] |
damien.coraboeuf@gmail.com
|
b634983a2e11a139f7fa326ccec846e578cae374
|
308dadb6c6558acc0bb9c0aecb869c1a8996476e
|
/src/main/java/io/changsoft/emwalimu/schoolmis/domain/FeePaymentDetail.java
|
f0cd94572c0cbe09aa74adc3b094fb5a18746c5c
|
[] |
no_license
|
chang-ngeno/emwalimu-bootify
|
8a5862c5856e1b53695e99dda5a77a1aee79c907
|
dcb3fdcb07101011263f8e28455fbe26c0435ed8
|
refs/heads/master
| 2023-08-01T23:37:30.966362
| 2021-10-05T20:42:20
| 2021-10-05T20:42:20
| 413,972,275
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,707
|
java
|
package io.changsoft.emwalimu.schoolmis.domain;
import java.time.OffsetDateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
import javax.persistence.SequenceGenerator;
@Entity
public class FeePaymentDetail {
@Id
@Column(nullable = false, updatable = false)
@SequenceGenerator(
name = "primary_sequence",
sequenceName = "primary_sequence",
allocationSize = 1,
initialValue = 10000
)
@GeneratedValue(
strategy = GenerationType.SEQUENCE,
generator = "primary_sequence"
)
private Long id;
@Column(nullable = false)
private Double amount;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "fee_payment_id", nullable = false)
private FeePayment feePayment;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "fee_invoice_detail_id", nullable = false)
private FeeInvoiceDetail feeInvoiceDetail;
@Column(nullable = false, updatable = false)
private OffsetDateTime dateCreated;
@Column(nullable = false)
private OffsetDateTime lastUpdated;
@PrePersist
public void prePersist() {
dateCreated = OffsetDateTime.now();
lastUpdated = dateCreated;
}
@PreUpdate
public void preUpdate() {
lastUpdated = OffsetDateTime.now();
}
public Long getId() {
return id;
}
public void setId(final Long id) {
this.id = id;
}
public Double getAmount() {
return amount;
}
public void setAmount(final Double amount) {
this.amount = amount;
}
public FeePayment getFeePayment() {
return feePayment;
}
public void setFeePayment(final FeePayment feePayment) {
this.feePayment = feePayment;
}
public FeeInvoiceDetail getFeeInvoiceDetail() {
return feeInvoiceDetail;
}
public void setFeeInvoiceDetail(final FeeInvoiceDetail feeInvoiceDetail) {
this.feeInvoiceDetail = feeInvoiceDetail;
}
public OffsetDateTime getDateCreated() {
return dateCreated;
}
public void setDateCreated(final OffsetDateTime dateCreated) {
this.dateCreated = dateCreated;
}
public OffsetDateTime getLastUpdated() {
return lastUpdated;
}
public void setLastUpdated(final OffsetDateTime lastUpdated) {
this.lastUpdated = lastUpdated;
}
}
|
[
"danchangmasa@gmail.com"
] |
danchangmasa@gmail.com
|
c81b66bb9eccba4d107b7ce9c7af3793e2a97d1f
|
0fddaec8e389712107e99fb40a32903809416d7d
|
/plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/connection/DBPAuthInfo.java
|
b6659da788ee3e81b9ce5b7810a889041422c2a0
|
[
"EPL-1.0",
"Apache-2.0",
"LGPL-2.0-or-later"
] |
permissive
|
kai-morich/dbeaver
|
83dce3057f510fe110380300c7eb51e5d5b5de21
|
0694ed136ddf089a5a01a0ceebd6e67585a7b2ee
|
refs/heads/devel
| 2022-02-19T00:07:03.733415
| 2022-02-11T14:35:37
| 2022-02-11T14:35:37
| 255,131,238
| 4
| 0
|
Apache-2.0
| 2020-04-12T17:08:35
| 2020-04-12T17:08:34
| null |
UTF-8
|
Java
| false
| false
| 1,602
|
java
|
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2022 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.model.connection;
/**
* Auth info
*/
public class DBPAuthInfo {
private String userName;
private String userPassword;
private boolean savePassword;
public DBPAuthInfo() {
}
public DBPAuthInfo(String userName, String userPassword, boolean savePassword) {
this.userName = userName;
this.userPassword = userPassword;
this.savePassword = savePassword;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserPassword() {
return userPassword;
}
public void setUserPassword(String userPassword) {
this.userPassword = userPassword;
}
public boolean isSavePassword() {
return savePassword;
}
public void setSavePassword(boolean savePassword) {
this.savePassword = savePassword;
}
}
|
[
"serge@jkiss.org"
] |
serge@jkiss.org
|
5c595ad6bb2ee7d42fd4b61098ad22e7d0e56ae3
|
75c4712ae3f946db0c9196ee8307748231487e4b
|
/src/main/java/com/alipay/api/domain/AlipayDataAiserviceCloudbusMetroodQueryModel.java
|
7cc6aa325827e950fa08eefec90f02ce3873d47c
|
[
"Apache-2.0"
] |
permissive
|
yuanbaoMarvin/alipay-sdk-java-all
|
70a72a969f464d79c79d09af8b6b01fa177ac1be
|
25f3003d820dbd0b73739d8e32a6093468d9ed92
|
refs/heads/master
| 2023-06-03T16:54:25.138471
| 2021-06-25T14:48:21
| 2021-06-25T14:48:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,193
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 智慧公交---地铁OD
*
* @author auto create
* @since 1.0, 2020-10-21 10:34:52
*/
public class AlipayDataAiserviceCloudbusMetroodQueryModel extends AlipayObject {
private static final long serialVersionUID = 6467995275427558628L;
/**
* 接口版本号
*/
@ApiField("app_version")
private String appVersion;
/**
* 市
*/
@ApiField("city_code")
private String cityCode;
/**
* 结束时间
*/
@ApiField("end_date")
private String endDate;
/**
* 进出站 0:进站 1:出站
*/
@ApiField("is_out")
private Long isOut;
/**
* 商户ID
*/
@ApiField("partner_id")
private String partnerId;
/**
* 开始年月
*/
@ApiField("start_date")
private String startDate;
/**
* 站点名称
*/
@ApiField("station_id")
private String stationId;
/**
* 操作类型: 0:普通(默认) 1:潜在
*/
@ApiField("type")
private Long type;
public String getAppVersion() {
return this.appVersion;
}
public void setAppVersion(String appVersion) {
this.appVersion = appVersion;
}
public String getCityCode() {
return this.cityCode;
}
public void setCityCode(String cityCode) {
this.cityCode = cityCode;
}
public String getEndDate() {
return this.endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public Long getIsOut() {
return this.isOut;
}
public void setIsOut(Long isOut) {
this.isOut = isOut;
}
public String getPartnerId() {
return this.partnerId;
}
public void setPartnerId(String partnerId) {
this.partnerId = partnerId;
}
public String getStartDate() {
return this.startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getStationId() {
return this.stationId;
}
public void setStationId(String stationId) {
this.stationId = stationId;
}
public Long getType() {
return this.type;
}
public void setType(Long type) {
this.type = type;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
d543f4ea98ae2e1978da54fa9bfa040b8ea810ca
|
eeaeddeab4775a1742dba5c8898686fd38caf669
|
/tests/src/test/java/com/demo/MethodOverloadTests.java
|
602f96592d1e20ded6297d86d3b3bcb244480de0
|
[
"Apache-2.0"
] |
permissive
|
MasterOogwayis/spring
|
8250dddd5d6ee9730c8aec4a7aeab1b80c3bf750
|
c9210e8d3533982faa3e7b89885fd4c54f27318e
|
refs/heads/master
| 2023-07-23T09:49:37.930908
| 2023-07-21T03:04:27
| 2023-07-21T03:04:27
| 89,329,352
| 0
| 0
|
Apache-2.0
| 2023-06-14T22:51:13
| 2017-04-25T07:13:03
|
Java
|
UTF-8
|
Java
| false
| false
| 480
|
java
|
package com.demo;
/**
* @author ZhangShaowei on 2021/9/2 13:59
*/
public class MethodOverloadTests {
public static void main(String[] args) {
invoke(null, 1);
invoke(null, 1, 2);
invoke(null, new Object[]{1});
}
private static void invoke(Object obj, Object... args) {
System.out.println("method 0");
}
private static void invoke(String str, Object obj, Object... args) {
System.out.println("method 1");
}
}
|
[
"499504777@qq.com"
] |
499504777@qq.com
|
adbddd185430f45d26f173702523ff27fe43c434
|
61602d4b976db2084059453edeafe63865f96ec5
|
/com/xunlei/downloadprovider/member/payment/paymentfloat/k.java
|
3a313a269ce24917dd03f3209179572a791151c7
|
[] |
no_license
|
ZoranLi/thunder
|
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
|
0778679ef03ba1103b1d9d9a626c8449b19be14b
|
refs/heads/master
| 2020-03-20T23:29:27.131636
| 2018-06-19T06:43:26
| 2018-06-19T06:43:26
| 137,848,886
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 644
|
java
|
package com.xunlei.downloadprovider.member.payment.paymentfloat;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
/* compiled from: FloatFragment */
final class k implements AnimationListener {
final /* synthetic */ FloatFragment a;
public final void onAnimationRepeat(Animation animation) {
}
k(FloatFragment floatFragment) {
this.a = floatFragment;
}
public final void onAnimationStart(Animation animation) {
this.a.b.setVisibility(8);
}
public final void onAnimationEnd(Animation animation) {
this.a.b.setVisibility(0);
}
}
|
[
"lizhangliao@xiaohongchun.com"
] |
lizhangliao@xiaohongchun.com
|
cb10858dba422a52401448717dbaa389f4a1cafe
|
6390179cecf6d11b7c98a0b3566f9789f6d1f807
|
/java/sub_mod/techne_block/ProxyClient.java
|
cc24c698efdcba3be21161effe8ef3ec2284f797
|
[] |
no_license
|
timaxa007/sub_mod_techne_block_1_7_10
|
d85e556f92cadbf679660cd189af5bf57fc2ed8a
|
c4c24e46a7f55ba6d44008668f318a9b41720e04
|
refs/heads/master
| 2021-01-18T05:31:23.777768
| 2015-04-22T12:15:30
| 2015-04-22T12:15:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 552
|
java
|
package sub_mod.techne_block;
import net.minecraft.item.Item;
import net.minecraftforge.client.MinecraftForgeClient;
import cpw.mods.fml.client.registry.ClientRegistry;
public class ProxyClient extends ProxyCommon {
public void preInit() {
super.preInit();
}
public void init() {
super.init();
//Blocks
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTechne.class, new RenderTileEntityTechne());
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlockTechne.block_techne), new RenderItemBlockTechne());
}
}
|
[
"timaxa007@gmail.com"
] |
timaxa007@gmail.com
|
2a990e74cdae427c1337c8664ac4b77cc0163ac8
|
def8890dd7b3198e258ec564a25385e1f484aa45
|
/core/modules/rocketmq/src/test/java/org/onetwo/common/rocketmq/ProductProduerTest.java
|
04106149ac2d281809d25400f20c51bd5d0bd7a0
|
[] |
no_license
|
danshiyu/onetwo
|
69dd65432fbee7d507c5e889f01efd97dd7fecb9
|
2db903f42006d42d35de80d46b82e8b6925a947c
|
refs/heads/master
| 2021-01-15T14:23:38.885122
| 2016-08-11T03:24:38
| 2016-08-11T03:24:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 853
|
java
|
package org.onetwo.common.rocketmq;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onetwo.common.rocketmq.producer.RocketMQProducerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
//@ContextConfiguration("classpath:applicationContext-mq-test.xml")
@ContextConfiguration(classes=MQProducerContextTestConfig.class)
@RunWith(SpringJUnit4ClassRunner.class)
public class ProductProduerTest {
@Autowired
private RocketMQProducerService rocketMQProducerService;
@Test
public void testSendMessage(){
rocketMQProducerService.sendMessage("product", "index-update", 2L);
// rocketMQProducerService.sendMessage(MQTopic.PRODUCT.name(), MQTag.UPDATE_INDEX.name(), 2L);
}
}
|
[
"weishao.zeng@gmail.com"
] |
weishao.zeng@gmail.com
|
0d67d27707496a3ce8c5c93597f6b34caea0b506
|
cfb1d3a92679766d1f4568d3a7006dd4af288d28
|
/src/PaytmAssignment.java
|
388440016a7316c1b08a5abc5340f950e9e507c3
|
[] |
no_license
|
Falguni1993/Selenium
|
bf0d4089548c6d53cd12794f2a4bbf1d881cd342
|
e447c50026d1c8fa0cbf33c6da1fc83ecf5737cc
|
refs/heads/master
| 2023-04-06T11:24:36.323630
| 2021-04-08T18:17:50
| 2021-04-08T18:17:50
| 356,009,562
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,186
|
java
|
import java.awt.Desktop.Action;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class PaytmAssignment {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver","C:\\Users\\DELL\\Desktop\\Selenium\\chromedriver_win32\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
//driver.manage().window().maximize();
driver.get("https://paytm.com/");
//how many iframes you have
//put explicit wait for food wallet
//click on login
//Actions act= new Actions(driver);
//act.sendKeys(Keys.PAGE_UP).build().perform();
List<WebElement> allFrames = driver.findElements(By.tagName("iframe"));
System.out.println("Total iFrames"+ allFrames.size());
for(int i=0; i< allFrames.size();i++)
{
driver.switchTo().frame(i);
System.out.println(driver.findElements(By.xpath("//input[@name='username']")).size());
System.out.println(driver.findElements(By.xpath("//span[text()='Login/Signup with mobile number and password']")).size());
driver.switchTo().defaultContent();
}
driver.findElement(By.xpath("//div[text()='Log In/Sign Up']")).click();
//WebDriverWait wait =new WebDriverWait(driver,20);
// wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//span[text()='Login/Signup with mobile number and password']")));
Thread.sleep(5000);
driver.switchTo().frame(0);
driver.findElement(By.xpath("//span[text()='Login/Signup with mobile number and password']")).click();
driver.findElement(By.xpath("//input[@name='username']")).sendKeys("9766110866");
driver.findElement(By.xpath("//input[@name='password']")).sendKeys("reebok87");
driver.findElement(By.xpath("//span[@class='ng-scope']")).click();
}
}
|
[
"DELL@DELL-PC"
] |
DELL@DELL-PC
|
457e2171b9ddfa8e8b7e9911127a017e8a509fb6
|
5252a00843c6082d739d7a00142525fff0a2f3e7
|
/zoeeasy-cloud-platform/zoeeasy-cloud-modules/zoeeasy-cloud-invoice/zoeeasy-cloud-invoice-dao/src/main/java/com/zoeeasy/cloud/invoice/domain/InvoiceApplyEntity.java
|
7352b95ce05762c9b8d5a7ec4d986a7e9f0aada7
|
[] |
no_license
|
P79N6A/parking
|
be8dc0ae6394096ec49faa89521d723425a5c965
|
6e3ea14312edc7487f725f2df315de989eaabb10
|
refs/heads/master
| 2020-05-07T22:07:03.790311
| 2019-04-12T03:06:26
| 2019-04-12T03:06:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,233
|
java
|
package com.zoeeasy.cloud.invoice.domain;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
import com.scapegoat.infrastructure.core.entities.auditing.FullAuditedEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* 发票申请表(inv_invoice_apply)表实体类
*
* @author AkeemSuper
* @date 2019-02-20 17:31:09
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("inv_invoice_apply")
public class InvoiceApplyEntity extends FullAuditedEntity<Long> implements Serializable {
/**
* id
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 用户ID
*/
@TableField("customerUserId")
private Long customerUserId;
/**
* 申请订单号
*/
@TableField("applyNo")
private String applyNo;
/**
* 申请时间
*/
@TableField("applyTime")
private Date applyTime;
/**
* 发票类型 1:电子发票 2:纸质发票
*/
@TableField("invoiceType")
private Integer invoiceType;
/**
* 抬头类型 1:单位 2:个人
*/
@TableField("headerType")
private Integer headerType;
/**
* 发票内容类型 1:类别 2:明细
*/
@TableField("contentType")
private Integer contentType;
/**
* 购方名称,单位抬头为单位名称,个人抬头为个人
*/
@TableField("buyerName")
private String buyerName;
/**
* 购方税号
*/
@TableField("taxNumber")
private String taxNumber;
/**
* 银行账号
*/
@TableField("account")
private String account;
/**
* 购方电话
*/
@TableField("telephone")
private String telephone;
/**
* 购方地址
*/
@TableField("address")
private String address;
/**
* 开票金额(分)
*/
@TableField("invoiceAmount")
private Integer invoiceAmount;
/**
* 购方手机(开票成功会短信提醒购方)
*/
@TableField("phoneNumber")
private String phoneNumber;
/**
* 收件人姓名
*/
@TableField("receiverName")
private String receiverName;
/**
* 省代码
*/
@TableField("provinceCode")
private String provinceCode;
/**
* 市代码
*/
@TableField("cityCode")
private String cityCode;
/**
* 区代码
*/
@TableField("countyCode")
private String countyCode;
/**
* 地址
*/
@TableField("receiverAddress")
private String receiverAddress;
/**
* 运费支付方式 (1 :用户支付 2:包邮 3:到付)
*/
@TableField("expressType")
private Integer expressType;
/**
* 运费
*/
@TableField("expressAmount")
private Integer expressAmount;
/**
* 支付状态 0 :未支付 1:已支付 2:支付中
*/
@TableField("payStatus")
private Integer payStatus;
/**
* 支付金额(分)
*/
@TableField("payedAmount")
private Integer payedAmount;
/**
* 支付时间
*/
@TableField("payTime")
private Date payTime;
/**
* 支付订单号
*/
@TableField("payOrderNo")
private String payOrderNo;
/**
* 支付用户ID
*/
@TableField("payedUserId")
private Long payedUserId;
/**
* 支付方式(根据PayWayEnum)
*/
@TableField("payWay")
private Integer payWay;
/**
* 支付类型(根据PayTypeEnum)
*/
@TableField("payType")
private Integer payType;
/**
* 开票状态
*/
@TableField("status")
private Integer status;
/**
* 完成时间
*/
@TableField("completeTime")
private Date completeTime;
/**
* 开票订单数
*/
@TableField("orderCount")
private Integer orderCount;
/**
* 备注
*/
@TableField("remark")
private String remark;
/**
* 创建者
*/
@TableField(value = "creatorUserId", fill = FieldFill.INSERT)
protected Long creatorUserId;
/**
* 创建日期
*/
@TableField(value = "creationTime", fill = FieldFill.INSERT)
protected Date creationTime;
/**
* 更新者
*/
@TableField(value = "lastModifierUserId", fill = FieldFill.INSERT_UPDATE)
protected Long lastModifierUserId;
/**
* 更新日期
*/
@TableField(value = "lastModificationTime", fill = FieldFill.INSERT_UPDATE)
protected Date lastModificationTime;
/**
* 删除者
*/
@TableField(value = "deleterUserId", fill = FieldFill.UPDATE)
protected Long deleterUserId;
/**
* 删除日期
*/
@TableField(value = "deletionTime", fill = FieldFill.UPDATE)
protected Date deletionTime;
/**
* 删除标记(0:正常;1:删除 )
*/
@TableField(value = "deleted", fill = FieldFill.INSERT)
@TableLogic
protected Integer deleted;
}
|
[
"xuqinghuo@126.com"
] |
xuqinghuo@126.com
|
8f5ffef371b460914772e80385a6bc5b5f5e1c2b
|
2f0fd635d1de3bed6cc6357b67107968833fa595
|
/xiaomall-mgb/src/main/java/com/xiao/xiaomall/entity/SmsFlashPromotionLog.java
|
149bf2c0e8ca535a34cab9df410440a622dbf82a
|
[] |
no_license
|
xrqing/xiaoMall
|
d28c9b5c59ab8a71a3c16c77f5c52bdb019ccafd
|
c13af58dd69f3294329286927dc4e77e1826f002
|
refs/heads/master
| 2022-06-26T22:41:38.125845
| 2019-07-19T12:56:31
| 2019-07-19T12:56:31
| 194,498,525
| 0
| 0
| null | 2022-06-21T01:27:52
| 2019-06-30T09:31:43
|
Java
|
UTF-8
|
Java
| false
| false
| 2,331
|
java
|
package com.xiao.xiaomall.entity;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
public class SmsFlashPromotionLog implements Serializable {
private Integer id;
private Integer memberId;
private Long productId;
private String memberPhone;
private String productName;
@ApiModelProperty(value = "会员订阅时间")
private Date subscribeTime;
private Date sendTime;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getMemberId() {
return memberId;
}
public void setMemberId(Integer memberId) {
this.memberId = memberId;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getMemberPhone() {
return memberPhone;
}
public void setMemberPhone(String memberPhone) {
this.memberPhone = memberPhone;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public Date getSubscribeTime() {
return subscribeTime;
}
public void setSubscribeTime(Date subscribeTime) {
this.subscribeTime = subscribeTime;
}
public Date getSendTime() {
return sendTime;
}
public void setSendTime(Date sendTime) {
this.sendTime = sendTime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", memberId=").append(memberId);
sb.append(", productId=").append(productId);
sb.append(", memberPhone=").append(memberPhone);
sb.append(", productName=").append(productName);
sb.append(", subscribeTime=").append(subscribeTime);
sb.append(", sendTime=").append(sendTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
|
[
"2978183194@qq.com"
] |
2978183194@qq.com
|
c64cec3c64e573db7d90ccf47d55c138a14afb4a
|
fd431c99a3cefebe3556fa30ce3768f904128496
|
/HtProject/src/com/system/dao/SpTroneApiDao.java
|
a6f153c5ae5361a4a1c87bbca8ee324c07d9b21b
|
[] |
no_license
|
liushengmz/scpc
|
d2140cb24d0af16c39e4fef4c0cd1422b144e238
|
f760bf2c3b1ec45fd06d0d89018a3bfae3c9748c
|
refs/heads/master
| 2021-06-19T15:49:59.928248
| 2018-10-16T08:24:18
| 2018-10-16T08:24:18
| 95,423,982
| 2
| 4
| null | 2017-06-28T02:35:14
| 2017-06-26T08:13:22
| null |
UTF-8
|
Java
| false
| false
| 5,038
|
java
|
package com.system.dao;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.system.constant.Constant;
import com.system.database.JdbcControl;
import com.system.database.QueryCallBack;
import com.system.model.SpTroneApiModel;
import com.system.util.StringUtil;
public class SpTroneApiDao
{
@SuppressWarnings("unchecked")
public List<SpTroneApiModel> loadSpTroneApi()
{
String sql = "select * from " + com.system.constant.Constant.DB_DAILY_CONFIG + ".tbl_sp_trone_api";
return (List<SpTroneApiModel>)new JdbcControl().query(sql, new QueryCallBack()
{
@Override
public Object onCallBack(ResultSet rs) throws SQLException
{
List<SpTroneApiModel> list = new ArrayList<SpTroneApiModel>();
SpTroneApiModel model = null;
while(rs.next())
{
model = new SpTroneApiModel();
model.setId(rs.getInt("id"));
model.setName(StringUtil.getString(rs.getString("name"), ""));
model.setMatchField(rs.getInt("match_field"));
model.setMatchKeyword(StringUtil.getString(rs.getString("match_keyword"), ""));
model.setApiFields(StringUtil.getString(rs.getString("api_fields"), ""));
model.setLocateMatch(rs.getInt("locate_match"));
list.add(model);
}
return list;
}
});
}
public Map<String, Object> loadSpTroneApi(int pageIndex,String keyWord)
{
String sql = "select " + Constant.CONSTANT_REPLACE_STRING + " from " + com.system.constant.Constant.DB_DAILY_CONFIG + ".tbl_sp_trone_api where 1=1 ";
String limit = " limit " + Constant.PAGE_SIZE*(pageIndex-1) + "," + Constant.PAGE_SIZE;
if(!StringUtil.isNullOrEmpty(keyWord))
{
sql += " AND name LIKE '%" + keyWord + "%' ";
}
Map<String, Object> map = new HashMap<String, Object>();
sql += " order by id desc ";
JdbcControl control = new JdbcControl();
map.put("rows",control.query(sql.replace(Constant.CONSTANT_REPLACE_STRING, " count(*) "), new QueryCallBack()
{
@Override
public Object onCallBack(ResultSet rs) throws SQLException
{
if(rs.next())
return rs.getInt(1);
return 0;
}
}));
map.put("list", control.query(sql.replace(Constant.CONSTANT_REPLACE_STRING, " * ") + limit, new QueryCallBack()
{
@Override
public Object onCallBack(ResultSet rs) throws SQLException
{
List<SpTroneApiModel> list = new ArrayList<SpTroneApiModel>();
while(rs.next())
{
SpTroneApiModel model = new SpTroneApiModel();
model.setId(rs.getInt("id"));
model.setName(StringUtil.getString(rs.getString("name"), ""));
model.setMatchField(rs.getInt("match_field"));
model.setMatchKeyword(StringUtil.getString(rs.getString("match_keyword"), ""));
model.setApiFields(StringUtil.getString(rs.getString("api_fields"), ""));
model.setLocateMatch(rs.getInt("locate_match"));
list.add(model);
}
return list;
}
}));
return map;
}
public SpTroneApiModel getSpTroneApiById(int id)
{
String sql = "select * from " + com.system.constant.Constant.DB_DAILY_CONFIG + ".tbl_sp_trone_api where id = " + id;
return (SpTroneApiModel)new JdbcControl().query(sql, new QueryCallBack()
{
@Override
public Object onCallBack(ResultSet rs) throws SQLException
{
if(rs.next())
{
SpTroneApiModel model = new SpTroneApiModel();
model.setId(rs.getInt("id"));
model.setName(StringUtil.getString(rs.getString("name"), ""));
model.setMatchField(rs.getInt("match_field"));
model.setMatchKeyword(StringUtil.getString(rs.getString("match_keyword"), ""));
model.setApiFields(StringUtil.getString(rs.getString("api_fields"), ""));
model.setLocateMatch(rs.getInt("locate_match"));
return model;
}
return null;
}
});
}
public boolean addSpTroneApiModel(SpTroneApiModel model)
{
String sql = "insert into " + com.system.constant.Constant.DB_DAILY_CONFIG + ".tbl_sp_trone_api(name,match_field,match_keyword,api_fields,"
+ "locate_match) values(?,?,?,?,?)";
Map<Integer, Object> map = new HashMap<Integer, Object>();
map.put(1, model.getName());
map.put(2, model.getMatchField());
map.put(3, model.getMatchKeyword());
map.put(4, model.getApiFields());
map.put(5, model.getLocateMatch());
return new JdbcControl().execute(sql, map);
}
public boolean updateSpTroneApiModel(SpTroneApiModel model)
{
String sql = "update " + com.system.constant.Constant.DB_DAILY_CONFIG + ".tbl_sp_trone_api set name = ?,match_field = ?,match_keyword = ?,api_fields = ?,"
+ "locate_match = ? where id = ?";
Map<Integer, Object> map = new HashMap<Integer, Object>();
map.put(1, model.getName());
map.put(2, model.getMatchField());
map.put(3, model.getMatchKeyword());
map.put(4, model.getApiFields());
map.put(5, model.getLocateMatch());
map.put(6, model.getId());
return new JdbcControl().execute(sql, map);
}
}
|
[
"liushengmz@163.com"
] |
liushengmz@163.com
|
79b5ea3d29909fb87b385ddca220246c32905dae
|
a01eaed695583aad70bd7e1da1af0ec736c7bf22
|
/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/widgets/DateTimeEntry.java
|
e0cd1ddc0bc47b4017044fe910018fd7572da295
|
[] |
no_license
|
SeanTheGuyThatAlwaysHasComputerTrouble/awips2
|
600d3e6f7ea1b488471e387c642d54cb6eebca1a
|
c8f8c20ca34e41ac23ad8e757130e91c77b558fe
|
refs/heads/master
| 2021-01-19T18:00:12.598133
| 2013-03-26T17:06:45
| 2013-03-26T17:06:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,829
|
java
|
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.ui.widgets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import com.raytheon.viz.ui.UiPlugin;
import com.raytheon.viz.ui.dialogs.AwipsCalendar;
/**
* Date/Time entry widget with read-only text and button to pop up and editable
* dialog to enter the date and time.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 6, 2012 randerso Initial creation
*
* </pre>
*
* @author randerso
* @version 1.0
*/
public class DateTimeEntry extends Composite {
/**
* Interface for a listener to receive notification when a DateTimeEntry
* widget is updated
*/
public static interface IUpdateListener {
/**
* Called when the associated DateTimeEntry widget is updated.
*
* @param date
* the newly updated date
*/
public void dateTimeUpdated(Date date);
}
private static String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
private SimpleDateFormat sdf;
private String dateFormat;
private Date date;
private Text text;
private ListenerList listeners;
/**
* Construct a DateTimeEnty widget
*
* @param parent
*/
public DateTimeEntry(Composite parent) {
super(parent, SWT.NONE);
dateFormat = DEFAULT_DATE_FORMAT;
sdf = new SimpleDateFormat(dateFormat);
date = new Date();
listeners = new ListenerList();
GridLayout layout = new GridLayout(2, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.horizontalSpacing = 0;
setLayout(layout);
text = new Text(this, SWT.BORDER | SWT.READ_ONLY);
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
text.setLayoutData(layoutData);
Button button = new Button(this, SWT.PUSH);
ImageDescriptor imageDesc = UiPlugin
.getImageDescriptor("icons/calendar.gif");
Image image = imageDesc.createImage();
button.setImage(image);
image.dispose();
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
int fieldCount = getFieldCount();
AwipsCalendar dlg = new AwipsCalendar(getShell(), date,
fieldCount);
dlg.setTimeZone(sdf.getTimeZone());
Date selectedDate = (Date) dlg.open();
if (selectedDate != null) {
updateDate(selectedDate);
}
}
});
updateDate(this.date);
}
private int getFieldCount() {
int fieldCount = 0;
if (dateFormat.contains("s")) {
fieldCount = 3;
} else if (dateFormat.contains("m")) {
fieldCount = 2;
} else if (dateFormat.contains("h") || dateFormat.contains("H")) {
fieldCount = 1;
}
return fieldCount;
}
private void updateDate(Date date) {
text.setText(sdf.format(date));
try {
this.date = sdf.parse(text.getText());
} catch (ParseException e) {
// should never happen since we just formatted the string
// using the same SimpleDateFormat
}
fireUpdateListeners(this.date);
}
/**
* Sets the date format string used to format the date/time string for
* display
*
* @param dateFormat
* the date format string see {@link SimpleDateFormat} for more
* information.
*/
public void setDateFormat(String dateFormat) {
this.dateFormat = dateFormat;
this.sdf.applyPattern(dateFormat);
updateDate(date);
}
/**
* Sets the time zone used to format the date/time string for display
*
* @param tz
* the time zone
*/
public void setTimeZone(TimeZone tz) {
sdf.setTimeZone(tz);
updateDate(date);
}
/**
* Sets the contents of the receiver to the given date
*
* @param date
* the date
*/
public void setDate(Date date) {
updateDate(date);
}
/**
* Retrieve the date from the widget
*
* @return the date
*/
public Date getDate() {
return this.date;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.swt.widgets.Control#setEnabled(boolean)
*/
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
for (Control c : getChildren()) {
c.setEnabled(enabled);
}
}
/**
* Add a listener to be called when this widget is updated.
*
* @param listener
*/
public void addUpdateListener(IUpdateListener listener) {
listeners.add(listener);
}
/**
* Remove a listener
*
* @param listener
*/
public void removeUpdateListener(IUpdateListener listener) {
listeners.remove(listener);
}
/**
* Notify listeners of the updated date
*
* @param date
* the updated date
*/
private void fireUpdateListeners(Date date) {
for (Object listener : listeners.getListeners()) {
((IUpdateListener) listener).dateTimeUpdated(date);
}
}
}
|
[
"Steven_L_Harris@raytheon.com"
] |
Steven_L_Harris@raytheon.com
|
afc20ae8448b7390906975aa17b5495e25855728
|
b9dc3412091788527896fe0bd80a318570aa341c
|
/src/main/java/com/tcsb/platformcoupon/service/TcsbPlatformCouponServiceI.java
|
37c7e446d7da3113fd77be528e6b1207e883dbdd
|
[] |
no_license
|
zhengwangfeng/ddmshopv2
|
f23fc64e6d498c33f5ec69c31b9838921443a549
|
2a70060fea3429b4081bf22c3df9c7fec0130245
|
refs/heads/master
| 2020-03-09T05:48:57.763427
| 2018-04-08T09:18:15
| 2018-04-08T09:18:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 505
|
java
|
package com.tcsb.platformcoupon.service;
import com.tcsb.platformcoupon.entity.TcsbPlatformCouponEntity;
import org.jeecgframework.core.common.service.CommonService;
import java.io.Serializable;
public interface TcsbPlatformCouponServiceI extends CommonService{
public void delete(TcsbPlatformCouponEntity entity) throws Exception;
public Serializable save(TcsbPlatformCouponEntity entity) throws Exception;
public void saveOrUpdate(TcsbPlatformCouponEntity entity) throws Exception;
}
|
[
"610020687@qq.com"
] |
610020687@qq.com
|
d1d1a22c0365655ea6f29f3fa0c4d9b55c4d0967
|
eeb22578797713dd4ed685ab1bac3580b88abe9a
|
/kernel-api/src/main/java/io/zephyr/api/Configurable.java
|
c1da30b95a7bcb4eecfd94854c5c89b92b1c65a3
|
[
"MIT"
] |
permissive
|
sunshower-io/zephyr
|
658375274db071aae05037b790fad94dfe355ab2
|
5735b0366a8a1bd503f02776b160a593ec007d28
|
refs/heads/main
| 2023-08-17T15:51:16.625538
| 2022-10-03T21:45:29
| 2022-10-03T21:45:29
| 222,530,720
| 60
| 6
|
MIT
| 2023-08-23T17:55:15
| 2019-11-18T19:46:19
|
Java
|
UTF-8
|
Java
| false
| false
| 259
|
java
|
package io.zephyr.api;
public interface Configurable<T extends Configuration> {
T getConfiguration();
void setConfiguration(T configuration);
void updateConfiguration(T configuration);
void save();
void restore(Configuration configuration);
}
|
[
"josiah.haswell@gmail.com"
] |
josiah.haswell@gmail.com
|
85bb13900c034e897ac23c82fe8765955f08aebc
|
24525ebc414e22380e2639876d36e6673dff9657
|
/cmpp-core/src/main/java/com/zx/sms/common/util/StandardCharsets.java
|
4aa8d0173fe851c807c85f4c8ff2cd730ae9d3a1
|
[
"Apache-2.0"
] |
permissive
|
yyf736057729/sms
|
a3b172b7b818411a22ccb7baeaeff1647c7cd106
|
02a72c7bbd712782888c3c897d5494d4052f4cc8
|
refs/heads/master
| 2020-04-22T14:19:39.377203
| 2019-02-13T04:30:02
| 2019-02-13T04:30:02
| 170,440,034
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 518
|
java
|
package com.zx.sms.common.util;
import java.nio.charset.Charset;
public class StandardCharsets {
public static final Charset UTF_8 = init("UTF8");
public static final Charset US_ASCII = init("ASCII");
public static final Charset ISO_8859_1 = init("ISO_8859_1");
public static final Charset UTF_16BE = init("UTF_16BE");
private static Charset init(String name){
try{
Charset charset = Charset.forName(name);
return charset;
}catch(Exception e){
e.printStackTrace();
}
return null;
}
}
|
[
"13282810305@163.com"
] |
13282810305@163.com
|
daf94704637f5bd522c9c6122ead73ffab09111f
|
afab90e214f8cb12360443e0877ab817183fa627
|
/bitcamp-java/src/main/java/com/eomcs/corelib/ex08/Exam0150.java
|
d8fd1a34927be4707f4b053ae8ff32e6610a6309
|
[] |
no_license
|
oreoTaste/bitcamp-study
|
40a96ef548bce1f80b4daab0eb650513637b46f3
|
8f0af7cd3c5920841888c5e04f30603cbeb420a5
|
refs/heads/master
| 2020-09-23T14:47:32.489490
| 2020-05-26T09:05:40
| 2020-05-26T09:05:40
| 225,523,347
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,418
|
java
|
// java.util.HashMap - 사용자 정의 데이터 타입을 key로 사용할 경우
package com.eomcs.corelib.ex08;
import java.util.HashMap;
public class Exam0150 {
static class MyKey {
String major;
int no;
public MyKey(String major, int no) {
this.major = major;
this.no = no;
}
@Override
public String toString() {
return "MyKey [major=" + major + ", no=" + no + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((major == null) ? 0 : major.hashCode());
result = prime * result + no;
return result;
}
// equals 날림
}
public static void main(String[] args) {
Member v1 = new Member("홍길동", 20);
Member v2 = new Member("임꺽정", 30);
Member v3 = new Member("유관순", 16);
Member v4 = new Member("안중근", 30);
Member v5 = new Member("윤봉길", 25);
MyKey k1 = new MyKey("컴공", 1);
MyKey k2 = new MyKey("컴공", 2);
MyKey k3 = new MyKey("컴공", 3);
MyKey k4 = new MyKey("컴공", 4);
MyKey k5 = new MyKey("컴공", 5);
HashMap map = new HashMap();
map.put(k1, v1);
map.put(k2, v2);
map.put(k3, v3);
map.put(k4, v4);
map.put(k5, v5);
System.out.println(map.get(k1));
System.out.println(map.get(k2));
System.out.println(map.get(k3));
System.out.println(map.get(k4));
System.out.println(map.get(k5));
MyKey k6 = new MyKey("컴공", 3); // k3와 같은 값을 갖는다.
// 하지만 인스턴스는 다르다!
System.out.println("============");
System.out.println(k3 == k6);
System.out.printf("equals() : %b\n", k3.equals(k6));
System.out.printf("hashCode() : %d %d\n", k3.hashCode(), k5.hashCode());
System.out.println("============");
System.out.println(map.get(k6));
// k3와 k6는 인스턴스가 다르더라도
// hashCode()의 리턴 값이 같고, equals()의 결과가 true이기 때문에
// 같은 key로 간주한다.
//
// 결론!
// - HashMap의 key 객체로 사용할 클래스는 반드시 hashCode()와 equals()를
// 오버라이딩 하여 같은 값을 갖는 경우 같은 해시 값을 리턴하게 하라!
// - 대부분 현업에서는 그냥 String을 key로 사용한다.
// 또는 Wrapper 클래스인 Integer를 사용하기도 한다.
}
}
|
[
"youngkuk.sohn@gmail.com"
] |
youngkuk.sohn@gmail.com
|
483dddba28cabee76e787386dc27a2a69a93a746
|
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
|
/flakiness-predicter/input_data/original_tests/activiti-activiti/nonFlakyMethods/org.activiti.engine.test.bpmn.event.timer.BoundaryTimerNonInterruptingEventTest-testReceiveTaskWithBoundaryTimer.java
|
6fed534a3e1a80e3e576fdc946d484557d89a238
|
[
"BSD-3-Clause"
] |
permissive
|
Taher-Ghaleb/FlakeFlagger
|
6fd7c95d2710632fd093346ce787fd70923a1435
|
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
|
refs/heads/main
| 2023-07-14T16:57:24.507743
| 2021-08-26T14:50:16
| 2021-08-26T14:50:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 921
|
java
|
@Deployment public void testReceiveTaskWithBoundaryTimer(){
HashMap<String,Object> variables=new HashMap<String,Object>();
variables.put("timeCycle","R/PT1H");
ProcessInstance pi=runtimeService.startProcessInstanceByKey("nonInterruptingCycle",variables);
TimerJobQuery jobQuery=managementService.createTimerJobQuery().processInstanceId(pi.getId());
List<Job> jobs=jobQuery.list();
assertEquals(1,jobs.size());
List<Execution> executions=runtimeService.createExecutionQuery().activityId("task").list();
assertEquals(1,executions.size());
List<String> activeActivityIds=runtimeService.getActiveActivityIds(executions.get(0).getId());
assertEquals(2,activeActivityIds.size());
Collections.sort(activeActivityIds);
assertEquals("task",activeActivityIds.get(0));
assertEquals("timer",activeActivityIds.get(1));
runtimeService.trigger(executions.get(0).getId());
assertProcessEnded(pi.getId());
}
|
[
"aalsha2@masonlive.gmu.edu"
] |
aalsha2@masonlive.gmu.edu
|
c8f89ea2aa90577464f2d733acbb510de2d8eb0f
|
6f36fc4a0f9c680553f8dd64c5df55c403f8f2ed
|
/src/main/java/it/csi/siac/siacfinser/integration/dad/oil/CountOrdinativiMifDad.java
|
358c3727b2dfaa4b944cc6a1d36caeaa35e5c2fd
|
[] |
no_license
|
unica-open/siacbilser
|
b46b19fd382f119ec19e4e842c6a46f9a97254e2
|
7de24065c365564b71378ce9da320b0546474130
|
refs/heads/master
| 2021-01-06T13:25:34.712460
| 2020-03-04T08:44:26
| 2020-03-04T08:44:26
| 241,339,144
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 963
|
java
|
/*
*SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte
*SPDX-License-Identifier: EUPL-1.2
*/
package it.csi.siac.siacfinser.integration.dad.oil;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import it.csi.siac.siacfin2ser.model.TipoOrdinativo;
@Component
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
@Transactional
public class CountOrdinativiMifDad extends BaseCountOrdinativiMifDad
{
public int countOrdinativi(int idElaborazione)
{
TipoOrdinativo codiceTipo = getCodiceTipo(idElaborazione);
switch (codiceTipo)
{
case INCASSO:
return ordinativoMifDao.countOrdinativiEntrata(idElaborazione);
case PAGAMENTO:
return ordinativoMifDao.countOrdinativiSpesa(idElaborazione);
}
throw new IllegalArgumentException("Codice tipo errato: " + codiceTipo);
}
}
|
[
"barbara.malano@csi.it"
] |
barbara.malano@csi.it
|
5866b681f88771edface76ec2f9afeec54b3a373
|
fb6967ce76a263f0cd847dc50f5f8ad8a623ba52
|
/src/main/java/com/springInPractice/chapter4/repository/HbnAccountRepository.java
|
c46a8a99617dd1b701b002670f67a8318061d950
|
[] |
no_license
|
Siwoo-Kim/spring_inPractice
|
6f085a947c35a95cf4bf146bd2a0f1da274982d9
|
df3e38a4ec155b26148891c6463ede430b2eb178
|
refs/heads/master
| 2021-09-06T09:22:06.736066
| 2018-02-05T00:46:23
| 2018-02-05T00:46:23
| 119,459,877
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,073
|
java
|
package com.springInPractice.chapter4.repository;
import com.springInPractice.chapter2.repository.AbstractHibernateRepository;
import com.springInPractice.chapter4.domain.Account;
import org.hibernate.query.Query;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import javax.inject.Inject;
@Repository
public class HbnAccountRepository extends AbstractHibernateRepository<Account> implements AccountRepository {
private static final String UPDATE_PASSWORD_SQL = "update INPRAC_ACCOUNT set password = ? where username = ?";
@Inject private JdbcTemplate jdbcTemplate;
@Override
public void create(Account account, String password) {
create(account);
jdbcTemplate.update(
UPDATE_PASSWORD_SQL,password,account.getUsername());
}
@Override
public Account findByUsername(String username) {
return (Account) getSession().getNamedQuery("findAccountByUsername")
.setParameter("username",username)
.uniqueResult();
}
}
|
[
"skim327@myseneca.ca"
] |
skim327@myseneca.ca
|
fa508b3148befe555dfd7e054571b4b453272fc0
|
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
|
/app/src/main/wechat6.5.3/com/tencent/smtt/sdk/TbsLinuxToolsJni.java
|
ed772925f0a93c1f65dc4e311ccbf400bfd0d330
|
[] |
no_license
|
newtonker/wechat6.5.3
|
8af53a870a752bb9e3c92ec92a63c1252cb81c10
|
637a69732afa3a936afc9f4679994b79a9222680
|
refs/heads/master
| 2020-04-16T03:32:32.230996
| 2017-06-15T09:54:10
| 2017-06-15T09:54:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,272
|
java
|
package com.tencent.smtt.sdk;
import android.content.Context;
import com.tencent.smtt.utils.TbsLog;
import java.io.File;
class TbsLinuxToolsJni {
private static boolean pwI = false;
private static boolean pwJ = false;
public TbsLinuxToolsJni(Context context) {
synchronized (TbsLinuxToolsJni.class) {
if (pwJ) {
return;
}
pwJ = true;
try {
File file;
if (q.fz(context)) {
file = new File(q.bNx());
} else {
m.bNm();
file = m.fr(context);
}
if (file != null) {
System.load(file.getAbsolutePath() + File.separator + "liblinuxtoolsfortbssdk_jni.so");
pwI = true;
}
ChmodInner("/checkChmodeExists", "700");
} catch (Throwable th) {
pwI = false;
}
}
}
private native int ChmodInner(String str, String str2);
public final int ef(String str, String str2) {
if (pwI) {
return ChmodInner(str, str2);
}
TbsLog.e("TbsLinuxToolsJni", "jni not loaded!", true);
return -1;
}
}
|
[
"zhangxhbeta@gmail.com"
] |
zhangxhbeta@gmail.com
|
e8e6eeacbd6ec5d1ead78b256db0a1015dbc25dd
|
857870ba40281e9f60a4955fa6325be10c086895
|
/base-platform-contact/feign/src/main/java/com/taiji/base/contact/vo/ContactMidVo.java
|
9168643ec3da15e389745485681c4fd4679d70fd
|
[] |
no_license
|
Qiang8/nmyj-micro
|
f22f6dba0a30128c4dca3ef1ab41c84ec2f8eb08
|
0be5efe946c25a36902c1abfa52e4ce619523228
|
refs/heads/master
| 2020-05-02T19:08:54.473917
| 2019-03-28T08:05:00
| 2019-03-28T08:05:00
| 178,150,820
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 807
|
java
|
package com.taiji.base.contact.vo;
import com.taiji.micro.common.vo.IdVo;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* <p>Title:ContactMidVo.java</p >
* <p>Description: </p >
* <p>Copyright: 公共服务与应急管理战略业务本部 Copyright(c)2018</p >
* <p>Date:2019/1/15 0:04</p >
*
* @author firebody (dangxb@mail.taiji.com.cn)
* @version 1.0
*/
public class ContactMidVo extends IdVo<String> {
public ContactMidVo()
{}
public ContactMidVo(String memberId,String groupId){
this.member = new ContactMemberVo();
this.member.setId(memberId);
this.group = new ContactGroupVo();
this.group.setId(groupId);
}
@Getter
@Setter
private ContactMemberVo member;
@Getter
@Setter
private ContactGroupVo group;
}
|
[
"18222693676@163.com"
] |
18222693676@163.com
|
72b668da4711b2746920229a72c163fb972466c5
|
43b3baf795f5780fd8df6e208eea9c1fbde13733
|
/src/main/java/edu/mum/ea/socialnetwork/util/JwtUtil.java
|
2f4083b425ac2658b0861b48f228ddb227dbac99
|
[] |
no_license
|
mjachowdhury/FYPSocialBugs
|
dc1a4bb282ee03fe452f38bd3e06b6b7b5cdcaed
|
e7f48462d90c30d1caf753a3de490221dae96cee
|
refs/heads/master
| 2022-04-25T18:05:53.511787
| 2020-04-18T01:01:37
| 2020-04-18T01:01:37
| 258,905,900
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,974
|
java
|
package edu.mum.ea.socialnetwork.util;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
@Service
public class JwtUtil {
@Value("${jwt.secret}")
private String SECRET_KEY;
public String extractUsername(String token) {
return extractClaim(token, Claims::getSubject);
}
public Date extractExpiration(String token) {
return extractClaim(token, Claims::getExpiration);
}
public <T> T extractClaim(String token, Function<Claims, T> claimsResolver) {
final Claims claims = extractAllClaims(token);
return claimsResolver.apply(claims);
}
private Claims extractAllClaims(String token) {
return Jwts.parser().setSigningKey(SECRET_KEY).parseClaimsJws(token).getBody();
}
private Boolean isTokenExpired(String token) {
return extractExpiration(token).before(new Date());
}
public String generateToken(UserDetails userDetails) {
Map<String, Object> claims = new HashMap<>();
return createToken(claims, userDetails.getUsername());
}
private String createToken(Map<String, Object> claims, String subject) {
return Jwts.builder().setClaims(claims).setSubject(subject).setIssuedAt(new Date(System.currentTimeMillis()))
.setExpiration(new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 10))
.signWith(SignatureAlgorithm.HS256, SECRET_KEY).compact();
}
public Boolean validateToken(String token, UserDetails userDetails) {
final String username = extractUsername(token);
return (username.equals(userDetails.getUsername()) && !isTokenExpired(token));
}
}
|
[
"study.computing2016@gmail.com"
] |
study.computing2016@gmail.com
|
898bc866ab112849321724d7f9b135d2d620bfc0
|
f3f93c4ea9a4996eacf1ef1d643aef5fa214e6f9
|
/src/main/java/com/ankamagames/dofus/core/movement/Movement.java
|
dc134c111d266286908419d84ad7b22b92624654
|
[
"MIT"
] |
permissive
|
ProjectBlackFalcon/BlackFalconAPI
|
fb94774056eacd053b3daf0931a9ef9c0fb477f6
|
b038f2f1bc300e549b5f6469c82530b6245f54e2
|
refs/heads/master
| 2022-12-05T09:58:36.499535
| 2019-10-02T21:58:54
| 2019-10-02T21:58:54
| 188,725,082
| 6
| 0
|
MIT
| 2022-11-16T12:22:14
| 2019-05-26T19:49:10
|
Java
|
UTF-8
|
Java
| false
| false
| 1,949
|
java
|
package com.ankamagames.dofus.core.movement;
import java.util.ArrayList;
import java.util.List;
import com.ankamagames.dofus.core.network.DofusConnector;
import com.ankamagames.dofus.util.Astar;
public class Movement {
private DofusConnector connector;
private Map map;
public Movement(final DofusConnector connector, final Map map) {
this.connector = connector;
this.map = map;
}
public CellMovement moveToCell(int cellId) {
if (this.map.getCells().get(cellId).isMov()) {
if (this.connector.getBotInfo().isFighting()) {
return new CellMovement(new Pathfinder(this.map).findPath(this.connector.getBotInfo().getCellId(), cellId, false, false), this.connector);
} else {
return new CellMovement(new Pathfinder(this.map).findPath(this.connector.getBotInfo().getCellId(), cellId), this.connector);
}
} else {
return null;
}
}
private boolean noObstacle(int random) {
if (random == this.connector.getBotInfo().getCellId())
return true;
List<int[]> blocked = new ArrayList<>();
for (int i = 0; i < this.map.getCells().size(); i++) {
if (!this.map.getCells().get(i).isMov()) {
blocked.add(new int[]{i % 14, i / 14});
}
}
if (this.connector.getBotInfo().isFighting()) {
//TODO ADD Monster to blocked cells (check DATBOT)
}
Astar a;
if (this.connector.getBotInfo().isFighting()) {
a = new Astar(this.connector.getBotInfo().getCellId() % 14, this.connector.getBotInfo().getCellId() / 14, random % 14, random / 14, blocked, false);
} else {
a = new Astar(this.connector.getBotInfo().getCellId() % 14, this.connector.getBotInfo().getCellId() / 14, random % 14, random / 14, blocked, true);
}
return a.getPath() != null;
}
}
|
[
"baptiste.beduneau@reseau.eseo.fr"
] |
baptiste.beduneau@reseau.eseo.fr
|
75af28357bffe23cfeae9ef260f9d6ca618578d4
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/RecyclerViewAdapter.java
|
56a76977e96cd58153401e0c63b698961ec2cd02
|
[] |
no_license
|
NayrozD/DD2476-Project
|
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
|
94dfb3c0a470527b069e2e0fd9ee375787ee5532
|
refs/heads/master
| 2023-03-18T04:04:59.111664
| 2021-03-10T15:03:07
| 2021-03-10T15:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,467
|
java
|
2
https://raw.githubusercontent.com/sachin2912/torripo/master/app/src/main/java/com/example/torripo/RecyclerViewAdapter.java
package com.example.torripo;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.ViewHolder> {
Context context;
ArrayList<Holiday_Package> packages;
public void setmultiplePackages(ArrayList<Holiday_Package> packages)
{
this.packages = packages;
}
public RecyclerViewAdapter(Context context,ArrayList<Holiday_Package> packages) {
this.context = context;
this.packages = packages;
}
@NonNull
@Override
public RecyclerViewAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType){
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item,parent,false);
return new ViewHolder(v);
}
@Override
public void onBindViewHolder(@NonNull final RecyclerViewAdapter.ViewHolder holder , int position) {
holder.bind(position);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AppCompatActivity activity = (AppCompatActivity)v.getContext();
activity.getSupportFragmentManager().beginTransaction().
replace(R.id.frame_layout,package_detail_view.newInstance(holder.p_id.getText().toString()),"package_detail_view").
addToBackStack(null).commit();
Log.w("item clicked",holder.p_id.getText().toString());
}
});
}
@Override
public int getItemCount()
{
return packages.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
public TextView p_id;
public TextView location_name;
public TextView cost;
public TextView start_place;
public TextView available;
public ImageView img_url;
public ViewHolder(@NonNull View itemView) {
super(itemView);
p_id = itemView.findViewById(R.id.p_id);
location_name = itemView.findViewById(R.id.location_name);
cost = itemView.findViewById(R.id.cost);
start_place = itemView.findViewById(R.id.starting_place);
available = itemView.findViewById(R.id.available);
img_url=itemView.findViewById(R.id.img_url);
}
public void bind(int pos)
{
Holiday_Package pk = packages.get(pos);
p_id.setText(pk.p_id);
location_name.setText(pk.location);
String ct=String.valueOf(pk.cost);
cost.setText("Rs. "+ct);
start_place.setText(pk.starting_place);
int temp=pk.total_count-pk.count;
String t = String.valueOf(temp);
String l = "Available : "+t;
available.setText(l);
Picasso.with(context).load("http://"+pk.img_url).into(img_url);
}
}
}
|
[
"veronika.cucorova@gmail.com"
] |
veronika.cucorova@gmail.com
|
a358954277f730d8aa2f4f557ff1bc60b932b1fa
|
ab4a3444298e0990166854e6336aa6ed976cde4d
|
/opendevice-servers/opendevice-rest-ws-server/src/main/java/br/com/criativasoft/opendevice/wsrest/io/WSEventsLogger.java
|
bab3d0c75ad382203fc485ac4f50aa40dd4bafc6
|
[] |
no_license
|
ardy30/OpenDevice
|
5d22cbb9a575680e6a542dbd295cfc6883975479
|
85471d19bd028cc3c1f9f8635d0ff88cb07a0af4
|
refs/heads/master
| 2021-01-13T13:12:44.344425
| 2016-10-19T21:50:52
| 2016-10-19T21:50:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,984
|
java
|
/*
* ******************************************************************************
* Copyright (c) 2013-2014 CriativaSoft (www.criativasoft.com.br)
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ricardo JL Rufino - Initial API and Implementation
* *****************************************************************************
*/
package br.com.criativasoft.opendevice.wsrest.io;
import org.atmosphere.cpr.AtmosphereResourceEvent;
import org.atmosphere.websocket.WebSocketEventListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class WSEventsLogger implements WebSocketEventListener {
private static final Logger logger = LoggerFactory.getLogger(WSEventsLogger.class);
public WSEventsLogger() {
}
@Override
public void onPreSuspend(AtmosphereResourceEvent event) {
}
public void onSuspend(final AtmosphereResourceEvent event) {
logger.info("Connected: {} - {}", event.getResource().getRequest().getRemoteAddr()
+ ":" + event.getResource().getRequest().getRemotePort(), event.getResource().uuid());
}
public void onResume(AtmosphereResourceEvent event) {
logger.info("{} - {}", event.getResource().getRequest().getRemoteAddr()
+ ":" + event.getResource().getRequest().getRemotePort(), event.getResource().uuid());
}
public void onDisconnect(AtmosphereResourceEvent event) {
logger.info("{} - {}", event.getResource().getRequest().getRemoteAddr()
+ ":" + event.getResource().getRequest().getRemotePort(), event.getResource().uuid());
}
public void onBroadcast(AtmosphereResourceEvent event) {
logger.info("onBroadcast(): {}", event.getMessage());
}
public void onHeartbeat(AtmosphereResourceEvent event) {
logger.info("onHeartbeat(): {}", event.getMessage());
}
public void onThrowable(AtmosphereResourceEvent event) {
logger.warn("onThrowable(): {}", event);
}
@Override
public void onClose(AtmosphereResourceEvent event) {
logger.info("onClose(): {}", event.getMessage());
}
public void onHandshake(WebSocketEvent event) {
logger.info("onHandshake(): {}", event);
}
public void onMessage(WebSocketEvent event) {
logger.debug("onMessage(): {}", event.message());
}
public void onClose(WebSocketEvent event) {
logger.info("onClose(): {}", event);
}
public void onControl(WebSocketEvent event) {
logger.info("onControl(): {}", event);
}
public void onDisconnect(WebSocketEvent event) {
// logger.info("onDisconnect(): {}", event);
}
public void onConnect(WebSocketEvent event) {
// logger.info("onConnect(): {}", event);
}
}
|
[
"ricardo.jl.rufino@gmail.com"
] |
ricardo.jl.rufino@gmail.com
|
84db2471c7e0392fb8ec2f831c6fc468f977a846
|
f5398748ea435d203248eb208850a1d36939e3a8
|
/Plugins/EASy-Producer/ScenariosTest/testdata/real/IIP-Ecosphere/sep22/expected/SerializerConfig1/MyAppExample/src/main/java/iip/nodes/MyKiExampleFamilyKIFamilyExample.java
|
549b60d8c2fb47ab2edd988e2ed9f3e2fd1c2426
|
[
"Apache-2.0"
] |
permissive
|
SSEHUB/EASyProducer
|
20b5a01019485428b642bf3c702665a257e75d1b
|
eebe4da8f957361aa7ebd4eee6fff500a63ba6cd
|
refs/heads/master
| 2023-06-25T22:40:15.997438
| 2023-06-22T08:54:00
| 2023-06-22T08:54:00
| 16,176,406
| 12
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,895
|
java
|
package iip.nodes;
import java.io.*;
import java.util.*;
import java.util.function.*;
import java.util.concurrent.*;
import javax.annotation.PostConstruct;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.*;
import org.springframework.context.annotation.Bean;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.stereotype.Component;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import io.micrometer.core.instrument.*;
import static de.iip_ecosphere.platform.support.function.IOVoidFunction.optional;
import de.iip_ecosphere.platform.support.identities.*;
import de.iip_ecosphere.platform.support.resources.*;
import de.iip_ecosphere.platform.support.iip_aas.Id;
import de.iip_ecosphere.platform.transport.Transport;
import de.iip_ecosphere.platform.transport.status.TraceRecord;
import de.iip_ecosphere.platform.transport.serialization.*;
import de.iip_ecosphere.platform.transport.connectors.*;
import de.iip_ecosphere.platform.transport.spring.SerializerMessageConverter;
import de.iip_ecosphere.platform.services.environment.switching.ServiceSelector;
import de.iip_ecosphere.platform.services.environment.*;
import de.iip_ecosphere.platform.services.environment.switching.*;
import de.iip_ecosphere.platform.services.environment.metricsProvider.MonitoredTranslatingProtocolAdapter;
import de.iip_ecosphere.platform.services.environment.spring.Starter;
import de.iip_ecosphere.platform.services.environment.spring.SpringAsyncServiceBase;
import de.iip_ecosphere.platform.services.environment.spring.metricsProvider.MetricsProvider;
import de.iip_ecosphere.platform.connectors.ConnectorParameter;
import de.iip_ecosphere.platform.connectors.ConnectorParameter.CacheMode;
import de.iip_ecosphere.platform.connectors.types.*;
import de.iip_ecosphere.platform.connectors.model.*;
import iip.datatypes.*;
import iip.interfaces.*;
import iip.serializers.*;
/**
* Spring Cloud Stream service frame for net node 'KI family example'.
*
* @author EASy-Producer.
*/
@Component
@ConditionalOnProperty(value="iip.service.myKiFamily", havingValue="true", matchIfMissing=true)
@EnableScheduling
public class MyKiExampleFamilyKIFamilyExample extends SpringAsyncServiceBase implements KIFamilyExampleFamilyInterface {
@Value("${iip.service.myKiFamily:true}")
private String activated;
@Autowired
private StreamBridge streamBridge;
private MyKiExampleInterface service;
// so far plain delegation, preparation but so far no support for service switching
@Autowired
private MetricsProvider metrics;
private Counter serviceSent;
private Counter serviceReceived;
private io.micrometer.core.instrument.Timer processingTime;
/**
* Creates an instance.
*
* @param streamBridge the stream bridge
* @param metrics the metrics provider
*/
public MyKiExampleFamilyKIFamilyExample(StreamBridge streamBridge, MetricsProvider metrics) {
this.streamBridge = streamBridge;
this.metrics = metrics;
service = AbstractService.createInstance("MyKiImpl",
MyKiExampleInterface.class,
"myKi",
"deployment.yml");
HashMap<String, String> paramValues = new HashMap<>();
ParameterConfigurer<?> cfg;
cfg = service.getParameterConfigurer("threshold");
if (null != cfg) {
cfg.addValue(paramValues, 15);
}
try {
service.reconfigure(paramValues);
} catch (ExecutionException e) {
LoggerFactory.getLogger(getClass()).error("Configuring initial parameter: " + e.getMessage());
}
}
/**
* Called when data arrived that shall be processed (synchronously).
*
* @return the data transformation functor
*/
public Function<Rec1, RtsaTestInput> transformRec1RtsaTestInput_myKiFamily() {
return data -> service.transformRec1(data);
}
/**
* Initializes the service when feasible in Spring lifecycle.
*/
public void initService() {
if (null == activated || "".equals(activated) || "true".equals(activated)) {
LoggerFactory.getLogger(getClass()).info("Initializing service myKiFamily: {}", activated);
serviceSent = Counter.builder("service.sent")
.baseUnit("tuple/s")
.description("Tuples sent out by a service")
.tags("service", "myKiFamily", "application", "myApp", "device", Id.getDeviceId())
.register(metrics.getRegistry());
serviceReceived = Counter.builder("service.received")
.baseUnit("tuple/s")
.description("Tuples received by a service")
.tags("service", "myKiFamily", "application", "myApp", "device", Id.getDeviceId())
.register(metrics.getRegistry());
processingTime = io.micrometer.core.instrument.Timer.builder("service.processed")
.description("Main processing time of a service")
.tags("service", "myKiFamily", "application", "myApp", "device", Id.getDeviceId())
.register(metrics.getRegistry());
MonitoringService.setUp(service, metrics);
Starter.mapService(service, true);
}
}
@Override
public void setState(ServiceState state) throws ExecutionException {
service.setState(state);
}
@Override
public ServiceState getState() {
return service.getState();
}
@Override
public String getId() {
return service.getId();
}
}
|
[
"eichelberger@sse.uni-hildesheim.de"
] |
eichelberger@sse.uni-hildesheim.de
|
d8379cf569d2daa84771c2971fb2f0febf6896e9
|
896683aaf6dd5d4c092175a2141a0f15404fcd38
|
/JavaPracticeGit/src/thread8_reenterableLock/MyThreadA.java
|
9dcb8bb7413b48b47330308091f44b74b46dc296
|
[] |
no_license
|
WoodZzzzz/java
|
3d776d35ff81f681c8a2d63c78a816de976b560e
|
26d68157636a0c51303eb6417fce0f932d97a4f9
|
refs/heads/master
| 2020-03-08T07:25:03.830889
| 2018-08-31T10:59:26
| 2018-08-31T10:59:26
| 127,993,812
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 188
|
java
|
package thread8_reenterableLock;
public class MyThreadA extends Thread {
private Sub sub;
public MyThreadA(Sub obj) {
sub = obj;
}
public void run() {
sub.subService();
}
}
|
[
"772005736@qq.com"
] |
772005736@qq.com
|
824285fa06ca38188507d01c67a44ff7f3b64db2
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_0cc6984643840822eaed74c7fcb454e9ac1be9b4/HTMLRenderer/14_0cc6984643840822eaed74c7fcb454e9ac1be9b4_HTMLRenderer_t.java
|
b647e7793f3599dfb6132a1697daf81e9b2d3c77
|
[] |
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
| 5,840
|
java
|
package ru.anglerhood.lj.client.render;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.exception.MethodInvocationException;
import org.apache.velocity.exception.ParseErrorException;
import org.apache.velocity.exception.ResourceNotFoundException;
import ru.anglerhood.lj.api.xmlrpc.results.BlogEntry;
import ru.anglerhood.lj.api.xmlrpc.results.Comment;
import ru.anglerhood.lj.client.BlogEntryReader;
import ru.anglerhood.lj.client.Util;
import java.io.StringWriter;
import java.util.List;
/*
* Copyright (c) 2012, Anatoly Rybalchenko
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions
* and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
* and the following disclaimer in the documentation and/or other materials provided with the distribution.
* * The name of the author may not be used may not be used to endorse or
* promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
public class HTMLRenderer implements LJRenderer {
private static final Log logger = LogFactory.getLog(HTMLRenderer.class);
private static final String DOCTYPE = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd\">";
private final VelocityEngine ve;
private String journal;
private BlogEntryReader reader;
public HTMLRenderer(String journal, BlogEntryReader reader){
this.journal = journal;
this.reader = reader;
ve = new VelocityEngine();
ve.setProperty("resource.loader", "file");
ve.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.FileResourceLoader");
ve.setProperty("file.resource.loader.path","./src/main/java/ru/anglerhood/lj/client/render/templates");
ve.setProperty("file.resource.loader.cache", "true");
ve.setProperty("velocimacro.max.depth", "200");
ve.init();
}
@Override
public String renderBlogEntry(BlogEntry entry) {
VelocityContext entryContext = new VelocityContext();
entryContext.put("entry", entry);
BlogEntry prev = reader.getPreviousEntry(entry.getItemid());
String prevURL = "";
if(null != prev) {
prevURL = prev.getPermalink().substring(2);
}
entryContext.put("prevURL", prevURL);
BlogEntry next = reader.getNextEntry(entry.getItemid());
String nextURL = "";
if(null != next) {
nextURL = next.getPermalink().substring(2);
}
entryContext.put("nextURL", nextURL);
Template template = loadTemplate("blog_entry.vm");
StringWriter writer = new StringWriter();
template.merge(entryContext, writer);
return Util.replaceJournalLinks(writer.toString(), journal);
}
@Override
public String renderComments(BlogEntry entry, List<Comment> comments) {
VelocityContext commentsContext = new VelocityContext();
commentsContext.put("entryURL", entry.getPermalink().substring(2));
commentsContext.put("commentList", comments);
StringWriter writer = new StringWriter();
Template template = loadTemplate("comments.vm");
template.merge(commentsContext, writer);
return Util.replaceJournalLinks(writer.toString(), journal);
}
@Override
public String renderFullEntry(BlogEntry entry, List<Comment> comments) {
StringBuilder result = new StringBuilder();
result.append("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n" +
" \"http://www.w3.org/TR/html4/loose.dtd\">\n" +
"<html>");
result.append(renderBlogEntry(entry));
result.append(renderComments(entry, comments));
result.append("</body>\n" +
"</html>");
return result.toString();
}
private Template loadTemplate(String template) {
Template result = null;
try{
result = ve.getTemplate(template);
} catch(ResourceNotFoundException e) {
logger.error(String.format("Coudn't find template: %s", e.getMessage()));
} catch(ParseErrorException e) {
logger.error(String.format("Cound't parse template: %s", e.getMessage()));
} catch(MethodInvocationException e) {
logger.error(String.format("Error in invocation: %s", e.getMessage()));
}
return result;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
53d4a611a5d63e472eb0350ff64e2153ec84884f
|
4c24b8da0d96c021c6e0c55fa97cb58c1bd7e8f4
|
/src.archive.1/math/FoxAndGCDLCM.java
|
66e16a205e4a1ff44358bc62abe25247a8d49d4b
|
[] |
no_license
|
TankaiHub/topc
|
ee80fa1c5fd85372a0b2cf65a0c22096ec19a5ad
|
bdac19df8df6847e9fcb6e138ad9ac5d9d77ae5e
|
refs/heads/master
| 2023-03-15T22:00:06.612099
| 2016-03-30T06:15:05
| 2016-03-30T06:15:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,015
|
java
|
package topc.math;
import java.util.*;
import java.io.*;
import java.math.*;
// SRM 535 Division I Level One - 250
// simple math
// statement: http://community.topcoder.com/stat?c=problem_statement&pm=11364&rd=15037
// editorial: http://apps.topcoder.com/wiki/display/tc/SRM+535
public class FoxAndGCDLCM {
public long get(long G, long L) {
if (G > L || L % G != 0) { return -1; }
long M = L / G;
long best = M + M;
for (long i = 1; i * i < M; i++) {
if (M % i == 0) {
long a = M / i;
long b = i;
if (gcd(a, b) == 1) {
best = Math.min(best, a + b);
}
}
}
return best * G;
}
long gcd(long a, long b) {
BigInteger x = BigInteger.valueOf(a);
BigInteger y = BigInteger.valueOf(b);
return x.gcd(y).longValue();
}
private void debug(Object... os) {
System.out.println(Arrays.deepToString(os));
}
}
|
[
"gabesoft@gmail.com"
] |
gabesoft@gmail.com
|
db346172e5620499245c3281c0c06c83bfcad47d
|
8a135ca3f5eb37520774209cbe37244dbaf0e268
|
/mango-sql/src/main/java/com/gengoai/sql/constraint/table/Unique.java
|
86ebc832dfb37efe3dbaccb744be238de5688008
|
[
"Apache-2.0"
] |
permissive
|
gengoai/mango
|
511ccb5cd69ee7930996277c400e6a6c26dafd73
|
c9f427bb74c2dc60813dd5a9c4f66cc2562dc69f
|
refs/heads/master
| 2021-06-12T13:42:31.298020
| 2020-07-31T16:45:11
| 2020-07-31T16:45:11
| 128,667,584
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,216
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.gengoai.sql.constraint.table;
import com.gengoai.sql.SQLDialect;
import com.gengoai.sql.SQLElement;
import com.gengoai.sql.constraint.ConflictClause;
import com.gengoai.sql.constraint.Constraint;
import com.gengoai.sql.constraint.TableConstraint;
import lombok.*;
import java.util.List;
@Value
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
public class Unique extends Constraint implements TableConstraint {
private static final long serialVersionUID = 1L;
List<SQLElement> columns;
ConflictClause conflictClause;
public Unique(String name, @NonNull List<SQLElement> columns, ConflictClause conflictClause) {
super(name);
this.columns = columns;
this.conflictClause = conflictClause;
}
@Override
public String toSQL(@NonNull SQLDialect dialect) {
StringBuilder builder = new StringBuilder(super.toSQL(dialect))
.append(" UNIQUE (")
.append(dialect.join(", ", columns))
.append(") ");
if(conflictClause != null) {
builder.append(conflictClause.toSQL(dialect));
}
return builder.toString();
}
@Override
public String toString() {
return "Unique{" +
"name=" + getName() +
", columns=" + columns +
", conflictClause=" + conflictClause +
'}';
}
}//END OF PrimaryKey
|
[
"david@davidbracewell.com"
] |
david@davidbracewell.com
|
93e32ca2c366e484030b65e1fbb85653850fe46a
|
18d44ac87619ef737f152eb4137150f57ffe32e8
|
/app/src/main/java/demo/nopointer/npNotification/MainApplication.java
|
a5a33cf1da2e3a8b99f87116ddcbd95ee126a298
|
[] |
no_license
|
nopointer/npNotificationListener
|
40529f8988c9b18f151736d2d6c2a1e7da214a33
|
fd0d8360934da803eda0ada2d8d1b81f14b91a7d
|
refs/heads/master
| 2023-05-12T09:07:27.686471
| 2023-05-04T10:33:49
| 2023-05-04T10:33:49
| 231,703,654
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,118
|
java
|
package demo.nopointer.npNotification;
import android.app.Application;
public class MainApplication extends Application {
public static MainApplication mainApplication = null;
@Override
public void onCreate() {
super.onCreate();
mainApplication = this;
// PushAiderHelper.getAiderHelper().setMsgReceiveCallback(new MsgCallback() {
// @Override
// public void onAppMsgReceive(String packName, NpMsgType msgType, String from, String msgContent) {
// }
//
// @Override
// public void onPhoneInComing(String phoneNumber, String contactName, int userHandResult) {
//
// }
//
// @Override
// public void onMessageReceive(String phoneNumber, String contactName, String messageContent) {
// }
//
// @Override
// public void onNotificationPost(StatusBarNotification sbn) {
// super.onNotificationPost(sbn);
//
// }
// });
}
public static MainApplication getMainApplication() {
return mainApplication;
}
}
|
[
"857508412@qq.com"
] |
857508412@qq.com
|
c999c46e4553aa60ce47277945f07689f3f5ea48
|
e4c3779464145a45892b735e1dc5cf44a787da19
|
/demo_200207/src/main/java/com/example/demo/service/TBoardService.java
|
8a7c59b555b78cb7351ab28969a1d026b15746b7
|
[] |
no_license
|
jeonhyeonji92/mystudy01
|
e55ac159d174db8bdb1ee0dc61e7dc387c04649c
|
84a7d562751cb46bcf553b4f84ed1fae3d531619
|
refs/heads/master
| 2022-12-30T22:06:15.674859
| 2020-02-10T06:37:32
| 2020-02-10T06:37:32
| 239,425,343
| 0
| 0
| null | 2022-12-16T10:03:06
| 2020-02-10T04:14:40
|
CSS
|
UTF-8
|
Java
| false
| false
| 392
|
java
|
package com.example.demo.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.demo.dao.TBoardDao;
import com.example.demo.vo.TBoardVO;
@Service
public class TBoardService {
@Autowired
private TBoardDao dao;
public List<TBoardVO> getList(){
return dao.getTBoardList();
}
}
|
[
"Canon@DESKTOP-PL2F7PK"
] |
Canon@DESKTOP-PL2F7PK
|
6ea58edcc2be4cce52c38b583a41f0a169d3537d
|
a0e5858528a288b97aa32fb0f2170d6ed9226885
|
/emp-nangang/feign/src/main/java/com/taiji/emp/nangang/feign/IDailyCheckService.java
|
62f17dcff4557c18738925b5b3a2235134c283e3
|
[] |
no_license
|
rauldoblem/nangang
|
f0a0f0c816c7de915c352cc467b2e6716c87a310
|
e48cadeaf5245c42b7e9a21f28903f4f4e8b6996
|
refs/heads/master
| 2020-08-11T04:01:12.891437
| 2019-06-25T13:42:57
| 2019-06-25T13:42:57
| 214,486,888
| 0
| 0
| null | 2019-10-11T16:51:17
| 2019-10-11T16:51:17
| null |
UTF-8
|
Java
| false
| false
| 2,308
|
java
|
package com.taiji.emp.nangang.feign;
import com.taiji.emp.duty.vo.dailylog.DailyLogVo;
import com.taiji.emp.nangang.searchVo.dailyCheck.DailyCheckPageVo;
import com.taiji.emp.nangang.vo.DailyCheckDailyLogVo;
import com.taiji.emp.nangang.vo.DailyCheckItemsVo;
import com.taiji.emp.nangang.vo.DailyCheckVo;
import com.taiji.micro.common.entity.utils.RestPageImpl;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@FeignClient(value = "micro-nangang-dailyChecks")
public interface IDailyCheckService {
@RequestMapping(method = RequestMethod.POST ,path = "/updateDailyCheck")
@ResponseBody
ResponseEntity<DailyCheckVo> updateDailyCheck(@RequestParam("id") String id);
@RequestMapping(method = RequestMethod.POST ,path = "/selectItem")
@ResponseBody
ResponseEntity<List<DailyCheckItemsVo>> selectItem(@RequestBody DailyCheckVo vo);
/**
* 根据检查日期的范围获取分页DailyCheckVo多条记录
* param参数key为checkDateStart(可选),checkDateEnd(可选),page(可选),size(not less than 1)
* @return ResponseEntity<RestPageImpl<DailyCheckVo>>
*/
@RequestMapping(method = RequestMethod.POST, path = "/find/page")
@ResponseBody
ResponseEntity<RestPageImpl<DailyCheckVo>> findPage(@RequestBody DailyCheckPageVo dailyCheckPageVo);
@RequestMapping(method = RequestMethod.POST ,path = "/exists")
@ResponseBody
DailyCheckVo exists(@RequestBody DailyCheckVo vo);
@RequestMapping(method = RequestMethod.POST ,path = "/save")
@ResponseBody
ResponseEntity<DailyCheckVo> save(@RequestBody DailyCheckVo dailyCheckVo);
@RequestMapping(method = RequestMethod.POST ,path = "/findOne")
@ResponseBody
ResponseEntity<DailyCheckVo> findOne(@RequestBody DailyCheckVo vo);
@RequestMapping(method = RequestMethod.POST ,path = "/saveByList")
@ResponseBody
ResponseEntity<List<DailyCheckItemsVo>> saveByList(@RequestBody List<DailyCheckItemsVo> dailyCheckItems);
@RequestMapping(method = RequestMethod.POST ,path = "/addDailyLog")
@ResponseBody
ResponseEntity<DailyCheckDailyLogVo> addDailyLog(@RequestBody DailyCheckDailyLogVo dailyCheckDailyLogVo);
}
|
[
"18151950796@163.com"
] |
18151950796@163.com
|
16a3d0f846bbf2f7c82a185328839c796c043e79
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/core-java-modules/core-java-concurrency-2/src/main/java/com/surya/concurrent/mutex/SequenceGeneratorUsingMonitor.java
|
2d021173e58cad426ee4b61de63de46a0016f6de
|
[] |
no_license
|
Suryakanta97/DemoExample
|
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
|
5c6b831948e612bdc2d9d578a581df964ef89bfb
|
refs/heads/main
| 2023-08-10T17:30:32.397265
| 2021-09-22T16:18:42
| 2021-09-22T16:18:42
| 391,087,435
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 400
|
java
|
package com.surya.concurrent.mutex;
import com.google.common.util.concurrent.Monitor;
public class SequenceGeneratorUsingMonitor extends SequenceGenerator {
private Monitor mutex = new Monitor();
@Override
public int getNextSequence() {
mutex.enter();
try {
return super.getNextSequence();
} finally {
mutex.leave();
}
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
eaa46a97d77eed163b5a89db1a1a5ae660e5cb79
|
f249b2f64e1ac65a938c238543935247f58c8e46
|
/library/src/main/java/com/fe/library/widget/Tab.java
|
57de1e2e5dcfa153036cc15582d4dcfe3c81d4b0
|
[] |
no_license
|
yufeilong92/TabContainerView-master
|
c532efadab2dd2a36f2c0d219470db623abb01ba
|
b109cf39bee00ce8147790aa5d85360c89834f4f
|
refs/heads/master
| 2021-01-20T03:47:02.207848
| 2017-04-27T10:00:48
| 2017-04-27T10:00:48
| 89,583,578
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,025
|
java
|
package com.fe.library.widget;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.fe.library.MessageCircle;
import com.fe.library.listener.OnTabSelectedListener;
import fe.library.R;
/**
* Created by chenpengfei on 2017/3/21.
*/
public class Tab {
private Context context;
private int index;
//是否被选中
private boolean isSelected;
/**
* 文本信息
*/
private String text;
private int textColor;
private int selectedTextColor;
private int textSize;
/**
* icon信息
*/
private int iconImage;
private int selectedIconImage;
/**
* Tab布局信息
*/
private LinearLayout rootView;
private ImageView iconImageView;
private TextView textTextView;
private MessageCircle messageCircle;
/**
* tab选中监听
*/
private OnTabSelectedListener onTabSelectedListener;
public Tab(Context context, String text, int textSize, int textColor, int selectedTextColor, int iconImage, int selectedIconImage, int index) {
this.context = context;
this.text = text;
this.textSize = textSize;
this.textColor = textColor;
this.selectedTextColor = selectedTextColor;
this.iconImage = iconImage;
this.selectedIconImage = selectedIconImage;
this.index = index;
init();
}
private void init() {
initView();
rootView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
tabSelected();
}
});
}
private void initView() {
rootView = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.tab_item, null);
LinearLayout.LayoutParams rootViewLp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
rootViewLp.weight = 1;
rootView.setLayoutParams(rootViewLp);
/**
* icon view
*/
iconImageView = (ImageView) rootView.findViewById(R.id.iv_icon);
iconImageView.setImageResource(iconImage);
/**
* text view
*/
textTextView = (TextView) rootView.findViewById(R.id.tv_title);
textTextView.setText(text);
textTextView.setTextColor(textColor);
textTextView.setTextSize(textSize);
/**
* MessageCircle
*/
messageCircle = (MessageCircle) rootView.findViewById(R.id.mc_circle);
}
/**
* 选中Tab
*/
private void tabSelected() {
if (onTabSelectedListener != null) {
onTabSelectedListener.onTabSelected(this);
showMessageCircle(false, -1);
}
}
/**
* 得到rootView
*/
public LinearLayout getRootView() {
return rootView;
}
public int getIndex() {
return index;
}
public String getText() {
return text;
}
/**
* 显示消息提示
* @param show
*/
public void showMessageCircle(boolean show, int count) {
messageCircle.setVisibility(show ? View.VISIBLE : View.GONE);
if (count == -1) {
messageCircle.setText("");
} else {
messageCircle.setText(count >= 1000 ? "999+" : count + "");
}
}
public void setTabIsSelected(boolean isSelected) {
if (this.isSelected == isSelected) return;
iconImageView.setImageResource(isSelected ? selectedIconImage : iconImage);
textTextView.setTextColor(isSelected ? selectedTextColor : textColor);
this.isSelected = isSelected;
}
public void setOnTabSelectedListener(OnTabSelectedListener onTabSelectedListener) {
this.onTabSelectedListener = onTabSelectedListener;
}
}
|
[
"931697478@qq.com"
] |
931697478@qq.com
|
9e3c8a25c00096778edd8a5be64ceb48fdb0cd00
|
78151b98a6526508c49de18d4d8b1d42be22fdd7
|
/plugins/t-filesRenamer/src/main/java/com/linkedpipes/plugin/transformer/packzip/filesrenamer/FilesRenamer.java
|
1823b3c9b757fc77aae51d0b0bd4eb296fca3f91
|
[
"MIT"
] |
permissive
|
mdkmisc/etl
|
b784b5f4d768d82ba030e193904bc288b7516c6f
|
44e5d945a08a6168c60ac0db76c545830d7bf4e1
|
refs/heads/master
| 2021-06-09T22:52:44.548766
| 2017-01-05T16:48:26
| 2017-01-05T16:48:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,832
|
java
|
package com.linkedpipes.plugin.transformer.packzip.filesrenamer;
import com.linkedpipes.etl.component.api.Component;
import com.linkedpipes.etl.component.api.service.ExceptionFactory;
import com.linkedpipes.etl.dataunit.system.api.files.FilesDataUnit;
import com.linkedpipes.etl.dataunit.system.api.files.WritableFilesDataUnit;
import com.linkedpipes.etl.executor.api.v1.exception.LpException;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
/**
*
*/
public class FilesRenamer implements Component.Sequential {
@Component.InputPort(id = "InputFiles")
public FilesDataUnit inputFiles;
@Component.InputPort(id = "OutputFiles")
public WritableFilesDataUnit outputFiles;
@Component.Configuration
public FilesRenamerConfiguration configuration;
@Component.Inject
public ExceptionFactory exceptionFactory;
@Override
public void execute() throws LpException {
final Pattern pattern;
try {
pattern = Pattern.compile(configuration.getPattern());
} catch (PatternSyntaxException ex) {
throw exceptionFactory.failure("Invalid file pattern.", ex);
}
for (FilesDataUnit.Entry entry : inputFiles) {
final String newName = pattern.matcher(entry.getFileName())
.replaceAll(configuration.getReplaceWith());
// Copy file.
final File targetFile = outputFiles.createFile(newName).toFile();
targetFile.getParentFile().mkdirs();
try {
Files.copy(entry.toFile().toPath(), targetFile.toPath());
} catch (IOException ex) {
throw exceptionFactory.failure("Can't copy file.", ex);
}
}
}
}
|
[
"skodapetr@gmail.com"
] |
skodapetr@gmail.com
|
f9c75d43f885e0f7b7d39994a3faa99a4a9093ee
|
9f67393fb3d152a6325145094ec66680aa34341f
|
/src/com/creditease/eas/recruitment/kingdee/query/RecruitmentQuery.java
|
c34d177d93a7833f3a590f03165213d751c06802
|
[] |
no_license
|
liveqmock/EASExt
|
11021a2c129ace517b909ada9dd5be9eacb47dd4
|
1458aabad8f21d524794633ba60c19f12daf5f26
|
refs/heads/master
| 2021-01-18T08:47:35.792953
| 2015-01-15T07:16:18
| 2015-01-15T07:16:18
| 37,263,974
| 1
| 2
| null | 2015-06-11T13:52:46
| 2015-06-11T13:52:46
| null |
UTF-8
|
Java
| false
| false
| 3,159
|
java
|
package com.creditease.eas.recruitment.kingdee.query;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.SqlSession;
import com.creditease.eas.recruitment.bean.RecOrgAdmin;
import com.creditease.eas.recruitment.bean.RecOrgPosition;
import com.creditease.eas.recruitment.bean.RecPersonInfo;
import com.creditease.eas.recruitment.kingdee.dao.RecruitmentMapper;
import com.creditease.eas.util.BaseMyBatisDao;
/**
* 招聘系统需要的接口的信息
* @RecruitmentQuery.java
* created at 2013-7-31 下午04:47:15 by ygq
*
* @author ygq({@link authorEmail})
* @version $Revision$</br>
* update: $Date$
*/
public class RecruitmentQuery extends BaseMyBatisDao{
/**
* 描述:查询组织的信息
* 2013-7-31 下午04:48:49 by ygq
* @version
* @return
*/
public static List<RecOrgAdmin> findOrgAdmin(Map map){
List<RecOrgAdmin> list = null;
SqlSession session = null;
try {
session = getSession();
RecruitmentMapper mapper = session.getMapper(RecruitmentMapper.class);
list = mapper.selectOrgAdminInfo(map);
}catch(Exception ex){
ex.printStackTrace();
}finally{
closeSession(session);
}
return list;
}
/**
* 描述:查询职位的信息
* 2013-7-31 下午04:48:49 by ygq
* @version
* @return
*/
public static List<RecOrgPosition> findOrgPositionInfo(Map map){
List<RecOrgPosition> list = null;
SqlSession session = null;
try{
session = getSession();
RecruitmentMapper mapper = session.getMapper(RecruitmentMapper.class);
list = mapper.selectOrgPositionInfo(map);
}catch(Exception ex){
ex.printStackTrace();
}finally{
closeSession(session);
}
return list;
}
/**
* 描述:查询人员的信息
* 2013-7-31 下午04:48:49 by ygq
* @version
* @return
*/
public static List<RecPersonInfo> findPersonInfo(Map map){
List<RecPersonInfo> list = null;
SqlSession session = null;
try{
session = getSession();
RecruitmentMapper mapper = session.getMapper(RecruitmentMapper.class);
list = mapper.selectPersonInfo(map);
}catch(Exception ex){
ex.printStackTrace();
}finally{
closeSession(session);
}
return list;
}
public static void main(String[] args) {
Map map = new HashMap();
map.put("startRow", 1);
map.put("endRow", 100);
List<RecOrgAdmin> list = findOrgAdmin(map);
for(int i=0;i<list.size();i++){
RecOrgAdmin rec = list.get(i);
System.out.println(rec.getDeptid() + "\t" + rec.getDeptname() + "\t" + rec.getParent_deptid() + "\t" + rec.getOrder());
}
// List<RecOrgPosition> listPosition = findOrgPositionInfo(map);
// for(int i=0;i<listPosition.size();i++){
// RecOrgPosition rec = listPosition.get(i);
// System.out.println(rec.getPosID()+ "\t" + rec.getPosName() + "\t" + rec.getOrgID()+ "\t" + rec.getExt1());
// }
// List<RecPersonInfo> listPersonInfo = findPersonInfo(map);
// for(int i=0;i<listPersonInfo.size();i++){
// RecPersonInfo rec = listPersonInfo.get(i);
// System.out.println(rec.getUserID()+ "\t" + rec.getUserName() + "\t" + rec.getRealName() + "\t" + rec.getEmail());
// }
System.out.println("result");
}
}
|
[
"18610364019@163.com"
] |
18610364019@163.com
|
8fb84bd1ca3a4fe167affe05d643dad8abfff2e5
|
3ea90852ce844b9fdb21e5d391aed7929013bce5
|
/rapla-source-1.8.4/src/org/rapla/components/calendarview/WeekdayMapper.java
|
e774d3ff3c820f62d0971f66aadbc74b0cad17b1
|
[] |
no_license
|
Ayce45/OverwatchBTS
|
5e2b932d9b3d7744b0f6bc2bba1cb2b0f5bfc06c
|
eb1ece3695b0b34ecad0422e9e878563f486e01f
|
refs/heads/master
| 2020-04-12T19:26:13.116600
| 2019-09-14T12:50:41
| 2019-09-14T12:50:41
| 162,708,924
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,054
|
java
|
/*--------------------------------------------------------------------------*
| Copyright (C) 2014 Christopher Kohlhaas, Bettina Lademann |
| |
| This program is free software; you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by the |
| Free Software Foundation. A copy of the license has been included with |
| these distribution in the COPYING file, if not go to www.fsf.org |
| |
| As a special exception, you are granted the permissions to link this |
| program with every library, which license fulfills the Open Source |
| Definition as published by the Open Source Initiative (OSI). |
*--------------------------------------------------------------------------*/
package org.rapla.components.calendarview;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
/** maps weekday names to Calendar.DAY_OF_WEEK.
Example:
<pre>
WeekdayMapper mapper = new WeekdayMapper();
// print name of Sunday
System.out.println(mapper.getName(Calendar.SUNDAY));
// Create a weekday ComboBox
JComboBox comboBox = new JComboBox();
comboBox.setModel(new DefaultComboBoxModel(mapper.getNames()));
// select sunday
comboBox.setSelectedIndex(mapper.getIndexForDay(Calendar.SUNDAY));
// weekday == Calendar.SUNDAY
int weekday = mapper.getDayForIndex(comboBox.getSelectedIndex());
</pre>
*/
public class WeekdayMapper {
String[] weekdayNames;
int[] weekday2index;
int[] index2weekday;
Map<Integer,String> map = new LinkedHashMap<Integer,String>();
public WeekdayMapper() {
this(Locale.getDefault());
}
public WeekdayMapper(Locale locale)
{
int days = 7;
weekdayNames = new String[days];
weekday2index = new int[days+1];
index2weekday = new int[days+1];
SimpleDateFormat format = new SimpleDateFormat("EEEEEE",locale);
Calendar calendar = Calendar.getInstance(locale);
calendar.set(Calendar.DAY_OF_WEEK, calendar.getFirstDayOfWeek());
for (int i=0;i<days;i++) {
int weekday = calendar.get(Calendar.DAY_OF_WEEK);
weekday2index[weekday] = i;
index2weekday[i] = weekday;
String weekdayName = format.format(calendar.getTime());
weekdayNames[i] = weekdayName;
calendar.add(Calendar.DATE,1);
map.put(weekday, weekdayName);
}
}
public String[] getNames() {
return weekdayNames;
}
public String getName(int weekday) {
return map.get( weekday);
}
public int dayForIndex(int index) {
return index2weekday[index];
}
public int indexForDay(int weekday) {
return weekday2index[weekday];
}
}
|
[
"32338891+Ayce45@users.noreply.github.com"
] |
32338891+Ayce45@users.noreply.github.com
|
b9d390bf804c11ce4e737572f73c413868218585
|
dac6ddc035fef930a3c7412a7ed3844a699f7371
|
/examples/src/com/foo/client/dispatch/BarSpec.java
|
107e67998a55b849fee699f80d376f638c74c0e3
|
[] |
no_license
|
dineshkummarc/gwt-mpv-apt
|
ffe90ed557fe47b59baf9c1617579c29881d51d6
|
e298e465f07e4e9a820d723c8c60de02995be90e
|
refs/heads/master
| 2021-01-17T12:46:38.918525
| 2010-07-11T09:42:52
| 2010-07-11T14:00:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 281
|
java
|
package com.foo.client.dispatch;
import org.gwtmpv.GenDispatch;
@GenDispatch
public class BarSpec {
Integer inInteger;
String out1foo;
Integer out2bar;
// Shouldn't really put stuff here, but checking compile time order
public void foo() {
new BarResult("2", 1);
}
}
|
[
"stephen@exigencecorp.com"
] |
stephen@exigencecorp.com
|
9c4051aafc8c60cdb93859e4e97be92eb1fd9445
|
8d1c7fba7cd15f8a1e33fd27d11eefd1c67d579f
|
/src/main/java/com/google/devtools/build/lib/vfs/FileSymlinkLoopException.java
|
6fc2f21cad63401263c404738dde7552f483dbbe
|
[
"Apache-2.0"
] |
permissive
|
bazelbuild/bazel
|
5896162455f032efc899b8de60aa39b9d2cad4a6
|
171aae3f9c57b41089e25ec61fc84c35baa3079d
|
refs/heads/master
| 2023-08-22T22:52:48.714735
| 2023-08-22T18:01:53
| 2023-08-22T18:01:53
| 20,773,773
| 20,294
| 4,383
|
Apache-2.0
| 2023-09-14T18:38:44
| 2014-06-12T16:00:38
|
Java
|
UTF-8
|
Java
| false
| false
| 1,172
|
java
|
// Copyright 2021 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.lib.vfs;
import com.google.devtools.build.lib.io.FileSymlinkException;
/** A {@link FileSymlinkException} that indicates a symlink loop. */
public final class FileSymlinkLoopException extends FileSymlinkException {
FileSymlinkLoopException(String message) {
super(message);
}
public FileSymlinkLoopException(PathFragment pathFragment) {
this(pathFragment.getPathString() + " (Too many levels of symbolic links)");
}
@Override
public String getUserFriendlyMessage() {
return getMessage();
}
}
|
[
"copybara-worker@google.com"
] |
copybara-worker@google.com
|
7a8149cbd8fb59155f933e485ed63a765349601f
|
b65b692ecf87b38c55ff438f9aa44298dd6aba12
|
/learn-note-maven-hibernatetemplate/src/main/java/com/cn/server/ServerMain.java
|
c27f5330e8ef8dd4d13d640cadc4afba6430873c
|
[] |
no_license
|
Steve133/my
|
c2d22cf290bad0e66304034abd53c8ea8d3a8743
|
33fa4a9a94c690c101c5bf905385c1e8db6dde8e
|
refs/heads/master
| 2022-12-20T23:11:04.076723
| 2019-12-26T02:14:28
| 2019-12-26T02:14:28
| 225,565,975
| 0
| 0
| null | 2022-12-16T05:01:42
| 2019-12-03T08:15:59
|
Java
|
UTF-8
|
Java
| false
| false
| 977
|
java
|
package com.cn.server;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.cn.server.module.player.dao.PlayerDao;
import com.cn.server.module.player.dao.entity.Player;
/**
* 启动函数
* @author admin
*
*/
public class ServerMain {
public static void main(String[] args) {
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
PlayerDao dao = applicationContext.getBean(PlayerDao.class);
Player playerByName = dao.getPlayerByName("admin");
System.out.println(playerByName.toString());
Player playerById = dao.getPlayerById(1L);
System.out.println(playerById.toString());
Player player = new Player();
player.setPlayerName("aaa");
player.setPassward("aaa");
player.setLevel(0);
player.setExp(0);
Player createPlayer = dao.createPlayer(player);
System.out.println(createPlayer.toString());
}
}
|
[
"810203590@qq.com"
] |
810203590@qq.com
|
03d155de2ad038faa5b378a660f76d8a0a58cfd7
|
bb584cff0de070fcc2cf429ec841d78422dc5db2
|
/app/src/main/java/io/github/emanual/app/ui/adapter/TopicListAdapter.java
|
45ad3796b0c41396c265a489d845d1355d285ecd
|
[
"Apache-2.0"
] |
permissive
|
EManual/EManual-Android
|
9a0347a61bb0d6397ddc97395c939255a0255d5d
|
29420ceb3da359ba63f2648309ca930568b17341
|
refs/heads/develop
| 2021-01-17T09:08:43.391321
| 2020-09-01T10:29:10
| 2020-09-01T10:29:10
| 19,139,387
| 35
| 10
| null | 2016-01-01T08:25:01
| 2014-04-25T08:29:49
|
Java
|
UTF-8
|
Java
| false
| false
| 1,508
|
java
|
package io.github.emanual.app.ui.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
import io.github.emanual.app.R;
public class TopicListAdapter extends BaseAdapter {
List<String> data;
Context context;
public TopicListAdapter(Context context, List<String> data) {
this.data = data;
this.context = context;
}
@Override
public int getCount() {
return data.size();
}
@Override
public Object getItem(int position) {
return data.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder h = null;
if (convertView == null) {
convertView = LayoutInflater.from(context).inflate(R.layout.adapter_topiclist, null);
h = new ViewHolder(convertView);
convertView.setTag(h);
} else {
h = (ViewHolder) convertView.getTag();
}
h.title.setText(data.get(position));
return convertView;
}
class ViewHolder {
@Bind(R.id.tv_title)
TextView title;
public ViewHolder(View view) {
ButterKnife.bind(this, view);
}
}
}
|
[
"tonjayin@gmail.com"
] |
tonjayin@gmail.com
|
27e129c41046852698f52a1880aba7a8bc2185be
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/LACCPlus/HBase/150_1.java
|
70e7cf4282dc1a1e1f701cd50b98ab6272b6a564
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 622
|
java
|
//,temp,SecureTestUtil.java,634,648,temp,SecureTestUtil.java,613,627
//,3
public class xxx {
public static void grantGlobalUsingAccessControlClient(final HBaseTestingUtility util,
final Connection connection, final String user, final Permission.Action... actions)
throws Exception {
SecureTestUtil.updateACLs(util, new Callable<Void>() {
@Override
public Void call() throws Exception {
try {
AccessControlClient.grant(connection, user, actions);
} catch (Throwable t) {
LOG.error("grant failed: ", t);
}
return null;
}
});
}
};
|
[
"sgholami@uwaterloo.ca"
] |
sgholami@uwaterloo.ca
|
56fcdda952c38f1f901ee56143532f82cc0a31e8
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_f4bb75b936b270335a88230fc6071e822a97f731/PuzzleFighter/2_f4bb75b936b270335a88230fc6071e822a97f731_PuzzleFighter_t.java
|
df5c38f749f6152b77fb664685961363f3735f08
|
[] |
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
| 5,237
|
java
|
package cs447.PuzzleFighter;
import java.awt.Font;
import java.awt.event.KeyEvent;
import java.awt.geom.AffineTransform;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.logging.Level;
import java.util.logging.Logger;
import jig.engine.FontResource;
import jig.engine.RenderingContext;
import jig.engine.ResourceFactory;
import jig.engine.hli.StaticScreenGame;
public class PuzzleFighter extends StaticScreenGame {
final static double SCALE = 1.0;
AffineTransform LEFT_TRANSFORM;
AffineTransform RIGHT_TRANSFORM;
public final static int height = (int) (416 * SCALE);
public final static int width = (int) (700 * SCALE);
private PlayField pfLeft;
private PlayField pfRight;
public Socket socket = null;
public ServerSocket serv = null;
private boolean playing = false;
final static String RSC_PATH = "cs447/PuzzleFighter/resources/";
final static String GEM_SHEET = RSC_PATH + "gems.png";
final static String CUT_SHEET = RSC_PATH + "cutman.png";
final static String MEGA_SHEET = RSC_PATH + "megaman.png";
public static void main(String[] args) throws IOException {
PuzzleFighter game = new PuzzleFighter();
game.run();
}
public PuzzleFighter() throws IOException {
super(width, height, false);
ResourceFactory.getFactory().loadResources(RSC_PATH, "resources.xml");
LEFT_TRANSFORM = AffineTransform.getScaleInstance(SCALE, SCALE);
RIGHT_TRANSFORM = (AffineTransform) LEFT_TRANSFORM.clone();
RIGHT_TRANSFORM.translate(508, 0);
}
private void localMultiplayer() throws IOException {
socket = null;
pfLeft = new PlayField(6, 13, socket, false);
pfRight = new PlayField(6, 13, socket, true);
}
public void remoteClient(String host) throws IOException {
connectTo(host);
pfLeft = new PlayField(6, 13, socket, false);
pfRight = new RemotePlayfield(6, 13, socket);
}
public void remoteServer() throws IOException {
host();
pfLeft = new PlayField(6, 13, socket, false);
pfRight = new RemotePlayfield(6, 13, socket);
}
public void render(RenderingContext rc) {
super.render(rc);
if (playing) {
rc.setTransform(LEFT_TRANSFORM);
pfLeft.render(rc);
rc.setTransform(RIGHT_TRANSFORM);
pfRight.render(rc);
return;
}else{
FontResource font = ResourceFactory.getFactory().getFontResource(new Font("Sans Serif", Font.BOLD, 30),
java.awt.Color.red, null );
font.render("Puzzle Fighter", rc, AffineTransform.getTranslateInstance(280, 100));
font.render("1 - local multiplayer", rc, AffineTransform.getTranslateInstance(280, 150));
font.render("2 - remote host", rc, AffineTransform.getTranslateInstance(280, 200));
font.render("3 - remote client", rc, AffineTransform.getTranslateInstance(280, 250));
}
}
public void update(long deltaMs) {
if (playing) {
boolean down1 = keyboard.isPressed(KeyEvent.VK_S);
boolean left1 = keyboard.isPressed(KeyEvent.VK_A);
boolean right1 = keyboard.isPressed(KeyEvent.VK_D);
boolean ccw1 = keyboard.isPressed(KeyEvent.VK_Q);
boolean cw1 = keyboard.isPressed(KeyEvent.VK_E);
int garbage = pfLeft.update(deltaMs, down1, left1, right1, ccw1, cw1);
pfRight.garbage += garbage;
boolean down2 = keyboard.isPressed(KeyEvent.VK_K);
boolean left2 = keyboard.isPressed(KeyEvent.VK_J);
boolean right2 = keyboard.isPressed(KeyEvent.VK_L);
boolean ccw2 = keyboard.isPressed(KeyEvent.VK_U);
boolean cw2 = keyboard.isPressed(KeyEvent.VK_O);
int garbage2 = pfRight.update(deltaMs, down2, left2, right2, ccw2, cw2);
pfLeft.garbage += garbage2;
if(garbage2 == -1 || garbage == -1){
pfLeft.close();
pfRight.close();
playing = false;
if(socket != null){
try {
socket.close();
} catch (IOException ex) {
Logger.getLogger(PuzzleFighter.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
return;
}
if (keyboard.isPressed(KeyEvent.VK_1)) {
try {
localMultiplayer();
playing = true;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
else if (keyboard.isPressed(KeyEvent.VK_2)) {
try {
remoteServer();
playing = true;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
else if (keyboard.isPressed(KeyEvent.VK_3)) {
try {
remoteClient("71.193.145.84");
playing = true;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
public void connectTo(String host){
try {
socket = new Socket(host, 50623);
} catch (UnknownHostException ex) {
Logger.getLogger(PuzzleFighter.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(PuzzleFighter.class.getName()).log(Level.SEVERE, null, ex);
}
}
public void host(){
try {
serv = new ServerSocket(50623);
socket = serv.accept();
serv.close();
} catch (IOException ex) {
Logger.getLogger(PuzzleFighter.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e155993ff023cdf7848a974dc3defbde89c7ada4
|
2b2fcb1902206ad0f207305b9268838504c3749b
|
/WakfuClientSources/srcx/class_3134_bcZ.java
|
0927bc9682ef77bcd959006fd013d269ffad9e17
|
[] |
no_license
|
shelsonjava/Synx
|
4fbcee964631f747efc9296477dee5a22826791a
|
0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d
|
refs/heads/master
| 2021-01-15T13:51:41.816571
| 2013-11-17T10:46:22
| 2013-11-17T10:46:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
import javax.swing.JFrame;
import javax.swing.JPanel;
class bcZ
implements Runnable
{
bcZ(cwz paramcwz)
{
}
public void run()
{
cwz.a(this.fnw, new JFrame("Debug ANM"));
cwz.a(this.fnw).setContentPane(new JPanel());
cwz.a(this.fnw).setDefaultCloseOperation(3);
cwz.a(this.fnw).setSize(640, 480);
cwz.a(this.fnw).setVisible(true);
}
}
|
[
"music_inme@hotmail.fr"
] |
music_inme@hotmail.fr
|
1ea4c5bf5ef884d00eb852eb76629d6a7f5f65a3
|
af0048b7c1fddba3059ae44cd2f21c22ce185b27
|
/springframework/src/main/java/org/springframework/context/annotation/Lazy.java
|
8ac192752a4ea3ac07fef7c6726bd838fd27613d
|
[] |
no_license
|
P79N6A/whatever
|
4b51658fc536887c870d21b0c198738ed0d1b980
|
6a5356148e5252bdeb940b45d5bbeb003af2f572
|
refs/heads/master
| 2020-07-02T19:58:14.366752
| 2019-08-10T14:45:17
| 2019-08-10T14:45:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 307
|
java
|
package org.springframework.context.annotation;
import java.lang.annotation.*;
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Lazy {
boolean value() default true;
}
|
[
"heavenlystate@163.com"
] |
heavenlystate@163.com
|
819bb3d6038b26aa75ec2968429812031a95a231
|
d2c470f9e7c2f3a6b7133d0b486c022850fcf666
|
/sample/src/main/java/la/xiong/androidquick/demo/features/other/code/CodeFragment.java
|
c66bc6db0b846f76220a7b76ee90f35e5614f687
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
Jerryzouzou/AndroidQuick
|
c1872a66018efe376d14ae89730deee1cf7d3f64
|
b5ea6d7210559265862a936056e101941fa77c7a
|
refs/heads/master
| 2020-05-16T23:27:08.273400
| 2019-04-22T05:02:56
| 2019-04-22T05:02:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,014
|
java
|
package la.xiong.androidquick.demo.features.other.code;
import android.os.Bundle;
import butterknife.BindView;
import la.xiong.androidquick.demo.R;
import la.xiong.androidquick.demo.base.BaseFragment;
import la.xiong.androidquick.ui.view.CommonToolBar;
import us.feras.mdv.MarkdownView;
/**
* @author ddnosh
* @website http://blog.csdn.net/ddnosh
*/
public class CodeFragment extends BaseFragment {
@BindView(R.id.common_tool_bar)
CommonToolBar mCommonToolBar;
@BindView(R.id.mv_code)
MarkdownView mMvCode;
private Bundle mBundle;
@Override
protected void initViewsAndEvents(Bundle savedInstanceState) {
mBundle = getActivity().getIntent().getExtras();
mCommonToolBar.setTitle(mBundle.getString("title"));
mMvCode.loadMarkdownFile("file:///android_asset/HttpRequestCallbackString.md", "file:///android_asset/css-themes/classic.css");
}
@Override
protected int getContentViewLayoutID() {
return R.layout.fragment_other_code;
}
}
|
[
"cage.hung@gmail.com"
] |
cage.hung@gmail.com
|
f9258b0a75ec50c405448d9455c2649fc0942e21
|
c81dd37adb032fb057d194b5383af7aa99f79c6a
|
/java/com/facebook/react/modules/timepicker/TimePickerDialogFragment.java
|
9f4730ef315250905e2de52bdf6ef16fe3430c78
|
[] |
no_license
|
hongnam207/pi-network-source
|
1415a955e37fe58ca42098967f0b3307ab0dc785
|
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
|
refs/heads/main
| 2023-03-30T07:49:35.920796
| 2021-03-28T06:56:24
| 2021-03-28T06:56:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,961
|
java
|
package com.facebook.react.modules.timepicker;
import android.app.Dialog;
import android.app.TimePickerDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Build;
import android.os.Bundle;
import android.text.format.DateFormat;
import androidx.fragment.app.DialogFragment;
import java.util.Calendar;
import java.util.Locale;
public class TimePickerDialogFragment extends DialogFragment {
private DialogInterface.OnDismissListener mOnDismissListener;
private TimePickerDialog.OnTimeSetListener mOnTimeSetListener;
@Override // androidx.fragment.app.DialogFragment
public Dialog onCreateDialog(Bundle bundle) {
return createDialog(getArguments(), getActivity(), this.mOnTimeSetListener);
}
static Dialog createDialog(Bundle bundle, Context context, TimePickerDialog.OnTimeSetListener onTimeSetListener) {
Calendar instance = Calendar.getInstance();
int i = instance.get(11);
int i2 = instance.get(12);
boolean is24HourFormat = DateFormat.is24HourFormat(context);
TimePickerMode timePickerMode = TimePickerMode.DEFAULT;
if (!(bundle == null || bundle.getString("mode", null) == null)) {
timePickerMode = TimePickerMode.valueOf(bundle.getString("mode").toUpperCase(Locale.US));
}
if (bundle != null) {
i = bundle.getInt("hour", instance.get(11));
i2 = bundle.getInt("minute", instance.get(12));
is24HourFormat = bundle.getBoolean("is24Hour", DateFormat.is24HourFormat(context));
}
if (Build.VERSION.SDK_INT >= 21) {
if (timePickerMode == TimePickerMode.CLOCK) {
return new DismissableTimePickerDialog(context, context.getResources().getIdentifier("ClockTimePickerDialog", "style", context.getPackageName()), onTimeSetListener, i, i2, is24HourFormat);
}
if (timePickerMode == TimePickerMode.SPINNER) {
return new DismissableTimePickerDialog(context, context.getResources().getIdentifier("SpinnerTimePickerDialog", "style", context.getPackageName()), onTimeSetListener, i, i2, is24HourFormat);
}
}
return new DismissableTimePickerDialog(context, onTimeSetListener, i, i2, is24HourFormat);
}
@Override // androidx.fragment.app.DialogFragment
public void onDismiss(DialogInterface dialogInterface) {
super.onDismiss(dialogInterface);
DialogInterface.OnDismissListener onDismissListener = this.mOnDismissListener;
if (onDismissListener != null) {
onDismissListener.onDismiss(dialogInterface);
}
}
public void setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) {
this.mOnDismissListener = onDismissListener;
}
public void setOnTimeSetListener(TimePickerDialog.OnTimeSetListener onTimeSetListener) {
this.mOnTimeSetListener = onTimeSetListener;
}
}
|
[
"nganht2@vng.com.vn"
] |
nganht2@vng.com.vn
|
5b7ef18841f0f5c01bf0ec52b5352850ce41120a
|
89ce74f7132847612aded67ff6468cb5d6a15112
|
/src/test/java/j7orm/test/testsuite/hsqldb/HSQLDBTestDAO.java
|
b349a6f523d07c7996c954d052aecfab35f6164e
|
[
"Apache-2.0"
] |
permissive
|
marcoromagnolo/j7ORM
|
3e1d31825a09d04869799e7b7fc624546269d7f2
|
ffb508bf27bc63676c850e56f172a66de9d186b0
|
refs/heads/master
| 2021-05-10T09:21:45.891379
| 2018-01-25T14:27:56
| 2018-01-25T14:27:56
| 118,923,452
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,120
|
java
|
/**
* Copyright 2016 Marco Romagnolo
*
* 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 j7orm.test.testsuite.hsqldb;
import j7orm.DBConnection;
import j7orm.DBFactory;
import j7orm.exception.ConnectionException;
import j7orm.exception.OrmException;
import j7orm.test.testcase.PrintUtil;
import j7orm.test.testcase.TestDAO;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
/**
* @author Marco Romagnolo
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class HSQLDBTestDAO {
private static TestDAO test;
@BeforeClass
public static void configure() throws ConnectionException {
PrintUtil.suite(HSQLDBTestDAO.class.getName());
DBConnection connection = DBFactory.newInstance(new HSQLDBConfig()).getConnection();
test = new TestDAO(connection);
}
@Test
public void test1_insert() throws OrmException {
test.insert();
}
@Test
public void test2_findAll() throws OrmException {
test.findAll();
}
@Test
public void test3_find() throws OrmException {
test.find();
}
@Test
public void test4_update() throws OrmException {
test.update();
}
@Test
public void test5_delete() throws OrmException {
test.delete();
}
@Test
public void test6_deleteAll() throws OrmException {
test.deleteAll();
}
@AfterClass
public static void disconnect() throws ConnectionException {
DBFactory.getInstance().disconnect();
}
}
|
[
"mail@marcoromagnolo.it"
] |
mail@marcoromagnolo.it
|
6fcca3012aef6131069a8fe0d065297c4ee985c4
|
3b91ed788572b6d5ac4db1bee814a74560603578
|
/com/tencent/mm/plugin/game/gamewebview/jsapi/biz/j$1.java
|
ed70d05f53a43a445a532ec6c8095f83b41b50e3
|
[] |
no_license
|
linsir6/WeChat_java
|
a1deee3035b555fb35a423f367eb5e3e58a17cb0
|
32e52b88c012051100315af6751111bfb6697a29
|
refs/heads/master
| 2020-05-31T05:40:17.161282
| 2018-08-28T02:07:02
| 2018-08-28T02:07:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,561
|
java
|
package com.tencent.mm.plugin.game.gamewebview.jsapi.biz;
import android.content.Intent;
import com.tencent.mm.plugin.game.gamewebview.ui.d;
import com.tencent.mm.plugin.webview.model.WebViewJSSDKFileItem;
import com.tencent.mm.plugin.webview.model.WebViewJSSDKVideoItem;
import com.tencent.mm.sdk.platformtools.bi;
import com.tencent.mm.sdk.platformtools.x;
import com.tencent.mm.ui.MMActivity.a;
import java.util.HashMap;
import java.util.Map;
class j$1 implements a {
final /* synthetic */ int doP;
final /* synthetic */ d jGF;
j$1(d dVar, int i) {
this.jGF = dVar;
this.doP = i;
}
public final void b(int i, int i2, Intent intent) {
String stringExtra;
WebViewJSSDKFileItem Db;
WebViewJSSDKVideoItem webViewJSSDKVideoItem;
if (i == 45) {
switch (i2) {
case -1:
stringExtra = intent.getStringExtra("key_pick_local_media_local_id");
String stringExtra2 = intent.getStringExtra("key_pick_local_media_thumb_local_id");
x.i("MicroMsg.GameJsApiChooseVideo", "localId:%s", new Object[]{stringExtra});
x.i("MicroMsg.GameJsApiChooseVideo", "thumbLocalId:%s", new Object[]{stringExtra2});
if (bi.oW(stringExtra)) {
this.jGF.E(this.doP, com.tencent.mm.plugin.game.gamewebview.a.d.f("recordVideo:fail", null));
return;
}
Db = com.tencent.mm.plugin.game.gamewebview.a.d.Db(stringExtra);
if (Db == null || !(Db instanceof WebViewJSSDKVideoItem)) {
this.jGF.E(this.doP, com.tencent.mm.plugin.game.gamewebview.a.d.f("recordVideo:fail", null));
return;
}
webViewJSSDKVideoItem = (WebViewJSSDKVideoItem) Db;
Map hashMap = new HashMap();
hashMap.put("localId", stringExtra);
hashMap.put("duration", Integer.valueOf(webViewJSSDKVideoItem.duration));
hashMap.put("height", Integer.valueOf(webViewJSSDKVideoItem.height));
hashMap.put("size", Integer.valueOf(webViewJSSDKVideoItem.size));
hashMap.put("width", Integer.valueOf(webViewJSSDKVideoItem.width));
hashMap.put("thumbLocalId", stringExtra2);
this.jGF.E(this.doP, com.tencent.mm.plugin.game.gamewebview.a.d.f("recordVideo:ok", hashMap));
return;
case 0:
this.jGF.E(this.doP, com.tencent.mm.plugin.game.gamewebview.a.d.f("recordVideo:cancel", null));
return;
default:
this.jGF.E(this.doP, com.tencent.mm.plugin.game.gamewebview.a.d.f("recordVideo:fail", null));
return;
}
} else if (i == 32) {
switch (i2) {
case -1:
stringExtra = intent.getStringExtra("key_pick_local_media_local_id");
if (!bi.oW(stringExtra)) {
Db = com.tencent.mm.plugin.game.gamewebview.a.d.Db(stringExtra);
if (Db == null || !(Db instanceof WebViewJSSDKVideoItem)) {
this.jGF.E(this.doP, com.tencent.mm.plugin.game.gamewebview.a.d.f("chooseVideo:fail", null));
return;
}
webViewJSSDKVideoItem = (WebViewJSSDKVideoItem) Db;
Map hashMap2 = new HashMap();
hashMap2.put("localId", stringExtra);
hashMap2.put("duration", Integer.valueOf(webViewJSSDKVideoItem.duration));
hashMap2.put("height", Integer.valueOf(webViewJSSDKVideoItem.height));
hashMap2.put("size", Integer.valueOf(webViewJSSDKVideoItem.size));
hashMap2.put("width", Integer.valueOf(webViewJSSDKVideoItem.width));
this.jGF.E(this.doP, com.tencent.mm.plugin.game.gamewebview.a.d.f("chooseVideo:ok", hashMap2));
return;
}
break;
case 0:
this.jGF.E(this.doP, com.tencent.mm.plugin.game.gamewebview.a.d.f("chooseVideo:cancel", null));
return;
}
this.jGF.E(this.doP, com.tencent.mm.plugin.game.gamewebview.a.d.f("chooseVideo:fail", null));
}
}
}
|
[
"707194831@qq.com"
] |
707194831@qq.com
|
15ad1ea05be237e5b2005b0d210a7fc7a4986b1a
|
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
|
/app/src/main/wechat6.5.3/com/tencent/mm/plugin/offline/ui/a.java
|
98fad7942f813b67fdb613afdc2e16d02e75019f
|
[] |
no_license
|
newtonker/wechat6.5.3
|
8af53a870a752bb9e3c92ec92a63c1252cb81c10
|
637a69732afa3a936afc9f4679994b79a9222680
|
refs/heads/master
| 2020-04-16T03:32:32.230996
| 2017-06-15T09:54:10
| 2017-06-15T09:54:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 144
|
java
|
package com.tencent.mm.plugin.offline.ui;
public interface a {
void aES();
void aET();
void p(int i, String str, String str2);
}
|
[
"zhangxhbeta@gmail.com"
] |
zhangxhbeta@gmail.com
|
b896dcf6c6aa67b7c298b10c9f1bee03b8799bee
|
8f38afc8cccffb2db97a7bcb0ff41df5ba2bf5ca
|
/Assigment_Java4/src/com/vn/controller/Home_ServletND.java
|
65463156e9f698531514c87ab4916ea28ea841eb
|
[] |
no_license
|
toannvph05233/Assignment_Java4
|
2f3c72ac88518214bed1578ecf67a0b8272af94e
|
ad9b8a6b7a8d4f7346aa4c9c2f27bffd705d1851
|
refs/heads/master
| 2022-12-08T19:34:13.377166
| 2020-08-15T02:38:16
| 2020-08-15T02:38:16
| 287,663,953
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,524
|
java
|
package com.vn.controller;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.vn.model.NguoiDungEntity;
import com.vn.service.Controller_ND;
import com.vn.service.NguoiDungService;
@WebServlet(name = "Home_ServletND", urlPatterns = {"/homeND"})
public class Home_ServletND extends HttpServlet {
Controller_ND controller_nd = new Controller_ND();
ArrayList<NguoiDungEntity> listND = (ArrayList<NguoiDungEntity>) new NguoiDungService().getAllNguoiDung();
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String action = request.getParameter("action");
if (action == null) {
action = "";
}
switch (action) {
case "create":
createND(request, response);
break;
case "edit":
updateND(request, response);
break;
case "delete":
deleteND(request, response);
break;
default:
showlistND(request, response);
break;
}
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String action = request.getParameter("action");
if (action == null) {
action = "";
}
switch (action) {
case "create":
showCreateND(request, response);
break;
case "edit":
showEditND(request, response);
break;
case "delete":
showDeleteND(request, response);
break;
default:
showlistND(request, response);
break;
}
}
private void showCreateND(HttpServletRequest request, HttpServletResponse response) {
request.setAttribute("listND", listND);
RequestDispatcher dispatcher;
dispatcher = request.getRequestDispatcher("createND.jsp");
try {
dispatcher.forward(request, response);
} catch (ServletException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
private void showlistND(HttpServletRequest request, HttpServletResponse response) {
RequestDispatcher dispatcher;
request.setAttribute("listND", listND);
dispatcher = request.getRequestDispatcher("quanly_user/listND.jsp");
try {
dispatcher.forward(request, response);
} catch (ServletException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
private void deleteND(HttpServletRequest request, HttpServletResponse response) {
String user = request.getParameter("id");
NguoiDungEntity nguoiDung = controller_nd.findByIdND(listND, user);
int id = controller_nd.findIndexND(listND, user);
RequestDispatcher dispatcher;
if (nguoiDung == null) {
dispatcher = request.getRequestDispatcher("error-404.jsp");
} else {
this.controller_nd.deleteND(listND, id);
try {
response.sendRedirect("homeND");
// request.getRequestDispatcher("listSP.jsp").forward(request,response);
} catch (IOException e) {
e.printStackTrace();
}
}
}
private void showDeleteND(HttpServletRequest request, HttpServletResponse response) {
String user = request.getParameter("id");
NguoiDungEntity nguoiDung = controller_nd.findByIdND(listND, user);
RequestDispatcher dispatcher;
if (nguoiDung == null) {
dispatcher = request.getRequestDispatcher("error-404.jsp");
} else {
request.setAttribute("nguoiDung", nguoiDung);
dispatcher = request.getRequestDispatcher("quanly_user/deleteND.jsp");
}
try {
dispatcher.forward(request, response);
} catch (ServletException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
private void updateND(HttpServletRequest request, HttpServletResponse response) {
String user = request.getParameter("id");
NguoiDungEntity nguoiDung = controller_nd.findByIdND(listND, user);
int id = controller_nd.findIndexND(listND, user);
String userND = request.getParameter("user");
String password = request.getParameter("password");
String fullname = request.getParameter("fullname");
int sdt = Integer.parseInt(request.getParameter("sdt"));
RequestDispatcher dispatcher;
if (nguoiDung == null) {
dispatcher = request.getRequestDispatcher("error-404.jsp");
} else {
nguoiDung.setIdUser(userND);
nguoiDung.setPassword(password);
nguoiDung.setFullName(fullname);
nguoiDung.setSdt(sdt);
this.controller_nd.editND(listND, nguoiDung, id);
request.setAttribute("listND", listND);
dispatcher = request.getRequestDispatcher("quanly_user/listND.jsp");
}
try {
dispatcher.forward(request, response);
} catch (ServletException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
private void showEditND(HttpServletRequest request, HttpServletResponse response) {
String user = request.getParameter("id");
NguoiDungEntity nguoiDung = controller_nd.findByIdND(listND, user);
RequestDispatcher dispatcher;
if (nguoiDung == null) {
dispatcher = request.getRequestDispatcher("error-404.jsp");
} else {
request.setAttribute("nguoiDung", nguoiDung);
dispatcher = request.getRequestDispatcher("quanly_user/editND.jsp");
}
try {
dispatcher.forward(request, response);
} catch (ServletException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
private void createND(HttpServletRequest request, HttpServletResponse response) {
String userND = request.getParameter("userND");
String password = request.getParameter("password");
String fullname = request.getParameter("fullname");
int sdt = Integer.parseInt(request.getParameter("sdt"));
int idloaiuser = Integer.parseInt(request.getParameter("idloaiuser"));
String loaiuser = request.getParameter("loaiuser");
RequestDispatcher dispatcher;
NguoiDungEntity nguoiDung = new NguoiDungEntity(userND, password, fullname, sdt,idloaiuser);
this.controller_nd.createND(listND, nguoiDung);
request.setAttribute("listND", listND);
dispatcher = request.getRequestDispatcher("quanly_user/listND.jsp");
try {
dispatcher.forward(request, response);
} catch (ServletException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
[
"="
] |
=
|
4f6cf51dc8f4f689cafac03ba8f1e54d23da6c8c
|
2f7ecc2315532ff1d5d67079e613660b97e58c9e
|
/app/src/main/java/com/example/user/livestreaming/Hotfiest.java
|
1128a2f49f4b3128b4023b0fa036ccddf072990b
|
[] |
no_license
|
mukulraw/Live-Streaming
|
969fb2eb8323b9669d1bd4134ca3ffc46070bf72
|
fdf01574c1c209481e330fb989ba99a4a2bda9b1
|
refs/heads/master
| 2021-05-11T18:50:00.589777
| 2018-02-21T13:49:53
| 2018-02-21T13:49:53
| 117,843,750
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,876
|
java
|
package com.example.user.livestreaming;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by USER on 17-01-2018.
*/
public class Hotfiest extends Fragment {
RecyclerView grid;
GridLayoutManager manager;
LiveAdapter adapter;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.hotfirst , container , false);
grid = view.findViewById(R.id.grid);
manager = new GridLayoutManager(getContext() , 2);
adapter = new LiveAdapter(getContext());
grid.setLayoutManager(manager);
grid.setAdapter(adapter);
return view;
}
public class LiveAdapter extends RecyclerView.Adapter<LiveAdapter.MyViewHolder> {
Context context;
public LiveAdapter(Context context){
this.context = context;
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.grid_list_model , parent , false);
return new MyViewHolder(view);
}
@Override
public void onBindViewHolder(MyViewHolder holder, int position) {
}
@Override
public int getItemCount() {
return 15;
}
public class MyViewHolder extends RecyclerView.ViewHolder{
public MyViewHolder(View itemView) {
super(itemView);
}
}
}
}
|
[
"mukulraw199517@gmail.com"
] |
mukulraw199517@gmail.com
|
4708dcfb4e2281db137b8f2b2cc8bcbd9893dd86
|
ed1d3bb7da6004064e8cdc7bf842715a3e6d357c
|
/binding/mdsal-binding-dom-adapter/src/test/java/org/opendaylight/mdsal/binding/dom/adapter/test/Bug5845booleanKeyTest.java
|
ef938040fb98bb9fbf276dd9e8a78bc29373f371
|
[] |
no_license
|
crisbermud/mdsal
|
f65f67f90a9522726bb46e729e9906334cef8572
|
9e218c9d98dadef77bc8beabae6e4d3731468868
|
refs/heads/master
| 2021-01-22T03:14:09.365197
| 2017-02-03T15:08:46
| 2017-02-03T17:09:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,942
|
java
|
/*
* Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.mdsal.binding.dom.adapter.test;
import static org.junit.Assert.assertNotNull;
import java.util.Collections;
import javassist.ClassPool;
import org.junit.Test;
import org.opendaylight.mdsal.binding.dom.adapter.BindingToNormalizedNodeCodec;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeNode;
import org.opendaylight.yang.gen.v1.urn.yang.foo.rev160101.BooleanContainer;
import org.opendaylight.yang.gen.v1.urn.yang.foo.rev160101.BooleanContainerBuilder;
import org.opendaylight.yang.gen.v1.urn.yang.foo.rev160101._boolean.container.BooleanListBuilder;
import org.opendaylight.yang.gen.v1.urn.yang.foo.rev160101._boolean.container.BooleanListIntBuilder;
import org.opendaylight.yang.gen.v1.urn.yang.foo.rev160101._boolean.container.BooleanListIntKey;
import org.opendaylight.yang.gen.v1.urn.yang.foo.rev160101._boolean.container.BooleanListKey;
import org.opendaylight.yangtools.binding.data.codec.gen.impl.StreamWriterGenerator;
import org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry;
import org.opendaylight.yangtools.sal.binding.generator.impl.GeneratedClassLoadingStrategy;
import org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext;
import org.opendaylight.yangtools.sal.binding.generator.util.JavassistUtils;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.util.BindingReflections;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
public class Bug5845booleanKeyTest extends AbstractDataBrokerTest {
@Test
public void testBug5845() throws Exception {
final BindingToNormalizedNodeCodec mappingService = new BindingToNormalizedNodeCodec(
GeneratedClassLoadingStrategy.getTCCLClassLoadingStrategy(), new BindingNormalizedNodeCodecRegistry(
StreamWriterGenerator.create(JavassistUtils.forClassPool(ClassPool.getDefault()))));
final ModuleInfoBackedContext moduleInfoBackedContext = ModuleInfoBackedContext.create();
moduleInfoBackedContext.registerModuleInfo(BindingReflections.getModuleInfo(BooleanContainer.class));
mappingService.onGlobalContextUpdated(moduleInfoBackedContext.tryToCreateSchemaContext().get());
final BooleanContainer booleanContainer = new BooleanContainerBuilder().setBooleanList(Collections
.singletonList(new BooleanListBuilder()
.setKey(new BooleanListKey(true, true))
.setBooleanLeaf1(true)
.setBooleanLeaf2(true)
.build()))
.build();
final BooleanContainer booleanContainerInt = new BooleanContainerBuilder().setBooleanListInt(Collections
.singletonList(new BooleanListIntBuilder()
.setKey(new BooleanListIntKey((byte) 1))
.setBooleanLeafInt((byte) 1)
.build()))
.build();
final BindingCodecTree codecContext = mappingService.getCodecFactory().getCodecContext();
final BindingCodecTreeNode<BooleanContainer> subtreeCodec = codecContext.getSubtreeCodec(
InstanceIdentifier.create(BooleanContainer.class));
final NormalizedNode<?, ?> serializedInt = subtreeCodec.serialize(booleanContainerInt);
assertNotNull(serializedInt);
final NormalizedNode<?, ?> serialized = subtreeCodec.serialize(booleanContainer);
assertNotNull(serialized);
}
}
|
[
"nite@hq.sk"
] |
nite@hq.sk
|
51bd37d98b70a49e7e5033b1adbe544930ebf06b
|
d75d5078fbaafa53139c5e59fac8733f42f297b9
|
/UserService/src/main/java/com/stackroute/keepnote/UserServiceApplication.java
|
d800a6a4f5164cca1e7d854eb4a244d803b4a1c3
|
[] |
no_license
|
abhishekkumar95/KeepNoteStep6
|
b35bc0cd9525646bdf4dc7d355ef018240e31148
|
87f4573b76a30fecd24424f7eb64673ee125c146
|
refs/heads/master
| 2020-04-06T19:47:41.509720
| 2018-11-15T17:45:03
| 2018-11-15T17:45:03
| 157,749,848
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 789
|
java
|
package com.stackroute.keepnote;
import com.stackroute.keepnote.jwtfilter.JwtFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
@SpringBootApplication
public class UserServiceApplication {
@Bean
public FilterRegistrationBean jwtFilter() {
final FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setFilter(new JwtFilter());
registrationBean.addUrlPatterns("/api/v1/*");
return registrationBean;
}
public static void main(String[] args) {
SpringApplication.run(UserServiceApplication.class, args);
}
}
|
[
"rutuja.bacchuwar@stackroute.in"
] |
rutuja.bacchuwar@stackroute.in
|
da3c1e8306c0372a0a987209c8c8c7f24e107fc1
|
8520e57a45c3b8b09a90f6677a4c9d323c628d3b
|
/metaprogramming/src/metaprogramming/cap1/ex4/GeradorMapaPerformance.java
|
31166048213906e44f890c37b1971a34bf9710c7
|
[] |
no_license
|
leonarita/Java
|
e58156f7ef409884a3dfe2c3d8ab84a4b57984f1
|
7dc31112de4d8006f61f2bda1ce4e2b757bbda54
|
refs/heads/master
| 2023-08-18T15:27:43.598098
| 2022-05-22T15:28:44
| 2022-05-22T15:28:44
| 252,060,876
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 1,654
|
java
|
package metaprogramming.cap1.ex4;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
public class GeradorMapaPerformance {
private Map<String, Method> propriedades = new HashMap<>();
private Class<?> classe;
public GeradorMapaPerformance(Class<?> classe) {
this.classe = classe;
for (Method m : classe.getMethods()) {
if (isGetter(m)){
String propriedade = null;
if (m.isAnnotationPresent(NomePropriedade.class)) {
propriedade = m.getAnnotation(NomePropriedade.class).value();
}
else {
propriedade = deGetterParaPropriedade(m.getName());
}
propriedades.put(propriedade, m);
}
}
}
public Map<String, Object> gerarMapa(Object o) {
if (!classe.isInstance(o)) {
throw new RuntimeException("O objeto não é da classe" + classe.getName());
}
Map<String, Object> mapa = new HashMap<>();
for (String propriedade : propriedades.keySet()) {
try{
Method m = propriedades.get(propriedade);
Object valor = m.invoke(o);
mapa.put(propriedade, valor);
}
catch (Exception e) {
throw new RuntimeException("Problema ao gerar o mapa", e);
}
}
return mapa;
}
private static boolean isGetter(Method m) {
return m.getName().startsWith("get") && m.getReturnType() != void.class
&& m.getParameterTypes().length == 0 && !m.isAnnotationPresent(Ignorar.class);
}
private static String deGetterParaPropriedade(String nomeGetter) {
StringBuffer retorno = new StringBuffer();
retorno.append(nomeGetter.substring(3, 4).toLowerCase());
retorno.append(nomeGetter.substring(4));
return retorno.toString();
}
}
|
[
"leo_narita@hotmail.com"
] |
leo_narita@hotmail.com
|
3287c4b6f56d1609a4f90087838f8ba14fef5341
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/boot/svg/code/drawable/qqmail_attach_icon_normal.java
|
700d26145091331c29040d0615a26558610e47d9
|
[] |
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
| 5,834
|
java
|
package com.tencent.mm.boot.svg.code.drawable;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.WeChatSVGRenderC2Java;
import com.tencent.mm.svg.c;
public class qqmail_attach_icon_normal
extends c
{
private final int height = 96;
private final int width = 96;
public int doCommand(int paramInt, Object... paramVarArgs)
{
switch (paramInt)
{
}
for (;;)
{
return 0;
return 96;
return 96;
Canvas localCanvas = (Canvas)paramVarArgs[0];
paramVarArgs = (Looper)paramVarArgs[1];
Object localObject = c.instanceMatrix(paramVarArgs);
float[] arrayOfFloat = c.instanceMatrixArray(paramVarArgs);
Paint localPaint1 = c.instancePaint(paramVarArgs);
localPaint1.setFlags(385);
localPaint1.setStyle(Paint.Style.FILL);
Paint localPaint2 = c.instancePaint(paramVarArgs);
localPaint2.setFlags(385);
localPaint2.setStyle(Paint.Style.STROKE);
localPaint1.setColor(-16777216);
localPaint2.setStrokeWidth(1.0F);
localPaint2.setStrokeCap(Paint.Cap.BUTT);
localPaint2.setStrokeJoin(Paint.Join.MITER);
localPaint2.setStrokeMiter(4.0F);
localPaint2.setPathEffect(null);
c.instancePaint(localPaint2, paramVarArgs).setStrokeWidth(1.0F);
localCanvas.save();
localPaint1 = c.instancePaint(localPaint1, paramVarArgs);
localPaint1.setColor(-6250336);
arrayOfFloat = c.setMatrixFloatArray(arrayOfFloat, 0.7071068F, -0.7071068F, 48.0F, 0.7071068F, 0.7071068F, -19.882248F, 0.0F, 0.0F, 1.0F);
((Matrix)localObject).reset();
((Matrix)localObject).setValues(arrayOfFloat);
localCanvas.concat((Matrix)localObject);
localObject = c.instancePath(paramVarArgs);
((Path)localObject).moveTo(62.0F, 28.517904F);
((Path)localObject).lineTo(62.0F, 66.0F);
((Path)localObject).lineTo(67.0F, 66.0F);
((Path)localObject).lineTo(67.0F, 28.517904F);
((Path)localObject).cubicTo(66.999977F, 28.51194F, 67.0F, 28.505972F, 67.0F, 28.5F);
((Path)localObject).cubicTo(67.0F, 27.119287F, 65.880714F, 26.0F, 64.5F, 26.0F);
((Path)localObject).cubicTo(63.119289F, 26.0F, 62.0F, 27.119287F, 62.0F, 28.5F);
((Path)localObject).cubicTo(62.0F, 28.505972F, 62.000019F, 28.51194F, 62.000061F, 28.517904F);
((Path)localObject).close();
((Path)localObject).moveTo(40.0F, 39.482143F);
((Path)localObject).lineTo(40.0F, 66.0F);
((Path)localObject).lineTo(45.0F, 66.0F);
((Path)localObject).lineTo(45.0F, 39.482143F);
((Path)localObject).cubicTo(44.990337F, 38.10965F, 43.874756F, 37.0F, 42.5F, 37.0F);
((Path)localObject).cubicTo(41.125244F, 37.0F, 40.009663F, 38.10965F, 40.000061F, 39.482143F);
((Path)localObject).lineTo(40.0F, 39.482143F);
((Path)localObject).close();
((Path)localObject).moveTo(55.997478F, 24.0F);
((Path)localObject).cubicTo(55.856998F, 16.796801F, 49.867767F, 11.0F, 42.5F, 11.0F);
((Path)localObject).cubicTo(35.132233F, 11.0F, 29.143F, 16.796801F, 29.002523F, 24.0F);
((Path)localObject).lineTo(34.014462F, 24.0F);
((Path)localObject).cubicTo(34.27327F, 19.538311F, 37.973427F, 16.0F, 42.5F, 16.0F);
((Path)localObject).cubicTo(47.026573F, 16.0F, 50.72673F, 19.538311F, 50.985538F, 24.0F);
((Path)localObject).lineTo(55.997478F, 24.0F);
((Path)localObject).close();
((Path)localObject).moveTo(67.0F, 66.0F);
((Path)localObject).cubicTo(67.0F, 76.493408F, 58.493412F, 85.0F, 48.0F, 85.0F);
((Path)localObject).cubicTo(37.506588F, 85.0F, 29.0F, 76.493408F, 29.0F, 66.0F);
((Path)localObject).lineTo(34.0F, 66.0F);
((Path)localObject).cubicTo(34.0F, 73.731987F, 40.268013F, 80.0F, 48.0F, 80.0F);
((Path)localObject).cubicTo(55.731987F, 80.0F, 62.0F, 73.731987F, 62.0F, 66.0F);
((Path)localObject).lineTo(67.0F, 66.0F);
((Path)localObject).lineTo(67.0F, 66.0F);
((Path)localObject).close();
((Path)localObject).moveTo(56.0F, 66.0F);
((Path)localObject).cubicTo(56.0F, 70.418282F, 52.418278F, 74.0F, 48.0F, 74.0F);
((Path)localObject).cubicTo(43.581722F, 74.0F, 40.0F, 70.418282F, 40.0F, 66.0F);
((Path)localObject).lineTo(45.0F, 66.0F);
((Path)localObject).cubicTo(45.0F, 67.656853F, 46.343147F, 69.0F, 48.0F, 69.0F);
((Path)localObject).cubicTo(49.656853F, 69.0F, 51.0F, 67.656853F, 51.0F, 66.0F);
((Path)localObject).lineTo(56.0F, 66.0F);
((Path)localObject).lineTo(56.0F, 66.0F);
((Path)localObject).close();
((Path)localObject).moveTo(29.0F, 24.0F);
((Path)localObject).lineTo(34.0F, 24.0F);
((Path)localObject).lineTo(34.0F, 66.0F);
((Path)localObject).lineTo(29.0F, 66.0F);
((Path)localObject).lineTo(29.0F, 24.0F);
((Path)localObject).close();
((Path)localObject).moveTo(51.0F, 24.0F);
((Path)localObject).lineTo(56.0F, 24.0F);
((Path)localObject).lineTo(56.0F, 66.0F);
((Path)localObject).lineTo(51.0F, 66.0F);
((Path)localObject).lineTo(51.0F, 24.0F);
((Path)localObject).close();
WeChatSVGRenderC2Java.setFillType((Path)localObject, 2);
localCanvas.drawPath((Path)localObject, localPaint1);
localCanvas.restore();
c.done(paramVarArgs);
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes12.jar
* Qualified Name: com.tencent.mm.boot.svg.code.drawable.qqmail_attach_icon_normal
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
66f67aa52dd6552a11cadb0fbd9a97b378674fe4
|
aa73bff25e73923515048d4790f5e1994474b20b
|
/src/main/java/com/suchao/learn/redis/service/AutoCompleteService.java
|
7f0356086e7a96248cc1be2d40c8d19616d230e7
|
[] |
no_license
|
suchaos/learn-redis
|
782cff2a6cd0267d962d40bc6829e4677caf24c1
|
cf93d264e9afa9f261237df7b1648a82be45eb07
|
refs/heads/master
| 2023-04-07T12:01:27.109665
| 2021-04-02T11:40:11
| 2021-04-02T11:40:11
| 354,000,923
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,778
|
java
|
package com.suchao.learn.redis.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import java.util.Set;
/**
* 自动补全 -- redis zset
*
* @author suchao
* @date 2021/4/1
*/
@Service
public class AutoCompleteService {
@Autowired
private StringRedisTemplate stringRedisTemplate;
/**
* 搜索某个关键词 -- 相当于训练过程
*
* @param keyword keyword
*/
public void search(String keyword) {
char[] keywordCharArray = keyword.toCharArray();
// 我喜欢学习
// 我:: score + 我喜欢学习
// 我喜:: score + 我喜欢学习
StringBuilder potentialKeyword = new StringBuilder("");
for (char keywordChar : keywordCharArray) {
potentialKeyword.append(keywordChar);
stringRedisTemplate.opsForZSet().
incrementScore(getPotentialKeywordKeyByChar(potentialKeyword.toString()), keyword, 1);
}
}
/**
* 获取自动补全的集合 -- 推荐 count 个
*
* @param keyword
* @param start
* @param end
* @return
*/
public Set<String> getAutoCompleteList(String keyword, int start, int end) {
return stringRedisTemplate.opsForZSet().reverseRange(getPotentialKeywordKeyByChar(keyword), start, end);
}
private String getPotentialKeywordKeyByChar(String potentialKeyword) {
return "potential_keyword::" + potentialKeyword + "::keywords";
}
public static void main(String[] args) {
char[] chars = "我喜欢学习".toCharArray();
for (char c : chars) {
System.out.println(c);
}
}
}
|
[
"suchao193@gmail.com"
] |
suchao193@gmail.com
|
2817b3146f4af9064b23755b0ab17ba06b45e5d1
|
1034cf20dae3273100b1ae3e3446021a78644a1e
|
/demo01/src/test/java/CircularBufferTest.java
|
f3f56f7d53f9266c0c4986fa325a5606a789fa6b
|
[] |
no_license
|
up1/demo-tdd-java-20171212
|
2fc72bf6b14af167122c2c32533356a43f325f1e
|
dcff270bcb4c8e79048f1a2a664df46f340e4938
|
refs/heads/master
| 2021-05-06T07:15:07.883487
| 2017-12-13T03:44:08
| 2017-12-13T03:44:08
| 113,950,365
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,496
|
java
|
import org.junit.*;
import static org.junit.Assert.*;
public class CircularBufferTest {
CircularBuffer buffer = new CircularBuffer();
@Test(expected = MyBufferOverflowException.class)
public void error() {
buffer.xxx();
}
@Before
public void xxxx() {
System.out.println("Before");
}
@After
public void yyyy() {
System.out.println("After");
}
@BeforeClass
public static void a() {
System.out.println("BeforeClass");
}
@AfterClass
public static void b() {
System.out.println("AfterClass");
}
@Test
public void เมื่อเพิ่มABเข้าไปและอ่านมาทั้งหมดต้องว่าง() {
//Arrange
buffer.write("A");
buffer.write("B");
buffer.read();
buffer.read();
//Assert
assertTrue("Buffer มันไม่ว่าง", buffer.isEmpty());
}
@Test
public void เมื่อเพิ่มABเข้าไปแล้วอ่านมาต้องเป็นAB() {
//Arrange
buffer.write("A");
buffer.write("B");
//Assert
assertEquals("A", buffer.read());
assertEquals("B", buffer.read());
}
@Test
public void เมื่อเพิ่มBเข้าไปแล้วอ่านมาต้องเป็นB() {
//Arrange
buffer.write("B");
//Act
String actual = buffer.read();
//Assert
assertEquals("B", actual);
}
@Test
public void เมื่อเพิ่มAเข้าไปแล้วอ่านมาต้องเป็นA() {
//Arrange
buffer.write("A");
//Act
String actual = buffer.read();
//Assert
assertEquals("A", actual);
}
@Test
public void เมื่อสร้างbufferและเพิ่มAเข้าไปแล้วต้องไม่ว่าง() {
//Arrange
buffer.write("A");
//Act
boolean actual = buffer.isEmpty();
//Assert
assertFalse("Buffer มันว่าง", actual);
}
@Test
public void เมื่อสร้างbufferแล้วต้องว่าง() {
//Arrange
//Act
boolean actual = buffer.isEmpty();
//Assert
assertTrue("Buffer มันไม่ว่าง", actual);
}
}
|
[
"somkiat.p@gmail.com"
] |
somkiat.p@gmail.com
|
0aaa4b5a93728e3970ce45fc213f936dd508470b
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/no_seeding/27_gangup-module.ConfigModule-1.0-3/module/ConfigModule_ESTest.java
|
165f756041cbf722fccc290978c4e6114f2f36d1
|
[] |
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
| 636
|
java
|
/*
* This file was automatically generated by EvoSuite
* Mon Oct 28 15:45:10 GMT 2019
*/
package module;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class ConfigModule_ESTest extends ConfigModule_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
23a42a7ca61709d78693565ef0653b45a1e9c0e3
|
caa4240261bafa67e9d209606bf3e1bf84ae9796
|
/app/src/main/java/io/github/hidroh/materialistic/WebFragment.java
|
b97f8336c1c7ba82e73bf473fc8d4d8356c1f2ca
|
[
"Apache-2.0"
] |
permissive
|
winiceo/materialistic
|
ab2e7e3fa8e4e5fce9003acde853bfd2b7ef2ee6
|
e53fe2114daa84577caa913df20b313b80d31d9e
|
refs/heads/master
| 2021-01-16T22:11:02.741500
| 2015-03-02T16:12:29
| 2015-03-02T16:12:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,601
|
java
|
package io.github.hidroh.materialistic;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.DownloadListener;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import io.github.hidroh.materialistic.data.ItemManager;
public class WebFragment extends Fragment {
private static final String EXTRA_ITEM = WebFragment.class.getName() + ".EXTRA_ITEM";
private ItemManager.WebItem mItem;
private WebView mWebView;
public static WebFragment instantiate(Context context, ItemManager.WebItem item) {
final WebFragment fragment = (WebFragment) Fragment.instantiate(context, WebFragment.class.getName());
fragment.mItem = item;
return fragment;
}
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final View view = getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_web, container, false);
final ProgressBar progressBar = (ProgressBar) view.findViewById(R.id.progress);
mWebView = (WebView) view.findViewById(R.id.web_view);
mWebView.setBackgroundColor(Color.TRANSPARENT);
mWebView.setWebViewClient(new WebViewClient());
mWebView.setWebChromeClient(new WebChromeClient() {
@Override
public void onProgressChanged(WebView view, int newProgress) {
super.onProgressChanged(view, newProgress);
progressBar.setProgress(newProgress);
if (newProgress == 100) {
progressBar.setVisibility(View.GONE);
mWebView.setBackgroundColor(Color.WHITE);
}
}
});
mWebView.setDownloadListener(new DownloadListener() {
@Override
public void onDownloadStart(String url, String userAgent, String contentDisposition,
String mimetype, long contentLength) {
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
if (getActivity() == null) {
return;
}
if (intent.resolveActivity(getActivity().getPackageManager()) != null) {
new AlertDialog.Builder(getActivity())
.setMessage(R.string.confirm_download)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
startActivity(intent);
}
})
.setNegativeButton(android.R.string.cancel, null)
.create()
.show();
}
}
});
setWebViewSettings(mWebView.getSettings());
return view;
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (savedInstanceState != null) {
ItemManager.WebItem savedItem = savedInstanceState.getParcelable(EXTRA_ITEM);
if (savedItem != null) {
mItem = savedItem;
}
}
if (mItem != null) {
mWebView.loadUrl(mItem.getUrl());
}
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putParcelable(EXTRA_ITEM, mItem);
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setWebViewSettings(WebSettings webSettings) {
webSettings.setJavaScriptEnabled(true);
webSettings.setLoadWithOverviewMode(true);
webSettings.setUseWideViewPort(true);
webSettings.setBuiltInZoomControls(true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
webSettings.setDisplayZoomControls(false);
}
}
}
|
[
"haduytrung@gmail.com"
] |
haduytrung@gmail.com
|
df9ff1449d89fd8a74e1d3479bda2d0dad01c729
|
c03577fb09a0d100baf237752754fc6e62ea7717
|
/src/CORE/dark/empire/api/IVehicle.java
|
5936fbd1e1e284ba7dd0aad6f90f16d88f707f35
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
Vexatos/Empire-Engine
|
be40b94bed2198266fdfab7377f7546431336769
|
2ad23021328d40a152000b342e679f9e80c0c11b
|
refs/heads/master
| 2021-01-01T16:34:05.323772
| 2013-12-18T21:01:33
| 2013-12-18T21:01:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 473
|
java
|
package dark.empire.api;
import java.util.List;
import net.minecraft.entity.Entity;
/** Used to implement some basic methods on a vehicle entity. Entities are not restricted to Players
* or even living creates. They can be mine carts, boats, or even items. Though it is recomended
* that the drive be an entity or the vehicle itself
*
* @author DarkGuardsman */
public interface IVehicle
{
public Entity getDriver();
public List<Entity> getPassengers();
}
|
[
"rseifert.phone@gmail.com"
] |
rseifert.phone@gmail.com
|
6e23ec6f99088c8401a3446617f642a0b2414b7a
|
6f31ff481cd7dcc184f81f206b1f4598fd610b21
|
/data-release/ep-config/src/main/java/uk/ac/ebi/ep/config/AbstractConfig.java
|
e080897f39cd4d22142b55f52be517237f857fe3
|
[
"Apache-2.0"
] |
permissive
|
uniprot/enzymeportal
|
a6ef308398c3ad409c3217c5d3aefafc8dc6a256
|
481b458ad1927fc71c4fa69bf320c9c8024313f4
|
refs/heads/master
| 2022-12-25T04:10:41.826753
| 2022-07-06T16:20:08
| 2022-07-06T16:20:08
| 6,438,403
| 7
| 3
|
Apache-2.0
| 2022-12-16T15:33:35
| 2012-10-29T09:50:33
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 396
|
java
|
package uk.ac.ebi.ep.config;
import javax.sql.DataSource;
/**
*
* @author joseph
*/
public abstract class AbstractConfig implements EnzymePortalDataConfig {
protected abstract DataSource driverManagerDataSource();
protected abstract DataSource oracleDataSource();
protected abstract DataSource comboPooledDataSource();
protected abstract DataSource poolDataSource();
}
|
[
"joseph@computingfacts.com"
] |
joseph@computingfacts.com
|
346b481c0d54201866b105ae5930542a761e2628
|
01fe09d4f57f1d3d746b4699837ad844d0655dfe
|
/src/com/dw/grid/GridServerForClient.java
|
e063fdfe3006e52fc0f433cb9712930a2e543007
|
[] |
no_license
|
duxingzhe311/system4j
|
72570bdb85e66b351bf5b42c84bcb6bfa6f3de86
|
3871ae19aac53f1b0aaf74ea5e401aad13210947
|
refs/heads/master
| 2021-01-10T12:24:58.726571
| 2016-01-29T08:25:34
| 2016-01-29T08:25:34
| 50,648,431
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 5,575
|
java
|
package com.dw.grid;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.util.UUID;
import java.util.Vector;
import com.dw.system.Convert;
import com.dw.system.encrypt.DES;
import com.dw.system.logger.ILogger;
import com.dw.system.logger.LoggerManager;
import com.dw.system.xmldata.XmlDataWithFile;
class GridServerForClient implements Runnable {
static ILogger log = LoggerManager.getLogger(GridServerForClient.class);
static Object lockObj = new Object();
static Vector<GridServerForClient> ALL_CLIENTS = new Vector<GridServerForClient>();
static void increaseCount(GridServerForClient c) {
synchronized (lockObj) {
ALL_CLIENTS.add(c);
}
}
static void decreaseCount(GridServerForClient c) {
synchronized (lockObj) {
ALL_CLIENTS.remove(c);
}
}
public static int getClientConnCount() {
return ALL_CLIENTS.size();
}
public static GridServerForClient[] getAllClients() {
synchronized (lockObj) {
GridServerForClient[] rets = new GridServerForClient[ALL_CLIENTS
.size()];
ALL_CLIENTS.toArray(rets);
return rets;
}
}
// MsgCmdServer server = null;
// IMsgCmdHandler cmdHandler = null ;
Socket tcpClient = null;
Thread thread = null;
// boolean bRun = false;
private GridClientInfo clientInfo = null;
private IXmlDataWithFileRecvedHandler handler = null;
public GridServerForClient(Socket tcp, IXmlDataWithFileRecvedHandler h) {
// cmdHandler = cmdhandler ;
tcpClient = tcp;
handler = h;
clientInfo = new GridClientInfo(tcp.getInetAddress().getHostAddress(),
tcp.getPort());
}
public GridClientInfo getClientInfo() {
return clientInfo;
}
synchronized public void start() {
if (thread != null)
return;
thread = new Thread(this, "GridClientThread");
thread.start();
}
synchronized public void stop() {
if (thread == null)
return;
close();
}
public void run() {
try {
increaseCount(this);
System.out.println("accept By Grid Server!!!!");
// Get a stream object for reading and writing
InputStream instream = tcpClient.getInputStream();
OutputStream outstream = tcpClient.getOutputStream();
// send uuid 向客户端发送随机串
String uuid = UUID.randomUUID().toString();
outstream.write(uuid.getBytes());
outstream.write((byte) '\n');
outstream.flush();
// 客户端根据自己的id和密钥串把随机串加密,回答
// id=服务器的随机串加密串
// 验证阻塞不能超过5s
this.tcpClient.setSoTimeout(5000);//
String idsec = null;
try {
idsec = Util.readStreamLine(instream, 1000);
} catch (SocketTimeoutException stoe) {
throw new Exception("auth time out!");
}
int p = idsec.indexOf('=');
if (p <= 0)
throw new Exception("invalid id security str");
long id = Long.parseLong(idsec.substring(0, p));
String sec_str = idsec.substring(p + 1);
String seckey = null;
if (id == 0) {// test
seckey = "12345678";
} else {
GridClientItem cci = GridClientManager.getInstance()
.getClientById(id);
if (cci == null)
throw new Exception("no client found!");
seckey = cci.getSecKey();
}
if (Convert.isNullOrEmpty(seckey))
throw new Exception("no key!");
// 解密串和原随机串对比,相同表示ok
String dec_str = DES.decode(sec_str, seckey);
if (!uuid.equals(dec_str))
throw new Exception("check security key failed!");
outstream.write("ok\n".getBytes());
outstream.flush();
// 收取数据阻塞不能超过10s
this.tcpClient.setSoTimeout(10000);//
// ok begin trans data ;
FileOutputStream fos = null;
File recvf = null;
XmlDataWithFile xdwf = new XmlDataWithFile();
try {
String name = UUID.randomUUID().toString();
// if(id==0)
// {
// recvf = new File("./test_recv_xdwf/"+name+".qi") ;
// if(!recvf.getParentFile().exists())
// {
// recvf.getParentFile().mkdirs() ;
// }
// }
// else
{
recvf = GridManager.getInstance().getTmpRecvFile(name);
fos = new FileOutputStream(recvf);
}
XmlDataWithFile.StreamRecvCB recv = new XmlDataWithFile.StreamRecvCB(
fos);
xdwf.readFromStream(instream, recv);
XmlDataWithFile.CombinedFileHead cfh = recv
.getCombinedFileHead();
handler.onXmlDataWithFileRecved(cfh, recvf);
outstream.flush();
// tell client succ
outstream.write("succ\n".getBytes());
outstream.flush();
} catch (Exception recve) {
recve.printStackTrace();
if (fos != null) {
fos.close();
fos = null;
}
if (recvf != null)
recvf.delete();
} finally {
if (fos != null)
fos.close();
}
} catch (Exception e) {
e.printStackTrace();
// Console.WriteLine(e.GetType().FullName + "\n" + e.Message + "\n"
// + e.StackTrace);
if (log.isErrorEnabled())
log.error("消息传输错误-断开连接" + e.getMessage());
} finally {
close();
decreaseCount(this);
}
}
public void close() {
if (tcpClient != null) {
try {
tcpClient.close();
tcpClient = null;
} catch (Exception e) {
}
}
Thread t = this.thread;
if (t != null) {
try {
t.interrupt();
} catch (Exception eee) {
}
thread = null;
}
}
}
|
[
"623799957@qq.com"
] |
623799957@qq.com
|
d836347557d7b6f479d76e953b5e2f1d4e17026c
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_1013770.java
|
01259b6453556e3d75a0a2c3dde54c2cab529a56
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 473
|
java
|
@Override public RedisClientProtocol<String> read(ByteBuf byteBuf){
String data=readTilCRLFAsString(byteBuf);
if (data == null) {
return null;
}
int beginIndex=0;
int endIndex=data.length();
int dataLength=data.length();
if (data.charAt(0) == PLUS_BYTE) {
beginIndex=1;
}
if (data.charAt(dataLength - 2) == '\r' && data.charAt(dataLength - 1) == '\n') {
endIndex-=2;
}
return new SimpleStringParser(data.substring(beginIndex,endIndex));
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
86e6dbe95c1f65d489b74065d81a9211e3fbf224
|
5d37045e56b6dff38ce785f01ed1c14031024c59
|
/src/main/java/ru/javawebinar/topjava/repository/datajpa/CrudUserRepository.java
|
373b4c315a1e1b2725695c68ef97b42d6703074a
|
[] |
no_license
|
dsoccer1980/topjava
|
89b60278962876a33c87e1d87fa9548ac6872dc5
|
f6103df5e0719bb3e9f0d4d79ca88394fdfa91dd
|
refs/heads/master
| 2020-03-21T17:38:41.894040
| 2018-08-27T17:38:26
| 2018-08-27T17:38:26
| 97,469,515
| 0
| 0
| null | 2017-07-17T11:37:42
| 2017-07-17T11:37:42
| null |
UTF-8
|
Java
| false
| false
| 1,324
|
java
|
package ru.javawebinar.topjava.repository.datajpa;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
import ru.javawebinar.topjava.model.User;
import java.util.List;
import java.util.Optional;
@Transactional(readOnly = true)
public interface CrudUserRepository extends JpaRepository<User, Integer> {
@Transactional
@Modifying
@Query("DELETE FROM User u WHERE u.id=:id")
int delete(@Param("id") int id);
@Override
@Transactional
User save(User user);
@Override
Optional<User> findById(Integer id);
@Override
List<User> findAll(Sort sort);
User getByEmail(String email);
// @Query("SELECT u FROM User u LEFT JOIN FETCH u.meals WHERE u.id = ?1")
// @EntityGraph(value = User.GRAPH_WITH_MEALS)
// https://stackoverflow.com/a/46013654/548473
@EntityGraph(attributePaths = {"meals"}, type = EntityGraph.EntityGraphType.LOAD)
@Query("SELECT u FROM User u WHERE u.id=?1")
User getWithMeals(int id);
}
|
[
"dsoccer1980@gmail.com"
] |
dsoccer1980@gmail.com
|
56bf7add868df64c7128fcddc01a8ffa392eba34
|
d18af2a6333b1a868e8388f68733b3fccb0b4450
|
/java/src/com/google/android/gms/drive/internal/LoadRealtimeRequest.java
|
20d7a52461ff3f3f9b36b5074e7d32b557bfb9ec
|
[] |
no_license
|
showmaxAlt/showmaxAndroid
|
60576436172495709121f08bd9f157d36a077aad
|
d732f46d89acdeafea545a863c10566834ba1dec
|
refs/heads/master
| 2021-03-12T20:01:11.543987
| 2015-08-19T20:31:46
| 2015-08-19T20:31:46
| 41,050,587
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,052
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.android.gms.drive.internal;
import android.os.Parcel;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.drive.DriveId;
import java.util.List;
// Referenced classes of package com.google.android.gms.drive.internal:
// zzal
public class LoadRealtimeRequest
implements SafeParcelable
{
public static final android.os.Parcelable.Creator CREATOR = new zzal();
final int zzFG;
final DriveId zzRX;
final boolean zzUD;
final List zzUE;
LoadRealtimeRequest(int i, DriveId driveid, boolean flag, List list)
{
zzFG = i;
zzRX = driveid;
zzUD = flag;
zzUE = list;
}
public int describeContents()
{
return 0;
}
public void writeToParcel(Parcel parcel, int i)
{
zzal.zza(this, parcel, i);
}
}
|
[
"invisible@example.com"
] |
invisible@example.com
|
6c7dfa3df458c5ec74a19ae4dd53b3b4a9feb14b
|
4ef602cd041411e7d4324517a5e6e43a1df4d21a
|
/factory-admin/src/main/java/com/wode/factory/service/ProductTrialLimitGroupService.java
|
a6c053697afa9a42eb2f05c9dfe55020ccd64617
|
[] |
no_license
|
beijingwode/myFactory
|
08d847d5c35a8900d7374227a67078a2bd0f78b8
|
43795f28318b8c9a7f37c407621134490c37d649
|
refs/heads/master
| 2021-05-11T00:24:22.127891
| 2018-01-26T06:39:22
| 2018-01-26T06:39:22
| 118,300,323
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,050
|
java
|
/*
* Powered By [rapid-framework]
* Web Site: http://www.rapid-framework.org.cn
* Google Code: http://code.google.com/p/rapid-framework/
* Since 2008 - 2015
*/
package com.wode.factory.service;
import java.util.List;
import java.util.Map;
import com.github.pagehelper.PageInfo;
import com.wode.common.frame.base.FactoryEntityService;
import com.wode.factory.model.ProductTrialLimitGroup;
import com.wode.factory.model.ProductTrialLimitItem;
public interface ProductTrialLimitGroupService extends FactoryEntityService<ProductTrialLimitGroup>{
PageInfo getGroupManageListByMap(Map<String, Object> params);
void addGroupMsg(ProductTrialLimitGroup productTrialLimitGroup);
ProductTrialLimitGroup getGroupMsgById(Long id);
void editGroupMsg(ProductTrialLimitGroup productTrialLimitGroup);
List<ProductTrialLimitGroup> findGroupOperatorList();
void updateStatus(Long id,Integer status);
List<ProductTrialLimitItem> getProductListByMap();
void updateGroupStatus();
void delGroup(Long id);
}
|
[
"gyj@wo-de.com"
] |
gyj@wo-de.com
|
5768cd51122046234316d1bacf27f975e3d39d5f
|
8df76e6eb76193af55b92407a999cec08a6f2de3
|
/src/com/noker/helpers/message/response/TextMessage.java
|
43a9b64a572557e20faa46ad11f929565d403b88
|
[] |
no_license
|
pnoker/helpers
|
6b247476879a3669d9d8a0053352ffb2f8898427
|
2a8c899ba859ad9646c1a3b83cc47be7abb006fb
|
refs/heads/master
| 2016-09-12T14:18:22.870417
| 2016-06-04T04:40:36
| 2016-06-04T04:40:36
| 59,562,011
| 1
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 293
|
java
|
package com.noker.helpers.message.response;
/*文本消息*/
public class TextMessage extends BaseMessage {
private String Content;// 回复的消息内容
public String getContent() {
return Content;
}
public void setContent(String content) {
Content = content;
}
}
|
[
"peter-no@foxmail.com"
] |
peter-no@foxmail.com
|
6d1224bf954d6a3bd007e8441a0d73884621a1e7
|
790464692ab27babd6fd75ebe049c602a1e830cf
|
/Basic_Fundamental/src/mb/app8/src/H.java
|
020020cfbff4aeac4212d8e52785d89620258f06
|
[
"MIT"
] |
permissive
|
mkp1104/localEclipseWorkspaceJava
|
1bbfbbe06984a2a75b749988fa3fe38873724891
|
3523a0400ac95c0495c2714b8fb17c05f03d8dba
|
refs/heads/master
| 2021-05-02T03:03:52.121194
| 2018-03-09T13:21:36
| 2018-03-09T13:21:36
| 120,890,874
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 290
|
java
|
package mb.app8.src;class H
{
static {
System.out.println("H-SIB");
}
public static void main(String[] args)
{
System.out.println("H-Main");
}
}
class I
{
static {
System.out.println("I-SIB");
}
public static void main(String[] args)
{
System.out.println("I-Main");
}
}
|
[
"manish.aec1104@gmail.com"
] |
manish.aec1104@gmail.com
|
c2667b954d503debaca3b9afbe49fb6c2359d225
|
99c7920038f551b8c16e472840c78afc3d567021
|
/aliyun-java-sdk-vod-v5/src/main/java/com/aliyuncs/v5/vod/model/v20170321/AttachAppPolicyToIdentityResponse.java
|
6fa02540e5a52102a4a9a1d72b5f1643b76c9591
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk-v5
|
9fa211e248b16c36d29b1a04662153a61a51ec88
|
0ece7a0ba3730796e7a7ce4970a23865cd11b57c
|
refs/heads/master
| 2023-03-13T01:32:07.260745
| 2021-10-18T08:07:02
| 2021-10-18T08:07:02
| 263,800,324
| 4
| 2
|
NOASSERTION
| 2022-05-20T22:01:22
| 2020-05-14T02:58:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,894
|
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.v5.vod.model.v20170321;
import java.util.List;
import com.aliyuncs.v5.AcsResponse;
import com.aliyuncs.v5.vod.transform.v20170321.AttachAppPolicyToIdentityResponseUnmarshaller;
import com.aliyuncs.v5.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class AttachAppPolicyToIdentityResponse extends AcsResponse {
private String requestId;
private List<String> nonExistPolicyNames;
private List<String> failedPolicyNames;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public List<String> getNonExistPolicyNames() {
return this.nonExistPolicyNames;
}
public void setNonExistPolicyNames(List<String> nonExistPolicyNames) {
this.nonExistPolicyNames = nonExistPolicyNames;
}
public List<String> getFailedPolicyNames() {
return this.failedPolicyNames;
}
public void setFailedPolicyNames(List<String> failedPolicyNames) {
this.failedPolicyNames = failedPolicyNames;
}
@Override
public AttachAppPolicyToIdentityResponse getInstance(UnmarshallerContext context) {
return AttachAppPolicyToIdentityResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
a22d26421ef3c1aebdba0eef4da8e0077380a45e
|
0b99941112b4407465c643b056e770f40ecd4cbe
|
/src/ArrayExercises/CompareTwoValues.java
|
1fdc3e7ef2d3be4ce3331100a7944de4a1b5909a
|
[] |
no_license
|
banthony79/JavaPractice
|
c81c9e65936af7948d32d5de9923cfd34ff41251
|
e3d144e5e5c6973bcc30a7c185d44c39a1cfee19
|
refs/heads/master
| 2023-01-18T14:13:21.684925
| 2020-11-29T18:06:41
| 2020-11-29T18:06:41
| 300,121,082
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 819
|
java
|
package ArrayExercises;
public class CompareTwoValues {
public static boolean arrayEqualValues(int[] array) {
int count = 0;
for (int i = 0; i < array.length; i++) {
for (int t = i + 1; t < array.length; t++) {
if (array[i] == array[t] && i != t) {
count++;
}
}
}
if (count > 0) {
return true;
} else {
return false;
}
}
public static void main(String[] args) {
int[] array1 = {5, 6, 7, 7};
int[] array2 = {1, 2};
int[] array3 = {12, 24, 48, 72, 100, 72};
System.out.println(arrayEqualValues(array1));
System.out.println(arrayEqualValues(array2));
System.out.println(arrayEqualValues(array3));
}
}
|
[
"blooyeng@gmail.com"
] |
blooyeng@gmail.com
|
d77e215ed10fafab438b177c8829f485fd847c77
|
b81d1df0562de9d4ff5c30bec90647402972f478
|
/src/test/java/pl/pancordev/leak/nine/eight/DummyControllerTest6.java
|
c518014af4f0b6597bce1d4313d4512456b1a78e
|
[] |
no_license
|
Pancor/leak
|
eea9fe401a7c9b543bf95a929f0bbf7ee6113dc9
|
f060ff6a1a8c829b287cffb35b9d63040ca3c7ec
|
refs/heads/master
| 2023-01-30T17:14:38.463089
| 2020-12-14T12:01:00
| 2020-12-14T12:01:00
| 321,322,490
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,969
|
java
|
package pl.pancordev.leak.nine.eight;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import pl.pancordev.leak.services.Service6;
import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@SpringBootTest
@WebAppConfiguration
@RunWith(SpringRunner.class)
public class DummyControllerTest6 {
@Autowired
private WebApplicationContext webApplicationContext;
@MockBean
private Service6 service6;
private MockMvc mvc;
@Before
public void setUp() {
mvc = MockMvcBuilders.webAppContextSetup(webApplicationContext)
.defaultRequest(delete("/").contentType(MediaType.APPLICATION_JSON))
.alwaysDo(print())
.apply(springSecurity())
.build();
}
@Test
public void shouldReturnProperResponseFromIndexPage() throws Exception {
mvc.perform(delete("/"))
.andExpect(status().isOk())
.andExpect(content().string("It's dummy response from server"));
}
}
|
[
"pancordev@gmail.com"
] |
pancordev@gmail.com
|
c19637f9fb30f69ff4e9420076a71b867f61e6ec
|
4edce2a17e0c0800cdfeaa4b111e0c2fbea4563b
|
/net/minecraft/src/RequestDelete.java
|
16f7ae78453aff060e79bc8613a63233d2d41e4b
|
[] |
no_license
|
zaices/minecraft
|
da9b99abd99ac56e787eef1b6fecbd06b2d4cd51
|
4a99d8295e7ce939663e90ba8f1899c491545cde
|
refs/heads/master
| 2021-01-10T20:20:38.388578
| 2013-10-06T00:16:11
| 2013-10-06T00:18:48
| 13,142,359
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 662
|
java
|
package net.minecraft.src;
public class RequestDelete extends Request
{
public RequestDelete(String par1Str, int par2, int par3)
{
super(par1Str, par2, par3);
}
public RequestDelete func_96370_f()
{
try
{
this.field_96367_a.setDoOutput(true);
this.field_96367_a.setRequestMethod("DELETE");
this.field_96367_a.connect();
return this;
}
catch (Exception var2)
{
throw new ExceptionMcoHttp("Failed URL: " + this.field_96365_b, var2);
}
}
public Request func_96359_e()
{
return this.func_96370_f();
}
}
|
[
"chlumanog@gmail.com"
] |
chlumanog@gmail.com
|
69e00c45938b5a4240775a1030c76490c7de150a
|
ebdcaff90c72bf9bb7871574b25602ec22e45c35
|
/modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/v201802/ActivateLiveStreamEvents.java
|
391dd5051330ec84adf6aff41a674bfa0a7146c7
|
[
"Apache-2.0"
] |
permissive
|
ColleenKeegan/googleads-java-lib
|
3c25ea93740b3abceb52bb0534aff66388d8abd1
|
3d38daadf66e5d9c3db220559f099fd5c5b19e70
|
refs/heads/master
| 2023-04-06T16:16:51.690975
| 2018-11-15T20:50:26
| 2018-11-15T20:50:26
| 158,986,306
| 1
| 0
|
Apache-2.0
| 2023-04-04T01:42:56
| 2018-11-25T00:56:39
|
Java
|
UTF-8
|
Java
| false
| false
| 1,536
|
java
|
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.api.ads.admanager.jaxws.v201802;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
*
* The action used for activating {@link LiveStreamEvent} objects.
*
*
* <p>Java class for ActivateLiveStreamEvents complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ActivateLiveStreamEvents">
* <complexContent>
* <extension base="{https://www.google.com/apis/ads/publisher/v201802}LiveStreamEventAction">
* <sequence>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ActivateLiveStreamEvents")
public class ActivateLiveStreamEvents
extends LiveStreamEventAction
{
}
|
[
"api.cseeley@gmail.com"
] |
api.cseeley@gmail.com
|
e86160569459b923b18e736101c0b72be52a3133
|
47119d527d55e9adcb08a3a5834afe9a82dd2254
|
/vipr-portal/portal/app/util/TenantUtils.java
|
7e001d327b64632c76df05a7344f78c7afd652c1
|
[] |
no_license
|
chrisdail/coprhd-controller
|
1c3ddf91bb840c66e4ece3d4b336a6df421b43e4
|
38a063c5620135a49013aae5e078aeb6534a5480
|
refs/heads/master
| 2020-12-03T10:42:22.520837
| 2015-06-08T15:24:36
| 2015-06-08T15:24:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,391
|
java
|
/**
* Copyright 2015 EMC Corporation
* All Rights Reserved
*/
package util;
import com.emc.storageos.model.quota.QuotaInfo;
import com.emc.storageos.model.quota.QuotaUpdateParam;
import com.emc.storageos.model.tenant.TenantCreateParam;
import com.emc.storageos.model.tenant.TenantOrgRestRep;
import com.emc.storageos.model.tenant.TenantUpdateParam;
import com.emc.vipr.client.exceptions.ViPRHttpException;
import com.google.common.collect.Lists;
import controllers.security.Security;
import java.net.URI;
import java.util.Collections;
import java.util.List;
import static com.emc.vipr.client.core.util.ResourceUtils.id;
import static com.emc.vipr.client.core.util.ResourceUtils.uri;
import static util.BourneUtil.getViprClient;
public class TenantUtils {
public static boolean canReadAllTenants() {
return Security.hasAnyRole(Security.ROOT_TENANT_ADMIN, Security.SECURITY_ADMIN, Security.SYSTEM_MONITOR);
}
public static List<TenantOrgRestRep> getAllTenants() {
List<TenantOrgRestRep> tenants = Lists.newArrayList();
TenantOrgRestRep rootTenant = findRootTenant();
tenants.add(rootTenant);
tenants.addAll(getSubTenants(id(rootTenant)));
return tenants;
}
public static List<TenantOrgRestRep> getSubTenants(String parentTenantId) {
return getSubTenants(uri(parentTenantId));
}
public static List<TenantOrgRestRep> getSubTenants(URI parentTenantId) {
return getViprClient().tenants().getAllSubtenants(parentTenantId);
}
public static TenantOrgRestRep findRootTenant() {
URI userTenantId = getViprClient().getUserTenantId();
TenantOrgRestRep currentTenant = getViprClient().tenants().get(userTenantId);
while (currentTenant.getParentTenant() != null) {
currentTenant = getViprClient().tenants().get(currentTenant.getParentTenant());
}
return currentTenant;
}
public static TenantOrgRestRep getTenant(String tenantId) {
try {
return getViprClient().tenants().get(uri(tenantId));
}
catch (ViPRHttpException e) {
if (e.getHttpCode() == 404) {
return null;
}
throw e;
}
}
public static void update(String tenantId, TenantUpdateParam tenantUpdateParam) {
getViprClient().tenants().update(uri(tenantId), tenantUpdateParam);
}
public static TenantOrgRestRep create(TenantCreateParam tenantCreateParam) {
return getViprClient().tenants().create(tenantCreateParam);
}
public static boolean isRootTenant(URI tenantId) {
return isRootTenant(getViprClient().tenants().get(tenantId));
}
public static boolean isRootTenant(TenantOrgRestRep tenant) {
return tenant != null && tenant.getParentTenant() == null;
}
public static QuotaInfo getQuota(URI id) {
return getViprClient().tenants().getQuota(id);
}
public static QuotaInfo getQuota(String id) {
return getQuota(uri(id));
}
public static QuotaInfo updateQuota(String id, boolean enable, Long sizeInGB) {
if (enable) {
return enableQuota(id, sizeInGB);
}
else {
return disableQuota(id);
}
}
public static QuotaInfo enableQuota(String id, Long sizeInGB) {
return getViprClient().tenants().updateQuota(uri(id), new QuotaUpdateParam(true, sizeInGB));
}
public static QuotaInfo disableQuota(String id) {
return getViprClient().tenants().updateQuota(uri(id), new QuotaUpdateParam(false, null));
}
public static boolean deactivate(URI tenantId) {
if (tenantId != null) {
if (!isRootTenant(tenantId)) {
getViprClient().tenants().deactivate(tenantId);
return true;
}
}
return false;
}
public static List<StringOption> getSubTenantOptions() {
List<StringOption> options = Lists.newArrayList();
TenantOrgRestRep userTenant = getViprClient().tenants().get(uri(Security.getUserInfo().getTenant()));
options.add(createTenantOption(userTenant));
for(TenantOrgRestRep tenant : getViprClient().tenants().getAllSubtenants(uri(Security.getUserInfo().getTenant()))) {
options.add(createTenantOption(tenant));
}
Collections.sort(options);
return options;
}
public static TenantOrgRestRep getUserTenant() {
return getViprClient().tenants().get(uri(Security.getUserInfo().getTenant()));
}
public static List<StringOption> getUserSubTenantOptions() {
List<StringOption> options = Lists.newArrayList();
if (Security.hasAnyRole(Security.SECURITY_ADMIN, Security.RESTRICTED_SECURITY_ADMIN, Security.HOME_TENANT_ADMIN)) {
TenantOrgRestRep userTenant = getViprClient().tenants().get(uri(Security.getUserInfo().getTenant()));
options.add(createTenantOption(userTenant));
}
for(TenantOrgRestRep tenant : getViprClient().tenants().getByIds(Security.getUserInfo().getSubTenants())) {
options.add(createTenantOption(tenant));
}
return options;
}
private static StringOption createTenantOption(TenantOrgRestRep tenant) {
return new StringOption(tenant.getId().toString(), tenant.getName());
}
}
|
[
"review-coprhd@coprhd.org"
] |
review-coprhd@coprhd.org
|
223f70d7a797067375743fe2d8d2c623783f074f
|
99612920ccc58ba91db5a08b44af0abde632a720
|
/user/src/main/java/com/soubao/vo/UserExcel.java
|
656f3a414f82b419756d8e60cbfbecd7b796fbbe
|
[] |
no_license
|
shanghaif/eshop
|
d5a32e89a181f583cc93852325ec32c61425b7f1
|
105662255d647e4637b1e774ad7ca98dcaee0c9e
|
refs/heads/master
| 2023-03-21T21:07:04.659708
| 2020-11-04T05:31:21
| 2020-11-04T05:31:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,648
|
java
|
package com.soubao.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import com.soubao.common.utils.TimeUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data
public class UserExcel extends BaseRowModel {
@ExcelProperty(value = {"会员ID"}, index = 0)
private String userId;
@ExcelProperty(value = {"会员昵称"}, index = 1)
private String nickname;
@ExcelProperty(value = {"会员等级"}, index = 2)
private String level;
@ExcelProperty(value = {"手机号"}, index = 3)
private String mobile;
@ExcelProperty(value = {"邮箱"}, index = 4)
private String email;
private Long regTime;
@ExcelProperty(value = {"注册时间"}, index = 5)
private String regTimeDesc;
public String getRegTimeDesc() {
if (regTime != null) {
return TimeUtil.transForDateStr(regTime, "yyyy/MM/dd HH:mm");
}
return regTimeDesc;
}
private Long lastLogin;
@ExcelProperty(value = {"最后登录"}, index = 6)
private String lastLoginDesc;
public String getLastLoginDesc() {
if (lastLogin != null) {
return TimeUtil.transForDateStr(lastLogin, "yyyy/MM/dd HH:mm");
}
return lastLoginDesc;
}
@ExcelProperty(value = {"余额"}, index = 7)
private String userMoney;
@ExcelProperty(value = {"积分"}, index = 8)
private String payPoints;
@ExcelProperty(value = {"累计消费"}, index = 9)
private String totalAmount;
}
|
[
"18687269789@163.com"
] |
18687269789@163.com
|
9cc528c48d4b41b831974932d47d30e72a600a95
|
80ef380691d5a1cd1eb552e3f8d42c5e16384ecc
|
/Aria/src/main/java/com/arialyy/aria/core/queue/pool/ExecutePool.java
|
450018f6de9f9cdcf28888a919d9c0d1b44f83d8
|
[
"Apache-2.0"
] |
permissive
|
GaryLt/Aria
|
492152580b71f58c526bcba68318baf2e4b35fd8
|
09ca816223d379f3eb0bf376682b5f4f69d398df
|
refs/heads/master
| 2021-06-13T15:10:25.308524
| 2017-04-07T08:30:58
| 2017-04-07T08:30:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,209
|
java
|
/*
* Copyright (C) 2016 AriaLyy(DownloadUtil)
*
* 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.arialyy.aria.core.queue.pool;
import android.text.TextUtils;
import android.util.Log;
import com.arialyy.aria.core.inf.ITask;
import com.arialyy.aria.util.CommonUtil;
import com.arialyy.aria.util.Configuration;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.TimeUnit;
/**
* Created by lyy on 2016/8/15.
* 任务执行池,所有当前下载任务都该任务池中,默认下载大小为2
*/
public class ExecutePool<TASK extends ITask> implements IPool<TASK> {
private static final String TAG = "ExecutePool";
private static final Object LOCK = new Object();
private static final long TIME_OUT = 1000;
private ArrayBlockingQueue<TASK> mExecuteQueue;
private Map<String, TASK> mExecuteArray;
private int mSize;
public ExecutePool() {
mSize = Configuration.getInstance().getDownloadNum();
mExecuteQueue = new ArrayBlockingQueue<>(mSize);
mExecuteArray = new HashMap<>();
}
@Override public boolean putTask(TASK task) {
synchronized (LOCK) {
if (task == null) {
Log.e(TAG, "任务不能为空!!");
return false;
}
String url = task.getKey();
if (mExecuteQueue.contains(task)) {
Log.e(TAG, "队列中已经包含了该任务,任务key【" + url + "】");
return false;
} else {
if (mExecuteQueue.size() >= mSize) {
if (pollFirstTask()) {
return putNewTask(task);
}
} else {
return putNewTask(task);
}
}
}
return false;
}
/**
* 设置执行任务数
*
* @param downloadNum 下载数
*/
public void setDownloadNum(int downloadNum) {
try {
ArrayBlockingQueue<TASK> temp = new ArrayBlockingQueue<>(downloadNum);
TASK task;
while ((task = mExecuteQueue.poll(TIME_OUT, TimeUnit.MICROSECONDS)) != null) {
temp.offer(task);
}
mExecuteQueue = temp;
mSize = downloadNum;
Configuration.getInstance().setDownloadNum(mSize);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
/**
* 添加新任务
*
* @param newTask 新下载任务
*/
private boolean putNewTask(TASK newTask) {
String url = newTask.getKey();
boolean s = mExecuteQueue.offer(newTask);
Log.w(TAG, "任务添加" + (s ? "成功" : "失败,【" + url + "】"));
if (s) {
mExecuteArray.put(CommonUtil.keyToHashKey(url), newTask);
}
return s;
}
/**
* 队列满时,将移除下载队列中的第一个任务
*/
private boolean pollFirstTask() {
try {
TASK oldTask = mExecuteQueue.poll(TIME_OUT, TimeUnit.MICROSECONDS);
if (oldTask == null) {
Log.e(TAG, "移除任务失败");
return false;
}
oldTask.stop();
String key = CommonUtil.keyToHashKey(oldTask.getKey());
mExecuteArray.remove(key);
} catch (InterruptedException e) {
e.printStackTrace();
return false;
}
return true;
}
@Override public TASK pollTask() {
synchronized (LOCK) {
try {
TASK task = null;
task = mExecuteQueue.poll(TIME_OUT, TimeUnit.MICROSECONDS);
if (task != null) {
String url = task.getKey();
mExecuteArray.remove(CommonUtil.keyToHashKey(url));
}
return task;
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
}
@Override public TASK getTask(String downloadUrl) {
synchronized (LOCK) {
if (TextUtils.isEmpty(downloadUrl)) {
Log.e(TAG, "请传入有效的任务key");
return null;
}
String key = CommonUtil.keyToHashKey(downloadUrl);
return mExecuteArray.get(key);
}
}
@Override public boolean removeTask(TASK task) {
synchronized (LOCK) {
if (task == null) {
Log.e(TAG, "任务不能为空");
return false;
} else {
String key = CommonUtil.keyToHashKey(task.getKey());
mExecuteArray.remove(key);
return mExecuteQueue.remove(task);
}
}
}
@Override public boolean removeTask(String downloadUrl) {
synchronized (LOCK) {
if (TextUtils.isEmpty(downloadUrl)) {
Log.e(TAG, "请传入有效的任务key");
return false;
}
String key = CommonUtil.keyToHashKey(downloadUrl);
TASK task = mExecuteArray.get(key);
mExecuteArray.remove(key);
return mExecuteQueue.remove(task);
}
}
@Override public int size() {
return mExecuteQueue.size();
}
}
|
[
"511455842@qq.com"
] |
511455842@qq.com
|
38d81135c8b8c1d1515da40aae0d89d86e99502d
|
a90f8343ca16224a1b05015094418cc9f228d4e7
|
/ydc-common/src/main/java/com/ydc/commom/view/dto/cgj/StoreReqDTO.java
|
3cd6a781d7200c2bdc8890dfc1e0fd10cef3a7c7
|
[] |
no_license
|
oyjy2018/template
|
0b381ecc50de254ecab37f34e2d1de058683ab8b
|
3e9a07b9fff01b43a91b943152a3b9af9ff48e06
|
refs/heads/master
| 2022-12-06T11:02:16.875133
| 2019-06-05T16:12:35
| 2019-06-05T16:12:35
| 190,425,044
| 1
| 0
| null | 2022-11-16T10:56:08
| 2019-06-05T15:55:35
|
Java
|
UTF-8
|
Java
| false
| false
| 2,921
|
java
|
package com.ydc.commom.view.dto.cgj;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
public class StoreReqDTO implements Serializable {
private static final long serialVersionUID = 3236985917839411413L;
private String delCommodityModelIds;
private String commodityId;
private String commodityModelId;
private Map<String, String> commodity;
private List<Map<String, String>> commodityModels;
private List<Map<String, String>> commodityImgs;
private String commodityIds;
private String hasShoutui;
private String releaseStatus;
private String inventory;
private String userId;
private String userName;
public String getDelCommodityModelIds() {
return delCommodityModelIds;
}
public void setDelCommodityModelIds(String delCommodityModelIds) {
this.delCommodityModelIds = delCommodityModelIds;
}
public String getCommodityId() {
return commodityId;
}
public void setCommodityId(String commodityId) {
this.commodityId = commodityId;
}
public String getCommodityModelId() {
return commodityModelId;
}
public void setCommodityModelId(String commodityModelId) {
this.commodityModelId = commodityModelId;
}
public Map<String, String> getCommodity() {
return commodity;
}
public void setCommodity(Map<String, String> commodity) {
this.commodity = commodity;
}
public List<Map<String, String>> getCommodityModels() {
return commodityModels;
}
public void setCommodityModels(List<Map<String, String>> commodityModels) {
this.commodityModels = commodityModels;
}
public List<Map<String, String>> getCommodityImgs() {
return commodityImgs;
}
public void setCommodityImgs(List<Map<String, String>> commodityImgs) {
this.commodityImgs = commodityImgs;
}
public String getCommodityIds() {
return commodityIds;
}
public void setCommodityIds(String commodityIds) {
this.commodityIds = commodityIds;
}
public String getHasShoutui() {
return hasShoutui;
}
public void setHasShoutui(String hasShoutui) {
this.hasShoutui = hasShoutui;
}
public String getReleaseStatus() {
return releaseStatus;
}
public void setReleaseStatus(String releaseStatus) {
this.releaseStatus = releaseStatus;
}
public String getInventory() {
return inventory;
}
public void setInventory(String inventory) {
this.inventory = inventory;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
|
[
"983014204@qq.com"
] |
983014204@qq.com
|
7fd92b60d830d3f47de7c2e6bc1d8cae6cf989ba
|
45ecb2267d2c9b7c64c875457fef5ea7d2ba0111
|
/spring-aot/src/test/java/org/springframework/aot/context/bootstrap/generator/BootstrapWriterContextTests.java
|
dd9d7efb1aa45308b9fb5707736d48bc23922399
|
[
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
Sun870905/Spring_Native
|
9973dfc5f9f0b23566ef6687c8af7652e54152ac
|
c8c625663a107ea29dcf8cb67cdd0c5f86c5de97
|
refs/heads/main
| 2023-08-19T00:17:10.899573
| 2021-10-06T08:13:53
| 2021-10-06T08:13:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,430
|
java
|
/*
* Copyright 2019-2021 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aot.context.bootstrap.generator;
import org.junit.jupiter.api.Test;
import org.springframework.aot.context.bootstrap.generator.infrastructure.BootstrapClass;
import org.springframework.aot.context.bootstrap.generator.infrastructure.BootstrapWriterContext;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link BootstrapWriterContext}.
*
* @author Stephane Nicoll
*/
class BootstrapWriterContextTests {
@Test
void createDefaultLinkPackageName() {
BootstrapClass defaultBootstrapClass = BootstrapClass.of("com.acme");
BootstrapWriterContext writerContext = new BootstrapWriterContext(defaultBootstrapClass);
assertThat(writerContext.getPackageName()).isEqualTo("com.acme");
assertThat(writerContext.getMainBootstrapClass()).isSameAs(defaultBootstrapClass);
assertThat(writerContext.getBootstrapClass("com.acme")).isSameAs(defaultBootstrapClass);
}
@Test
void getBootstrapClassRegisterInstance() {
BootstrapClass defaultBootstrapClass = BootstrapClass.of("com.acme");
BootstrapWriterContext writerContext = new BootstrapWriterContext(defaultBootstrapClass);
assertThat(writerContext.hasBootstrapClass("com.example")).isFalse();
assertThat(writerContext.getBootstrapClass("com.example")).isNotNull();
assertThat(writerContext.hasBootstrapClass("com.example")).isTrue();
}
@Test
void getBootstrapClassReuseInstance() {
BootstrapClass defaultBootstrapClass = BootstrapClass.of("com.acme");
BootstrapWriterContext writerContext = new BootstrapWriterContext(defaultBootstrapClass);
BootstrapClass bootstrapClass = writerContext.getBootstrapClass("com.example");
assertThat(bootstrapClass.getClassName().packageName()).isEqualTo("com.example");
assertThat(writerContext.getBootstrapClass("com.example")).isSameAs(bootstrapClass);
}
@Test
void getRuntimeReflectionRegistry() {
BootstrapWriterContext writerContext = new BootstrapWriterContext(BootstrapClass.of("com.acme"));
assertThat(writerContext.getNativeConfigurationRegistry()).isNotNull();
assertThat(writerContext.getNativeConfigurationRegistry().reflection().getEntries()).isEmpty();
}
@Test
void toJavaFilesWithDefaultClass() {
BootstrapClass defaultBootstrapClass = BootstrapClass.of("com.acme");
BootstrapWriterContext writerContext = new BootstrapWriterContext(defaultBootstrapClass);
assertThat(writerContext.toJavaFiles()).hasSize(1);
}
@Test
void toJavaFilesWithDefaultClassAndAdditionalClasses() {
BootstrapClass defaultBootstrapClass = BootstrapClass.of("com.acme");
BootstrapWriterContext writerContext = new BootstrapWriterContext(defaultBootstrapClass);
writerContext.getBootstrapClass("com.example");
writerContext.getBootstrapClass("com.another");
assertThat(writerContext.toJavaFiles()).hasSize(3);
}
}
|
[
"snicoll@vmware.com"
] |
snicoll@vmware.com
|
2888c6a15507d4ccfc5d16786fa6c0ca7e777a9d
|
07652d5ac6f5fc6a07062689e74d4ff3ed4ac8b1
|
/Omega GameServer/src/net/team/omega/core/network/serialization/internal/InternalGameServerGenerateKey.java
|
458dffc59dde70923e36ff4eb2450ceeb5268c29
|
[
"Apache-2.0"
] |
permissive
|
KyuBlade/Omega-Project
|
2938ec1b2faca4380573ace368f91fad99c27a16
|
ac08859207faf604e536e6ec07f8449900346161
|
refs/heads/master
| 2021-06-30T16:29:42.681516
| 2017-09-19T08:36:10
| 2017-09-19T08:36:10
| 103,320,237
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,110
|
java
|
package net.team.omega.core.network.serialization.internal;
import java.util.UUID;
import net.team.omega.core.network.loginserver.InternalGameServerFactory;
import net.team.omega.core.network.queue.WaitingConnection;
import net.team.omega.core.network.queue.WaitingConnectionQueue;
import net.team.omega.core.network.serialization.MessageData;
import net.team.omega.core.network.serialization.data.Account;
public class InternalGameServerGenerateKey extends MessageData
{
private Account account;
@Override
public void process()
{
WaitingConnection _wCon;
String _key = UUID.randomUUID().toString().replace("-", "");
WaitingConnection _usedCon = WaitingConnectionQueue.getInstance().getInQueue(account);
if (_usedCon != null)
_wCon = _usedCon;
else
_wCon = new WaitingConnection(account, _key);
WaitingConnectionQueue.getInstance().addToQueue(_wCon);
InternalGameServerGeneratedKey message = new InternalGameServerGeneratedKey(_wCon);
InternalGameServerFactory.getInstance().getClient().sendTCP(message);
}
}
|
[
"jonesadev@gmail.com"
] |
jonesadev@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.