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
0350ce3b50b5575b5b84ef20b90d625ff730dd26
160a34361073a54d39ffa14fdae6ce3cbc7d6e6b
/src/main/java/com/alipay/api/response/AlipayOverseasTravelRateQueryResponse.java
073878e2bcde2849b0e8e64b01214d22b4350c44
[ "Apache-2.0" ]
permissive
appbootup/alipay-sdk-java-all
6a5e55629b9fc77e61ee82ea2c4cdab2091e0272
9ae311632a4053b8e5064b83f97cf1503a00147b
refs/heads/master
2020-05-01T09:45:44.940180
2019-03-15T09:52:14
2019-03-15T09:52:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,039
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.overseas.travel.rate.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayOverseasTravelRateQueryResponse extends AlipayResponse { private static final long serialVersionUID = 3864754164555985597L; /** * 货币代码,ISO标准alpha- 3币种代码,为当前查询的币种、或者根据国家码、经纬度定位所在国家对应的币种 */ @ApiField("currency") private String currency; /** * 货币icon的url地址 */ @ApiField("currency_icon") private String currencyIcon; /** * 支付宝会员等级,只有在入参user_id存在的情况下才返回 */ @ApiField("customer_level") private String customerLevel; /** * 汇率,为支付宝当面付的当前币种/CNY的汇率值,如1美元=6.2345人民币元,即汇率为6.2345 */ @ApiField("rate") private Long rate; /** * 汇率描述 */ @ApiField("rate_desc") private String rateDesc; /** * 汇率来源说明 */ @ApiField("rate_source") private String rateSource; public void setCurrency(String currency) { this.currency = currency; } public String getCurrency( ) { return this.currency; } public void setCurrencyIcon(String currencyIcon) { this.currencyIcon = currencyIcon; } public String getCurrencyIcon( ) { return this.currencyIcon; } public void setCustomerLevel(String customerLevel) { this.customerLevel = customerLevel; } public String getCustomerLevel( ) { return this.customerLevel; } public void setRate(Long rate) { this.rate = rate; } public Long getRate( ) { return this.rate; } public void setRateDesc(String rateDesc) { this.rateDesc = rateDesc; } public String getRateDesc( ) { return this.rateDesc; } public void setRateSource(String rateSource) { this.rateSource = rateSource; } public String getRateSource( ) { return this.rateSource; } }
[ "liuqun.lq@alibaba-inc.com" ]
liuqun.lq@alibaba-inc.com
4bcf3a16569e8be3cfb3aecddbb4b778f6af71a5
a78e998b0cb3c096a6d904982bb449da4003ff8b
/app/src/main/java/com/alipay/api/response/AlipayFundCouponOrderDisburseResponse.java
86cd1258534dc0fde02bb3e2f3320bb0d499857e
[ "Apache-2.0" ]
permissive
Zhengfating/F2FDemo
4b85b598989376b3794eefb228dfda48502ca1b2
8654411f4269472e727e2230e768051162a6b672
refs/heads/master
2020-05-03T08:30:29.641080
2019-03-30T07:50:30
2019-03-30T07:50:30
178,528,073
0
0
null
null
null
null
UTF-8
Java
false
false
2,223
java
package com.alipay.api.response; import java.util.Date; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.fund.coupon.order.disburse response. * * @author auto create * @since 1.0, 2018-05-21 16:49:08 */ public class AlipayFundCouponOrderDisburseResponse extends AlipayResponse { private static final long serialVersionUID = 8438197934764354289L; /** * 本次支付的金额,单位为:元(人民币),精确到小数点后两位 */ @ApiField("amount") private String amount; /** * 支付宝的资金授权订单号 */ @ApiField("auth_no") private String authNo; /** * 资金授权成功时间 格式:YYYY-MM-DD HH:MM:SS */ @ApiField("gmt_trans") private Date gmtTrans; /** * 支付宝的资金操作流水号 */ @ApiField("operation_id") private String operationId; /** * 商户的授权资金订单号 */ @ApiField("out_order_no") private String outOrderNo; /** * 商户本次资金操作的请求流水号 */ @ApiField("out_request_no") private String outRequestNo; /** * 资金预授权明细的状态 目前支持: INIT:初始 SUCCESS: 成功 CLOSED:关闭 */ @ApiField("status") private String status; public void setAmount(String amount) { this.amount = amount; } public String getAmount( ) { return this.amount; } public void setAuthNo(String authNo) { this.authNo = authNo; } public String getAuthNo( ) { return this.authNo; } public void setGmtTrans(Date gmtTrans) { this.gmtTrans = gmtTrans; } public Date getGmtTrans( ) { return this.gmtTrans; } public void setOperationId(String operationId) { this.operationId = operationId; } public String getOperationId( ) { return this.operationId; } public void setOutOrderNo(String outOrderNo) { this.outOrderNo = outOrderNo; } public String getOutOrderNo( ) { return this.outOrderNo; } public void setOutRequestNo(String outRequestNo) { this.outRequestNo = outRequestNo; } public String getOutRequestNo( ) { return this.outRequestNo; } public void setStatus(String status) { this.status = status; } public String getStatus( ) { return this.status; } }
[ "452139060@qq.com" ]
452139060@qq.com
d7357cd169fce1d1bce4b61614b4dce68366cd8e
d2984ba2b5ff607687aac9c65ccefa1bd6e41ede
/metamodel/net/datenwerke/rs/dashboard/service/dashboard/dagets/LibraryDadget_.java
aa6622c34e46f761ccc753170245e0081a76b10f
[]
no_license
bireports/ReportServer
da979eaf472b3e199e6fbd52b3031f0e819bff14
0f9b9dca75136c2bfc20aa611ebbc7dc24cfde62
refs/heads/master
2020-04-18T10:18:56.181123
2019-01-25T00:45:14
2019-01-25T00:45:14
167,463,795
0
0
null
null
null
null
UTF-8
Java
false
false
1,425
java
/* * ReportServer * Copyright (c) 2018 InfoFabrik GmbH * http://reportserver.net/ * * * This file is part of ReportServer. * * ReportServer is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package net.datenwerke.rs.dashboard.service.dashboard.dagets; import javax.annotation.Generated; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.StaticMetamodel; import net.datenwerke.rs.dashboard.service.dashboard.entities.DadgetNode; @Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor") @StaticMetamodel(LibraryDadget.class) public abstract class LibraryDadget_ extends net.datenwerke.rs.dashboard.service.dashboard.entities.Dadget_ { public static volatile SingularAttribute<LibraryDadget, DadgetNode> dadgetNode; }
[ "srbala@gmail.com" ]
srbala@gmail.com
57b41310a6256a1f7e0dc04c7462728fc5461d36
c20f74f7d4eebcf0b545413fbc3d7924e665e1a3
/impl/src/main/java/org/jboss/arquillian/ajocado/framework/SystemPropertiesConfiguration.java
d205de43ad91b9d8658787f6159b93efff33c9cd
[]
no_license
lfryc/arquillian-ajocado
3dfccc1067b3e526015c8674aae836259699d359
82c5cdbae3a07872e1f150642d4f28ae3d49063f
refs/heads/master
2021-07-08T10:26:43.488427
2012-08-02T21:02:03
2012-08-02T21:02:03
1,339,921
0
0
null
null
null
null
UTF-8
Java
false
false
5,791
java
/** * JBoss, Home of Professional Open Source * Copyright 2011, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.arquillian.ajocado.framework; import static org.jboss.arquillian.ajocado.utils.PrimitiveUtils.asBoolean; import static org.jboss.arquillian.ajocado.utils.PrimitiveUtils.asInteger; import static org.jboss.arquillian.ajocado.utils.PrimitiveUtils.asLong; import java.io.File; import java.net.URL; import org.apache.commons.lang.Validate; import org.jboss.arquillian.ajocado.browser.Browser; import org.jboss.arquillian.ajocado.utils.URLUtils; /** * Exposing of test system properties. * * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a> * @version $Revision$ */ public class SystemPropertiesConfiguration implements AjocadoConfiguration { /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#getContextRoot() */ @Override public URL getContextRoot() { String contextRoot = System.getProperty("context.root", "http://localhost:8080/"); Validate.notNull(contextRoot, "context.root system property should be set"); return URLUtils.buildUrl(contextRoot); } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#getContextPath() */ @Override public URL getContextPath() { String contextPath = System.getProperty("context.path", "/"); Validate.notNull(contextPath, "context.path system property should be set"); return URLUtils.buildUrl(getContextRoot(), contextPath); } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#getBrowser() */ @Override public Browser getBrowser() { String browser = System.getProperty("browser", "*firefox"); Validate.notNull(browser, "browser system property should be set"); return new Browser(browser); } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#getMavenResourcesDir() */ @Override public File getResourcesDirectory() { return new File(System.getProperty("maven.resources.dir", "./target/test-classes/")); } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#getMavenProjectBuildDirectory() */ @Override public File getBuildDirectory() { return new File(System.getProperty("maven.project.build.directory", "./target/")); } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#getSeleniumHost() */ @Override public String getSeleniumHost() { String seleniumHost = System.getProperty("selenium.host", "localhost"); Validate.notNull(seleniumHost, "selenium.host system property should be set"); return seleniumHost; } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#getSeleniumPort() */ @Override public int getSeleniumPort() { String seleniumPort = System.getProperty("selenium.port", "4444"); Validate.notNull(seleniumPort, "selenium.port system property should be set"); return asInteger(seleniumPort); } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#isSeleniumMaximize() */ @Override public boolean isSeleniumMaximize() { return asBoolean(System.getProperty("selenium.maximize", "false")); } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#isSeleniumDebug() */ @Override public boolean isSeleniumDebug() { return asBoolean(System.getProperty("selenium.debug", "false")); } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#getSeleniumSpeed() */ @Override public int getSeleniumSpeed() { return asInteger(System.getProperty("selenium.speed", "0")); } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#isSeleniumNetworkTrafficEnabled() */ @Override public boolean isSeleniumNetworkTrafficEnabled() { return asBoolean(System.getProperty("selenium.network.traffic", "false")); } /* * (non-Javadoc) * * @see org.jboss.arquillian.ajocado.AjocadoConfiguration#getSeleniumTimeout(org.jboss.arquillian.ajocado. * AjocadoConfigurationImpl.SeleniumTimeoutType) */ @Override public long getTimeout(TimeoutType type) { Validate.notNull(type); String seleniumTimeout = System.getProperty("selenium.timeout." + type.toString().toLowerCase()); if (seleniumTimeout == null) { return type.getDefaultTimeout(); } return asLong(seleniumTimeout); } }
[ "lfryc@redhat.com" ]
lfryc@redhat.com
f4fb386c3e51b026d8e2fbbd53792a4f235ad594
e222da100111ac4507be15c5f87b4d2419924c80
/05-spring-data-access/01-spring-jdbc/src/main/java/com/sivalabs/springtraining/DBInitializer.java
cb516b6b659785438c9ff3039a638c367b10fc5d
[]
no_license
KuldipSekhon/spring-training
18b40234872884ed686635e7255e4728e326a5fb
12c8b3dcc27593f99ae790380db8356c3a1866f9
refs/heads/master
2021-01-14T12:40:09.738844
2015-02-26T09:38:18
2015-02-26T09:38:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,203
java
/** * */ package com.sivalabs.springtraining; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.core.io.ClassPathResource; import org.springframework.jdbc.datasource.init.DataSourceInitializer; import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; import org.springframework.stereotype.Component; /** * @author katsi02 * */ @Component public class DBInitializer { @Autowired private DataSource dataSource; @Value("${init-db:false}") private String initDatabase; @Bean public DataSourceInitializer dataSourceInitializer() { DataSourceInitializer dataSourceInitializer = new DataSourceInitializer(); dataSourceInitializer.setDataSource(dataSource); ResourceDatabasePopulator databasePopulator = new ResourceDatabasePopulator(); databasePopulator.addScript(new ClassPathResource("db.sql")); dataSourceInitializer.setDatabasePopulator(databasePopulator); dataSourceInitializer.setEnabled(Boolean.parseBoolean(initDatabase)); return dataSourceInitializer; } }
[ "sivaprasadreddy.k@gmail.com" ]
sivaprasadreddy.k@gmail.com
9e46874c7a60dc77306f225bb2ba1de45f36ee35
34fce87cbdb1a9838cdfcf4d0d3933cbc7a8340f
/src/main/java/com/granovskiy/controller/GetProductByIdController.java
0d2d2ebd0d20c7fc126e0091a4c95ad5913f39e4
[]
no_license
SviatoslavExpert/webapp-with-product-section
a0c709de7c33cd2d963ae6eecb34cfed19bc5a02
ea14275cd45b4d51d4c7bfc791e99c9d8cbb0ed0
refs/heads/master
2020-04-26T12:18:35.268699
2019-03-03T07:46:17
2019-03-03T07:46:17
173,545,207
1
0
null
null
null
null
UTF-8
Java
false
false
803
java
package com.granovskiy.controller; import com.granovskiy.Request; import com.granovskiy.ViewModel; import com.granovskiy.service.ProductService; import static java.util.Collections.emptyList; public class GetProductByIdController implements Controller { private final ProductService productService; public GetProductByIdController(ProductService productService) { this.productService = productService; } @Override public ViewModel process(Request req) { String param = req.getParam("p_id")[0]; Long id = Long.parseLong(param); return productService.getById(id) .map(p -> ViewModel.of("product").withAttribute("product", p)) .orElseGet(() -> ViewModel.of("product").withAttribute("product", emptyList())); } }
[ "s.granovskiy@gmail.com" ]
s.granovskiy@gmail.com
86bbdef32d264cf550e18ef0e71bbc17a9120daf
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project42/src/test/java/org/gradle/test/performance42_1/Test42_84.java
09dfd1048cd50306167d86e1cd8cc3aeb999eec2
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
289
java
package org.gradle.test.performance42_1; import static org.junit.Assert.*; public class Test42_84 { private final Production42_84 production = new Production42_84("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
72795e0aa8299c381a6357047015926de83fd7f1
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1910_public/tests/more/src/java/module1910_public_tests_more/a/Foo2.java
7d1950579b71ad6cba4e97cf89c89b468445cda0
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,670
java
package module1910_public_tests_more.a; import java.util.logging.*; import java.util.zip.*; import javax.annotation.processing.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see javax.net.ssl.ExtendedSSLSession * @see javax.rmi.ssl.SslRMIClientSocketFactory * @see java.awt.datatransfer.DataFlavor */ @SuppressWarnings("all") public abstract class Foo2<K> extends module1910_public_tests_more.a.Foo0<K> implements module1910_public_tests_more.a.IFoo2<K> { java.beans.beancontext.BeanContext f0 = null; java.io.File f1 = null; java.rmi.Remote f2 = null; public K element; public static Foo2 instance; public static Foo2 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module1910_public_tests_more.a.Foo0.create(input); } public String getName() { return module1910_public_tests_more.a.Foo0.getInstance().getName(); } public void setName(String string) { module1910_public_tests_more.a.Foo0.getInstance().setName(getName()); return; } public K get() { return (K)module1910_public_tests_more.a.Foo0.getInstance().get(); } public void set(Object element) { this.element = (K)element; module1910_public_tests_more.a.Foo0.getInstance().set(this.element); } public K call() throws Exception { return (K)module1910_public_tests_more.a.Foo0.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
2afd20c5331b3522c7fc98a686009010aadf70c4
df35764f6fe74c96fe829d3069e8f0a910216ede
/app/src/main/java/com/hotbitmapgg/androidrank/ui/activity/GankToDayActivity.java
4fa101ebc2e2ade84d4efe7813036ff5f1a19231
[ "Apache-2.0" ]
permissive
itisi00/AndroidRank
12fe1779de91fa967d9b4f10208cc3af6654c2e9
d81d401688152be90debf3a03d91b4d4be44b5fa
refs/heads/master
2020-06-18T09:58:37.564195
2016-11-28T03:16:24
2016-11-28T03:16:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,509
java
package com.hotbitmapgg.androidrank.ui.activity; import android.app.Activity; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.design.widget.BottomSheetBehavior; import android.support.v7.app.ActionBar; import android.support.v7.app.AlertDialog; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.view.View; import android.widget.ImageView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.hotbitmapgg.androidrank.base.RxBaseActivity; import com.hotbitmapgg.studyproject.R; import com.hotbitmapgg.androidrank.adapter.GankListAdapter; import com.hotbitmapgg.androidrank.model.Gank; import com.hotbitmapgg.androidrank.model.GankDayInfo; import com.hotbitmapgg.androidrank.network.RetrofitHelper; import com.hotbitmapgg.androidrank.widget.recyclehelper.AbsRecyclerViewAdapter; import java.util.ArrayList; import java.util.List; import butterknife.Bind; import rx.android.schedulers.AndroidSchedulers; import rx.functions.Action1; import rx.schedulers.Schedulers; /** * Created by hcc on 16/7/6 15:44 * 100332338@qq.com * <p/> * 每日干货数据 */ public class GankToDayActivity extends RxBaseActivity { @Bind(R.id.recycle) RecyclerView mRecyclerView; @Bind(R.id.iv_fuli) ImageView mImageView; @Bind(R.id.toolbar) Toolbar mToolbar; private static final String ARG_YEAR = "year"; private static final String ARG_MONTH = "month"; private static final String ARG_DAY = "day"; private int year; private int month; private int day; private List<Gank.GankInfo> ganks = new ArrayList<>(); private BottomSheetBehavior<RecyclerView> behavior; @Override public int getLayoutId() { return R.layout.activity_gank_day; } @Override public void initViews(Bundle savedInstanceState) { Intent intent = getIntent(); if (intent != null) { year = intent.getIntExtra(ARG_YEAR, -1); month = intent.getIntExtra(ARG_MONTH, -1); day = intent.getIntExtra(ARG_DAY, -1); } getGankData(); } private void getGankData() { RetrofitHelper.getGankApi() .getGankDayData(year, month, day) .compose(this.<GankDayInfo> bindToLifecycle()) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Action1<GankDayInfo>() { @Override public void call(GankDayInfo gankDayInfo) { if (gankDayInfo.results.Android != null) ganks.addAll(gankDayInfo.results.Android); if (gankDayInfo.results.iOS != null) ganks.addAll(gankDayInfo.results.iOS); if (gankDayInfo.results.休息视频 != null) ganks.addAll(gankDayInfo.results.休息视频); if (gankDayInfo.results.拓展资源 != null) ganks.addAll(gankDayInfo.results.拓展资源); if (gankDayInfo.results.瞎推荐 != null) ganks.addAll(gankDayInfo.results.瞎推荐); if (gankDayInfo.results.福利 != null) ganks.addAll(gankDayInfo.results.福利); if (gankDayInfo.results.福利 != null) setBackBroudImage(gankDayInfo.results.福利.get(0).url); finishTask(); } }); } private void setBackBroudImage(String url) { Glide.with(GankToDayActivity.this) .load(url) .centerCrop() .diskCacheStrategy(DiskCacheStrategy.ALL) .into(mImageView); } private void finishTask() { if (ganks.isEmpty()) new AlertDialog.Builder(GankToDayActivity.this) .setTitle("提示") .setMessage("今日休息,暂无干货") .setCancelable(false) .setNegativeButton("确定", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); GankToDayActivity.this.finish(); } }).show(); LinearLayoutManager layoutManager = new LinearLayoutManager(GankToDayActivity.this); mRecyclerView.setLayoutManager(layoutManager); GankListAdapter mAdapter = new GankListAdapter(mRecyclerView, ganks); mRecyclerView.setAdapter(mAdapter); mAdapter.setOnItemClickListener(new AbsRecyclerViewAdapter.OnItemClickListener() { @Override public void onItemClick(int position, AbsRecyclerViewAdapter.ClickableViewHolder holder) { Gank.GankInfo gankInfo = ganks.get(position); if (gankInfo.type.equals("休息视频")) { VideoWebActivity.launch(GankToDayActivity.this, gankInfo.url); } else if (gankInfo.type.equals("福利")) { Intent intent = FuliFullPicActivity.LuanchActivity(GankToDayActivity.this, gankInfo.url, gankInfo.desc); startActivity(intent); } else { WebActivity.start(GankToDayActivity.this, gankInfo.url, gankInfo.desc); } } }); behavior = BottomSheetBehavior.from(mRecyclerView); behavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View bottomSheet, int newState) { } @Override public void onSlide(@NonNull View bottomSheet, float slideOffset) { } }); showBottomSheet(); } @Override public void initToolBar() { mToolbar.setTitle(year + "/" + month + "/" + day); setSupportActionBar(mToolbar); ActionBar supportActionBar = getSupportActionBar(); if (supportActionBar != null) supportActionBar.setDisplayHomeAsUpEnabled(true); } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) onBackPressed(); return super.onOptionsItemSelected(item); } private void showBottomSheet() { behavior.setPeekHeight(400); behavior.setState(BottomSheetBehavior.STATE_COLLAPSED); } public static void luanhcer(Activity activity, int year, int month, int day) { Intent intent = new Intent(activity, GankToDayActivity.class); intent.putExtra(ARG_YEAR, year); intent.putExtra(ARG_MONTH, month); intent.putExtra(ARG_DAY, day); activity.startActivity(intent); } }
[ "100332338@qq.com" ]
100332338@qq.com
e3dc39fd072b2bcab2bcd02639b1dc53c8607f79
5f6edf313639dbe464a1c9cbb62762b427786235
/lydsj-webserver/Crawler/esbapi/src/com/asiainfo/bean/AsiainfoHeader.java
9e3d9314321c09bf772a65e962408e41d3d0b98d
[]
no_license
magicgis/outfile
e69b785cd14ce7cb08d93d0f83b3f4c0b435b17b
497635e2cd947811bf616304e9563e59f0ab4f56
refs/heads/master
2020-05-07T19:24:08.371572
2019-01-23T04:57:18
2019-01-23T04:57:18
null
0
0
null
null
null
null
GB18030
Java
false
false
2,202
java
package com.asiainfo.bean; import com.asiainfo.util.AsiainfoHashMap; public class AsiainfoHeader { private String appId; private String timestamp; private String busiSerial; // private String sign;该参数不需要调用者赋值。 private String sign_method; private String nonce; private String authCode; private String operatorid; private String comflowcode; private String instanceid; private String route_type; private String route_value; private String unitid; public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } public String getTimestamp() { return timestamp; } public void setTimestamp(String timestamp) { this.timestamp = timestamp; } public String getBusiSerial() { return busiSerial; } public void setBusiSerial(String busiSerial) { this.busiSerial = busiSerial; } // public String getSign() { // return sign; // } // public void setSign(String sign) { // this.sign = sign; // } public String getSign_method() { return sign_method; } public void setSign_method(String sign_method) { this.sign_method = sign_method; } public String getNonce() { return nonce; } public void setNonce(String nonce) { this.nonce = nonce; } public String getAuthCode() { return authCode; } public void setAuthCode(String authCode) { this.authCode = authCode; } public String getOperatorid() { return operatorid; } public void setOperatorid(String operatorid) { this.operatorid = operatorid; } public String getComflowcode() { return comflowcode; } public void setComflowcode(String comflowcode) { this.comflowcode = comflowcode; } public String getInstanceid() { return instanceid; } public void setInstanceid(String instanceid) { this.instanceid = instanceid; } public String getRoute_type() { return route_type; } public void setRoute_type(String route_type) { this.route_type = route_type; } public String getRoute_value() { return route_value; } public void setRoute_value(String route_value) { this.route_value = route_value; } public String getUnitid() { return unitid; } public void setUnitid(String unitid) { this.unitid = unitid; } }
[ "942364283@qq.com" ]
942364283@qq.com
7c9a51b86d18ba736baf95df4078d66788aad69d
c04e3e2e0c27a99a046e0d729bc2254e2ae46e32
/smack-experimental/src/test/java/org/jivesoftware/smackx/muclight/MUCLightGetAffiliationsTest.java
ef543e424ef4e21f41f5a9b8a7126702b6f36b7a
[ "Apache-2.0" ]
permissive
weiqiangzheng/Smack
af7cf1a604208d0bd85cf09c63e84ff020c0d1ba
9e18ba232722ba01aec0cc798237bb4b0585658b
refs/heads/master
2020-03-20T13:49:23.312992
2018-06-14T08:00:37
2018-06-14T08:00:37
137,467,404
1
0
Apache-2.0
2018-06-15T09:18:03
2018-06-15T09:18:03
null
UTF-8
Java
false
false
3,167
java
/** * * Copyright 2016 Fernando Ramirez * * 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.jivesoftware.smackx.muclight; import java.util.HashMap; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StreamOpen; import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smackx.muclight.element.MUCLightAffiliationsIQ; import org.jivesoftware.smackx.muclight.element.MUCLightGetAffiliationsIQ; import org.junit.Assert; import org.junit.Test; import org.jxmpp.jid.Jid; import org.jxmpp.jid.impl.JidCreate; public class MUCLightGetAffiliationsTest { private static final String getAffiliationsIQExample = "<iq to='coven@muclight.shakespeare.lit' id='getmembers' type='get'>" + "<query xmlns='urn:xmpp:muclight:0#affiliations'>" + "<version>abcdefg</version>" + "</query>" + "</iq>"; private static final String getAffiliationsResponseExample = "<iq from='coven@muclight.shakespeare.lit' id='getmembers' to='crone1@shakespeare.lit/desktop' type='result'>" + "<query xmlns='urn:xmpp:muclight:0#affiliations'>" + "<version>123456</version>" + "<user affiliation='owner'>user1@shakespeare.lit</user>" + "<user affiliation='member'>user2@shakespeare.lit</user>" + "<user affiliation='member'>user3@shakespeare.lit</user>" + "</query>" + "</iq>"; @Test public void checkGetAffiliationsIQ() throws Exception { MUCLightGetAffiliationsIQ mucLightGetAffiliationsIQ = new MUCLightGetAffiliationsIQ( JidCreate.from("coven@muclight.shakespeare.lit"), "abcdefg"); mucLightGetAffiliationsIQ.setStanzaId("getmembers"); Assert.assertEquals(getAffiliationsIQExample, mucLightGetAffiliationsIQ.toXML(StreamOpen.CLIENT_NAMESPACE).toString()); } @Test public void checkGetAffiliationsResponse() throws Exception { IQ iqInfoResult = PacketParserUtils.parseStanza(getAffiliationsResponseExample); MUCLightAffiliationsIQ mucLightAffiliationsIQ = (MUCLightAffiliationsIQ) iqInfoResult; Assert.assertEquals("123456", mucLightAffiliationsIQ.getVersion()); HashMap<Jid, MUCLightAffiliation> affiliations = mucLightAffiliationsIQ.getAffiliations(); Assert.assertEquals(3, affiliations.size()); Assert.assertEquals(MUCLightAffiliation.owner, affiliations.get(JidCreate.from("user1@shakespeare.lit"))); Assert.assertEquals(MUCLightAffiliation.member, affiliations.get(JidCreate.from("user2@shakespeare.lit"))); Assert.assertEquals(MUCLightAffiliation.member, affiliations.get(JidCreate.from("user3@shakespeare.lit"))); } }
[ "flo@geekplace.eu" ]
flo@geekplace.eu
7c32a7eb0ccfd27681277ac94d422ce29ba988b4
8cb955b7dec248679ec64b82f4c7df5812b8531b
/src/java/user/beans/UserProfileBean.java
cdff480e022973a4892d8158bdf192ac620dfbfa
[]
no_license
vtomic85/TCMS
dedf989a417616340308f1071c116251ac43e953
20aff23c5510e54c7e0abff19eaf84a777701380
refs/heads/master
2022-12-05T11:34:09.255605
2021-02-12T13:34:44
2021-02-12T13:34:44
36,179,350
0
0
null
null
null
null
UTF-8
Java
false
false
4,146
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package user.beans; import java.util.List; import javax.faces.application.FacesMessage; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import platform.dao.CountryDAO; import platform.model.Country; import user.dao.UserDAO; import user.model.User; import utils.Utils; /** * * @author Vladimir Tomic */ @ManagedBean @ViewScoped public class UserProfileBean { private User user; private long userId; private List<Country> countryList; private String oldPassword; private String newPassword; private String confirmPassword; private UIComponent oldPasswordComponent; private UIComponent newPasswordComponent; private UIComponent confirmPasswordComponent; public UserProfileBean() { } public void init() { userId = ((User) Utils.getSessionAttribute("user")).getId(); if (userId > 0) { user = UserDAO.getById(userId); } } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public String save() { user.calcUtilToSqlDates(); UserDAO.updateNoPassEnc(user); Utils.setSessionAttribute("user", user); return "userProfilePage"; } public String changePass() { FacesContext context = FacesContext.getCurrentInstance(); if (!newPassword.equals(confirmPassword)) { newPassword = ""; confirmPassword = ""; context.addMessage(confirmPasswordComponent.getClientId(context), new FacesMessage("Passwords do not match!")); return null; } if (UserDAO.passwordOk(user.getUsername(), oldPassword) < 1) { oldPassword = ""; context.addMessage(oldPasswordComponent.getClientId(context), new FacesMessage("Old password incorrect!")); return null; } user.setPassword(newPassword); UserDAO.updatePassEnc(user); newPassword = ""; confirmPassword = ""; oldPassword = ""; context.addMessage(confirmPasswordComponent.getClientId(context), new FacesMessage("Password successfully changed!")); return null; } public long getUserId() { return userId; } public void setUserId(long userId) { this.userId = userId; } public List<Country> getCountryList() { countryList = CountryDAO.getAll(); return countryList; } public String getOldPassword() { return oldPassword; } public void setOldPassword(String oldPassword) { this.oldPassword = oldPassword; } public String getNewPassword() { return newPassword; } public void setNewPassword(String newPassword) { this.newPassword = newPassword; } public String getConfirmPassword() { return confirmPassword; } public void setConfirmPassword(String confirmPassword) { this.confirmPassword = confirmPassword; } public UIComponent getOldPasswordComponent() { return oldPasswordComponent; } public void setOldPasswordComponent(UIComponent oldPasswordComponent) { this.oldPasswordComponent = oldPasswordComponent; } public UIComponent getNewPasswordComponent() { return newPasswordComponent; } public void setNewPasswordComponent(UIComponent newPasswordComponent) { this.newPasswordComponent = newPasswordComponent; } public UIComponent getConfirmPasswordComponent() { return confirmPasswordComponent; } public void setConfirmPasswordComponent(UIComponent confirmPasswordComponent) { this.confirmPasswordComponent = confirmPasswordComponent; } }
[ "vladimir.tomic.la@gmail.com" ]
vladimir.tomic.la@gmail.com
bfc5a8b428a337aa4552326fe8f1f2c8b593501c
f8a14fec331ec56dd7e070fc032604117f155085
/commons/src/main/java/ru/l2/commons/net/io/IOClient.java
23997a61725ba391bc0228bbcb70428405e2a92a
[]
no_license
OFRF/BladeRush
c2f06d050a1f2d79a9b50567b9f1152d6d755149
87329d131c0fcc8417ed15479298fdb90bc8f1d2
refs/heads/master
2023-03-25T13:51:04.404738
2020-05-04T14:37:23
2020-05-04T14:37:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
372
java
package ru.l2.commons.net.io; public class IOClient<IOCtx extends IOContext> { private final IOCtx ioContext; public IOClient(final IOCtx ioContext) { this.ioContext = ioContext; } protected IOCtx getIOContext() { return ioContext; } protected void onDisconnection() { } protected void onForcedDisconnection() { } }
[ "yadrov995@gmail.com" ]
yadrov995@gmail.com
2bc8cca89852b94285fe0c8645e6e156b653e002
ad5cd983fa810454ccbb8d834882856d7bf6faca
/platform/ext/core/testsrc/de/hybris/platform/persistence/InitialAttributePersistenceTest.java
8c5482816fb44034a24dcb064607684356f35dc1
[]
no_license
amaljanan/my-hybris
2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8
ef9f254682970282cf8ad6d26d75c661f95500dd
refs/heads/master
2023-06-12T17:20:35.026159
2021-07-09T04:33:13
2021-07-09T04:33:13
384,177,175
0
0
null
null
null
null
UTF-8
Java
false
false
7,764
java
/* * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.persistence; import static org.junit.Assert.assertNotNull; import de.hybris.bootstrap.annotations.IntegrationTest; import de.hybris.platform.jalo.ConsistencyCheckException; import de.hybris.platform.jalo.JaloInvalidParameterException; import de.hybris.platform.jalo.c2l.C2LManager; import de.hybris.platform.jalo.c2l.Country; import de.hybris.platform.jalo.c2l.Language; import de.hybris.platform.jalo.product.Unit; import de.hybris.platform.jalo.security.JaloSecurityException; import de.hybris.platform.jalo.type.AttributeDescriptor; import de.hybris.platform.jalo.type.ComposedType; import de.hybris.platform.jalo.type.JaloAbstractTypeException; import de.hybris.platform.jalo.type.JaloDuplicateCodeException; import de.hybris.platform.jalo.type.JaloDuplicateQualifierException; import de.hybris.platform.jalo.type.JaloGenericCreationException; import de.hybris.platform.jalo.type.TypeManager; import de.hybris.platform.jalo.user.User; import de.hybris.platform.testframework.HybrisJUnit4TransactionalTest; import de.hybris.platform.testframework.TestUtils; import java.util.HashMap; import java.util.Map; import org.junit.Before; import org.junit.Test; // The test shows the problems associated with marking the attributes as INITIAL from core types(that are still not fully migrated) @IntegrationTest public class InitialAttributePersistenceTest extends HybrisJUnit4TransactionalTest { public final static String ATTRIBUTE_NAME = "myCountry"; private ComposedType countryType; private Country country; @Before public void setUp() throws Exception { TestUtils.disableFileAnalyzer("log error expected for all methods"); countryType = TypeManager.getInstance().getComposedType(Country.class); country = C2LManager.getInstance().createCountry("pl"); } @Before public void tearDown() throws Exception { TestUtils.enableFileAnalyzer(); } /** * User type is INITIAL aware. */ @Test public void testUserFixed() throws JaloGenericCreationException, JaloAbstractTypeException, JaloDuplicateQualifierException, JaloInvalidParameterException, ConsistencyCheckException, JaloSecurityException, JaloDuplicateCodeException { final ComposedType userType = TypeManager.getInstance().getComposedType(User.class); final ComposedType myUserType = TypeManager.getInstance().createComposedType(userType, "MyTestUser"); myUserType.setJaloClass(MyTestUser.class); myUserType.createAttributeDescriptor(ATTRIBUTE_NAME, countryType, AttributeDescriptor.INITIAL_FLAG | AttributeDescriptor.PROPERTY_FLAG | AttributeDescriptor.SEARCH_FLAG | AttributeDescriptor.WRITE_FLAG | AttributeDescriptor.READ_FLAG | AttributeDescriptor.REMOVE_FLAG); final Map params = new HashMap(); params.put(User.UID, "MyTestUser1"); params.put(ATTRIBUTE_NAME, country); final MyTestUser myTestUser = (MyTestUser) myUserType.newInstance(params); // the 'uid' attribute which is derived directly from User type assertNotNull("The 'UID' attribute of the MyTestUser can not be null!", myTestUser.getUID()); // 1) myCountry is marked as a INITIAL attribute within MyTestUser#createItem method // 2) the User type and all subtypes currently support INITIAL flag and the 'myCountry' attribute is included in INSERT SQL statement (CORE-18, PLA-10479) // 3) the User type extends GenericItem and thus the 'myCountry' attribute is excluded from the UPDATE SQL statement. assertNotNull("The 'myCountry' attribute of the MyTestUser can not be null!", myTestUser.getAttribute(ATTRIBUTE_NAME)); } /** * Unit type is NOT INITIAL aware. */ @Test public void testUnitStillNotFixed() throws JaloDuplicateQualifierException, JaloInvalidParameterException, JaloGenericCreationException, JaloAbstractTypeException, JaloSecurityException, JaloDuplicateCodeException { final ComposedType unitType = TypeManager.getInstance().getComposedType(Unit.class); final ComposedType myUnitType = TypeManager.getInstance().createComposedType(unitType, "MyTestUnit"); myUnitType.setJaloClass(MyTestUnit.class); myUnitType.createAttributeDescriptor(ATTRIBUTE_NAME, countryType, AttributeDescriptor.INITIAL_FLAG | AttributeDescriptor.PROPERTY_FLAG | AttributeDescriptor.SEARCH_FLAG | AttributeDescriptor.WRITE_FLAG | AttributeDescriptor.READ_FLAG | AttributeDescriptor.REMOVE_FLAG); final Map params = new HashMap(); params.put(Unit.CODE, "MyTestUnit1"); params.put(Unit.UNITTYPE, "Type1"); params.put(ATTRIBUTE_NAME, country); final MyTestUnit myTestUnit = (MyTestUnit) myUnitType.newInstance(params); // the 'code' attribute which is derived directly from User type assertNotNull("The 'code' attribute of the MyTestUnit can not be null!", myTestUnit.getCode()); // 1) myCountry is marked as a INITIAL attribute within MyTestUnit#createItem method // 2) the Unit type and all subtypes DO NOT support INITIAL flag and the 'myCountry' attribute IS NOT // included in INSERT SQL statement (Still to do!) // 3) the Unit type extends only LocalizableItem and thus the 'myCountry' attribute is NOT excluded // from the UPDATE SQL statement AND this entails that it does not return null AND it seems that everything works well... assertNotNull("The 'myCountry' attribute of the MyTestUnit can not be null!", myTestUnit.getAttribute(ATTRIBUTE_NAME)); } /** * Language type is NOT INITIAL aware. * <p> * PLA-10479 solves the null value problem. Within GenericItem#getInitialProperties and * GenericItem#getNonInitialAttributes the markInitialPropertyFetch() feature is used which ensures that within all * core types the null problem not exists. */ @Test public void testLanguageStillNotFixed() throws JaloDuplicateQualifierException, JaloInvalidParameterException, JaloGenericCreationException, JaloAbstractTypeException, JaloSecurityException, JaloDuplicateCodeException { final ComposedType languageType = TypeManager.getInstance().getComposedType(Language.class); final ComposedType myLanguageType = TypeManager.getInstance().createComposedType(languageType, "MyTestLanguage"); myLanguageType.setJaloClass(MyTestLanguage.class); myLanguageType.createAttributeDescriptor(ATTRIBUTE_NAME, countryType, AttributeDescriptor.INITIAL_FLAG | AttributeDescriptor.PROPERTY_FLAG | AttributeDescriptor.SEARCH_FLAG | AttributeDescriptor.WRITE_FLAG | AttributeDescriptor.READ_FLAG | AttributeDescriptor.REMOVE_FLAG); final Map params = new HashMap(); params.put(Language.ISOCODE, "MyTestLanguage1"); params.put(ATTRIBUTE_NAME, country); final MyTestLanguage myTestUnit = (MyTestLanguage) myLanguageType.newInstance(params); // the 'isocode' attribute which is derived directly from User type assertNotNull("The 'isocode' attribute of the MyTestLanguage can not be null!", myTestUnit.getIsoCode()); // 1) myCountry is marked as a INITIAL attribute within MyTestLanguage#createItem method // 2) the Language type and all subtypes DO NOT support INITIAL flag and the 'myCountry' attribute IS NOT // included in INSERT SQL statement (Still to do!) // 3) the Language type extends GenericItem: // a) (before PLA-10479 fix: and the initial values will be excluded from the UPDATE process // and as a result of these steps the null value is returned!); // b) (after PLA-10479 fix: the initial values will BE included in UPDATE process) assertNotNull("The 'myCountry' attribute of the MyTestLanguage can not be null!", myTestUnit.getAttribute(ATTRIBUTE_NAME)); } }
[ "amaljanan333@gmail.com" ]
amaljanan333@gmail.com
4388a792f8ecb56ed0ab8b29876814def11882fa
14746c4b8511abe301fd470a152de627327fe720
/soroush-android-1.10.0_source_from_JADX/mobi/mmdt/ott/view/main/NewGroupActivity.java
0e08902669fdd23083320b8534556e40fb75a32f
[]
no_license
maasalan/soroush-messenger-apis
3005c4a43123c6543dbcca3dd9084f95e934a6f4
29867bf53a113a30b1aa36719b1c7899b991d0a8
refs/heads/master
2020-03-21T21:23:20.693794
2018-06-28T19:57:01
2018-06-28T19:57:01
139,060,676
3
2
null
null
null
null
UTF-8
Java
false
false
5,482
java
package mobi.mmdt.ott.view.main; import android.content.Intent; import android.graphics.Point; import android.os.Bundle; import android.support.design.widget.TextInputLayout; import android.text.InputFilter; import android.text.InputFilter.LengthFilter; import android.view.Display; import android.view.Menu; import android.view.MenuItem; import android.view.ViewGroup.LayoutParams; import android.widget.EditText; import android.widget.RelativeLayout; import mobi.mmdt.componentsutils.p232b.C2491i; import mobi.mmdt.ott.R; import mobi.mmdt.ott.logic.stheme.UIThemeManager; import mobi.mmdt.ott.provider.p384f.C2973m; import mobi.mmdt.ott.view.components.C7695a; import mobi.mmdt.ott.view.tools.C4522p; public class NewGroupActivity extends C7695a { private EditText f24750A; private EditText f24751B; private RelativeLayout f24752C; private TextInputLayout f24753z; protected final int mo3643g() { return R.drawable.ic_place_holder_group; } protected final String mo3695h() { return null; } protected final C2973m mo3696i() { return C2973m.GROUP; } protected final void mo3697j() { } protected final void mo3698k() { this.v = 0.75d; this.w = 0.5d; } protected final void mo3699l() { } public void onCreate(Bundle bundle) { super.onCreate(bundle); m21057e((int) R.layout.fragment_new_group); this.f24753z = (TextInputLayout) findViewById(R.id.groupName_textInputLayout); this.f24750A = (EditText) findViewById(R.id.groupName_editText); TextInputLayout textInputLayout = (TextInputLayout) findViewById(R.id.groupMotto_textInputLayout); this.f24751B = (EditText) findViewById(R.id.groupMotto_editText); this.f24750A.setFilters(new InputFilter[]{new LengthFilter(128)}); this.f24750A.setMaxLines(1); this.f24750A.setSingleLine(true); this.f24750A.requestFocus(); this.f24751B.setFilters(new InputFilter[]{new LengthFilter(140)}); this.f24751B.setMaxLines(5); this.f24752C = (RelativeLayout) findViewById(R.id.root_layout); Display defaultDisplay = getWindowManager().getDefaultDisplay(); Point point = new Point(); defaultDisplay.getSize(point); LayoutParams layoutParams = this.f24752C.getLayoutParams(); layoutParams.height = (int) (((float) (point.y - (C2491i.m6759a(getApplicationContext()) + C2491i.m6805b(getApplicationContext())))) + C2491i.m6804b(getApplicationContext(), 8.0f)); if (getResources().getConfiguration().orientation == 2) { layoutParams.width = (int) (((double) point.x) * 0.75d); layoutParams.height = (int) (((double) point.y) * 1.1d); } C2491i.m6796a(this.f24752C, UIThemeManager.getmInstance().getRecycler_view_background_color()); C2491i.m6780a(UIThemeManager.getmInstance().getText_primary_color(), UIThemeManager.getmInstance().getAccent_color(), this.f24751B, this.f24750A); C2491i.m6781a(UIThemeManager.getmInstance().getAccent_color(), this.f24753z, textInputLayout); m21053a(C4522p.m8236a(R.string.new_group_chat), false); m21062h(C2491i.m6806b(getApplicationContext(), null)); m21069o(); m21070p(); if (bundle != null) { if (bundle.containsKey("KEY_GROUP_NAME")) { this.f24750A.setText(bundle.getString("KEY_GROUP_NAME")); } if (bundle.containsKey("KEY_GROUP_MOTTO")) { this.f24751B.setText(bundle.getString("KEY_GROUP_MOTTO")); } } if (this.s != null) { m21052a(this.s); m21055b(this.s); } } public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_done_bar_white, menu); C2491i.m6790a(menu.findItem(R.id.action_done).getIcon(), UIThemeManager.getmInstance().getMenu_item_white_color()); return true; } public boolean onOptionsItemSelected(MenuItem menuItem) { if (menuItem.getItemId() == R.id.action_done) { String trim = this.f24750A.getText().toString().trim(); String trim2 = this.f24751B.getText().toString().trim(); if (trim.isEmpty()) { this.f24753z.setErrorEnabled(true); this.f24753z.setError(C4522p.m8236a(R.string.group_name_can_t_be_empty_)); C4144a.m8005a(this.f24753z); } else { this.f24753z.setErrorEnabled(false); Intent intent = new Intent(getApplicationContext(), NewGroupContactSelectionListActivity.class); intent.putExtra("KEY_GROUP_NAME", trim); intent.putExtra("KEY_GROUP_MOTTO", trim2); intent.putExtra("KEY_GROUP_IMAGE", this.s); startActivity(intent); overridePendingTransition(R.anim.anim_slide_in_left, R.anim.anim_slide_out_left); finish(); } } return super.onOptionsItemSelected(menuItem); } protected void onSaveInstanceState(Bundle bundle) { super.onSaveInstanceState(bundle); String obj = this.f24750A.getText().toString(); if (!obj.isEmpty()) { bundle.putString("KEY_GROUP_NAME", obj); } obj = this.f24751B.getText().toString(); if (!obj.isEmpty()) { bundle.putString("KEY_GROUP_MOTTO", obj); } } }
[ "Maasalan@riseup.net" ]
Maasalan@riseup.net
ea8787339c264b60634511f58114e7440af733eb
493a8065cf8ec4a4ccdf136170d505248ac03399
/net.sf.ictalive.coordination.wfannotation.bpel.diagram.diagram/src/net/sf/ictalive/coordination/wfannotation/bpel/diagram/bpeldiag/diagram/edit/commands/While8CreateCommand.java
cfd3f82ebc6006f5602c83ad7cfc7aa73c9319a3
[]
no_license
ignasi-gomez/aliveclipse
593611b2d471ee313650faeefbed591c17beaa50
9dd2353c886f60012b4ee4fe8b678d56972dff97
refs/heads/master
2021-01-14T09:08:24.839952
2014-10-09T14:21:01
2014-10-09T14:21:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,613
java
package net.sf.ictalive.coordination.wfannotation.bpel.diagram.bpeldiag.diagram.edit.commands; import org.eclipse.bpel.model.BPELFactory; import org.eclipse.bpel.model.Sequence; import org.eclipse.bpel.model.While; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.ecore.EObject; import org.eclipse.gmf.runtime.common.core.command.CommandResult; import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand; import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.gmf.runtime.notation.View; /** * @generated */ public class While8CreateCommand extends EditElementCommand { /** * @generated */ public While8CreateCommand(CreateElementRequest req) { super(req.getLabel(), null, req); } /** * FIXME: replace with setElementToEdit() * @generated */ protected EObject getElementToEdit() { EObject container = ((CreateElementRequest) getRequest()) .getContainer(); if (container instanceof View) { container = ((View) container).getElement(); } return container; } /** * @generated */ public boolean canExecute() { return true; } /** * @generated */ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { While newElement = BPELFactory.eINSTANCE.createWhile(); Sequence owner = (Sequence) getElementToEdit(); owner.getActivities().add(newElement); doConfigure(newElement, monitor, info); ((CreateElementRequest) getRequest()).setNewElement(newElement); return CommandResult.newOKCommandResult(newElement); } /** * @generated */ protected void doConfigure(While newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException { IElementType elementType = ((CreateElementRequest) getRequest()) .getElementType(); ConfigureRequest configureRequest = new ConfigureRequest( getEditingDomain(), newElement, elementType); configureRequest.setClientContext(((CreateElementRequest) getRequest()) .getClientContext()); configureRequest.addParameters(getRequest().getParameters()); ICommand configureCommand = elementType .getEditCommand(configureRequest); if (configureCommand != null && configureCommand.canExecute()) { configureCommand.execute(monitor, info); } } }
[ "salvarez@lsi.upc.edu" ]
salvarez@lsi.upc.edu
9b0a512efa9e45b2affd4e147f17c7355ac61e7f
34738ca04ff7d537c2d3460bc96645c8e3805240
/app/src/main/java/me/zhanghai/android/douya/ui/AnimateCompoundDrawableButton.java
2356eb51ccd1b102228a6631bbee290fdb2ed2f1
[]
no_license
king1033/Douya
95089220b15fc5a5c5e61a78b36a618ab539e0e1
648ca74959567fdd7a84f8827eca759bccd38db5
refs/heads/master
2021-01-12T16:52:26.720211
2017-07-03T02:02:14
2017-07-03T02:02:14
71,457,784
2
0
null
2017-07-03T02:02:14
2016-10-20T11:48:42
Java
UTF-8
Java
false
false
2,320
java
/* * Copyright (c) 2016 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com> * All Rights Reserved. */ package me.zhanghai.android.douya.ui; import android.content.Context; import android.graphics.drawable.Animatable; import android.graphics.drawable.Drawable; import android.support.v7.widget.AppCompatButton; import android.util.AttributeSet; public class AnimateCompoundDrawableButton extends AppCompatButton { public AnimateCompoundDrawableButton(Context context) { super(context); } public AnimateCompoundDrawableButton(Context context, AttributeSet attrs) { super(context, attrs); } public AnimateCompoundDrawableButton(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Override public void setCompoundDrawables(Drawable left, Drawable top, Drawable right, Drawable bottom) { super.setCompoundDrawables(left, top, right, bottom); startIfAnimatable(left); startIfAnimatable(top); startIfAnimatable(right); startIfAnimatable(bottom); } @Override public void setCompoundDrawablesRelative(Drawable start, Drawable top, Drawable end, Drawable bottom) { super.setCompoundDrawablesRelative(start, top, end, bottom); startIfAnimatable(start); startIfAnimatable(top); startIfAnimatable(end); startIfAnimatable(bottom); } @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); // Makes a copy of the array, however we cannot do this otherwise. for (Drawable drawable : getCompoundDrawables()) { startIfAnimatable(drawable); } } @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); // Makes a copy of the array, however we cannot do this otherwise. for (Drawable drawable : getCompoundDrawables()) { stopIfAnimatable(drawable); } } private void startIfAnimatable(Drawable drawable) { if (drawable instanceof Animatable) { ((Animatable) drawable).start(); } } private void stopIfAnimatable(Drawable drawable) { if (drawable instanceof Animatable) { ((Animatable) drawable).stop(); } } }
[ "dreaming.in.code.zh@gmail.com" ]
dreaming.in.code.zh@gmail.com
47deeae70b14821c26bb3e952998f7312f4859eb
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/neo4j--neo4j/3a35bb61da8556c67775d389c59294eaf62f27f4/after/UniquenessConstraintHaIT.java
45312e94abc27ee167732a04fce01fd137785b56
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,236
java
/* * Copyright (c) 2002-2015 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.api; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Label; import org.neo4j.graphdb.Transaction; import org.neo4j.graphdb.schema.ConstraintDefinition; import org.neo4j.kernel.impl.coreapi.schema.UniquenessConstraintDefinition; import static org.junit.Assert.assertEquals; import static org.neo4j.helpers.collection.Iterables.toList; public class UniquenessConstraintHaIT extends ConstraintHaIT { @Override protected void createConstraint( GraphDatabaseService db, Label label, String propertyKey ) { db.schema().constraintFor( label ).assertPropertyIsUnique( propertyKey ).create(); } @Override protected void createConstraintOffendingNode( GraphDatabaseService db, Label label, String propertyKey, String propertyValue ) { db.createNode( label ).setProperty( propertyKey, propertyValue ); } @Override protected void assertConstraintHolds( GraphDatabaseService db, Label label, String propertyKey, String propertyValue ) { try ( Transaction tx = db.beginTx() ) { assertEquals( 1, toList( db.findNodes( label, propertyKey, propertyValue ) ).size() ); tx.success(); } } @Override protected Class<? extends ConstraintDefinition> constraintDefinitionClass() { return UniquenessConstraintDefinition.class; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
1598f25d5de03a2f1c79baf064850f17b306f48c
d67f6450b24fb08f2f61b74dcdecce3025ee3efc
/gemp-swccg-cards/src/main/java/com/gempukku/swccgo/cards/set5/light/Card5_055.java
7466fbf1c730da66806cf7890753ccd75dc2c90e
[ "MIT" ]
permissive
cburyta/gemp-swccg-public
00a974d042195e69d3c104e61e9ee5bd48728f9a
05529086de91ecb03807fda820d98ec8a1465246
refs/heads/master
2023-01-09T12:45:33.347296
2020-10-26T14:39:28
2020-10-26T14:39:28
309,400,711
0
0
MIT
2020-11-07T04:57:04
2020-11-02T14:47:59
null
UTF-8
Java
false
false
4,739
java
package com.gempukku.swccgo.cards.set5.light; import com.gempukku.swccgo.cards.AbstractUsedOrLostInterrupt; import com.gempukku.swccgo.cards.GameConditions; import com.gempukku.swccgo.cards.effects.CancelBattleEffect; import com.gempukku.swccgo.common.*; import com.gempukku.swccgo.filters.Filters; import com.gempukku.swccgo.game.PhysicalCard; import com.gempukku.swccgo.game.SwccgGame; import com.gempukku.swccgo.logic.TriggerConditions; import com.gempukku.swccgo.logic.actions.CancelCardActionBuilder; import com.gempukku.swccgo.logic.actions.PlayInterruptAction; import com.gempukku.swccgo.logic.effects.RespondablePlayCardEffect; import com.gempukku.swccgo.logic.effects.UseForceEffect; import com.gempukku.swccgo.logic.timing.Action; import com.gempukku.swccgo.logic.timing.Effect; import com.gempukku.swccgo.logic.timing.EffectResult; import java.util.Collections; import java.util.LinkedList; import java.util.List; /** * Set: Cloud City * Type: Interrupt * Subtype: Used Or Lost * Title: It's A Trap! */ public class Card5_055 extends AbstractUsedOrLostInterrupt { public Card5_055() { super(Side.LIGHT, 3, Title.Its_A_Trap, Uniqueness.UNIQUE); setLore("Luke's decision to ignore Leia's warning about the trap cost him an arm and a. . . well, just a hand actually."); setGameText("USED: Cancel Sniper or Blasted Droid. LOST: Use 3 Force to cancel any battle just initiated at a site. (Immune to Sense.)"); addIcons(Icon.CLOUD_CITY); } @Override protected List<PlayInterruptAction> getGameTextOptionalBeforeActions(String playerId, SwccgGame game, Effect effect, PhysicalCard self) { List<PlayInterruptAction> actions = new LinkedList<PlayInterruptAction>(); // Check condition(s) if (TriggerConditions.isPlayingCard(game, effect, Filters.or(Filters.Sniper, Filters.Blasted_Droid)) && GameConditions.canCancelCardBeingPlayed(game, self, effect)) { PlayInterruptAction action = new PlayInterruptAction(game, self, CardSubtype.USED); // Build action using common utility CancelCardActionBuilder.buildCancelCardBeingPlayedAction(action, effect); action.setImmuneTo(Title.Sense); actions.add(action); } return actions; } @Override protected List<PlayInterruptAction> getGameTextTopLevelActions(final String playerId, SwccgGame game, final PhysicalCard self) { List<PlayInterruptAction> actions = new LinkedList<PlayInterruptAction>(); // Check condition(s) if (GameConditions.canTargetToCancel(game, self, Filters.Sniper)) { final PlayInterruptAction action = new PlayInterruptAction(game, self, CardSubtype.USED); // Build action using common utility CancelCardActionBuilder.buildCancelCardAction(action, Filters.Sniper, Title.Sniper); action.setImmuneTo(Title.Sense); actions.add(action); } // Check condition(s) if (GameConditions.canTargetToCancel(game, self, Filters.Blasted_Droid)) { final PlayInterruptAction action = new PlayInterruptAction(game, self, CardSubtype.USED); // Build action using common utility CancelCardActionBuilder.buildCancelCardAction(action, Filters.Blasted_Droid, Title.Blasted_Droid); action.setImmuneTo(Title.Sense); actions.add(action); } return actions; } @Override protected List<PlayInterruptAction> getGameTextOptionalAfterActions(final String playerId, SwccgGame game, EffectResult effectResult, final PhysicalCard self) { // Check condition(s) if (TriggerConditions.battleInitiatedAt(game, effectResult, Filters.site) && GameConditions.canUseForceToPlayInterrupt(game, playerId, self, 3)) { final PlayInterruptAction action = new PlayInterruptAction(game, self, CardSubtype.LOST); action.setText("Cancel battle"); action.setImmuneTo(Title.Sense); // Pay cost(s) action.appendCost( new UseForceEffect(action, playerId, 3)); // Allow response(s) action.allowResponses( new RespondablePlayCardEffect(action) { @Override protected void performActionResults(Action targetingAction) { // Perform result(s) action.appendEffect( new CancelBattleEffect(action)); } } ); return Collections.singletonList(action); } return null; } }
[ "andrew@bender.io" ]
andrew@bender.io
49767a8eabff3997fa511f5207070888c54776ae
41bac86d728e5f900e3d60b5a384e7f00c966f5b
/communote/persistence/src/main/java/com/communote/server/core/property/PropertyAccessorFilterDefinition.java
1418319121bc5756765abde12cdba8e2faeeb4bb
[ "Apache-2.0" ]
permissive
Communote/communote-server
f6698853aa382a53d43513ecc9f7f2c39f527724
e6a3541054baa7ad26a4eccbbdd7fb8937dead0c
refs/heads/master
2021-01-20T19:13:11.466831
2019-02-02T18:29:16
2019-02-02T18:29:16
61,822,650
27
4
Apache-2.0
2018-12-08T19:19:06
2016-06-23T17:06:40
Java
UTF-8
Java
false
false
3,170
java
package com.communote.server.core.property; /** * The property accessor filter definition. * * @author Communote GmbH - <a href="http://www.communote.com/">http://www.communote.com/</a> */ public class PropertyAccessorFilterDefinition { /* Filter definitions containing the properties that are allowed to be retrieved. */ private final SimplePropertyFilterDefinition read = new SimplePropertyFilterDefinition(); /* Filter definitions containing the properties that are allowed to be stored. */ private final SimplePropertyFilterDefinition write = new SimplePropertyFilterDefinition(); /** * Add a property to the read property filter definition. * * @param keyGroup * the key group of the property * @param propertyKey * the property key of the property */ public void addPropertyToReadFilterDefinition(String keyGroup, String propertyKey) { read.add(keyGroup, propertyKey); } /** * Add a property to the write property filter definition. * * @param keyGroup * the key group of the property * @param propertyKey * the property key of the property */ public void addPropertyToWriteFilterDefinition(String keyGroup, String propertyKey) { write.add(keyGroup, propertyKey); } /** * Test whether a property key group and key combination can be read. * * @param keyGroup * the key group of the property * @param propertyKey * the property key of the property * @return true if the group and key combination is in the read filters, false otherwise */ public boolean isPropertyAllowedToGet(String keyGroup, String propertyKey) { return read.includes(keyGroup, propertyKey); } /** * Test whether a property key group and key combination can be stored. * * @param keyGroup * the key group of the property * @param propertyKey * the property key of the property * @return true if the group and key combination is in the write filters, false otherwise */ public boolean isPropertyAllowedToSet(String keyGroup, String propertyKey) { return write.includes(keyGroup, propertyKey); } /** * Remove the the given property for the given key group from the read filter definition. * * @param keyGroup * the key group * @param propertyKey * the property key */ public void removePropertyFromReadFilterDefinition(String keyGroup, String propertyKey) { read.remove(keyGroup, propertyKey); } /** * Remove the the given property for the given key group from the write filter definition. * * @param keyGroup * the key group * @param propertyKey * the property key */ public void removePropertyFromWriteFilterDefinition(String keyGroup, String propertyKey) { write.remove(keyGroup, propertyKey); } }
[ "ronny.winkler@communote.com" ]
ronny.winkler@communote.com
a00d7556792cccbb82926f569561d569c1c8f26c
5f89dd6e2bbf62cedb06b14d3ee5516bec3c7cc6
/src/main/java/org/contentmine/ami/tools/AMITransformTool.java
5a2676fb24b3619fca2632333caffa3ff5a63099
[ "Apache-2.0" ]
permissive
petermr/normami
d0dd99703e0e502f8a08c3d74373cae480119116
17b64f3d3dabf250d077af602345363983d24137
refs/heads/master
2022-07-13T13:49:36.468815
2019-09-02T13:03:00
2019-09-02T13:03:00
130,284,486
1
3
Apache-2.0
2022-06-24T02:14:46
2018-04-19T23:50:37
HTML
UTF-8
Java
false
false
3,603
java
package org.contentmine.ami.tools; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.contentmine.cproject.files.CProject; import org.contentmine.cproject.files.CTree; import org.contentmine.eucl.euclid.util.CMFileUtil; import org.contentmine.eucl.xml.XMLUtil; import org.contentmine.norma.NormaArgProcessor; import org.contentmine.norma.NormaTransformer; import picocli.CommandLine.Command; import picocli.CommandLine.Option; /** transforms file using XSLT and maybe other things * * @author pm286 * */ @Command( name = "ami-transform", aliases = "transform", version = "ami-transform 0.1", description = "Runs XSLT transformation on XML (NYFI)." ) public class AMITransformTool extends AbstractAMITool { private static final Logger LOG = Logger.getLogger(AMITransformTool.class); static { LOG.setLevel(Level.DEBUG); } @Option(names = {"--stylesheet"}, arity = "1", defaultValue="nlm2html", description = "XSLT stylesheet") private String stylesheet; // @Option(names = {"--output"}, // arity = "1", // defaultValue="scholarly.html", // description = "ScholarlyHtml") // private String filename; /** used by some non-picocli calls * obsolete it * @param cProject */ public AMITransformTool(CProject cProject) { this.cProject = cProject; } public AMITransformTool() { } public static void main(String[] args) throws Exception { new AMITransformTool().runCommands(args); } @Override protected void parseSpecifics() { System.out.println("stylesheet " + stylesheet); System.out.println(); } @Override protected void runSpecifics() { if (cProject != null) { processProject(); } } protected void processProject() { runNorma(); // CommandProcessor commandProcessor = new CommandProcessor(cProject.getDirectory()); // commandProcessor.runNormaIfNecessary(); // NormaArgProcessor argProcessor = new NormaArgProcessor(); // NormaTransformer normaTransformer = new NormaTransformer(argProcessor); // System.out.println("cTree: "+cTree.getName()); } private void runNorma() { NormaArgProcessor argProcessor = new NormaArgProcessor(); argProcessor.setStandalone(true); for (CTree cTree : cProject.getOrCreateCTreeList()) { transformTreeToScholarlyHtml(argProcessor, cTree); } // String args = "-i fulltext.xml -o scholarly.html --transform nlm2html --project "+cProject.getDirectory(); // LOG.debug("running NORMA "+args); // new Norma().run(args); } private void transformTreeToScholarlyHtml(NormaArgProcessor argProcessor, CTree cTree) { File existingFulltextXML = cTree.getExistingFulltextXML(); File scholarlyHtmlFile = cTree.getOrCreateScholarlyHtmlFile(); NormaTransformer normaTransformer = new NormaTransformer(argProcessor); normaTransformer.setCurrentCTree(cTree); if (CMFileUtil.shouldMake(forceMake, scholarlyHtmlFile, existingFulltextXML)) { transformXML2Html(existingFulltextXML, scholarlyHtmlFile, normaTransformer); } } private void transformXML2Html(File existingFulltextXML, File scholarlyHtmlFile, NormaTransformer normaTransformer) { normaTransformer.setInputFile(existingFulltextXML); String htmlString = normaTransformer.createAndApplyXSLDocument(NormaTransformer.NLM2HTML); try { FileUtils.write(scholarlyHtmlFile, htmlString, "UTF-8"); } catch (IOException e) { LOG.error("Cannot write Htmlfile: "+scholarlyHtmlFile, e); } } }
[ "peter.murray.rust@googlemail.com" ]
peter.murray.rust@googlemail.com
bcf1674d7b655930da056c9d0d39dd8bfedcc41c
ebee13100bdc1386f835737a7f28dbe7f47f2325
/iot1_sql/iot1_sql/src/main/java/com/iot1/sql/common/test/CalTest.java
6618369bd803d782b24d21533630f92dd05c2e95
[]
no_license
redliner112/iot1_sql
78eea4018ae3bc82e58470bdc7e18c629f00e5ad
fdf7ebc6dc34bf6ab25e5df40e0f7801031e56a1
refs/heads/master
2021-01-22T11:03:55.576745
2017-10-30T09:40:38
2017-10-30T09:40:38
102,344,967
0
0
null
null
null
null
UTF-8
Java
false
false
1,047
java
package com.iot1.sql.common.test; import static org.junit.Assert.assertEquals; import org.junit.After; import org.junit.Before; import org.junit.Test; public class CalTest { Cal tdd; @Before public void setUpBefore() throws Exception { System.out.println(tdd); tdd = new Cal(); System.out.println(tdd); } @Test public void testPlus() { int result = tdd.plus(10, 20); assertEquals("10+20=30",30, result); } @Test public void testMinus() { int result = tdd.minus(20, 10); assertEquals("20-10=10", 10, result); } @Test public void testDivision() { int result = tdd.division(20,10); assertEquals("20/10=2", 2 , result); } @Test public void testMultiple() { int result = tdd.multiple(10, 20); assertEquals("10*20=200", 200, result); } @After public void setUpAfter() throws Exception { System.out.println(tdd); tdd = null; } }
[ "DJA@DJA-PC" ]
DJA@DJA-PC
db51cd3564374992a701b02ea3c844938a714731
dca0c0ad7acb51584ed1e2a53c48625225da2886
/src/com/rcgl/dao/MessageDao.java
8482cb9f156142e1e490271f0052a449aa4a145a
[]
no_license
lms248/ScheduleInteractServer
49b134d024897f230ede66f87d92599f09661fbf
23d7243617429074353d12afc4a5381615f8d7c1
refs/heads/master
2021-01-11T14:16:50.223081
2017-02-08T07:55:44
2017-02-08T07:55:44
81,299,874
0
0
null
null
null
null
UTF-8
Java
false
false
4,019
java
package com.rcgl.dao; import static common.db.DbUtils.dbUtils; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import com.rcgl.bean.MessageBean; import common.logger.Logger; import common.logger.LoggerManger; public class MessageDao { private static Logger log=LoggerManger.getLogger(); /** * 加载所有消息数据列表 * @param * @return List * @author lims * @date 2015-03-05 */ public static List<MessageBean> loadAllMessage(){ List<MessageBean> messageList=new ArrayList<MessageBean>(); try { messageList=dbUtils.query(MessageBean.class, " "); } catch (SQLException e) { log.error(e.getMessage()); e.printStackTrace(); } return messageList; } /** * 加载作业数据 * @param messageid * @return * @author lims * @date 2015-03-05 */ public static MessageBean loadById(int messageid){ MessageBean bean=null; try { bean=dbUtils.read(MessageBean.class, "where id=?", messageid); } catch (SQLException e) { log.error(e.getMessage()); e.printStackTrace(); } return bean; } /** * 加载作业数据 * @param senderid * @return * @author lims * @date 2015-03-05 */ public static MessageBean loadBySenderId(int senderid){ MessageBean bean=null; try { bean=dbUtils.read(MessageBean.class, "where sender=?", senderid); } catch (SQLException e) { log.error(e.getMessage()); e.printStackTrace(); } return bean; } /** * 根据年级加载对应消息列表 * @param receiver * @return List * @author lims * @date 2015-03-05 */ public static List<MessageBean> loadByReceiver(int receiver){ List<MessageBean> messagelist=new ArrayList<MessageBean>(); try { messagelist=dbUtils.query(MessageBean.class, "where receiver=?", receiver); } catch (SQLException e) { log.error(e.getMessage()); e.printStackTrace(); } return messagelist; } /** * 根据年级加载对应消息列表 * @param messagetype * @return List * @author lims * @date 2015-03-05 */ public static List<MessageBean> loadByMessageType(String messagetype){ List<MessageBean> messagelist=new ArrayList<MessageBean>(); try { messagelist=dbUtils.query(MessageBean.class, "where messagetype like ?", "%"+messagetype+"%"); } catch (SQLException e) { log.error(e.getMessage()); e.printStackTrace(); } return messagelist; } /** * 根据消息名加载对应的消息资料 * @param messagename * @return bean * @author lims * @date 2015-03-05 */ public static MessageBean loadByMessagename(String messagename){ MessageBean ubean = new MessageBean(); try { ubean=dbUtils.read(MessageBean.class, "where messagename = ?", messagename); } catch (SQLException e) { log.error(e.getMessage()); e.printStackTrace(); } return ubean; } /** * 查询消息数据列表的数据总数量 * @param * @return int * @author lims * @date 2015-03-05 */ public static int Count(){ int messageCount=0; try { messageCount=dbUtils.stat(MessageBean.class, "select COUNT(*) from message"); } catch (SQLException e) { log.error(e.getMessage()); e.printStackTrace(); } return messageCount; } /** * 插入消息数据 * @param * @return * @author lims * @date 2015-03-05 */ public static int save(MessageBean bean){ try { return dbUtils.insert(bean); } catch (SQLException e) { log.error(e.getMessage()); e.printStackTrace(); } return -1; } /** * 更新消息数据 * @param * @return * @author lims * @date 2015-03-05 */ public static int update(MessageBean bean){ try { return dbUtils.update(bean); } catch (Exception e) { e.printStackTrace(); } return -1; } /** * 删除某条消息列表数据 * @param * @return * @author lims * @date 2015-03-05 */ public static int delete(int id){ try { return dbUtils.delete(MessageBean.class, id); } catch (Exception e) { e.printStackTrace(); } return -1; } }
[ "lms248@163.com" ]
lms248@163.com
d2febf5a22c238af7f8db048cbcdac6281a5c2fe
7e968988a82666e822c36d59d3d871f2ffc950d8
/spring-batch-parallel/src/main/java/fun/deepsky/springbatch/parallel/partition/db/CustCreditRowMapper.java
f201906a1d52083f86959d57e11dfd4599cf774d
[]
no_license
kongdou/Spring-Batch
c0dfe621f8a603d18d659f495c4c3dcef8908645
7d8a7534403402a4cad1963b9ff36fa81aaaaa5a
refs/heads/master
2020-03-21T21:34:02.737482
2018-07-21T06:00:28
2018-07-21T06:00:28
139,070,627
0
0
null
null
null
null
UTF-8
Java
false
false
608
java
package fun.deepsky.springbatch.parallel.partition.db; import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.jdbc.core.RowMapper; public class CustCreditRowMapper implements RowMapper<CreditBill>{ public CreditBill mapRow(ResultSet rs, int rowNum) throws SQLException { CreditBill bill = new CreditBill(); bill.setId(rs.getString("ID")); bill.setAccountID(rs.getString("ACCOUNTID")); bill.setAddress(rs.getString("ADDRESS")); bill.setAmount(rs.getDouble("AMOUNT")); bill.setDate(rs.getString("DATE")); bill.setName(rs.getString("NAME")); return bill; } }
[ "zhao.xiao.jie@outlook.com" ]
zhao.xiao.jie@outlook.com
dc57c69f364138da7bc74f0a33fc60353a0eff8a
68813e3a144d394d2e112f6b8217eddd5d958b3d
/rts/src/main/java/eta/runtime/message/MessageThrowTo.java
dcbd229b7434f21c26f9432b066e7f37b2ca0c43
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
zzmjohn/eta
272e388a0f1ac30d9c57184a61ca38b015d1481a
b3c712d26878c7676c3340a81c4ef7c7fdc4bae2
refs/heads/master
2020-03-15T18:54:07.468030
2018-05-02T12:09:46
2018-05-02T12:10:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,762
java
package eta.runtime.message; import java.util.concurrent.atomic.AtomicBoolean; import eta.runtime.stg.TSO; import eta.runtime.stg.Capability; import eta.runtime.stg.Closure; import eta.runtime.exception.Exception; import static eta.runtime.stg.TSO.WhyBlocked.*; import static eta.runtime.concurrent.Concurrent.SPIN_COUNT; public class MessageThrowTo extends Message { public final TSO source; public final TSO target; public final Closure exception; public volatile AtomicBoolean lock = new AtomicBoolean(false); public MessageThrowTo(final TSO source, final TSO target, final Closure exception) { this.source = source; this.target = target; this.exception = exception; } @Override public void execute(Capability cap) { if (!isValid()) return; lock(); assert source.whyBlocked == BlockedOnMsgThrowTo; assert source.blockInfo == this; boolean success = Exception.throwToMsg(cap, this, true); if (!success) { unlock(); } } public void done() { invalidate(); unlock(); } /** Locking Mechanisms **/ public final void lock() { while (!lock.compareAndSet(false, true)) {} } public final void unlock() { lock.set(false); } @Override public final boolean isLocked() { return lock.get(); } public final boolean tryLock() { return lock.compareAndSet(false, true); } public final boolean tryUnlock() { return lock.compareAndSet(true, false); } @Override public String toString() { return "MessageBlackHole[source=" + source + ",target=" + target + ",exception=" + exception + "]"; } }
[ "rahulmutt@gmail.com" ]
rahulmutt@gmail.com
157726794fb31fa5a10cdd883064ff05db7af978
8dcd6fac592760c5bff55349ffb2d7ce39d485cc
/org/apache/http/HttpVersion.java
b29be953e90f69ce864c7302b27ea3e4d2ba3fdf
[]
no_license
andrepcg/hikam-android
9e3a02e0ba9a58cf8a17c5e76e2f3435969e4b3a
bf39e345a827c6498052d9df88ca58d8823178d9
refs/heads/master
2021-09-01T11:41:10.726066
2017-12-26T19:04:42
2017-12-26T19:04:42
115,447,829
2
2
null
null
null
null
UTF-8
Java
false
false
605
java
package org.apache.http; import java.io.Serializable; @Deprecated public final class HttpVersion extends ProtocolVersion implements Serializable { public static final String HTTP = "HTTP"; public static final HttpVersion HTTP_0_9 = null; public static final HttpVersion HTTP_1_0 = null; public static final HttpVersion HTTP_1_1 = null; public HttpVersion(int major, int minor) { super((String) null, 0, 0); throw new RuntimeException("Stub!"); } public ProtocolVersion forVersion(int major, int minor) { throw new RuntimeException("Stub!"); } }
[ "andrepcg@gmail.com" ]
andrepcg@gmail.com
a9535bcb19f300abf4042d6611e2ad1722333e71
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a010/A010226Test.java
1875f30764e833a605ec8d4ae8bf5c19d537b113
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a010; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A010226Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
6ed51153f99d93a2ae97d279529742b79e458db4
062ab1db4c39e994610e937d66acc45acd74982a
/com/infinario/android/infinariosdk/Preferences.java
dd6defeb0a00d87d7f539704268a7d0901832d70
[]
no_license
Ravinther/Navigation
838804535c86e664258b83d958f39b1994e8311b
7dd6a07aea47aafe616b2f7e58a8012bef9899a1
refs/heads/master
2021-01-20T18:15:10.681957
2016-08-16T01:12:57
2016-08-16T01:12:57
65,776,099
2
1
null
null
null
null
UTF-8
Java
false
false
5,213
java
package com.infinario.android.infinariosdk; import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageManager.NameNotFoundException; import android.util.Log; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.json.JSONException; import org.json.JSONObject; public class Preferences { private static Preferences instance; private static Object lockInstance; private Context context; private Object lockAccess; static { instance = null; lockInstance = new Object(); } private Preferences(Context context) { this.context = context; this.lockAccess = new Object(); } public static Preferences get(Context context) { if (instance == null) { synchronized (lockInstance) { if (instance == null) { instance = new Preferences(context); } } } return instance; } private SharedPreferences getPreferences(Context context) { SharedPreferences sharedPreferences; synchronized (this.lockAccess) { sharedPreferences = context.getSharedPreferences("infinario", 0); } return sharedPreferences; } public String getSenderId() { return getPreferences(this.context).getString("sender_id", null); } public void setReferrer(String referrer) { getPreferences(this.context).edit().putString("referrer", referrer).commit(); } public int getIcon() { return getPreferences(this.context).getInt("icon", -1); } public void setToken(String token) { getPreferences(this.context).edit().putString("token", token).commit(); } public void setTarget(String target) { getPreferences(this.context).edit().putString("target", target).commit(); } public boolean getAutomaticFlushing() { return getPreferences(this.context).getBoolean("auto_flush", true); } public long getSessionStart() { return getPreferences(this.context).getLong("session_start", -1); } public void setSessionStart(long value) { getPreferences(this.context).edit().putLong("session_start", value).commit(); } public long getSessionEnd() { return getPreferences(this.context).getLong("session_end", -1); } public Map<String, Object> getSessionEndProperties() { return jsonToMap(getPreferences(this.context).getString("session_end_properties", "")); } public void setSessionEnd(long value, Map<String, Object> properties) { getPreferences(this.context).edit().putLong("session_end", value).commit(); if (properties != null) { getPreferences(this.context).edit().putString("session_end_properties", new JSONObject(properties).toString()).commit(); } else { getPreferences(this.context).edit().putString("session_end_properties", "").commit(); } } public boolean getGooglePushNotifications() { return getPreferences(this.context).getBoolean("google_push_notifications", false); } public String getCookieId() { return getPreferences(this.context).getString("cookie", ""); } public void setCookieId(String value) { getPreferences(this.context).edit().putString("cookie", value).commit(); } public String getRegistredId() { return getPreferences(this.context).getString("registered", ""); } public void setRegistredId(String value) { getPreferences(this.context).edit().putString("registered", value).commit(); } public String getGoogleAdvertisingId() { return getPreferences(this.context).getString("google_advertising_id", ""); } public void setGoogleAdvertisingId(String value) { getPreferences(this.context).edit().putString("google_advertising_id", value).commit(); } public String getDeviceType() { return getPreferences(this.context).getString("device_type", ""); } public void setDeviceType(String value) { getPreferences(this.context).edit().putString("device_type", value).commit(); } public String getAppVersionName() { try { return this.context.getPackageManager().getPackageInfo(this.context.getPackageName(), 128).versionName; } catch (NameNotFoundException e) { return null; } } private Map<String, Object> jsonToMap(String json) { try { if (json.isEmpty()) { return null; } JSONObject jsonObj = new JSONObject(json); Iterator it = jsonObj.keys(); Map<String, Object> map = new HashMap(); while (it.hasNext()) { String key = it.next().toString(); map.put(key, jsonObj.get(key)); } return map; } catch (JSONException e) { Log.e("Infinario", e.getMessage().toString()); return null; } catch (NullPointerException e2) { Log.e("Infinario", e2.getMessage().toString()); return null; } } }
[ "m.ravinther@yahoo.com" ]
m.ravinther@yahoo.com
d6978f09a596be610b5249c7774db761991d0879
8e84818aaa9b789f4370ee0679fdc5568c082ff9
/measurement/src/test/java/de/dagere/peass/measurement/rca/data/TestCallTreeNode.java
b9c58f15d6c9da0222246e37d0c99a7d86c31b63
[]
no_license
mai13drd/peass
7e469a1710ef890b6bb4bcea8ded4acf3e3c0d38
9d1dd547ad6916a36a637bba0084874b3bef79f3
refs/heads/master
2023-07-13T18:04:02.231662
2021-07-01T12:25:19
2021-07-01T12:25:19
299,322,408
0
0
null
2020-09-28T13:46:29
2020-09-28T13:46:28
null
UTF-8
Java
false
false
2,848
java
package de.dagere.peass.measurement.rca.data; import org.junit.Assert; import org.junit.jupiter.api.Test; import de.dagere.peass.config.MeasurementConfiguration; import de.dagere.peass.dependency.analysis.data.ChangedEntity; import de.dagere.peass.measurement.rca.helper.TreeBuilderBig; public class TestCallTreeNode { @Test public void testToEntity() { final CallTreeNode node = new CallTreeNode("de.mypackage.Test#callMethod", "public void de.mypackage.Test.callMethod()", "public void de.mypackage.Test.callMethod()", (MeasurementConfiguration) null); Assert.assertEquals(new ChangedEntity("de.mypackage.Test", "", "callMethod"), node.toEntity()); Assert.assertEquals("de.mypackage.Test#callMethod", node.toEntity().toString()); Assert.assertEquals(0, node.toEntity().getParameterTypes().length); } @Test public void testToEntityParameter() { final CallTreeNode node = new CallTreeNode("moduleA" + ChangedEntity.MODULE_SEPARATOR + "de.mypackage.Test#callMethod", "public void "+ ChangedEntity.MODULE_SEPARATOR + "de.mypackage.Test.callMethod(int)", null, (MeasurementConfiguration) null); ChangedEntity entity = node.toEntity(); Assert.assertEquals(new ChangedEntity("de.mypackage.Test", "moduleA", "callMethod"), entity); Assert.assertEquals("moduleA" + ChangedEntity.MODULE_SEPARATOR + "de.mypackage.Test#callMethod(int)", entity.toString()); Assert.assertEquals("int", entity.getParameterTypes()[0]); } @Test public void testPosition() throws Exception { CallTreeNode aStructure = new CallTreeNode("A", "public void A.a()", "public void A.a()", (MeasurementConfiguration) null); CallTreeNode bStructure = aStructure.appendChild("B", "public void B.b()", "public void B.b()"); CallTreeNode cStructure = bStructure.appendChild("C", "public void C.c()", "public void C.c()"); Assert.assertEquals(0, bStructure.getPosition()); Assert.assertEquals(0, cStructure.getPosition()); } @Test public void testEOI() { TreeBuilderBig builder = new TreeBuilderBig(false); Assert.assertEquals(0, builder.getRoot().getEoi()); Assert.assertEquals(1, builder.getA().getEoi()); Assert.assertEquals(2, builder.getB().getEoi()); Assert.assertEquals(3, builder.getC().getEoi()); Assert.assertEquals(4, builder.getB2().getEoi()); } @Test public void testModuleSeparation() { String call = "moduleA" + ChangedEntity.MODULE_SEPARATOR + "ClazzA" + ChangedEntity.METHOD_SEPARATOR + "test"; CallTreeNode node = new CallTreeNode(call, "public void " + call.replace("#", ".") +"()", null, new MeasurementConfiguration(1)); Assert.assertEquals(node.getCall(), "ClazzA" + ChangedEntity.METHOD_SEPARATOR + "test"); Assert.assertEquals(node.getModule(), "moduleA"); } }
[ "davidgeorg_reichelt@dagere.de" ]
davidgeorg_reichelt@dagere.de
68d2006d690d2310cdcd0ecd0055aa7226f7fb5c
b2f07f3e27b2162b5ee6896814f96c59c2c17405
/sun/net/TransferProtocolClient.java
518d1bc36bec9f65688b996f27fc9af62dc7b0b8
[]
no_license
weiju-xi/RT-JAR-CODE
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
d5b2590518ffb83596a3aa3849249cf871ab6d4e
refs/heads/master
2021-09-08T02:36:06.675911
2018-03-06T05:27:49
2018-03-06T05:27:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,191
java
/* */ package sun.net; /* */ /* */ import java.io.IOException; /* */ import java.io.InputStream; /* */ import java.io.PrintStream; /* */ import java.util.Vector; /* */ /* */ public class TransferProtocolClient extends NetworkClient /* */ { /* */ static final boolean debug = false; /* 47 */ protected Vector serverResponse = new Vector(1); /* */ protected int lastReplyCode; /* */ /* */ public int readServerResponse() /* */ throws IOException /* */ { /* 58 */ StringBuffer localStringBuffer = new StringBuffer(32); /* */ /* 60 */ int j = -1; /* */ /* 64 */ this.serverResponse.setSize(0); /* */ label76: int k; /* */ while (true) /* */ { /* */ int i; /* 66 */ if ((i = this.serverInput.read()) != -1) { /* 67 */ if ((i == 13) && /* 68 */ ((i = this.serverInput.read()) != 10)) { /* 69 */ localStringBuffer.append('\r'); /* */ } /* 71 */ localStringBuffer.append((char)i); /* 72 */ if (i == 10) /* 73 */ break label76; /* */ } else { /* 75 */ String str = localStringBuffer.toString(); /* 76 */ localStringBuffer.setLength(0); /* */ /* 81 */ if (str.length() == 0) { /* 82 */ k = -1; /* */ } else { /* */ try { /* 85 */ k = Integer.parseInt(str.substring(0, 3)); /* */ } catch (NumberFormatException localNumberFormatException) { /* 87 */ k = -1; /* */ } /* */ catch (StringIndexOutOfBoundsException localStringIndexOutOfBoundsException) { /* */ } /* 91 */ continue; /* */ } /* */ /* 94 */ this.serverResponse.addElement(str); /* 95 */ if (j != -1) /* */ { /* 97 */ if ((k == j) && ((str.length() < 4) || (str.charAt(3) != '-'))) /* */ { /* 102 */ j = -1; /* 103 */ break; /* */ } /* */ } else { if ((str.length() < 4) || (str.charAt(3) != '-')) break; /* 106 */ j = k; /* */ } /* */ /* */ } /* */ /* */ } /* */ /* 113 */ return this.lastReplyCode = k; /* */ } /* */ /* */ public void sendServer(String paramString) /* */ { /* 118 */ this.serverOutput.print(paramString); /* */ } /* */ /* */ public String getResponseString() /* */ { /* 126 */ return (String)this.serverResponse.elementAt(0); /* */ } /* */ /* */ public Vector getResponseStrings() /* */ { /* 131 */ return this.serverResponse; /* */ } /* */ /* */ public TransferProtocolClient(String paramString, int paramInt) throws IOException /* */ { /* 136 */ super(paramString, paramInt); /* */ } /* */ /* */ public TransferProtocolClient() /* */ { /* */ } /* */ } /* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar * Qualified Name: sun.net.TransferProtocolClient * JD-Core Version: 0.6.2 */
[ "yuexiahandao@gmail.com" ]
yuexiahandao@gmail.com
a1e3e49c7dc321df8873b26baf7016a2a5054853
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_flink_new2/Nicad_t1_flink_new27622.java
a9d3c826cdcd455bca43acb624ec613d3bbdaf89
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
// clone pairs:27984:90% // 43760:flink/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/TaskStateSnapshot.java public class Nicad_t1_flink_new27622 { public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TaskStateSnapshot that = (TaskStateSnapshot) o; return subtaskStatesByOperatorID.equals(that.subtaskStatesByOperatorID); } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
4e52a086b06f11c4cf1e8751fb4aff336da142ee
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.jdt.ui/198.java
be9a07adc31c62d7e7fa0f305b60321f20245777
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
203
java
package p; import java.util.*; class A { class Inner { //comment here void foo() { } //comment there int bar; int baz; } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
621403f6658756911b12a2e5268dca680472c8dd
a2df6764e9f4350e0d9184efadb6c92c40d40212
/aliyun-java-sdk-retailcloud/src/main/java/com/aliyuncs/retailcloud/transform/v20180313/GetInstTransInfoResponseUnmarshaller.java
d2797a81a0751c3907b6732917238a88cfb4d5fa
[ "Apache-2.0" ]
permissive
warriorsZXX/aliyun-openapi-java-sdk
567840c4bdd438d43be6bd21edde86585cd6274a
f8fd2b81a5f2cd46b1e31974ff6a7afed111a245
refs/heads/master
2022-12-06T15:45:20.418475
2020-08-20T08:37:31
2020-08-26T06:17:49
290,450,773
1
0
NOASSERTION
2020-08-26T09:15:48
2020-08-26T09:15:47
null
UTF-8
Java
false
false
1,563
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.retailcloud.transform.v20180313; import com.aliyuncs.retailcloud.model.v20180313.GetInstTransInfoResponse; import com.aliyuncs.transform.UnmarshallerContext; public class GetInstTransInfoResponseUnmarshaller { public static GetInstTransInfoResponse unmarshall(GetInstTransInfoResponse getInstTransInfoResponse, UnmarshallerContext _ctx) { getInstTransInfoResponse.setInstanceId(_ctx.stringValue("GetInstTransInfoResponse.instanceId")); getInstTransInfoResponse.setIsAutoRenew(_ctx.booleanValue("GetInstTransInfoResponse.isAutoRenew")); getInstTransInfoResponse.setRenewCycle(_ctx.integerValue("GetInstTransInfoResponse.renewCycle")); getInstTransInfoResponse.setChargeType(_ctx.stringValue("GetInstTransInfoResponse.chargeType")); getInstTransInfoResponse.setEndTime(_ctx.longValue("GetInstTransInfoResponse.endTime")); getInstTransInfoResponse.setStartTime(_ctx.longValue("GetInstTransInfoResponse.startTime")); return getInstTransInfoResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
36a88d93e466346a91e078abf7654786cd41291e
62b2aca6e3b49c858838e100bc1f3aaae6286ad7
/Contacts&Dialer&Tele&SystemUi/FreemeUI/src/com/example/freeme/apis/view/List3.java
50f8fbdc7d381a1fcd1ded1a1d5ac502e271c89e
[]
no_license
Atinerlengs/android-demo-liqiang
c5281455316d688957ae34d9250814debc674f16
b56261c45b02cf14962e71a251d49454e47ccdb6
refs/heads/master
2020-04-02T13:05:50.418404
2018-10-24T09:18:31
2018-10-24T09:18:31
154,467,046
2
0
null
null
null
null
UTF-8
Java
false
false
3,072
java
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.freeme.apis.view; import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.view.View; import android.widget.SimpleCursorAdapter; import android.widget.TextView; /** * A list view example where the * data comes from a cursor, and a * SimpleCursorListAdapter is used to map each item to a two-line * display. */ public class List3 extends ListActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Get a cursor with all phones Cursor c = getContentResolver().query(Phone.CONTENT_URI, PHONE_PROJECTION, null, null, null); startManagingCursor(c); // Map Cursor columns to views defined in simple_list_item_2.xml SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_2, c, new String[] { Phone.TYPE, Phone.NUMBER }, new int[] { android.R.id.text1, android.R.id.text2 }); //Used to display a readable string for the phone type adapter.setViewBinder(new SimpleCursorAdapter.ViewBinder() { public boolean setViewValue(View view, Cursor cursor, int columnIndex) { //Let the adapter handle the binding if the column is not TYPE if (columnIndex != COLUMN_TYPE) { return false; } int type = cursor.getInt(COLUMN_TYPE); String label = null; //Custom type? Then get the custom label if (type == Phone.TYPE_CUSTOM) { label = cursor.getString(COLUMN_LABEL); } //Get the readable string String text = (String) Phone.getTypeLabel(getResources(), type, label); //Set text ((TextView) view).setText(text); return true; } }); setListAdapter(adapter); } private static final String[] PHONE_PROJECTION = new String[] { Phone._ID, Phone.TYPE, Phone.LABEL, Phone.NUMBER }; private static final int COLUMN_TYPE = 1;; private static final int COLUMN_LABEL = 2; }
[ "liqiang@droi.com" ]
liqiang@droi.com
5589307f3d0fdebcac935aa844505a7f9ead6be2
4aed712e4d9761d3252aa13c7d69a1b8df45f43b
/src/cz/burios/uniql/persistence/internal/helper/TransformerHelper.java
f970f068bfa2485e06887bd6e6dc3faeb12ad4af
[]
no_license
buriosca/cz.burios.uniql-jpa
86c682f2d19c824e21102ac71c150e7de1a25e18
e9a651f836018456b99048f02191f2ebe824e511
refs/heads/master
2022-06-25T01:22:43.605788
2020-07-19T05:13:25
2020-07-19T05:13:25
247,073,006
0
0
null
2022-06-21T03:53:36
2020-03-13T13:05:10
Java
UTF-8
Java
false
false
1,871
java
/******************************************************************************* * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html * and the Eclipse Distribution License is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Martin Vojtek - 2.6 - initial implementation ******************************************************************************/ package cz.burios.uniql.persistence.internal.helper; import java.util.ArrayList; import java.util.List; import cz.burios.uniql.persistence.core.mappings.transformers.CoreFieldTransformer; /** * Transformer helper class. Returns transformer method name and possible transformer method parameters. * This class shields client of the class from internal details of transformer method. * * @author Martin Vojtek * */ public class TransformerHelper { public String getTransformerMethodName() { return CoreFieldTransformer.BUILD_FIELD_VALUE_METHOD; } public List<Class[]> getTransformerMethodParameters(boolean isSetTransformerClass) { List<Class[]> methodParameters = new ArrayList<>(); if (isSetTransformerClass) { methodParameters.add(new Class[] {Object.class, String.class, ClassConstants.SessionsSession_Class}); } else { methodParameters.add(new Class[0]); methodParameters.add(new Class[] {ClassConstants.PublicInterfaceSession_Class}); methodParameters.add(new Class[] {ClassConstants.SessionsSession_Class}); } return methodParameters; } }
[ "Buriosca.cz@DESKTOP-PKNI7NI" ]
Buriosca.cz@DESKTOP-PKNI7NI
3754ed314b4e08e82e0dacc260c05fba4948f2ca
7034b8c445d2c6ec34b6ae2d7c4ea0a9ce7f2b36
/src/main/java/tasks/BeautifulArrangementII.java
43e9626fe3997da59ecc64facfe3ed471c2f0fe1
[]
no_license
RakhmedovRS/LeetCode
1e0da62cf6fab90575e061aae27afb22cc849181
da4368374eead2f2ce2300c3dfdc941430e717ca
refs/heads/master
2023-08-31T01:03:59.047473
2023-08-27T04:52:15
2023-08-27T04:52:15
238,749,044
14
8
null
null
null
null
UTF-8
Java
false
false
757
java
package tasks; import common.Difficulty; import common.LeetCode; /** * @author RakhmedovRS * @created 3/3/2021 */ @LeetCode( id = 667, name = "Beautiful Arrangement II", url = "https://leetcode.com/problems/beautiful-arrangement-ii/", difficulty = Difficulty.MEDIUM ) public class BeautifulArrangementII { public int[] constructArray(int n, int k) { int[] arr = new int[n]; for (int i = 0; i < n; i++) { arr[i] = i + 1; } for (int i = 1; i < n && k > 1; i++, k--) { reverse(arr, i); } return arr; } private void reverse(int[] arr, int left) { int temp; int right = arr.length - 1; while (left < right) { temp = arr[left]; arr[left] = arr[right]; arr[right] = temp; left++; right--; } } }
[ "rakhmedovrs@gmail.com" ]
rakhmedovrs@gmail.com
34c5beffdb2571f39b8c543da2f78d3dec45d182
f0aa9a166111eeb6480973f7fb9a0de7e787052c
/src/main/java/com/liyang/domain/claimPolicyRewards/ClaimPolicyRewardLogRepository.java
be6525fff0b37a83f48c7f78842a890d6ea7d587
[]
no_license
pronebel/dafengbaodai
2e7835c6556039b293270293317e8e657b5c200b
add3cc3b79d38c66244e414184fac7d4df0a0a3f
refs/heads/master
2021-09-09T10:24:06.073492
2018-03-15T06:20:44
2018-03-15T06:20:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
226
java
package com.liyang.domain.claimPolicyRewards; import com.liyang.domain.base.LogRepository; /** * @author Administrator * */ public interface ClaimPolicyRewardLogRepository extends LogRepository<ClaimPolicyRewardLog> { }
[ "18860469557@163.com" ]
18860469557@163.com
bbc73da25e5c40ab282df4021d101cd9c6c04ef8
ff0057b1d11f878f9a8c7a45c6209e02928f3f7c
/app/src/main/java/yinlei/com/handlegrouppurchase/http/CallServer.java
7b43d076b15f9d91c84fcd3ff5a1d8b367968d4c
[ "Apache-2.0" ]
permissive
jacktian/HandleGroupPurchase
6c30c0a4b108192ecbf8a2f348c0421cbe174bf1
f3c3cbca000d703331c3004e5f8680e3d8d147db
refs/heads/master
2021-01-22T20:29:12.380470
2016-09-21T16:12:22
2016-09-21T16:12:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,059
java
package yinlei.com.handlegrouppurchase.http; import android.content.Context; import com.yolanda.nohttp.NoHttp; import com.yolanda.nohttp.rest.Request; import com.yolanda.nohttp.rest.RequestQueue; /** * 在此写用途 * * @version V1.0 <描述当前版本功能> * @FileName: CallServer.java * @author: 若兰明月 * @date: 2016-08-27 10:17 */ public class CallServer { private static CallServer mCallServer; private final RequestQueue mRequestQueue; private CallServer() { mRequestQueue = NoHttp.newRequestQueue(); } public synchronized static CallServer getInstance() { if (mCallServer == null) { mCallServer = new CallServer(); } return mCallServer; } /** * 添加一个请求到队列中 */ public <T> void add(Context context, int what, Request<T> request, HttpListener<T> listener, boolean canCancel, boolean isLoading) { mRequestQueue.add(what, request, new HttpResponseListener<T>(listener, request, context, canCancel, isLoading)); } }
[ "wuyinlei19931118@hotmail.com" ]
wuyinlei19931118@hotmail.com
cbc0962d04d9ecb6eac15d5254657e7d712a2d3c
90792cc575e9f33b5d2a5f4e58a751e9a74bc6e5
/base/src/main/java/com/yang/yunwang/base/util/utils/jpush/IService.java
b8ef0699caf2fbe646ffc47995716f861ce61fd8
[]
no_license
caleucheg/YunlaohuMulity
8332322d13681a4cdc932b837a0ca1aa7c1f8836
ecc5d0dbf0fefbddb7f2468520c190a942ffded9
refs/heads/master
2020-03-28T11:47:17.683135
2019-01-16T08:20:05
2019-01-16T08:20:21
148,246,848
0
0
null
null
null
null
UTF-8
Java
false
false
162
java
package com.yang.yunwang.base.util.utils.jpush; /** * Created by Administrator on 2018/1/19. */ public interface IService { void invokeServiceMethod(); }
[ "gubaisongh2@sina.com" ]
gubaisongh2@sina.com
443519bdb1c4eb2bf1d760234a8552cb7ce793df
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/Fernflower/src/main/java/org/telegram/ui/Components/_$$Lambda$TextPaintImageReceiverSpan$Cb0mzcqNIfBx1iovVDp8PZkH5ug.java
7f714c37c1f81ec73763a8dff2424ca74d476234
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
771
java
package org.telegram.ui.Components; import org.telegram.messenger.ImageReceiver; import org.telegram.ui.Components.-..Lambda.TextPaintImageReceiverSpan.Cb0mzcqNIfBx1iovVDp8PZkH5ug; // $FF: synthetic class public final class _$$Lambda$TextPaintImageReceiverSpan$Cb0mzcqNIfBx1iovVDp8PZkH5ug implements ImageReceiver.ImageReceiverDelegate { // $FF: synthetic field public static final Cb0mzcqNIfBx1iovVDp8PZkH5ug INSTANCE = new _$$Lambda$TextPaintImageReceiverSpan$Cb0mzcqNIfBx1iovVDp8PZkH5ug(); // $FF: synthetic method private _$$Lambda$TextPaintImageReceiverSpan$Cb0mzcqNIfBx1iovVDp8PZkH5ug() { } public final void didSetImage(ImageReceiver var1, boolean var2, boolean var3) { TextPaintImageReceiverSpan.lambda$new$0(var1, var2, var3); } }
[ "crash@home.home.hr" ]
crash@home.home.hr
46e942aa9f1afcbddcee63994a68a3e38cf3275b
86654f0ee983cb1afed3bdf74bc5342a514dd60c
/aliyun-java-sdk-sas/src/main/java/com/aliyuncs/sas/model/v20181203/DescribeExposedInstanceListRequest.java
489c1aeda3f4a8f52f2ba8847101aee3923cc9c7
[ "Apache-2.0" ]
permissive
MyStarrySkies/aliyun-openapi-java-sdk
4d2902ff4dc4108b7dd4ed4af5caf697c45c332a
b2b30626573641cf416075d455b7c1eb0472a063
refs/heads/master
2023-03-17T04:09:21.240731
2021-03-15T07:09:04
2021-03-15T07:09:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,605
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.sas.model.v20181203; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.sas.Endpoint; /** * @author auto create * @version */ public class DescribeExposedInstanceListRequest extends RpcAcsRequest<DescribeExposedInstanceListResponse> { private String exposureType; private String exposurePort; private String uuid; private Integer pageSize; private String from; private Boolean vulStatus; private String exposureIp; private Long groupId; private Integer currentPage; private String exposureComponent; private String instanceId; private String instanceName; public DescribeExposedInstanceListRequest() { super("Sas", "2018-12-03", "DescribeExposedInstanceList", "sas"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public String getExposureType() { return this.exposureType; } public void setExposureType(String exposureType) { this.exposureType = exposureType; if(exposureType != null){ putQueryParameter("ExposureType", exposureType); } } public String getExposurePort() { return this.exposurePort; } public void setExposurePort(String exposurePort) { this.exposurePort = exposurePort; if(exposurePort != null){ putQueryParameter("ExposurePort", exposurePort); } } public String getUuid() { return this.uuid; } public void setUuid(String uuid) { this.uuid = uuid; if(uuid != null){ putQueryParameter("Uuid", uuid); } } public Integer getPageSize() { return this.pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; if(pageSize != null){ putQueryParameter("PageSize", pageSize.toString()); } } public String getFrom() { return this.from; } public void setFrom(String from) { this.from = from; if(from != null){ putQueryParameter("From", from); } } public Boolean getVulStatus() { return this.vulStatus; } public void setVulStatus(Boolean vulStatus) { this.vulStatus = vulStatus; if(vulStatus != null){ putQueryParameter("VulStatus", vulStatus.toString()); } } public String getExposureIp() { return this.exposureIp; } public void setExposureIp(String exposureIp) { this.exposureIp = exposureIp; if(exposureIp != null){ putQueryParameter("ExposureIp", exposureIp); } } public Long getGroupId() { return this.groupId; } public void setGroupId(Long groupId) { this.groupId = groupId; if(groupId != null){ putQueryParameter("GroupId", groupId.toString()); } } public Integer getCurrentPage() { return this.currentPage; } public void setCurrentPage(Integer currentPage) { this.currentPage = currentPage; if(currentPage != null){ putQueryParameter("CurrentPage", currentPage.toString()); } } public String getExposureComponent() { return this.exposureComponent; } public void setExposureComponent(String exposureComponent) { this.exposureComponent = exposureComponent; if(exposureComponent != null){ putQueryParameter("ExposureComponent", exposureComponent); } } public String getInstanceId() { return this.instanceId; } public void setInstanceId(String instanceId) { this.instanceId = instanceId; if(instanceId != null){ putQueryParameter("InstanceId", instanceId); } } public String getInstanceName() { return this.instanceName; } public void setInstanceName(String instanceName) { this.instanceName = instanceName; if(instanceName != null){ putQueryParameter("InstanceName", instanceName); } } @Override public Class<DescribeExposedInstanceListResponse> getResponseClass() { return DescribeExposedInstanceListResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
33da6b05fbeb432665b55c1ecc9cf7ba058875e9
e67d801c509784ef0d9919419f60f3d53d91fd6e
/eshop4j-framework/src/main/java/com/eshop4j/core/result/ErrorResult.java
d9f3b5a5383b8866b970a925a5aa05ea8211bb98
[]
no_license
zwyi1985/eshop4j
01ba3a834816765bf931b364088211c283ad98bd
ed7e9297138a79d1077c9ade1047c855dbdd9e54
refs/heads/master
2020-04-13T04:19:24.827448
2018-10-20T06:21:06
2018-10-20T06:21:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
633
java
package com.eshop4j.core.result; import java.util.HashMap; import java.util.Map; /** * ErrorResult : 用于响应错误的请求的对象 * * @author Mignet * @since 2014-09-27 16:38 */ public class ErrorResult extends Result { private static final long serialVersionUID = 8567221653356186674L; /** * 封装多个 错误信息 */ private Map<String, Object> errors = new HashMap<String, Object>(); public Map<String, Object> getErrors() { return errors; } public void setErrors(Map<String, Object> errors) { this.errors = errors; } public ErrorResult() { } }
[ "MignetWee@gmail.com" ]
MignetWee@gmail.com
c0543015cc05a9db1c8a8602795304c127ff50de
728b37e3a817c3b2847ef21c6d0da34bc7078fb6
/codjo-segmentation-server/src/main/java/net/codjo/segmentation/server/preference/DbFilterSelectorFactory.java
364e5cd2f0b74ba6bf399cc6c6939ef4c406ede2
[]
no_license
codjo-sandbox/codjo-segmentation
69886ffb2a0ebb4a483c84693eead3eef7661c6b
743fdebbee1943e69b062e1557ad2ebd50613a31
refs/heads/integration
2020-12-25T17:44:28.733680
2015-08-05T15:02:43
2015-08-05T15:02:43
3,581,425
0
0
null
null
null
null
UTF-8
Java
false
false
609
java
package net.codjo.segmentation.server.preference; import net.codjo.mad.server.handler.HandlerException; import net.codjo.mad.server.handler.sql.QueryBuilder; import net.codjo.mad.server.handler.sql.SqlHandler; import java.util.Map; /** * */ public class DbFilterSelectorFactory implements QueryBuilder { public String buildQuery(final Map args, SqlHandler sqlHandler) throws HandlerException { String tableName = (String)args.get("tableName"); String columnName = (String)args.get("columnName"); return "select distinct " + columnName + " as VALUE from " + tableName; } }
[ "admin@codjo.net" ]
admin@codjo.net
e0435479f00aa7c1132c223924bb353b8eae5e5f
91063f5a2280fc70cfb47574edd248c1b8151a60
/java-fragment/src/main/java/org/unidal/script/java/JavaFragmentCompiler.java
b1a1ea333546ec3cb63c78e4c06038a3bb584777
[]
no_license
qmwu2000/frameworks
57f7a5fe4daf5b612156a2fb6818f19590ef8174
15a0371b34ee252ced134ae3d8418000505f9ac1
refs/heads/master
2021-01-09T05:16:44.406835
2012-12-13T10:07:01
2012-12-13T10:07:01
9,001,172
3
4
null
null
null
null
UTF-8
Java
false
false
4,604
java
package org.unidal.script.java; import java.io.File; import java.io.IOException; import java.io.Reader; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Locale; import java.util.regex.Pattern; import javax.script.Compilable; import javax.script.CompiledScript; import javax.script.ScriptException; import javax.tools.Diagnostic; import javax.tools.DiagnosticCollector; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.StandardJavaFileManager; import javax.tools.StandardLocation; import javax.tools.ToolProvider; public class JavaFragmentCompiler implements Compilable { private JavaFragmentEngine m_engine; private boolean m_forceCompile = false; public JavaFragmentCompiler(JavaFragmentEngine engine) { m_engine = engine; } private URL[] buildUrls(File outputDir) { URL[] urls = new URL[1]; try { urls[0] = outputDir.toURI().toURL(); } catch (MalformedURLException e) { throw new RuntimeException("Error when building URLs for class loader!", e); } return urls; } @Override public CompiledScript compile(Reader reader) throws ScriptException { StringBuilder sb = new StringBuilder(4096); char[] buf = new char[2048]; try { while (true) { int size = reader.read(buf); if (size < 0) { break; } sb.append(buf, 0, size); } } catch (IOException e) { throw new RuntimeException("Error when reading script from " + reader + "!"); } finally { try { reader.close(); } catch (IOException e) { // ignore it } } return compile(sb.toString()); } @Override public CompiledScript compile(String script) throws ScriptException { File outputDir = getOutputDirectory(); String classpath = System.getProperty("java.class.path"); CompiledJavaFragment compiledScript = new CompiledJavaFragment(m_engine); JavaSourceFromString source = new JavaSourceFromString(outputDir, script); if (m_forceCompile || !source.getClassFile().exists()) { compileInternal(script, outputDir, classpath, source); } URL[] urls = buildUrls(outputDir); ClassLoader parent = Thread.currentThread().getContextClassLoader(); URLClassLoader classloader = new URLClassLoader(urls, parent); compiledScript.setClassLoader(classloader); compiledScript.setSource(source); return compiledScript; } private void compileInternal(String script, File outputDir, String classpath, JavaSourceFromString source) throws ScriptException { Locale locale = Locale.getDefault(); Charset charset = Charset.defaultCharset(); JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>(); StandardJavaFileManager manager = compiler.getStandardFileManager(diagnostics, locale, charset); outputDir.mkdirs(); try { manager.setLocation(StandardLocation.CLASS_PATH, toClassFiles(classpath)); manager.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(outputDir.getCanonicalFile())); Boolean result = compiler.getTask(null, manager, diagnostics, null, null, Arrays.asList(source)).call(); if (!Boolean.TRUE.equals(result)) { for (Diagnostic<? extends JavaFileObject> diagnostic : diagnostics.getDiagnostics()) { throw new ScriptException(diagnostic.getMessage(locale), script, (int) diagnostic.getLineNumber() - source.getLineOffset(), (int) diagnostic.getColumnNumber()); } } manager.close(); } catch (ScriptException e) { throw e; } catch (Exception e) { e.printStackTrace(); } } private File getOutputDirectory() { return new File("target/tmp-classes"); } private List<File> toClassFiles(String classpath) { String[] paths = classpath.split(Pattern.quote(File.pathSeparator)); int len = paths.length; List<File> files = new ArrayList<File>(len); for (String path : paths) { files.add(new File(path)); } return files; } public void setForceCompile(boolean forceCompile) { m_forceCompile = forceCompile; } }
[ "qmwu2000@gmail.com" ]
qmwu2000@gmail.com
5ee541da10fb24d9e38da31bc5988ef490d3e793
32534532cb08f1d4d9ab9cb82bff2b168b9c0905
/app/src/main/java/imageloader/shiming/com/myapplication/wigets/drawpickers/BrushLibraryAdapter.java
61d37b1878b2a143100e824af9cfc9581dbdd8f0
[]
no_license
DLTech21/BrushDemo_8.23
2650d9401ab3177f4b0d1a62c90526ea3974f302
182fe816af76878948d3deb967333517029e509d
refs/heads/master
2021-06-22T16:48:43.743661
2017-08-22T17:05:02
2017-08-22T17:05:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,274
java
package imageloader.shiming.com.myapplication.wigets.drawpickers; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageButton; import android.widget.ImageView; import java.util.LinkedList; import java.util.List; import imageloader.shiming.com.myapplication.R; import imageloader.shiming.com.myapplication.model.stroke.InsertableObjectStroke; /** * Created by $ zhoudeheng on 2015/12/9. * Email zhoudeheng@qccr.com */ public class BrushLibraryAdapter extends BaseAdapter { private Context mContext; private BrushCollection mBrushCollection = null; private Paint mBrushPaint = null; public static final int[] mDefaultColorCodes = { 0xffffffff, 0xffb4b4b4, 0xff5a5a5a, 0xff000000, 0xffe70012, 0xffff9900, 0xfffff100, 0xff8fc31f, 0xff009944, 0xff00a0e9, 0xff1d2088, 0xffe5007f }; public BrushLibraryAdapter(Context context, BrushCollection brushCollection) { mContext = context; mBrushCollection = brushCollection; mBrushPaint = new Paint(); PaintSelector.initPaint(mBrushPaint, Color.LTGRAY, 3); } @Override public int getCount() { return mBrushCollection.brushSize(); } @Override public Object getItem(int position) { return mBrushCollection.getBrush(position); } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { View view = null; ViewHolder holder; //view = View.inflate(mContext, R.layout.brush_library_item, null); view = View.inflate(mContext, R.layout.brush_library_item, null); if (convertView == null || convertView.getTag() == null) { holder = new ViewHolder(); holder.brushImage = (ImageView) view.findViewById(R.id.brush_image); holder.brushPreview = (ImageView) view.findViewById(R.id.brush_preview); holder.removeBrush = (ImageButton) view.findViewById(R.id.remove_brush); } else { view = convertView; holder = (ViewHolder) view.getTag(); } BrushInfo brush = mBrushCollection.getBrush(position); view.setOnClickListener(brushClickListener); holder.index = position; view.setTag(holder); holder.removeBrush.setOnClickListener(removeBrushClickListener); holder.removeBrush.setTag(holder); holder.brushImage.setBackgroundResource(getBrushImageId(brush)); //Bitmap PreviewBitmap = Bitmap.createBitmap(438, 66, Config.ARGB_4444); // float width = mContext.getResources().getDimension(R.dimen.preview_image_width); // float height = mContext.getResources().getDimension(R.dimen.preview_image_height); float width = mContext.getResources().getDimension(R.dimen.preview_image_width); float height = mContext.getResources().getDimension(R.dimen.preview_image_height); Bitmap PreviewBitmap = Bitmap.createBitmap((int)width, (int)height, Bitmap.Config.ARGB_8888); Canvas PreviewCanvas = new Canvas(PreviewBitmap); setBrushbrushPaint(brush); for(INotifyOuter outer:outers) outer.draw(PreviewCanvas, mBrushPaint, brush.getDoodleToolCode()); holder.brushPreview.setImageBitmap(PreviewBitmap); return view; } private int getBrushImageId(BrushInfo brush) { int resId = 0; switch(brush.getDoodleToolCode()) { case InsertableObjectStroke.STROKE_TYPE_NORMAL: resId = R.drawable.popup_pen3; break; case InsertableObjectStroke.STROKE_TYPE_PENCIL: resId = R.drawable.popup_pen1; break; case InsertableObjectStroke.STROKE_TYPE_MARKER: resId = R.drawable.popup_pen4; break; case InsertableObjectStroke.STROKE_TYPE_PEN: resId = R.drawable.popup_pen2; break; case InsertableObjectStroke.STROKE_TYPE_BRUSH: resId = R.drawable.popup_pen5; break; case InsertableObjectStroke.STROKE_TYPE_AIRBRUSH: resId = R.drawable.popup_pen5; break; } return resId; } private void setBrushbrushPaint(BrushInfo brush) { mBrushPaint.setStrokeWidth(brush.getStrokeWidth()); if ( brush.getIsPalette()) mBrushPaint.setColor(brush.getCustomColor()); else mBrushPaint.setColor(mDefaultColorCodes[brush.getSelectedColorIndex()]); switch(brush.getDoodleToolCode()) { case InsertableObjectStroke.STROKE_TYPE_NORMAL: PaintSelector.setNormal(mBrushPaint); break; case InsertableObjectStroke.STROKE_TYPE_PENCIL: PaintSelector.setPencil(mBrushPaint); break; case InsertableObjectStroke.STROKE_TYPE_MARKER: PaintSelector.setMarker(mBrushPaint); mBrushPaint.setAlpha(brush.getDoodleToolAlpha()); //edit by smilefish for marker pen break; case InsertableObjectStroke.STROKE_TYPE_PEN: PaintSelector.setPen(mBrushPaint); break; case InsertableObjectStroke.STROKE_TYPE_BRUSH: PaintSelector.setBrush(mBrushPaint); break; case InsertableObjectStroke.STROKE_TYPE_AIRBRUSH: PaintSelector.setAirBrush(mBrushPaint); break; } } private final View.OnClickListener brushClickListener = new View.OnClickListener() { @Override public void onClick(View v) { ViewHolder holder = (ViewHolder) v.getTag(); for(INotifyOuter outer:outers) outer.selectBrush(mBrushCollection.getBrush(holder.index)); notifyDataSetChanged(); } }; private final View.OnClickListener removeBrushClickListener = new View.OnClickListener() { @Override public void onClick(View v) { ViewHolder holder = (ViewHolder) v.getTag(); mBrushCollection.deleteBrush(holder.index); for(INotifyOuter outer:outers) outer.showAddBrushButton(); notifyDataSetChanged(); } }; private static class ViewHolder { ImageView brushImage; ImageView brushPreview; ImageButton removeBrush; int index; } //begin smilefish private List<INotifyOuter> outers=new LinkedList<INotifyOuter>(); public void addOuterListener(INotifyOuter outer){ outers.add(outer); } public interface INotifyOuter{ void selectBrush(BrushInfo info); void showAddBrushButton(); void draw(Canvas canvas, Paint paint, int toolCode); } //end smilefish }
[ "x" ]
x
1d3dbbec82bb31e276d634c22d2db40db48e0b5a
c707eb6659749bf99bd18bc48583e4260fc0b1a4
/app/src/main/java/com/loosoo100/campus100/view/spinkit/style/Pulse.java
8bd528c83441e0060d2be8a8b332cda5696c8786
[]
no_license
HJianFei/campus
53fc6b823d3226e4201a6c0004d884ae082274a7
b06bb5c460d9d12c37d40e9e649441cf11b4d6a4
refs/heads/master
2020-12-02T19:20:21.284312
2017-07-23T02:49:44
2017-07-23T02:49:44
96,326,458
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
package com.loosoo100.campus100.view.spinkit.style; import android.animation.ValueAnimator; import com.loosoo100.campus100.view.spinkit.animation.SpriteAnimatorBuilder; import com.loosoo100.campus100.view.spinkit.sprite.CircleSprite; /** * Created by ybq. */ public class Pulse extends CircleSprite { public Pulse() { setScale(0f); } @Override public ValueAnimator onCreateAnimation() { float fractions[] = new float[]{0f, 1f}; return new SpriteAnimatorBuilder(this). scale(fractions, 0f, 1f). alpha(fractions, 255, 0). duration(1000). easeInOut(fractions) .build(); } }
[ "190766172@qq.com" ]
190766172@qq.com
ee283f3313c20ce94bc41f38817d8489f662d91c
a2321f425f17a566b93de706fd465bc2de5d2c01
/app/src/main/java/com/eaglesakura/andriders/computer/notification/NotificationCard.java
a88548f6d16ab5babc1ad1256fdda2e52623b299
[]
no_license
fkmhrk/andriders-central-engine-v3
10660ebd8e1e7559eb59baabf9552c8f318ae174
9c7fea6d3cce5e4cc81e959a9655e38879118bfc
refs/heads/master
2020-12-24T13:52:14.442098
2016-02-11T08:44:33
2016-02-11T08:44:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,927
java
package com.eaglesakura.andriders.computer.notification; import com.eaglesakura.andriders.notification.NotificationData; import com.eaglesakura.andriders.protocol.CommandProtocol; import com.eaglesakura.android.framework.context.Resources; import com.eaglesakura.android.graphics.Font; import com.eaglesakura.android.graphics.Graphics; import com.eaglesakura.android.util.ImageUtil; import android.graphics.Bitmap; import android.graphics.Canvas; import java.text.SimpleDateFormat; import java.util.Date; /** * 通知用カード */ public class NotificationCard { private static final SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("HH:mm:ss"); /** * 通知カード */ Bitmap cardImage; /** * 通知データ */ NotificationData notificationData; public NotificationCard(NotificationData data) { this.notificationData = data; } /** * カード用画像を構築する */ public void buildCardImage() { int[] displaySize = Resources.displaySize(); // 1カードの幅と高さ // 比率は必ず16:9になるようにする final int CARD_HEIGHT = displaySize[1] / (MAX_NOTIFICATION_CARDS + NOTIFICATION_BOTTOMMARGIN_NUM + NOTIFICATION_TOPMARGIN_NUM); final int CARD_WIDTH = (int) (((float) CARD_HEIGHT / 9.0f) * (32.0f + 9.0f)); // アイコン領域+16:9の通知領域を持たせる // final int CARD_WIDTH = (int) ((float) displaySize[0] * 0.4f); // カードを生成する cardImage = Bitmap.createBitmap(CARD_WIDTH, CARD_HEIGHT, Bitmap.Config.ARGB_8888); Graphics graphics = new Graphics(new Canvas(cardImage)); graphics.setAntiAlias(true); // カードの背景を染める graphics.setColorARGB(notificationData.getBackgroundColor()); graphics.fillRoundRect(0, 0, CARD_WIDTH, CARD_HEIGHT, (float) CARD_HEIGHT * 0.05f); // 囲い線を入れる graphics.setColorARGB(ImageUtil.getNegaColor(notificationData.getBackgroundColor())); graphics.drawRoundRect(0, 0, CARD_WIDTH, CARD_HEIGHT, (float) CARD_HEIGHT * 0.05f); // アイコンを描画する // 多少内側に入れる { int INSET_PIXEL = 1; graphics.drawBitmap(notificationData.getIcon(), INSET_PIXEL, INSET_PIXEL, CARD_HEIGHT - (INSET_PIXEL * 2), CARD_HEIGHT - (INSET_PIXEL * 2)); } // 通知文字列を描画する { int fontColor = ImageUtil.getNegaColor(notificationData.getBackgroundColor()); final int FONT_AREA_WIDTH = CARD_WIDTH - (int) ((float) CARD_HEIGHT * 1.1f); final int FONT_HEIGHT = CARD_HEIGHT / MAX_NOTIFICATION_MESSAGE_LINES; final int FONT_MARGIN = 2; Font font = new Font(); font.setColorARGB(fontColor); Canvas canvas = graphics.getCanvas(); font.drawString( String.format("%s\n%s", DATE_FORMATTER.format(new Date()), notificationData.getMessage()), "...", (int) ((float) CARD_HEIGHT * 1.05f), FONT_MARGIN, FONT_HEIGHT, FONT_AREA_WIDTH, MAX_NOTIFICATION_MESSAGE_LINES, FONT_MARGIN, canvas); } } public void dispose() { if (cardImage != null) { cardImage.recycle(); } cardImage = null; if (notificationData != null) { notificationData.getIcon().recycle(); notificationData = null; } } public int getShowTimeMs() { return (int) getNotificationTimeMs(notificationData.getNotificationLength()); } /** * 表示カードを取得する */ public Bitmap getCardImage() { return cardImage; } /** * 通知時間から表示時間(ミリ秒)へ変換する * * MEMO 互換性のためにNeverは残すが、使うことが無いのでLongと同等に扱う */ public static long getNotificationTimeMs(CommandProtocol.NotificationLength length) { switch (length) { case Short: return 1000 * 5; case Long: case Never: return 1000 * 30; default: // Normal: return 1000 * 10; } } /** * 通知に表示できる最大行数 */ public static final int MAX_NOTIFICATION_MESSAGE_LINES = 3; /** * 同時に通知可能な最大カード数 */ public static final int MAX_NOTIFICATION_CARDS = 5; /** * マージンとして上に開けておくスロット数 */ public static final int NOTIFICATION_TOPMARGIN_NUM = 2; /** * マージンとして下に開けておくスロット数 */ public static final int NOTIFICATION_BOTTOMMARGIN_NUM = 2; }
[ "eagle.sakura@gmail.com" ]
eagle.sakura@gmail.com
f6ed3ed7f64e4c548c7c95b4340ca6d14c86e2a1
4f667cdc72a0b8a72f262ac5c9c64ab5284bb8d5
/src/main/java/com/github/mjeanroy/dbunit/commons/lang/PreConditions.java
57fdbdb56b9bcdd3a471602a85ef3691d560f849
[]
no_license
wabrit/dbunit-plus
34abdc6ab398062218566c7c7548d6636803fb85
2358b518218a81f292b0487ab3113b3d0c88f02b
refs/heads/master
2020-03-17T13:30:09.150571
2017-10-29T19:31:45
2017-10-29T19:31:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,547
java
/** * The MIT License (MIT) * * Copyright (c) 2015-2017 Mickael Jeanroy * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.github.mjeanroy.dbunit.commons.lang; import static com.github.mjeanroy.dbunit.commons.lang.Strings.isBlank; /** * Static PreConditions Utilities. */ public final class PreConditions { // Ensure non instantiation. private PreConditions() { } /** * Ensure that given {@code value} is not {@code null}. * * @param value Value to check. * @param message Error message. * @param params Optional error message parameters. * @param <T> Type of value. * @return Value if it is not null. * @throws NullPointerException If {@code value} is null. */ public static <T> T notNull(T value, String message, Object... params) { if (value == null) { throw new NullPointerException(format(message, params)); } return value; } /** * Ensure that given {@code value} is not {@code null}, empty or blank. * * @param value Value to check. * @param message Error message. * @param params Optional error message parameters. * @return Value if it is not {@code null}, empty or blank. * @throws NullPointerException If {@code value} is null. * @throws IllegalArgumentException If {@code value} is empty or blank. */ public static String notBlank(String value, String message, Object... params) { notNull(value, message, params); if (isBlank(value)) { throw new IllegalArgumentException(format(message, params)); } return value; } /** * Ensure that given {@code value} is not blank. * * @param value Value to check. * @param message Error message. * @param params Optional error message parameters. * @return Value if it is not {@code null}, empty or blank. * @throws NullPointerException If {@code value} is null. * @throws IllegalArgumentException If {@code value} is empty or blank. */ public static char notBlank(char value, String message, Object... params) { if (Character.isWhitespace(value)) { throw new IllegalArgumentException(format(message, params)); } return value; } /** * Ensure that given {@code value} is not {@code null}, empty or blank and starts with * given {@code prefix}. * * @param value Value to check. * @param prefix The prefix to look for. * @param message Error message. * @param params Optional error message parameters. * @return Value if it is not {@code null}, empty or blank. * @throws NullPointerException If {@code value} is null. * @throws IllegalArgumentException If {@code value} is empty, blank, or does not start with {@code prefix}. */ public static String startsWith(String value, String prefix, String message, Object... params) { notBlank(prefix, "Prefix should be defined"); notBlank(value, message, params); if (!value.startsWith(prefix)) { throw new IllegalArgumentException(format(message, params)); } return value; } /** * Check argument condition and throw {@link IllegalArgumentException} if {@code condition} is {@code false}. * * @param condition The result of the condition to verify. * @param message Error message. * @param params Optional error message parameters. */ public static void checkArgument(boolean condition, String message, Object... params) { if (!condition) { throw new IllegalArgumentException(format(message, params)); } } private static String format(String message, Object... params) { return params.length > 0 ? String.format(message, params) : message; } }
[ "mickael.jeanroy@gmail.com" ]
mickael.jeanroy@gmail.com
49cc9f88c69eda13415d8f6bc33a9a49b421359a
3f0672b82ba5b2ea756240038a792feac061588a
/src/main/java/grader/navigation/manual/ManualProjectNavigator.java
320e8eb8b3becd6ee6b39906699fd54c8f6a9c4c
[]
no_license
Kirny/Grader
28bc357415779dd8de6be45d523b091fa216eaff
207458b0bdf06156d02a66eaa864663c3cbac822
refs/heads/master
2021-01-17T16:25:40.981476
2015-11-08T17:10:33
2015-11-08T17:10:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
361
java
package grader.navigation.manual; import grader.navigation.ProjectNavigator; import grader.sakai.project.SakaiProjectDatabase; import grader.settings.GraderSettingsModel; import bus.uigen.OEFrame; public interface ManualProjectNavigator extends ProjectNavigator { // public void navigateManually(GraderSettingsModel settingsModel, OEFrame settingsFrame); }
[ "dewan@cs.unc.edu" ]
dewan@cs.unc.edu
4d12905bf1965bfc22fd575284dd775cb7ca80bd
79c4ee1dd1db53267b8466c5f6a69312a715ad96
/cache/cache-ehcache/src/main/java/net/jahhan/properties/EhcacheExtensionPropertiesResetter.java
24763bddfa0ad35e81c140ef932c3444712dab7c
[ "Apache-2.0" ]
permissive
nince-wyj/jahhan
8978eaaa612e61d18f258b56bd386c32e6c7cdbe
9ee33e3b6380fdf516b0b88ceae43f3c67e87c15
refs/heads/master
2022-11-17T14:50:05.429321
2019-11-10T01:00:47
2019-11-10T01:00:47
71,103,781
11
8
Apache-2.0
2022-11-16T07:34:45
2016-10-17T05:45:48
Java
UTF-8
Java
false
false
709
java
package net.jahhan.properties; import java.util.Properties; import net.jahhan.common.extension.annotation.Order; import net.jahhan.common.extension.annotation.PropertiesFile; import net.jahhan.common.extension.api.PropertiesResetter; import net.jahhan.spi.DBCache; import net.jahhan.spi.DBSeqCache; import net.jahhan.spi.TokenCache; @PropertiesFile("extensionInit") @Order(2) public class EhcacheExtensionPropertiesResetter extends PropertiesResetter { @Override public void reset(Properties properties) { properties.setProperty(DBCache.class.getName(), "ehcache"); properties.setProperty(DBSeqCache.class.getName(), "ehcache"); properties.setProperty(TokenCache.class.getName(), "ehcache"); } }
[ "41284688@qq.com" ]
41284688@qq.com
bebae334118e22c1c98d24c7c5f658279f10ccba
34b662f2682ae9632060c2069c8b83916d6eecbd
/u/aly/e.java
c37e6d95aa391a963bab92ba23a3e2dce3603b0f
[]
no_license
mattshapiro/fc40
632c4df2d7e117100705325544fc709cd38bb0a9
b47ee545260d3e0de66dd05a973b457a3c03f5cf
refs/heads/master
2021-01-19T00:25:32.311567
2015-03-07T00:48:51
2015-03-07T00:48:51
31,795,769
0
1
null
null
null
null
UTF-8
Java
false
false
866
java
package u.aly; import android.content.Context; import android.telephony.TelephonyManager; public class e extends a { private static final String a = "imei"; private Context b; public e(Context paramContext) { super("imei"); this.b = paramContext; } public String f() { TelephonyManager localTelephonyManager = (TelephonyManager)this.b.getSystemService("phone"); if (localTelephonyManager == null); try { if (bi.a(this.b, "android.permission.READ_PHONE_STATE")) { String str = localTelephonyManager.getDeviceId(); return str; } } catch (Exception localException) { return null; } return null; } } /* Location: /Users/mattshapiro/Downloads/dex2jar/com.dji.smartphone.downloader-dex2jar.jar * Qualified Name: u.aly.e * JD-Core Version: 0.6.2 */
[ "typorrhea@gmail.com" ]
typorrhea@gmail.com
0bc7130a28e22d620921a6c7f9eae80941b274f5
68349c585289cc3ef81998d79a67607eb6bb7520
/app/src/main/java/com/wd/winddots/entity/ImageEntity.java
87a89c669b6f2a2c483edd03dee89977f4b76f00
[]
no_license
BooksCup/WindDots
9b0feb141724618a8aa93d30f13442d9507de5f4
d72cd0d1a17f97ae8dee85d7debdef2a30596a3d
refs/heads/master
2023-04-03T08:55:54.076503
2021-04-08T06:02:41
2021-04-08T06:02:41
340,230,253
0
0
null
null
null
null
UTF-8
Java
false
false
598
java
package com.wd.winddots.entity; /** * 图片 * * @author zhou */ public class ImageEntity { private String id; ///图片本地路径 private String path; ///图片网络地址 private String url; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
[ "812809680@qq.com" ]
812809680@qq.com
585c17814a4079d5281dae9a37e4f5fa81f5f391
8dadce08a76ce387608951673fc0364feaa9a06a
/flexodesktop/model/flexofoundation/src/main/java/org/openflexo/foundation/wkf/dm/TextColorChanged.java
6b7f3232c868327876c707fddf53f0d476a28dcc
[]
no_license
melbarra/openflexo
b8e1a97d73a9edebad198df4e776d396ae8e9a09
9b2d8efe1982ec8f64dee8c43a2e7207594853f3
refs/heads/master
2021-01-24T02:22:47.141424
2012-03-12T00:15:57
2012-03-12T00:15:57
2,756,256
0
0
null
null
null
null
UTF-8
Java
false
false
1,062
java
/* * (c) Copyright 2010-2011 AgileBirds * * This file is part of OpenFlexo. * * OpenFlexo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenFlexo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OpenFlexo. If not, see <http://www.gnu.org/licenses/>. * */ package org.openflexo.foundation.wkf.dm; import org.openflexo.foundation.utils.FlexoColor; /** * @author gpolet * */ public class TextColorChanged extends WKFDataModification { /** * */ public TextColorChanged(FlexoColor oldColor, FlexoColor newColor) { super("textColor", oldColor, newColor); } }
[ "guillaume.polet@gmail.com" ]
guillaume.polet@gmail.com
c666bf5cbd56cf39330d24c2db87658e4f184c00
ea4da81a69a300624a46fce9e64904391c37267c
/src/main/java/com/alipay/api/domain/AlipayUserFamilyArchiveInitializeModel.java
3ca4fa3dfe0a529dde14bd0f2a1d75db13385a1e
[ "Apache-2.0" ]
permissive
shiwei1024/alipay-sdk-java-all
741cc3cb8cf757292b657ce05958ff9ad8ecf582
d6a051fd47836c719a756607e6f84fee2b26ecb4
refs/heads/master
2022-12-29T18:46:53.195585
2020-10-09T06:34:30
2020-10-09T06:34:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,473
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 初始化家人信息档案(选人授权)组件 * * @author auto create * @since 1.0, 2020-07-27 22:52:05 */ public class AlipayUserFamilyArchiveInitializeModel extends AlipayObject { private static final long serialVersionUID = 2128915133985731731L; /** * 家庭档案id */ @ApiListField("archive_id_list") @ApiField("string") private List<String> archiveIdList; /** * 最大选择家人档案数量,范围[0,10]区间 */ @ApiField("max_archives_cnt") private Long maxArchivesCnt; /** * 最小选择家人档案数量,范围[0,10]区间 */ @ApiField("min_archives_cnt") private Long minArchivesCnt; /** * 外部业务号 */ @ApiField("out_biz_no") private String outBizNo; /** * 授权回调地址,和应用在门户上设置的“授权回调地址”保持一致,必须满足URI规范,且不能携带参数 */ @ApiField("redirect_uri") private String redirectUri; /** * 家庭档案组件模板id,模板包括定制化的字段、定制化的展示文案和用户协议等等。每个业务方需要用户家人信息的字段不一样,核验的方式也会有差异,需要联系产品负责人申请 */ @ApiField("template_id") private String templateId; public List<String> getArchiveIdList() { return this.archiveIdList; } public void setArchiveIdList(List<String> archiveIdList) { this.archiveIdList = archiveIdList; } public Long getMaxArchivesCnt() { return this.maxArchivesCnt; } public void setMaxArchivesCnt(Long maxArchivesCnt) { this.maxArchivesCnt = maxArchivesCnt; } public Long getMinArchivesCnt() { return this.minArchivesCnt; } public void setMinArchivesCnt(Long minArchivesCnt) { this.minArchivesCnt = minArchivesCnt; } public String getOutBizNo() { return this.outBizNo; } public void setOutBizNo(String outBizNo) { this.outBizNo = outBizNo; } public String getRedirectUri() { return this.redirectUri; } public void setRedirectUri(String redirectUri) { this.redirectUri = redirectUri; } public String getTemplateId() { return this.templateId; } public void setTemplateId(String templateId) { this.templateId = templateId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
8fd82898e561c2df5af951150ac495cea9badf40
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/BoilerActuator3059.java
4e2a9ec9f75ec997174982709ed6c3e84e5649b3
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
263
java
package syncregions; public class BoilerActuator3059 { public execute(int temperatureDifference3059, boolean boilerStatus3059) { //sync _bfpnGUbFEeqXnfGWlV3059, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
c5626adfd8df6880f9d4d5e7402f3543ebab8c7e
66b96cbf26682eb51e6893a45d773481c5118b67
/imagesearch-20200212/java/src/main/java/com/aliyun/imagesearch/models/SearchImageByNameResponse.java
a0d244950fb171ae556c67da6bda2e4e8a9db41a
[ "Apache-2.0" ]
permissive
atptro/alibabacloud-sdk
4c104535fe77b94a4d5536028874f492d86aa794
65d4a000e4f4059b58ca1bc3d032853aedef4f3f
refs/heads/master
2022-10-17T21:45:07.475716
2020-06-18T07:37:05
2020-06-18T07:37:05
273,171,083
0
0
NOASSERTION
2020-06-18T07:29:22
2020-06-18T07:29:21
null
UTF-8
Java
false
false
4,103
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.imagesearch.models; import com.aliyun.tea.*; public class SearchImageByNameResponse extends TeaModel { @NameInMap("RequestId") @Validation(required = true) public String requestId; @NameInMap("Success") @Validation(required = true) public Boolean success; @NameInMap("Code") @Validation(required = true) public Integer code; @NameInMap("Msg") @Validation(required = true) public String msg; @NameInMap("Auctions") @Validation(required = true) public java.util.List<SearchImageByNameResponseAuctions> auctions; @NameInMap("Head") @Validation(required = true) public SearchImageByNameResponseHead head; @NameInMap("PicInfo") @Validation(required = true) public SearchImageByNameResponsePicInfo picInfo; public static SearchImageByNameResponse build(java.util.Map<String, ?> map) throws Exception { SearchImageByNameResponse self = new SearchImageByNameResponse(); return TeaModel.build(map, self); } public static class SearchImageByNameResponseAuctions extends TeaModel { @NameInMap("CategoryId") @Validation(required = true) public Integer categoryId; @NameInMap("ProductId") @Validation(required = true) public String productId; @NameInMap("PicName") @Validation(required = true) public String picName; @NameInMap("CustomContent") @Validation(required = true) public String customContent; @NameInMap("SortExprValues") @Validation(required = true) public String sortExprValues; @NameInMap("IntAttr") @Validation(required = true) public Integer intAttr; @NameInMap("StrAttr") @Validation(required = true) public String strAttr; public static SearchImageByNameResponseAuctions build(java.util.Map<String, ?> map) throws Exception { SearchImageByNameResponseAuctions self = new SearchImageByNameResponseAuctions(); return TeaModel.build(map, self); } } public static class SearchImageByNameResponseHead extends TeaModel { @NameInMap("DocsReturn") @Validation(required = true) public Integer docsReturn; @NameInMap("DocsFound") @Validation(required = true) public Integer docsFound; @NameInMap("SearchTime") @Validation(required = true) public Integer searchTime; public static SearchImageByNameResponseHead build(java.util.Map<String, ?> map) throws Exception { SearchImageByNameResponseHead self = new SearchImageByNameResponseHead(); return TeaModel.build(map, self); } } public static class SearchImageByNameResponsePicInfoAllCategories extends TeaModel { @NameInMap("Id") @Validation(required = true) public Integer id; @NameInMap("Name") @Validation(required = true) public String name; public static SearchImageByNameResponsePicInfoAllCategories build(java.util.Map<String, ?> map) throws Exception { SearchImageByNameResponsePicInfoAllCategories self = new SearchImageByNameResponsePicInfoAllCategories(); return TeaModel.build(map, self); } } public static class SearchImageByNameResponsePicInfo extends TeaModel { @NameInMap("CategoryId") @Validation(required = true) public Integer categoryId; @NameInMap("Region") @Validation(required = true) public String region; @NameInMap("AllCategories") @Validation(required = true) public java.util.List<SearchImageByNameResponsePicInfoAllCategories> allCategories; public static SearchImageByNameResponsePicInfo build(java.util.Map<String, ?> map) throws Exception { SearchImageByNameResponsePicInfo self = new SearchImageByNameResponsePicInfo(); return TeaModel.build(map, self); } } }
[ "wb-szq493230@alibaba-inc.com" ]
wb-szq493230@alibaba-inc.com
095d6aa6e8e89c66e93fadea4cd351c90e430530
5c4ae76a9885361f4fe94c6fd5e3487cb5fb3036
/leadnews/leadnews-crawler/src/test/java/com/siyi/crawler/service/CrawlerNewsAdditionalServiceTest.java
806a271c0ea8385d7e02476458a01f29477aca9b
[]
no_license
ppker/leadnews
d4b62d1df459e460d02b58eb49d29bdccfee1440
78115309361f7e888040ab265afe167c1005221e
refs/heads/main
2023-05-27T03:19:07.078738
2021-06-02T02:58:04
2021-06-02T02:58:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,118
java
package com.siyi.crawler.service; import com.siyi.model.crawler.pojos.ClNewsAdditional; 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.test.context.junit4.SpringRunner; import java.util.List; @SpringBootTest @RunWith(SpringRunner.class) public class CrawlerNewsAdditionalServiceTest { @Autowired private CrawlerNewsAdditionalService crawlerNewsAdditionalService; @Test public void testQueryList(){ ClNewsAdditional clNewsAdditional = new ClNewsAdditional(); clNewsAdditional.setUrl("https://blog.csdn.net/weixin_43976602/article/details/96971651"); List<ClNewsAdditional> clNewsAdditionals = crawlerNewsAdditionalService.queryList(clNewsAdditional); System.out.println(clNewsAdditionals); } @Test public void testCheckExist(){ boolean b = crawlerNewsAdditionalService.checkExist("https://blog.csdn.net/weixin_43976602/article/details/96971651"); System.out.println(b); } }
[ "siyiyimiaozhong@qq.com" ]
siyiyimiaozhong@qq.com
1e6fac0a42e89e3d1da6c09380c90a378486dd24
c4a14d70951d7ec5aac7fe7ebb2db891cfe6c0b1
/modulos/apps/LOCALGIS-APPS-Movilidad/src/main/java/es/satec/localgismobile/ui/utils/SearchBean.java
7c5a878ebc20d8d5ecf85b3404a095b4f89f9940
[]
no_license
pepeysusmapas/allocalgis
925756321b695066775acd012f9487cb0725fcde
c14346d877753ca17339f583d469dbac444ffa98
refs/heads/master
2020-09-14T20:15:26.459883
2016-09-27T10:08:32
2016-09-27T10:08:32
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,400
java
/** * SearchBean.java * © MINETUR, Government of Spain * This program is part of LocalGIS * This program is licensed and may be used, modified and redistributed under the terms of the European Public License (EUPL), either version 1.1 or (at your option) any later version as soon as they are approved by the European Commission. * 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 more details. * You should have received a copy of the EUPL1.1 license along with this program; if not, you may find it at http://joinup.ec.europa.eu/software/page/eupl/licence-eupl */ package es.satec.localgismobile.ui.utils; /**Informacion a mostrar a la hora de hacer la busqueda**/ public class SearchBean { private String [] datosDouble = {"=","!=","<",">","<=",">=", "between"}; //private String [] datosString = {"igual","diferente","empieza por","termina por","match","contiene","antes","despues"}; //private String [] datosString = {"igual","diferente","contiene"}; private String [] datosString = {"like"}; public String[] getDatosDouble(){ return this.datosDouble; } public String[] getDatosString(){ return this.datosString; } }
[ "jorge.martin@cenatic.es" ]
jorge.martin@cenatic.es
1978a1d6dc1f34a00f4d00d4098e26be4d020a06
1e12df6aeb0c9fea81398a6e0ed7e623cff972d3
/src/main/java/com/diviso/graeshoppe/config/elasticsearch/ElasticRestClientConfig.java
7f8a19f9bf3592ed25b7f068194d7b31202ce9bb
[]
no_license
DivisoSofttech/AdminConsole
a155c672e1e9611dcd54857ea1ffe7c45ad89439
701e91cec95c06cb0fa98ecdfa1c3dfcfca46ae3
refs/heads/master
2022-12-23T21:58:02.916736
2020-02-13T05:50:58
2020-02-13T05:50:58
199,997,166
0
0
null
2022-12-16T04:43:10
2019-08-01T07:09:19
Java
UTF-8
Java
false
false
1,854
java
package com.diviso.graeshoppe.config.elasticsearch; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.impl.client.BasicCredentialsProvider; import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestHighLevelClient; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class ElasticRestClientConfig { @Value("${elasticsearch.host}") public String host; @Value("${elasticsearch.port}") public int port; @Value("${elasticsearch.username}") public String username; @Value("${elasticsearch.password}") public String password; @Value("${elasticsearch.scheme}") public String scheme; @Value("${elasticsearch.connectTimeout}") public int connectTimeout; public String getHost() { return host; } public int getPort() { return port; } @Bean public RestHighLevelClient client() { final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password)); RestClientBuilder builder = RestClient.builder(new HttpHost(host, port, scheme)).setHttpClientConfigCallback( httpClientBuilder -> httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider)); builder.setRequestConfigCallback( requestConfigBuilder -> requestConfigBuilder.setConnectTimeout(connectTimeout * 1000) .setSocketTimeout(connectTimeout * 1000).setConnectionRequestTimeout(0)); RestHighLevelClient client = new RestHighLevelClient(builder); return client; } }
[ "abdul.rafeek@lxisoft.com" ]
abdul.rafeek@lxisoft.com
c980257e725fb8a180d52f01bc81e3a242a82981
167c6226bc77c5daaedab007dfdad4377f588ef4
/java/ql/test/stubs/javafx-web/reactor/core/publisher/FluxSink.java
64eb3c6ff24a29526e259fbda64a305bf22e021a
[ "MIT" ]
permissive
github/codeql
1eebb449a34f774db9e881b52cb8f7a1b1a53612
d109637e2d7ab3b819812eb960c05cb31d9d2168
refs/heads/main
2023-08-20T11:32:39.162059
2023-08-18T14:33:32
2023-08-18T14:33:32
143,040,428
5,987
1,363
MIT
2023-09-14T19:36:50
2018-07-31T16:35:51
CodeQL
UTF-8
Java
false
false
791
java
// Generated automatically from reactor.core.publisher.FluxSink for testing purposes package reactor.core.publisher; import java.util.function.LongConsumer; import reactor.core.Disposable; import reactor.util.context.Context; import reactor.util.context.ContextView; public interface FluxSink<T> { Context currentContext(); FluxSink<T> next(T p0); FluxSink<T> onCancel(Disposable p0); FluxSink<T> onDispose(Disposable p0); FluxSink<T> onRequest(LongConsumer p0); boolean isCancelled(); default ContextView contextView(){ return null; } long requestedFromDownstream(); static public enum OverflowStrategy { BUFFER, DROP, ERROR, IGNORE, LATEST; private OverflowStrategy() {} } void complete(); void error(Throwable p0); }
[ "kaeluka@github.com" ]
kaeluka@github.com
0fdd484794733f1e9af33177a53b3047ace78b6a
0c9d2d4c1f691fa701bb2465c2922083330fa7c7
/ballcat-extends/ballcat-extend-pay-wx/src/main/java/com/hccake/starte/pay/wx/utils/WxPayUtil.java
f14e93ad8f45622fbf56a74dfc63cda2d24dd4eb
[ "MIT" ]
permissive
jifffffy/ballcat
14a9a28ea51410652625ff2d7c510b07f6015399
bc7184544b908ba001248800c24499674ddec4c6
refs/heads/master
2023-03-20T08:20:25.500014
2021-02-25T08:33:35
2021-02-25T09:27:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,960
java
package com.hccake.starte.pay.wx.utils; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.RandomUtil; import com.hccake.starte.pay.wx.constants.WxPayConstant; import com.hccake.starte.pay.wx.enums.SignType; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; /** * @author lingting 2021/1/26 16:04 */ @Slf4j public class WxPayUtil { public static DocumentBuilder getDocumentBuilder() throws ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); factory.setFeature("http://xml.org/sax/features/external-general-entities", false); factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); factory.setXIncludeAware(false); factory.setExpandEntityReferences(false); return factory.newDocumentBuilder(); } public static Document getDocument() throws ParserConfigurationException { return getDocumentBuilder().newDocument(); } /** * map 转 xml 字符串 * @param data map * @return java.lang.String * @author lingting 2021-02-01 10:22 */ public static String mapToXml(Map<String, String> data) throws ParserConfigurationException, TransformerException { Document document = getDocument(); Element root = document.createElement("xml"); document.appendChild(root); for (String key : data.keySet()) { String value = data.get(key); if (value == null) { value = ""; } value = value.trim(); Element filed = document.createElement(key); filed.appendChild(document.createTextNode(value)); root.appendChild(filed); } Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); StringWriter writer = new StringWriter(); StreamResult result = new StreamResult(writer); transformer.transform(new DOMSource(document), result); String output = writer.getBuffer().toString(); try { writer.close(); } catch (Exception ex) { log.error("string 写入流关闭异常"); } return output; } /** * xml字符串转map * @param xml xml字符串 * @return java.util.Map<java.lang.String,java.lang.String> * @author lingting 2021-02-01 11:29 */ public static Map<String, String> xmlToMap(String xml) throws ParserConfigurationException, IOException, SAXException { Map<String, String> data = new HashMap<>(30); InputStream stream = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8)); Document doc = getDocumentBuilder().parse(stream); doc.getDocumentElement().normalize(); NodeList nodeList = doc.getDocumentElement().getChildNodes(); for (int idx = 0; idx < nodeList.getLength(); ++idx) { Node node = nodeList.item(idx); if (node.getNodeType() == Node.ELEMENT_NODE) { Element element = (Element) node; data.put(element.getNodeName(), element.getTextContent()); } } try { stream.close(); } catch (Exception ex) { // do nothing } return data; } /** * 签名 * @param params 参数 * @param mckKey 密钥 * @return java.lang.String 签名结果 * @author lingting 2021-01-29 18:13 */ @SneakyThrows public static String sign(Map<String, String> params, String mckKey) { SignType st = SignType.of(params.get(WxPayConstant.FIELD_SIGN_TYPE)); Assert.isFalse(st == null, "签名类型不能为空!"); String[] keyArray = params.keySet().toArray(new String[0]); // 参数key排序 Arrays.sort(keyArray); // 构建排序后的用于签名的字符串 StringBuilder paramsStr = new StringBuilder(); for (String k : keyArray) { if (k.equals(WxPayConstant.FIELD_SIGN)) { continue; } // 参数值为空,则不参与签名 if (params.get(k).trim().length() > 0) { paramsStr.append(k).append("=").append(params.get(k).trim()).append("&"); } } paramsStr.append("key=").append(mckKey); // 签名后的字节 byte[] bytes; if (st == SignType.MD5) { final MessageDigest md5 = MessageDigest.getInstance("MD5"); bytes = md5.digest(paramsStr.toString().getBytes(StandardCharsets.UTF_8)); } else { final Mac mac = Mac.getInstance("HmacSHA256"); SecretKeySpec sk = new SecretKeySpec(mckKey.getBytes(StandardCharsets.UTF_8), "HmacSHA256"); mac.init(sk); bytes = mac.doFinal(paramsStr.toString().getBytes(StandardCharsets.UTF_8)); } // 构建返回值 StringBuilder builder = new StringBuilder(); for (byte b : bytes) { builder.append(Integer.toHexString((b & 0xFF) | 0x100), 1, 3); } return builder.toString().toUpperCase(); } /** * 生成随机字符串 * @return java.lang.String * @author lingting 2021-02-25 14:42 */ public static String generateNonceStr() { return RandomUtil.randomString(16); } }
[ "chengbohua@foxmail.com" ]
chengbohua@foxmail.com
ed2765bd2ce70f7f153ad4fa8be564003952855b
d872f30aa795f74806316c7c2136461dfcff5189
/Programmers_JAVA/src/level1/ex나머지가1이되는수찾기/Solution.java
9870c71082c8d7a976918d1676dae9d9104b93ab
[]
no_license
Sword-Is-Cat/Programmers_JAVA
e803196349a5afc6e352b066d0433afd9c705a65
dfd5bee8aa1663995af8c3874f8ec380904cd12b
refs/heads/master
2023-09-04T10:55:28.391963
2023-09-02T07:40:35
2023-09-02T07:40:35
253,808,035
0
0
null
null
null
null
UTF-8
Java
false
false
188
java
package level1.ex나머지가1이되는수찾기; class Solution { public int solution(int n) { n--; for (int i = 2; i * i <= n; i++) if (n % i == 0) return i; return n; } }
[ "jhbsp@naver.com" ]
jhbsp@naver.com
e1d912a92b85e2956a2384297bb6e1f4f2f275f1
c5c2b3ba573cf040d9cc3b2b3dc030581278af15
/src/main/java/net/eoutech/webmin/msg/service/MsgService.java
82b75bde08db920c53b34ddfd7f157a0192fbbe9
[]
no_license
hezhengwei92/vifiwebmin
aa2abd65638ab57412e9a91e771770174d1e89b8
a54a0d72a1ef49eaa7cb3cdc8223d1a83633eb4b
refs/heads/master
2021-08-23T08:30:48.634346
2017-12-04T09:16:28
2017-12-04T09:17:02
113,010,802
0
0
null
null
null
null
UTF-8
Java
false
false
1,391
java
package net.eoutech.webmin.msg.service; import net.eoutech.webmin.msg.push.Demo; import com.frame.service.FrameBaseService; import net.eoutech.webmin.commons.entity.TbMsg; import net.eoutech.webmin.msg.dao.MsgDao; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * Created by Administrator on 2016/10/15 0015. */ @Service public class MsgService extends FrameBaseService<TbMsg> { @Autowired MsgDao msgDao; @Override public TbMsg save(TbMsg tbMsg, boolean isEdit, List<String> idList) { tbMsg.setCrtTm(new Date()); if (!isEdit) { tbMsg.setCrtTm(tbMsg.getCrtTm()); } tbMsg = super.save(tbMsg, isEdit, idList); List<TbMsg> lists = new ArrayList<>(); lists.add(tbMsg); Demo demo = new Demo("580498fae0f55a28f400166a" ,"igyxrtpvfkfbnewa0ro1fvorzj6ef3xe"); try { demo.sendAndroidBroadcast(lists); demo.sendIOSBroadcast(lists); }catch (Exception e){ e.printStackTrace(); } return tbMsg; } @Override public List<TbMsg> getNew() { return msgDao.selNewMsg(); } public List<TbMsg> getCount(){ List<TbMsg> tbMsgs=msgDao.getCount(); return tbMsgs; } }
[ "419084526@qq.com" ]
419084526@qq.com
54bad19565703e510a0d6292cfa0f14933ec0dd9
b45a057b52344497f800d247c8aca9ec890c2714
/holly-chains-mobile/src/main/java/com/bt/chains/bean/form/EnterRandomCheckpointForm.java
15f905043a5c92b23379225e74cad6ee822e2f4b
[]
no_license
scorpiopapa/game-hollychains
8f6269663dddf7749066c30583a6eab01e4c5b95
fc39e8b21d379dc8a89083913e2ef2a407de6368
refs/heads/master
2020-06-02T01:27:10.053166
2014-09-27T09:40:08
2014-09-27T09:40:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,674
java
package com.bt.chains.bean.form; import java.util.List; import javax.validation.constraints.Min; import javax.validation.constraints.Pattern; import org.jsondoc.core.annotation.ApiObject; import org.jsondoc.core.annotation.ApiObjectField; import com.bt.chains.bean.Product; import com.bt.chains.bean.domain.Param; import com.bt.chains.constant.RegexConstants; @ApiObject(name = "EnterRandomCheckpointForm", description = "进入随机无限关卡") public class EnterRandomCheckpointForm extends Product { /** * */ private static final long serialVersionUID = -8158532761633093131L; @ApiObjectField(description = "用户id") @Min(1) int userId; @ApiObjectField(description = "职业id") @Min(1) int roleId; // @ApiObjectField(description = "魔法id列表") // List<Param> magicIds; @ApiObjectField(description = "武器id列表") List<Param> weaponIds; @ApiObjectField(description = "扣除类型,0-付费币;1-无限券") @Pattern(regexp=RegexConstants.PAY_TYPE) private String payType; public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public int getRoleId() { return roleId; } public void setRoleId(int roleId) { this.roleId = roleId; } // public List<Param> getMagicIds() { // return magicIds; // } // // public void setMagicIds(List<Param> magicIds) { // this.magicIds = magicIds; // } public String getPayType() { return payType; } public void setPayType(String payType) { this.payType = payType; } public List<Param> getWeaponIds() { return weaponIds; } public void setWeaponIds(List<Param> weaponIds) { this.weaponIds = weaponIds; } }
[ "liliang2005@gmail.com" ]
liliang2005@gmail.com
357379bf553d15b5453de05e90bb2d615819aea4
70123d8b25800e4a1743626822eb651c38513cd7
/libs/LeviathanScriptEngine/src/com/rift/dipforge/ls/parser/obj/NegationStatement.java
c2c98c1a58182fb4f16ce5e3af242459678c9ef6
[]
no_license
brettchaldecott/dipforge
bb9205cddaba60d61ab7f65b58c22a058264b698
ca2fe194156754d142fc48fdb8b963f37aa7c6a3
refs/heads/master
2021-03-19T12:14:25.926735
2016-01-22T12:06:22
2016-01-22T12:06:22
1,043,676
2
1
null
null
null
null
UTF-8
Java
false
false
2,974
java
/* * LeviathanScriptEngine: The implementation of the Leviathan script engin. * Copyright (C) 2012 2015 Burntjam * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * IncrementStatement.java */ // package path package com.rift.dipforge.ls.parser.obj; import java.io.Serializable; public class NegationStatement extends Statement implements Serializable { /** * The serial version for this object. */ private static final long serialVersionUID = 1L; private boolean negation = false; private Object term; /** * The default constructor for the negation statement */ public NegationStatement() { } /** * This method returns true if this is a negation. * * @return TRUE if a negation. */ public boolean isNegation() { return negation; } /** * This method sets the negation flag * * @param negation TRUE if negation FALSE if not. */ public void setNegation(boolean negation) { this.negation = negation; } /** * This method returns the reference to the term * * @return This method returns the reference to the term. */ public Object getTerm() { return term; } /** * This method sets the term * * @param term This method sets a reference to the term. */ public void setTerm(Object term) { this.term = term; } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((term == null) ? 0 : term.hashCode()); result = prime * result + (negation ? 1231 : 1237); return result; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NegationStatement other = (NegationStatement) obj; if (term == null) { if (other.term != null) return false; } else if (!term.equals(other.term)) return false; if (negation != other.negation) return false; return true; } /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { return "NegationStatement [negation=" + negation + ", increment=" + term + "]"; } }
[ "brett.chaldecott@gmail.com" ]
brett.chaldecott@gmail.com
3510d19c9dcaa51e68cfd68a2b53bcaf2192b335
f7b6ef06c7fee4985e8bba5edce208b3af0c13ab
/client/old/Android/src/com/legame/paysdk/utils/JsonParse.java
e980cef383e8e4f1de9d55b1404eefe7cf520c6b
[]
no_license
iNarcissuss/bird_pay_sdk
4d2bc9f4e9b11e4524c36fd3925f836e81ecf6d2
22bbcd36b72b2a125a92023039e6958647cca977
refs/heads/master
2021-01-15T09:56:33.799774
2016-06-26T13:54:09
2016-06-26T13:54:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
986
java
package com.legame.paysdk.utils; import java.util.Map; import com.google.gson.Gson; /** * 类说明: * @author xinhui.cheng * @date 2013-7-31 * @version 1.0 */ public class JsonParse { private static JsonParse instance; private JsonParse(){ } public static JsonParse getJsonParse(){ if(instance == null){ instance = new JsonParse(); } return instance; } /** * 根据给定的json字符串解析成给定的class * @param json json字符串 * @param classOfT 要返回的类 * @return */ public synchronized <T> T parseJson(String json, Class<T> classOfT) throws Exception{ T target = null; Gson gson = new Gson(); target = gson.fromJson(json, classOfT); return target; } /** * 将一个Map对象转换成Json字符串 * @param object * @return */ public String mapToJson(Map<String,Object> object){ String jsonStr = ""; Gson gson = new Gson(); jsonStr = gson.toJson(object); return jsonStr; } }
[ "fzcheng813@gmail.com" ]
fzcheng813@gmail.com
9df0b72ce2573cd2dae812c44a98f6f370e720f3
59fe7ffe79b1a9b19a3de859f0e65d0814abbb27
/app/src/main/java/com/auribises/cpdemogwb/UserContentProvider.java
14f9f1c833f41c79d05df6c1efcc20552cd6f586
[]
no_license
ishantk/CPDemoGWB
5f1a1027348bfa8a2393b2962b1b6226ffdb4351
124d49f3fd5b32a0be00a806bce6db0dc75b61e3
refs/heads/master
2021-01-01T15:47:30.015177
2017-07-21T09:42:05
2017-07-21T09:42:05
97,703,623
0
0
null
null
null
null
UTF-8
Java
false
false
2,494
java
package com.auribises.cpdemogwb; import android.content.ContentProvider; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.net.Uri; public class UserContentProvider extends ContentProvider { DBHelper dbHelper; SQLiteDatabase sqLiteDatabase; @Override public int delete(Uri uri, String selection, String[] selectionArgs) { String tabName = uri.getLastPathSegment(); int i = sqLiteDatabase.delete(tabName,selection,null); return i; } @Override public String getType(Uri uri) { // TODO: Implement this to handle requests for the MIME type of the data // at the given URI. throw new UnsupportedOperationException("Not yet implemented"); } @Override public Uri insert(Uri uri, ContentValues values) { String tabName = uri.getLastPathSegment(); long id = sqLiteDatabase.insert(tabName,null,values); Uri tempUri = Uri.parse("dummyuri/"+id); return tempUri; } @Override public boolean onCreate() { dbHelper = new DBHelper(getContext(),Util.DB_NAME,null,Util.DB_VERSION); sqLiteDatabase = dbHelper.getWritableDatabase(); return false; } @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { String tabName = uri.getLastPathSegment(); Cursor cursor = sqLiteDatabase.query(tabName,projection,null,null,null,null,null); return cursor; } @Override public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { String tabName = uri.getLastPathSegment(); int i = sqLiteDatabase.update(tabName,values,selection,null); return i; } class DBHelper extends SQLiteOpenHelper{ public DBHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) { super(context, name, factory, version); // Create the Database } @Override public void onCreate(SQLiteDatabase sqLiteDatabase) { sqLiteDatabase.execSQL(Util.CREATE_TAB_QUERY); // Create the Table } @Override public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) { } } }
[ "er.ishant@gmail.com" ]
er.ishant@gmail.com
d4f0dc60714222e29cf8ecbe05885b89321f0af3
4c43760ea88687b5c214d6604533fadf8705f175
/src/main/java/swap_nodes_in_pairs/SwapNodesInPairs.java
d2d7f2d16be43229a5f6f952e0e21e2b9d09213a
[]
no_license
garudareiga/leetcode-java
8fc38a7c756c42486b956a5510ce5438d0783af2
a2380ff51bd79c101e68b51f0e9b9ecefb01972d
refs/heads/master
2021-01-13T01:46:25.223509
2015-01-18T06:31:44
2015-01-18T06:31:44
25,180,097
0
0
null
null
null
null
UTF-8
Java
false
false
910
java
package swap_nodes_in_pairs; import util.ListNode; /** * * @author raychen * * Problem: * * Given a linked list, swap every two adjacent nodes and return its head. * * For example, * Given 1->2->3->4, you should return the list as 2->1->4->3. * * Your algorithm should use only constant space. You may not modify the * values in the list, only nodes itself can be changed. * */ public class SwapNodesInPairs { public ListNode swapPairs(ListNode head) { if (head == null) return head; ListNode dummy = new ListNode(0); dummy.next = head; ListNode prev = dummy, next = null; while (head != null && head.next != null) { next = head.next.next; prev.next = head.next; prev.next.next = head; head.next = next; prev = head; head = next; } return dummy.next; } }
[ "garudareiga@gmail.com" ]
garudareiga@gmail.com
ba6613d49bdda5f09157224092c7d6db34586d49
52965594f9c1276af99cf5ea21aeac3ad7420ece
/src/main/java/com/sunrun/emailanalysis/tool/uuid/JoyUUID.java
3e266bd5c0a1e07404500590100af2ab39a4e10e
[]
no_license
joyblack/email-analysis
cf1ddf0ae148a0bfe2c764397ccc6fd3ed690e33
400301ae9ec4f550bc0dde3663a423241ae05c15
refs/heads/master
2022-07-03T12:30:33.852702
2019-08-09T09:06:38
2019-08-09T09:06:38
201,047,274
0
0
null
null
null
null
UTF-8
Java
false
false
658
java
package com.sunrun.emailanalysis.tool.uuid; import java.util.Random; /** * 通过该类设置全局唯一ID */ public final class JoyUUID { private JoyUUID(){} private static class MyBuilder { private static final SnowflakeIdWorker snowflakeIdWorker; static{ Random random = new Random(); snowflakeIdWorker = new SnowflakeIdWorker((long)random.nextInt(31),(long)random.nextInt(31)); } } public static final SnowflakeIdWorker getInstance(){ return MyBuilder.snowflakeIdWorker; } public static synchronized Long getUUId(){ return getInstance().nextId(); } }
[ "1016037677@qq.com" ]
1016037677@qq.com
f9644c6ff68b53c86db04800864f64720ee7f250
2b4332d86e57a2f05a3e10cafad8ce30bf92e7d0
/Sources/com/webobjects/eointerface/EOMasterDetailAssociation.java
ff3613ba69a500b3bef9386beaa56713309a82a5
[]
no_license
rkiddy/Orange
7b600492957be4c5db03544b940ed86c6ed16d2b
167f48021144e5bea576276b2d30901b663c2b3d
refs/heads/master
2016-09-03T07:28:34.880134
2012-07-14T04:21:59
2012-07-14T04:21:59
2,116,939
0
0
null
null
null
null
UTF-8
Java
false
false
3,966
java
package com.webobjects.eointerface; /** * An EOMasterDetailAssociation object binds one EODisplayGroup (the detail) to a relationship in another (the master), so that the detail display group contains the destination objects for the object selected in the master. The display group's data sources also operate in a master-detail arrangement, meaning changes to one are immediately reflected in the other. In this arrangement, the detail EODisplayGroup's data source must be an EODetailDataSource. The detail objects are taken directly from the selected object in the master EODisplayGroup, so that changes to the objects in one EODisplayGroup are instantly reflected in the other. * In com.webobjects.eointerface.cocoa, by contrast, with an EOMasterPeerAssociation, the two EODisplayGroups are independent of each other. In a master-peer setup, insertions and deletions in the detail EODisplayGroup don't affect the corresponding relationship property of the selected object in the master EODisplayGroup. Master-peer setups are more appropriate when no insertions or deletions will be made in the detail EODisplayGroup. See the EOMasterPeerAssociation class specification for more information. * Usable With: EODisplayGroup with a null or detail datasource * Aspects parentAn EODisplayGroup with which the association's display group should be synchronized. * Suppose you have a master EODisplayGroup displaying Movie objects and a detail display group displaying Talent objects. The two display groups are bound to one another through Movie's directors relationship -- a to-many relationship from Movie to Talent. When a Movie is selected, you want the Talent display group to display the Talents who directed the Movie. Inserting a new director into the Talent display group should add the director to the selected Movie's directors relationship; and similarly, deleting a director from the Talent display group should remove the director from the selected Movie's directors relationship. * To do this, in Interface Builder, Control-drag a connection from the Talent display group to the Movie display group. In the Connections inspector, choose EOMasterDetailAssociation, and bind parent aspect to the directors key. */ public class EOMasterDetailAssociation extends com.webobjects.eointerface.EOMasterAssociation{ /** * Creates a new EOMasterDetailAssociation to monitor and update the objects in object, an EODisplayGroup. You normally set up associations with Interface Builder, in which case you don't need to create them programmatically. However, if you do create them up programmatically, setting them up is a multi-step process. After creating an association, you must bind its aspects and establish its connections. * Parameters:object - EODisplayGroup for this association to monitor and updateSee Also:EOAssociation.bindAspect(java.lang.String, com.webobjects.eointerface.EODisplayGroup, java.lang.String), EOAssociation.establishConnection() */ public EOMasterDetailAssociation(java.lang.Object object){ //TODO codavaj!! } /** * Clears all references this association has to other objects, especially its display object and EODisplayGroup. Call this method before nulling out a reference to this association to ensure it gets garbage collected properly. Subclasses should override this method to do any additional cleanup that may be needed and invoke super's implementation at the end. */ public void dispose(){ return; //TODO codavaj!! } /** * Returns true if object is an instance of EODisplayGroup and its data source is either null or an EODetailDataSource (EOControl). */ public boolean isUsableWithObject(java.lang.Object object){ return false; //TODO codavaj!! } /** * See the subjectChanged method description in the superclass EOAssociation. */ public void subjectChanged(){ return; //TODO codavaj!! } }
[ "ray@ganymede.org" ]
ray@ganymede.org
0d912ae8ac4d83d8d4bcc62cb4e2c22a2d19eceb
592b0e0ad07e577e2510723519c0c603d3eb2808
/src/main/java/com/jst/prodution/common/serviceBean/UBankCodeBean.java
1c425a62d72bc290a1ff94693b078f210479f26b
[]
no_license
huangleisir/api-js180323
494d7a1d9b07385fc95e9927195e70727e626e53
7cc5d16e12cbe6c56b48831bab3736e8477d7360
refs/heads/master
2021-04-15T05:25:32.061201
2018-06-30T15:12:31
2018-06-30T15:12:31
126,464,555
0
0
null
null
null
null
UTF-8
Java
false
false
1,510
java
package com.jst.prodution.common.serviceBean; import java.util.List; import com.jst.prodution.base.bean.BaseBean; import com.jst.prodution.common.model.UBankCodeModel; public class UBankCodeBean extends BaseBean{ /** * */ private static final long serialVersionUID = 1L; private String id; //银行编码 private String name; //名称 private String upid; //银行类别编码 private String code; //地区编码 private List<UBankCodeModel> ubank; public List<UBankCodeModel> getUbank() { return ubank; } public void setUbank(List<UBankCodeModel> ubank) { this.ubank = ubank; } /** * @return the id */ public String getId() { return id; } /** * @param id the id to set */ public void setId(String id) { this.id = id; } /** * @return the name */ public String getName() { return name; } /** * @param name the name to set */ public void setName(String name) { this.name = name; } /** * @return the upid */ public String getUpid() { return upid; } /** * @param upid the upid to set */ public void setUpid(String upid) { this.upid = upid; } /** * @return the code */ public String getCode() { return code; } /** * @param code the code to set */ public void setCode(String code) { this.code = code; } }
[ "lei.huang@jieshunpay.cn" ]
lei.huang@jieshunpay.cn
77df85210318b5ad62a2f7a297351884759017cd
9a8a10ff1a8ed5096eb10b3e9d78d25848a2bd0b
/src/gen/java/fakekube/io/model/IoK8sApiCoordinationV1LeaseList.java
ded87d05b2b4f4423a43dceee872cc71f25405cd
[ "Apache-2.0" ]
permissive
ahadas/fakekube
35264c83fea2a506e14420b046e471180423d9f4
0848aca921b0baa4678ea283ee1f744a72c2599c
refs/heads/master
2023-08-07T14:47:07.602617
2021-06-10T15:03:22
2021-06-10T15:03:22
233,591,593
4
2
Apache-2.0
2023-07-23T02:40:03
2020-01-13T12:34:57
Java
UTF-8
Java
false
false
5,965
java
package fakekube.io.model; import fakekube.io.model.IoK8sApiCoordinationV1Lease; import fakekube.io.model.IoK8sApimachineryPkgApisMetaV1ListMeta; import io.swagger.annotations.ApiModel; import java.util.ArrayList; import java.util.List; import javax.validation.constraints.*; import javax.validation.Valid; import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; /** * LeaseList is a list of Lease objects. **/ @ApiModel(description="LeaseList is a list of Lease objects.") public class IoK8sApiCoordinationV1LeaseList { @ApiModelProperty(value = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources") /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources **/ private String apiVersion = null; @ApiModelProperty(required = true, value = "Items is a list of schema objects.") @Valid /** * Items is a list of schema objects. **/ private List<IoK8sApiCoordinationV1Lease> items = new ArrayList<IoK8sApiCoordinationV1Lease>(); @ApiModelProperty(value = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") /** * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds **/ private String kind = null; @ApiModelProperty(value = "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata") @Valid /** * Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata **/ private IoK8sApimachineryPkgApisMetaV1ListMeta metadata = null; /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources * @return apiVersion **/ @JsonProperty("apiVersion") public String getApiVersion() { return apiVersion; } public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public IoK8sApiCoordinationV1LeaseList apiVersion(String apiVersion) { this.apiVersion = apiVersion; return this; } /** * Items is a list of schema objects. * @return items **/ @JsonProperty("items") @NotNull public List<IoK8sApiCoordinationV1Lease> getItems() { return items; } public void setItems(List<IoK8sApiCoordinationV1Lease> items) { this.items = items; } public IoK8sApiCoordinationV1LeaseList items(List<IoK8sApiCoordinationV1Lease> items) { this.items = items; return this; } public IoK8sApiCoordinationV1LeaseList addItemsItem(IoK8sApiCoordinationV1Lease itemsItem) { this.items.add(itemsItem); return this; } /** * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds * @return kind **/ @JsonProperty("kind") public String getKind() { return kind; } public void setKind(String kind) { this.kind = kind; } public IoK8sApiCoordinationV1LeaseList kind(String kind) { this.kind = kind; return this; } /** * Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * @return metadata **/ @JsonProperty("metadata") public IoK8sApimachineryPkgApisMetaV1ListMeta getMetadata() { return metadata; } public void setMetadata(IoK8sApimachineryPkgApisMetaV1ListMeta metadata) { this.metadata = metadata; } public IoK8sApiCoordinationV1LeaseList metadata(IoK8sApimachineryPkgApisMetaV1ListMeta metadata) { this.metadata = metadata; return this; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IoK8sApiCoordinationV1LeaseList {\n"); sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); sb.append(" items: ").append(toIndentedString(items)).append("\n"); sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private static String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "ahadas@redhat.com" ]
ahadas@redhat.com
655b4edf8a24d037f963d22f7148ce10e6d7984d
b4e0e50e467ee914b514a4f612fde6acc9a82ba7
/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BitComparator.java
995323aa2ac7b0c60e611fe9f343a22fc8d0a776
[ "Apache-2.0", "CPL-1.0", "MPL-1.0" ]
permissive
tenggyut/HIndex
5054b13118c3540d280d654cfa45ed6e3edcd4c6
e0706e1fe48352e65f9f22d1f80038f4362516bb
refs/heads/master
2021-01-10T02:58:08.439962
2016-03-10T01:15:18
2016-03-10T01:15:18
44,219,351
3
4
Apache-2.0
2023-03-20T11:47:22
2015-10-14T02:34:53
Java
UTF-8
Java
false
false
4,324
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.hadoop.hbase.filter; import com.google.protobuf.InvalidProtocolBufferException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.hbase.exceptions.DeserializationException; import org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos; /** * A bit comparator which performs the specified bitwise operation on each of the bytes * with the specified byte array. Then returns whether the result is non-zero. */ @InterfaceAudience.Public @InterfaceStability.Stable public class BitComparator extends ByteArrayComparable { /** Bit operators. */ @InterfaceAudience.Public @InterfaceStability.Stable public enum BitwiseOp { /** and */ AND, /** or */ OR, /** xor */ XOR } protected BitwiseOp bitOperator; /** * Constructor * @param value value * @param bitOperator operator to use on the bit comparison */ public BitComparator(byte[] value, BitwiseOp bitOperator) { super(value); this.bitOperator = bitOperator; } /** * @return the bitwise operator */ public BitwiseOp getOperator() { return bitOperator; } /** * @return The comparator serialized using pb */ public byte [] toByteArray() { ComparatorProtos.BitComparator.Builder builder = ComparatorProtos.BitComparator.newBuilder(); builder.setComparable(super.convert()); ComparatorProtos.BitComparator.BitwiseOp bitwiseOpPb = ComparatorProtos.BitComparator.BitwiseOp.valueOf(bitOperator.name()); builder.setBitwiseOp(bitwiseOpPb); return builder.build().toByteArray(); } /** * @param pbBytes A pb serialized {@link BitComparator} instance * @return An instance of {@link BitComparator} made from <code>bytes</code> * @throws DeserializationException * @see #toByteArray */ public static BitComparator parseFrom(final byte [] pbBytes) throws DeserializationException { ComparatorProtos.BitComparator proto; try { proto = ComparatorProtos.BitComparator.parseFrom(pbBytes); } catch (InvalidProtocolBufferException e) { throw new DeserializationException(e); } BitwiseOp bitwiseOp = BitwiseOp.valueOf(proto.getBitwiseOp().name()); return new BitComparator(proto.getComparable().getValue().toByteArray(),bitwiseOp); } /** * @param other * @return true if and only if the fields of the comparator that are serialized * are equal to the corresponding fields in other. Used for testing. */ boolean areSerializedFieldsEqual(ByteArrayComparable other) { if (other == this) return true; if (!(other instanceof BitComparator)) return false; BitComparator comparator = (BitComparator)other; return super.areSerializedFieldsEqual(other) && this.getOperator().equals(comparator.getOperator()); } @Override public int compareTo(byte[] value, int offset, int length) { if (length != this.value.length) { return 1; } int b = 0; //Iterating backwards is faster because we can quit after one non-zero byte. for (int i = length - 1; i >= 0 && b == 0; i--) { switch (bitOperator) { case AND: b = (this.value[i] & value[i+offset]) & 0xff; break; case OR: b = (this.value[i] | value[i+offset]) & 0xff; break; case XOR: b = (this.value[i] ^ value[i+offset]) & 0xff; break; } } return b == 0 ? 1 : 0; } }
[ "tengyutong0213@gmail.com" ]
tengyutong0213@gmail.com
2465eeebf49fa7b524cb95cfeea613e49be9fff9
e1b9f8dd7deeeb450dbae3a3af9deb1bbb62556f
/app/src/main/java/com/abt/app/viewmodel/SampleViewModel.java
3ba0b893f5da5010d40b1b5d78a2b385b8d8f74e
[]
no_license
AppBaseLib/MvvmBasicFrame
1e82304d76b62bd04788ab6c00678e80fa33d8ac
2f5676965532d0636a312ef9bb306abd14462e66
refs/heads/master
2020-03-19T04:31:27.540897
2019-01-06T23:34:04
2019-01-06T23:34:04
135,838,151
0
0
null
null
null
null
UTF-8
Java
false
false
873
java
package com.abt.app.viewmodel; import android.databinding.BaseObservable; import android.databinding.ObservableField; import com.abt.basic.arch.mvvm.view.INavigator; import com.abt.basic.arch.mvvm.viewmodel.IViewModel; /** * @描述: @SampleViewModel * @作者: @黄卫旗 * @创建时间: @2018/5/28 */ public class SampleViewModel extends BaseObservable implements IViewModel { public final ObservableField<String> text = new ObservableField<>(); private boolean flag = false; @Override public void initialize() { text.set("click me!!"); } @Override public void setNavigator(INavigator navigator) { } public void onClick() { if (flag) { flag = false; text.set("click me!!"); } else { flag = true; text.set("click again!!"); } } }
[ "askviky2010@gmail.com" ]
askviky2010@gmail.com
c1c20491442b3e092e298caf2d2f6a749407d33d
4bd2ddf7cd2b0e3e87c78d7d81d6df1c5bdc1cda
/xh5/x5-bpmx-root/modules/x5-bpmx-api/src/main/java/com/hotent/bpmx/api/service/handler/BpmIdentityHandler.java
698d96fe57afbc97ff46c221d4d15deaecef9a2a
[]
no_license
codingOnGithub/hx
27a873a308528eb968632bbf97e6e25107f92a9f
c93d6c23032ff798d460ee9a0efaba214594a6b9
refs/heads/master
2021-05-27T14:40:05.776605
2014-10-22T16:52:34
2014-10-22T16:52:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
969
java
package com.hotent.bpmx.api.service.handler; import java.util.List; import com.hotent.org.api.model.IdentityType; /** * * 描述:节点人员运算处理器接口,所有需要加入至节点的人员运算的方式均需要实现该节口, * 如按角色查找人员(BpmIdentityHandler) * 构建组:x5-bpmx-api * 作者:csx * 邮箱:chensx@jee-soft.cn * 日期:2013-11-11-下午5:46:00 * 版权:广州宏天软件有限公司版权所有 */ public interface BpmIdentityHandler { /** * 返回节点的用户类型 * @param setValue 用户的设置值字符串 * @return * List<UserType> * @exception * @since 1.0.0 */ public List<IdentityType> getNodeUsers(String setValue); /** * * Handler描述 * @return * String * @exception * @since 1.0.0 */ public String getDescription(); /** * Handler的识别名称 * @return * String * @exception * @since 1.0.0 */ public String getName(); }
[ "wang2009long@126.com" ]
wang2009long@126.com
e678683f13fa18e11bd76ef18115a35cfc4d5047
5adca47d426f1f90fd111a8e13421280ef8fc08e
/examples/src/main/java/httpfile/Test.java
cc53fcf873317276e6bc3ab267f6209e84f8f283
[]
no_license
xiaozhiliaoo/netty-practice
8d829657a7e30b2c96c2980553d54a7aaaf1a637
c236b9f211c291f81b1e1490c9b2fb0cba097f6b
refs/heads/master
2023-07-23T03:06:56.823662
2022-02-06T14:25:08
2022-02-06T14:25:08
248,139,147
1
0
null
2023-07-13T17:04:02
2020-03-18T04:34:59
Java
UTF-8
Java
false
false
788
java
package httpfile; import utils.HttpCallerUtils; import java.io.File; import java.io.FileOutputStream; import java.util.HashMap; import java.util.Map; public class Test { public static void main(String[] args) throws Exception{ Map<String, String> params = new HashMap<String, String>(); //发出http请求 byte[] ret = HttpCallerUtils.getStream("http://192.168.255.1:8765/socket/sources/a.doc", params); // byte[] ret = HttpProxy.get("http://192.168.1.111:8765/images/006.jpg"); //写出文件 String writePath = System.getProperty("user.dir") + File.separatorChar + "socket"+File.separatorChar+"receive" + File.separatorChar + "b.doc"; FileOutputStream fos = new FileOutputStream(writePath); fos.write(ret); fos.close(); } }
[ "lili@chainup.com" ]
lili@chainup.com
de501b885aee1645d4adc63c9e9ac46ade95c1ed
844e9c75db52be664ec1dfd0cef71bfa8f0bf0a9
/Zero/src/main/java/com/zero/ci/network/zrequest/conver/NetDialogImpl.java
86e3980a3e82a7d229c742398619d22a0323b9f6
[]
no_license
15814903830/XiYouSupport
0afd186566873121e4b850deebf6701773390169
6815921222a94559ab8a4c6191aec198f20aad6b
refs/heads/master
2020-07-16T08:42:33.674441
2019-09-17T09:25:38
2019-09-17T09:25:38
205,756,186
0
1
null
null
null
null
UTF-8
Java
false
false
2,415
java
package com.zero.ci.network.zrequest.conver; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.view.Gravity; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; import android.widget.TextView; import com.zero.ci.R; public class NetDialogImpl implements INetDialog { private LayoutInflater inflater; private WindowManager.LayoutParams lp; private TextView loadtext; private Dialog mDialog; @Override public void init(Context context) { mDialog = new Dialog(context, R.style.alert_dialog); inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.dialog_z_loading, null); loadtext = (TextView) layout.findViewById(R.id.z_custom_text_view); mDialog.setContentView(layout); // 设置window属性 lp = mDialog.getWindow().getAttributes(); lp.gravity = Gravity.CENTER; lp.dimAmount = 0; // 去背景遮盖 // lp.alpha = 1.0f;//透明效果 mDialog.getWindow().setAttributes(lp); } @Override public void show() { if (mDialog != null && !isShowing()) { mDialog.show(); } } @Override public void dismiss() { if (mDialog != null && isShowing()) { mDialog.dismiss(); } } @Override public boolean isShowing() { return mDialog.isShowing(); } @Override public void setCancelable(boolean flag) { if (!flag) { mDialog.setCancelable(false); mDialog.setOnKeyListener(new DialogInterface.OnKeyListener() { @Override public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_SEARCH) { dismiss(); return true; } else { return false; } } }); } } @Override public void setMessage(String... msg) { loadtext.setVisibility(View.VISIBLE); if (msg != null && msg.length != 0) { loadtext.setText(msg[0]); } } }
[ "1273258724@qq.com" ]
1273258724@qq.com
9dc28fedf19e65cb25d341806b9e14df463ef1d2
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/websearch/ui/WebSearchWebVideoViewControlBar$a.java
7b50dfc9c1c9088f87932e236223edd6cea2534c
[]
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
147
java
package com.tencent.mm.plugin.websearch.ui; public interface WebSearchWebVideoViewControlBar$a { int ajH(); int ajI(); int bIw(); }
[ "707194831@qq.com" ]
707194831@qq.com
a5fcbd247da1dc0e8d82ad73bd1000e7f7b411e9
e5bb4c1c5cb3a385a1a391ca43c9094e746bb171
/FMP/trunk/FMP/src/main/java/com/hzfh/fmp/controller/common/CommonAction.java
cc2c2bb63468f23287e6cc369c6c866438c4b109
[]
no_license
FashtimeDotCom/huazhen
397143967ebed9d50073bfa4909c52336a883486
6484bc9948a29f0611855f84e81b0a0b080e2e02
refs/heads/master
2021-01-22T14:25:04.159326
2016-01-11T09:52:40
2016-01-11T09:52:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,001
java
package com.hzfh.fmp.controller.common; import com.hzfh.api.baseInfo.model.Letter; import com.hzfh.api.permission.model.Element; import com.hzfh.fmp.model.baseInfo.LetterModel; import com.hzfh.fmp.model.common.PageAlias; import com.hzfh.fmp.model.common.TreeItem; import com.hzfh.fmp.model.common.TreeMenu; import com.hzfh.fmp.model.common.cache.CacheManager; import com.hzfh.fmp.model.common.cache.CachePrefix; import com.hzfh.fmp.model.common.helper.LogHelper; import com.hzfh.fmp.model.common.helper.UrlHelper; import com.hzfh.fmp.model.common.helper.UserHelper; import com.hzfh.fmp.model.common.resource.CssContext; import com.hzfh.fmp.model.common.resource.ScriptContext; import com.hzfh.fmp.model.employee.EmployeeModel; import com.hzfh.fmp.model.permission.ElementModel; import com.hzfh.fmp.model.permission.view.PagePermissionView; import org.apache.struts2.interceptor.ServletResponseAware; import javax.servlet.http.HttpServletResponse; import java.util.ArrayList; import java.util.List; /** * Created by paul on 14-12-24. */ public abstract class CommonAction extends BaseAction implements ServletResponseAware { private PageAlias pageAlias; private String pageHead = ""; private String navSub = "";//获取前台的导航子级 private List<String> nav;//面包屑导航 private String empName;//母版页的欢迎提示员工名称 private int empId; private String updatePwdUrl; private String logoutUrl; private String knowledgeBaseUrl; private String letterUrl; private String mailUrl; private String calendarUrl; private List<Letter> noticeList; private String remindUrl; public String getRemindUrl() { return remindUrl; } public String getLetterUrl() { return letterUrl; } public String getMailUrl() { return mailUrl; } public String getCalendarUrl() { return calendarUrl; } public List<Letter> getNoticeList() { return noticeList; } public void setNoticeList(List<Letter> noticeList) { this.noticeList = noticeList; } public String getKnowledgeBaseUrl() { return knowledgeBaseUrl; } public void setKnowledgeBaseUrl(String knowledgeBaseUrl) { this.knowledgeBaseUrl = knowledgeBaseUrl; } public String getLogoutUrl() { return logoutUrl; } public String getUpdatePwdUrl() { return updatePwdUrl; } public int getEmpId() { return empId; } public void setEmpId(int empId) { this.empId = empId; } //用response,来返回XML字符串 mengchong 2015/02/14 private HttpServletResponse response; private PagePermissionView pagePermissionView; public PagePermissionView getPagePermissionView() { return pagePermissionView; } public String getEmpName() { return empName; } public void setEmpName(String empName) { this.empName = empName; } public PageAlias getPageAlias() { return pageAlias; } public void setPageAlias(PageAlias pageAlias) { this.pageAlias = pageAlias; } public String getPageHead() { return pageHead; } public String getNavSub() { return navSub; } public void setNavSub(String navSub) { this.navSub = navSub; } public List<String> getNav() { return nav; } public void setNav(List<String> nav) { this.nav = nav; } public static final LogHelper logger = LogHelper.getLogger(CommonAction.class.getName()); private int letterListSize; public int getLetterListSize() { return letterListSize; } public void setLetterListSize(int letterListSize) { this.letterListSize = letterListSize; } private String baseUrl; public String getBaseUrl() { return baseUrl; } public void setBaseUrl(String baseUrl) { this.baseUrl = baseUrl; } @Override public String execute() throws Exception{ if (this.pageAlias != PageAlias.login && this.pageAlias != PageAlias.error && UserHelper.getUserCache() != null) { try { this.pagePermissionView = new PagePermissionView(String.valueOf(this.getPageAlias()), UserHelper.getUserCache().getRoleId()); } catch (Exception e) { e.printStackTrace(); } if (!pagePermissionView.isRead()){ this.setException("出错了!"); this.setExceptionStack("您可能没有权限"); return ERROR; } } //获取员工的姓名 if (UserHelper.getUserCache() != null) { this.empName = UserHelper.getUserCache().getEmpName(); this.empId = UserHelper.getUserCache().getEmpId(); } else { this.empName = ""; this.empId = 0; } String ret = super.execute(); if (!ret.equals(SUCCESS)) return ret; if (this.pageAlias.toString().isEmpty()) this.pageAlias = PageAlias.index; this.buildCss(); this.buildJs(); if(UserHelper.getUserCache()!=null){ List<TreeMenu> treeLists = (List<TreeMenu>) CacheManager.get(CachePrefix.MENUTREE, String.valueOf(UserHelper.getUserCache().getRoleId())+ "treeLists"); System.out.println(this.navSub); nav = new ArrayList<String>(); if (treeLists != null) { for (TreeMenu treeMenu : treeLists) { List<TreeItem> treeItems = treeMenu.getTreeItems(); boolean bFound = false; for (TreeItem treeItem : treeItems) { if (this.navSub.equals(treeItem.getName())) { this.nav.add(treeMenu.getName()); this.nav.add(this.navSub); bFound = true; break; } } if (bFound) break; } } this.letterListSize = LetterModel.getListLimitByEmpId(UserHelper.getUserCache().getUserId()).size(); } this.updatePwdUrl = UrlHelper.buildLoginSiteUrl("/updatePwd"); this.logoutUrl = UrlHelper.buildLoginSiteUrl("/logout"); this.knowledgeBaseUrl = UrlHelper.buildEmployeeSiteUrl("/employee/knowledgeBase/list"); this.calendarUrl = UrlHelper.buildBaseInfoSiteUrl("/baseInfo/calendar/list"); this.mailUrl = UrlHelper.buildBaseInfoSiteUrl("/baseInfo/mailList/list"); this.letterUrl = UrlHelper.buildBaseInfoSiteUrl("/baseInfo/letter/list"); this.remindUrl = UrlHelper.buildBaseInfoSiteUrl("/baseInfo/letter/remindList"); this.noticeList = LetterModel.getListByTime(); this.baseUrl = UrlHelper.buildBaseInfoSiteUrl("/index.action"); return SUCCESS; } private void buildJs() { StringBuilder stringBuilder = new StringBuilder(); try { List<String> scriptList = ScriptContext.getScriptByPageAlias(this.pageAlias); for (String script : scriptList) { stringBuilder.append(script); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } pageHead += stringBuilder.toString(); } private void buildCss() { StringBuilder stringBuilder = new StringBuilder(); for (String css : CssContext.getCssByPageAlias(this.pageAlias)) { stringBuilder.append(css); } //stringBuilder.append("<link type=\"text/css\" rel=\"stylesheet\" href=\""+ UrlHelper.buildCss("page.css")+"\">"); pageHead += stringBuilder.toString(); } /** * 向浏览器返回xml字符串 * * @param xml * @return * @throws Exception * @author mengchong 2015/02/14 */ public String xmlOut(String xml) throws Exception { response.setContentType("text/xml;charset=UTF-8"); response.getWriter().print(xml); return null; } public void setServletResponse(HttpServletResponse response) { this.response = response; } }
[ "ulei0343@163.com" ]
ulei0343@163.com
6d343d6b81fb9a73df0071616228980d379cc4f0
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava6/Foo410Test.java
4de918379e475671df47125e19e355d50c985ff4
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
package applicationModulepackageJava6; import org.junit.Test; public class Foo410Test { @Test public void testFoo0() { new Foo410().foo0(); } @Test public void testFoo1() { new Foo410().foo1(); } @Test public void testFoo2() { new Foo410().foo2(); } @Test public void testFoo3() { new Foo410().foo3(); } @Test public void testFoo4() { new Foo410().foo4(); } @Test public void testFoo5() { new Foo410().foo5(); } @Test public void testFoo6() { new Foo410().foo6(); } @Test public void testFoo7() { new Foo410().foo7(); } @Test public void testFoo8() { new Foo410().foo8(); } @Test public void testFoo9() { new Foo410().foo9(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
41957124e32fcee92e5edaf3e3bf7b7636b9edc2
fa51687f6aa32d57a9f5f4efc6dcfda2806f244d
/jdk8-src/src/main/java/javax/swing/plaf/nimbus/TableEditorPainter.java
0625bb01aef6470bfa666bfa4b51fff3a32d4c5a
[]
no_license
yida-lxw/jdk8
44bad6ccd2d81099bea11433c8f2a0fc2e589eaa
9f69e5f33eb5ab32e385301b210db1e49e919aac
refs/heads/master
2022-12-29T23:56:32.001512
2020-04-27T04:14:10
2020-04-27T04:14:10
258,988,898
0
1
null
2020-10-13T21:32:05
2020-04-26T09:21:22
Java
UTF-8
Java
false
false
4,073
java
/* * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing.plaf.nimbus; import javax.swing.*; import java.awt.*; import java.awt.geom.Ellipse2D; import java.awt.geom.Path2D; import java.awt.geom.Rectangle2D; import java.awt.geom.RoundRectangle2D; final class TableEditorPainter extends AbstractRegionPainter { //package private integers representing the available states that //this painter will paint. These are used when creating a new instance //of TableEditorPainter to determine which region/state is being painted //by that instance. static final int BACKGROUND_DISABLED = 1; static final int BACKGROUND_ENABLED = 2; static final int BACKGROUND_ENABLED_FOCUSED = 3; static final int BACKGROUND_SELECTED = 4; private int state; //refers to one of the static final ints above private PaintContext ctx; //the following 4 variables are reused during the painting code of the layers private Path2D path = new Path2D.Float(); private Rectangle2D rect = new Rectangle2D.Float(0, 0, 0, 0); private RoundRectangle2D roundRect = new RoundRectangle2D.Float(0, 0, 0, 0, 0, 0); private Ellipse2D ellipse = new Ellipse2D.Float(0, 0, 0, 0); //All Colors used for painting are stored here. Ideally, only those colors being used //by a particular instance of TableEditorPainter would be created. For the moment at least, //however, all are created for each instance. private Color color1 = decodeColor("nimbusLightBackground", 0.0f, 0.0f, 0.0f, 0); private Color color2 = decodeColor("nimbusFocus", 0.0f, 0.0f, 0.0f, 0); //Array of current component colors, updated in each paint call private Object[] componentColors; public TableEditorPainter(PaintContext ctx, int state) { super(); this.state = state; this.ctx = ctx; } @Override protected void doPaint(Graphics2D g, JComponent c, int width, int height, Object[] extendedCacheKeys) { //populate componentColors array with colors calculated in getExtendedCacheKeys call componentColors = extendedCacheKeys; //generate this entire method. Each state/bg/fg/border combo that has //been painted gets its own KEY and paint method. switch (state) { case BACKGROUND_ENABLED: paintBackgroundEnabled(g); break; case BACKGROUND_ENABLED_FOCUSED: paintBackgroundEnabledAndFocused(g); break; } } @Override protected final PaintContext getPaintContext() { return ctx; } private void paintBackgroundEnabled(Graphics2D g) { rect = decodeRect1(); g.setPaint(color1); g.fill(rect); } private void paintBackgroundEnabledAndFocused(Graphics2D g) { path = decodePath1(); g.setPaint(color2); g.fill(path); } private Rectangle2D decodeRect1() { rect.setRect(decodeX(0.0f), //x decodeY(0.0f), //y decodeX(3.0f) - decodeX(0.0f), //width decodeY(3.0f) - decodeY(0.0f)); //height return rect; } private Path2D decodePath1() { path.reset(); path.moveTo(decodeX(0.0f), decodeY(0.0f)); path.lineTo(decodeX(0.0f), decodeY(3.0f)); path.lineTo(decodeX(3.0f), decodeY(3.0f)); path.lineTo(decodeX(3.0f), decodeY(0.0f)); path.lineTo(decodeX(0.24000001f), decodeY(0.0f)); path.lineTo(decodeX(0.24000001f), decodeY(0.24000001f)); path.lineTo(decodeX(2.7600007f), decodeY(0.24000001f)); path.lineTo(decodeX(2.7600007f), decodeY(2.7599998f)); path.lineTo(decodeX(0.24000001f), decodeY(2.7599998f)); path.lineTo(decodeX(0.24000001f), decodeY(0.0f)); path.lineTo(decodeX(0.0f), decodeY(0.0f)); path.closePath(); return path; } }
[ "yida@caibeike.com" ]
yida@caibeike.com
9d3dee291010cf870b143f865d449d60f375dfc8
15db26be0ad4b136a7cef762a55c34bade56c9b8
/gwt-ol3-client/src/test/java/ol/interaction/DrawTest.java
84555dd8e0409979deca9066e779c45625a2bbf9
[ "Apache-2.0" ]
permissive
d-eggert/gwt-ol3
597d15e133927172f2ec34db52e70789311a95eb
72aca711641c9b02df58e7c41f776287e325e303
refs/heads/master
2021-04-28T09:40:03.125671
2018-02-23T14:54:19
2018-02-23T14:54:19
122,045,850
0
0
null
2018-02-19T10:15:41
2018-02-19T10:15:41
null
UTF-8
Java
false
false
1,321
java
/******************************************************************************* * Copyright 2014, 2016 gwt-ol3 * * 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 ol.interaction; import ol.GwtOL3BaseTestCase; import ol.Observable; /** * * @author Tino Desjardins * */ public class DrawTest extends GwtOL3BaseTestCase { public void testDraw() { injectUrlAndTest(() -> { DrawOptions drawOptions = new DrawOptions(); Draw draw = new Draw(drawOptions); assertNotNull(draw); assertTrue(draw instanceof Observable); assertTrue(draw instanceof Interaction); draw.setActive(true); }); } }
[ "tino.desjardins@arcor.de" ]
tino.desjardins@arcor.de
c05fba51197b6a8ba889fa244025cf51277ea510
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/s6/a/f/c.java
05a611337e5e60e0d654cce2a308bbd575a53835
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
603
java
package s6.a.f; import io.reactivex.annotations.NonNull; import io.reactivex.functions.Function3; public final class c implements Function3 { public final /* synthetic */ kotlin.jvm.functions.Function3 a; public c(kotlin.jvm.functions.Function3 function3) { this.a = function3; } /* JADX WARN: Failed to parse method signature: (TT1TT2TT3)TR */ @Override // io.reactivex.functions.Function3 @NonNull public final /* synthetic */ Object apply(@NonNull Object obj, @NonNull Object obj2, @NonNull Object obj3) { return this.a.invoke(obj, obj2, obj3); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
9727f71e6f294b076da252e8920a7731c8e68b29
14cbc686244d42b33e3963b3fd20e5e07ca0eaff
/value-fixture/src/org/immutables/fixture/SampleNesting.java
89e1645855afeb05bdd3017a64d572066a4e62d7
[ "Apache-2.0" ]
permissive
guilhermejccavalcanti/immutables
1cc4f7aebb3fbb0d84d65e14e121e2fc5212dd9a
2a143dbb783171988c066ac81dd0ce4281e38977
refs/heads/master
2020-03-25T05:47:32.735184
2018-08-07T14:38:04
2018-08-07T14:38:04
143,466,209
0
0
Apache-2.0
2018-08-03T19:35:07
2018-08-03T19:35:06
null
UTF-8
Java
false
false
814
java
/* Copyright 2014 Immutables Authors and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.immutables.fixture; import org.immutables.value.Value; @Value.Enclosing public class SampleNesting { @Value.Immutable interface A {} @Value.Immutable public static class B {} }
[ "e.lucash@gmail.com" ]
e.lucash@gmail.com
40793efdd417fa24696dfbb0495c6116d85cf8f4
50d4b171133e55d216d7cd45b204958a560cf0a7
/MiniJava/src/longbook/lexer/Word.java
31341f6b73e545963bd2946d00962839d6311345
[]
no_license
phlizik/MyStudy
52024c8f0ec4a77a2ecf237b3a6cd3ac716d590a
638309208e15ca3aae9925868c4842283937d78a
refs/heads/master
2020-06-17T15:16:02.966598
2018-04-20T11:17:28
2018-04-20T11:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
176
java
package longbook.lexer; public class Word extends Token { public final String lexeme; public Word(int t, String s) { super(t); lexeme = new String(s); } }
[ "zhaojian770627@163.com" ]
zhaojian770627@163.com
3a0d29e0e7b2e9ba4b0365ce39983fee38b3d12d
09cab16393de97786db35d5e10e0233a1ba7880a
/src/main/java/cn/edu/jxnu/leetcode/Leetcode_93_DFS.java
11ebeb328a02ab5cd757f612b0a7cfef462ed564
[ "Apache-2.0" ]
permissive
yangzaiqiong/cs-summary-reflection
ab6cc3289ad7c05e0a86ff69f93e2d135627c61b
3356520e44a0f892c72b37f93e6836f8422cd3ae
refs/heads/master
2020-07-11T22:41:00.549023
2019-08-26T15:45:04
2019-08-26T15:45:04
204,659,061
1
0
Apache-2.0
2019-08-27T16:42:01
2019-08-27T08:42:00
null
UTF-8
Java
false
false
1,588
java
package cn.edu.jxnu.leetcode; import java.util.ArrayList; import java.util.List; /** * @author 梦境迷离 * @description 给定一个只包含数字的字符串,复原它并返回所有可能的IP地址格式。 * * Given "25525511135", * * return ["255.255.11.135", "255.255.111.35"]. 我们可以不考虑数组内元素的顺序 * @time 2018年4月9日 */ public class Leetcode_93_DFS { public static void main(String[] args) { /** * 这里有效IP有点歧义,00不能匹配成0,即长度大于1的时候,前导零是不允许的 */ String ip = "25525511135"; System.out.println(new Leetcode_93_DFS().restoreIpAddresses(ip)); } public List<String> restoreIpAddresses(String s) { List<String> list = new ArrayList<String>(); if (s.length() > 12) return list; helper(s, list, 0, "", 0); return list; } private void helper(String s, List<String> list, int pos, String res, int sec) { // 找到了四个section,res=255.255.11.135 if (sec == 4 && pos == s.length()) { list.add(res); return; } // ip每个部分最大只有3位 for (int i = 1; i <= 3; i++) { // 最大值是9+3=12 【因为ip是12位数字】 if (pos + i > s.length()) { break; } // 临时section String section = s.substring(pos, pos + i); // 长度大于1,且开头为0,数值大于256的排除掉 if (section.length() > 1 && section.startsWith("0") || Integer.parseInt(section) >= 256) { break; } helper(s, list, pos + i, sec == 0 ? section : res + "." + section, sec + 1); } } }
[ "568845948@qq.com" ]
568845948@qq.com
4e32890b31246bfa989a1cc452797c6b65283892
06795e02529b42dd53d1cab2b777bdc81abd8c28
/java_project/service-modules/aibus-service-customer/src/main/java/com/wntime/customer/vo/InfoCompanyInitVo.java
ba40155d92a79a24293ebb5da20c2de7bbd2c33a
[]
no_license
malqch/aibus
34eacd5fca5560074234d02361acc9ab9c352283
a7cf5a0b6daa372ed860dc43d92c55fcde764eb9
refs/heads/master
2023-02-27T21:46:52.367551
2021-02-07T04:19:11
2021-02-07T04:19:11
336,689,379
0
0
null
null
null
null
UTF-8
Java
false
false
660
java
package com.wntime.customer.vo; import lombok.Getter; import lombok.Setter; import java.util.ArrayList; import java.util.Date; import java.util.List; @Setter @Getter public class InfoCompanyInitVo { private long busStationId; private String busStationName; private long busId; private String vinCode; private long companyLineId; private String companyLineName; private long companyId; private String companyName; private long areaId; private String areaName; private long parentAreaId; private String parentAreaName; public InfoCompanyInitVo() { } }
[ "15010893029@163.com" ]
15010893029@163.com
697d3ffdce3615dc6320e18f6a55b58998ac2c5c
3953a0fdfc7da2b47b81c48df0a398850f17da4a
/src/main/java/br/inf/portalfiscal/xsd/cte/retConsSitCTe_v300/TransformType.java
add396fe3fe52c41abac6fe9bff78cbf37456628
[]
no_license
tlmacedo/xsd_Nfe_Cte
83d34088ad063e04906c6c910ac4d501d560d65d
6b3eea5027cf2927323c4247c7c3c7a3349c8be0
refs/heads/main
2023-01-27T14:58:48.453452
2020-12-02T22:53:14
2020-12-02T22:53:14
318,008,134
0
0
null
null
null
null
UTF-8
Java
false
false
2,979
java
// // Este arquivo foi gerado pela Arquitetura JavaTM para Implementaxe7xe3o de Referxeancia (JAXB) de Bind XML, v2.3.1-b171012.0423 // Consulte <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a> // Todas as modificaxe7xf5es neste arquivo serxe3o perdidas apxf3s a recompilaxe7xe3o do esquema de origem. // Gerado em: 2020.06.27 xe0s 02:47:20 PM AMT // package br.inf.portalfiscal.xsd.cte.retConsSitCTe_v300; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Classe Java de TransformType complex type. * * <p>O seguinte fragmento do esquema especifica o contexFAdo esperado contido dentro desta classe. * * <pre> * &lt;complexType name="TransformType"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence maxOccurs="unbounded" minOccurs="0"&gt; * &lt;element name="XPath" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;/sequence&gt; * &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2000/09/xmldsig#}TTransformURI" /&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TransformType", propOrder = { "xPath" }) public class TransformType { @XmlElement(name = "XPath") protected List<String> xPath; @XmlAttribute(name = "Algorithm", required = true) protected String algorithm; /** * Gets the value of the xPath property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the xPath property. * * <p> * For example, to add a new item, do as follows: * <pre> * getXPath().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getXPath() { if (xPath == null) { xPath = new ArrayList<String>(); } return this.xPath; } /** * ObtxE9m o valor da propriedade algorithm. * * @return * possible object is * {@link String } * */ public String getAlgorithm() { return algorithm; } /** * Define o valor da propriedade algorithm. * * @param value * allowed object is * {@link String } * */ public void setAlgorithm(String value) { this.algorithm = value; } }
[ "tl.macedo@hotmail.com" ]
tl.macedo@hotmail.com
d33e17a3266b597eaf66b9e9adb9778015cde0f3
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2011-12-23/seasar2-2.4.45/s2-tiger/src/main/java/org/seasar/extension/jdbc/id/package-info.java
3b336b7c9e32098842297ffd7e340ae70b0cd860
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
744
java
/* * Copyright 2004-2011 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ /** * 識別子の自動生成機能を提供します。 */ package org.seasar.extension.jdbc.id;
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
d48abbb3d0a8ac230e4ada28e1d547db8ee77461
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_f1470740ede3d5ac69362b89126ad676dab9d8bf/Query/8_f1470740ede3d5ac69362b89126ad676dab9d8bf_Query_s.java
f40bbb2ed6d33f33e8f51d26184f5322ebd4554b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,901
java
/* * Copyright 2007-2012 The Europeana Foundation * * Licenced under the EUPL, Version 1.1 (the "Licence") and subsequent versions as approved * by the European Commission; * You may not use this work except in compliance with the Licence. * * You may obtain a copy of the Licence at: * http://joinup.ec.europa.eu/software/page/eupl * * Unless required by applicable law or agreed to in writing, software distributed under * the Licence is distributed on an "AS IS" basis, without warranties or conditions of * any kind, either express or implied. * See the Licence for the specific language governing permissions and limitations under * the Licence. */ package eu.europeana.corelib.definitions.solr.model; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.logging.Logger; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; import eu.europeana.corelib.definitions.solr.Facet; import eu.europeana.corelib.utils.StringArrayUtils; /** * @author Willem-Jan Boogerd <www.eledge.net/contact> */ public class Query implements Cloneable { private final Logger log = Logger.getLogger(getClass().getName()); /** * Default start parameter for Solr */ private static final int DEFAULT_START = 0; /** * Default number of items in the SERP */ private static final int DEFAULT_PAGE_SIZE = 12; private String query; private String[] refinements; private int start; private int pageSize; private Facet[] facets = Facet.values(); private List<String> allFacetList; private Map<String, String> parameters = new HashMap<String, String>(); private String queryType; private List<String> searchRefinements; private List<String> facetRefinements; private boolean produceFacetUnion = true; /** * CONSTRUCTORS */ public Query(String query) { this.query = query; start = DEFAULT_START; pageSize = DEFAULT_PAGE_SIZE; createAllFacetList(); } /** * GETTERS & SETTTERS */ public String getQuery() { return query; } public Query setQuery(String query) { this.query = query; return this; } public String[] getRefinements() { return getRefinements(false); } public String[] getRefinements(boolean useDividedRefinements) { if (!useDividedRefinements) { return refinements; } else { divideRefinements(); return (String[])ArrayUtils.addAll( searchRefinements.toArray(new String[searchRefinements.size()]), facetRefinements.toArray(new String[facetRefinements.size()]) ); } } public Query setRefinements(String... refinements) { if (refinements != null) { this.refinements = refinements.clone(); } else { this.refinements = StringArrayUtils.EMPTY_ARRAY; } return this; } public Query addRefinement(String refinement) { if (this.refinements == null) { this.refinements = StringArrayUtils.EMPTY_ARRAY; } this.refinements = (String[]) ArrayUtils.add(this.refinements, refinement); return this; } public Integer getStart() { return start; } public Query setStart(int start) { this.start = start; return this; } public int getPageSize() { return pageSize; } public Query setPageSize(int pageSize) { this.pageSize = pageSize; return this; } public Facet[] getFacets() { return facets; } public Query setFacets(Facet[] facets) { if (facets != null) { this.facets = facets.clone(); } else { this.facets = Facet.values(); } return this; } public Map<String, String> getParameters() { return parameters; } /** * Adds Solr parameters to the Query object * * @param key * The parameter name * @param value * The value of the parameter * @return * The Query object */ public Query setParameter(String key, String value) { parameters.put(key, value); return this; } @Override public Query clone() throws CloneNotSupportedException { return (Query) super.clone(); } public String toString() { List<String> params = new ArrayList<String>(); params.add("q=" + query); params.add("start=" + start); params.add("rows=" + pageSize); if (refinements != null) { for (String refinement : refinements) { params.add("qf=" + refinement); } } if (facets != null) { for (Facet facet : facets) { params.add("facet.field=" + facet); } } if (parameters != null) { for (Entry<String, String> parameter : parameters.entrySet()) { params.add(parameter.getKey() + "=" + parameter.getValue()); } } return StringUtils.join(params, "&"); } public String getQueryType() { return queryType; } public void setQueryType(String queryType) { this.queryType = queryType; } public boolean isProduceFacetUnion() { return produceFacetUnion; } public Query setProduceFacetUnion(boolean produceFacetUnion) { this.produceFacetUnion = produceFacetUnion; return this; } private void createAllFacetList() { allFacetList = new ArrayList<String>(); for (Facet facet : facets) { allFacetList.add(facet.toString()); } } public void divideRefinements() { searchRefinements = new ArrayList<String>(); facetRefinements = new ArrayList<String>(); if (refinements == null) { return; } Map<String, FacetCollector> register = new LinkedHashMap<String, FacetCollector>(); for (String facetTerm : refinements) { if (facetTerm.contains(":")) { int colon = facetTerm.indexOf(":"); String facetName = facetTerm.substring(0, colon); boolean isTagged = false; if (facetName.contains("!tag")) { facetName = facetName.replaceFirst("\\{!tag=.*?\\}", ""); isTagged = true; } if (!allFacetList.contains(facetName)) { searchRefinements.add(facetTerm); continue; } else { FacetCollector collector; if (register.containsKey(facetName)) { collector = register.get(facetName); } else { collector = new FacetCollector(facetName); register.put(facetName, collector); } if (isTagged && !collector.isTagged()) { collector.setTagged(true); } collector.addValue(facetTerm.substring(colon + 1)); } } else { searchRefinements.add(facetTerm); } } for (FacetCollector collector : register.values()) { facetRefinements.add(collector.toString()); } } private class FacetCollector { private boolean isTagged = true; private String name; private List<String> values = new ArrayList<String>(); public FacetCollector(String name) { this.name = name; } public boolean isTagged() { return isTagged; } public void setTagged(boolean isTagged) { this.isTagged = isTagged; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List<String> getValues() { return values; } public void setValues(List<String> values) { this.values = values; } public void addValue(String value) { if (name.equals(Facet.RIGHTS.name()) && value.endsWith("*")) { value = value.replace(":", "\\:").replace("/", "\\/"); } values.add(value); } public String toString() { StringBuilder sb = new StringBuilder(); if (isTagged) { sb.append("{!tag=").append(name).append("}"); } sb.append(name); sb.append(":"); if (values.size() > 1) { sb.append("("); sb.append(StringUtils.join(values, " OR ")); sb.append(")"); } else { sb.append(values.get(0)); } return sb.toString(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9781864e363bc568f90f51b4b89d026eb630024e
4bebc450d225f55eb67cf98c1a44b1f96ac764bf
/src/main/java/com/chaimm/rcmd/typehandler/EnumTypeHandler.java
0a3a1cbcae34264e09b71a27d8b92f6161a0ceaf
[ "Apache-2.0" ]
permissive
carsonshan/recommend
32e8f5b473c7242f27f081abce3740df287aaab3
55d80ad2ccb60bfb5d9bd00e45524140c6c9e3de
refs/heads/master
2020-04-11T11:13:13.443029
2018-03-08T02:12:30
2018-03-08T02:12:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,880
java
package com.chaimm.rcmd.typehandler; import com.chaimm.rcmd.entity.enumeration.BaseEnum; import com.chaimm.rcmd.util.EnumUtil; import org.apache.ibatis.type.BaseTypeHandler; import org.apache.ibatis.type.JdbcType; import java.sql.CallableStatement; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; /** * @author 大闲人柴毛毛 * @date 2017/11/4 下午7:50 * * @description 实现MyBatis中枚举与Integer的相互映射 */ public class EnumTypeHandler<E extends Enum<?> & BaseEnum> extends BaseTypeHandler<BaseEnum> { private Class<E> type; public EnumTypeHandler(Class<E> type) { if (type == null) { throw new IllegalArgumentException("Type argument cannot be null"); } this.type = type; } @Override public void setNonNullParameter(PreparedStatement ps, int i, BaseEnum parameter, JdbcType jdbcType) throws SQLException { ps.setInt(i, parameter.getCode()); } @Override public E getNullableResult(ResultSet rs, String columnName) throws SQLException { int code = rs.getInt(columnName); return rs.wasNull() ? null : codeOf(code); } @Override public E getNullableResult(ResultSet rs, int columnIndex) throws SQLException { int code = rs.getInt(columnIndex); return rs.wasNull() ? null : codeOf(code); } @Override public E getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { int code = cs.getInt(columnIndex); return cs.wasNull() ? null : codeOf(code); } private E codeOf(int code){ try { return EnumUtil.codeOf(type, code); } catch (Exception ex) { throw new IllegalArgumentException("Cannot convert " + code + " to " + type.getSimpleName() + " by code value.", ex); } } }
[ "350142639@qq.com" ]
350142639@qq.com
c4fb0778964be99dcced315056476eb1603debc2
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
/PMD/rev5929-6296/right-trunk-6296/src/net/sourceforge/pmd/lang/java/typeresolution/rules/SignatureDeclareThrowsException.java
3161bc51cc83b3c2ac73b829caceff219a8c22c4
[]
no_license
joliebig/featurehouse_fstmerge_examples
af1b963537839d13e834f829cf51f8ad5e6ffe76
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
refs/heads/master
2016-09-05T10:24:50.974902
2013-03-28T16:28:47
2013-03-28T16:28:47
9,080,611
3
2
null
null
null
null
UTF-8
Java
false
false
4,984
java
package net.sourceforge.pmd.lang.java.typeresolution.rules; import java.util.List; import net.sourceforge.pmd.PropertyDescriptor; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceType; import net.sourceforge.pmd.lang.java.ast.ASTConstructorDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTExtendsList; import net.sourceforge.pmd.lang.java.ast.ASTImplementsList; import net.sourceforge.pmd.lang.java.ast.ASTImportDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTName; import net.sourceforge.pmd.lang.java.rule.AbstractJavaRule; import net.sourceforge.pmd.lang.rule.properties.BooleanProperty; public class SignatureDeclareThrowsException extends AbstractJavaRule { private static final PropertyDescriptor ignoreJUnitCompletelyDescriptor = new BooleanProperty("IgnoreJUnitCompletely", "If true, all methods in a JUnit testcase may throw Exception", false, 1.0f); private boolean junitImported = false; @Override public Object visit(ASTClassOrInterfaceDeclaration node, Object data) { if (junitImported == true) { return super.visit(node, data); } ASTImplementsList impl = node.getFirstChildOfType(ASTImplementsList.class); if (impl != null && impl.jjtGetParent().equals(node)) { for (int ix = 0; ix < impl.jjtGetNumChildren(); ix++) { ASTClassOrInterfaceType type = (ASTClassOrInterfaceType) impl.jjtGetChild(ix); if (isJUnitTest(type)) { junitImported = true; return super.visit(node, data); } } } if (node.jjtGetNumChildren() != 0 && node.jjtGetChild(0).getClass().equals(ASTExtendsList.class)) { ASTClassOrInterfaceType type = (ASTClassOrInterfaceType) node.jjtGetChild(0).jjtGetChild(0); if (isJUnitTest(type)) { junitImported = true; return super.visit(node, data); } } return super.visit(node, data); } private boolean isJUnitTest(ASTClassOrInterfaceType type) { Class<?> clazz = type.getType(); if (clazz == null) { if ("junit.framework.Test".equals(type.getImage())) { return true; } } else if (isJUnitTest(clazz)) { return true; } else { while (clazz != null && !Object.class.equals(clazz)) { for(Class<?> intf : clazz.getInterfaces()) { if (isJUnitTest(intf)) { return true; } } clazz = clazz.getSuperclass(); } } return false; } private boolean isJUnitTest(Class<?> clazz) { return clazz.getName().equals("junit.framework.Test"); } @Override public Object visit(ASTImportDeclaration node, Object o) { if (node.getImportedName().indexOf("junit") != -1) { junitImported = true; } return super.visit(node, o); } @Override public Object visit(ASTMethodDeclaration methodDeclaration, Object o) { if (junitImported && isAllowedMethod(methodDeclaration)) { return super.visit(methodDeclaration, o); } checkExceptions(methodDeclaration, o); return super.visit(methodDeclaration, o); } private boolean isAllowedMethod(ASTMethodDeclaration methodDeclaration) { if (getBooleanProperty(ignoreJUnitCompletelyDescriptor)) { return true; } else { return methodDeclaration.getMethodName().equals("setUp") || methodDeclaration .getMethodName().equals("tearDown"); } } @Override public Object visit(ASTConstructorDeclaration constructorDeclaration, Object o) { checkExceptions(constructorDeclaration, o); return super.visit(constructorDeclaration, o); } private void checkExceptions(Node method, Object o) { List<ASTName> exceptionList = method.findDescendantsOfType(ASTName.class); if (!exceptionList.isEmpty()) { evaluateExceptions(exceptionList, o); } } private void evaluateExceptions(List<ASTName> exceptionList, Object context) { for (ASTName exception: exceptionList) { if (hasDeclaredExceptionInSignature(exception)) { addViolation(context, exception); } } } private boolean hasDeclaredExceptionInSignature(ASTName exception) { return exception.hasImageEqualTo("Exception") && isParentSignatureDeclaration(exception); } private boolean isParentSignatureDeclaration(ASTName exception) { Node parent = exception.jjtGetParent().jjtGetParent(); return parent instanceof ASTMethodDeclaration || parent instanceof ASTConstructorDeclaration; } }
[ "joliebig@fim.uni-passau.de" ]
joliebig@fim.uni-passau.de
b84f8a68776fad121bfb6564a1553e4dc430cf9a
7af846ccf54082cd1832c282ccd3c98eae7ad69a
/ftmap/src/main/java/taxi/nicecode/com/ftmap/generated/package_6/Foo113.java
550371d4babf24e23dd3c8ae5c3eebdb74b99755
[]
no_license
Kadanza/TestModules
821f216be53897d7255b8997b426b359ef53971f
342b7b8930e9491251de972e45b16f85dcf91bd4
refs/heads/master
2020-03-25T08:13:09.316581
2018-08-08T10:47:25
2018-08-08T10:47:25
143,602,647
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package taxi.nicecode.com.ftmap.generated.package_6; public class Foo113 { public void foo0(){ new Foo112().foo5(); } public void foo1(){ foo0(); } public void foo2(){ foo1(); } public void foo3(){ foo2(); } public void foo4(){ foo3(); } public void foo5(){ foo4(); } }
[ "1" ]
1
ea2d030d6ea96932efd104818b5302f4381cba59
718a8498e6da032fcdd976691ad07fb646bd9703
/test_5.14/Animal.java
55cda69bfb6199b5ea7d682be07f63db9e456bff
[]
no_license
Nineodes19/happy-end
716cb8026e5e9d1175ac068fdd866852a97f9494
07ec40c587f5247cd8e59e259c1c9dc14d1c488e
refs/heads/master
2022-07-13T05:53:10.808060
2020-10-24T15:18:36
2020-10-24T15:18:36
217,953,407
0
0
null
2022-06-21T04:03:12
2019-10-28T02:47:47
Java
UTF-8
Java
false
false
259
java
package code2; /** * @program:test_12.19 * @author: Nine_odes * @description: * @create:2019-12-19 19:11 */ public class Animal { protected String name; public void eat(String food){ System.out.println(this.name + "吃" + food); } }
[ "3100863513@qq.com" ]
3100863513@qq.com
0362c843578946ed1a62409ae2421b3cbf57b290
b97a9d99fbf4066469e64592065d6a62970d9833
/ares-core/data/src/com/aw/unity/query/FilterConstraint.java
0505f8a0f5b4a25b1b30a84023bba7b4eb66d392
[]
no_license
analyticswarescott/ares
2bacb8eaac612e36836f7138c4398b6560468a91
5ac8d4ed50ca749b52eafc6fe95593ff68b85b54
refs/heads/master
2020-05-29T16:08:56.917029
2016-11-11T21:11:02
2016-11-11T21:11:02
59,563,723
0
0
null
null
null
null
UTF-8
Java
false
false
959
java
package com.aw.unity.query; import java.util.Collection; import com.aw.unity.Field; /** * A single constraint (condition) on a filter. * * */ public interface FilterConstraint extends Filter { /** * @return The values set on this constraint */ public Collection<Object> getValues(); /** * @param values The values to set on this constraint */ public void setValues(Collection<Object> values); /** * @return The unity field associated with this constraint */ public Field getField(); /** * Set the unity field associated with this constraint * * @param field The unity field associated with this constraint */ public void setField(Field field); /** * @return The operator associated with this constraint */ public ConstraintOperator getOperator(); /** * @param not Whether the logic on the constraint is not'd (inverted) */ public void setNot(boolean not); }
[ "scott@analyticsware.com" ]
scott@analyticsware.com
3423f19bbdf25ad42bfde3676a9d960ab824d356
1c9589d4e3bc1523ba1e745a2155433e4bd4b85c
/src/com/javarush/test/level28/lesson15/big01/Aggregator.java
4a03ffa54bd7e6b79bf6722467216fb2a2eb7711
[]
no_license
Adeptius/JavaRushHomeWork
230a7dfd48b063bf7e62d5b50e7fc3f4b529fc0a
ee587724a7d579463d5deb5211b8e2f4bf902fdb
refs/heads/master
2020-05-22T06:42:56.780076
2019-09-12T15:43:25
2019-09-12T15:43:25
65,140,116
0
0
null
null
null
null
UTF-8
Java
false
false
895
java
package com.javarush.test.level28.lesson15.big01; import com.javarush.test.level28.lesson15.big01.model.HHStrategy; import com.javarush.test.level28.lesson15.big01.model.Model; import com.javarush.test.level28.lesson15.big01.model.MoikrugStrategy; import com.javarush.test.level28.lesson15.big01.model.Provider; import com.javarush.test.level28.lesson15.big01.view.HtmlView; /** * Created by Golem765 on 13.04.2016. */ public class Aggregator { public static void main(String[] args) { Provider provider = new Provider(new HHStrategy()); Provider provider1 = new Provider(new MoikrugStrategy()); HtmlView view = new HtmlView(); Model model = new Model(view, provider, provider1); Controller controller = new Controller(model); view.setController(controller); view.userCitySelectEmulationMethod(); } }
[ "adeptius@gmail.com" ]
adeptius@gmail.com
b67ed734c6ec408ccbfa88670dcda704cf89fed4
d225adc8aa5bd6a616c0aee2b4c73d4420abc4a2
/antlr-editing-plugins/antlr-language-formatting/src/main/java/org/nemesis/antlr/language/formatting/IndentToColonFormatting.java
c3c4aa92aeafc4d323264de98e27279e3d0176e9
[ "Apache-2.0" ]
permissive
piotrhoppe/ANTLR4-Plugins-for-NetBeans
969bf994f9cf317e31f180e2e6181f6c9063594c
f6b789d21ca9b933d6f9b0f1de46c5fc91b477d9
refs/heads/master
2023-03-21T19:04:52.226619
2021-03-17T16:52:36
2021-03-17T16:52:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,189
java
/* * Copyright 2016-2019 Tim Boudreau, Frédéric Yvon Vinet * * 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.nemesis.antlr.language.formatting; import com.mastfrog.function.IntBiPredicate; import static org.nemesis.antlr.ANTLRv4Lexer.*; import static org.nemesis.antlr.language.formatting.AntlrCounters.COLON_POSITION; import static org.nemesis.antlr.language.formatting.AntlrCounters.PARENS_DEPTH; import org.nemesis.antlr.language.formatting.config.AntlrFormatterConfig; import org.nemesis.antlr.language.formatting.config.ColonHandling; import com.mastfrog.antlr.utils.Criterion; import static org.nemesis.antlr.language.formatting.AntlrCounters.DISTANCE_TO_PRECEDING_SHARP; import static org.nemesis.antlr.language.formatting.AntlrCriteria.lineComments; import org.nemesis.antlrformatting.api.FormattingAction; import org.nemesis.antlrformatting.api.FormattingRules; import static org.nemesis.antlrformatting.api.SimpleFormattingAction.PREPEND_DOUBLE_NEWLINE; import static org.nemesis.antlrformatting.api.SimpleFormattingAction.PREPEND_SPACE; /** * * @author Tim Boudreau */ final class IndentToColonFormatting extends AbstractFormatter { IndentToColonFormatting(AntlrFormatterConfig config) { super(config); } protected boolean standaloneColon() { return config.getColonHandling() == ColonHandling.STANDALONE; } protected boolean newlineBeforeColon() { return config.getColonHandling() == ColonHandling.NEWLINE_BEFORE; } protected boolean colonThenNewline() { return config.getColonHandling() == ColonHandling.NEWLINE_AFTER; } @Override protected void rules(FormattingRules rules) { rules.whenInMode(grammarRuleModes, rls -> { if (standaloneColon()) { rls.onTokenType(COLON) .named("standalone-colon-newline") .priority(100) .format(prependNewlineAndIndent); rls.onTokenType(Criterion.ALWAYS) .wherePreviousTokenType(COLON) .named("newline-after-colon") .format(prependNewlineAndIndent); // rls.onTokenType(allIds.or(criteria.anyOf(LPAREN, STRING_LITERAL))) // .wherePreviousTokenTypeNot(AntlrCriteria.lineComments().or(criteria.anyOf(SEMI, LPAREN, ASSIGN))) // .priority(100) // .format(prependNewlineAndIndent); } else if (newlineBeforeColon()) { rls.withAdjustedPriority(100, rls2 -> { rls2.onTokenType(COLON) .named("newline-before-colon") .format(prependNewlineAndIndent); rls2.onTokenType(allIds.or(criteria.anyOf(LPAREN, STRING_LITERAL))) .named("ensure-space-after-anything-but-lincomment-semi-lparen-assign") .wherePreviousTokenTypeNot(lineComments().or(criteria.anyOf(SEMI, LPAREN, ASSIGN, RANGE))) .format(spaceOrWrap); }); } else if (colonThenNewline()) { rls.onTokenType(allIds.or(criteria.anyOf(LPAREN, STRING_LITERAL))) .named("ensure-space-after-anything-but-lincomment-semi-lparen-assign") .wherePreviousTokenTypeNot(lineComments().or(criteria.anyOf(SEMI, LPAREN, ASSIGN, RANGE))) .priority(100) .format(spaceOrWrap); rls.onTokenType(Criterion.ALWAYS) .wherePreviousTokenType(COLON) .named("always-newline-after-colon") .priority(140) .format(prependNewlineAndIndent); rls.onTokenType(COLON) .named("space-before-colon") .format(PREPEND_SPACE); } // XXX figure out what rule is capturing this in these next two // first place rls.onTokenType(ID) .whereNextTokenType(ASSIGN) .named("no-space-in-assign") .wherePreviousTokenType(LPAREN) .priority(120) .format(FormattingAction.EMPTY); rls.onTokenType(LPAREN) .named("no-spaces-in-empty-parens") .wherePreviousTokenType(RPAREN) .priority(120) .format(FormattingAction.EMPTY); rls.onTokenType(BEGIN_ARGUMENT, PARDEC_BEGIN_ARGUMENT, LEXER_CHAR_SET) .named("space-after-colon-before-arguments-and-charsets") .wherePreviousTokenType(COLON) .format(PREPEND_SPACE); rules.onTokenType(ruleOpeners) .named("space-or-wrap-after-or") .wherePreviousTokenType(OR) .format(spaceOrWrap); rules.onTokenType(LPAREN) .named("space-before-lparen-after-ebnf") .wherePreviousTokenType(STAR, PLUS, QUESTION, END_ARGUMENT, DOT) .format(spaceOrWrap); rules.onTokenType(ID).whereNextTokenType(ASSIGN) .named("space-before-assign-id") .wherePreviousTokenType(LPAREN) .format(spaceOrWrap); rules.onTokenType(allIds) .named("space-after-ebnfs") .wherePreviousTokenType(keywordsOrIds.or(criteria.anyOf(STAR, PLUS, QUESTION, END_ARGUMENT))) .format(PREPEND_SPACE); rls.onTokenType(OR) .named("outer-or-clauses-on-new-lines") .whenCombinationOf(PARENS_DEPTH).isLessThan(1).and(COLON_POSITION).isSet().then() .format(prependNewlineAndIndent); rls.onTokenType(OR) .named("space-or-wrap-nested-or-clauses") .whereNextTokenTypeNot(SEMI, RPAREN) .whenCombinationOf(PARENS_DEPTH).isGreaterThanOrEqualTo(1).and(COLON_POSITION).isSet() .then() .format(spaceOrWrap); rls.whenPreviousTokenType(SEMI, rl -> { rl.onTokenType(keywordsOrIds) .named("double-newline-on-id-after-semicolon") .format(PREPEND_DOUBLE_NEWLINE); }); rls.onTokenType(OR) .wherePreviousTokenType(STAR, PLUS, QUESTION, LEXER_CHAR_SET, STRING_LITERAL, RPAREN) .named("space-on-or-after-ebnf-and-similar") .format(spaceOrWrap); }); rules.onTokenType(SHARP) .named("space-before-label") .whereNextTokenType(ID) .wherePreviousTokenType(RPAREN) .format(PREPEND_SPACE); rules.onTokenType(OR) .wherePreviousTokenType(ID) .when(DISTANCE_TO_PRECEDING_SHARP) .isEqualTo(1) .priority(1) .named("newline-indent-after-alternative-label") .format(prependNewlineAndIndent); if (config.isSemicolonOnNewLineReallyEnabled()) { rules.onTokenType(SEMI) .named("semicolon-on-new-line") .whereModeTransition(IntBiPredicate.fromPredicates(grammarRuleModes, AntlrCriteria.mode(MODE_DEFAULT))) .priority(180) .format(prependNewlineAndIndent); } } }
[ "tim@timboudreau.com" ]
tim@timboudreau.com
155e84c464222c6e4b2674ae2b8a5faa6c3dd0bd
61da317a7f6ccb601bb6f301d28a0919fb4c08cc
/flyway-core/src/main/java/com/googlecode/flyway/core/dbsupport/postgresql/PostgreSQLSqlStatementBuilder.java
d299d3688fcaa8ef21713d85ac84c96e3ebdbcef
[ "Apache-2.0" ]
permissive
tototoshi/flyway
54c03c783bd0891c9b9fe3eb9aeadd6c99d89eb9
3008dae3e2f4280f624e40eaff4ca980ddb89f13
refs/heads/master
2021-12-14T09:54:23.765189
2013-04-06T17:34:49
2013-04-06T17:34:49
9,269,014
1
0
null
null
null
null
UTF-8
Java
false
false
1,412
java
/** * Copyright (C) 2010-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.googlecode.flyway.core.dbsupport.postgresql; import com.googlecode.flyway.core.dbsupport.SqlStatementBuilder; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * SqlStatementBuilder supporting PostgreSQL specific syntax. */ public class PostgreSQLSqlStatementBuilder extends SqlStatementBuilder { /** * Matches $$, $BODY$, $xyz123$, ... */ /*private -> for testing*/ static final String DOLLAR_QUOTE_REGEX = "\\$[A-Za-z0-9_]*\\$.*"; @Override protected String extractAlternateOpenQuote(String token) { Matcher matcher = Pattern.compile(DOLLAR_QUOTE_REGEX).matcher(token); if (matcher.find()) { return token.substring(matcher.start(), matcher.end()); } return null; } }
[ "business@axelfontaine.com" ]
business@axelfontaine.com
1f825e03287d99040c2e78fe48f1fd5136dbab07
4f590ef7c7cf013bd5564e5813ff3576443c841e
/lamp-tenant/lamp-tenant-entity/src/main/java/top/tangyh/lamp/tenant/enumeration/TenantTypeEnum.java
e018b33f625409f93975c9fcf360381a5091ca41
[ "Apache-2.0" ]
permissive
tongshiyang/lamp-cloud
3977702519403ee10c33682f727ac79d70f5092c
57b60948552b412dd3990f6e5e9b1de78aebcfbe
refs/heads/master
2023-07-28T17:38:20.837308
2021-09-14T01:36:04
2021-09-14T01:36:04
391,803,290
0
0
Apache-2.0
2021-09-14T01:36:07
2021-08-02T03:21:36
null
UTF-8
Java
false
false
1,393
java
package top.tangyh.lamp.tenant.enumeration; import top.tangyh.basic.base.BaseEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import java.util.stream.Stream; /** * <p> * 实体注释中生成的类型枚举 * 企业 * </p> * * @author zuihou * @date 2020-11-19 */ @Getter @AllArgsConstructor @NoArgsConstructor @ApiModel(value = "TenantTypeEnum", description = "类型-枚举") public enum TenantTypeEnum implements BaseEnum { /** * CREATE="创建" */ CREATE("创建"), /** * REGISTER="注册" */ REGISTER("注册"), ; @ApiModelProperty(value = "描述") private String desc; /** * 根据当前枚举的name匹配 */ public static TenantTypeEnum match(String val, TenantTypeEnum def) { return Stream.of(values()).parallel().filter(item -> item.name().equalsIgnoreCase(val)).findAny().orElse(def); } public static TenantTypeEnum get(String val) { return match(val, null); } public boolean eq(TenantTypeEnum val) { return val != null && eq(val.name()); } @Override @ApiModelProperty(value = "编码", allowableValues = "CREATE,REGISTER", example = "CREATE") public String getCode() { return this.name(); } }
[ "244387066@qq.com" ]
244387066@qq.com
2870d7c43b2a8de1f36e2c05df76c0ce0191796d
1ce518b09521578e26e79a1beef350e7485ced8c
/source/app/src/main/java/com/flipkart/android/utils/share/TwitterShare.java
c6a44c2cfc93da003003272e0f2626238532ed2c
[]
no_license
yash2710/AndroidStudioProjects
7180eb25e0f83d3f14db2713cd46cd89e927db20
e8ba4f5c00664f9084f6154f69f314c374551e51
refs/heads/master
2021-01-10T01:15:07.615329
2016-04-03T09:19:01
2016-04-03T09:19:01
55,338,306
1
1
null
null
null
null
UTF-8
Java
false
false
2,691
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.flipkart.android.utils.share; import android.app.Activity; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.Parcelable; import com.flipkart.android.utils.CustomDialog; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class TwitterShare { public TwitterShare() { } public static void share(String s, String s1, String s2, Activity activity, int i) { ArrayList arraylist; label0: { try { arraylist = new ArrayList(); Intent intent = new Intent("android.intent.action.SEND"); intent.setType("text/plain"); List list = activity.getPackageManager().queryIntentActivities(intent, 0); if (!list.isEmpty()) { Iterator iterator = list.iterator(); do { if (!iterator.hasNext()) { break; } ResolveInfo resolveinfo = (ResolveInfo)iterator.next(); Intent intent2 = new Intent("android.intent.action.SEND"); intent2.setType("text/plain"); if (resolveinfo.activityInfo.packageName.toLowerCase().contains(s) || resolveinfo.activityInfo.name.toLowerCase().contains(s)) { intent2.putExtra("android.intent.extra.TEXT", (new StringBuilder()).append(s1).append(" \n ").append(s2).toString()); intent2.setPackage(resolveinfo.activityInfo.packageName); arraylist.add(intent2); } } while (true); break label0; } } catch (Exception exception) { CustomDialog.showAlertMessage("Error", "Looks like your twitter app is not updated! Please update and try again.", false, activity); } return; } Intent intent1 = Intent.createChooser((Intent)arraylist.remove(0), "Select app to share"); intent1.putExtra("android.intent.extra.INITIAL_INTENTS", (Parcelable[])arraylist.toArray(new Parcelable[0])); activity.startActivityForResult(intent1, i); return; } }
[ "13bce123@nirmauni.ac.in" ]
13bce123@nirmauni.ac.in