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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b1b82fc6ef83e2e0f9345a4dc3860a9051808c40 | 62b8441631f0d262bf59e7e2451a88603915aadf | /.svn/pristine/b1/b1b82fc6ef83e2e0f9345a4dc3860a9051808c40.svn-base | 61b02c2a3cb93fb127a457b8e5f2108742bd6f3d | [] | no_license | WJtoy/mainHousehold- | 496fc5af19657d938324d384f2d0b72d70e60c0e | 4cff9537a5f78058a84d4b33f5f58595380597d8 | refs/heads/master | 2023-06-17T22:55:08.988873 | 2021-07-15T07:18:25 | 2021-07-15T07:18:25 | 385,202,403 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,023 | package com.wolfking.jeesite.modules.mq.service.servicepoint;
import com.google.common.collect.Maps;
import com.wolfking.jeesite.common.exception.OrderException;
import com.wolfking.jeesite.common.utils.DateUtils;
import com.kkl.kklplus.utils.StringUtils;
import com.wolfking.jeesite.modules.mq.dto.MQOrderServicePointMessage;
import com.wolfking.jeesite.modules.mq.entity.mapper.OrderServicePointMessageMapper;
import com.wolfking.jeesite.modules.sd.entity.OrderServicePoint;
import com.wolfking.jeesite.modules.sd.service.OrderServicePointService;
import com.wolfking.jeesite.modules.sys.entity.User;
import org.mapstruct.factory.Mappers;
import java.util.Map;
/**
* 修改用户信息,包含电话,地址
* @autor Ryan Lu
* @date 2019/3/23 11:00
*/
public class UpdateUserInfoExecutor extends ServicePointExecutor {
public UpdateUserInfoExecutor(OrderServicePointService service) {
this.service = service;
}
// 处理方法,更新数据
public void process(MQOrderServicePointMessage.ServicePointMessage message){
if(!checkBaseParameters(message)){
return;
}
if(message.getUserInfo() == null
|| ( StringUtils.isBlank(message.getUserInfo().getPhone())
&& StringUtils.isBlank(message.getUserInfo().getAddress()) ) ) {
//无跟新内容
return;
}
Map<String,Object> params = Maps.newHashMapWithExpectedSize(5);
params.put("orderId",message.getOrderId());
params.put("quarter",message.getQuarter());
if(StringUtils.isNotBlank(message.getUserInfo().getPhone())){
params.put("servicePhone",StringUtils.left(StringUtils.trimToNull(message.getUserInfo().getPhone()),11));
}
if(StringUtils.isNotBlank(message.getUserInfo().getAddress())){
params.put("serviceAddress",StringUtils.left(StringUtils.trimToNull(message.getUserInfo().getAddress()),11));
}
this.service.updateByOrder(params);
}
}
| [
"1227679550@qq.com"
] | 1227679550@qq.com | |
3337f2a981a2600ff9fa29b0d5b8535fe109a275 | 62a1719c9c932db99334dc937e71365fb732b363 | /com/fasterxml/jackson/annotation/JsonMerge.java | 67d33fa53f5f3cadd13950d4214cd496eb2722d6 | [] | no_license | GamerHun1238/liambuddy | 37fd77c6ff81752e87e693728e12a27c368b9f25 | a1a9a319dc401c527414c850f11732b431e75208 | refs/heads/main | 2023-06-12T10:12:15.787917 | 2021-07-06T17:14:56 | 2021-07-06T17:14:56 | 383,539,574 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 522 | java | package com.fasterxml.jackson.annotation;
import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({java.lang.annotation.ElementType.ANNOTATION_TYPE, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotation
public @interface JsonMerge
{
OptBoolean value() default OptBoolean.TRUE;
}
| [
"gamerhun1253@gmail.com"
] | gamerhun1253@gmail.com |
dfbaa6dbae611d99640c9bc196c59b09b1b611ab | bb7f8a1b64fdeb1d374022c0d24e975178cbf4c7 | /app/src/main/java/com/yuejian/meet/activities/message/CityACtivity.java | 85829ed544a31b942e75c2beb1a6941d27d91461 | [] | no_license | er-rousy/meet-andoid | 09c746c8c1b0e8ea82745616866efea333f9e76b | bd4e5b36be2c67360240ba7852ad9299b2759cd9 | refs/heads/master | 2022-03-30T04:09:32.832225 | 2020-01-08T01:24:17 | 2020-01-08T01:24:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,764 | java | package com.yuejian.meet.activities.message;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.google.gson.Gson;
import com.yuejian.meet.R;
import com.yuejian.meet.activities.base.BaseActivity;
import com.yuejian.meet.adapters.CityAdapter;
import com.yuejian.meet.api.DataIdCallback;
import com.yuejian.meet.bean.CityBean;
import com.yuejian.meet.utils.ViewInject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import butterknife.Bind;
import butterknife.ButterKnife;
public class CityACtivity extends BaseActivity {
@Bind(R.id.back)
ImageView back;
@Bind(R.id.list)
RecyclerView list;
List<String> datas = new ArrayList<>();
CityAdapter cityAdapter;
@Bind(R.id.select_lay)
LinearLayout selectLay;
@Bind(R.id.tips)
TextView tips;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_city);
ButterKnife.bind(this);
initView();
getCity();
}
private void getCity() {
Map<String, Object> params = new HashMap<>();
params.put("province", getIntent().getStringExtra("province"));
apiImp.acquireCity(params, this, new DataIdCallback<String>() {
@Override
public void onSuccess(String data, int id) {
CityBean bean = new Gson().fromJson(data, CityBean.class);
for (int i = 0; i < bean.getData().size(); i++) {
datas.add(bean.getData().get(i).getCity());
cityAdapter.notifyDataSetChanged();
}
}
@Override
public void onFailed(String errCode, String errMsg, int id) {
ViewInject.shortToast(CityACtivity.this, errMsg);
}
});
}
private void initView() {
selectLay.setVisibility(View.GONE);
tips.setText("选择城市");
cityAdapter = new CityAdapter(this, datas);
list.setLayoutManager(new LinearLayoutManager(this));
list.setAdapter(cityAdapter);
cityAdapter.setClick(new CityAdapter.OnClick() {
@Override
public void click(int position) {
Intent intent = new Intent();
intent.putExtra("city", datas.get(position));
setResult(RESULT_OK, intent);
finish();
}
});
back.setOnClickListener(v -> finish());
}
}
| [
"http://192.168.0.254:3000/Fred/meet-andoid.git"
] | http://192.168.0.254:3000/Fred/meet-andoid.git |
d65f57b029630bb60fd8e7ee6712ae5daebc18b0 | 5f7866af6535d6fa27cb4cdc209b9d1afc7fbd7e | /src/com/massivecraft/massivecore/command/type/convert/TypeConverterFireworkEffectType.java | 5856368b760834e7cd121fb99fb9ce684dd7b840 | [] | no_license | ulumulu1510/MassiveCore | d62d0613266e4b04ac8144590bd781025aca4189 | 145a9e5054b0f9da1d24e87946a910c390f648af | refs/heads/master | 2020-12-26T00:18:14.241707 | 2017-02-23T21:38:37 | 2017-02-23T21:38:47 | 27,668,178 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 962 | java | package com.massivecraft.massivecore.command.type.convert;
import org.bukkit.FireworkEffect.Type;
import com.massivecraft.massivecore.command.type.enumeration.TypeFireworkEffectType;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.item.ConverterFromFireworkEffectType;
import com.massivecraft.massivecore.item.ConverterToFireworkEffectType;
public class TypeConverterFireworkEffectType extends TypeConverter<Type, String>
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static TypeConverterFireworkEffectType i = new TypeConverterFireworkEffectType();
public static TypeConverterFireworkEffectType get() { return i; }
public TypeConverterFireworkEffectType()
{
super(TypeFireworkEffectType.get(), TypeString.get(), ConverterFromFireworkEffectType.get(), ConverterToFireworkEffectType.get());
}
}
| [
"olof@sylt.nu"
] | olof@sylt.nu |
ffdc7bd0d3d89b3c17a58ba5d4d4f27e77ae2644 | 093f97eeda83ddde5dd7425af6f3b918d7bdfb13 | /experimental/lod/src/main/java/harmony/lod/model/impl/symbol/IRIImpl.java | 31be15cf0a10e5fd7d34594864ff1685249bdc8b | [] | no_license | enridaga/harmony | 816f599c058895c0b628b33a0da226864d7341f6 | 96fcafbe4d298bdf234867315e879e88196b7c9f | refs/heads/master | 2022-11-26T13:22:11.179280 | 2022-11-20T17:28:00 | 2022-11-20T17:28:00 | 53,848,687 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 685 | java | package harmony.lod.model.impl.symbol;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import harmony.lod.model.api.symbol.IRI;
public class IRIImpl implements IRI {
private String iri = null;
public IRIImpl(String iri){
this.iri = iri;
}
@Override
public String toString(){
return iri;
}
public String getSignature(){
StringBuilder sb = new StringBuilder();
return sb.append("<").append(iri).append(">").toString();
}
public boolean equals(Object o){
if(o instanceof IRI){
return o.toString().equals(toString());
}
return false;
}
public int hashCode(){
return new HashCodeBuilder(17, 31).append(getSignature()).toHashCode();
}
}
| [
"enricodaga@gmail.com"
] | enricodaga@gmail.com |
293a8fd0330af5015dce3aa8d75653e09120394c | e9d1c1d8a396fe72544c12bfc4982e19e4c4421e | /IOCProj59-LayeredApp(Service+DAO+BO+VO+DTO)100pCode/src/com/nt/config/BeanConfigurator.java | de54a5daf3d3374a3ee26a0833969d353b7685f5 | [] | no_license | sachinkrande/springpoc | 127c49a586fe2b42d6c6cf8ac3e2a7e732f99b89 | e0c8aba3bca0f32080dacbbbcd3176d07db210b8 | refs/heads/master | 2020-04-02T17:48:00.359529 | 2018-06-25T07:41:11 | 2018-06-25T07:41:11 | 154,671,952 | 1 | 0 | null | 2018-10-25T13:02:19 | 2018-10-25T13:02:19 | null | UTF-8 | Java | false | false | 1,202 | java | package com.nt.config;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
@Configuration
@ComponentScan(basePackages={"com.nt.dao","com.nt.service","com.nt.controller"})
@PropertySource(value="classpath:com/nt/commons/jdbc.properties")
public class BeanConfigurator {
@Autowired
private Environment env;
@Bean(name="drds")
public DataSource createDataSource(){
DriverManagerDataSource ds=null;
ds=new DriverManagerDataSource();
ds.setDriverClassName(env.getRequiredProperty("jdbc.driver"));
ds.setUrl(env.getProperty("jdbc.url"));
ds.setUsername(env.getProperty("jdbc.user"));
ds.setPassword(env.getProperty("jdbc.pwd"));
return ds;
}
}
| [
"you@example.com"
] | you@example.com |
7d1b39c50d6cbbdb80bb1a37ba89942eef03f2b0 | ac6ea9302cc62a07dca25662c720115833371bf8 | /ch10/src/p260/Outer.java | 45c0475d5255bd4f55642b88bb7272dea477a5f6 | [] | no_license | kimhalyn/Java | c2f54301540cef94f9fa7ff954784d6c985d042e | ceaa21390b963b629c004d598b1c777bc360e4e7 | refs/heads/master | 2023-06-07T12:59:42.137817 | 2021-07-01T04:33:03 | 2021-07-01T04:33:03 | 311,218,125 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 205 | java | package p260;
public class Outer {
interface InterfaceEx{
void method();
}
InterfaceEx ie;
void setInterfaceEx(InterfaceEx ie) {
this.ie = ie;
}
void outerMethod() {
ie.method();
}
}
| [
"reedweed@naver.com"
] | reedweed@naver.com |
c661d6503f870a06f66f5708dde79b08d4192316 | 7e1511cdceeec0c0aad2b9b916431fc39bc71d9b | /flakiness-predicter/input_data/original_tests/wildfly-wildfly/nonFlakyMethods/org.wildfly.clustering.ee.infinispan.InfinispanBatcherTestCase-createNestedBatchDiscard.java | 4ceb81a69eb2991975cae463cbd14c349e05ab90 | [
"BSD-3-Clause"
] | permissive | Taher-Ghaleb/FlakeFlagger | 6fd7c95d2710632fd093346ce787fd70923a1435 | 45f3d4bc5b790a80daeb4d28ec84f5e46433e060 | refs/heads/main | 2023-07-14T16:57:24.507743 | 2021-08-26T14:50:16 | 2021-08-26T14:50:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 993 | java | @Test public void createNestedBatchDiscard() throws Exception {
Transaction tx=mock(Transaction.class);
ArgumentCaptor<Synchronization> capturedSync=ArgumentCaptor.forClass(Synchronization.class);
when(this.tm.getTransaction()).thenReturn(tx);
try (TransactionBatch outerBatch=this.batcher.createBatch()){
verify(this.tm).begin();
verify(tx).registerSynchronization(capturedSync.capture());
reset(this.tm);
assertSame(tx,outerBatch.getTransaction());
when(tx.getStatus()).thenReturn(Status.STATUS_ACTIVE);
when(this.tm.getTransaction()).thenReturn(tx);
try (TransactionBatch innerBatch=this.batcher.createBatch()){
verify(this.tm,never()).begin();
innerBatch.discard();
}
verify(tx,never()).commit();
verify(tx,never()).rollback();
}
finally {
capturedSync.getValue().afterCompletion(Status.STATUS_ROLLEDBACK);
}
verify(tx).rollback();
verify(tx,never()).commit();
assertNull(InfinispanBatcher.getCurrentBatch());
}
| [
"aalsha2@masonlive.gmu.edu"
] | aalsha2@masonlive.gmu.edu |
c9fd70354602fe8beac9730b1b6c6e8ac06153af | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/89/org/apache/commons/math/util/MathUtils_sinh_1202.java | 0bdb7cb4f80e2d8a074b3acf87ed729ad7a12f10 | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,680 | java |
org apach common math util
addit built function link math
version revis date
math util mathutil
return href http mathworld wolfram hyperbol sine hyperbolicsin html
hyperbol sine
param find hyperbol sine
hyperbol sine
sinh
math exp math exp
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
cb67a3c6f73d4f59948e3a74e4ae96dfdea47321 | 0429ec7192a11756b3f6b74cb49dc1ba7c548f60 | /src/main/java/com/linkage/module/itms/resource/dao/RecycleDevRateDAO.java | 68b1ecd3c5ce01994be41a329401430d644d5d59 | [] | no_license | lichao20000/WEB | 5c7730779280822619782825aae58506e8ba5237 | 5d2964387d66b9a00a54b90c09332e2792af6dae | refs/heads/master | 2023-06-26T16:43:02.294375 | 2021-07-29T08:04:46 | 2021-07-29T08:04:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,428 | java |
package com.linkage.module.itms.resource.dao;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.springframework.jdbc.core.RowMapper;
import com.linkage.commons.db.PrepareSQL;
import com.linkage.commons.util.StringUtil;
import com.linkage.litms.common.database.DBOperation;
import com.linkage.litms.common.util.DateTimeUtil;
import com.linkage.module.gwms.Global;
import com.linkage.module.gwms.dao.SuperDAO;
/**
* 回收终端使用率
* @author 岩 (Ailk No.)
* @version 1.0
* @since 2016-4-26
* @category com.linkage.module.itms.resource.dao
* @copyright Ailk NBS-Network Mgt. RD Dept.
*/
public class RecycleDevRateDAO extends SuperDAO
{
private int queryCount;
/**
* 获取回收终端使用数
* @author 岩
* @date 2016-4-26
* @param cityId
* @param starttime
* @param endtime
* @return
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public Map<String, String> getRecycleDevCount(String cityId, String starttime, String endtime)
{
PrepareSQL psql = new PrepareSQL();
psql.append("select city_id,count(1) recycleDevcount from tab_gw_recoverlist");
psql.append(" where revert_time>=? and revert_time<=? and is_recover = 1 and is_used =1 ");
psql.append(" and city_id in (select city_id from tab_city where city_id=? or parent_id=?) group by city_id");
psql.setLong(1, new Long(starttime));
psql.setLong(2, new Long(endtime));
psql.setString(3, cityId);
psql.setString(4, cityId);
Map map = DBOperation.getMap(psql.getSQL(), "proxool.xml-report" );
Map<String, String> resultMap = new ConcurrentHashMap<String, String>();
resultMap.putAll(map);
return resultMap;
}
/**
* 获取江苏省中心回收终端使用数
* @author 岩
* @date 2016-4-26
* @param starttime
* @param endtime
* @return
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public Map<String, String> getRecycleDevCountFor00( String starttime, String endtime)
{
PrepareSQL psql = new PrepareSQL();
psql.append("select city_id, count(1) recycleDevcount from tab_gw_recoverlist");
psql.append(" where revert_time>=? and revert_time<=? and city_id <> null and is_recover = 1 and is_used =1 ");
psql.append(" group by city_id");
psql.setLong(1, new Long(starttime));
psql.setLong(2, new Long(endtime));
Map map = DBOperation.getMap(psql.getSQL(), "proxool.xml-report" );
Map<String, String> resultMap = new ConcurrentHashMap<String, String>();
resultMap.putAll(map);
return resultMap;
}
/**
* 获取江苏省中心回收终端总数
* @author 岩
* @date 2016-4-26
* @param starttime
* @param endtime
* @return
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public Map<String, String> getTotalCountFor00(String starttime, String endtime)
{
PrepareSQL psql = new PrepareSQL();
psql.append("select city_id, count(1) totalCount from tab_gw_recoverlist");
psql.append(" where revert_time>=? and revert_time<=? and city_id <> null and is_recover = 1 ");
psql.append(" group by city_id");
psql.setLong(1, new Long(starttime));
psql.setLong(2, new Long(endtime));
Map map = DBOperation.getMap(psql.getSQL(), "proxool.xml-report" );
Map<String, String> resultMap = new ConcurrentHashMap<String, String>();
resultMap.putAll(map);
return resultMap;
}
/**
* 获取回收终端总数
* @author 岩
* @date 2016-4-26
* @param cityId
* @param starttime
* @param endtime
* @return
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public Map<String, String> getTotalCount(String cityId, String starttime, String endtime)
{
PrepareSQL psql = new PrepareSQL();
psql.append("select city_id, count(1) totalCount from tab_gw_recoverlist");
psql.append(" where revert_time>=? and revert_time<=? and is_recover = 1 ");
psql.append(" and city_id in (select city_id from tab_city where city_id=? or parent_id=?) group by city_id");
psql.setLong(1, new Long(starttime));
psql.setLong(2, new Long(endtime));
psql.setString(3, cityId);
psql.setString(4, cityId);
Map map = DBOperation.getMap(psql.getSQL(), "proxool.xml-report" );
Map<String, String> resultMap = new ConcurrentHashMap<String, String>();
resultMap.putAll(map);
return resultMap;
}
/**
* 导出详细清单
* @author 岩
* @date 2016-4-26
* @param cityId
* @param starttime
* @param endtime
* @return
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public List<Map> parseDetail(String cityId, String starttime, String endtime )
{
PrepareSQL psql = new PrepareSQL();
psql.append("select city_id,is_used,username,orgname,area,device_serial_A,spec_name_A, ");
psql.append(" serv_no,bill_no,inst_addr,install_person,group_name,revert_time,net_account ");
psql.append(" from tab_gw_recoverlist ");
psql.append(" where 1=1 and city_id <> null and is_recover =1 ");
if ((!StringUtil.IsEmpty(starttime)))
{
psql.append(" and revert_time>=");
psql.append(starttime);
psql.append(" ");
}
if ((!StringUtil.IsEmpty(endtime)))
{
psql.append(" and revert_time<=");
psql.append(endtime);
psql.append(" ");
}
if ((!StringUtil.IsEmpty(cityId)) && (!"00".equals(cityId)))
{
psql.append(" and city_id in (select city_id from tab_city where city_id='");
psql.append(cityId);
psql.append("' or parent_id='");
psql.append(cityId);
psql.append("') ");
}
psql.append(" order by revert_time");
List<Map> list = jt.query(psql.getSQL(), new RowMapper()
{
public Object mapRow(ResultSet rs, int arg1) throws SQLException
{
Map<String, String> map = new HashMap<String, String>();
// 属地
map.put("city", Global.G_CityId_CityName_Map.get(StringUtil
.getStringValue(rs.getString("city_id"))));
// 核销方式
if ("1".equals(StringUtil.getStringValue(rs.getString("is_used"))))
{
map.put("is_used", "已使用");
}
else
{
map.put("is_used", "未使用");
}
map.put("username", StringUtil.getStringValue(rs.getString("username")));
map.put("orgname", StringUtil.getStringValue(rs.getString("orgname")));
map.put("area", StringUtil.getStringValue(rs.getString("area")));
map.put("device_serialnumber_A", StringUtil.getStringValue(rs.getString("device_serial_A")));
map.put("spec_name_A", StringUtil.getStringValue(rs.getString("spec_name_A")));
map.put("serv_no", StringUtil.getStringValue(rs.getString("serv_no")));
map.put("bill_no", StringUtil.getStringValue(rs.getString("bill_no")));
map.put("inst_addr", StringUtil.getStringValue(rs.getString("inst_addr")));
map.put("install_person", StringUtil.getStringValue(rs.getString("install_person")));
map.put("group_name", StringUtil.getStringValue(rs.getString("group_name")));
// 核销日期
if (StringUtil.getLongValue(rs.getString("revert_time")) * 1000l == 0)
{
map.put("revert_time", "");
}
else
{
DateTimeUtil dt = new DateTimeUtil(StringUtil.getLongValue(rs
.getString("revert_time")) * 1000l);
map.put("revert_time", dt.getLongDate());
}
map.put("net_account", StringUtil.getStringValue(rs.getString("net_account")));
return map;
}
});
return list;
}
public int getQueryCount()
{
return queryCount;
}
public List<Map<String, String>> getCityName()
{
return null;
}
}
| [
"di4zhibiao.126.com"
] | di4zhibiao.126.com |
6946c9bb422bc10fb6eef23e9b1ef8d53765ce8d | 2379cbec6ed9dc2456a5012cf0945bcedec8e955 | /src/com/facebook/buck/core/artifact/ArtifactFilesystem.java | d6d71cb1c1bb504d7f5946e6d7c696fbf2c6aee8 | [
"Apache-2.0"
] | permissive | PhilanthroLab/buck | ba71b721b9e807b4a955eec1101a81cee29bb051 | 9e26f05513f9cc9357a02b610442be7dd4636149 | refs/heads/master | 2020-10-02T07:01:43.840802 | 2019-12-11T00:55:57 | 2019-12-11T01:39:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,251 | java | /*
* Copyright 2019-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.facebook.buck.core.artifact;
import com.facebook.buck.core.model.impl.BuildPaths;
import com.facebook.buck.io.file.MostFiles;
import com.facebook.buck.io.filesystem.CopySourceMode;
import com.facebook.buck.io.filesystem.ProjectFilesystem;
import com.facebook.buck.util.stream.RichStream;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Path;
import java.nio.file.attribute.FileAttribute;
import java.util.Objects;
/** A Filesystem for operating on {@link com.facebook.buck.core.artifact.Artifact}s */
public class ArtifactFilesystem {
private final ProjectFilesystem filesystem;
/** @param filesystem that the {@link Artifact}s are relative to. */
public ArtifactFilesystem(ProjectFilesystem filesystem) {
this.filesystem = filesystem;
}
/**
* @param artifact the artifact to read. It should be bound.
* @return an {@link InputStream} of the given artifact.
* @throws IOException
*/
public InputStream getInputStream(Artifact artifact) throws IOException {
return filesystem.newFileInputStream(resolveToPath(artifact));
}
/**
* @param artifact the artifact to write. It should be bound.
* @return an {@link java.io.OutputStream} of the given artifact.
* @throws IOException
*/
public OutputStream getOutputStream(Artifact artifact, FileAttribute<?>... attrs)
throws IOException {
Preconditions.checkState(!artifact.isSource(), "Write destination should be a Build Artifact");
Path path = resolveToPath(artifact);
filesystem.createParentDirs(path);
return filesystem.newFileOutputStream(path, attrs);
}
private Path resolveToPath(Artifact artifact) {
BoundArtifact boundArtifact = artifact.asBound();
BuildArtifact buildArtifact = boundArtifact.asBuildArtifact();
if (buildArtifact != null) {
return buildArtifact.getSourcePath().getResolvedPath();
}
return Objects.requireNonNull(boundArtifact.asSource()).getSourcePath().getRelativePath();
}
/**
* Write a string to a given {@link Artifact}, creating parent directories as necessary
*
* @param contents the desired contents
* @param artifact the artifact to write. It must be bound.
* @throws IOException The file could not be written
*/
public void writeContentsToPath(String contents, Artifact artifact) throws IOException {
Preconditions.checkState(!artifact.isSource(), "Write destination should be a Build Artifact");
Path path = resolveToPath(artifact);
filesystem.createParentDirs(path);
filesystem.writeContentsToPath(contents, path);
}
/**
* Make an {@link Artifact} executable
*
* @param artifact the artifact to write. It must be bound.
* @throws IOException Making the file executable failed
*/
public void makeExecutable(Artifact artifact) throws IOException {
Path path = resolveToPath(artifact);
MostFiles.makeExecutable(filesystem.resolve(path));
}
/**
* Makes a copy of the given {@link Artifact} to the given destination {@link Artifact}, with copy
* behaviour as specified by the {@link CopySourceMode}.
*/
public void copy(Artifact toCopy, Artifact dest, CopySourceMode mode) throws IOException {
Preconditions.checkState(!dest.isSource(), "Copy destination should be a Build Artifact");
filesystem.copy(resolveToPath(toCopy), resolveToPath(dest), mode);
}
/**
* Expand an artifact into a command line argument.
*
* <p>NOTE: This should not be used just to get a string version of a path. This API may become
* more restrictive in the future if necessary.
*
* @param artifact a bound artifact whose path is requested
* @return The path to an artifact as a string
*/
public String stringify(Artifact artifact) {
return resolveToPath(artifact).toString();
}
/**
* Expand an artifact into a command line argument.
*
* <p>NOTE: This should not be used just to get a string version of a path. This API may become
* more restrictive in the future if necessary. When possible, then non-absolute version of this
* function ({@link #stringify(Artifact)} should be used.
*
* @param artifact a bound artifact whose path is requested
* @return The path to an artifact as a string
*/
public String stringifyAbsolute(Artifact artifact) {
return filesystem.resolve(resolveToPath(artifact)).toString();
}
/** Create the package paths that actions will write into if it does not exist */
public void createPackagePaths(ImmutableSet<Artifact> outputs) throws IOException {
/*
* Normally we'd just want to completely delete this directory if it exists. However, for
* rules with multiple actions / outputs, they will all go in the same per-rule directory.
* If only one action needs to re-run, we can't have the other action's files go missing.
*/
RichStream.from(outputs)
.map(output -> output.asBound().asBuildArtifact())
.filter(Objects::nonNull)
.map(ba -> BuildPaths.getGenDir(filesystem, ba.getSourcePath().getTarget()))
.distinct()
.forEachThrowing(filesystem::mkdirs);
}
/** Remove build artifacts (only) that exist on the underlying filesystem. */
public void removeBuildArtifacts(ImmutableSet<Artifact> outputs) throws IOException {
RichStream.from(outputs)
.map(output -> output.asBound().asBuildArtifact())
.filter(Objects::nonNull)
.map(this::resolveToPath)
.forEachThrowing(filesystem::deleteRecursivelyIfExists);
}
}
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
2de868e132c37e52f27d3d6e168526969f1a7f10 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/13/13_08d65a7f50c4df314837adb78abc75c15cd6bab5/UserDetailActivity/13_08d65a7f50c4df314837adb78abc75c15cd6bab5_UserDetailActivity_s.java | 4057325fe8f7f8b954913886b22759d47982d509 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 1,178 | java | package com.lunatech.example.sietse.StackSearch;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
public class UserDetailActivity extends Activity {
public static final String USER_ID = "USER_ID";
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.user_detail);
getActionBar().setDisplayHomeAsUpEnabled(true);
}
@Override
protected void onStart() {
super.onStart();
final UserDetailFragment detailFragment = (UserDetailFragment)getFragmentManager().findFragmentById(R.id.user_detail_container);
detailFragment.switchUser(getIntent().getLongExtra(USER_ID, 0));
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
final Intent intent = new Intent(this, UserActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
bda1818eca7d37bd64f2fa82821f5da83b594f40 | 93b90a82693b356e1d3f2a3d46372a8a16c8fa8b | /jm1/src/main/java/PlaceComputerShip.java | a61c983bd420ad92dd8fccbc5cb8e8bc457f7b9e | [] | no_license | viktoras11/Projektas | d124461cdb6d9acb141304493975ba7eba69cde5 | 2c9d02c936c2bb554705dae5d461fa20c8ad4ef1 | refs/heads/master | 2020-04-09T12:15:33.457420 | 2019-01-27T20:43:54 | 2019-01-27T20:43:54 | 160,342,148 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 729 | java | import java.util.Random;
public class PlaceComputerShip {
public Random rand = new Random();
//* siuo metodu sukuriame 5 kompiuterio laivus.
public void placeComputerShips(String[][] computerMap, String[][] playerMap){
int x, y;
SysOut3 sysOut3 = new SysOut3();
sysOut3.pcs1();
int i = 1;
while (i <= 5) {
x = rand.nextInt(10); //Sugeneruojame atsitiktini skaiciu
y = rand.nextInt(10);
if (playerMap[y][x].equals("S") || computerMap[y][x].equals("S")) {
continue;
}
computerMap[y][x] = "S";
System.out.print(i + ". Pasirinkta laivo vieta.\n");;
++i;
}
}
}
| [
"you@example.com"
] | you@example.com |
0ec91a5086a167d867f5b3b05189ed89ebe0e275 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_24732.java | a3a7aa3a28025b1ac1ae309e1d58e67bd85a8057 | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 623 | java | /**
* Walk back from 'index' until the brace that seems to be the beginning of the current block, and return the number of spaces found on that line.
*/
protected int calcBraceIndent(int index,char[] contents){
int braceDepth=1;
boolean finished=false;
while ((index != -1) && (!finished)) {
if (contents[index] == '}') {
braceDepth++;
index--;
}
else if (contents[index] == '{') {
braceDepth--;
if (braceDepth == 0) {
finished=true;
}
index--;
}
else {
index--;
}
}
if (!finished) return -1;
return calcSpaceCount(index,contents);
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
02f1cfafa5dd006044a70f3607d126cd37ec0638 | 87f420a0e7b23aefe65623ceeaa0021fb0c40c56 | /shop-springcloud-alibaba/shop-jwt/src/main/java/io/microservices/shop/jwt/common/ResponseResult.java | 9c7be82e7eaf14bafc11b0fecc1a71efd17a4093 | [] | no_license | xioxu-web/xioxu-web | 0361a292b675d8209578d99451598bf4a56f9b08 | 7fe3f9539e3679e1de9f5f614f3f9b7f41a28491 | refs/heads/master | 2023-05-05T01:59:43.228816 | 2023-04-28T07:44:58 | 2023-04-28T07:44:58 | 367,005,744 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,589 | java | package io.microservices.shop.jwt.common;
import java.io.Serializable;
import java.util.Objects;
/**
* @author xiaoxu123
*/
public class ResponseResult<T> implements Serializable {
private String code = "0";
private String msg;
private T data;
public ResponseResult(String code, String msg) {
this.code = code;
this.msg = msg;
}
public ResponseResult(String code, String msg, T data) {
this.code = code;
this.msg = msg;
this.data = data;
}
public static <T> ResponseResult<T> success() {
return new ResponseResult<>(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMessage());
}
public static <T> ResponseResult<T> success(T data) {
return new ResponseResult<>(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMessage(), data);
}
public static <T> ResponseResult<T> error(String code, String msg) {
return new ResponseResult<>(code, msg);
}
public static <T> ResponseResult<T> error(String code, String msg, T data) {
return new ResponseResult<>(code, msg, data);
}
public boolean isSuccess() {
return Objects.equals(code, "0");
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
}
| [
"xb01049438@alibaba-inc.com"
] | xb01049438@alibaba-inc.com |
56fd84ac7f63146c2bae7b602b7bc36c033327ac | 04df92710c3989f96013954b6b3c9084bd15c274 | /src/jstamp/jvstm/intruder/Packet.java | b6f9940f96b14a95e40657aa9222a950ef0e893d | [] | no_license | inesc-id-esw/jvstm-stamp | f814dcee0100a36f4366c05f33e2802e160c233d | 77a2a1b140fe903e61080289869df6ab6ee79393 | refs/heads/master | 2021-01-13T01:17:20.607918 | 2012-12-22T18:53:34 | 2012-12-22T18:53:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 634 | java | package jstamp.jvstm.intruder;
public class Packet {
final int flowId;
final int fragmentId;
final int numFragment;
final int length;
final byte[] data;
public Packet(int numDataBytes, int numPacket, int flowId, int fragmentId) {
data = new byte[numDataBytes];
this.length = numDataBytes;
this.numFragment = numPacket;
this.flowId = flowId;
this.fragmentId = fragmentId;
}
public static int compareFlowID(Packet aPtr, Packet bPtr) {
return aPtr.flowId - bPtr.flowId;
}
public static int compareFragmentID(Packet aPtr, Packet bPtr) {
return aPtr.fragmentId - bPtr.fragmentId;
}
}
| [
"nmld@ist.utl.pt"
] | nmld@ist.utl.pt |
88fea19bba4ac4167d1c7b1de84a7b8efe3f696d | a41b76082aceb1b777c6139dc01ad91e7b165473 | /src/fitnesse/responders/testHistory/MostRecentPageHistoryReader.java | ff1fe7e743e1f82ad4d171d6c6686e30289a342d | [] | no_license | solsila/Fitnesse | 6b424870c931f31f4e4c09a7fa65d210f07f2e62 | cc1e4f0b04fc9da85e900719b924485e373aa92e | refs/heads/master | 2020-06-04T02:11:54.386363 | 2013-10-25T13:25:20 | 2013-10-25T13:25:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 910 | java | package fitnesse.responders.testHistory;
import java.io.File;
import java.text.ParseException;
public class MostRecentPageHistoryReader extends PageHistoryReader {
TestResultRecord mostRecentRecord = null;
File directory = null;
public MostRecentPageHistoryReader(File pageDirectory) {
directory = pageDirectory;
}
public TestResultRecord findMostRecentTestRun() {
try {
readHistoryFromPageDirectory(directory);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return mostRecentRecord;
}
@Override
void processTestFile(TestResultRecord record) throws ParseException {
if (mostRecentRecord == null || mostRecentRecord.getDate().compareTo(record.getDate()) < 0) {
mostRecentRecord = record;
}
}
}
| [
"solsila@gmail.com"
] | solsila@gmail.com |
e5ade5715b9f5cbc1004b0a1665bb176ea8dd2f7 | 51d977bc80a6c02b80b37d9921427bd78ee2e978 | /samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Order.java | cff15e3bd2a7a4aca8ef075355f92c85e93af4a5 | [
"Apache-2.0"
] | permissive | joegnelson/swagger-codegen | 5f1911d4befa929ba139cf66967dbcfd02db6218 | 559e6d907dd9d5035cfb67fb9b8092027e767239 | refs/heads/master | 2021-01-24T04:43:16.714825 | 2015-06-11T08:25:52 | 2015-06-11T08:25:52 | 31,788,798 | 2 | 2 | null | 2015-03-06T20:59:09 | 2015-03-06T20:59:09 | null | UTF-8 | Java | false | false | 2,223 | java | package io.swagger.model;
import java.util.Date;
import com.wordnik.swagger.annotations.*;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description = "")
public class Order {
private Long id = null;
private Long petId = null;
private Integer quantity = null;
private Date shipDate = null;
public enum StatusEnum {
placed, approved, delivered,
};
private StatusEnum status = null;
private Boolean complete = null;
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("petId")
public Long getPetId() {
return petId;
}
public void setPetId(Long petId) {
this.petId = petId;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("quantity")
public Integer getQuantity() {
return quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("shipDate")
public Date getShipDate() {
return shipDate;
}
public void setShipDate(Date shipDate) {
this.shipDate = shipDate;
}
/**
* Order Status
**/
@ApiModelProperty(value = "Order Status")
@JsonProperty("status")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("complete")
public Boolean getComplete() {
return complete;
}
public void setComplete(Boolean complete) {
this.complete = complete;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Order {\n");
sb.append(" id: ").append(id).append("\n");
sb.append(" petId: ").append(petId).append("\n");
sb.append(" quantity: ").append(quantity).append("\n");
sb.append(" shipDate: ").append(shipDate).append("\n");
sb.append(" status: ").append(status).append("\n");
sb.append(" complete: ").append(complete).append("\n");
sb.append("}\n");
return sb.toString();
}
}
| [
"fehguy@gmail.com"
] | fehguy@gmail.com |
26ffeb7c78fe1a659dc6bfd2bdbb2693de682ea4 | 836990dbdde2314c20c8cc3b4731849528c4e43f | /mGAP/src/org/labkey/mgap/buttons/ReleaseButton.java | 2938aadcb36aa6d4920a79332c6d3f5145590cb9 | [] | no_license | hakanaku2009/BimberLabKeyModules | 0b40953654b0dc9757d5b26ae0b269403e5c1879 | c7c7670ff8ecb1eb4bb3d869fa98d69e30a93963 | refs/heads/master | 2020-09-25T03:41:52.283347 | 2019-11-01T22:53:37 | 2019-11-01T22:53:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 623 | java | package org.labkey.mgap.buttons;
import org.labkey.api.ldk.table.SimpleButtonConfigFactory;
import org.labkey.api.module.Module;
import org.labkey.api.view.template.ClientDependency;
import java.util.LinkedHashSet;
public class ReleaseButton extends SimpleButtonConfigFactory
{
public ReleaseButton(Module owner)
{
super(owner, "Create mGAP Release", "mGAP.window.ReleaseWindow.buttonHandler();", new LinkedHashSet<>(ClientDependency.fromList("laboratory.context;/SequenceAnalysis/window/OutputHandlerWindow.js;/mGAP/window/ReleaseWindow.js;sequenceanalysis/field/GenomeFileSelectorField.js")));
}
}
| [
"bbimber@gmail.com"
] | bbimber@gmail.com |
9b29a866c28f51bf649f16dabb8261989a880a5a | 091791f7cd0731df35b6f16e1fcc1dd956078d97 | /server-spi/src/main/java/org/openfact/models/DireccionRegionalModel.java | e4cdd9448907371f41e187a780e76d03b7a673d1 | [
"MIT"
] | permissive | shanitohl/openfact | 999023d6ee0c2239cfd9a420082aeec7d35023e1 | de4dd234d0e74f9b1174080d011027ba1d571f05 | refs/heads/master | 2021-01-24T02:59:01.831238 | 2016-06-30T20:27:00 | 2016-06-30T20:27:00 | 62,345,972 | 0 | 0 | null | 2016-06-30T22:24:05 | 2016-06-30T22:24:05 | null | UTF-8 | Java | false | false | 252 | java | package org.openfact.models;
public interface DireccionRegionalModel extends Model {
String getId();
String getDenominacion();
void setDenominacion(String denominacion);
boolean getEstado();
void setEstado(boolean estado);
}
| [
"carlosthe19916@gmail.com"
] | carlosthe19916@gmail.com |
ac680f7e9eaf1aae5a438b71c86ce5609fdf1f7d | 716089b4dbfe81216a2e46be12d32637726995ef | /src/com/xdl/system/entity/Role.java | 31883724f0d3b47e795cea565b6ed9fee22c7f4c | [] | no_license | akriar/BLB_CRM | 4b3efaf6e6e05ebf5880bc6fc37f4987b9b0270f | 648dff50d27463fdd1fe377324588ac57580b7d2 | refs/heads/master | 2022-08-31T04:56:59.883023 | 2020-05-24T08:02:23 | 2020-05-24T08:02:23 | 266,492,526 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,152 | java | package com.xdl.system.entity;
import java.io.Serializable;
import java.sql.Timestamp;
import com.xdl.publics.annotation.Transient;
import com.xdl.publics.util.BaseEntity;
/**
* 角色
*/
public class Role extends BaseEntity implements Serializable{
private static final long serialVersionUID = 1L;
private Long roleid;// 角色id
private String rolename;// 角色名称
private Long deptid;// 部门id
private Integer dr;// 删除标志 0未删除 1已删除
private Long create_id;//创建人ID
private Long update_id;//更新人ID
private Timestamp create_time;//创建时间
private Timestamp update_time;//更新时间
@Transient
private String deptname;//部门名称
@Transient
private String menuname;//权限菜单
public String getMenuname() {
return menuname;
}
public void setMenuname(String menuname) {
this.menuname = menuname;
}
public String getDeptname() {
return deptname;
}
public void setDeptname(String deptname) {
this.deptname = deptname;
}
public Long getCreate_id() {
return create_id;
}
public void setCreate_id(Long create_id) {
this.create_id = create_id;
}
public Long getUpdate_id() {
return update_id;
}
public void setUpdate_id(Long update_id) {
this.update_id = update_id;
}
public Timestamp getCreate_time() {
return create_time;
}
public void setCreate_time(Timestamp create_time) {
this.create_time = create_time;
}
public Timestamp getUpdate_time() {
return update_time;
}
public void setUpdate_time(Timestamp update_time) {
this.update_time = update_time;
}
public Long getRoleid() {
return roleid;
}
public void setRoleid(Long roleid) {
this.roleid = roleid;
}
public String getRolename() {
return rolename;
}
public void setRolename(String rolename) {
this.rolename = rolename;
}
public Long getDeptid() {
return deptid;
}
public void setDeptid(Long deptid) {
this.deptid = deptid;
}
public Integer getDr() {
return dr;
}
public void setDr(Integer dr) {
this.dr = dr;
}
@Override
public String getIdColumnName() {
// TODO Auto-generated method stub
return "roleid";
}
}
| [
"you@example.com"
] | you@example.com |
a223b658ce0c6f5104f435ad5326a421f4644fd0 | 8568346365ee30441b63e1eacf3f501067254624 | /src/main/java/com/vilin/juc/chapter12/ThreadGroupCreate.java | 56ac1cf90c4748f1ba534da294d19fd5da0033ca | [] | no_license | guangyongluo/JUC | 55b1f1555b2c084196a00a40861e435d806727ac | 4c7c31a80e14f71c5db4cd9c57830d8349707b25 | refs/heads/master | 2023-04-23T05:42:33.385674 | 2021-05-10T00:23:22 | 2021-05-10T00:23:22 | 284,023,367 | 0 | 2 | null | 2020-10-14T00:21:01 | 2020-07-31T11:41:54 | Java | UTF-8 | Java | false | false | 1,451 | java | package com.vilin.juc.chapter12;
import java.util.Arrays;
public class ThreadGroupCreate {
public static void main(String[] args) {
// System.out.println(Thread.currentThread().getName());
// System.out.println(Thread.currentThread().getThreadGroup().getName());
ThreadGroup tg1 = new ThreadGroup("TG1");
Thread t1 = new Thread(tg1, "t1"){
@Override
public void run() {
try {
Thread.sleep(10_000);
System.out.println(getThreadGroup().getName());
System.out.println(getThreadGroup().getParent());
System.out.println(getThreadGroup().getParent().activeCount());
} catch (InterruptedException e) {
e.printStackTrace();
}
}
};
t1.start();
// ThreadGroup tg2 = new ThreadGroup(tg1,"TG2");
// System.out.println(tg2.getName());
// System.out.println(tg2.getParent());
ThreadGroup tg3 = new ThreadGroup("TG3");
Thread t3 = new Thread(tg3, "T2"){
@Override
public void run() {
System.out.println(tg1.getName());
Thread[] threads = new Thread[tg1.activeCount()];
tg1.enumerate(threads);
Arrays.asList(threads).forEach(System.out::println);
}
};
t3.start();
}
}
| [
"llooww@mail.ustc.edu.cn"
] | llooww@mail.ustc.edu.cn |
f376c5cc7a7369e45996c0dab17ab2f52b5a89ef | 0c74c6198ca289ecf218029ff398c768a0338821 | /http/src/main/java/com/mcxiaoke/next/http/ProgressCallback.java | 090785bb0cb54e04b358f411aa545fa38bcdbc2e | [
"Apache-2.0"
] | permissive | ronanhardiman/Android-Next | 19cf857c45fe26f7ce2fb08968b5d6d80550691a | 07a80004dd17bce04a058c147a42620c40b704b1 | refs/heads/master | 2021-01-15T13:33:24.572651 | 2015-06-23T09:52:24 | 2015-06-23T09:52:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 394 | java | package com.mcxiaoke.next.http;
/**
* User: mcxiaoke
* Date: 14-5-30
* Time: 14:21
*/
/**
* POST/PUT write data progress callback
*/
public interface ProgressCallback {
ProgressCallback DEFAULT = new ProgressCallback() {
@Override
public void onProgress(long currentSize, long totalSize) {
}
};
void onProgress(long currentSize, long totalSize);
}
| [
"mcxiaoke@gmail.com"
] | mcxiaoke@gmail.com |
82f0ca9808d4dc773d6dcf3a5be8f67c0de01e4a | caa4f0ce10797c3b78680b958e2e9277d01c82ce | /src/com/shlg/chuang/collect/HashMapTest.java | 9c48a0e7e6ba328e11ffa7925b3cd3ffa80f1548 | [] | no_license | liushuiwushuang/codeThink | 00812e221713a7f2bb9e54722834190986fac7ae | 3285f374abfba339692c8e74dbcb87d0c5a70ef7 | refs/heads/master | 2021-01-19T04:15:17.251027 | 2017-05-05T10:13:31 | 2017-05-05T10:13:31 | 62,606,501 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,848 | java | package com.shlg.chuang.collect;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.concurrent.locks.Lock;
public class HashMapTest {
String id;
String name;
public HashMapTest(String id, String name) {
this.id = id;
this.name = name;
}
@Override
public int hashCode() {
return id.hashCode();
}
@Override
public boolean equals(Object obj) {
HashMapTest hashMapTest = (HashMapTest) obj;
if (hashMapTest.id.equals(this.id))
return true;
else
return false;
}
public static void main(String[] args) {
System.out.println("Use String as key:");
HashMap<HashMapTest, String> hm = new HashMap<>();
HashMapTest h1 = new HashMapTest(new String("111"), "name1");
HashMapTest h2 = new HashMapTest(new String("111"), "name2");
hm.put(h1, "address1");
hm.put(h2, "address2");
Iterator<Entry<HashMapTest, String>> iter = hm.entrySet().iterator();
while (iter.hasNext()) {
Entry<HashMapTest, String> entry = (Entry<HashMapTest, String>) iter.next();
HashMapTest key = (HashMapTest) entry.getKey();
String val = (String) entry.getValue();
System.out.println("key = " + key + "; value = " + val);
}
new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}).start();
Lock lock;
}
class MyClassThread extends Thread implements Runnable{
}
}
| [
"1303637389@qq.com"
] | 1303637389@qq.com |
d0a902eb043a2b057650ffd95a0bfaf047cdc8ad | bd6cca4fe6cd52179b4b39c34d26df0dd923c612 | /src/test/java/com/example/multiplefileload/MultiplefileloadApplicationTests.java | 320875ecaee552c971b948d932835478d7d3df79 | [] | no_license | kenyodarz/MultipleLoadFiles | 46929cbb90968d081972f7fb358c29980ca3f3ac | 5b4d2b8fdd42cfdca77fa8d58ec57cf722d72d00 | refs/heads/master | 2023-02-14T03:35:57.867423 | 2021-01-13T19:38:09 | 2021-01-13T19:38:09 | 329,412,871 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 239 | java | package com.example.multiplefileload;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class MultiplefileloadApplicationTests {
@Test
void contextLoads() {
}
}
| [
"minajorge@hotmail.com"
] | minajorge@hotmail.com |
a75fbe2eba746caca7ce5fa0cbe9afd63b6e275f | d4d206413a4647476d3c6a1157058745db061aa7 | /org.schema/src/main/java/org/schema/Mosque.java | ce005efadfb8572fd0b0e5a28093639231689b3c | [
"Apache-2.0"
] | permissive | devlinjunker/ec | 4b881c69e10d9be46a19216c7bd712a045508d6e | 4abf6a2a563a2a30e5f1b620a451dc83b675dbc9 | refs/heads/master | 2021-07-16T21:04:31.990932 | 2017-10-23T19:15:36 | 2017-10-23T19:15:36 | 106,870,884 | 0 | 0 | null | 2017-10-13T20:34:43 | 2017-10-13T20:34:42 | null | UTF-8 | Java | false | false | 363 | java | package org.schema;
/**
* Schema.org/Mosque
* A mosque.
*
* @author schema.org
* @class Mosque
* @module org.schema
* @extends PlaceOfWorship
*/
public class Mosque extends PlaceOfWorship {
/**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
public Mosque() {
context = "http://schema.org/";
type = "Mosque";
}
} | [
"fritz.ray@eduworks.com"
] | fritz.ray@eduworks.com |
eb0928cab38f8e978ed98d476b26fd4952e70b75 | 0ed20fe0fc9e1cd76034d5698c4f7dcf42c47a60 | /_Class_CS2302/Assignments/assignment7c/CenterPanel.java | 8c6146d86402adaf1d82a25cbbb68587c34ef3f9 | [] | no_license | Kamurai/EclipseRepository | 61371f858ff82dfdfc70c3de16fd3322222759ed | 4af50d1f63a76faf3e04a15129c0ed098fc6c545 | refs/heads/master | 2022-12-22T13:05:13.965919 | 2020-11-05T03:42:09 | 2020-11-05T03:42:09 | 101,127,637 | 0 | 0 | null | 2022-12-16T13:43:14 | 2017-08-23T02:18:08 | Java | UTF-8 | Java | false | false | 3,843 | java | //Kemerait, Christopher
//CSIS 2302
//Phone Pad Button Assignment
package assignment7;
import java.awt.*;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.*;
import javax.swing.JPanel;
import javax.swing.border.*;
//import java.util.Random;
import java.awt.event.*;
import java.util.ArrayList;
public class CenterPanel extends JPanel
{
//Establish Subsquent Panel
JPanel ResultPanel = new JPanel();
JPanel NumberPanel = new JPanel();
JPanel ClearPanel = new JPanel();
//Establish Label
JLabel Display = new JLabel("0");
//Establish Buttons
ArrayList<JButton> Numbers = new ArrayList<JButton>();
JButton Clear = new JButton("Clear");
Boolean Cherry = true;
public CenterPanel()
{
//Define Buttons
Numbers.add( new JButton("1") );
Numbers.add( new JButton("2") );
Numbers.add( new JButton("3") );
Numbers.add( new JButton("4") );
Numbers.add( new JButton("5") );
Numbers.add( new JButton("6") );
Numbers.add( new JButton("7") );
Numbers.add( new JButton("8") );
Numbers.add( new JButton("9") );
Numbers.add( new JButton("*") );
Numbers.add( new JButton("0") );
Numbers.add( new JButton("#") );
//Set Panel
// setBackground (Color.green);
//Set Layout
setLayout ( new BorderLayout() );
//Border
NumberPanel.setBorder (BorderFactory.createLineBorder (Color.black, 1));
//Add Objects
//Add Subsequent Panel
add (NumberPanel, BorderLayout.CENTER);
add (ResultPanel, BorderLayout.NORTH);
add (ClearPanel, BorderLayout.EAST);
//Modify UserPanel
//Set Panel
NumberPanel.setBackground (Color.black);
//Set Layout
NumberPanel.setLayout ( new GridLayout(4, 3) );
//Add Objects to UserPanel
for(int counter=0; counter < 12; counter++)
{
NumberPanel.add ( Numbers.get(counter) );
//Set ActionListeners
Numbers.get(counter).addActionListener (new NumberListener() );
}
//Modify DisplayPanel
//Set Panel
ResultPanel.setBackground (Color.white);
//Set Layout
//Border
ResultPanel.setBorder (BorderFactory.createLineBorder (Color.black, 3));
//Add Objects
//Add Label
ResultPanel.add (Display);
//Modify ClearPanel
//Set Panel
ClearPanel.setBackground (Color.black);
//Set Layout
ClearPanel.setLayout ( new GridLayout(1, 1) );
//Add Objects
//Add Button
ClearPanel.add (Clear);
//Add ActionListener
Clear.addActionListener (new NumberListener() );
}
private class NumberListener implements ActionListener
{
//Establish Variables
String Output = "";
int Num = 0;
public void actionPerformed (ActionEvent event)
{
//if Cherry is still true, then do not display initial 0
if (Cherry == true)
{
Display.setText("");
Cherry = false;
};
//if Clear is pressed, then Reset Cherry and place Display at 0
if ( event.getSource() == Clear )
{
Display.setText("0");
Output = "";
Cherry = true;
};
//take number and input it into variable
for(int counter=0; counter < 12; counter++)
{
if ( event.getSource() == Numbers.get(counter) )
{
if ( counter < 9)
{
Num = counter + 1;
//Convert to String
Output = Integer.toString( Num );
}
else if (counter == 9)
Output = "*";
else if (counter == 10)
Output = "0";
else if (counter == 11)
Output = "#";
};
};
/************************************************
should terminate loop as soon as event source is
found
*************************************************/
//Ensure that string Adds to string in Display Label in the Result Panel
Output = Display.getText() + Output;
//Move Output to the Display Label in the Result Panel
Display.setText( Output );
}
}
}
| [
"KamuraiBlue25@gmail.com"
] | KamuraiBlue25@gmail.com |
3bfc0575bb078b74f86000c5547097ad0ddedd7f | 7c9f40c50e5cabcb320195e3116384de139002c6 | /Plugin_Parser/src/tinyos/yeti/nesc12/collector/actions/Action572.java | 39a91a1a4e1c76d6fcfc9471060ae62067759743 | [] | no_license | phsommer/yeti | 8e89ad89f1a4053e46693244256d03e71fe830a8 | dec8c79e75b99c2a2a43aa5425f608128b883e39 | refs/heads/master | 2021-01-10T05:33:57.285499 | 2015-05-21T19:41:02 | 2015-05-21T19:41:02 | 36,033,399 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,506 | java | /*
* Yeti 2, NesC development in Eclipse.
* Copyright (C) 2009 ETH Zurich
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Web: http://tos-ide.ethz.ch
* Mail: tos-ide@tik.ee.ethz.ch
*/
package tinyos.yeti.nesc12.collector.actions;
import tinyos.yeti.nesc12.parser.StringRepository;
import tinyos.yeti.nesc12.parser.ScopeStack;
import tinyos.yeti.nesc12.parser.RawParser;
import tinyos.yeti.nesc12.lexer.Token;
import tinyos.yeti.nesc12.lexer.Lexer;
import tinyos.yeti.nesc12.parser.ast.*;
import tinyos.yeti.nesc12.parser.ast.nodes.*;
import tinyos.yeti.nesc12.parser.ast.nodes.declaration.*;
import tinyos.yeti.nesc12.parser.ast.nodes.definition.*;
import tinyos.yeti.nesc12.parser.ast.nodes.error.*;
import tinyos.yeti.nesc12.parser.ast.nodes.expression.*;
import tinyos.yeti.nesc12.parser.ast.nodes.general.*;
import tinyos.yeti.nesc12.parser.ast.nodes.nesc.*;
import tinyos.yeti.nesc12.parser.ast.nodes.statement.*;
import tinyos.yeti.nesc12.collector.*;
public final class Action572 implements ParserAction{
public final java_cup.runtime.Symbol do_action(
int CUP$parser$act_num,
java_cup.runtime.lr_parser CUP$parser$parser,
java.util.Stack CUP$parser$stack,
int CUP$parser$top,
parser parser)
throws java.lang.Exception{
java_cup.runtime.Symbol CUP$parser$result;
// c_argument_expression_list ::= c_assignment_expression
{
ArgumentExpressionList RESULT =null;
Expression i = (Expression)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
RESULT = new ArgumentExpressionList( i );
CUP$parser$result = parser.getSymbolFactory().newSymbol("c_argument_expression_list",35, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);
}
return CUP$parser$result;
}
}
| [
"besigg@2a69fd7c-12de-fc47-e5bb-db751a41839b"
] | besigg@2a69fd7c-12de-fc47-e5bb-db751a41839b |
ddfa31720c1be026ecfa7362b71b10c7b9c18f6a | 43fe5c06e65c14924283b64f0cbbf4364d68ea4a | /src/test/java/com/example/bddspring1586893823/DemoApplicationTests.java | a98bc72973584b433fff0e2ce978460698b5b81d | [] | no_license | cb-kubecd/bdd-spring-1586893823 | 0f6a39b82dbceeda1e5cccb75b8e4a11afa37156 | 840581617cbe339f0444fd52865a0b191bbd740e | refs/heads/master | 2022-04-21T20:23:47.799984 | 2020-04-14T19:50:50 | 2020-04-14T19:50:50 | 255,710,630 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 221 | java | package com.example.bddspring1586893823;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class DemoApplicationTests {
@Test
void contextLoads() {
}
}
| [
"jenkins-x-test@googlegroups.com"
] | jenkins-x-test@googlegroups.com |
3700f22087d058b29868cf278ff1833e5dfd758f | f6beea8ab88dad733809e354ef9a39291e9b7874 | /com/planet_ink/coffee_mud/Common/DefaultJournalEntry.java | 7ae2753f63057a1a41689a09fa72e219f6e79782 | [
"Apache-2.0"
] | permissive | bonnedav/CoffeeMud | c290f4d5a96f760af91f44502495a3dce3eea415 | f629f3e2e10955e47db47e66d65ae2883e6f9072 | refs/heads/master | 2020-04-01T12:13:11.943769 | 2018-10-11T02:50:45 | 2018-10-11T02:50:45 | 153,196,768 | 0 | 0 | Apache-2.0 | 2018-10-15T23:58:53 | 2018-10-15T23:58:53 | null | UTF-8 | Java | false | false | 5,795 | java | package com.planet_ink.coffee_mud.Common;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.Law.TreasurySet;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.*;
/*
Copyright 2015-2018 Bo Zimmerman
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.
*/
public class DefaultJournalEntry implements JournalEntry
{
public String key = null;
public String from;
public String to;
public String subj;
public String msg;
public long date = 0;
public long update = 0;
public String parent = "";
public long attributes = 0;
public String data = "";
public int cardinal = 0;
public String msgIcon = "";
public int replies = 0;
public int views = 0;
public boolean isLastEntry = false;
public StringBuffer derivedBuildMessage = null;
@Override
public String ID()
{
return "DefaultJournalEntry";
}
@Override
public String name()
{
return key;
}
@Override
public CMObject newInstance()
{
try
{
return getClass().newInstance();
}
catch (final Exception e)
{
return new DefaultJournalEntry();
}
}
@Override
public void initializeClass()
{
}
@Override
public int compareTo(final CMObject o)
{
if(o instanceof JournalEntry)
return compareTo((JournalEntry)o);
return 1;
}
@Override
public String key()
{
return key;
}
@Override
public JournalEntry key(String key)
{
this.key = key;
return this;
}
@Override
public String from()
{
return from;
}
@Override
public JournalEntry from(String from)
{
this.from = from;
return this;
}
@Override
public String to()
{
return to;
}
@Override
public JournalEntry to(String to)
{
this.to = to;
return this;
}
@Override
public String subj()
{
return subj;
}
@Override
public JournalEntry subj(String subj)
{
this.subj = subj;
return this;
}
@Override
public String msg()
{
return msg;
}
@Override
public JournalEntry msg(String msg)
{
this.msg = msg;
return this;
}
@Override
public long date()
{
return date;
}
@Override
public JournalEntry date(long date)
{
this.date = date;
return this;
}
@Override
public long update()
{
return update;
}
@Override
public JournalEntry update(long update)
{
this.update = update;
return this;
}
@Override
public String parent()
{
return parent;
}
@Override
public JournalEntry parent(String parent)
{
this.parent = parent;
return this;
}
@Override
public long attributes()
{
return attributes;
}
@Override
public JournalEntry attributes(long attributes)
{
this.attributes = attributes;
return this;
}
@Override
public String data()
{
return data;
}
@Override
public JournalEntry data(String data)
{
this.data = data;
return this;
}
@Override
public int cardinal()
{
return cardinal;
}
@Override
public JournalEntry cardinal(int cardinal)
{
this.cardinal = cardinal;
return this;
}
@Override
public String msgIcon()
{
return msgIcon;
}
@Override
public JournalEntry msgIcon(String msgIcon)
{
this.msgIcon = msgIcon;
return this;
}
@Override
public int replies()
{
return replies;
}
@Override
public JournalEntry replies(int replies)
{
this.replies = replies;
return this;
}
@Override
public int views()
{
return views;
}
@Override
public JournalEntry views(int views)
{
this.views = views;
return this;
}
@Override
public boolean isLastEntry()
{
return isLastEntry;
}
@Override
public JournalEntry lastEntry(boolean lastEntry)
{
this.isLastEntry = lastEntry;
return this;
}
@Override
public StringBuffer derivedBuildMessage()
{
return derivedBuildMessage;
}
@Override
public JournalEntry derivedBuildMessage(StringBuffer msg)
{
this.derivedBuildMessage = msg;
return this;
}
@Override
public int compareTo(JournalEntry o)
{
if(date < o.date())
return -1;
if(date > o.date())
return 1;
return 0;
}
@Override
public JournalEntry copyOf()
{
try
{
return (JournalEntry) this.clone();
}
catch (final Exception e)
{
return new DefaultJournalEntry();
}
}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
92afc1bf3a7ae2507b8eb51ef444add989bd51a5 | 677197bbd8a9826558255b8ec6235c1e16dd280a | /src/fm/qingting/qtradio/view/im/profile/GroupSettingView.java | 4b0b222f46c0bb5d9359410320fba51e29f03c00 | [] | no_license | xiaolongyuan/QingTingCheat | 19fcdd821650126b9a4450fcaebc747259f41335 | 989c964665a95f512964f3fafb3459bec7e4125a | refs/heads/master | 2020-12-26T02:31:51.506606 | 2015-11-11T08:12:39 | 2015-11-11T08:12:39 | 45,967,303 | 0 | 1 | null | 2015-11-11T07:47:59 | 2015-11-11T07:47:59 | null | UTF-8 | Java | false | false | 3,475 | java | package fm.qingting.qtradio.view.im.profile;
import android.content.Context;
import android.view.View.MeasureSpec;
import android.widget.ListView;
import fm.qingting.framework.adapter.CustomizedAdapter;
import fm.qingting.framework.adapter.IAdapterIViewFactory;
import fm.qingting.framework.adapter.ItemParam;
import fm.qingting.framework.event.IEventHandler;
import fm.qingting.framework.utils.BitmapResourceCache;
import fm.qingting.framework.view.IView;
import fm.qingting.framework.view.ViewGroupViewImpl;
import fm.qingting.qtradio.manager.SkinManager;
import fm.qingting.qtradio.view.settingviews.SettingItem;
import fm.qingting.qtradio.view.settingviews.SettingItem.SettingType;
import java.util.ArrayList;
import java.util.List;
public class GroupSettingView extends ViewGroupViewImpl
implements IEventHandler
{
private CancelActionView mActionView;
private CustomizedAdapter mAdapter;
private IAdapterIViewFactory mFactory;
private ListView mListView;
public GroupSettingView(Context paramContext)
{
super(paramContext);
setBackgroundColor(SkinManager.getBackgroundColor());
this.mFactory = new IAdapterIViewFactory()
{
public IView createView(int paramAnonymousInt)
{
return new ImSettingItemView(GroupSettingView.this.getContext(), this.val$hash);
}
};
this.mAdapter = new CustomizedAdapter(new ArrayList(), this.mFactory);
this.mAdapter.setEventHandler(this);
this.mListView = new ListView(paramContext);
this.mListView.setDivider(null);
this.mListView.setAdapter(this.mAdapter);
addView(this.mListView);
this.mActionView = new CancelActionView(paramContext);
this.mActionView.setEventHandler(this);
this.mActionView.update("setData", "退出该群");
addView(this.mActionView);
}
public void close(boolean paramBoolean)
{
BitmapResourceCache.getInstance().clearResourceCacheOfOne(this, 0);
super.close(paramBoolean);
}
public void onEvent(Object paramObject1, String paramString, Object paramObject2)
{
if (paramString.equalsIgnoreCase("useraction"))
dispatchActionEvent("quitgroup", paramObject2);
while (!paramString.equalsIgnoreCase("itemCallback"))
return;
dispatchActionEvent(((ItemParam)paramObject2).type, null);
}
protected void onLayout(boolean paramBoolean, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
{
this.mListView.layout(0, 0, paramInt3 - paramInt1, paramInt4 - paramInt2);
this.mActionView.layout(0, paramInt4 - paramInt2 - this.mActionView.getMeasuredHeight(), paramInt3 - paramInt1, paramInt4 - paramInt2);
}
protected void onMeasure(int paramInt1, int paramInt2)
{
this.mListView.measure(paramInt1, paramInt2);
this.mActionView.measure(paramInt1, paramInt2);
setMeasuredDimension(View.MeasureSpec.getSize(paramInt1), View.MeasureSpec.getSize(paramInt2));
}
public void update(String paramString, Object paramObject)
{
if (paramString.equalsIgnoreCase("setData"))
{
String str = (String)paramObject;
ArrayList localArrayList = new ArrayList();
localArrayList.add(new SettingItem("推送离线消息", SettingItem.SettingType.switcher, "recvmsggroup", null, str));
this.mAdapter.setData(localArrayList);
}
}
}
/* Location: /Users/zhangxun-xy/Downloads/qingting2/classes_dex2jar.jar
* Qualified Name: fm.qingting.qtradio.view.im.profile.GroupSettingView
* JD-Core Version: 0.6.2
*/ | [
"cnzx219@qq.com"
] | cnzx219@qq.com |
a962222f22e9bb7ad04540f4578138779a007126 | b0df000c06527c2d0c6f7389cee9a9840aa9fa35 | /src/main/java/systemdesign/tinyurl/TinyURL.java | bca9c09839d9396fc95dc9e5dfca1762796e37d4 | [] | no_license | wx8900/Leetcode | f07b196f00a6c0d5672f8ed749a5d06af501a3d9 | af4175f56124c244a884d04e844e67ee352216b1 | refs/heads/master | 2020-11-24T12:10:39.286394 | 2019-12-15T06:22:42 | 2019-12-15T06:22:42 | 228,137,519 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,746 | java | package systemdesign.tinyurl;
import java.util.ArrayList;
import java.util.List;
public class TinyURL {
final static int[] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999,
99999999, 999999999, Integer.MAX_VALUE };
public static void main(String[] args) {
String longURL = "https://leetcode.com/12356423/00ds043-vd&*(&i4!dsa2$$^)(_111";
int hashCode = getHashCodeofURL(longURL);
String tinyURL = generateTinyURL(hashCode < 0 ? (-1) * hashCode : hashCode);
System.out.println("tinyURL : " + tinyURL);
}
private static int sizeOfInt(int x) {
for (int i = 0;; i++)
if (x <= sizeTable[i])
return i + 1;
}
private static String generateTinyURL(int hashCode) {
if (hashCode == -1) {
return "input longURL is null or empty!";
}
int length = sizeOfInt(hashCode);
if (length > 10) {
hashCode = Integer.parseInt(String.valueOf(hashCode).substring(0, 10));
} else if (length <= 9) {
int first = (hashCode % 100 < 10) ? 12 : hashCode % 100;
hashCode += first * 1000000000l; // add 'l' in the last is OK, add 'f' hashCode == Integer.MAX_VALUE
}
hashCode = hashCode < 0 ? (-1) * hashCode : hashCode;
String temp = "";
String result = "http://tinyurl.com/";
List<Integer> list = new ArrayList<>();
int charCount = 0;
int[] hashCodeArray = new int[]{hashCode, hashCode % 100000000, hashCode % 1000000, hashCode % 10000, hashCode % 100};
for (int i : hashCodeArray) {
int tempStr = (i < 10) ? (i + 10) : i;
int num = Integer.parseInt(String.valueOf(tempStr).substring(0, 2));
if ((num >= 48 && num <= 57) || (num >= 65 && num <= 90) || (num >= 97 && num <= 122)) {
result += String.valueOf((char)num); // 产生一个char
charCount++;
} else {
list.add(num); // 产生2个char
}
}
for (Integer in : list) {
temp += String.valueOf(in);
}
switch (charCount) {
case 5 : result += String.valueOf(hashCode % 10); break;
case 4 : result += temp; break;
case 3 : result += temp.substring(1); break;
case 2 : result += temp.substring(2); break;
case 1 : result += temp.substring(3); break;
}
return result;
}
private static int getHashCodeofURL(String longURL) {
if (longURL == null || longURL.length() == 0) {
return -1;
}
final int random = 31 * 47;
return random * longURL.hashCode() * longURL.length();
}
}
| [
"cwx8900@gmail.com"
] | cwx8900@gmail.com |
99ec018fb8ad0d05651705a566bdc8ad7556b3ec | 395e1cc6189bcea57d1c79381580471d588dc186 | /src/main/java/com/teammetallurgy/aquaculture/client/renderer/entity/model/FishMediumModel.java | eb3f5bf025bf5661bd25d14ba2cade28b2352aac | [] | no_license | MORIMORI0317/Aquaculture | 22528e5709599b435d2d56b79e4316e96658d123 | f0971564f62ccbc46595340a865c634b7c35caed | refs/heads/master | 2020-12-21T07:38:30.852513 | 2020-01-25T17:29:49 | 2020-01-25T17:29:49 | 236,360,979 | 1 | 0 | null | 2020-01-26T19:02:53 | 2020-01-26T19:02:52 | null | UTF-8 | Java | false | false | 2,955 | java | package com.teammetallurgy.aquaculture.client.renderer.entity.model;
import com.google.common.collect.ImmutableList;
import net.minecraft.client.renderer.entity.model.SegmentedModel;
import net.minecraft.client.renderer.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;
import javax.annotation.Nonnull;
public class FishMediumModel<T extends Entity> extends SegmentedModel<T> { //Based on Cod
private final ModelRenderer body;
private final ModelRenderer finTop;
private final ModelRenderer head;
private final ModelRenderer headFront;
private final ModelRenderer finRight;
private final ModelRenderer finLeft;
private final ModelRenderer tail;
private final ModelRenderer bottomFin;
public FishMediumModel() {
this.textureWidth = 32;
this.textureHeight = 32;
this.body = new ModelRenderer(this, 0, 0);
this.body.setRotationPoint(0.0F, 22.0F, 0.0F);
this.body.addBox(-1.0F, -2.0F, 0.0F, 2, 4, 7, 0.0F);
this.head = new ModelRenderer(this, 11, 0);
this.head.setRotationPoint(0.0F, 22.0F, 0.0F);
this.head.addBox(-1.0F, -2.0F, -3.0F, 2, 4, 3, 0.0F);
this.headFront = new ModelRenderer(this, 0, 0);
this.headFront.setRotationPoint(0.0F, 22.0F, -3.0F);
this.headFront.addBox(-1.0F, -2.0F, -1.0F, 2, 3, 1, 0.0F);
this.finRight = new ModelRenderer(this, 26, 4);
this.finRight.setRotationPoint(-1.0F, 23.0F, 0.0F);
this.finRight.addBox(-2.0F, 0.0F, -1.0F, 2, 0, 2, 0.0F);
this.finRight.rotateAngleZ = -0.7853981633974483F;
this.finLeft = new ModelRenderer(this, 22, 4);
this.finLeft.setRotationPoint(1.0F, 23.0F, 0.0F);
this.finLeft.addBox(0.0F, 0.0F, -1.0F, 2, 0, 2, 0.0F);
this.finLeft.rotateAngleZ = 0.7853981633974483F;
this.tail = new ModelRenderer(this, 22, 3);
this.tail.setRotationPoint(0.0F, 22.0F, 7.0F);
this.tail.addBox(0.0F, -2.0F, 0.0F, 0, 4, 4, 0.0F);
this.finTop = new ModelRenderer(this, 20, -6);
this.finTop.setRotationPoint(0.0F, 19.0F, 0.0F);
this.finTop.addBox(0.0F, -1.0F, -1.0F, 0, 2, 6, 0.0F);
this.bottomFin = new ModelRenderer(this, 20, 5);
this.bottomFin.setRotationPoint(0.0F, 25.0F, 0.0F);
this.bottomFin.addBox(0.0F, -1.0F, -1.0F, 0, 2, 6, 0.0F);
}
@Override
@Nonnull
public Iterable<ModelRenderer> getParts() {
return ImmutableList.of(this.body, this.head, this.headFront, this.finRight, this.finLeft, this.tail, this.finTop, this.bottomFin);
}
@Override
public void render(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
float movement = 1.0F;
if (!entity.isInWater()) {
movement = 1.5F;
}
this.tail.rotateAngleY = -movement * 0.45F * MathHelper.sin(0.6F * ageInTicks);
}
} | [
"faj10@msn.com"
] | faj10@msn.com |
65d5c90ea40326470d67af872761128e71f04b76 | e96172bcad99d9fddaa00c25d00a319716c9ca3a | /plugin/src/test/resources/codeInsight/daemonCodeAnalyzer/quickFix/createConstructorFromCall/afterIncompleteEnum1.java | 8b47ac0bb5414a77cd51a486b0fbcd9f8cc6d6f6 | [
"Apache-2.0"
] | permissive | consulo/consulo-java | 8c1633d485833651e2a9ecda43e27c3cbfa70a8a | a96757bc015eff692571285c0a10a140c8c721f8 | refs/heads/master | 2023-09-03T12:33:23.746878 | 2023-08-29T07:26:25 | 2023-08-29T07:26:25 | 13,799,330 | 5 | 4 | Apache-2.0 | 2023-01-03T08:32:23 | 2013-10-23T09:56:39 | Java | UTF-8 | Java | false | false | 148 | java | // "Create Constructor" "true"
public enum ReportType {
AGING("Aging"),;
ReportType(String aging) {
<selection></selection>
}
} | [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
8f6b2fb24f68f29152c8b3de3fc73c283be998a4 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-418-6-8-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/rendering/internal/renderer/xhtml/image/DefaultXHTMLImageRenderer_ESTest.java | 18059412f2505c73144455a20f1db24665fb20dc | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 606 | java | /*
* This file was automatically generated by EvoSuite
* Mon Apr 06 01:10:23 UTC 2020
*/
package org.xwiki.rendering.internal.renderer.xhtml.image;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultXHTMLImageRenderer_ESTest extends DefaultXHTMLImageRenderer_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
4d27949a04c6d71e496935d84bdccb35a452c874 | 9682e6250cb6dd3d5f3e5e1b18dc28bd2c697e68 | /testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPEmbeddedServer.java | 1bf4f80df2c7f5af2657f995332df4840ce0899d | [
"Apache-2.0"
] | permissive | ajayhirapara/keycloak | f9d2dda36e96de56b196e869618fc6bc868084eb | d74214cf56889b20023262d6fc96917eba5a2717 | refs/heads/master | 2021-01-24T02:58:40.594935 | 2015-03-03T12:03:11 | 2015-03-03T12:03:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,617 | java | package org.keycloak.testutils.ldap;
import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.text.StrSubstitutor;
import org.apache.directory.api.ldap.model.entry.DefaultEntry;
import org.apache.directory.api.ldap.model.exception.LdapEntryAlreadyExistsException;
import org.apache.directory.api.ldap.model.ldif.LdifEntry;
import org.apache.directory.api.ldap.model.ldif.LdifReader;
import org.apache.directory.api.ldap.model.schema.SchemaManager;
import org.apache.directory.server.core.api.DirectoryService;
import org.apache.directory.server.core.api.partition.Partition;
import org.apache.directory.server.core.factory.DSAnnotationProcessor;
import org.apache.directory.server.core.factory.PartitionFactory;
import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.server.protocol.shared.transport.TcpTransport;
import org.apache.directory.server.protocol.shared.transport.Transport;
import org.jboss.logging.Logger;
import org.keycloak.util.StreamUtil;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class LDAPEmbeddedServer {
private static final Logger log = Logger.getLogger(LDAPEmbeddedServer.class);
protected final String baseDN;
protected final String bindHost;
protected final int bindPort;
protected final String ldifFile;
protected DirectoryService directoryService;
protected LdapServer ldapServer;
public static void main(String[] args) throws Exception {
EmbeddedServersFactory factory = EmbeddedServersFactory.readConfiguration();
LDAPEmbeddedServer ldapEmbeddedServer = factory.createLdapServer();
ldapEmbeddedServer.init();
ldapEmbeddedServer.start();
}
public LDAPEmbeddedServer(String baseDN, String bindHost, int bindPort, String ldifFile) {
this.baseDN = baseDN;
this.bindHost = bindHost;
this.bindPort = bindPort;
this.ldifFile = ldifFile;
}
public void init() throws Exception {
log.info("Creating LDAP Directory Service. Config: baseDN=" + baseDN + ", bindHost=" + bindHost + ", bindPort=" + bindPort);
this.directoryService = createDirectoryService();
log.info("Importing LDIF: " + ldifFile);
importLdif();
log.info("Creating LDAP Server");
this.ldapServer = createLdapServer();
}
public void start() throws Exception {
log.info("Starting LDAP Server");
ldapServer.start();
log.info("LDAP Server started");
}
protected DirectoryService createDirectoryService() throws Exception {
// Parse "keycloak" from "dc=keycloak,dc=org"
String dcName = baseDN.split(",")[0].substring(3);
InMemoryDirectoryServiceFactory dsf = new InMemoryDirectoryServiceFactory();
DirectoryService service = dsf.getDirectoryService();
service.setAccessControlEnabled(false);
service.setAllowAnonymousAccess(false);
service.getChangeLog().setEnabled(false);
dsf.init(dcName + "DS");
SchemaManager schemaManager = service.getSchemaManager();
PartitionFactory partitionFactory = dsf.getPartitionFactory();
Partition partition = partitionFactory.createPartition(
schemaManager,
service.getDnFactory(),
dcName,
this.baseDN,
1000,
new File(service.getInstanceLayout().getPartitionsDirectory(), dcName));
partition.setCacheService( service.getCacheService() );
partition.initialize();
partition.setSchemaManager( schemaManager );
// Inject the partition into the DirectoryService
service.addPartition( partition );
// Last, process the context entry
String entryLdif =
"dn: " + baseDN + "\n" +
"dc: " + dcName + "\n" +
"objectClass: top\n" +
"objectClass: domain\n\n";
DSAnnotationProcessor.injectEntries(service, entryLdif);
return service;
}
protected LdapServer createLdapServer() {
LdapServer ldapServer = new LdapServer();
ldapServer.setServiceName("DefaultLdapServer");
// Read the transports
Transport ldap = new TcpTransport(this.bindHost, this.bindPort, 3, 50);
ldapServer.addTransports( ldap );
// Associate the DS to this LdapServer
ldapServer.setDirectoryService( directoryService );
// Propagate the anonymous flag to the DS
directoryService.setAllowAnonymousAccess(false);
ldapServer.setSaslHost( this.bindHost );
ldapServer.setSaslPrincipal( "ldap/" + this.bindHost + "@KEYCLOAK.ORG");
ldapServer.setSaslRealms(new ArrayList<String>());
return ldapServer;
}
private void importLdif() throws Exception {
Map<String, String> map = new HashMap<String, String>();
map.put("hostname", this.bindHost);
// For now, assume that LDIF file is on classpath
InputStream is = getClass().getClassLoader().getResourceAsStream(ldifFile);
if (is == null) {
throw new IllegalStateException("LDIF file not found on classpath. Location was: " + ldifFile);
}
final String ldifContent = StrSubstitutor.replace(StreamUtil.readString(is), map);
log.info("Content of LDIF: " + ldifContent);
final SchemaManager schemaManager = directoryService.getSchemaManager();
for (LdifEntry ldifEntry : new LdifReader(IOUtils.toInputStream(ldifContent))) {
try {
directoryService.getAdminSession().add(new DefaultEntry(schemaManager, ldifEntry.getEntry()));
} catch (LdapEntryAlreadyExistsException ignore) {
log.debug("Entry " + ldifEntry.getNewRdn() + " already exists. Ignoring");
}
}
}
public void stop() throws Exception {
stopLdapServer();
shutdownDirectoryService();
}
protected void stopLdapServer() {
log.info("Stopping LDAP server.");
ldapServer.stop();
}
protected void shutdownDirectoryService() throws Exception {
log.info("Stopping Directory service.");
directoryService.shutdown();
log.info("Removing Directory service workfiles.");
FileUtils.deleteDirectory(directoryService.getInstanceLayout().getInstanceDirectory());
}
}
| [
"mposolda@gmail.com"
] | mposolda@gmail.com |
d44bfbfc4521a70c1155bf7d4f595a8673e5c79c | bf812baa4cfd31d22d74ac7ec1a324641a991ede | /kadry/src/main/java/embeddable/Okres.java | c98b8e7e91dbd8df4e8fa23f9aad015efe1f96b6 | [] | no_license | brzaskun/NetBeansProjects | f5d0abc95a29681fab87e6a039a7f925edab3dc6 | aa67838735901cc9171c49600348eaea8e35e523 | refs/heads/masterpozmianach | 2023-08-31T23:32:37.748389 | 2023-08-30T21:30:09 | 2023-08-30T21:30:09 | 40,359,654 | 0 | 0 | null | 2023-03-27T22:22:00 | 2015-08-07T12:35:43 | Java | UTF-8 | Java | false | false | 2,050 | 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 embeddable;
import java.io.Serializable;
import java.util.Objects;
import javax.validation.constraints.NotNull;
/**
*
* @author Osito
*/
public class Okres implements Serializable{
private static final long serialVersionUID = 1L;
@NotNull
private String rok;
@NotNull
private String mc;
private String rokmc;
private int nrkolejny;
public Okres(String rok, String mc) {
this.rok = rok;
this.mc = mc;
this.rokmc = rok+mc;
}
public Okres(String rok, String mc, int lp) {
this.rok = rok;
this.mc = mc;
this.rokmc = rok+mc;
this.nrkolejny = lp;
}
@Override
public int hashCode() {
int hash = 7;
hash = 89 * hash + Objects.hashCode(this.rokmc);
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Okres other = (Okres) obj;
if (!Objects.equals(this.rokmc, other.rokmc)) {
return false;
}
return true;
}
@Override
public String toString() {
return rok + mc;
}
public String getRok() {
return rok;
}
public void setRok(String rok) {
this.rok = rok;
}
public String getMc() {
return mc;
}
public void setMc(String mc) {
this.mc = mc;
}
public String getRokmc() {
return rokmc;
}
public void setRokmc(String rokmc) {
this.rokmc = rokmc;
}
public int getNrkolejny() {
return nrkolejny;
}
public void setNrkolejny(int nrkolejny) {
this.nrkolejny = nrkolejny;
}
}
| [
"Osito@DESKTOP-DVFG0DI"
] | Osito@DESKTOP-DVFG0DI |
8e6b922296053accf7a5d748fd7a02f214d3d4a0 | c6a0f71bc10963e445360392fafc1506cc470404 | /pride-inspector/branches/mzidentml/src/main/java/uk/ac/ebi/pride/gui/task/impl/OpenMyAssayTask.java | 4c215dc88fb4cd7c2e8d521685dafaeaf813adf7 | [] | no_license | PRIDE-Toolsuite/old-pride-toolsuite | 2d93fcef247a42343b661c9e3bf6310389e924fb | cac6b82d51b177eabc2c475c2c0e276aa485fd67 | refs/heads/master | 2021-01-17T05:56:19.073023 | 2015-03-02T09:59:23 | 2015-03-02T09:59:23 | 33,008,557 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 612 | java | package uk.ac.ebi.pride.gui.task.impl;
import uk.ac.ebi.pride.gui.task.Task;
import uk.ac.ebi.pride.gui.task.TaskUtil;
/**
* @author Rui Wang
* @version $Id$
*/
public class OpenMyAssayTask extends OpenMyProjectTask {
public OpenMyAssayTask(String accession, String username, char[] password) {
super(accession, username, password);
}
@Override
protected void getFileMetadata(String un, char[] pwd, String accession) {
Task task = new GetMyAssayFilesMetadataTask(un, pwd, accession);
task.addTaskListener(this);
TaskUtil.startBackgroundTask(task);
}
}
| [
"harry.r.wang@gmail.com"
] | harry.r.wang@gmail.com |
c0eecc672716d4795aa281cb1c64fc8530f4c052 | 416c55caa8ad734989ba9af13efa5c3e8238c613 | /app/src/main/java/com/teacherhelp/adapter/TLRAdapter.java | 1000c7578b99a2f9d4d46d5ec2a26271b22283b6 | [] | no_license | Yangyuyangyu/WRETeacherTwoEdition | e7333eb854d33bb4a0c88b45a7f2b6f4dd2ba6a7 | e2e768e37b6d438826b6518e26ec4dda3ac41b51 | refs/heads/master | 2020-01-23T21:58:22.784982 | 2016-11-25T03:44:43 | 2016-11-25T03:44:43 | 74,723,483 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,623 | java | package com.teacherhelp.adapter;
import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.teacherhelp.R;
import com.teacherhelp.base.BaseRecyclerAdapter;
import com.teacherhelp.base.BaseRecyclerViewHolder;
import com.teacherhelp.bean.ClassBean;
import java.util.ArrayList;
import butterknife.Bind;
import butterknife.ButterKnife;
/**
* 名称:教师请假记录适配器
* 作用:展示教师请假的记录
* Created on 2016/7/28.
* 创建人:WangHaoMiao
*/
public class TLRAdapter extends BaseRecyclerAdapter {
private Activity context;
private ArrayList<ClassBean> datas;
public TLRAdapter(Activity context, ArrayList<ClassBean> datas) {
super(context, datas);
this.context = context;
this.datas=datas;
}
@Override
protected void showViewHolder(BaseRecyclerViewHolder holder, final int position) {
final ViewHolder viewHolder = (ViewHolder) holder;
final ClassBean bean = (ClassBean) mDatas.get(position);
viewHolder.TvTime.setText(bean.getName());
if (mOnItemClickListener != null) {
viewHolder.RlItem.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mOnItemClickListener.onItemClick(viewHolder.itemView, position,null);
}
});
// 长点击事件
viewHolder.RlItem.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
mOnItemClickListener.onItemLongClick(viewHolder.itemView, position,null);
return true;
}
});
}
}
@Override
protected BaseRecyclerViewHolder createViewHOldeHolder(ViewGroup parent, int viewType) {
View mView = null;
BaseRecyclerViewHolder mViewHolder = null;
mView = mInflater.inflate(R.layout.recyclerview_teachleave, parent, false);
mViewHolder = new ViewHolder(mView);
return mViewHolder;
}
static class ViewHolder extends BaseRecyclerViewHolder {
@Bind(R.id.tv_time)
TextView TvTime;
@Bind(R.id.tv_type)
TextView TvType;
@Bind(R.id.rl_item)
RelativeLayout RlItem;
ViewHolder(View view) {
super(view);
ButterKnife.bind(this, view);
}
}
}
| [
"394975750@qq.com"
] | 394975750@qq.com |
6136fb5c6a8a96493d55e84c8f87441a00f536e8 | 1c59677b633d2b64f10f8ad6e46905f1c15745c1 | /wallet-app/src/main/java/com/cus/jastip/wallet/web/rest/errors/InternalServerErrorException.java | 2fcf5553907d92eb2a2eb01ac755939362fb15d9 | [] | no_license | elvistj10/new-jastip | 3a430dce4578b40d5be8c345692e65e389f1e473 | 33477d059e1a15f060049d46a68919fedce6c31b | refs/heads/master | 2020-04-12T22:06:34.924049 | 2018-12-22T04:52:12 | 2018-12-22T04:52:12 | 162,781,767 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 452 | java | package com.cus.jastip.wallet.web.rest.errors;
import org.zalando.problem.AbstractThrowableProblem;
import org.zalando.problem.Status;
/**
* Simple exception with a message, that returns an Internal Server Error code.
*/
public class InternalServerErrorException extends AbstractThrowableProblem {
public InternalServerErrorException(String message) {
super(ErrorConstants.DEFAULT_TYPE, message, Status.INTERNAL_SERVER_ERROR);
}
}
| [
"elvistenthjune@gmil.com"
] | elvistenthjune@gmil.com |
caab493105a6edfe7ec27ef3c25f32e6684fd89e | 0360d6b364854f6a25cc823c663ad85e8d76d44a | /app/src/main/java/com/xiaomai/ageny/bean/DeviceAllotedDetailsBean.java | 639a4229eaa65e0f31463ab3fead69d3403244c3 | [] | no_license | youareapig/JingZhu_Agency | 0e8bd52cb8b6de38b40a1e1e788b52fcd5886163 | 854e8093b54770f236fc59808b8b01a63bee3a21 | refs/heads/master | 2020-05-07T16:48:15.926541 | 2019-06-04T09:01:12 | 2019-06-04T09:01:12 | 180,694,607 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,204 | java | package com.xiaomai.ageny.bean;
import java.util.List;
public class DeviceAllotedDetailsBean {
/**
* code : 1
* data : {"bushu":"已部署","fenpeitime":"2019-05-17 15:24:30","lingquren":"一代直商1","lingqurenmobile":"17032224444","list":[{"level":"1","name":"徐碧"},{"level":"2","name":"一代个人1"},{"level":"9","name":"一代直商名1"}],"zhiliutime":""}
* message : 2.19设备管理--已分配设备--设备详情
*/
private int code;
private DataBean data;
private String message;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public static class DataBean {
/**
* bushu : 已部署
* fenpeitime : 2019-05-17 15:24:30
* lingquren : 一代直商1
* lingqurenmobile : 17032224444
* list : [{"level":"1","name":"徐碧"},{"level":"2","name":"一代个人1"},{"level":"9","name":"一代直商名1"}]
* zhiliutime :
*/
private String bushu;
private String fenpeitime;
private String lingquren;
private String lingqurenmobile;
private String zhiliutime;
private List<ListBean> list;
public String getBushu() {
return bushu;
}
public void setBushu(String bushu) {
this.bushu = bushu;
}
public String getFenpeitime() {
return fenpeitime;
}
public void setFenpeitime(String fenpeitime) {
this.fenpeitime = fenpeitime;
}
public String getLingquren() {
return lingquren;
}
public void setLingquren(String lingquren) {
this.lingquren = lingquren;
}
public String getLingqurenmobile() {
return lingqurenmobile;
}
public void setLingqurenmobile(String lingqurenmobile) {
this.lingqurenmobile = lingqurenmobile;
}
public String getZhiliutime() {
return zhiliutime;
}
public void setZhiliutime(String zhiliutime) {
this.zhiliutime = zhiliutime;
}
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public static class ListBean {
/**
* level : 1
* name : 徐碧
*/
private String level;
private String name;
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
}
}
| [
"840855165@qq.com"
] | 840855165@qq.com |
4a9a9b22c9c02d5d19c7929c711625d495105f49 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-14263-60-16-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest_scaffolding.java | 8e56892580d22a26d28be5bc21ae7c38014466c0 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 459 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 03:08:50 UTC 2020
*/
package com.xpn.xwiki.internal.template;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class InternalTemplateManager_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
ad37ea2b9f9a30e35f91d8d9e2a59fa7c92d80d8 | e2d561bdc62d61642979863ee2a972bfdf2e2da8 | /sample/src/main/java/com/twiceyuan/commonadapter/sample/viewTypeSample/ViewTypeSampleActivity.java | 79dfbb76d51d621ba231adc4417af60ae754405c | [
"Apache-2.0"
] | permissive | freemindhack/CommonAdapter | 19e9a66331d104b274a0f464e79349eeb55f3c76 | 2515584ca3df6ed0826a2481c6bdb29eea63d19f | refs/heads/master | 2020-04-07T20:26:32.121945 | 2017-12-09T17:44:39 | 2017-12-09T17:44:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,562 | java | package com.twiceyuan.commonadapter.sample.viewTypeSample;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.Toast;
import com.twiceyuan.commonadapter.library.adapter.CommonAdapter;
import com.twiceyuan.commonadapter.library.adapter.MultiTypeAdapter;
import com.twiceyuan.commonadapter.library.adapter.ViewTypeItem;
import com.twiceyuan.commonadapter.sample.R;
import com.twiceyuan.commonadapter.sample.viewTypeSample.holder.ArticleHolder;
import com.twiceyuan.commonadapter.sample.viewTypeSample.holder.PhotoHolder;
import com.twiceyuan.commonadapter.sample.viewTypeSample.model.Article;
import com.twiceyuan.commonadapter.sample.viewTypeSample.model.Photo;
/**
* Created by twiceYuan on 3/4/16.
* Email: i@twiceyuan.com
* Site: http://twiceyuan.com
* <p/>
* 多个 ViewType 的 RecyclerView Adapter 实例
*/
public class ViewTypeSampleActivity extends AppCompatActivity {
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_type_sample);
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
assert recyclerView != null;
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
// 构造器中提供,数据和 Holder 的关系映射,可以设定多种 Holder 在一个 Recycler 中,原理是使用 viewType
final MultiTypeAdapter adapter;
adapter = new MultiTypeAdapter(this);
adapter.registerViewType(Photo.class, PhotoHolder.class);
adapter.registerViewType(Article.class, ArticleHolder.class);
recyclerView.setAdapter(adapter);
new Thread(new Runnable() {
@Override public void run() {
for (int i = 0; i < 10000; i++) {
adapter.add(mockArticle());
adapter.add(mockArticle());
adapter.add(mockPhoto());
}
runOnUiThread(new Runnable() {
@Override public void run() {
adapter.notifyDataSetChanged();
}
});
}
}).start();
adapter.setOnItemClickListener(new CommonAdapter.OnItemClickListener<ViewTypeItem>() {
@Override public void onClick(int position, ViewTypeItem item) {
if (item instanceof Article) {
Toast.makeText(ViewTypeSampleActivity.this, "你点击了一篇文章,位置" + position, Toast.LENGTH_SHORT).show();
}
if (item instanceof Photo) {
Toast.makeText(ViewTypeSampleActivity.this, "你点击了一张照片,位置" + position, Toast.LENGTH_SHORT).show();
}
}
});
adapter.addHolderListener(Article.class, ArticleHolder.class, new CommonAdapter.OnBindListener<Article, ArticleHolder>() {
@Override public void onBind(int position, Article article, ArticleHolder holder) {
holder.textTitle.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Toast.makeText(ViewTypeSampleActivity.this, "你点击了文章的标题", Toast.LENGTH_SHORT).show();
}
});
}
});
adapter.addHolderListener(Photo.class, PhotoHolder.class, new CommonAdapter.OnBindListener<Photo, PhotoHolder>() {
@Override public void onBind(int position, Photo photo, PhotoHolder holder) {
holder.imagePicture.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Toast.makeText(ViewTypeSampleActivity.this, "你点击了一张图片", Toast.LENGTH_SHORT).show();
}
});
}
});
}
public Article mockArticle() {
Article article = new Article();
article.title = getString(R.string.mock_article_title);
article.content = getString(R.string.mock_article_content);
return article;
}
public Photo mockPhoto() {
Photo photo = new Photo();
photo.photoId = R.drawable.img_sample;
photo.description = getString(R.string.mock_image_desc);
return photo;
}
}
| [
"twiceyuan@gmail.com"
] | twiceyuan@gmail.com |
4ab48c6b39449ba046840826deff2f30dfd60297 | 732f633c79851521d94e1760cf85652dfdf0edc8 | /app/src/main/java/com/bj/eduteacher/school/list/adapter/SchoolAdapter.java | 14a766d50dfde6e72a82d9d8ac43ccd8a5512f87 | [] | no_license | 897903718/douhaolaoshi | 57cade5aaa923048ab81fbc5452745c1bc23291a | b41fed9c4cf1a4867545cfe1d75c46c2e0a43259 | refs/heads/master | 2020-03-24T09:55:13.689208 | 2018-07-20T01:35:27 | 2018-07-20T01:35:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,122 | java | package com.bj.eduteacher.school.list.adapter;
import android.support.annotation.Nullable;
import com.bj.eduteacher.R;
import com.bj.eduteacher.school.list.model.School;
import com.bj.eduteacher.zzautolayout.utils.AutoUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.facebook.drawee.view.SimpleDraweeView;
import java.util.List;
import static com.bj.eduteacher.api.HttpUtilService.BASE_RESOURCE_URL;
/**
* Created by Administrator on 2018/6/14 0014.
*/
public class SchoolAdapter extends BaseQuickAdapter<School.DataBean, BaseViewHolder> {
public SchoolAdapter(int layoutResId, @Nullable List<School.DataBean> data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, School.DataBean item) {
AutoUtils.auto(helper.itemView);
SimpleDraweeView sv =helper.getView(R.id.iv_picture);
sv.setImageURI(BASE_RESOURCE_URL+item.getSchoolimg());
helper.setText(R.id.tv_name,item.getName());
helper.setText(R.id.tv_quyu,item.getShengfen());
}
}
| [
"15612770087@163.com"
] | 15612770087@163.com |
0e31990dbc77f554e231f3599d5be2f531d95b7d | 3cd10b464385a0c3d694b3a73fc4c53851cc023b | /webflux-webclient/src/main/java/com/laibao/spring/reactive/webflux/webclient/interfaces/ProxyCreator.java | 5968344032c28b4f055a63cb1994ecdc3c7d12ad | [] | no_license | wanglaibao/springboot2-in-action | acd57fc38e7e43b7b96ad152c92e82a906398421 | 644548b3cba5e21c09b4c54ac3dbd5bc6015f265 | refs/heads/master | 2021-01-25T14:09:53.851965 | 2019-04-01T07:58:55 | 2019-04-01T07:58:55 | 123,655,338 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 356 | java | package com.laibao.spring.reactive.webflux.webclient.interfaces;
/**
* 创建代理类【代理对象】的接口
*/
public interface ProxyCreator {
/**
* 根据接口类型来创建代理类【代理对象】实例对象
* @param clazz
* @return
*/
Object createProxy(Class<?> clazz);
//T createProxy(Class<?> clazz);
}
| [
"wanglaibao2010@gmail.com"
] | wanglaibao2010@gmail.com |
d6f346f9b7115c2da92d45dd7ae2e19e7c0bea9e | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/training/org/ehcache/impl/persistence/DefaultLocalPersistenceServiceTest.java | eb4adf6f39c2a5d7203779e81eeb95d75500633f | [] | no_license | STAMP-project/dspot-experiments | f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5 | 121487e65cdce6988081b67f21bbc6731354a47f | refs/heads/master | 2023-02-07T14:40:12.919811 | 2019-11-06T07:17:09 | 2019-11-06T07:17:09 | 75,710,758 | 14 | 19 | null | 2023-01-26T23:57:41 | 2016-12-06T08:27:42 | null | UTF-8 | Java | false | false | 5,803 | java | /**
* Copyright Terracotta, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ehcache.impl.persistence;
import java.io.File;
import java.io.IOException;
import org.ehcache.CachePersistenceException;
import org.ehcache.core.spi.service.LocalPersistenceService;
import org.ehcache.impl.config.persistence.DefaultPersistenceConfiguration;
import org.ehcache.impl.internal.util.FileExistenceMatchers;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
public class DefaultLocalPersistenceServiceTest {
@Rule
public final ExpectedException expectedException = ExpectedException.none();
@Rule
public final TemporaryFolder folder = new TemporaryFolder();
private File testFolder;
@Test
public void testFailsIfDirectoryExistsButNotWritable() throws IOException {
Assume.assumeTrue(testFolder.setWritable(false));
try {
try {
final DefaultLocalPersistenceService service = new DefaultLocalPersistenceService(new DefaultPersistenceConfiguration(testFolder));
service.start(null);
Assert.fail("Expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
MatcherAssert.assertThat(e.getMessage(), Matchers.equalTo(("Location isn't writable: " + (testFolder.getAbsolutePath()))));
}
} finally {
testFolder.setWritable(true);
}
}
@Test
public void testFailsIfFileExistsButIsNotDirectory() throws IOException {
File f = folder.newFile("testFailsIfFileExistsButIsNotDirectory");
try {
final DefaultLocalPersistenceService service = new DefaultLocalPersistenceService(new DefaultPersistenceConfiguration(f));
service.start(null);
Assert.fail("Expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
MatcherAssert.assertThat(e.getMessage(), Matchers.equalTo(("Location is not a directory: " + (f.getAbsolutePath()))));
}
}
@Test
public void testFailsIfDirectoryDoesNotExistsAndIsNotCreated() throws IOException {
Assume.assumeTrue(testFolder.setWritable(false));
try {
File f = new File(testFolder, "notallowed");
try {
final DefaultLocalPersistenceService service = new DefaultLocalPersistenceService(new DefaultPersistenceConfiguration(f));
service.start(null);
Assert.fail("Expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
MatcherAssert.assertThat(e.getMessage(), Matchers.equalTo(("Directory couldn't be created: " + (f.getAbsolutePath()))));
}
} finally {
testFolder.setWritable(true);
}
}
@Test
public void testLocksDirectoryAndUnlocks() throws IOException {
final DefaultLocalPersistenceService service = new DefaultLocalPersistenceService(new DefaultPersistenceConfiguration(testFolder));
service.start(null);
MatcherAssert.assertThat(service.getLockFile().exists(), Matchers.is(true));
service.stop();
MatcherAssert.assertThat(service.getLockFile().exists(), Matchers.is(false));
}
@Test
public void testPhysicalDestroy() throws IOException, CachePersistenceException {
final File f = folder.newFolder("testPhysicalDestroy");
final DefaultLocalPersistenceService service = new DefaultLocalPersistenceService(new DefaultPersistenceConfiguration(f));
service.start(null);
MatcherAssert.assertThat(service.getLockFile().exists(), Matchers.is(true));
MatcherAssert.assertThat(f, FileExistenceMatchers.isLocked());
LocalPersistenceService.SafeSpaceIdentifier id = service.createSafeSpaceIdentifier("test", "test");
service.createSafeSpace(id);
MatcherAssert.assertThat(f, FileExistenceMatchers.containsCacheDirectory("test", "test"));
// try to destroy the physical space without the logical id
LocalPersistenceService.SafeSpaceIdentifier newId = service.createSafeSpaceIdentifier("test", "test");
service.destroySafeSpace(newId, false);
MatcherAssert.assertThat(f, Matchers.not(FileExistenceMatchers.containsCacheDirectory("test", "test")));
service.stop();
MatcherAssert.assertThat(f, Matchers.not(FileExistenceMatchers.isLocked()));
}
@Test
public void testExclusiveLock() throws IOException {
DefaultLocalPersistenceService service1 = new DefaultLocalPersistenceService(new DefaultPersistenceConfiguration(testFolder));
DefaultLocalPersistenceService service2 = new DefaultLocalPersistenceService(new DefaultPersistenceConfiguration(testFolder));
service1.start(null);
// We should not be able to lock the same directory twice
// And we should receive a meaningful exception about it
expectedException.expectMessage(("Persistence directory already locked by this process: " + (testFolder.getAbsolutePath())));
service2.start(null);
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
f2139dc012440df9c9cb36434c26a370f35e8bfd | 15967180997939687404c39475ad5073480ed675 | /src/main/java/io/jboot/utils/EncryptCookieUtils.java | ccb17735ab6ff7b7463f2508caf1190c136dbda9 | [
"Apache-2.0"
] | permissive | jekey/jboot | 4c9fe5258c9af44a0c7e1f83a5fc06f9f5dfacd4 | 4869553f52d5dd8dd15577854af0f40838633bba | refs/heads/master | 2021-01-06T20:44:40.055251 | 2017-11-23T08:18:41 | 2017-11-23T08:18:41 | 99,553,857 | 1 | 0 | null | 2017-11-23T08:18:42 | 2017-08-07T08:14:18 | Java | UTF-8 | Java | false | false | 6,313 | java | /**
* Copyright (c) 2015-2017, Michael Yang 杨福海 (fuhai999@gmail.com).
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.jboot.utils;
import com.jfinal.core.Controller;
import com.jfinal.kit.Base64Kit;
import com.jfinal.kit.HashKit;
import com.jfinal.log.Log;
import java.math.BigInteger;
/**
* 参考:spring-security
* https://github.com/spring-projects/spring-security/
* blob/master/web/src/main/java/org/springframework/security/
* web/authentication/rememberme/TokenBasedRememberMeServices.java
* ....AbstractRememberMeServices.java
* <p>
* 加密的cookie工具类
*/
public class EncryptCookieUtils {
private final static String COOKIE_SEPARATOR = "#JBOOT#";
private static String COOKIE_ENCRYPT_KEY = "#JBOOT#";
private static Log log = Log.getLog(EncryptCookieUtils.class);
/**
* 在使用之前,小调用此方法进行加密key的设置
*
* @param key
*/
public static void initEncryptKey(String key) {
COOKIE_ENCRYPT_KEY = key;
}
public static void put(Controller ctr, String key, String value) {
put(ctr, key, value, 60 * 60 * 24 * 7);
}
public static void put(Controller ctr, String key, Object value) {
put(ctr, key, value.toString());
}
public static void put(Controller ctr, String key, String value, int maxAgeInSeconds) {
String cookie = buildCookieValue(value, maxAgeInSeconds);
ctr.setCookie(key, cookie, maxAgeInSeconds);
}
public static void put(Controller ctr, String key, String value, String domain) {
put(ctr, key, value, 60 * 60 * 24 * 7, domain);
}
public static void put(Controller ctr, String key, String value, int maxAgeInSeconds, String domain) {
String cookie = buildCookieValue(value, maxAgeInSeconds);
ctr.setCookie(key, cookie, maxAgeInSeconds, null, domain, false);
}
public static void remove(Controller ctr, String key) {
ctr.removeCookie(key);
}
public static void remove(Controller ctr, String key, String path, String domain) {
ctr.removeCookie(key, path, domain);
}
public static String get(Controller ctr, String key) {
String encrypt_key = COOKIE_ENCRYPT_KEY;
String cookieValue = ctr.getCookie(key);
if (cookieValue == null) {
return null;
}
String value = new String(Base64Kit.decode(cookieValue));
return getFromCookieInfo(encrypt_key, value);
}
private static String buildCookieValue(String value, int maxAgeInSeconds) {
String encrypt_key = COOKIE_ENCRYPT_KEY;
long saveTime = System.currentTimeMillis();
String encrypt_value = encrypt(encrypt_key, saveTime, maxAgeInSeconds + "", value);
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(encrypt_value);
stringBuilder.append(COOKIE_SEPARATOR);
stringBuilder.append(saveTime);
stringBuilder.append(COOKIE_SEPARATOR);
stringBuilder.append(maxAgeInSeconds);
stringBuilder.append(COOKIE_SEPARATOR);
stringBuilder.append(value);
return Base64Kit.encode(stringBuilder.toString());
}
private static String encrypt(String encrypt_key, long saveTime, String maxAgeInSeconds, String value) {
if ("#JBOOT#".equals(encrypt_key)) {
log.warn("warn!!! encrypt key is defalut value. please invoke EncryptCookieUtils.initEncryptKey(key) method before.");
}
return HashKit.md5(encrypt_key + saveTime + maxAgeInSeconds + value);
}
public static String getFromCookieInfo(String encrypt_key, String cookieValue) {
if (StringUtils.isNotBlank(cookieValue)) {
String cookieStrings[] = cookieValue.split(COOKIE_SEPARATOR);
if (null != cookieStrings && 4 == cookieStrings.length) {
String encrypt_value = cookieStrings[0];
String saveTime = cookieStrings[1];
String maxAgeInSeconds = cookieStrings[2];
String value = cookieStrings[3];
String encrypt = encrypt(encrypt_key, Long.valueOf(saveTime), maxAgeInSeconds, value);
// 保证 cookie 不被人为修改
if (encrypt_value != null && encrypt_value.equals(encrypt)) {
long stime = Long.parseLong(saveTime);
long maxtime = Long.parseLong(maxAgeInSeconds) * 1000;
// 查看是否过时
if ((stime + maxtime) - System.currentTimeMillis() > 0) {
return value;
}
}
}
}
return null;
}
public static Long getLong(Controller ctr, String key) {
String value = get(ctr, key);
return null == value ? null : Long.parseLong(value);
}
public static long getLong(Controller ctr, String key, long defalut) {
String value = get(ctr, key);
return null == value ? defalut : Long.parseLong(value);
}
public static Integer getInt(Controller ctr, String key) {
String value = get(ctr, key);
return null == value ? null : Integer.parseInt(value);
}
public static int getInt(Controller ctr, String key, int defalut) {
String value = get(ctr, key);
return null == value ? defalut : Integer.parseInt(value);
}
public static BigInteger getBigInteger(Controller ctr, String key) {
String value = get(ctr, key);
return null == value ? null : new BigInteger(value);
}
public static BigInteger getBigInteger(Controller ctr, String key, BigInteger defalut) {
String value = get(ctr, key);
return null == value ? defalut : new BigInteger(value);
}
}
| [
"fuhai999@gmail.com"
] | fuhai999@gmail.com |
01d9ff851465d4b1400622566c49bf9f2978e2e7 | a3a54e8c694730ea5ae071cc198db50582ca7ab6 | /学习笔记/Android notes/1.基础/【黑马52】day28_Android应用开发-网络编程/code/PostSubmit/gen/com/example/postsubmit/BuildConfig.java | 3d2ffb92fee0c0647be8f10a209aec5363ba22d9 | [] | no_license | zhhqiang9198/Giovani-resource | 3f807c97f231a00b694a1bd8adaa7816aab90af4 | aa30dcac2af0b34c6f14f55635199a9319ef3685 | refs/heads/master | 2021-10-18T17:15:22.759832 | 2019-01-16T10:01:20 | 2019-01-16T10:01:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 164 | java | /** Automatically generated file. DO NOT MODIFY */
package com.example.postsubmit;
public final class BuildConfig {
public final static boolean DEBUG = true;
} | [
"15219331778@163.com"
] | 15219331778@163.com |
1245727308c55ca86cf4a041ae05e13c2400ae8e | 49e8c251b9379f7aa9203bd44030ccc3d8fcdeff | /src/main/java/com/mycompany/test02/config/SecurityConfiguration.java | 0259a8a18b97d3a120aa3424e1753d22c9b73847 | [] | no_license | kberisha/jhipster-sample-test02 | 08975fc0e8c95cd09baf5a1f82c2e9495430ee49 | 31577ab379e536c1a59ebc68963f2be7f154ac0b | refs/heads/main | 2023-07-13T16:52:22.513184 | 2021-08-23T11:44:50 | 2021-08-23T11:44:50 | 399,081,637 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,463 | java | package com.mycompany.test02.config;
import com.mycompany.test02.security.*;
import com.mycompany.test02.security.SecurityUtils;
import com.mycompany.test02.security.oauth2.AudienceValidator;
import com.mycompany.test02.security.oauth2.CustomClaimConverter;
import com.mycompany.test02.security.oauth2.JwtGrantedAuthorityConverter;
import java.util.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.core.convert.converter.Converter;
import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper;
import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
import org.springframework.security.oauth2.core.DelegatingOAuth2TokenValidator;
import org.springframework.security.oauth2.core.OAuth2TokenValidator;
import org.springframework.security.oauth2.core.oidc.user.OidcUserAuthority;
import org.springframework.security.oauth2.jwt.*;
import org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationConverter;
import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
import org.springframework.security.web.csrf.CsrfFilter;
import org.springframework.security.web.header.writers.ReferrerPolicyHeaderWriter;
import org.springframework.web.filter.CorsFilter;
import org.zalando.problem.spring.web.advice.security.SecurityProblemSupport;
import tech.jhipster.config.JHipsterProperties;
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
@Import(SecurityProblemSupport.class)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
private final JHipsterProperties jHipsterProperties;
private final CorsFilter corsFilter;
@Value("${spring.security.oauth2.client.provider.oidc.issuer-uri}")
private String issuerUri;
private final SecurityProblemSupport problemSupport;
public SecurityConfiguration(CorsFilter corsFilter, JHipsterProperties jHipsterProperties, SecurityProblemSupport problemSupport) {
this.corsFilter = corsFilter;
this.problemSupport = problemSupport;
this.jHipsterProperties = jHipsterProperties;
}
@Override
public void configure(WebSecurity web) {
web
.ignoring()
.antMatchers(HttpMethod.OPTIONS, "/**")
.antMatchers("/app/**/*.{js,html}")
.antMatchers("/i18n/**")
.antMatchers("/content/**")
.antMatchers("/h2-console/**")
.antMatchers("/swagger-ui/**")
.antMatchers("/test/**");
}
@Override
public void configure(HttpSecurity http) throws Exception {
// @formatter:off
http
.csrf()
.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
.and()
.addFilterBefore(corsFilter, CsrfFilter.class)
.exceptionHandling()
.authenticationEntryPoint(problemSupport)
.accessDeniedHandler(problemSupport)
.and()
.headers()
.contentSecurityPolicy(jHipsterProperties.getSecurity().getContentSecurityPolicy())
.and()
.referrerPolicy(ReferrerPolicyHeaderWriter.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN)
.and()
.featurePolicy("geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'self'; payment 'none'")
.and()
.frameOptions()
.deny()
.and()
.authorizeRequests()
.antMatchers("/api/authenticate").permitAll()
.antMatchers("/api/auth-info").permitAll()
.antMatchers("/api/admin/**").hasAuthority(AuthoritiesConstants.ADMIN)
.antMatchers("/api/**").authenticated()
.antMatchers("/management/health").permitAll()
.antMatchers("/management/health/**").permitAll()
.antMatchers("/management/info").permitAll()
.antMatchers("/management/prometheus").permitAll()
.antMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN)
.and()
.oauth2Login()
.and()
.oauth2ResourceServer()
.jwt()
.jwtAuthenticationConverter(authenticationConverter())
.and()
.and()
.oauth2Client();
// @formatter:on
}
Converter<Jwt, AbstractAuthenticationToken> authenticationConverter() {
JwtAuthenticationConverter jwtAuthenticationConverter = new JwtAuthenticationConverter();
jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter(new JwtGrantedAuthorityConverter());
return jwtAuthenticationConverter;
}
/**
* Map authorities from "groups" or "roles" claim in ID Token.
*
* @return a {@link GrantedAuthoritiesMapper} that maps groups from
* the IdP to Spring Security Authorities.
*/
@Bean
public GrantedAuthoritiesMapper userAuthoritiesMapper() {
return authorities -> {
Set<GrantedAuthority> mappedAuthorities = new HashSet<>();
authorities.forEach(
authority -> {
// Check for OidcUserAuthority because Spring Security 5.2 returns
// each scope as a GrantedAuthority, which we don't care about.
if (authority instanceof OidcUserAuthority) {
OidcUserAuthority oidcUserAuthority = (OidcUserAuthority) authority;
mappedAuthorities.addAll(SecurityUtils.extractAuthorityFromClaims(oidcUserAuthority.getUserInfo().getClaims()));
}
}
);
return mappedAuthorities;
};
}
@Bean
JwtDecoder jwtDecoder(ClientRegistrationRepository clientRegistrationRepository, RestTemplateBuilder restTemplateBuilder) {
NimbusJwtDecoder jwtDecoder = (NimbusJwtDecoder) JwtDecoders.fromOidcIssuerLocation(issuerUri);
OAuth2TokenValidator<Jwt> audienceValidator = new AudienceValidator(jHipsterProperties.getSecurity().getOauth2().getAudience());
OAuth2TokenValidator<Jwt> withIssuer = JwtValidators.createDefaultWithIssuer(issuerUri);
OAuth2TokenValidator<Jwt> withAudience = new DelegatingOAuth2TokenValidator<>(withIssuer, audienceValidator);
jwtDecoder.setJwtValidator(withAudience);
jwtDecoder.setClaimSetConverter(
new CustomClaimConverter(clientRegistrationRepository.findByRegistrationId("oidc"), restTemplateBuilder.build())
);
return jwtDecoder;
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
d74f4a6e0f57c1de0e0762de53bd58f7d4fadd63 | 358588de52a2ad83dc30418b0b022ba121d060db | /src/test/java/com/victormeng/leetcode/design_add_and_search_words_data_structure/Tester.java | 8f55e6c1960a32a870b9c315656c9e876bcc671d | [
"MIT"
] | permissive | victormeng24/LeetCode-Java | c53e852ea47049328397e4896319edd0ce0cf48a | 16bc2802e89d5c9d6450d598f0f41a7f6261d7b6 | refs/heads/master | 2023-08-05T02:33:18.990663 | 2021-02-04T13:31:48 | 2021-02-04T13:31:48 | 327,479,246 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,156 | java | /**
* Leetcode - design_add_and_search_words_data_structure
*/
package com.victormeng.leetcode.design_add_and_search_words_data_structure;
import java.util.*;
import com.ciaoshen.leetcode.util.*;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
import org.junit.BeforeClass;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@RunWith(Parameterized.class)
public class Tester {
/**=========================== static for every test cases ============================== */
// Solution instance to test
private static Solution solution;
// use this Object to print the log (call from slf4j facade)
private static final Logger LOGGER = LoggerFactory.getLogger(TesterRunner.class);
/** Execute once before any of the test methods in this class. */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
/* uncomment to switch solutions */
solution = new Solution1();
// solution = new Solution2();
}
/** Execute once after all of the test methods are executed in this class. */
@AfterClass
public static void tearDownAfterClass() throws Exception {}
/** Initialize test cases */
@Parameters
public static Collection<Object[]> testcases() {
return Arrays.asList(new Object[][]{
// {}, // test case 1 (init parameters below: {para1, para2, expected})
// {}, // test case 2 (init parameters below: {para1, para2, expected})
// {} // test case 3 (init parameters below: {para1, para2, expected})
});
}
/**=========================== for each test case ============================== */
/**
* Parameters for each test (initialized in testcases() method)
* You can change the type of parameters
*/
// private Object para1; // parameter 1
// private Object para2; // parameter 2
// private Object expected; // parameter 3 (expected answer)
/** This constructor must be provided to run parameterized test. */
public Tester(Object para1, Object para2, Object expected) {
// initialize test parameters
// this.para1 = para1;
// this.para2 = para2;
// this.expected = expected;
}
/** Execute before each test method in this class is executed. */
@Before
public void setUp() throws Exception {}
/** Executed as a test case. */
@Test
public void test() {
//
// Object actual = solution.your-method(para1, para2);
//
// assertThat(actual, is(equalTo(expected)));
//
// if (LOGGER.isDebugEnabled()) {
// LOGGER.debug("your-method() pass unit test!");
// }
}
/** Execute after each test method in this class is executed. */
@After
public void tearDown() throws Exception {}
}
| [
"victormeng24@gmail.com"
] | victormeng24@gmail.com |
9af59747675dd026de15902b70d8e516e8dc92ae | f86938ea6307bf6d1d89a07b5b5f9e360673d9b8 | /CodeComment_Data/Code_Jam/val/Revenge_of_the_Pancakes/S/Main(135).java | 14f51a71e1d7ef3c294f5e609a2cb397b1208599 | [] | no_license | yxh-y/code_comment_generation | 8367b355195a8828a27aac92b3c738564587d36f | 2c7bec36dd0c397eb51ee5bd77c94fa9689575fa | refs/heads/master | 2021-09-28T18:52:40.660282 | 2018-11-19T14:54:56 | 2018-11-19T14:54:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 963 | java | package methodEmbedding.Revenge_of_the_Pancakes.S.LYD447;
import java.io.*;
import java.util.*;
import java.math.*;
import java.text.*;
public class Main
{
public static void main(String[] args)throws java.lang.Exception
{
//BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//PrintWriter out=new PrintWriter(System.out);
BufferedReader in = new BufferedReader(new FileReader("B-small-attempt4.in"));
PrintWriter out=new PrintWriter("output.txt");
int t,x1,len,i,j,ans;
String str,str1;
t=Integer.parseInt(in.readLine().trim());
for(x1=0;x1<t;x1++)
{
str=in.readLine().trim();
len=str.length();
str1="";
ans=0;
for(i=len-1;i>=0;i--)
{
str1+=str.charAt(i);
}
for(i=0;i<len;i++)
{
if(str1.charAt(i)!='+')
{
break;
}
}
String cur="+";
for(j=i;j<len;j++)
{
if(str1.charAt(j)!=cur.charAt(0))
{
ans++;
cur="";
cur+=str1.charAt(j);
}
}
out.println("Case #"+(x1+1)+": "+ans);
}
out.flush();
out.close();
}
}
| [
"liangyuding@sjtu.edu.cn"
] | liangyuding@sjtu.edu.cn |
4f7fa7665fc03ea86fd43dc8c7437c27aa4786f0 | d5df6519aae5edba82ac1ce7967522e3efa9213a | /platform/elevation/daemon/src/com/intellij/execution/process/mediator/daemon/ProcessMediatorDaemonRuntimeClasspath.java | dece965b04bb2bd222b2fc9027329eb15ba28007 | [
"Apache-2.0"
] | permissive | mimi89999/intellij-community | 3e22443adf80ac1d7498e93c44f47f3a1531e12d | 015efc65182b6c5a05fa309b3ea051943ccda29f | refs/heads/master | 2023-01-08T12:00:34.141807 | 2020-11-10T08:05:54 | 2020-11-10T08:05:54 | 275,659,326 | 0 | 0 | Apache-2.0 | 2020-06-28T20:03:34 | 2020-06-28T20:03:34 | null | UTF-8 | Java | false | false | 2,293 | java | // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.execution.process.mediator.daemon;
import com.google.common.base.MoreObjects;
import com.google.protobuf.Message;
import com.intellij.execution.process.mediator.rpc.ProcessMediatorProto;
import io.grpc.Context;
import io.grpc.Grpc;
import io.grpc.internal.ServerImpl;
import io.grpc.kotlin.AbstractCoroutineStub;
import io.grpc.netty.shaded.io.netty.buffer.ByteBufAllocator;
import io.grpc.netty.shaded.io.netty.channel.EventLoopGroup;
import io.grpc.netty.shaded.io.netty.handler.codec.protobuf.ProtobufDecoder;
import io.grpc.netty.shaded.io.netty.resolver.AddressResolverGroup;
import io.grpc.netty.shaded.io.netty.util.NetUtil;
import io.grpc.protobuf.ProtoUtils;
import io.grpc.protobuf.lite.ProtoLiteUtils;
import io.grpc.stub.AbstractStub;
import io.perfmark.PerfMark;
import kotlin.KotlinVersion;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.future.FutureKt;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import java.util.List;
public class ProcessMediatorDaemonRuntimeClasspath {
private static final Class<?>[] CLASSPATH_CLASSES = {
ProcessMediatorDaemonMainKt.class,
ProcessMediatorProto.class,
KotlinVersion.class, // kotlin-stdlib
CoroutineScope.class, // kotlinx-coroutines-core
FutureKt.class, // kotlinx-coroutines-jdk8
Grpc.class, // grpc-api
ServerImpl.class, // grpc-core
ProtoUtils.class, // grpc-protobuf
ProtoLiteUtils.class, // grpc-protobuf-lite
Context.class, // grpc-context
AbstractStub.class, // grpc-stub
AbstractCoroutineStub.class, // grpc-kotlin-stub
MoreObjects.class, // guava
Message.class, // protobuf
NetUtil.class, // netty common
EventLoopGroup.class, // netty transport
AddressResolverGroup.class, // netty resolver
ByteBufAllocator.class, // netty buffer
ProtobufDecoder.class, // netty codec
PerfMark.class, // perfmark-api
};
public static @NotNull Class<?> getMainClass() {
return ProcessMediatorDaemonMainKt.class;
}
public static @NotNull List<@NotNull Class<?>> getClasspathClasses() {
return Arrays.asList(CLASSPATH_CLASSES);
}
}
| [
"intellij-monorepo-bot-no-reply@jetbrains.com"
] | intellij-monorepo-bot-no-reply@jetbrains.com |
80953983c1bd887b44ffe2ecc363c815f1ade70e | 3f845730d07e3e1f847dc285905e77a132d6edcc | /src/main/java/practica3/Ejercicio6Visitor/IVisitor.java | c438f21767fa894fcaa57855d1fcbd3795d17847 | [] | no_license | AleChirinos/Todo-DP | 2d4911e2910e8f7a2418cd81004352337659c16c | c076cb66c9eb5395c8448081249585e53f892ef4 | refs/heads/main | 2023-06-08T14:19:18.364102 | 2021-07-01T06:12:10 | 2021-07-01T06:12:10 | 372,260,222 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 203 | java | package practica3.Ejercicio6Visitor;
public interface IVisitor {
void mantenimiento(Celular celular);
void mantenimiento(Computadora computadora);
void mantenimiento(Televisor televisor);
}
| [
"alejandra.chirinos2702@gmail.com"
] | alejandra.chirinos2702@gmail.com |
5f24e03348a2ee4db15a3a7e38fef1aa358333e1 | 2f872e820c2e8ddab818dd6e4856a2b516f82392 | /xiaoha_chart_terminal_ao/java/src/main/java/xueqiao/trade/hosting/proxy/ProxyTradeType.java | cd40a43e73eb110153753a741060a2b313c51766 | [] | no_license | SunningPig/xueqiao-graph | a235cac840f2cf915a5c4aa1c777d030b7d91b41 | 61bda4238a1ba1af9a5479a5824938e16fbe9c04 | refs/heads/main | 2023-04-16T06:19:37.854156 | 2021-04-25T12:55:18 | 2021-04-25T12:55:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | true | 907 | java | /**
* Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package xueqiao.trade.hosting.proxy;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
public enum ProxyTradeType implements org.apache.thrift.TEnum {
REAL(1),
SIM(2);
private final int value;
private ProxyTradeType(int value) {
this.value = value;
}
/**
* Get the integer value of this enum value, as defined in the Thrift IDL.
*/
public int getValue() {
return value;
}
/**
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
public static ProxyTradeType findByValue(int value) {
switch (value) {
case 1:
return REAL;
case 2:
return SIM;
default:
return null;
}
}
}
| [
"wangli@authine.com"
] | wangli@authine.com |
d3d1ee0f945e397538004298511c9e40aac1d84c | 9d32980f5989cd4c55cea498af5d6a413e08b7a2 | /A5_8_1_0/src/main/java/java/util/function/-$Lambda$Tr2ZVotyK7bvB1MALZ-WioewFls.java | c21123ce7bb98dba00c4c434a631534709077034 | [] | no_license | liuhaosource/OppoFramework | e7cc3bcd16958f809eec624b9921043cde30c831 | ebe39acabf5eae49f5f991c5ce677d62b683f1b6 | refs/heads/master | 2023-06-03T23:06:17.572407 | 2020-11-30T08:40:07 | 2020-11-30T08:40:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 702 | java | package java.util.function;
final /* synthetic */ class -$Lambda$Tr2ZVotyK7bvB1MALZ-WioewFls implements DoubleConsumer {
/* renamed from: -$f0 */
private final /* synthetic */ Object f173-$f0;
/* renamed from: -$f1 */
private final /* synthetic */ Object f174-$f1;
private final /* synthetic */ void $m$0(double arg0) {
((DoubleConsumer) this.f173-$f0).m18lambda$-java_util_function_DoubleConsumer_2716((DoubleConsumer) this.f174-$f1, arg0);
}
public /* synthetic */ -$Lambda$Tr2ZVotyK7bvB1MALZ-WioewFls(Object obj, Object obj2) {
this.f173-$f0 = obj;
this.f174-$f1 = obj2;
}
public final void accept(double d) {
$m$0(d);
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
522e0387a53a022afdcc57fd3766612f5593e022 | 49d5dc3e343e903b008e3eb439fb014412fac801 | /src/main/specnaz/src/main/java/org/specnaz/impl/TestsGroupNodeExecutor.java | cc96b9b88d448b1d762b2f557318bf1c0d4b09c0 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | skinny85/specnaz | aedbc850f10cb7722c35bcb82fef64b79ea35429 | f92795c909065b42174d14a97e00c2789e0edd72 | refs/heads/master | 2023-01-19T03:36:05.930043 | 2021-11-21T05:18:28 | 2021-11-21T05:18:28 | 65,942,241 | 32 | 10 | NOASSERTION | 2021-11-15T00:28:13 | 2016-08-17T21:09:39 | Java | UTF-8 | Java | false | false | 5,616 | java | package org.specnaz.impl;
import org.specnaz.utils.TestClosure;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public final class TestsGroupNodeExecutor {
private final TreeNode<TestsGroup> testsGroupNode;
private final boolean runOnlyFocusedTests;
public TestsGroupNodeExecutor(TreeNode<TestsGroup> testsGroupNode, boolean runOnlyFocusedTests) {
this.testsGroupNode = testsGroupNode;
this.runOnlyFocusedTests = runOnlyFocusedTests;
}
public Collection<TestsGroupNodeExecutor> testsGroupNodeExecutors() {
return streamOfTestsGroupNodeExecutors().collect(Collectors.toList());
}
public Executable beforeAllsExecutable() {
return this::invokeBeforeAlls;
}
public Collection<ExecutableTestCase> executableTestCases(Throwable beforeAllsError) {
return testCases().stream().map(testCase -> shouldIgnoreTest(testCase)
? new ExecutableTestCase(testCase)
: new ExecutableTestCase(testCase, () -> runSingleTestCase(testCase, beforeAllsError))
).collect(Collectors.toList());
}
public Executable afterAllsExecutable() {
return this::invokeAfterAlls;
}
public List<String> descriptionsPath() {
List<String> ret = new LinkedList<>();
descriptionsPath(testsGroupNode, ret);
return Collections.unmodifiableList(ret);
}
private Stream<TestsGroupNodeExecutor> streamOfTestsGroupNodeExecutors() {
Stream<TestsGroupNodeExecutor> ret = testCases().isEmpty()
? Stream.empty()
: Stream.of(this);
return Stream.concat(
ret,
testsGroupNode.children().stream()
.map(child -> new TestsGroupNodeExecutor(child, runOnlyFocusedTests))
.flatMap(TestsGroupNodeExecutor::streamOfTestsGroupNodeExecutors));
}
private void descriptionsPath(TreeNode<TestsGroup> testsGroupNode, List<String> ret) {
if (testsGroupNode == null)
return;
descriptionsPath(testsGroupNode.parent(), ret);
ret.add(testsGroupNode.value.description);
}
private Throwable invokeBeforeAlls() {
return allTestsInGroupAreIgnored()
? null
: recursivelyInvokeFixturesAncestorsFirst(testsGroupNode, g -> g.beforeAlls);
}
private Throwable runSingleTestCase(SingleTestCase testCase, Throwable beforeAllsError) {
return beforeAllsError == null
? shouldIgnoreTest(testCase) ? null : runSingleTestCase(testCase)
: beforeAllsError;
}
private Throwable runSingleTestCase(SingleTestCase testCase) {
Throwable e = invokeBefores();
e = invokeTestBody(testCase, e);
e = invokeAfters(e);
return e;
}
private Throwable invokeBefores() {
return recursivelyInvokeFixturesAncestorsFirst(testsGroupNode, g -> g.befores);
}
private Throwable invokeTestBody(SingleTestCase testCase, Throwable previousError) {
// we only run the test if none of the 'beforeEach' methods failed
return previousError == null
? testCase.exercise()
: previousError;
}
private Throwable invokeAfters(Throwable previousError) {
Throwable aftersError = recursivelyInvokeFixturesAncestorsLast(testsGroupNode, g -> g.afters);
return previousError == null ? aftersError : previousError;
}
private Throwable invokeAfterAlls() {
return allTestsInGroupAreIgnored()
? null
: recursivelyInvokeFixturesAncestorsLast(testsGroupNode, g -> g.afterAlls);
}
private Throwable recursivelyInvokeFixturesAncestorsFirst(
TreeNode<TestsGroup> testsGroupNode,
Function<TestsGroup, List<TestClosure>> extractor) {
if (testsGroupNode == null)
return null;
Throwable ancestorsError = recursivelyInvokeFixturesAncestorsFirst(testsGroupNode.parent(), extractor);
Throwable myError = invokeFixtures(extractor.apply(testsGroupNode.value));
return ancestorsError == null ? myError : ancestorsError;
}
private Throwable recursivelyInvokeFixturesAncestorsLast(
TreeNode<TestsGroup> testsGroupNode,
Function<TestsGroup, List<TestClosure>> extractor) {
if (testsGroupNode == null)
return null;
Throwable myError = invokeFixtures(extractor.apply(testsGroupNode.value));
Throwable ancestorsError = recursivelyInvokeFixturesAncestorsLast(testsGroupNode.parent(), extractor);
return myError == null ? ancestorsError : myError;
}
private Throwable invokeFixtures(List<TestClosure> fixtures) {
Throwable ret = null;
for (TestClosure fixture : fixtures) {
Throwable result = SingleTestCase.invokeCallback(fixture);
if (ret == null)
ret = result;
}
return ret;
}
private boolean allTestsInGroupAreIgnored() {
return testCases().stream().allMatch(this::shouldIgnoreTest);
}
private Collection<SingleTestCase> testCases() {
return testsGroupNode.value.testCases;
}
private boolean shouldIgnoreTest(SingleTestCase testCase) {
return testCase.type == TestCaseType.IGNORED ||
(runOnlyFocusedTests && testCase.type != TestCaseType.FOCUSED);
}
}
| [
"adamruka85@gmail.com"
] | adamruka85@gmail.com |
ad9d28b6d6a8af1262662d825c6a721dc50306b0 | cda3816a44e212b52fdf1b9578e66a4543445cbb | /trunk/Src/l2next/gameserver/network/serverpackets/GMViewWarehouseWithdrawList.java | 47515ebb7db9380b8594dbb794c2d3832cc02f31 | [] | no_license | gryphonjp/L2J | 556d8b1f24971782f98e1f65a2e1c2665a853cdb | 003ec0ed837ec19ae7f7cf0e8377e262bf2d6fe4 | refs/heads/master | 2020-05-18T09:51:07.102390 | 2014-09-16T14:25:06 | 2014-09-16T14:25:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 707 | java | package l2next.gameserver.network.serverpackets;
import l2next.gameserver.model.Player;
import l2next.gameserver.model.items.ItemInstance;
public class GMViewWarehouseWithdrawList extends L2GameServerPacket
{
private final ItemInstance[] _items;
private String _charName;
private long _charAdena;
public GMViewWarehouseWithdrawList(Player cha)
{
_charName = cha.getName();
_charAdena = cha.getAdena();
_items = cha.getWarehouse().getItems();
}
@Override
protected final void writeImpl()
{
writeS(_charName);
writeQ(_charAdena);
writeH(_items.length);
for(ItemInstance temp : _items)
{
writeItemInfo(temp);
writeD(temp.getObjectId());
}
}
} | [
"tuningxtreme@108c6750-40d5-47c8-815d-bc471747907c"
] | tuningxtreme@108c6750-40d5-47c8-815d-bc471747907c |
54f4695a2c59630e6cfd3e54cf0fa0e355111580 | 805b2a791ec842e5afdd33bb47ac677b67741f78 | /Mage.Sets/src/mage/sets/izzetvsgolgari/KorozdaGuildmage.java | 4686cb88a64d49849d8d30313683cac2bb463007 | [] | no_license | klayhamn/mage | 0d2d3e33f909b4052b0dfa58ce857fbe2fad680a | 5444b2a53beca160db2dfdda0fad50e03a7f5b12 | refs/heads/master | 2021-01-12T19:19:48.247505 | 2015-08-04T20:25:16 | 2015-08-04T20:25:16 | 39,703,242 | 2 | 0 | null | 2015-07-25T21:17:43 | 2015-07-25T21:17:42 | null | UTF-8 | Java | false | false | 2,209 | java | /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.izzetvsgolgari;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class KorozdaGuildmage extends mage.sets.returntoravnica.KorozdaGuildmage {
public KorozdaGuildmage(UUID ownerId) {
super(ownerId);
this.cardNumber = 52;
this.expansionSetCode = "DDJ";
}
public KorozdaGuildmage(final KorozdaGuildmage card) {
super(card);
}
@Override
public KorozdaGuildmage copy() {
return new KorozdaGuildmage(this);
}
}
| [
"ludwig.hirth@online.de"
] | ludwig.hirth@online.de |
c6b16b44a4816f550354b6fdd5d00e45d96bf72d | 440a25eaada629ff83aa1db8c6894e02d30bc6ca | /src/main/java/austeretony/oxygen_shop/client/settings/gui/EnumShopGUISetting.java | cd552d6c634676c96ed67bbdaac38c8713a562df | [] | no_license | AustereTony-MCMods/Oxygen-Shop | 25fea5bce2b06565d82da026d45e55c1a8b1d60e | a88c6308d4aefecdab485cd4307d0d303eb07222 | refs/heads/master | 2021-07-05T22:04:55.865392 | 2020-06-07T13:55:58 | 2020-06-07T13:55:58 | 242,097,563 | 1 | 4 | null | 2020-06-07T13:55:59 | 2020-02-21T09:06:20 | Java | UTF-8 | Java | false | false | 1,170 | java | package austeretony.oxygen_shop.client.settings.gui;
import austeretony.oxygen_core.client.OxygenManagerClient;
import austeretony.oxygen_core.common.EnumValueType;
import austeretony.oxygen_core.common.settings.SettingValue;
import austeretony.oxygen_core.common.settings.SettingValueUtils;
public enum EnumShopGUISetting {
//Alignment
SHOP_MENU_ALIGNMENT("alignment_shop_menu", EnumValueType.INT, String.valueOf(0));
private final String key, baseValue;
private final EnumValueType type;
private SettingValue value;
EnumShopGUISetting(String key, EnumValueType type, String baseValue) {
this.key = key;
this.type = type;
this.baseValue = baseValue;
}
public SettingValue get() {
if (this.value == null)
this.value = OxygenManagerClient.instance().getClientSettingManager().getSettingValue(this.key);
return this.value;
}
public static void register() {
for (EnumShopGUISetting setting : values())
OxygenManagerClient.instance().getClientSettingManager().register(SettingValueUtils.getValue(setting.type, setting.key, setting.baseValue));
}
}
| [
"anton.zh-off@yandex.ru"
] | anton.zh-off@yandex.ru |
b11b4d2722627d7d247f84a905a2f15d0b3b2fd1 | 7fda283d86e0f5d810394f2d2e5ef2c195f91ea2 | /library/src/main/java/com/lxj/xpopup/impl/AttachListPopupView.java | f141e9e93c1f8fa9bcf26479d0280863e647b51d | [
"Apache-2.0"
] | permissive | 469412882/XPopup | 7c6be6b4c7f0d4e6080998b52c5392986507ed7c | ff3d0cfad7508c3a59930fe0f10e2b013f4f407b | refs/heads/master | 2023-01-12T01:38:49.315854 | 2020-11-08T03:51:37 | 2020-11-08T03:51:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,665 | java | package com.lxj.xpopup.impl;
import android.content.Context;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.lxj.easyadapter.EasyAdapter;
import com.lxj.easyadapter.MultiItemTypeAdapter;
import com.lxj.easyadapter.ViewHolder;
import com.lxj.xpopup.R;
import com.lxj.xpopup.core.AttachPopupView;
import com.lxj.xpopup.interfaces.OnSelectListener;
import com.lxj.xpopup.widget.VerticalRecyclerView;
import java.util.Arrays;
/**
* Description: Attach类型的列表弹窗
* Create by dance, at 2018/12/12
*/
public class AttachListPopupView extends AttachPopupView {
RecyclerView recyclerView;
protected int bindLayoutId;
protected int bindItemLayoutId;
/**
*
* @param context
* @param bindLayoutId layoutId 要求layoutId中必须有一个id为recyclerView的RecyclerView
* @param bindItemLayoutId itemLayoutId 条目的布局id,要求布局中必须有id为iv_image的ImageView,和id为tv_text的TextView
*/
public AttachListPopupView(@NonNull Context context, int bindLayoutId, int bindItemLayoutId) {
super(context);
this.bindLayoutId = bindLayoutId;
this.bindItemLayoutId = bindItemLayoutId;
addInnerContent();
}
@Override
protected int getImplLayoutId() {
return bindLayoutId == 0 ? R.layout._xpopup_attach_impl_list : bindLayoutId;
}
@Override
protected void onCreate() {
super.onCreate();
recyclerView = findViewById(R.id.recyclerView);
if(bindLayoutId!=0){
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
}
final EasyAdapter<String> adapter = new EasyAdapter<String>(Arrays.asList(data), bindItemLayoutId == 0 ? R.layout._xpopup_adapter_text : bindItemLayoutId) {
@Override
protected void bind(@NonNull ViewHolder holder, @NonNull String s, int position) {
holder.setText(R.id.tv_text, s);
if (iconIds != null && iconIds.length > position) {
holder.getView(R.id.iv_image).setVisibility(VISIBLE);
holder.getView(R.id.iv_image).setBackgroundResource(iconIds[position]);
} else {
holder.getView(R.id.iv_image).setVisibility(GONE);
}
View check = holder.getView2(R.id.check_view);
if (check!=null) check.setVisibility(GONE);
if(bindItemLayoutId==0 ){
if(popupInfo.isDarkTheme){
holder.<TextView>getView(R.id.tv_text).setTextColor(getResources().getColor(R.color._xpopup_white_color));
}else {
holder.<TextView>getView(R.id.tv_text).setTextColor(getResources().getColor(R.color._xpopup_dark_color));
}
}
}
};
adapter.setOnItemClickListener(new MultiItemTypeAdapter.SimpleOnItemClickListener() {
@Override
public void onItemClick(View view, RecyclerView.ViewHolder holder, int position) {
if (selectListener != null) {
selectListener.onSelect(position, adapter.getData().get(position));
}
if (popupInfo.autoDismiss) dismiss();
}
});
recyclerView.setAdapter(adapter);
applyTheme();
}
protected void applyTheme(){
if(bindLayoutId==0) {
if(popupInfo.isDarkTheme){
applyDarkTheme();
}else {
applyLightTheme();
}
}
}
@Override
protected void applyDarkTheme() {
super.applyDarkTheme();
((VerticalRecyclerView)recyclerView).setupDivider(true);
}
@Override
protected void applyLightTheme() {
super.applyLightTheme();
((VerticalRecyclerView)recyclerView).setupDivider(false);
}
String[] data;
int[] iconIds;
public AttachListPopupView setStringData(String[] data, int[] iconIds) {
this.data = data;
this.iconIds = iconIds;
return this;
}
// public AttachListPopupView setOffsetXAndY(int offsetX, int offsetY) {
// this.defaultOffsetX += offsetX;
// this.defaultOffsetY += offsetY;
// return this;
// }
private OnSelectListener selectListener;
public AttachListPopupView setOnSelectListener(OnSelectListener selectListener) {
this.selectListener = selectListener;
return this;
}
}
| [
"16167479@qq.com"
] | 16167479@qq.com |
60f01be51785061fb544c26007bad092163468f8 | 5289e40e25fe505c0bf483aca75080c0f3ae69b4 | /platform/extensions/src/com/intellij/openapi/components/ComponentManager.java | 2b0ee31335346d6d0c09eda17165d5dcd3b6649c | [
"Apache-2.0"
] | permissive | haarlemmer/Jvav-Studio-Community | 507e4fa1b4873cd1ede5442219d105757a91abbb | de80b70f5507f0110de89a95d72b8f902ca72b3e | refs/heads/main | 2023-06-30T10:09:28.470066 | 2021-08-04T08:39:35 | 2021-08-04T08:39:35 | 392,603,002 | 0 | 0 | Apache-2.0 | 2021-08-04T08:04:52 | 2021-08-04T08:04:51 | null | UTF-8 | Java | false | false | 7,154 | java | // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.components;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.extensions.*;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.UserDataHolder;
import com.intellij.util.ArrayUtil;
import com.intellij.util.ReflectionUtil;
import com.intellij.util.messages.MessageBus;
import com.intellij.util.pico.CachingConstructorInjectionComponentAdapter;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.picocontainer.PicoContainer;
import java.util.List;
import java.util.Map;
/**
* Provides access to components. Serves as a base interface for {@link com.intellij.openapi.application.Application}
* and {@link com.intellij.openapi.project.Project}.
*
* @see com.intellij.openapi.application.Application
* @see com.intellij.openapi.project.Project
*/
public interface ComponentManager extends UserDataHolder, Disposable, AreaInstance {
/**
* @deprecated Use {@link #getComponent(Class)} instead.
*/
@Deprecated
default @Nullable BaseComponent getComponent(@NotNull String name) {
return null;
}
/**
* Gets the component by its interface class.
*
* @param interfaceClass the interface class of the component
* @return component that matches interface class or null if there is no such component
*/
<T> T getComponent(@NotNull Class<T> interfaceClass);
/**
* @deprecated Useless.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
default <T> T getComponent(@NotNull Class<T> interfaceClass, T defaultImplementationIfAbsent) {
T component = getComponent(interfaceClass);
return component == null ? defaultImplementationIfAbsent : component;
}
/**
* Checks whether there is a component with the specified interface class.
*
* @param interfaceClass interface class of component to be checked
* @return {@code true} if there is a component with the specified interface class;
* {@code false} otherwise
*/
default boolean hasComponent(@NotNull Class<?> interfaceClass) {
return getPicoContainer().getComponentAdapter(interfaceClass) != null;
}
/**
* Gets all components whose implementation class is derived from {@code baseClass}.
*
* @deprecated use <a href="https://plugins.jetbrains.com/docs/intellij/plugin-extensions.html">extension points</a> instead
*/
@Deprecated
default <T> T @NotNull [] getComponents(@NotNull Class<T> baseClass) {
return ArrayUtil.toObjectArray(getComponentInstancesOfType(baseClass, false), baseClass);
}
@NotNull PicoContainer getPicoContainer();
/**
* @see com.intellij.application.Topics#subscribe
*/
@NotNull MessageBus getMessageBus();
/**
* @return true when this component is disposed (e.g. the "File|Close Project" invoked or the application is exited)
* or is about to be disposed (e.g. the {@link com.intellij.openapi.project.impl.ProjectExImpl#dispose()} was called but not completed yet)
* <br>
* The result is only valid inside read action because the application/project/module can be disposed at any moment.
* (see <a href="https://www.jetbrains.org/intellij/sdk/docs/basics/architectural_overview/general_threading_rules.html#readwrite-lock">more details on read actions</a>)
*/
boolean isDisposed();
/**
* @deprecated Use {@link #isDisposed()} instead
*/
@Deprecated
default boolean isDisposedOrDisposeInProgress() {
return isDisposed();
}
/**
* @deprecated Use {@link ExtensionPointName#getExtensionList(AreaInstance)}
*/
@Deprecated
default <T> T @NotNull [] getExtensions(@NotNull ExtensionPointName<T> extensionPointName) {
return getExtensionArea().getExtensionPoint(extensionPointName).getExtensions();
}
/**
* @return condition for this component being disposed.
* see {@link com.intellij.openapi.application.Application#invokeLater(Runnable, Condition)} for the usage example.
*/
@NotNull
Condition<?> getDisposed();
/**
* @deprecated Use {@link #getServiceIfCreated(Class)} or {@link #getService(Class)}.
*/
@Deprecated
default <T> T getService(@NotNull Class<T> serviceClass, boolean createIfNeeded) {
if (createIfNeeded) {
return getService(serviceClass);
}
else {
return getServiceIfCreated(serviceClass);
}
}
default <T> T getService(@NotNull Class<T> serviceClass) {
// default impl to keep backward compatibility
//noinspection unchecked
return (T)getPicoContainer().getComponentInstance(serviceClass.getName());
}
default @Nullable <T> T getServiceIfCreated(@NotNull Class<T> serviceClass) {
return getService(serviceClass);
}
@Override
default @NotNull ExtensionsArea getExtensionArea() {
// default impl to keep backward compatibility
throw new AbstractMethodError();
}
@ApiStatus.Internal
default <T> T instantiateClass(@NotNull Class<T> aClass, @SuppressWarnings("unused") @Nullable PluginId pluginId) {
return ReflectionUtil.newInstance(aClass, false);
}
@SuppressWarnings({"deprecation", "unchecked"})
@ApiStatus.Internal
default <T> T instantiateClassWithConstructorInjection(@NotNull Class<T> aClass, @NotNull Object key, @SuppressWarnings("unused") @NotNull PluginId pluginId) {
return (T)new CachingConstructorInjectionComponentAdapter(key, aClass).getComponentInstance(getPicoContainer());
}
@ApiStatus.Internal
default void logError(@NotNull Throwable error, @NotNull PluginId pluginId) {
throw createError(error, pluginId);
}
@ApiStatus.Internal
@NotNull RuntimeException createError(@NotNull Throwable error, @NotNull PluginId pluginId);
@ApiStatus.Internal
@NotNull RuntimeException createError(@NotNull @NonNls String message, @NotNull PluginId pluginId);
@NotNull RuntimeException createError(@NotNull @NonNls String message, @NotNull PluginId pluginId, @Nullable Map<String, String> attachments);
@ApiStatus.Internal
<@NotNull T> @NotNull Class<T> loadClass(@NotNull String className, @NotNull PluginDescriptor pluginDescriptor) throws ClassNotFoundException;
@ApiStatus.Internal
default @NotNull <@NotNull T> T instantiateClass(@NotNull String className, @NotNull PluginDescriptor pluginDescriptor) {
try {
return ReflectionUtil.newInstance(loadClass(className, pluginDescriptor));
}
catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
/**
* @deprecated Do not use.
*/
@ApiStatus.Internal
@Deprecated
default @NotNull <T> List<T> getComponentInstancesOfType(@NotNull Class<T> baseClass) {
return getComponentInstancesOfType(baseClass, false);
}
@SuppressWarnings("MissingDeprecatedAnnotation")
@Deprecated
@ApiStatus.Internal
default @NotNull <T> List<T> getComponentInstancesOfType(@NotNull Class<T> baseClass, boolean createIfNotYet) {
throw new UnsupportedOperationException();
}
} | [
"luckystar5408@github.com"
] | luckystar5408@github.com |
eed11c1a759bc6c4026879bf7c328f68b8a86088 | 129b6439da54432c2154bd4fd6f407fada1d7894 | /src/test/java/com/boundary/sdk/event/snmp/SMISupportTest.java | 9dedb8bb4a00e2b0a4bda92586b06da795f9425f | [
"Apache-2.0"
] | permissive | boundary/boundary-event-sdk | c7a5c51b52e5acd47d9c12c7d6d3d5f22328d15e | f3385bf91b9dcfc9185161786ec5be6657461402 | refs/heads/master | 2021-01-02T09:38:27.375885 | 2015-03-03T17:12:21 | 2015-03-03T17:12:21 | 19,016,936 | 2 | 4 | null | 2015-03-03T17:12:21 | 2014-04-22T04:21:38 | Java | UTF-8 | Java | false | false | 3,237 | java | // Copyright 2014-2015 Boundary, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.boundary.sdk.event.snmp;
import static org.junit.Assert.*;
import java.io.IOException;
import java.util.Date;
import java.util.Map;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.snmp4j.mp.SnmpConstants;
import org.snmp4j.smi.OID;
import com.snmp4j.smi.SmiManager;
/**
*
*/
public class SMISupportTest {
private static SmiSupport smi;
private static String BOUNDARY_MIB_REPOSITORY;
private static String BOUNDARY_MIB_LICENSE;
/**
* @throws java.lang.Exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
Map<String, String> env = System.getenv();
BOUNDARY_MIB_REPOSITORY = env.get("BOUNDARY_MIB_REPOSITORY");
BOUNDARY_MIB_LICENSE=env.get("BOUNDARY_MIB_LICENSE");
smi = new SmiSupport();
}
/**
* @throws java.lang.Exception
*/
@AfterClass
public static void tearDownAfterClass() throws Exception {
}
/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
}
/**
* @throws java.lang.Exception
*/
@After
public void tearDown() throws Exception {
}
//@Ignore("Requires SNMP4J License")
@Test
public void test() throws IOException {
SmiSupport support = new SmiSupport();
SmiManager smiManager = support.getSmiManager();
support.setRepository(BOUNDARY_MIB_REPOSITORY);
support.setLicense(BOUNDARY_MIB_LICENSE);
support.initialize();
smiManager = support.getSmiManager();
String [] modules = smiManager.listModules();
System.out.println(modules.length);
System.out.println(new Date());
for (String name :modules) {
//System.out.println("Loading module: " + name);
smiManager.loadModule(name);
}
System.out.println(new Date());
String[] oids = {"1.3.6.1",
"1.3.6.1.4.1.3.1.1",
"1.3.6.1.2.1.1.3.0",
"1.3.6.1.6.3.1.1.4.1.0",
"1.3.6.1.6.3.1.1.4.1",
"1.3.6.1.2.1.1.5.0",
"1.2.3.4.5",
"1.3.6.1.2.1.1.1.0",
"0.0"};
OID oid = new OID();
for (String o :oids) {
oid.setValue(o);
System.out.println(o + " = " + oid);
}
System.out.println(SnmpConstants.snmpTrapOID);
System.out.println(SnmpConstants.snmpTrapOID.toDottedString());
System.out.println(new OID(SnmpConstants.snmpTrapOID.toDottedString() + ".3"));
System.out.print(SnmpConstants.linkDown.toDottedString());
}
@Test
public void testLicense() {
SmiSupport smi = new SmiSupport();
String expectedString = "foobar";
smi.setLicense(expectedString);
assertEquals("Check license",expectedString,smi.getLicense());
}
}
| [
"davidg@boundary.com"
] | davidg@boundary.com |
d9c2e034cceb03ec99d28ef40068e907dff359d9 | 6903150fe80d8c1b3909f0094b4f030421aaac48 | /base-generate/src/main/java/com/application/base/generate/mongo/bean/WolfXmlUtil.java | 8ef24519cc5bfbf90d2314f36c5a01cdbf7628be | [] | no_license | luckysoftgo/base-parent | 57ccbab292ff71874872a65471d70c6b3c02528f | fede598a91e438144d628082d519ae7996df9536 | refs/heads/master | 2022-12-17T23:29:32.806321 | 2020-11-24T07:10:43 | 2020-11-24T07:10:43 | 154,773,631 | 5 | 4 | null | 2022-12-06T00:42:04 | 2018-10-26T03:44:02 | Java | UTF-8 | Java | false | false | 4,327 | java | package com.application.base.generate.mongo.bean;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.SAXReader;
import org.dom4j.io.XMLWriter;
import java.io.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* @author bruce
*
*/
public class WolfXmlUtil {
private static final String CONTENT_ENCODING = "UTF-8";
private void getAddStrutsElemant(String filePath, String nodexPath)
throws Exception {
Document document = getPath(filePath, CONTENT_ENCODING);
Element element = document.getRootElement();
Element nextElement = element.element("package");
Element newElement = nextElement.addElement("action");
newElement.addComment("系统自动创建");
newElement.addAttribute("name", "test");
newElement.addAttribute("class", "");
newElement.addAttribute("method", "");
newElement.addText("hello");
}
public void getAddNode(String filePath, String xPath, String newNode,
Map<String, String> attrMap, String text) throws Exception {
if (getQueryNode(filePath, xPath, newNode, attrMap, text) < 1) {
Document document = getPath(filePath, CONTENT_ENCODING);
List list = document.selectNodes(xPath);
System.out.println(xPath);
Element element = (Element) list.get(0);
Element newElement = element.addElement(newNode);
for (Map.Entry entry : attrMap.entrySet()) {
newElement.addAttribute((String) entry.getKey(), (String) entry
.getValue());
}
if ((text != null) && (text.trim().length() > 0)) {
newElement.addText(text);
}
getXMLWrite(document, filePath);
System.out.println("修改" + xPath + "成功");
} else {
System.out.println("已添");
}
}
public int getQueryNode(String filePath, String xPath, String newNode,
Map<String, String> attrMap, String text) throws Exception {
int count = 0;
Document document = getPath(filePath, CONTENT_ENCODING);
StringBuffer sb = new StringBuffer();
for (Map.Entry entry : attrMap.entrySet()) {
sb.append("[@" + ((String) entry.getKey()) + "='"
+ ((String) entry.getValue()) + "']");
}
xPath = xPath + "/" + newNode + sb.toString();
System.out.println("xPath=" + xPath);
document.selectNodes(xPath);
List list = document.selectNodes(xPath);
for (int i = 0; i < list.size(); ++i) {
Element element = (Element) list.get(i);
if (element.getText().equals(text)) {
++count;
}
}
return count;
}
public void getXMLWrite(Document document, String filePath)
throws Exception {
OutputFormat of = new OutputFormat(" ", true);
of.setEncoding(CONTENT_ENCODING);
XMLWriter xw = new XMLWriter(new FileWriter(filePath), of);
xw.setEscapeText(false);
xw.write(document);
xw.close();
System.out.println(document.asXML());
}
public void getEditNode(String filePath, String xPath,
Map<String, String> attrMap, String text) throws Exception {
Document document = getPath(filePath, CONTENT_ENCODING);
List list = document.selectNodes(xPath);
Element element = (Element) list.get(0);
if (attrMap != null) {
for (Map.Entry entry : attrMap.entrySet()) {
element.addAttribute((String) entry.getKey(), (String) entry.getValue());
}
}
List nodelist = element.elements();
for (int i = 0; i < nodelist.size(); ++i) {
Element nodeElement = (Element) nodelist.get(i);
nodeElement.getParent().remove(nodeElement);
}
element.setText(text);
getXMLWrite(document, filePath);
}
public Document getPath(String filePath, String coding) {
SAXReader saxReader = new SAXReader();
Document document = null;
try {
saxReader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",false);
BufferedReader read = new BufferedReader(new InputStreamReader(new FileInputStream(new File(filePath)), coding));
document = saxReader.read(read);
} catch (Exception e) {
e.printStackTrace();
}
return document;
}
public static void main(String[] args) {
WolfXmlUtil xml = new WolfXmlUtil();
String filePath1 = "I:\\ProUserSQL.xml";
String filePath = "I:\\struts2-ssi-proWbType.xml";
try {
Map map = new HashMap(16);
map.put("file", "no");
xml.getEditNode(filePath1, "/sqlMap/select[@id='getProUserList']",map, "嘿嘿");
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"sunping521@126.com"
] | sunping521@126.com |
9922c769905d6a0333da41d0e65cd0c957ab5fe9 | efb7efbbd6baa5951748dfbe4139e18c0c3608be | /sources/kotlin/reflect/jvm/internal/impl/load/java/typeEnhancement/C3024x28f4b533.java | bf89d927cf985c15898a8ea560c66f7865201327 | [] | no_license | blockparty-sh/600302-1_source_from_JADX | 08b757291e7c7a593d7ec20c7c47236311e12196 | b443bbcde6def10895756b67752bb1834a12650d | refs/heads/master | 2020-12-31T22:17:36.845550 | 2020-02-07T23:09:42 | 2020-02-07T23:09:42 | 239,038,650 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,146 | java | package kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement;
import kotlin.collections.ArraysKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Lambda;
import org.jetbrains.annotations.NotNull;
/* renamed from: kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.SignatureEnhancement$SignatureParts$computeIndexedQualifiersForOverride$1 */
/* compiled from: signatureEnhancement.kt */
final class C3024x28f4b533 extends Lambda implements Function1<Integer, JavaTypeQualifiers> {
final /* synthetic */ JavaTypeQualifiers[] $computedResult;
C3024x28f4b533(JavaTypeQualifiers[] javaTypeQualifiersArr) {
this.$computedResult = javaTypeQualifiersArr;
super(1);
}
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
return invoke(((Number) obj).intValue());
}
@NotNull
public final JavaTypeQualifiers invoke(int i) {
JavaTypeQualifiers[] javaTypeQualifiersArr = this.$computedResult;
return (i < 0 || i > ArraysKt.getLastIndex((T[]) javaTypeQualifiersArr)) ? JavaTypeQualifiers.Companion.getNONE() : javaTypeQualifiersArr[i];
}
}
| [
"hello@blockparty.sh"
] | hello@blockparty.sh |
8116415dbea2abc4689ff5ec675ccb3321f51f79 | d60e287543a95a20350c2caeabafbec517cabe75 | /LACCPlus/Hive/14504_2.java | 548be5fe043048265f01d62a524f4710193d3052 | [
"MIT"
] | permissive | sgholamian/log-aware-clone-detection | 242067df2db6fd056f8d917cfbc143615c558b2c | 9993cb081c420413c231d1807bfff342c39aa69a | refs/heads/main | 2023-07-20T09:32:19.757643 | 2021-08-27T15:02:50 | 2021-08-27T15:02:50 | 337,837,827 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,392 | java | //,temp,ThriftHiveMetastore.java,38563,38604,temp,ThriftHiveMetastore.java,37502,37543
//,2
public class xxx {
public org.apache.thrift.async.AsyncMethodCallback<OpenTxnsResponse> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<OpenTxnsResponse>() {
public void onComplete(OpenTxnsResponse o) {
open_txns_result result = new open_txns_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
open_txns_result result = new open_txns_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
}; | [
"SHOSHIN\\sgholamian@shoshin.uwaterloo.ca"
] | SHOSHIN\sgholamian@shoshin.uwaterloo.ca |
930bda36bec5153e9caffde3b5a410f75c1fa664 | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/training/com/alibaba/json/bvt/bug/Bug_for_issue_937.java | ebc56e4ad0047027c8c1bc32c8ef367df0f65eb2 | [] | no_license | STAMP-project/dspot-experiments | f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5 | 121487e65cdce6988081b67f21bbc6731354a47f | refs/heads/master | 2023-02-07T14:40:12.919811 | 2019-11-06T07:17:09 | 2019-11-06T07:17:09 | 75,710,758 | 14 | 19 | null | 2023-01-26T23:57:41 | 2016-12-06T08:27:42 | null | UTF-8 | Java | false | false | 1,021 | java | package com.alibaba.json.bvt.bug;
import junit.framework.TestCase;
import org.junit.Assert;
/**
* Created by wuwen on 2016/12/7.
*/
public class Bug_for_issue_937 extends TestCase {
public void test_for_issue() throws Exception {
String json = "{outPara:{name:\"user\"}}";
Bug_for_issue_937.Out<Bug_for_issue_937.Info> out = Bug_for_issue_937.returnOut(json, Bug_for_issue_937.Info.class);
Assert.assertEquals("user", out.getOutPara().getName());
}
public static class Out<T> {
private T outPara;
public void setOutPara(T t) {
outPara = t;
}
public T getOutPara() {
return outPara;
}
public Out() {
}
public Out(T t) {
setOutPara(t);
}
}
public static class Info {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
0d9216b533ae21c7ca65c043fdbb1bdf2c51d1f8 | 0a6ec9042d8e25fbe93b38cb9612bed1c87aa38c | /Algorithm_Practice/Codeplus_Basic/Chapter5_DynamicProgramming/src/BJ11054.java | b325c546a796de4aad171cae765022767f3230b7 | [] | no_license | park-seung-hyun/Data_Structure_And_Algorithm | 053c1c5352abc88f83326c180ff5850abf4337dc | ed33a122bea99bc8cd72c7ff52e0a135e59ca378 | refs/heads/master | 2020-04-15T04:32:46.121017 | 2019-05-11T07:22:11 | 2019-05-11T07:22:11 | 164,387,726 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,748 | java | // 11054번
// 가장 긴 바이토닉 부분 수열
// LIS(Longest Increasing Subsequence) 응용
import java.util.Arrays;
import java.util.Scanner;
public class BJ11054 {
static int[] ar;
static int[] d;
static int[] d2;
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
ar = new int[n];
d = new int[n];
d2 = new int[n];
for(int i=0;i<n;i++) {
ar[i] = stdIn.nextInt();
}
solve(n);
}
static void solve(int n) {
for(int i=0;i<n;i++) {
d[i] = 1;
for(int j=0;j<i;j++) {
if(ar[i]>ar[j] && d[i] < d[j] +1)
d[i] = d[j] +1;
}
}
for(int i=n-1;i>=0;i--) {
d2[i] = 1;
for(int j=n-1;j>i;j--) {
if(ar[i]>ar[j] && d2[i] < d2[j] +1)
d2[i] = d2[j] +1;
}
}
int max = d[0] + d2[0];
for(int i=0;i<n;i++) {
if(max < d[i] + d2[i])
max = d[i] + d2[i];
}
System.out.println(max-1);
}
}
//public class BJ11054{
// static int[] s;
// static int[] d;
// static int[] d2;
// public static void main(String[] args) {
// Scanner stdIn= new Scanner(System.in);
// int n = stdIn.nextInt();
// s = new int[n];
// d = new int[n];
// d2 = new int[n];
// for(int i=0;i<n;i++) {
// s[i] = stdIn.nextInt();
// }
// solve(n);
// }
// static void solve(int n) {
// for(int i=0;i<n;i++) {
// d[i] = 1;
// for(int j=0;j<i;j++) {
// if(s[i]>s[j] && d[i] < d[j] +1) {
// d[i] = d[j] + 1;
// }
// }
// }
// for(int i=n-1;i>=0;i--) {
// d2[i] = 1;
// for(int j=n-1;j>i;j--) {
// if(s[i]>s[j] && d2[i] < d2[j] +1) {
// d2[i] = d2[j] + 1;
// }
// }
// }
// int ans = 0;
// for(int i=0;i<n;i++) {
// if(ans < d[i] + d2[i] -1)
// ans = d[i] + d2[i] -1;
// }
// System.out.println(ans);
// }
//} | [
"shp9408@gmail.com"
] | shp9408@gmail.com |
9bd86285b75c90e29cf4650c3ded1d131f2408c8 | 71a4a630296413ac8c96b58970995d725f781e1e | /AndroidFramework/src/com/framework/img/IMemoryCache.java | ffc5689ad66b82bff971f0a9dabc3a2ee078acf6 | [] | no_license | zack1007x2/library | 1f3c45a90923b04dbcf5705ad1a2053e6727153d | e4ee549811b2440e34bd8c70ebd1eacfeffaf408 | refs/heads/master | 2021-01-01T10:37:38.319335 | 2015-06-26T04:44:20 | 2015-06-26T04:44:20 | 35,936,129 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 244 | java | package com.framework.img;
import android.graphics.Bitmap;
public interface IMemoryCache {
public void put(String key,Bitmap bitmap);
public Bitmap get(String key);
public void evictAll();
public void remove(String key);
}
| [
"zack1007x2@hotmail.com"
] | zack1007x2@hotmail.com |
0b6c7e4b6f9cbe13b4fdaa2dc6014e1ac8ff8a68 | 49b57339d939ea3f498249d3aacca1dec543163b | /jadx-snap-new/sources/org/opencv/core/CvException.java | 0a4fc10d52904c5e04b9506131b03809f5e3602d | [] | no_license | 8secz-johndpope/snapchat-re | 1655036c41518c3a2aaa0c2543dc49f4acb93eaf | 04f5c5bb627d21f620088525fffcf5c99abd7ce5 | refs/heads/master | 2020-08-24T09:14:38.209745 | 2019-06-14T05:13:44 | 2019-06-14T05:13:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 432 | java | package org.opencv.core;
public class CvException extends RuntimeException {
private static final long serialVersionUID = 1;
public CvException(String str) {
super(str);
}
public String toString() {
StringBuilder stringBuilder = new StringBuilder("CvException [");
stringBuilder.append(super.toString());
stringBuilder.append("]");
return stringBuilder.toString();
}
}
| [
"blevy@protonmail.com"
] | blevy@protonmail.com |
69bd6d0eddb8910dfbb07339af32f9d8ce3b955c | 29b6a856a81a47ebab7bfdba7fe8a7b845123c9e | /dingtalk/java/src/main/java/com/aliyun/dingtalkyida_1_0/models/SearchFormDataSecondGenerationNoTableFieldResponse.java | e9f7e4173fc4684534d54af08d286519d42244ea | [
"Apache-2.0"
] | permissive | aliyun/dingtalk-sdk | f2362b6963c4dbacd82a83eeebc223c21f143beb | 586874df48466d968adf0441b3086a2841892935 | refs/heads/master | 2023-08-31T08:21:14.042410 | 2023-08-30T08:18:22 | 2023-08-30T08:18:22 | 290,671,707 | 22 | 9 | null | 2021-08-12T09:55:44 | 2020-08-27T04:05:39 | PHP | UTF-8 | Java | false | false | 1,642 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkyida_1_0.models;
import com.aliyun.tea.*;
public class SearchFormDataSecondGenerationNoTableFieldResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public SearchFormDataSecondGenerationNoTableFieldResponseBody body;
public static SearchFormDataSecondGenerationNoTableFieldResponse build(java.util.Map<String, ?> map) throws Exception {
SearchFormDataSecondGenerationNoTableFieldResponse self = new SearchFormDataSecondGenerationNoTableFieldResponse();
return TeaModel.build(map, self);
}
public SearchFormDataSecondGenerationNoTableFieldResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public SearchFormDataSecondGenerationNoTableFieldResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public SearchFormDataSecondGenerationNoTableFieldResponse setBody(SearchFormDataSecondGenerationNoTableFieldResponseBody body) {
this.body = body;
return this;
}
public SearchFormDataSecondGenerationNoTableFieldResponseBody getBody() {
return this.body;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
11328b2359335fa9b76b9647fc222503c3ce13b8 | 42d905620be66de79bbeda093fa34f712225ea6c | /src/com/cndym/adapter/tms/split/impl/Split1080402.java | 8226c792502acd097dfc476054737954a562073a | [] | no_license | lichaoliu/tob | daad2730b188b322fba3ad39a9d9a3a4497faae9 | 619d06d4aa4bf62e5f92d04b6bbee8950ae1f024 | refs/heads/master | 2020-06-08T20:06:25.235433 | 2019-06-23T02:59:20 | 2019-06-23T02:59:20 | 193,297,933 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 252 | java | package com.cndym.adapter.tms.split.impl;
import com.cndym.adapter.tms.split.BaseSplitTicket;
/**
* 作者:邓玉明
* email:cndym@163.com
* QQ:757579248
* 时间: 12-2-20 下午6:08
*/
public class Split1080402 extends BaseSplitTicket{
}
| [
"1147149597@qq.com"
] | 1147149597@qq.com |
21b8f041e317be9499bd0252b5fef8acf5ebd13e | f2d85e3f5d6dcac0a7b18cbfef6d6b7c62ab570a | /rdma-based-storm/external/storm-kafka/src/jvm/org/apache/storm/kafka/MessageMetadataSchemeAsMultiScheme.java | a53fa8811c685c769dc7ff9bd02fb7de4c66bccc | [
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"GPL-1.0-or-later"
] | permissive | dke-knu/i2am | 82bb3cf07845819960f1537a18155541a1eb79eb | 0548696b08ef0104b0c4e6dec79c25300639df04 | refs/heads/master | 2023-07-20T01:30:07.029252 | 2023-07-07T02:00:59 | 2023-07-07T02:00:59 | 71,136,202 | 8 | 14 | Apache-2.0 | 2023-07-07T02:00:31 | 2016-10-17T12:29:48 | Java | UTF-8 | Java | false | false | 1,585 | 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.storm.kafka;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.List;
import org.apache.storm.spout.SchemeAsMultiScheme;
public class MessageMetadataSchemeAsMultiScheme extends SchemeAsMultiScheme {
private static final long serialVersionUID = -7172403703813625116L;
public MessageMetadataSchemeAsMultiScheme(MessageMetadataScheme scheme) {
super(scheme);
}
public Iterable<List<Object>> deserializeMessageWithMetadata(ByteBuffer message, Partition partition, long offset) {
List<Object> o = ((MessageMetadataScheme) scheme).deserializeMessageWithMetadata(message, partition, offset);
if (o == null) {
return null;
} else {
return Arrays.asList(o);
}
}
}
| [
"wnghd9999@naver.com"
] | wnghd9999@naver.com |
e43d582d5407583b311cc887215a4b6b5a9945b6 | eaec4795e768f4631df4fae050fd95276cd3e01b | /src/cmps252/HW4_2/UnitTesting/record_3049.java | 080ad4b714746a91f2a8d7c4e98c256b29b130a2 | [
"MIT"
] | permissive | baraabilal/cmps252_hw4.2 | debf5ae34ce6a7ff8d3bce21b0345874223093bc | c436f6ae764de35562cf103b049abd7fe8826b2b | refs/heads/main | 2023-01-04T13:02:13.126271 | 2020-11-03T16:32:35 | 2020-11-03T16:32:35 | 307,839,669 | 1 | 0 | MIT | 2020-10-27T22:07:57 | 2020-10-27T22:07:56 | null | UTF-8 | Java | false | false | 2,444 | java | package cmps252.HW4_2.UnitTesting;
import static org.junit.jupiter.api.Assertions.*;
import java.io.FileNotFoundException;
import java.util.List;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import cmps252.HW4_2.Customer;
import cmps252.HW4_2.FileParser;
@Tag("21")
class Record_3049 {
private static List<Customer> customers;
@BeforeAll
public static void init() throws FileNotFoundException {
customers = FileParser.getCustomers(Configuration.CSV_File);
}
@Test
@DisplayName("Record 3049: FirstName is Coy")
void FirstNameOfRecord3049() {
assertEquals("Coy", customers.get(3048).getFirstName());
}
@Test
@DisplayName("Record 3049: LastName is Klyman")
void LastNameOfRecord3049() {
assertEquals("Klyman", customers.get(3048).getLastName());
}
@Test
@DisplayName("Record 3049: Company is Metrosonics Inc Factory Rep")
void CompanyOfRecord3049() {
assertEquals("Metrosonics Inc Factory Rep", customers.get(3048).getCompany());
}
@Test
@DisplayName("Record 3049: Address is 1402 E Rancier Ave #-b1")
void AddressOfRecord3049() {
assertEquals("1402 E Rancier Ave #-b1", customers.get(3048).getAddress());
}
@Test
@DisplayName("Record 3049: City is Killeen")
void CityOfRecord3049() {
assertEquals("Killeen", customers.get(3048).getCity());
}
@Test
@DisplayName("Record 3049: County is Bell")
void CountyOfRecord3049() {
assertEquals("Bell", customers.get(3048).getCounty());
}
@Test
@DisplayName("Record 3049: State is TX")
void StateOfRecord3049() {
assertEquals("TX", customers.get(3048).getState());
}
@Test
@DisplayName("Record 3049: ZIP is 76541")
void ZIPOfRecord3049() {
assertEquals("76541", customers.get(3048).getZIP());
}
@Test
@DisplayName("Record 3049: Phone is 254-634-3782")
void PhoneOfRecord3049() {
assertEquals("254-634-3782", customers.get(3048).getPhone());
}
@Test
@DisplayName("Record 3049: Fax is 254-634-8388")
void FaxOfRecord3049() {
assertEquals("254-634-8388", customers.get(3048).getFax());
}
@Test
@DisplayName("Record 3049: Email is coy@klyman.com")
void EmailOfRecord3049() {
assertEquals("coy@klyman.com", customers.get(3048).getEmail());
}
@Test
@DisplayName("Record 3049: Web is http://www.coyklyman.com")
void WebOfRecord3049() {
assertEquals("http://www.coyklyman.com", customers.get(3048).getWeb());
}
}
| [
"mbdeir@aub.edu.lb"
] | mbdeir@aub.edu.lb |
9d165b50249dd8f4a11670577d5cc497b73b2367 | c9b8db6ceff0be3420542d0067854dea1a1e7b12 | /web/KoreanAir/src/main/java/com/ke/css/cimp/fwb/fwb15/Rule_AGENT_NAME.java | 7e2fba52bf87ca8667aca514010ca7098149d8dd | [
"Apache-2.0"
] | permissive | ganzijo/portfolio | 12ae1531bd0f4d554c1fcfa7d68953d1c79cdf9a | a31834b23308be7b3a992451ab8140bef5a61728 | refs/heads/master | 2021-04-15T09:25:07.189213 | 2018-03-22T12:11:00 | 2018-03-22T12:11:00 | 126,326,291 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,155 | java | package com.ke.css.cimp.fwb.fwb15;
/* -----------------------------------------------------------------------------
* Rule_AGENT_NAME.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.5
* Produced : Tue Mar 06 10:33:43 KST 2018
*
* -----------------------------------------------------------------------------
*/
import java.util.ArrayList;
final public class Rule_AGENT_NAME extends Rule
{
public Rule_AGENT_NAME(String spelling, ArrayList<Rule> rules)
{
super(spelling, rules);
}
public Object accept(Visitor visitor)
{
return visitor.visit(this);
}
public static Rule_AGENT_NAME parse(ParserContext context)
{
context.push("AGENT_NAME");
boolean parsed = true;
int s0 = context.index;
ParserAlternative a0 = new ParserAlternative(s0);
ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>();
parsed = false;
{
int s1 = context.index;
ParserAlternative a1 = new ParserAlternative(s1);
parsed = true;
if (parsed)
{
boolean f1 = true;
@SuppressWarnings("unused")
int c1 = 0;
for (int i1 = 0; i1 < 35 && f1; i1++)
{
Rule rule = Rule_Typ_Text.parse(context);
if ((f1 = rule != null))
{
a1.add(rule, context.index);
c1++;
}
}
parsed = true;
}
if (parsed)
{
as1.add(a1);
}
context.index = s1;
}
ParserAlternative b = ParserAlternative.getBest(as1);
parsed = b != null;
if (parsed)
{
a0.add(b.rules, b.end);
context.index = b.end;
}
Rule rule = null;
if (parsed)
{
rule = new Rule_AGENT_NAME(context.text.substring(a0.start, a0.end), a0.rules);
}
else
{
context.index = s0;
}
context.pop("AGENT_NAME", parsed);
return (Rule_AGENT_NAME)rule;
}
}
/* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
| [
"whdnfka111@gmail.com"
] | whdnfka111@gmail.com |
28c5cf41ea058c46dce5f03a66088395a4f9c828 | 3c1a8b2997b31e526043459ce78395b34a3656f5 | /family-service/src/main/java/com/amos/service/ITblColorService.java | f1bccc7fa17b0ecbd42b415958989a0afeb46377 | [] | no_license | amosluo/java | 1350bde7274e78baeb580e4e7af1f579e6859d2e | 6d556063dfafa19243ecaff07755c7c5e0782e2d | refs/heads/master | 2023-07-25T01:02:00.887300 | 2021-09-09T03:50:35 | 2021-09-09T03:50:35 | 397,791,625 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 274 | java | package com.amos.service;
import com.amos.bean.TblColor;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 颜色管理 服务类
* </p>
*
* @author amos
* @since 2021-08-06
*/
public interface ITblColorService extends IService<TblColor> {
}
| [
"amosluo@163.com"
] | amosluo@163.com |
ba32e2397bca42df10cc37e7f65b84952929fbcf | 99a15911a848676894f7cbae01d514d052f16043 | /ai-steering/SteeringFX_behavior_classes/src/Tests/FlockingTest.java | 678d5c57a09832167953581fecc4e243d208dbe7 | [] | no_license | algerd/ai | 13f2adb6a7c7eea27e64c23912186513a9dc8baf | 4fa0212d4fe30106b497fd4f9c44399866185b76 | refs/heads/master | 2021-01-11T10:16:28.198572 | 2016-11-01T15:49:14 | 2016-11-01T15:49:14 | 72,550,742 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,537 | java |
package Tests;
import Steering.GameWorld;
import Steering.Params;
import Steering.Vehicle;
import Steering.behaviors.BehaviorType;
import Steering.behaviors.Evade;
import java.util.List;
public class FlockingTest {
private GameWorld gameWorld;
public FlockingTest (int cx, int cy) {
gameWorld = new GameWorld(cx, cy);
// Тестируем
List<Vehicle> vehicleList = gameWorld.getVehicleList();
// инициировать поведения всех агентов
for (int i = 1; i < Params.NUM_AGENTS; ++i) {
Vehicle vehicle = vehicleList.get(i);
// включить поведение "избегать столкновение" и задать цели возможных столкновений
// Evade включать до включения групповых поведений, чтобы они учли задаваемого в evade targetAgent
Evade evade = (Evade)vehicle.getBehaviorManager().get(BehaviorType.EVADE);
evade.setTargetAgent(vehicleList.get(0));
evade.on();
vehicle.getBehaviorManager().on(BehaviorType.FLOCKING);
}
// инициировать поведение главного агента
vehicleList.get(0).getBehaviorManager().on(BehaviorType.WANDER);
}
public GameWorld getGameWorld() {
return gameWorld;
}
}
| [
"algerd75@mail.ru"
] | algerd75@mail.ru |
1a2e1036eba7f957440b2e9e2861c302e8fd1f8d | 7cf0f3983be3f98300128ee9aa927d4ef530eca6 | /src/main/java/br/com/swconsultoria/cte/schema_300/procEventoCTe/SignatureType.java | 9a1968972ef54c89c2a61ba8d5e7059b59943052 | [
"MIT"
] | permissive | Samuel-Oliveira/Java_CTe | 9394ed7692c9f504aa891265831da29f2e643735 | 51e95b15a94d0796457f1a0620f37b167096bb76 | refs/heads/master | 2023-09-04T12:35:59.598280 | 2023-08-29T20:28:00 | 2023-08-29T20:28:00 | 82,298,784 | 64 | 42 | MIT | 2023-08-29T20:24:14 | 2017-02-17T13:13:34 | Java | UTF-8 | Java | false | false | 4,484 | java | //
// Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802
// Consulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem.
// Gerado em: 2019.09.22 às 09:59:16 PM BRT
//
package br.com.swconsultoria.cte.schema_300.procEventoCTe;
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.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Classe Java de SignatureType complex type.
*
* <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
*
* <pre>
* <complexType name="SignatureType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SignedInfo" type="{http://www.w3.org/2000/09/xmldsig#}SignedInfoType"/>
* <element name="SignatureValue" type="{http://www.w3.org/2000/09/xmldsig#}SignatureValueType"/>
* <element name="KeyInfo" type="{http://www.w3.org/2000/09/xmldsig#}KeyInfoType"/>
* </sequence>
* <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SignatureType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = {
"signedInfo",
"signatureValue",
"keyInfo"
})
public class SignatureType {
@XmlElement(name = "SignedInfo", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true)
protected SignedInfoType signedInfo;
@XmlElement(name = "SignatureValue", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true)
protected SignatureValueType signatureValue;
@XmlElement(name = "KeyInfo", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true)
protected KeyInfoType keyInfo;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Obtém o valor da propriedade signedInfo.
*
* @return
* possible object is
* {@link SignedInfoType }
*
*/
public SignedInfoType getSignedInfo() {
return signedInfo;
}
/**
* Define o valor da propriedade signedInfo.
*
* @param value
* allowed object is
* {@link SignedInfoType }
*
*/
public void setSignedInfo(SignedInfoType value) {
this.signedInfo = value;
}
/**
* Obtém o valor da propriedade signatureValue.
*
* @return
* possible object is
* {@link SignatureValueType }
*
*/
public SignatureValueType getSignatureValue() {
return signatureValue;
}
/**
* Define o valor da propriedade signatureValue.
*
* @param value
* allowed object is
* {@link SignatureValueType }
*
*/
public void setSignatureValue(SignatureValueType value) {
this.signatureValue = value;
}
/**
* Obtém o valor da propriedade keyInfo.
*
* @return
* possible object is
* {@link KeyInfoType }
*
*/
public KeyInfoType getKeyInfo() {
return keyInfo;
}
/**
* Define o valor da propriedade keyInfo.
*
* @param value
* allowed object is
* {@link KeyInfoType }
*
*/
public void setKeyInfo(KeyInfoType value) {
this.keyInfo = value;
}
/**
* Obtém o valor da propriedade id.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Define o valor da propriedade id.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}
| [
"samuk.exe@hotmail.com"
] | samuk.exe@hotmail.com |
650c7a33fa2e4a9305cf5de3a58d212df5e5b44e | 823e652469aa42e50af6d31eeb9b859ad9df7c04 | /java/ru/myx/ae3/transfer/encoding/stream/Base64InputStream.java | 7c6f28a7cd4bf86fa8c43ad2c63b965b56d9672f | [] | no_license | A-E-3/ae3.sdk | 1bba80a219cc70efbede1d3043b572901ac017ee | 691ae5fa5f4495214030e08fc453931725971092 | refs/heads/master | 2023-06-07T17:58:10.074023 | 2023-06-06T06:49:21 | 2023-06-06T06:49:21 | 138,877,358 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,064 | java | /*
* Code: Base64InputStream.java Originator: Java@Larsan.Net Address:
* www.larsan.net/java/ Contact: webmaster@larsan.net
*
* Copyright (C) 2000 Lars J. Nilsson
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 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 General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package ru.myx.ae3.transfer.encoding.stream;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
/**
* This class provides an InputStream for base 64 encoded input. It is
* implemented as an FilterInputStream so that any InputStream can be wrapped in
* it to provide the decoding.
* <p>
*
* The base 64 encoding is defined in RFC 1522. Basically it splits 3 bytes (3 *
* 8 bits) into four groups (4 * 6 bits) which is represented by a character
* value. This behavior makes sure that no bit of a higher order than 6 is sent
* to a stream. This input stream reverses the behavior and merges 4 groups of
* bytes (4 * 6) into three fully qualified bytes.
*
* @author Lars J. Nilsson
* @version 1.0 23/10/00
*/
public class Base64InputStream extends FilterInputStream {
// base 64 character scheme
private static final char[] XLAT = {
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z',
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'i',
'j',
'k',
'l',
'm',
'n',
'o',
'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
'x',
'y',
'z',
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'+',
'/' };
// this is the encoded character's values
private static final byte[] MATRIX = new byte[256];
static {
// fill values so that the matrix holds every encoded characters
// actual value at it's own position in the matrix
for (int i = 0; i < Base64InputStream.XLAT.length; ++i) {
Base64InputStream.MATRIX[Base64InputStream.XLAT[i]] = (byte) i;
}
}
// instance data
private final byte[] readBuffer;
private final char[] decodeBuffer;
private int readBufferIndex;
private int readBufferSize;
/**
* Create a new input stream for reading a base 64 encoded source.
*
* @param in
*/
public Base64InputStream(final InputStream in) {
super( in );
this.readBuffer = new byte[3];
this.decodeBuffer = new char[4];
this.readBufferIndex = 0;
this.readBufferSize = 0;
}
/**
* Not implemented! Will throw an IOException if used.
*/
@Override
public int available() throws IOException {
throw new IOException( "Method not suported: available()" );
}
/**
* This method decodes four encoded characters into three unencoded bytes in
* the read buffer and return the size of the buffer. (Ie: zero if we're at
* the end of the stream).
*
* @return int
* @throws IOException
*/
private int fillBuffer() throws IOException {
// load characters to a decoding character buffer
// and count the characters to make sure we've got
// an valid encoding on our hands
for (int charCount = 0; charCount < 4; charCount++) {
int tmp = -1;
do {
tmp = this.in.read();
if (tmp == -1) {
return 0;
}
} while (tmp == '\n' || tmp == '\r');
this.decodeBuffer[charCount] = (char) tmp;
}
// get the byte representation of the two first characters
final byte b_1 = Base64InputStream.MATRIX[this.decodeBuffer[0] & 0xff];
final byte b_2 = Base64InputStream.MATRIX[this.decodeBuffer[1] & 0xff];
// decode the first real byte by shifting the bytes from previous step
// to their real position and then "merge" them (bitwise OR)
this.readBuffer[0] = (byte) (b_1 << 2 & 0xfc | b_2 >>> 4 & 0x3);
// character 3 and 4 can be '=' characters to mark the end of the file,
// but if they are not - decode them too
if (this.decodeBuffer[2] != '=') {
final byte b_3 = Base64InputStream.MATRIX[this.decodeBuffer[2] & 0xff];
this.readBuffer[1] = (byte) (b_2 << 4 & 0xf0 | b_3 >>> 2 & 0xf);
if (this.decodeBuffer[3] != '=') {
final byte b_4 = Base64InputStream.MATRIX[this.decodeBuffer[3] & 0xff];
this.readBuffer[2] = (byte) (b_3 << 6 & 0xc0 | b_4 & 0x3f);
return 3;
}
this.readBuffer[2] = -1;
return 2;
}
this.readBuffer[1] = -1;
this.readBuffer[2] = -1;
return 1;
}
/**
* Not implemented!
*/
public void mark() {
// empty
}
/**
* Checks if the stream supports marks, which it does not.
*/
@Override
public boolean markSupported() {
return false;
}
/**
* Read a single byte from the stream. This method will return a byte value
* as an integer or mark the end of the stream with -1.
*/
@Override
public int read() throws IOException {
// if we have decoded bytes ready, return them
if (this.readBufferIndex < this.readBufferSize) {
return this.readBuffer[this.readBufferIndex++] & 0xFF;
}
this.readBufferSize = this.fillBuffer();
this.readBufferIndex = 0;
if (this.readBufferSize == 0) {
return -1;
}
return this.read();
}
/**
* Read bytes from stream into an array. Will return the number of bytes
* read or -1 if we're at the end of the stream.
*/
@Override
public int read(final byte[] out) throws IOException {
return this.read( out, 0, out.length );
}
/**
* Read bytes from stream into array starting at <code>startAt</code>,
* reading <code>length</code> number of bytes. Will return the number of
* bytes read or -1 if we're at the end of the stream.
*/
@Override
public int read(final byte[] out, final int startAt, final int length) throws IOException {
int answer = 0;
for (int i = 0; i < length; ++i) {
final int tmp = this.read();
if (tmp == -1) {
if (i == 0) {
answer = -1;
}
break;
}
out[startAt + i] = (byte) tmp;
answer++;
}
return answer;
}
/**
* Not implemented!
*/
@Override
public void reset() {
// empty
}
/**
* Not implemented! Will throw an IOException if used.
*/
@Override
public long skip(final long skip) throws IOException {
throw new IOException( "Method not suported: skip()" );
}
}
| [
"myx@myx.co.nz"
] | myx@myx.co.nz |
1bb0253ff36f199847166c18bb3d1edd212766f2 | 8cefcd801f8e9b69a93edbd1f75d99f77171c303 | /src/cn/year2018/chy/design/adapter/a3/Ashili.java | 8fb7e5075156b9ef81907460d918dc5f54b25020 | [
"MIT"
] | permissive | chywx/JavaSE-chy | 3219fe50df03ee1efb5dbdf26d3ea11d76929ee4 | 3f8ac7eaf2a1d87745f6eea996cf72f73450b05e | refs/heads/master | 2023-04-30T21:12:25.172175 | 2023-04-21T02:18:19 | 2023-04-21T02:18:19 | 166,914,146 | 5 | 4 | null | 2021-10-09T02:12:11 | 2019-01-22T02:35:30 | Java | UTF-8 | Java | false | false | 277 | java | package cn.year2018.chy.design.adapter.a3;
public class Ashili extends Adapter {
@Override
public void a() {
System.out.println("实现方法a被调用");
}
@Override
public void b() {
System.out.println("实现方法b被调用");
}
}
| [
"1559843332@qq.com"
] | 1559843332@qq.com |
534d95feac8ba53205f42d6b38db66bd7740b2df | ae3389e3c4091b59a7ec82d6f5fd455cf10efa84 | /app/src/main/java/com/lxj/xpopupdemo/fragment/ImageViewerDemo.java | 7dd5d40d0f19ef79da782a119bab7f4fb72145a3 | [] | no_license | 396386866/XPopup | 53ad8ea49756222912ee686b479c8efe58ba943f | 6e47e13e1ea7729a7f2ec10d8010f19c1294890e | refs/heads/master | 2020-04-19T16:34:15.948687 | 2019-01-30T07:39:17 | 2019-01-30T07:39:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,646 | java | package com.lxj.xpopupdemo.fragment;
import android.support.annotation.NonNull;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.Target;
import com.lxj.easyadapter.CommonAdapter;
import com.lxj.easyadapter.ViewHolder;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.ImageViewerPopupView;
import com.lxj.xpopup.interfaces.OnSrcViewUpdateListener;
import com.lxj.xpopupdemo.R;
import java.util.ArrayList;
/**
* Description:
* Create by lxj, at 2019/1/22
*/
public class ImageViewerDemo extends BaseFragment {
String url1 = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1548777981087&di=0618a101655e57c675c7c21b4ef55f00&imgtype=0&src=http%3A%2F%2Fimg.pconline.com.cn%2Fimages%2Fupload%2Fupc%2Ftx%2Fitbbs%2F1504%2F06%2Fc70%2F5014635_1428321310010_mthumb.jpg";
String url2 = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1549382334&di=332b0aa1ec4ccd293f176164d998e5ab&imgtype=jpg&er=1&src=http%3A%2F%2Fimgsrc.baidu.com%2Fimage%2Fc0%253Dshijue1%252C0%252C0%252C294%252C40%2Fsign%3D121ef3421a38534398c28f62fb7ada0b%2Ffaf2b2119313b07eedb4502606d7912397dd8c96.jpg";
@Override
protected int getLayoutId() {
return R.layout.fragment_image_preview;
}
ArrayList<String> list = new ArrayList<>();
RecyclerView recyclerView;
ImageView image1, image2;
@Override
public void init(View view) {
image1 = view.findViewById(R.id.image1);
image2 = view.findViewById(R.id.image2);
recyclerView = view.findViewById(R.id.recyclerView);
recyclerView.setLayoutManager(new GridLayoutManager(getContext(), 3));
list.clear();
list.add("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1548756837006&di=551df0dcf59d1d71673c3d46b33f0d93&imgtype=0&src=http%3A%2F%2Fimg5.duitang.com%2Fuploads%2Fitem%2F201308%2F04%2F20130804155912_wCRnE.thumb.700_0.jpeg");
list.add("https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2279952540,2544282724&fm=26&gp=0.jpg");
list.add("https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=851052518,4050485518&fm=26&gp=0.jpg");
list.add("https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=174904559,2874238085&fm=26&gp=0.jpg");
list.add("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1548764579122&di=e3a46d9075ee49ecefb552a447974ddc&imgtype=0&src=http%3A%2F%2Fimg5q.duitang.com%2Fuploads%2Fitem%2F201112%2F03%2F20111203233836_3wu5E.thumb.700_0.jpg");
list.add("https://user-gold-cdn.xitu.io/2019/1/25/168839e977414cc1?imageView2/2/w/800/q/100");
recyclerView.setAdapter(new ImageAdapter());
Glide.with(this).load(url1).into(image1);
Glide.with(this).load(url2).into(image2);
image1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
XPopup.get(getContext())
.asImageViewer(image1, url1)
.show();
}
});
image2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
XPopup.get(getContext())
.asImageViewer(image2, url2)
.show();
}
});
}
class ImageAdapter extends CommonAdapter<String> {
public ImageAdapter() {
super(R.layout.adapter_image, list);
}
@Override
protected void convert(@NonNull final ViewHolder holder, @NonNull final String s, final int position) {
final ImageView imageView = holder.<ImageView>getView(R.id.image);
//1. 加载图片
Glide.with(imageView).load(s).into(imageView);
//2. 设置点击
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
XPopup.get(getContext()).asImageViewer(imageView, position, list, new OnSrcViewUpdateListener() {
@Override
public void onSrcViewUpdate(ImageViewerPopupView popupView, int position) {
popupView.updateSrcView((ImageView) recyclerView.getChildAt(position));
}
}).show();
}
});
}
}
}
| [
"16167479@qq.com"
] | 16167479@qq.com |
b7eb14ef3c7d73554b543638f008066c37dc735b | 9786e79a538b69e7809f3fa19eee415440d71c44 | /src/main/java/com/rent/entity/SmsKeywords.java | cfd80696f199fa04c364b284e5c45e215a06115c | [] | no_license | stevenbluesky/rent | 326095de1ea35783c229276b64024a30cf72d6cd | a12d7c49f163ae8296cb78a53bd7fd3f8278d3d7 | refs/heads/master | 2020-04-30T14:04:45.093732 | 2019-03-26T01:18:12 | 2019-03-26T01:18:12 | 176,878,556 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 615 | java | package com.rent.entity;
/**
* SmsKeywords entity. @author MyEclipse Persistence Tools
*/
public class SmsKeywords implements java.io.Serializable {
// Fields
private Integer id;
private String words;
// Constructors
/** default constructor */
public SmsKeywords() {
}
/** full constructor */
public SmsKeywords(String words) {
this.words = words;
}
// Property accessors
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String getWords() {
return this.words;
}
public void setWords(String words) {
this.words = words;
}
} | [
"stevenbluesky@163.com"
] | stevenbluesky@163.com |
b08c30aa23d17f904ffd9e20aeda1e4287391cf6 | fd8ff83f7e4ddb03e7943ba7ae7e438ea594fe79 | /src/bank/Current.java | 7b5dda79fea2fe8283758b983a45b7f55b45d361 | [] | no_license | automationtrainingcenter/sony_java | 2db3e9a26c5812dba2a27e5d1b2472beffac4616 | 8692ef1370f34ec59df1759b4a6d97ec1cea1606 | refs/heads/master | 2020-07-01T19:42:57.434462 | 2019-10-18T14:27:07 | 2019-10-18T14:27:07 | 201,276,449 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 569 | java | package bank;
public class Current extends BaseAccount {
private final int MIN_BALANCE = 25000;
{
// instance initialization blocks
if(MIN_BALANCE > this.balance) {
throw new RuntimeException("object creation failed");
}
}
public Current(int accNum, String name, int balance, int pin) {
super(accNum, name, balance, pin);
}
@Override
public int withdraw(int amount) {
int amt = super.withdraw(amount);
if(amt > 0 && this.balance < this.MIN_BALANCE) {
this.balance -= 700;
System.out.println("applied fine");
}
return amt;
}
}
| [
"atcsurya@gmail.com"
] | atcsurya@gmail.com |
9d7c97833bf225e5aa84638f1d715e0dad6571d9 | 06e49b483a37a6b715b7ec5c2d0792b4aba16216 | /app/src/main/java/creatercaccount/lingdian/com/creatercaccount/nets/netestatus/DebugOnNetPrefix.java | 04b9b83b919aae76e4f60476e2a373809eac0490 | [] | no_license | xuhuawei131/CreatRcAccount | 23c07f92e4f2d2d4839960309f333978ff8fef4b | 2c2dc08b39dc82186d7c6d2adc081a36f588c8f9 | refs/heads/master | 2021-08-23T05:02:45.478414 | 2017-12-03T13:57:41 | 2017-12-03T13:57:41 | 112,929,130 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 823 | java | package creatercaccount.lingdian.com.creatercaccount.nets.netestatus;
import creatercaccount.lingdian.com.creatercaccount.MyStringBuilder;
/**
* Created by lingdian on 2017/11/27.
*/
public class DebugOnNetPrefix extends BaseNetUrl {
@Override
public MyStringBuilder getApiPrefix() {
MyStringBuilder sb = new MyStringBuilder(getHttp());
sb.append("://qa.knowbox.cn:8019");
return sb;
}
@Override
public MyStringBuilder getPayPrefix() {
MyStringBuilder sb = new MyStringBuilder(getHttp());
sb.append("://betassweb.knowbox.cn:7001/");
return sb;
}
@Override
public MyStringBuilder getWebPrefix() {
MyStringBuilder sb = new MyStringBuilder(getHttp());
sb.append("://betassweb.knowbox.cn:7001/");
return sb;
}
}
| [
"xuhw@knowbox.cn"
] | xuhw@knowbox.cn |
06cc9047e97a7ffca379b2ccf79b0c036aebec1a | 9687386c9f4fea16122c6c841dc0e7a6a85121bb | /src/main/java/m09/s23/Reflection.java | ce2a392ba5e2190e22894f1bba2d9959e5f701ac | [] | no_license | DylanBLQ/jse | 667046afcd312ea2edd1faf108c1d0bfe5f26611 | c3dc2e479a3a9dac42875285798514dfe11ab7cd | refs/heads/master | 2023-02-28T15:38:07.941728 | 2021-01-28T11:10:04 | 2021-01-28T11:10:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,128 | java | package m09.s23;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
public class Reflection {
private static void printIntegerMethods() {
Class<?> c = Integer.class;
Method[] methods = c.getMethods();
for (Method method : methods) {
System.out.println(method);
}
}
private static void printDefaultArrayListCapacity() {
ArrayList<Integer> al = new ArrayList<>();
al.add(1);
// since Java 9: warning for illegal reflective access
try {
Field field = ArrayList.class.getDeclaredField("elementData");
field.setAccessible(true);
Object[] data = (Object[]) field.get(al);
System.out.println("My ArrayList has capacity " + data.length);
} catch (NoSuchFieldException | SecurityException | IllegalAccessException e) {
System.out.println("Couldn't get ArrayList capacity: " + e.getMessage());
}
}
public static void main(String[] args) {
printIntegerMethods();
printDefaultArrayListCapacity();
}
}
| [
"egalli64@gmail.com"
] | egalli64@gmail.com |
cccb5601627c61289d317c1a39e7cc733cdc8412 | 9049eabb2562cd3e854781dea6bd0a5e395812d3 | /sources/com/google/android/gms/auth/api/phone/operation/AutofillSettingsIntentOperation.java | 3ee3596ea9fa58fae40ed69f1ef109fa0270e23e | [] | no_license | Romern/gms_decompiled | 4c75449feab97321da23ecbaac054c2303150076 | a9c245404f65b8af456b7b3440f48d49313600ba | refs/heads/master | 2022-07-17T23:22:00.441901 | 2020-05-17T18:26:16 | 2020-05-17T18:26:16 | 264,227,100 | 2 | 5 | null | null | null | null | UTF-8 | Java | false | false | 846 | java | package com.google.android.gms.auth.api.phone.operation;
import android.content.Intent;
import com.felicanetworks.mfc.C0126R;
import com.google.android.gms.chimera.GoogleSettingsItem;
/* compiled from: :com.google.android.gms@201515033@20.15.15 (120300-306758586) */
public final class AutofillSettingsIntentOperation extends qld {
/* renamed from: b */
public final GoogleSettingsItem mo7154b() {
if (!cceb.m129359c() || !ibb.m15152a(this)) {
return null;
}
Intent a = mo24067a("com.google.android.gms.auth.api.phone.ACTION_AUTOFILL_SETTINGS");
if (cceb.m129363g()) {
return new GoogleSettingsItem(a, 8, getString(C0126R.string.f7406x9d36d85c), 61);
}
return new GoogleSettingsItem(a, 0, getString(C0126R.string.sms_code_autofill_settings_title_v2), 61);
}
}
| [
"roman.karwacik@rwth-aachen.de"
] | roman.karwacik@rwth-aachen.de |
e0a00e9bae40d7ea8f753aa8daa13216748f8f20 | 2d68ab767d409a15e79f9e57b6e130dfd4c34534 | /src/test/java/org/yaml/snakeyaml/generics/ObjectValuesTest.java | 233a03d5e5fe739b218a98bafb8ba6b714766056 | [
"Apache-2.0"
] | permissive | Mause/snakeyaml | 8855b3b497a10dc8498920aebc263aa309369bc0 | e158f73868d247fc53c7badf011e6be13df9256c | refs/heads/master | 2022-05-29T23:35:47.469205 | 2015-03-25T09:05:51 | 2015-03-25T09:05:51 | 32,853,170 | 0 | 0 | Apache-2.0 | 2022-05-17T03:20:27 | 2015-03-25T08:58:10 | Java | UTF-8 | Java | false | false | 3,479 | java | /**
* Copyright (c) 2008, http://www.snakeyaml.org
*
* 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.yaml.snakeyaml.generics;
import static org.junit.Assert.assertArrayEquals;
import java.util.HashMap;
import java.util.Map;
import junit.framework.TestCase;
import org.yaml.snakeyaml.Yaml;
public class ObjectValuesTest extends TestCase {
public void testObjectValues() {
ObjectValues ov = new ObjectValues();
Integer obj = new Integer(131313);
ov.setObject(obj);
final Map<String, Map<Integer, Object>> prop2values = new HashMap<String, Map<Integer, Object>>();
final String[] props = { "prop1", "prop2", "prop3" };
for (String name : props) {
Map<Integer, Object> values = new HashMap<Integer, Object>();
prop2values.put(name, values);
for (int i = 0; i < 3; i++) {
values.put(i, name + i);
}
}
ov.setValues(prop2values);
ov.setPossible(props);
Yaml dumper = new Yaml();
String dumpedStr = dumper.dumpAsMap(ov);
Yaml loader = new Yaml();
ObjectValues ov2 = loader.loadAs(dumpedStr, ObjectValues.class);
assertEquals(ov.getObject(), ov2.getObject());
assertEquals(ov.getValues(), ov2.getValues());
assertArrayEquals(ov.getPossible(), ov2.getPossible());
ov.getPossible()[0] = ov2.getPossible()[0];
}
@SuppressWarnings("unchecked")
public void testObjectValuesWithParam() {
ObjectValuesWithParam<String, Integer> ov = new ObjectValuesWithParam<String, Integer>();
Integer obj = new Integer(131313);
ov.setObject(obj);
final Map<String, Map<Integer, Object>> prop2values = new HashMap<String, Map<Integer, Object>>();
final String[] props = { "prop1", "prop2", "prop3" };
for (String name : props) {
Map<Integer, Object> values = new HashMap<Integer, Object>();
prop2values.put(name, values);
for (int i = 0; i < 3; i++) {
values.put(i, name + i);
}
}
ov.setValues(prop2values);
ov.setPossible(props);
Yaml dumper = new Yaml();
String dumpedStr = dumper.dumpAsMap(ov);
Yaml loader = new Yaml();
ObjectValuesWithParam<String, Integer> ov2 = loader.loadAs(dumpedStr,
new ObjectValuesWithParam<String, Integer>().getClass());
assertEquals(ov.getObject(), ov2.getObject());
assertEquals(ov.getValues(), ov2.getValues());
assertArrayEquals(ov.getPossible(), ov2.getPossible());
// TODO: This actually FAILS. Use of GenericArrays is ..... no words.
// assertEquals(ov.getPossible()[0], ov2.getPossible()[0]);
try {
ov2.getPossible()[0].toString();
} catch (Exception e) {
assertTrue(e.getMessage(), e.getMessage().startsWith("[Ljava.lang.Object"));
}
}
}
| [
"public.somov@gmail.com"
] | public.somov@gmail.com |
b15e2d8af66ae7e554ec56b88ced0b1cc21bd107 | e369c9eb48f3b06ec4fa036fadba5a0abdd93289 | /app/src/main/java/wanbao/yongchao/com/wanbao/ui/main/mvp/body/UserHomePageBody.java | 8305c6367484fef5ad28bbd4093f6ee4661f9118 | [] | no_license | ljx123456/WanBao | 18cac2225b39df3e8b9e9aaf96eb14533ca1c642 | c7235701e93d61fde0361cbf5731ca0c626a9d16 | refs/heads/master | 2021-05-18T12:31:42.161887 | 2020-03-30T09:24:28 | 2020-03-30T09:24:28 | 251,243,893 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 359 | java | package wanbao.yongchao.com.wanbao.ui.main.mvp.body;
public class UserHomePageBody {
/**
* id : 11
* name : 张三
*/
private String id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public UserHomePageBody(String id) {
this.id = id;
}
}
| [
"911015964@qq.com"
] | 911015964@qq.com |
a42f09e1c19a16a6a4630d7b4bf42141cad7364d | 6f516315e7454a250ad09c6ac1a1bbffd284917b | /trunk/rno-gsm-demo/src/main/java/com/hgicreate/rno/demo/config/WebSecurityConfig.java | d2db08041fbe9ee598c283a51e53ed4c1c06126b | [] | no_license | tianxiao666/rno-gsm | ee50b243f012615487f6a8a30e90bc01f4c20517 | 9527fae599c4f5ddb4f7b19da78cc36f2f33919d | refs/heads/master | 2021-04-03T04:17:53.751162 | 2018-03-13T09:19:15 | 2018-03-13T09:19:15 | 125,024,357 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,059 | java | package com.hgicreate.rno.demo.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/css/**", "/img/**", "/js/**", "/lib/**", "/files/**")
.permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login")
.permitAll()
.and()
.logout()
.permitAll();
// 解决 iframe 的权限问题
http.headers().frameOptions().sameOrigin()
.httpStrictTransportSecurity().disable().and().csrf().disable();
}
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication()
.withUser("sa").password("123456").roles("USER").and()
.withUser("admin").password("admin").roles("ADMIN");
}
@Bean
public AuthenticationSuccessHandler successHandler() {
SimpleUrlAuthenticationSuccessHandler handler = new SimpleUrlAuthenticationSuccessHandler();
handler.setUseReferer(true);
return handler;
}
}
| [
"chao.xj@hgicreate.com"
] | chao.xj@hgicreate.com |
ce75e21127f0897985d9ae83a2179e09e94f0106 | 1c620842d2ce107dd147ac69d2d9701c4898a016 | /app/src/main/java/speedata/com/powermeasure/activity/DelayApplyAct.java | be9d061a2a7905644839118db3e13679721c578d | [] | no_license | AndroidZM233/PowerMeasure | ebdfefe8106107cbd09d262c1e901fdef8167956 | ee57d75e7032c0f8a86f1ae3843c01699cc4ada4 | refs/heads/master | 2020-06-01T04:02:10.777324 | 2017-06-12T06:42:08 | 2017-06-12T06:42:08 | 94,061,371 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,977 | java | package speedata.com.powermeasure.activity;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.ViewById;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import common.base.App;
import common.base.act.FragActBase;
import common.event.ViewMessage;
import common.http.MResponse;
import common.http.MResponseListener;
import common.view.CustomTitlebar;
import speedata.com.powermeasure.R;
import speedata.com.powermeasure.bean.LoginOutClass;
import speedata.com.powermeasure.model.WebModel;
import speedata.com.powermeasure.view.SelectDateDialog;
import speedata.com.powermeasure.view.SelectTimeDialog;
@EActivity(R.layout.activity_delay_apply)
public class DelayApplyAct extends FragActBase {
@ViewById
CustomTitlebar titlebar;
@ViewById
TextView tv_delay_time;
@ViewById
TextView tv_delay_year;
@ViewById
TextView tv_delay_hour;
@ViewById
Button btn_delay_sure;
@ViewById
LinearLayout ll_planEnd;
@ViewById
TextView tv_alSecond_planEnd;
@ViewById
EditText AL_SECFLAG;
@ViewById
LinearLayout ll_AL_SECFLAG;
private SimpleDateFormat formatter;
private String str;
private Date date;
private String[] hour;
@AfterViews
protected void main() {
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
App.getInstance().addActivity(DelayApplyAct.this);
setSwipeEnable(false);
initTitlebar();
String al_secflag = getXml("AL_SECFLAG", "3");
if (al_secflag.equals("1")){
ll_AL_SECFLAG.setVisibility(View.VISIBLE);
}
formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
Date curDate = new Date(System.currentTimeMillis());//获取当前时间
str = formatter.format(curDate);
hour = str.split(" ");
tv_delay_hour.setText(hour[1]);
tv_delay_year.setText(hour[0]);
String plan_end_time = getXml("PLAN_END_TIME", "");
if (TextUtils.isEmpty(plan_end_time)){
ll_planEnd.setVisibility(View.GONE);
}else {
ll_planEnd.setVisibility(View.VISIBLE);
tv_delay_time.setText(getXml("PLAN_BGN_TIME",""));
tv_alSecond_planEnd.setText(plan_end_time);
}
}
@Click
void tv_delay_year() {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date curDate = new Date(System.currentTimeMillis());//获取当前时间
String str = formatter.format(curDate);
SelectDateDialog dateDialog = new SelectDateDialog(mContext, new SelectDateDialog
.ShowDate() {
@Override
public void showDate(String time) {
tv_delay_year.setText(time);
}
}, str);
dateDialog.show();
}
@Click
void btn_delay_sure() {
String year = tv_delay_year.getText().toString();
String hour = tv_delay_hour.getText().toString();
String lastTime = year + " " + hour;
String al_secflag_str = AL_SECFLAG.getText().toString();
String al_secflag = getXml("AL_SECFLAG", "3");
showLoading("延期中...");
WebModel.getInstance().delayApply(new MResponseListener() {
@Override
public void onSuccess(MResponse response) {
String callWebService = String.valueOf(response.data);
List<LoginOutClass> loginOutClasses = JSON.parseArray(callWebService,
LoginOutClass.class);
LoginOutClass maintFeedback = loginOutClasses.get(0);
String rt_f = maintFeedback.getRT_F();
if (rt_f.equals("1")) {
showToast("延期成功!");
openAct(AlarmActNew.class,true);
finish();
} else {
showToast(maintFeedback.getRT_D());
}
hideLoading();
}
@Override
public void onError(final MResponse response) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (response.msg != null) {
showToast(response.msg.toString());
} else {
showToast("出错了!");
}
hideLoading();
}
});
}
},getXml("OPER_NO", "1"), getXml("AL_ORDER_NO", ""), lastTime,al_secflag,al_secflag_str);
}
@Click
void tv_delay_hour() {
SelectTimeDialog dateDialog = new SelectTimeDialog(mContext, new SelectTimeDialog
.ShowDate() {
@Override
public void showDate(String time) {
tv_delay_hour.setText(time);
}
}, hour[1]);
dateDialog.show();
}
@Override
protected Context regieterBaiduBaseCount() {
return null;
}
@Override
protected void initTitlebar() {
titlebar.setTitlebarStyle(CustomTitlebar.TITLEBAR_STYLE_NORMAL);
titlebar.setAttrs(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
}, "延期日期",
getXml("OPER_NAME",""),getXml("DEPT_NAME",""),getXml("ROLE_NAME","运维"),null);
}
@Override
public void onEventMainThread(ViewMessage viewMessage) {
}
}
| [
"ming.zhang@speedatagroup.com"
] | ming.zhang@speedatagroup.com |
08fa17cb1d5b4fc00b487eb89cd8769bade9ebf1 | 1f29f7842e30d6265fb9dbb302fe9414755e7403 | /src/main/java/com/eurodyn/okstra/SchichtenverbundPropertyType.java | 16d87e69d295e85d0010ff288ede10ac57e4be03 | [] | no_license | dpapageo/okstra-2018-classes | b4165aea3c84ffafaa434a3a1f8cf0fff58de599 | fb908eabc183725be01c9f93d39268bb8e630f59 | refs/heads/master | 2021-03-26T00:22:28.205974 | 2020-03-16T09:16:31 | 2020-03-16T09:16:31 | 247,657,881 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,064 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.03.09 at 04:49:50 PM EET
//
package com.eurodyn.okstra;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for SchichtenverbundPropertyType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SchichtenverbundPropertyType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.okstra.de/okstra/2.018.2}Schichtenverbund"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SchichtenverbundPropertyType", propOrder = {
"schichtenverbund"
})
public class SchichtenverbundPropertyType {
@XmlElement(name = "Schichtenverbund", required = true)
protected SchichtenverbundType schichtenverbund;
/**
* Gets the value of the schichtenverbund property.
*
* @return
* possible object is
* {@link SchichtenverbundType }
*
*/
public SchichtenverbundType getSchichtenverbund() {
return schichtenverbund;
}
/**
* Sets the value of the schichtenverbund property.
*
* @param value
* allowed object is
* {@link SchichtenverbundType }
*
*/
public void setSchichtenverbund(SchichtenverbundType value) {
this.schichtenverbund = value;
}
}
| [
"Dimitrios.Papageorgiou@eurodyn.com"
] | Dimitrios.Papageorgiou@eurodyn.com |
f3aad5af83838db97be8e699aa86335759300371 | 805b2a791ec842e5afdd33bb47ac677b67741f78 | /Mage.Sets/src/mage/sets/odyssey/DarkwaterEgg.java | 52bd2d1bd08556271a08dbd3f35c6392865ae1ec | [] | no_license | klayhamn/mage | 0d2d3e33f909b4052b0dfa58ce857fbe2fad680a | 5444b2a53beca160db2dfdda0fad50e03a7f5b12 | refs/heads/master | 2021-01-12T19:19:48.247505 | 2015-08-04T20:25:16 | 2015-08-04T20:25:16 | 39,703,242 | 2 | 0 | null | 2015-07-25T21:17:43 | 2015-07-25T21:17:42 | null | UTF-8 | Java | false | false | 3,048 | java | /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.odyssey;
import java.util.UUID;
import mage.Mana;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.mana.ManaAbility;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
*
* @author fireshoes
*/
public class DarkwaterEgg extends CardImpl {
public DarkwaterEgg(UUID ownerId) {
super(ownerId, 299, "Darkwater Egg", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
this.expansionSetCode = "ODY";
// {2}, {tap}, Sacrifice Darkwater Egg: Add {U}{B} to your mana pool. Draw a card.
ManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0), new ManaCostsImpl("{2}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addEffect(new DrawCardSourceControllerEffect(1));
ability.setUndoPossible(false);
this.addAbility(ability);
}
public DarkwaterEgg(final DarkwaterEgg card) {
super(card);
}
@Override
public DarkwaterEgg copy() {
return new DarkwaterEgg(this);
}
}
| [
"fireshoes@fireshoes-PC"
] | fireshoes@fireshoes-PC |
df86083d8e6e2779e162cf9375895d4c0c1e1aff | bee40bed1a25806f45d147720260d52a6d149694 | /MyBatis/SpringBoot/web-services-spring-rest-server/src/main/java/de/spring/webservices/rest/configuration/Swagger2Configuration.java | 07c916b3fb1ff1e4a77a8456b0868a116634fa34 | [] | no_license | alephzed/JavaForFun | de0c02fd562b54d10a26965b920e0884b8072f9d | 199131b8dc8224faa2bfcfe0de3dc3310483d8e5 | refs/heads/master | 2022-03-08T11:04:47.676423 | 2019-11-10T21:34:24 | 2019-11-10T21:34:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,143 | java | package de.spring.webservices.rest.configuration;
import static com.google.common.collect.Lists.newArrayList;
import static springfox.documentation.builders.RequestHandlerSelectors.basePackage;
import static springfox.documentation.builders.RequestHandlerSelectors.withMethodAnnotation;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.ResponseMessageBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger.web.UiConfiguration;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* Go to URL: http://localhost:8080/swagger-ui.html#/
*
*/
@Configuration
@EnableSwagger2
public class Swagger2Configuration {
@Bean
public Docket documentation() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(withMethodAnnotation(RequestMapping.class))
.apis(basePackage("de.spring.webservices.rest.controller"))
.paths(PathSelectors.any())
.build()
.globalResponseMessage(RequestMethod.GET,
newArrayList(new ResponseMessageBuilder()
.code(500).message("Global server custom error message").build()))
.useDefaultResponseMessages(false)
.apiInfo(metadata())
.enable(true);
}
@Bean
UiConfiguration uiConfig() {
return new UiConfiguration(null);
}
private static ApiInfo metadata() {
return new ApiInfoBuilder()
.title("gumartinm REST API")
.description("Gustavo Martin Morcuende")
.version("1.0-SNAPSHOT")
.contact(doContact())
.build();
}
private static Contact doContact() {
return new Contact("Gustavo Martin", "https://gumartinm.name", "");
}
}
| [
"gu.martinm@gmail.com"
] | gu.martinm@gmail.com |
d987b6213eb6a01ab63de5495a60b49db3d50425 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/61/org/apache/commons/math/optimization/fitting/GaussianFitter_createParametersGuesser_117.java | eb0296ef6f79053b08b193afe778d1cafd9f4f06 | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,435 | java |
org apach common math optim fit
fit point gaussian function link gaussian function gaussianfunct
usag
pre
gaussian fitter gaussianfitt fitter gaussian fitter gaussianfitt
levenberg marquardt optim levenbergmarquardtoptim
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
fitter add observ point addobservedpoint
gaussian function gaussianfunct fit function fitfunct fitter fit
pre
parametr gaussian function parametricgaussianfunct
version revis date
gaussian fitter gaussianfitt
factori method creat code gaussian paramet guesser gaussianparametersguess code
instanc initi observ
param observ point initi creat
code gaussian paramet guesser gaussianparametersguess code instanc
code gaussian paramet guesser gaussianparametersguess code instanc
gaussian paramet guesser gaussianparametersguess creat paramet guesser createparametersguess weight observ point weightedobservedpoint observ
gaussian paramet guesser gaussianparametersguess observ
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
e914f9b6cb0e992538c5ec1cd45bcf9fd9c7ee73 | 392402e5a3b31cb6d1c4d0a806bc7e6cd8789545 | /src/com/jack/algorithm/problem/midium/LeetCode0754.java | bbb229ffb2494f88048ff815108b41fbd2eb6c6e | [] | no_license | 1139195320/leetcode-study | b1ccec1edf493176c04c918fe47945cc90a42a05 | fef300bd46befe5110aac24dfa68ad1c1b0c9a4e | refs/heads/master | 2023-01-01T14:09:53.961160 | 2020-10-28T02:33:10 | 2020-10-28T02:33:10 | 296,997,235 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 515 | java | package com.jack.algorithm.problem.midium;
/**
* @author jack
*/
public class LeetCode0754 {
public int reachNumber(int target) {
target = Math.abs(target);
int c = 0;
while (target > 0) {
target -= ++c;
}
return target % 2 == 0 ? c : c + 1 + c % 2;
}
public static void main(String[] args) {
LeetCode0754 main = new LeetCode0754();
System.out.println(main.reachNumber(3));
System.out.println(main.reachNumber(2));
}
} | [
"fy1139195320@qq.com"
] | fy1139195320@qq.com |
1469aceafe4654b78de662245263a3e8464fa5ba | 7f50134913064c7133620ddec990926cb4118cd9 | /IfThenElse/src/com/company/Main.java | 790dda75f4b17b86c3903a2ff7520971cf2c926e | [] | no_license | CourtneyBritney/JavaAdvanced24 | bf7998a4d39e1bdfe1bff1acdbb6fe8ca2eaa540 | 04a837839edeca4f91646ecbf5f38ed3b1d8eb4e | refs/heads/master | 2022-09-22T06:07:32.518735 | 2020-06-01T16:56:36 | 2020-06-01T16:56:36 | 268,564,587 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 268 | java | package com.company;
public class Main {
public static void main(String[] args) {
long a = 1;
long b = 2;
if (a == b) {
System.out.println("True");
} else {
System.out.println("False");
}
}
}
| [
"courtney02alexander@gmail.com"
] | courtney02alexander@gmail.com |
052476c676ebc98deeffd24179a20fb4ac45f676 | 8d0c69b76d3d7babbbf0a5ba59538e1decd9a233 | /DevEnvironment/BasicIO/src/main/java/basicio/core/JsonHtmlParserApi.java | 2ed313fd743c08bb476bc7efee6a1a701250d2f6 | [] | no_license | bentalcode/Projects | 36f6814f07f6b1d4263a6f3bf357c316265cecad | 56c38a0db5bccbf991fbc4f55d91fec4eaff7a2b | refs/heads/master | 2022-05-26T03:11:27.546013 | 2022-05-13T04:30:45 | 2022-05-13T04:30:45 | 183,346,867 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,252 | java | package basicio.core;
import base.core.Conditions;
import basicio.JsoupHtmlParserException;
import java.io.IOException;
import org.jsoup.Connection;
import org.jsoup.nodes.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The JsoupHtmlParserApi class implements complementary APIs for json html parser module.
*/
public final class JsonHtmlParserApi {
private static final Logger LOG = LoggerFactory.getLogger(JsonHtmlParserApi.class);
/**
* Creates a new Connection to a URL
*/
public static Document getDocument(Connection connection) {
Conditions.validateNotNull(
connection,
"The connection.");
Document document;
try {
document = connection.get();
}
catch (IOException e) {
String errorMessage =
"Failed to get document of connection: " + connection +
" due to the following error: " + e.getMessage();
LOG.error(errorMessage, e);
throw new JsoupHtmlParserException(errorMessage, e);
}
return document;
}
/**
* Disables the default constructor - This is a static class.
*/
private JsonHtmlParserApi() {
}
}
| [
"bentaltagor@protonmail.com"
] | bentaltagor@protonmail.com |
b1e49d9d50f2914531431eec0eab9d0d3e0d38be | d34e19cb38799cc4d998b70607a8e55072df8ecc | /src/main/java/com/aladdin/manage/project/bean/Project.java | 499d24367dcddcc38b17fd15aa70337ebc52c4cb | [] | no_license | githublibiao6/company | c651ffaff3c1a80bf05972d94105a70cd86425de | b5abc7014e18cc0a4686a83a2d236ef1769bd540 | refs/heads/master | 2022-12-23T15:05:52.477884 | 2019-11-20T14:03:42 | 2019-11-20T14:03:42 | 133,148,639 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,365 | java | package com.aladdin.manage.project.bean;
/**
* 项目实体类
* @author lb
* @date 2018年6月24日 下午6:52:01
*/
public class Project {
private String code; // 项目编码
private String projectName; // 项目名
private String projectAddress; // 项目地址
private String leader;// 项目负责人
private String notes; // 项目描述
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public String getProjectAddress() {
return projectAddress;
}
public void setProjectAddress(String projectAddress) {
this.projectAddress = projectAddress;
}
public String getLeader() {
return leader;
}
public void setLeader(String leader) {
this.leader = leader;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
@Override
public String toString() {
return "Admin [code=" + code + ", projectName=" + projectName + ", projectAddress=" + projectAddress
+ ", leader=" + leader + ", notes=" + notes + "]";
}
}
| [
"1446977718@qq.com"
] | 1446977718@qq.com |
f06aa457879569a96904eb281d985f239db22c1c | 96bb1a592980f68d0635a2c9bf0c685b223bcac1 | /springboot/src/test/java/ca/jrvs/apps/trading/service/OrderServiceUnitTest.java | eed1a383a767162fb48799c148cd6585a1b815d0 | [] | no_license | jarviscanada/jarvis_data_eng_derek | 0396f12f51b48859a49ae41dc68b86c1246bca64 | 41ce435d05f00a3b18a43a328b9a143699ce8b03 | refs/heads/master | 2021-01-05T10:10:03.333282 | 2020-07-20T20:46:52 | 2020-07-20T20:46:52 | 240,987,142 | 0 | 0 | null | 2020-09-14T18:48:56 | 2020-02-17T00:09:43 | Java | UTF-8 | Java | false | false | 3,673 | java | package ca.jrvs.apps.trading.service;
import ca.jrvs.apps.trading.dao.AccountDao;
import ca.jrvs.apps.trading.dao.PositionDao;
import ca.jrvs.apps.trading.dao.QuoteDao;
import ca.jrvs.apps.trading.dao.SecurityOrderDao;
import ca.jrvs.apps.trading.model.domain.*;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.*;
import org.mockito.junit.MockitoJUnitRunner;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class OrderServiceUnitTest {
//capture parameter when calling securityOrderDao.save
@Captor
ArgumentCaptor<SecurityOrder> captorSecurityOrder;
//mock all dependencies
@Mock
private AccountDao accountDao;
@Mock
private SecurityOrderDao securityOrderDao;
@Mock
private QuoteDao quoteDao;
@Mock
private PositionDao positionDao;
//injecting mocked dependencies to the testing class via constructor
@InjectMocks
private OrderService orderService;
@Before
public void setup() {
Quote quote = new Quote();
quote.setBidSize(2);
quote.setAskSize(2);
quote.setBidPrice(10.0);
quote.setAskPrice(11.0);
quote.setTicker("FB");
quote.setLastPrice(10.0);
Mockito.when(quoteDao.findById("FB")).thenReturn(Optional.of(quote));
Account account = new Account();
account.setAmount(1000.0);
account.setId(1);
account.setTrader_id(2);
Mockito.when(accountDao.findById(any())).thenReturn(Optional.of(account));
List<Position> positions = new ArrayList<>();
Position position = new Position();
position.setPosition(5);
positions.add(position);
when(positionDao.findByColumnId(any(), any())).thenReturn(positions);
Account accountWithdraw = new Account();
accountWithdraw.setAmount(800.0);
accountWithdraw.setTrader_id(5);
accountWithdraw.setId(2);
when(accountDao.save(any())).thenReturn(accountWithdraw);
SecurityOrder securityOrder = new SecurityOrder();
securityOrder.setStatus("Done");
securityOrder.setId(2);
securityOrder.setAccount_id(1);
securityOrder.setSize(9);
securityOrder.setTicker("FB");
securityOrder.setPrice(12.0);
when(securityOrderDao.save(any())).thenReturn(securityOrder);
}
@Test
public void buy() {
MarketOrderDto marketOrderDto = new MarketOrderDto();
marketOrderDto.setAccount_id(1);
marketOrderDto.setSize(5);
marketOrderDto.setTicker("FB");
SecurityOrder securityOrderWithdraw = orderService.executeMarketOrder(marketOrderDto);
verify(securityOrderDao).save(captorSecurityOrder.capture());
assertEquals("FB", captorSecurityOrder.getValue().getTicker());
assertEquals("Filled", captorSecurityOrder.getValue().getStatus());
}
@Test
public void sell() {
MarketOrderDto marketOrderDto = new MarketOrderDto();
marketOrderDto.setAccount_id(2);
marketOrderDto.setSize(-5);
marketOrderDto.setTicker("FB");
SecurityOrder securityOrderOut = orderService.executeMarketOrder(marketOrderDto);
verify(securityOrderDao).save(captorSecurityOrder.capture());
assertEquals("FB", captorSecurityOrder.getValue().getTicker());
assertEquals("Filled", captorSecurityOrder.getValue().getStatus());
}
}
| [
"root@localhost.localdomain"
] | root@localhost.localdomain |
10db6c88f851e14def2686a0f3068b61290d6ad8 | b111b77f2729c030ce78096ea2273691b9b63749 | /db-example-large-multi-project/project0/src/test/java/org/gradle/test/performance/mediumjavamultiproject/project0/p3/Test69.java | 0e9b363a499d9f8ec802fd6fae1c64132a3eabc2 | [] | no_license | WeilerWebServices/Gradle | a1a55bdb0dd39240787adf9241289e52f593ccc1 | 6ab6192439f891256a10d9b60f3073cab110b2be | refs/heads/master | 2023-01-19T16:48:09.415529 | 2020-11-28T13:28:40 | 2020-11-28T13:28:40 | 256,249,773 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,598 | java | package org.gradle.test.performance.mediumjavamultiproject.project0.p3;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test69 {
Production69 objectUnderTest = new Production69();
@Test
public void testProperty0() throws Exception {
Production66 value = new Production66();
objectUnderTest.setProperty0(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() throws Exception {
Production67 value = new Production67();
objectUnderTest.setProperty1(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() throws Exception {
Production68 value = new Production68();
objectUnderTest.setProperty2(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() throws Exception {
String value = "value";
objectUnderTest.setProperty3(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() throws Exception {
String value = "value";
objectUnderTest.setProperty4(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() throws Exception {
String value = "value";
objectUnderTest.setProperty5(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() throws Exception {
String value = "value";
objectUnderTest.setProperty6(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() throws Exception {
String value = "value";
objectUnderTest.setProperty7(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() throws Exception {
String value = "value";
objectUnderTest.setProperty8(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() throws Exception {
String value = "value";
objectUnderTest.setProperty9(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty9());
}
} | [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
3cad66291a7b77d667bd388ea08e3d0bac01b54f | 50da4738f4f301a239858f02f8d5f4126cb4127f | /src/main/java/com/amazonaws/services/autoscaling/model/transform/AlarmStaxUnmarshaller.java | 1c0c13e80651b2678f6c1e6925f22a56c686a259 | [
"JSON",
"Apache-2.0"
] | permissive | scode/aws-sdk-for-java | f9e2d8ca181a1d56ba163c029ff90c52424f10a7 | c0bbbf7e6a6c0953e67b925c0b0732b264e87c33 | refs/heads/master | 2021-01-18T05:50:03.373152 | 2011-08-30T20:03:45 | 2011-08-30T20:03:45 | 2,297,200 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,478 | java | /*
* Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.autoscaling.model.transform;
import java.util.Map;
import java.util.Map.Entry;
import javax.xml.stream.events.XMLEvent;
import com.amazonaws.services.autoscaling.model.*;
import com.amazonaws.transform.Unmarshaller;
import com.amazonaws.transform.MapEntry;
import com.amazonaws.transform.StaxUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeStaxUnmarshallers.*;
/**
* Alarm StAX Unmarshaller
*/
public class AlarmStaxUnmarshaller implements Unmarshaller<Alarm, StaxUnmarshallerContext> {
public Alarm unmarshall(StaxUnmarshallerContext context) throws Exception {
Alarm alarm = new Alarm();
int originalDepth = context.getCurrentDepth();
int targetDepth = originalDepth + 1;
if (context.isStartOfDocument()) targetDepth += 2;
while (true) {
XMLEvent xmlEvent = context.nextEvent();
if (xmlEvent.isEndDocument()) return alarm;
if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
if (context.testExpression("AlarmName", targetDepth)) {
alarm.setAlarmName(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
}
if (context.testExpression("AlarmARN", targetDepth)) {
alarm.setAlarmARN(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
}
} else if (xmlEvent.isEndElement()) {
if (context.getCurrentDepth() < originalDepth) {
return alarm;
}
}
}
}
private static AlarmStaxUnmarshaller instance;
public static AlarmStaxUnmarshaller getInstance() {
if (instance == null) instance = new AlarmStaxUnmarshaller();
return instance;
}
}
| [
"aws-dr-tools@amazon.com"
] | aws-dr-tools@amazon.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.