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
9cd2d2d93d9ce595b7bd637d8fffdf7be8d239cd
b4878c30306dd2719f137622adc3969cf9ae5766
/mohitdb/gen/com/example/mohitdb/BuildConfig.java
9349c9ecab0550fe8b8bbcd6ab8ce2c1c5de4a0a
[]
no_license
agarwalmohit43/Android-Older-Projects-2015-
a0004bf7db5c2f2d2e98e6a388040f60304f129d
a7190fd341575113373ec32e2d63035b1d331609
refs/heads/master
2021-01-19T17:02:26.058637
2017-08-22T08:07:50
2017-08-22T08:07:50
101,037,677
0
0
null
null
null
null
UTF-8
Java
false
false
161
java
/** Automatically generated file. DO NOT MODIFY */ package com.example.mohitdb; public final class BuildConfig { public final static boolean DEBUG = true; }
[ "agarwalmohit43@gmail.com" ]
agarwalmohit43@gmail.com
b588d021c5d6bd7100da2ad89400062a595b21db
cf77384b56599c201eba57d4450b0d2782b5007e
/cosmo-api/src/main/java/org/unitedinternet/cosmo/model/filter/FilterOrder.java
47d166b123990a13857985f98abc4824f385099b
[ "Apache-2.0" ]
permissive
1and1/cosmo
76e1864ca50713e63a8fb67d26eb99f15aa83913
e6c9ae8593a36a14c0cc50c3f29137df2736bccb
refs/heads/master
2023-08-29T16:44:25.959228
2023-07-05T06:18:19
2023-07-05T06:18:19
35,554,985
79
50
Apache-2.0
2023-06-29T12:50:17
2015-05-13T14:48:26
Java
UTF-8
Java
false
false
1,365
java
/* * Copyright 2007 Open Source Applications Foundation * * 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.unitedinternet.cosmo.model.filter; /** * Represents an ordering of an item property. */ public class FilterOrder { public enum Order { ASC, DESC } private String name = null; private Order order = Order.ASC; public FilterOrder(String name) { super(); this.name = name; } public FilterOrder(String name, Order order) { super(); this.name = name; this.order = order; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Order getOrder() { return order; } public void setOrder(Order order) { this.order = order; } }
[ "corneliu.dobrota@gmail.com" ]
corneliu.dobrota@gmail.com
7c84ee467d3d8fd8013af50f589e920fcf0f91a7
65ce6407650f71b7702e81405bb4b6acf3e6d58f
/src/java/jena-arq-2.9.0-incubating/src/main/java/com/hp/hpl/jena/sparql/algebra/op/OpJoin.java
f2f40168f79ce87584de82bccb1a8ed024f656a0
[ "Apache-2.0" ]
permissive
arjunakula/Visual-Dialogue-System
00177cb15fb148a8bb4884946f81201926935627
7629301ae28acd6618dd54fd73e40e28584f0c56
refs/heads/master
2020-05-02T09:14:32.519255
2019-03-26T20:56:34
2019-03-26T20:56:34
177,865,899
1
0
null
null
null
null
UTF-8
Java
false
false
2,767
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hp.hpl.jena.sparql.algebra.op; import com.hp.hpl.jena.sparql.algebra.Op ; import com.hp.hpl.jena.sparql.algebra.OpVisitor ; import com.hp.hpl.jena.sparql.algebra.Table ; import com.hp.hpl.jena.sparql.algebra.Transform ; import com.hp.hpl.jena.sparql.algebra.table.TableUnit ; import com.hp.hpl.jena.sparql.sse.Tags ; import com.hp.hpl.jena.sparql.util.NodeIsomorphismMap ; public class OpJoin extends Op2 { public static Op create(Op left, Op right) { // Don't simplify here - changes SPARQL for OPTIONAL {{ FILTER }} // The {{}} results in (join unit (filter ...)) the filter is not moved // into the LeftJoin. // // Inline simplification (too early - changes SPARQL for OPTIONAL {{ FILTER }} // if ( simplifyEarly ) // { // if ( isJoinIdentify(left) ) // return right ; // // if ( isJoinIdentify(right) ) // return left ; // } return new OpJoin(left, right) ; } public static boolean isJoinIdentify(Op op) { if ( ! ( op instanceof OpTable ) ) return false ; Table t = ((OpTable)op).getTable() ; // Safe answer. return (t instanceof TableUnit) ; } private OpJoin(Op left, Op right) { super(left, right) ; } @Override public String getName() { return Tags.tagJoin ; } @Override public Op apply(Transform transform, Op left, Op right) { return transform.transform(this, left, right) ; } @Override public void visit(OpVisitor opVisitor) { opVisitor.visit(this) ; } @Override public Op copy(Op newLeft, Op newRight) { return new OpJoin(newLeft, newRight) ; } @Override public boolean equalTo(Op op2, NodeIsomorphismMap labelMap) { if ( ! ( op2 instanceof OpJoin) ) return false ; return super.sameArgumentsAs((Op2)op2, labelMap) ; } }
[ "akula.arjun@gmail.com" ]
akula.arjun@gmail.com
2f2e31e73716e6f88e3788cd253771b237802156
3290556334eee4578d6e40d7e20f2584c7cf6c78
/src/ofx/PinChangeTransactionResponse.java
5fa639440de8da84bc48a641f0602bd96e930a91
[]
no_license
proyleg/InvestiaGenOFX
4341c4761f08ffe2f34377266b32a58921792084
1b42fe45ad0f9e437b3fa37eec3879f174e97278
refs/heads/master
2021-01-10T04:37:43.334491
2015-12-03T15:21:13
2015-12-03T15:21:13
44,973,086
0
0
null
null
null
null
UTF-8
Java
false
false
2,092
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.12.12 at 04:58:05 PM EST // package ofx; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * * The OFX element "PINCHTRNRS" is of type "PinChangeTransactionResponse" * * * <p>Java class for PinChangeTransactionResponse complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PinChangeTransactionResponse"> * &lt;complexContent> * &lt;extension base="{http://ofx.net/types/2003/04}AbstractTransactionResponse"> * &lt;sequence> * &lt;element name="PINCHRS" type="{http://ofx.net/types/2003/04}PinChangeResponse" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PinChangeTransactionResponse", propOrder = { "pinchrs" }) public class PinChangeTransactionResponse extends AbstractTransactionResponse { @XmlElement(name = "PINCHRS") protected PinChangeResponse pinchrs; /** * Gets the value of the pinchrs property. * * @return * possible object is * {@link PinChangeResponse } * */ public PinChangeResponse getPINCHRS() { return pinchrs; } /** * Sets the value of the pinchrs property. * * @param value * allowed object is * {@link PinChangeResponse } * */ public void setPINCHRS(PinChangeResponse value) { this.pinchrs = value; } }
[ "proy_leg@hotmail.com" ]
proy_leg@hotmail.com
45d16730a7519eab517ecaffeb49b523ec164e71
c1b23a03926012ccee280b3895f100cec61d2407
/topdeep_web_common/server/common-core/src/main/java/topdeep/commonfund/entity/hundsun/S022Input.java
6675888a2996dfbaafaa12e0f4d5c5de64b88675
[]
no_license
zhuangxiaotian/project
a0e548c88f01339993097d99ac68adcba9d11171
d0c96854b3678209c9a25d07c9729c613fe66d38
refs/heads/master
2020-12-05T23:14:27.354448
2016-09-01T07:19:22
2016-09-01T07:19:22
67,108,931
0
0
null
null
null
null
UTF-8
Java
false
false
3,290
java
package topdeep.commonfund.entity.hundsun; import java.io.Serializable; import java.util.*; import common.util.param.PropertyAttribute; /** * 交易限制查询(S022) */ public class S022Input extends HundsunBaseInput implements Serializable { /** * 银行编号, */ private String bankno = ""; /** * 业务类型, */ private String businflag = ""; /** * 资金方式, */ private String capitalmode = ""; /** * 客户分类, */ private String custkind = ""; /** * 基金代码, */ private String fundcode = ""; /** * 对方基金, */ private String otherfundcode = ""; /** * 收费方式, */ private String sharetype = ""; /** * 委托方式, */ private String trust = ""; /** * 客户类型,1:个人 0:机构 */ private String custtype = ""; /** * 初始化参数 */ public S022Input() { this.setFunction("S022"); this.setChannel("1"); this.setUsertype("p"); this.setSignmode("md5"); this.setVersion("v1.0"); this.setFormat("json"); } /** * 银行编号, */ public String getBankno() { return this.bankno; } /** * 银行编号, */ public void setBankno(String value) { this.bankno = value; } /** * 业务类型, */ public String getBusinflag() { return this.businflag; } /** * 业务类型, */ public void setBusinflag(String value) { this.businflag = value; } /** * 资金方式, */ public String getCapitalmode() { return this.capitalmode; } /** * 资金方式, */ public void setCapitalmode(String value) { this.capitalmode = value; } /** * 客户分类, */ public String getCustkind() { return this.custkind; } /** * 客户分类, */ public void setCustkind(String value) { this.custkind = value; } /** * 基金代码, */ public String getFundcode() { return this.fundcode; } /** * 基金代码, */ public void setFundcode(String value) { this.fundcode = value; } /** * 对方基金, */ public String getOtherfundcode() { return this.otherfundcode; } /** * 对方基金, */ public void setOtherfundcode(String value) { this.otherfundcode = value; } /** * 收费方式, */ public String getSharetype() { return this.sharetype; } /** * 收费方式, */ public void setSharetype(String value) { this.sharetype = value; } /** * 委托方式, */ public String getTrust() { return this.trust; } /** * 委托方式, */ public void setTrust(String value) { this.trust = value; } /** * 客户类型,1:个人 0:机构 */ public String getCusttype() { return this.custtype; } /** * 客户类型,1:个人 0:机构 */ public void setCusttype(String value) { this.custtype = value; } public void serializeToMap(Map<String, String> inputMap) { super.serializeToMap(inputMap); inputMap.put("bankno", this.bankno); inputMap.put("businflag", this.businflag); inputMap.put("capitalmode", this.capitalmode); inputMap.put("custkind", this.custkind); inputMap.put("fundcode", this.fundcode); inputMap.put("otherfundcode", this.otherfundcode); inputMap.put("sharetype", this.sharetype); inputMap.put("trust", this.trust); inputMap.put("custtype", this.custtype); } }
[ "xtian.zhuang@topdeep.com" ]
xtian.zhuang@topdeep.com
3d5f305f4e0056ae10ea9364257e0566aa085b7c
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14149-21-16-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/XWikiHibernateBaseStore_ESTest.java
a70e5a2d14e9aa0cf174a120aae7a229cdcef32c
[]
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
572
java
/* * This file was automatically generated by EvoSuite * Fri Apr 03 05:40:32 UTC 2020 */ package com.xpn.xwiki.store; 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 XWikiHibernateBaseStore_ESTest extends XWikiHibernateBaseStore_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
6135572fe7d229724575d269b7fdfe21a9b4841e
8e9794e41432bedd4fe9823858d6bf0ad2c66709
/app/src/main/java/in/voiceme/app/voiceme/RecyclerViewDetails/UserListenCounterActivity.java
21fc6dd963072964fe35d698a5af80c82fde4f43
[]
no_license
sciage/workingproject
a08ab485842f19ad26a1af6045e069c9a201b5af
dd7196432534e342878dd7474c43386c8f79c438
refs/heads/master
2021-05-03T23:32:11.901533
2016-10-24T18:37:13
2016-10-24T18:37:13
71,742,581
0
0
null
null
null
null
UTF-8
Java
false
false
1,694
java
package in.voiceme.app.voiceme.RecyclerViewDetails; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import java.util.ArrayList; import java.util.List; import in.voiceme.app.voiceme.R; import in.voiceme.app.voiceme.infrastructure.BaseAuthenticatedActivity; public class UserListenCounterActivity extends BaseAuthenticatedActivity { private static final int REQUEST_VIEW_MESSAGE = 1; private List<Person> persons; private RecyclerView rv; @Override protected void onVoicemeCreate(Bundle savedState) { setContentView(R.layout.activity_user_listen_counter); getSupportActionBar().setTitle("Listen User"); toolbar.setNavigationIcon(R.mipmap.ic_ab_close); toolbar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); rv = (RecyclerView) findViewById(R.id.counter_listen_recyclerview); LinearLayoutManager llm = new LinearLayoutManager(this); rv.setLayoutManager(llm); rv.setHasFixedSize(true); initializeData(); initializeAdapter(); } private void initializeData() { persons = new ArrayList<>(); persons.add(new Person("Emma Wilson", R.mipmap.ic_launcher)); persons.add(new Person("Lavery Maiss", R.mipmap.ic_launcher)); persons.add(new Person("Lillie Watts", R.mipmap.ic_launcher)); } private void initializeAdapter() { RVAdapter adapter = new RVAdapter(persons); rv.setAdapter(adapter); } }
[ "dass.harish@gmail.com" ]
dass.harish@gmail.com
066a1f2eb906370e5ce16163bb6ea7b712e17e8a
09994d90a96d4ce75eac229790f1b7c44ae8e0a2
/common/src/main/java/weibo4j/StatusSerDer.java
e7215b7b5759e6d09b4db525549241afbaecc610
[ "Apache-2.0" ]
permissive
ecnu-bing/weibostack
42a46d55f66ce17490713448a2db61acd4179dbc
96aa00464b5936f1629f96535ba6e374e9b22341
refs/heads/master
2020-12-26T02:40:12.959736
2016-02-28T02:10:07
2016-02-28T02:10:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,476
java
package weibo4j; import java.io.StringWriter; import java.util.Date; import com.google.gson.Gson; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import net.sf.json.JsonConfig; import net.sf.json.processors.JsonValueProcessor; import net.sf.json.util.JSONUtils; import weibo4j.model.Source; import weibo4j.model.Status; import weibo4j.model.Visible; import weibo4j.model.WeiboException; import weibo4j.org.json.JSONException; public class StatusSerDer { private static Gson gson = new Gson(); public static class JsonDateValueProcessor implements JsonValueProcessor { public JsonDateValueProcessor() { super(); } @Override public Object processArrayValue(Object paramObject, JsonConfig paramJsonConfig) { return process(paramObject); } @Override public Object processObjectValue(String paramString, Object paramObject, JsonConfig paramJsonConfig) { return process(paramObject); } private Object process(Object value) { if (value instanceof Date) { return ((Date) value).getTime(); } return value == null ? "" : value.toString(); } } private final static JsonConfig jsonConfig = new JsonConfig(); static { jsonConfig.setExcludes(new String[] { "retweetedStatus" }); jsonConfig.registerJsonValueProcessor(Date.class, new JsonDateValueProcessor()); } public static String toJSON(Status status) { return serByGSON(status); } public static Status fromJSON(String str) { return derByGSON(str); } private static void setupDefault(Status status) { if (status.getCreatedAt() == null) status.setCreatedAt(new Date()); if (status.getSource() == null) status.setSource(new Source()); if (status.getVisible() == null) status.setVisible(new Visible()); if (status.getUser().getCreatedAt() == null) { status.getUser().setCreatedAt(new Date()); } } /** * json-lib经常包invocation * exception,通过使用valueprocessor可以保证它不会把json格式的String成员变量给解析成jsonobject对象, * 这是由于它fromObject这个函数职能划分不清晰导致的 */ /** * * @param status * @return */ public static String serByJSONLib(Status status) { JSONArray arr = new JSONArray(); if (status.getUser() == null) { return arr.toString(); } try { setupDefault(status); arr.add(JSONObject.fromObject(status, jsonConfig)); if (status.getRetweetedStatus() != null) { if (status.getRetweetedStatus().getUser() == null) { return arr.toString(); } setupDefault(status.getRetweetedStatus()); arr.add(JSONObject.fromObject(status.getRetweetedStatus(), jsonConfig)); } } catch (Exception ex) { ex.printStackTrace(); } return arr.toString(); } public static Status derByJSONLib(String str) { JSONArray arr = JSONArray.fromObject(str); return derByJSONLib_intern(arr); } public static Status derByJSONLib_intern(JSONArray arr) { Status ret = null; try { if (arr.size() >= 1) { ret = new Status(arr.getJSONObject(0)); if (arr.size() == 2) { Status rt = new Status(arr.getJSONObject(1)); ret.setRetweetedStatus(rt); } } } catch (JSONException | WeiboException e) { e.printStackTrace(); } catch (weibo4j.WeiboException e) { e.printStackTrace(); } return ret; } public static String serByGSON(Status status) { return gson.toJson(status); } public static Status derByGSON(String json) { return gson.fromJson(json, Status.class); } }
[ "xiafan68@gmail.com" ]
xiafan68@gmail.com
5b303e3cb28d63e8fec90f1c3d1406401906c39c
e08314b8c22df72cf3aa9e089624fc511ff0d808
/src/component/com/ces/component/trace/code/SdzyccjggysxxCode.java
55a7472a92bc6deeebcb5b72180f2ecb5ed4850a
[]
no_license
quxiongwei/qhzyc
46acd4f6ba41ab3b39968071aa114b24212cd375
4b44839639c033ea77685b98e65813bfb269b89d
refs/heads/master
2020-12-02T06:38:21.581621
2017-07-12T02:06:10
2017-07-12T02:06:10
96,864,946
0
3
null
null
null
null
UTF-8
Java
false
false
1,996
java
package com.ces.component.trace.code; import com.ces.config.application.CodeApplication; import com.ces.config.dhtmlx.entity.code.Code; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by Synge on 2015/8/28. */ public class SdzyccjggysxxCode extends CodeApplication { @Override public String getCodeValue(String name) { return null; } @Override public String getCodeName(String value) { return null; } @Override public List<Code> getCodeList(String codeTypeCode) { return null; } @Override public Object getCodeTree(String codeTypeCode) { return null; } @Override public Object getCodeGrid(String codeTypeCode) { Map<String, Object> gcfg = new HashMap<String, Object>(); gcfg.put("colNames", getColNames()); gcfg.put("colModel", getColModel()); gcfg.put("url", "sdzyccjgylgysxx!searchGridData.json"); gcfg.put("panelWidth",380); gcfg.put("valueField", "GYSMC");// 列表中PFSBM列值作为 隐藏值 gcfg.put("textField", "GYSMC");// 列表中PFSMC列值作为 显示值 /* gcfg.put("textField","WLZZL");*/ return gcfg; } protected List<String> getColNames() { List<String> list = new ArrayList<String>(); list.add("供应商编号"); list.add("供应商名称"); /* list.add("物料总重量");*/ return list; } protected List<Map<String, Object>> getColModel() { List<Map<String, Object>> colModel = new ArrayList<Map<String, Object>>(); Map<String, Object> item =null; item = new HashMap<String, Object>(); item.put("name", "GYSBH"); item.put("width", 120); colModel.add(item); item = new HashMap<String, Object>(); item.put("name", "GYSMC"); item.put("width", 120); colModel.add(item); return colModel; } }
[ "qu.xiongwei@cesgroup.com.cn" ]
qu.xiongwei@cesgroup.com.cn
029342b02f4f6562b1b6c4bbc9329233cfbe0b6d
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_1/src/f/b/e/Calc_1_1_5149.java
9c29752c948df8f898a3e17e35d93c6eebd4fb6e
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package f.b.e; public class Calc_1_1_5149 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
fbb8ad223ce28cbfe0ee95a90677a78694563cd0
30edba3cc1757d6df5b5a830e4ddb3fb7896e605
/hu.bme.mit.trainbenchmark.benchmark.emfincquery.patterns/src-gen/hu/bme/mit/trainbenchmark/benchmark/emfincquery/util/HasSensorQuerySpecification.java
a92fad869f61514519dab1f6b3bbee5cce0019f9
[]
no_license
IncQueryLabs/trainbenchmark
b21ecf17b1ed4efdc2e04031ca35599abf1f5ec7
aa610691387a04f41f5fd745b610924cae32dd48
refs/heads/master
2023-08-11T08:38:00.435601
2015-11-09T15:47:04
2015-11-09T15:47:04
45,915,684
1
0
null
2015-11-10T14:04:53
2015-11-10T14:04:53
null
UTF-8
Java
false
false
4,710
java
package hu.bme.mit.trainbenchmark.benchmark.emfincquery.util; import com.google.common.collect.Sets; import hu.bme.mit.trainbenchmark.benchmark.emfincquery.HasSensorMatch; import hu.bme.mit.trainbenchmark.benchmark.emfincquery.HasSensorMatcher; import java.util.Arrays; import java.util.List; import java.util.Set; import org.eclipse.emf.ecore.EClass; import org.eclipse.incquery.runtime.api.IncQueryEngine; import org.eclipse.incquery.runtime.api.impl.BaseGeneratedEMFPQuery; import org.eclipse.incquery.runtime.api.impl.BaseGeneratedEMFQuerySpecification; import org.eclipse.incquery.runtime.emf.types.EClassTransitiveInstancesKey; import org.eclipse.incquery.runtime.emf.types.EStructuralFeatureInstancesKey; import org.eclipse.incquery.runtime.exception.IncQueryException; import org.eclipse.incquery.runtime.matchers.psystem.PBody; import org.eclipse.incquery.runtime.matchers.psystem.PVariable; import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.Equality; import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.ExportedParameter; import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeConstraint; import org.eclipse.incquery.runtime.matchers.psystem.queries.PParameter; import org.eclipse.incquery.runtime.matchers.psystem.queries.QueryInitializationException; import org.eclipse.incquery.runtime.matchers.tuple.FlatTuple; /** * A pattern-specific query specification that can instantiate HasSensorMatcher in a type-safe way. * * @see HasSensorMatcher * @see HasSensorMatch * */ @SuppressWarnings("all") public final class HasSensorQuerySpecification extends BaseGeneratedEMFQuerySpecification<HasSensorMatcher> { private HasSensorQuerySpecification() { super(GeneratedPQuery.INSTANCE); } /** * @return the singleton instance of the query specification * @throws IncQueryException if the pattern definition could not be loaded * */ public static HasSensorQuerySpecification instance() throws IncQueryException { try{ return LazyHolder.INSTANCE; } catch (ExceptionInInitializerError err) { throw processInitializerError(err); } } @Override protected HasSensorMatcher instantiate(final IncQueryEngine engine) throws IncQueryException { return HasSensorMatcher.on(engine); } @Override public HasSensorMatch newEmptyMatch() { return HasSensorMatch.newEmptyMatch(); } @Override public HasSensorMatch newMatch(final Object... parameters) { return HasSensorMatch.newMatch((hu.bme.mit.trainbenchmark.railway.TrackElement) parameters[0]); } private static class LazyHolder { private final static HasSensorQuerySpecification INSTANCE = make(); public static HasSensorQuerySpecification make() { return new HasSensorQuerySpecification(); } } private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private final static HasSensorQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery(); @Override public String getFullyQualifiedName() { return "hu.bme.mit.trainbenchmark.benchmark.emfincquery.hasSensor"; } @Override public List<String> getParameterNames() { return Arrays.asList("sw"); } @Override public List<PParameter> getParameters() { return Arrays.asList(new PParameter("sw", "hu.bme.mit.trainbenchmark.railway.TrackElement")); } @Override public Set<PBody> doGetContainedBodies() throws QueryInitializationException { Set<PBody> bodies = Sets.newLinkedHashSet(); try { { PBody body = new PBody(this); PVariable var_sw = body.getOrCreateVariableByName("sw"); PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); body.setSymbolicParameters(Arrays.<ExportedParameter>asList( new ExportedParameter(body, var_sw, "sw") )); new TypeConstraint(body, new FlatTuple(var_sw), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.semanticweb.org/ontologies/2015/trainbenchmark", "TrackElement"))); new TypeConstraint(body, new FlatTuple(var_sw, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.semanticweb.org/ontologies/2015/trainbenchmark", "TrackElement", "sensor"))); new Equality(body, var__virtual_0_, var___0_); bodies.add(body); } // to silence compiler error if (false) throw new IncQueryException("Never", "happens"); } catch (IncQueryException ex) { throw processDependencyException(ex); } return bodies; } } }
[ "szarnyasg@gmail.com" ]
szarnyasg@gmail.com
48bf1f6de16c5d19c3f557df001e15a560e272a3
6a8ad5fcf0a3face6d2e7be0892354f4a42d095a
/src/test/java/hu/akarnokd/reactor/GroupParallel.java
acf4f1030e53e422d80788ef420eabc6cc3f5204
[ "Apache-2.0" ]
permissive
akarnokd/akarnokd-misc
3b5b80aa8f90c2607ee53413c9d49480b7d386c6
29d653f31b9383f9515366dfb336880825d42354
refs/heads/master
2023-08-25T22:23:22.636674
2023-08-24T05:05:35
2023-08-24T05:05:35
44,962,046
58
17
Apache-2.0
2023-09-04T04:31:02
2015-10-26T10:41:21
Java
UTF-8
Java
false
false
879
java
package hu.akarnokd.reactor; import java.util.concurrent.atomic.AtomicInteger; import org.junit.Test; import reactor.core.publisher.Flux; import reactor.core.scheduler.Schedulers; public class GroupParallel { @Test public void parallelGroupComputation() throws Exception { AtomicInteger wip = new AtomicInteger(); Flux.range(1, 1000_000) .groupBy(i -> i % 8) .flatMap(g -> g) .parallel() .runOn(Schedulers.parallel()) .sequential() .subscribe(c -> { if (wip.getAndIncrement() != 0) { System.err.println("Concurrent invocation!"); } try { Thread.sleep(1); } catch (Throwable ex) { ex.printStackTrace(); } wip.decrementAndGet(); }); Thread.sleep(100000); } }
[ "akarnokd@gmail.com" ]
akarnokd@gmail.com
0c813874eab9663b2310631a8dceef3345197a07
15448fc168098b8adc44c5905bd861adfd1832b7
/ejbca/modules/ejbca-ws/src/org/ejbca/core/protocol/ws/objects/TokenCertificateResponseWS.java
77149ed2e4733bd54eff94470298d2b3292c971f
[]
no_license
gangware72/Ejbca-Sample
d9ff359d0c3a675ca7e487bb181f4cdb101c123b
821d126072f38225ae321ec45011a5d72750e97a
refs/heads/main
2023-07-19T22:35:36.414622
2021-08-19T23:17:28
2021-08-19T23:17:28
398,092,842
1
0
null
null
null
null
UTF-8
Java
false
false
2,061
java
/************************************************************************* * * * EJBCA Community: The OpenSource Certificate Authority * * * * This software is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package org.ejbca.core.protocol.ws.objects; import org.ejbca.core.model.token.TokenConstants; /** * base class that this is a certificate response * of either a Certificate or KeyStore * * @version $Id$ */ public class TokenCertificateResponseWS { private int type = 0; private Certificate certificate; private KeyStore keyStore; public TokenCertificateResponseWS(Certificate certificate) { super(); this.type = TokenConstants.RESPONSETYPE_CERTIFICATE_RESPONSE; this.certificate = certificate; } public TokenCertificateResponseWS(KeyStore keyStore) { super(); this.type = TokenConstants.RESPONSETYPE_KEYSTORE_RESPONSE; this.keyStore = keyStore; } /** * WS Constructor */ public TokenCertificateResponseWS() { super(); } public Certificate getCertificate() { return certificate; } public void setCertificate(Certificate certificate) { this.certificate = certificate; } public KeyStore getKeyStore() { return keyStore; } public void setKeyStore(KeyStore keyStore) { this.keyStore = keyStore; } public int getType() { return type; } public void setType(int type) { this.type = type; } }
[ "edgar.gangware@cradlepoint.com" ]
edgar.gangware@cradlepoint.com
c6ca8c6b50f756b9f2ccb98c6707f5c0d0de3b24
c577f5380b4799b4db54722749cc33f9346eacc1
/BugSwarm/SonarSource-sonar-php-80796552/buggy_files/php-frontend/src/main/java/org/sonar/php/parser/TreeFactory.java
b15fa0472314c4f671f1910df1ff2f6f8e4e3f43
[]
no_license
tdurieux/BugSwarm-dissection
55db683fd95f071ff818f9ca5c7e79013744b27b
ee6b57cfef2119523a083e82d902a6024e0d995a
refs/heads/master
2020-04-30T17:11:52.050337
2019-05-09T13:42:03
2019-05-09T13:42:03
176,972,414
1
0
null
null
null
null
UTF-8
Java
false
false
4,229
java
/* * SonarQube PHP Plugin * Copyright (C) 2010 SonarSource and Akram Ben Aissi * sonarqube@googlegroups.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ package org.sonar.php.parser; import com.sonar.sslr.api.typed.Optional; import org.sonar.php.tree.impl.VariableIdentifierTreeImpl; import org.sonar.php.tree.impl.expression.IdentifierTreeImpl; import org.sonar.php.tree.impl.lexical.InternalSyntaxToken; import org.sonar.php.tree.impl.statement.BlockTreeImpl; import org.sonar.php.tree.impl.statement.ExpressionStatementTreeImpl; import org.sonar.php.tree.impl.statement.GotoStatementTreeImpl; import org.sonar.php.tree.impl.statement.LabelTreeImpl; import org.sonar.plugins.php.api.tree.Tree; import org.sonar.plugins.php.api.tree.expression.ExpressionTree; import org.sonar.plugins.php.api.tree.statement.BlockTree; import org.sonar.plugins.php.api.tree.statement.ExpressionStatementTree; import org.sonar.plugins.php.api.tree.statement.GotoStatementTree; import org.sonar.plugins.php.api.tree.statement.LabelTree; import org.sonar.plugins.php.api.tree.statement.StatementTree; import java.util.Collections; import java.util.List; public class TreeFactory { private <T extends Treeg> List<T> optionalList(Optional<List<T>> list) { if (list.isPresent()) { return list.get(); } else { return Collections.emptyList(); } } /** * [ START ] Statement */ public BlockTree block(InternalSyntaxToken lbrace, Optional<List<StatementTree>> statements, InternalSyntaxToken rbrace) { return new BlockTreeImpl(lbrace, optionalList(statements), rbrace); } public GotoStatementTree gotoStatement(InternalSyntaxToken gotoToken, InternalSyntaxToken identifier, InternalSyntaxToken eos) { return new GotoStatementTreeImpl(gotoToken, new IdentifierTreeImpl(identifier), eos); } public ExpressionStatementTree expressionStatement(ExpressionTree expression, InternalSyntaxToken eos) { return new ExpressionStatementTreeImpl(expression, eos); } public LabelTree label(InternalSyntaxToken identifier, InternalSyntaxToken colon) { return new LabelTreeImpl(new IdentifierTreeImpl(identifier), colon); } /** * [ END ] Statement */ public ExpressionTree expression(InternalSyntaxToken token) { return new VariableIdentifierTreeImpl(new IdentifierTreeImpl(token)); } /** * [ START ] Expression */ /** * [ END ] Expression */ public static class Tuple<T, U> { private final T first; private final U second; public Tuple(T first, U second) { super(); this.first = first; this.second = second; } public T first() { return first; } public U second() { return second; } } private <T, U> Tuple<T, U> newTuple(T first, U second) { return new Tuple<T, U>(first, second); } public <T, U> Tuple<T, U> newTuple1(T first, U second) { return newTuple(first, second); } public <T, U> Tuple<T, U> newTuple2(T first, U second) { return newTuple(first, second); } public <T, U> Tuple<T, U> newTuple3(T first, U second) { return newTuple(first, second); } public <T, U> Tuple<T, U> newTuple4(T first, U second) { return newTuple(first, second); } public <T, U> Tuple<T, U> newTuple5(T first, U second) { return newTuple(first, second); } public <T, U> Tuple<T, U> newTuple6(T first, U second) { return newTuple(first, second); } public <T, U> Tuple<T, U> newTuple7(T first, U second) { return newTuple(first, second); } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
966352e94b7b2b117c6e8b4f1769b67aa331cb8b
09b7f281818832efb89617d6f6cab89478d49930
/root/projects/remote-api/source/generated/org/alfresco/repo/cmis/ws/CmisTypePolicyDefinitionType.java
fa4003450974926292943d6b1b191777baa31d9b
[]
no_license
verve111/alfresco3.4.d
54611ab8371a6e644fcafc72dc37cdc3d5d8eeea
20d581984c2d22d5fae92e1c1674552c1427119b
refs/heads/master
2023-02-07T14:00:19.637248
2020-12-25T10:19:17
2020-12-25T10:19:17
323,932,520
1
1
null
null
null
null
UTF-8
Java
false
false
913
java
package org.alfresco.repo.cmis.ws; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for cmisTypePolicyDefinitionType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="cmisTypePolicyDefinitionType"> * &lt;complexContent> * &lt;extension base="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisTypeDefinitionType"> * &lt;sequence> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "cmisTypePolicyDefinitionType", namespace = "http://docs.oasis-open.org/ns/cmis/core/200908/") public class CmisTypePolicyDefinitionType extends CmisTypeDefinitionType { }
[ "verve111@mail.ru" ]
verve111@mail.ru
3849ebbdc37a09bbba4f3140d7cc3989ef794cf5
176094e484a99795384cfd02b41f9d22dec32216
/src/main/java/com/chrisnewland/demofx/effect/spectral/VUMeter.java
25d7cdba24c428f10ed3335132805ea78ecf187d
[ "BSD-2-Clause-Views" ]
permissive
chriswhocodes/DemoFX
e70141f67ecc79a1d157f09c79977418c141d743
4bb476d25a8474b33441116b8d2fbe9ca882d965
refs/heads/master
2021-06-26T07:34:43.033469
2020-12-09T23:11:26
2020-12-09T23:11:26
31,340,538
82
12
NOASSERTION
2020-12-08T21:50:55
2015-02-25T23:04:56
Java
UTF-8
Java
false
false
3,206
java
/* * Copyright (c) 2015-2016 Chris Newland. * Licensed under https://github.com/chriswhocodes/demofx/blob/master/LICENSE-BSD */ package com.chrisnewland.demofx.effect.spectral; import com.chrisnewland.demofx.DemoConfig; import javafx.scene.paint.Color; public class VUMeter extends AbstractSpectralEffect { private static final int SEGMENTS = 10; private static final double DIAMETER = 200; private static final double GAP = DIAMETER / 6; private int meters; private float[] meterValue; private float[] lastValue; private double offsetX; private static final double angleSpread = 90 + 45; private static final double angleStart = 180 + angleSpread / 2; private static final double angleEnd = 180 - angleSpread / 2; private static final double angleDelta = angleSpread / SEGMENTS; public VUMeter(DemoConfig config) { super(config); init(5); } public VUMeter(DemoConfig config, int meters) { super(config); init(meters); } private void init(int meters) { this.meters = meters; meterValue = new float[meters]; lastValue = new float[meters]; double totalMeterWidth = meters * DIAMETER; if (meters > 1) { totalMeterWidth += (meters - 1) * GAP; } offsetX = (width - totalMeterWidth) / 2; } @Override public void renderForeground() { if (spectrumProvider != null) { float[] data = spectrumProvider.getData(); quantise(data); } render(); } private void quantise(float[] data) { usableBandCount = Math.min(meters * 4, data.length); final int readingsPerMeter = usableBandCount / meters; int pos = 0; int meter = 0; float meterSum = 0; for (int i = 0; i < usableBandCount && meter < meters; i++) { meterSum += DECIBEL_RANGE + data[i]; if (pos == readingsPerMeter || i == usableBandCount - 1) { float nextValue = meterSum / (pos + 1); float previous = lastValue[meter]; if (nextValue < previous) { nextValue = previous - DECAY; } meterValue[meter] = nextValue; lastValue[meter] = nextValue; meter++; pos = 0; meterSum = 0; } pos++; } } private void render() { double meterX = offsetX + DIAMETER / 2; for (int i = 0; i < meters; i++) { drawMeter(i, meterX, height - GAP, DIAMETER / 2); meterX += DIAMETER + GAP; } } private void drawMeter(int meterIndex, double x, double y, double radius) { float value = meterValue[meterIndex]; double markStart = radius; double markEnd = radius * 0.8; gc.setStroke(Color.WHITE); gc.setLineWidth(4.0); for (double a = angleStart; a >= angleEnd; a -= angleDelta) { double x1 = x + markStart * precalc.sin(a); double y1 = y + markStart * precalc.cos(a); double x2 = x + markEnd * precalc.sin(a); double y2 = y + markEnd * precalc.cos(a); gc.strokeLine(x1, y1, x2, y2); } double valueAngle = angleStart - (value / DECIBEL_RANGE) * angleSpread; double vX = x + markEnd * precalc.sin(valueAngle); double vY = y + markEnd * precalc.cos(valueAngle); gc.setLineWidth(4.0); gc.setStroke(Color.RED); gc.strokeLine(x, y, vX, vY); gc.setLineWidth(1.0); gc.strokeText("VU " + (meterIndex + 1), x - 16, y - radius / 4); } }
[ "chris@chrisnewland.com" ]
chris@chrisnewland.com
82b4935a783607234fa30ac5ca093f60ef9935a0
1ed66a22cd91b15e03422ed30d25159feef8bee0
/src/main/java/org/voovan/docker/message/service/atom/mode/Mode.java
02e9ea6eccda0c96e15a08ef96fd65b1157fa937
[ "Apache-2.0" ]
permissive
blacktree/JDocker
d88a981c7cdb49b5234e013e346a32d690e76e72
244ad27c41ef0dcc2520b313bfbc0ccec6d34c04
refs/heads/master
2020-05-18T11:13:07.416415
2017-06-22T17:20:18
2017-06-22T17:20:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,318
java
package org.voovan.docker.message.service.atom.mode; import org.voovan.tools.json.annotation.NotJSON; /** * * @author helyho * <p> * DockerFly Framework. * WebSite: https://git.oschina.net/helyho/JDocker * Licence: Apache v2 License */ public class Mode { @NotJSON private String type; private Replicated replicated; private Global global; public Mode() { replicated = new Replicated(); global = null; type = "replicated"; } public Replicated getReplicated() { return replicated; } public void setReplicated(Replicated replicated) { this.replicated = replicated; } public void setType(String type){ this.type = type; if("replicated".equals(type)){ replicated = new Replicated(); global = null; }else if("global".equals(type)){ replicated = null; global = new Global(); } } public String getType(){ return type; } public boolean isGlobal(){ if("Global".equals(type)){ return true; }else{ return false; } } public boolean isReplicated(){ if("replicated".equals(type)){ return true; }else{ return false; } } }
[ "helyho@gmail.com" ]
helyho@gmail.com
cfc84e3dcd93420756254992971567bc0933d52b
2b40d55e06270926fcae044043ae5beb95d74f3c
/actividades/prog/files/java/mil-ejemplos/darwin/strings/StringEscapes.java
2380b41f60bc5102dddfdaebc29bcc82626d6fa6
[ "CC0-1.0", "CC-BY-SA-3.0", "BSD-2-Clause" ]
permissive
jsuabur/libro-de-actividades
15af2318407420b5cd81f4c4bc8a8371ee0c1eee
2941e34a5112962403d965e53435951981652503
refs/heads/master
2020-04-07T16:40:10.388462
2018-11-21T11:25:44
2018-11-21T11:25:44
158,537,991
0
0
CC0-1.0
2018-11-21T11:30:22
2018-11-21T11:30:22
null
UTF-8
Java
false
false
598
java
package strings; /** * StringEscapes.java - show string escapes. * Note that they may not print correctly on all platforms. */ public class StringEscapes { public static void main(String[] argv) { System.out.println("Java Strings in action:"); // System.out.println("An alarm or alert: \a"); // not supported System.out.println("An alarm entered in Octal: \007"); System.out.println("A tab key: \t(what comes after)"); System.out.println("A newline: \n(what comes after)"); System.out.println("A UniCode character: \u0207"); System.out.println("A backslash character: \\"); } }
[ "dvarrui@gmail.com" ]
dvarrui@gmail.com
4d284ac94f446764179290779b355393cd74cc5e
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
/aliyun-java-sdk-ecsops/src/main/java/com/aliyuncs/ecsops/model/v20160401/OpsWorkflowTaskConfigRequest.java
611a8d814ac039f3c665c6ec445d10ffce3e6964
[ "Apache-2.0" ]
permissive
caojiele/aliyun-openapi-java-sdk
b6367cc95469ac32249c3d9c119474bf76fe6db2
ecc1c949681276b3eed2500ec230637b039771b8
refs/heads/master
2023-06-02T02:30:02.232397
2021-06-18T04:08:36
2021-06-18T04:08:36
172,076,930
0
0
NOASSERTION
2019-02-22T14:08:29
2019-02-22T14:08:29
null
UTF-8
Java
false
false
3,911
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.ecsops.model.v20160401; import com.aliyuncs.RpcAcsRequest; import java.util.List; import com.aliyuncs.http.MethodType; import com.aliyuncs.ecsops.Endpoint; /** * @author auto create * @version */ public class OpsWorkflowTaskConfigRequest extends RpcAcsRequest<OpsWorkflowTaskConfigResponse> { private List<ScheduleConfig> scheduleConfigs; private String taskName; private Long concurrentSize; private Long maxSize; private String auditParamStr; public OpsWorkflowTaskConfigRequest() { super("Ecsops", "2016-04-01", "OpsWorkflowTaskConfig", "ecs"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public List<ScheduleConfig> getScheduleConfigs() { return this.scheduleConfigs; } public void setScheduleConfigs(List<ScheduleConfig> scheduleConfigs) { this.scheduleConfigs = scheduleConfigs; if (scheduleConfigs != null) { for (int depth1 = 0; depth1 < scheduleConfigs.size(); depth1++) { putQueryParameter("ScheduleConfig." + (depth1 + 1) + ".ConcurrentSize" , scheduleConfigs.get(depth1).getConcurrentSize()); putQueryParameter("ScheduleConfig." + (depth1 + 1) + ".ScheduleFactor" , scheduleConfigs.get(depth1).getScheduleFactor()); putQueryParameter("ScheduleConfig." + (depth1 + 1) + ".MaxSize" , scheduleConfigs.get(depth1).getMaxSize()); } } } public String getTaskName() { return this.taskName; } public void setTaskName(String taskName) { this.taskName = taskName; if(taskName != null){ putQueryParameter("TaskName", taskName); } } public Long getConcurrentSize() { return this.concurrentSize; } public void setConcurrentSize(Long concurrentSize) { this.concurrentSize = concurrentSize; if(concurrentSize != null){ putQueryParameter("ConcurrentSize", concurrentSize.toString()); } } public Long getMaxSize() { return this.maxSize; } public void setMaxSize(Long maxSize) { this.maxSize = maxSize; if(maxSize != null){ putQueryParameter("MaxSize", maxSize.toString()); } } public String getAuditParamStr() { return this.auditParamStr; } public void setAuditParamStr(String auditParamStr) { this.auditParamStr = auditParamStr; if(auditParamStr != null){ putQueryParameter("AuditParamStr", auditParamStr); } } public static class ScheduleConfig { private Integer concurrentSize; private String scheduleFactor; private Long maxSize; public Integer getConcurrentSize() { return this.concurrentSize; } public void setConcurrentSize(Integer concurrentSize) { this.concurrentSize = concurrentSize; } public String getScheduleFactor() { return this.scheduleFactor; } public void setScheduleFactor(String scheduleFactor) { this.scheduleFactor = scheduleFactor; } public Long getMaxSize() { return this.maxSize; } public void setMaxSize(Long maxSize) { this.maxSize = maxSize; } } @Override public Class<OpsWorkflowTaskConfigResponse> getResponseClass() { return OpsWorkflowTaskConfigResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
cba4c2cffa1d7534ca0940e69fe30bf06cfe256c
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/tenancy/app/NatureEnterpriseControllerBean.java
d858f4e3719eb1b51ad83d70dbbb8348b0e01bb0
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
GB18030
Java
false
false
5,217
java
package com.kingdee.eas.fdc.tenancy.app; import org.apache.log4j.Logger; import javax.ejb.*; import java.rmi.RemoteException; import com.kingdee.bos.*; import com.kingdee.bos.util.BOSObjectType; import com.kingdee.bos.metadata.IMetaDataPK; import com.kingdee.bos.metadata.query.util.CompareType; import com.kingdee.bos.metadata.rule.RuleExecutor; import com.kingdee.bos.metadata.MetaDataPK; //import com.kingdee.bos.metadata.entity.EntityViewInfo; import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean; import com.kingdee.bos.framework.ejb.AbstractBizControllerBean; //import com.kingdee.bos.dao.IObjectPK; import com.kingdee.bos.dao.IObjectValue; import com.kingdee.bos.dao.IObjectCollection; import com.kingdee.bos.service.ServiceContext; import com.kingdee.bos.service.IServiceContext; import java.lang.String; import com.kingdee.eas.framework.app.TreeBaseControllerBean; import com.kingdee.eas.framework.util.FilterUtility; import com.kingdee.bos.metadata.entity.EntityViewInfo; import com.kingdee.bos.metadata.entity.FilterInfo; import com.kingdee.bos.metadata.entity.FilterItemInfo; import com.kingdee.eas.common.EASBizException; import com.kingdee.bos.dao.IObjectPK; import com.kingdee.bos.metadata.entity.SelectorItemCollection; import com.kingdee.eas.fdc.tenancy.NatureEnterpriseInfo; import com.kingdee.eas.framework.CoreBaseCollection; import com.kingdee.eas.framework.DataBaseInfo; import com.kingdee.eas.framework.IFWEntityStruct; import com.kingdee.eas.framework.TreeBaseCollection; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.eas.framework.ObjectBaseCollection; import com.kingdee.eas.framework.TreeBaseException; import com.kingdee.eas.framework.TreeBaseInfo; import com.kingdee.eas.fdc.tenancy.NatureEnterpriseCollection; import com.kingdee.eas.framework.DataBaseCollection; public class NatureEnterpriseControllerBean extends AbstractNatureEnterpriseControllerBean { private static Logger logger = Logger .getLogger("com.kingdee.eas.fdc.tenancy.app.NatureEnterpriseControllerBean"); protected void _delete(Context ctx, IObjectPK pk) throws BOSException, EASBizException { // 引用检查 this.isReferenced(ctx, pk); super._delete(ctx, pk); } protected IObjectPK _submit(Context ctx, IObjectValue model) throws BOSException, EASBizException { IObjectPK pk = super._submit(ctx, model); checkname(ctx, model); return pk; } protected void checkname(Context ctx, IObjectValue model) throws BOSException, EASBizException { TreeBaseInfo treeModel = (TreeBaseInfo) model; // if no parent,no need to check FilterInfo filter = new FilterInfo(); FilterItemInfo filterItem = null; // 父节点为空时检查根对象名称是否重复。 if (treeModel.innerGetParent() == null) { filterItem = new FilterItemInfo(IFWEntityStruct.dataBase_Name, treeModel.getName(), CompareType.EQUALS); filter.getFilterItems().add(filterItem); filter.getFilterItems().add( new FilterItemInfo(IFWEntityStruct.tree_Parent, null, CompareType.EQUALS)); filter.setMaskString("#0 and #1"); if (treeModel.getId() != null) { filterItem = new FilterItemInfo(IFWEntityStruct.coreBase_ID, treeModel.getId().toString(), CompareType.NOTEQUALS); filter.getFilterItems().add(filterItem); // filter.getFilterItems().add(new FilterItemInfo("level",new // Integer(treeModel.getLevel()),CompareType.EQUALS)); // 修改,应当使用parentID,因为levle是计算生成的,不应由客户端传递。 Jacky at 2004-11-4 filter.setMaskString("#0 and #1 and #2"); } } else { filterItem = new FilterItemInfo(IFWEntityStruct.dataBase_Name, treeModel.getName(), CompareType.EQUALS); filter.getFilterItems().add(filterItem); if (treeModel.innerGetParent().getId() != null) { filterItem = new FilterItemInfo(IFWEntityStruct.tree_Parent, treeModel.innerGetParent().getId().toString(), CompareType.EQUALS); filter.getFilterItems().add(filterItem); filter.setMaskString("#0 and #1"); } if (treeModel.getId() != null) { filterItem = new FilterItemInfo(IFWEntityStruct.coreBase_ID, treeModel.getId().toString(), CompareType.NOTEQUALS); filter.getFilterItems().add(filterItem); if (treeModel.innerGetParent().getId() != null) { filter.setMaskString("#0 and #1 and #2"); } else { filter.setMaskString("#0 and #1"); } } } EntityViewInfo view = new EntityViewInfo(); // CU隔离 FilterInfo filterCU = getFilterForDefaultCU(ctx, treeModel); if (FilterUtility.hasFilterItem(filterCU)) { if (FilterUtility.hasFilterItem(filter)) { filter.mergeFilter(filterCU, "AND"); } else { filter = filterCU; } } view.setFilter(filter); TreeBaseCollection results = this.getTreeBaseCollection(ctx, view); // DataBaseCollection results = this.getDataBaseCollection(ctx,view); if (results != null && results.size() > 0) { DataBaseInfo dataBaseInfo = (DataBaseInfo) model; String name = this._getPropertyAlias(ctx, dataBaseInfo, IFWEntityStruct.dataBase_Name) + dataBaseInfo.getName(); throw new EASBizException(EASBizException.CHECKDUPLICATED, new Object[] { name }); } } }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
5092859e3b507f5fa81d450439e3c87bc41484b3
1aef4669e891333de303db570c7a690c122eb7dd
/src/main/java/com/alipay/api/response/KoubeiMarketingCampaignItemMerchantactivityQueryResponse.java
9786c3d4ae59d8a56f1e2e01db5f1e910d5c0066
[ "Apache-2.0" ]
permissive
fossabot/alipay-sdk-java-all
b5d9698b846fa23665929d23a8c98baf9eb3a3c2
3972bc64e041eeef98e95d6fcd62cd7e6bf56964
refs/heads/master
2020-09-20T22:08:01.292795
2019-11-28T08:12:26
2019-11-28T08:12:26
224,602,331
0
0
Apache-2.0
2019-11-28T08:12:26
2019-11-28T08:12:25
null
UTF-8
Java
false
false
4,966
java
package com.alipay.api.response; import java.util.Date; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.MerchantActivityVoucherInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.marketing.campaign.item.merchantactivity.query response. * * @author auto create * @since 1.0, 2019-05-07 10:06:31 */ public class KoubeiMarketingCampaignItemMerchantactivityQueryResponse extends AlipayResponse { private static final long serialVersionUID = 8215647773276865537L; /** * 活动Id */ @ApiField("activity_id") private String activityId; /** * 营销活动id */ @ApiField("camp_id") private String campId; /** * 活动优惠次数限制 */ @ApiField("count_limit") private Long countLimit; /** * 活动优惠单日次数限制 */ @ApiField("count_limit_per_day") private Long countLimitPerDay; /** * 活动单用户限次 */ @ApiField("count_limit_per_user") private Long countLimitPerUser; /** * 活动单用户单日限次 */ @ApiField("count_limit_per_user_per_day") private Long countLimitPerUserPerDay; /** * 人群规则 DEFAULT:全部用户 ONLINE_NEWCOMER:在线购买新人 MEMBER:会员 */ @ApiField("crowd") private String crowd; /** * 代金券面额 */ @ApiField("deduct_amount") private String deductAmount; /** * 外部Id */ @ApiField("external_unique_id") private String externalUniqueId; /** * 活动结束时间 格式为:yyyy-MM-dd HH:mm:ss */ @ApiField("gmt_end") private Date gmtEnd; /** * 活动开始时间,格式为:yyyy-MM-dd HH:mm:ss */ @ApiField("gmt_start") private String gmtStart; /** * 商品列表 */ @ApiListField("item_ids") @ApiField("string") private List<String> itemIds; /** * 备注 */ @ApiField("memo") private String memo; /** * 使用门槛,满X元可用,使用门槛必须大于券面额 */ @ApiField("min_cost") private String minCost; /** * 是否手动领取,本期只支持true */ @ApiField("obtain_manually") private Boolean obtainManually; /** * 券信息 */ @ApiField("voucher_info") private MerchantActivityVoucherInfo voucherInfo; public void setActivityId(String activityId) { this.activityId = activityId; } public String getActivityId( ) { return this.activityId; } public void setCampId(String campId) { this.campId = campId; } public String getCampId( ) { return this.campId; } public void setCountLimit(Long countLimit) { this.countLimit = countLimit; } public Long getCountLimit( ) { return this.countLimit; } public void setCountLimitPerDay(Long countLimitPerDay) { this.countLimitPerDay = countLimitPerDay; } public Long getCountLimitPerDay( ) { return this.countLimitPerDay; } public void setCountLimitPerUser(Long countLimitPerUser) { this.countLimitPerUser = countLimitPerUser; } public Long getCountLimitPerUser( ) { return this.countLimitPerUser; } public void setCountLimitPerUserPerDay(Long countLimitPerUserPerDay) { this.countLimitPerUserPerDay = countLimitPerUserPerDay; } public Long getCountLimitPerUserPerDay( ) { return this.countLimitPerUserPerDay; } public void setCrowd(String crowd) { this.crowd = crowd; } public String getCrowd( ) { return this.crowd; } public void setDeductAmount(String deductAmount) { this.deductAmount = deductAmount; } public String getDeductAmount( ) { return this.deductAmount; } public void setExternalUniqueId(String externalUniqueId) { this.externalUniqueId = externalUniqueId; } public String getExternalUniqueId( ) { return this.externalUniqueId; } public void setGmtEnd(Date gmtEnd) { this.gmtEnd = gmtEnd; } public Date getGmtEnd( ) { return this.gmtEnd; } public void setGmtStart(String gmtStart) { this.gmtStart = gmtStart; } public String getGmtStart( ) { return this.gmtStart; } public void setItemIds(List<String> itemIds) { this.itemIds = itemIds; } public List<String> getItemIds( ) { return this.itemIds; } public void setMemo(String memo) { this.memo = memo; } public String getMemo( ) { return this.memo; } public void setMinCost(String minCost) { this.minCost = minCost; } public String getMinCost( ) { return this.minCost; } public void setObtainManually(Boolean obtainManually) { this.obtainManually = obtainManually; } public Boolean getObtainManually( ) { return this.obtainManually; } public void setVoucherInfo(MerchantActivityVoucherInfo voucherInfo) { this.voucherInfo = voucherInfo; } public MerchantActivityVoucherInfo getVoucherInfo( ) { return this.voucherInfo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
1cda053a2e6a74280c1f5eff6b75beb8e1cac314
c4352bde96e74d997be29e31517aa5f1f54e9795
/JavaFundamentals_2019/ExamlPrep_StacksAndQueues_Exam_Prep/src/BasicQueueOperations.java
c7896e3b81de63bf326a4b3ba1bfe3b6465abb66
[]
no_license
chmitkov/SoftUni
b0f4ec10bb89a7dc350c063a02a3535ef9e901b4
52fd6f85718e07ff492c67d8166ed5cfaf5a58ff
refs/heads/master
2022-11-29T01:06:51.947775
2019-10-12T12:29:03
2019-10-12T12:29:03
138,323,012
1
0
null
2022-11-24T09:42:25
2018-06-22T16:09:50
Java
UTF-8
Java
false
false
1,446
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Arrays; public class BasicQueueOperations { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); ArrayDeque<Integer> queue = new ArrayDeque<>(); int[] commands = Arrays.stream(br.readLine().split("\\s+")) .mapToInt(Integer::parseInt) .toArray(); int numberToAddInQueue = commands[0]; int numberToPollFromQueue = commands[1]; int numberToCheckIsExist = commands[2]; int[] numbers = Arrays.stream(br.readLine().split("\\s+")) .mapToInt(Integer::parseInt) .toArray(); for (int i = 0; i < numberToAddInQueue; i++) { queue.add(numbers[i]); } while (numberToPollFromQueue-- > 0) { queue.poll(); } System.out.println(queue.contains(numberToCheckIsExist) ? "true" : smallNumberInQueue(queue) ); } private static String smallNumberInQueue(ArrayDeque<Integer> queue) { return queue.isEmpty() ? String.valueOf(0) : String.valueOf(queue.stream() .min(Integer::compareTo) .get()) ; } }
[ "ch.mitkov@gmail.com" ]
ch.mitkov@gmail.com
3d778afe8b019f0e22f84fcda29e9be5c8ddfbce
c662a1f1f4660cc644b63f417f0911cee5e8fbfb
/components/netty-demo/docs/nettyrest/ApiRoute.java
5927eb40152a0efbfc95d4a024cb35c827edd9f3
[]
no_license
qdriven/walkthough-backend
c10308b4fb1a3524d9c11f313f5c22620e554432
df9cb95e814e66eb582c319c983154f36f1acf23
refs/heads/master
2022-07-08T11:34:39.424832
2021-12-11T03:47:08
2021-12-11T03:47:08
200,501,198
0
0
null
2022-06-21T04:16:24
2019-08-04T14:14:29
Java
UTF-8
Java
false
false
2,915
java
package io.hedwig.modules.netty.nettyrest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import java.util.HashMap; import java.util.Map; /** * api route map, read from routeMap.xml */ public class ApiRoute { private static final Logger logger = LoggerFactory.getLogger(ApiRoute.class); private static final String routeName = "/routeMap.xml"; private static final String apiNode = "api"; private static final String apiName = "name"; private static final String apiHttpMethod = "method"; private static final String apiResource = "resource"; private static final String apiBuild = "build"; public static final Map<String, Api> apiMap = new HashMap<String, Api>(); static { init(); } public static void init() { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); try { DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(ApiRoute.class.getResourceAsStream(routeName)); NodeList apiList = doc.getElementsByTagName(apiNode); for (int i = 0, apiLength = apiList.getLength(); i < apiLength; i++) { Element element = (Element) apiList.item(i); Api api = new Api(); for (Node node = element.getFirstChild(); node != null; node = node.getNextSibling()) { if (node.getNodeType() == Node.ELEMENT_NODE) { String name = node.getNodeName(); String value = node.getFirstChild().getNodeValue(); switch (name) { case apiName: api.setName(value); break; case apiHttpMethod: api.addHttpMethod(value); break; case apiResource: api.setResource(value); break; case apiBuild: try { api.setBuild(Integer.parseInt(value)); } catch (NumberFormatException e) { logger.error(e.getMessage()); } break; default: break; } } } apiMap.put(api.getName(), api); } } catch (Exception e) { logger.error(e.getMessage()); } } }
[ "patrickwuke@163.com" ]
patrickwuke@163.com
9a02cdfc992c85dfc9a9557f8b65aff0fbb35301
e53daa94a988135b8b1379c2a1e19e25bb045091
/cp_movie/app/src/main/java/com/uyt/ying/yuan/uuuu/iuymn/mkjnb/model/ChildManageModel.java
bf6e82374893f451ca22e64d45df544c747d4ae6
[]
no_license
2020xiaotu/trunk
f90c9bf15c9000a1bb18c7c0a3c0a96d4daf8e68
ba19836c64828c2994e1f0db22fb5d26b4a014f5
refs/heads/master
2023-08-27T08:10:41.709940
2021-10-05T06:27:12
2021-10-05T06:27:12
413,684,673
0
0
null
null
null
null
UTF-8
Java
false
false
4,817
java
package com.uyt.ying.yuan.uuuu.iuymn.mkjnb.model; import java.io.Serializable; import java.math.BigDecimal; public class ChildManageModel implements Serializable { String name; String level; String childNUm; String loginDate; String registerDate; String agentLevel; String user_id; BigDecimal k3Rate; BigDecimal sscaiRate; BigDecimal happytenRate; BigDecimal happy8Rate; BigDecimal xuanwuRate; BigDecimal farmRate; BigDecimal raceRate; BigDecimal sixRate; BigDecimal danRate; BigDecimal commission; BigDecimal amount; String orderBy; public ChildManageModel(String name, String level, String childNUm, String loginDate, String registerDate, String agentLevel, String user_id, BigDecimal k3Rate, BigDecimal sscaiRate, BigDecimal happytenRate, BigDecimal happy8Rate, BigDecimal xuanwuRate, BigDecimal farmRate, BigDecimal raceRate, BigDecimal sixRate, BigDecimal danRate, BigDecimal commission, BigDecimal amount,String orderBy) { this.name = name; this.level = level; this.childNUm = childNUm; this.loginDate = loginDate; this.registerDate = registerDate; this.agentLevel = agentLevel; this.user_id = user_id; this.k3Rate = k3Rate; this.sscaiRate = sscaiRate; this.happytenRate = happytenRate; this.happy8Rate = happy8Rate; this.xuanwuRate = xuanwuRate; this.farmRate = farmRate; this.raceRate = raceRate; this.sixRate = sixRate; this.danRate = danRate; this.commission = commission; this.amount = amount; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } public String getChildNUm() { return childNUm; } public void setChildNUm(String childNUm) { this.childNUm = childNUm; } public String getLoginDate() { return loginDate; } public void setLoginDate(String loginDate) { this.loginDate = loginDate; } public String getRegisterDate() { return registerDate; } public String getOrderBy() { return orderBy; } public void setOrderBy(String orderBy) { this.orderBy = orderBy; } public void setRegisterDate(String registerDate) { this.registerDate = registerDate; } public String getAgentLevel() { return agentLevel; } public void setAgentLevel(String agentLevel) { this.agentLevel = agentLevel; } public String getUser_id() { return user_id; } public void setUser_id(String user_id) { this.user_id = user_id; } public BigDecimal getK3Rate() { return k3Rate; } public void setK3Rate(BigDecimal k3Rate) { this.k3Rate = k3Rate; } public BigDecimal getSscaiRate() { return sscaiRate; } public void setSscaiRate(BigDecimal sscaiRate) { this.sscaiRate = sscaiRate; } public BigDecimal getHappytenRate() { return happytenRate; } public void setHappytenRate(BigDecimal happytenRate) { this.happytenRate = happytenRate; } public BigDecimal getHappy8Rate() { return happy8Rate; } public void setHappy8Rate(BigDecimal happy8Rate) { this.happy8Rate = happy8Rate; } public BigDecimal getXuanwuRate() { return xuanwuRate; } public void setXuanwuRate(BigDecimal xuanwuRate) { this.xuanwuRate = xuanwuRate; } public BigDecimal getFarmRate() { return farmRate; } public void setFarmRate(BigDecimal farmRate) { this.farmRate = farmRate; } public BigDecimal getRaceRate() { return raceRate; } public void setRaceRate(BigDecimal raceRate) { this.raceRate = raceRate; } public BigDecimal getSixRate() { return sixRate; } public void setSixRate(BigDecimal sixRate) { this.sixRate = sixRate; } public BigDecimal getDanRate() { return danRate; } public void setDanRate(BigDecimal danRate) { this.danRate = danRate; } public BigDecimal getCommission() { return commission; } public void setCommission(BigDecimal commission) { this.commission = commission; } public BigDecimal getAmount() { return amount; } public void setAmount(BigDecimal amount) { this.amount = amount; } }
[ "xiaotu20201016@gmail.com" ]
xiaotu20201016@gmail.com
8eb88c8b50e5a50de6e94605420a1b577eb9d995
dc6cdd90169ef201350838a322c1766f62e29b0f
/pia-ch-10-ejb3/src/main/java/net/chrisrichardson/foodToGo/ejb3/domain/AbstractCouponImpl.java
b02b75b12c48c4f8619075dfcbf1334e19a58546
[ "Apache-2.0" ]
permissive
gusdelact/pia
406b72694d6d0ec431807d1d4058ea145babffcc
7ad8887dec21d9438536a27e371e5094253ba5e7
refs/heads/master
2020-03-24T19:13:56.991601
2018-08-10T07:34:46
2018-08-10T07:34:46
142,912,577
0
0
null
null
null
null
UTF-8
Java
false
false
1,364
java
/* * Copyright (c) 2005 Chris Richardson * * 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 net.chrisrichardson.foodToGo.ejb3.domain; import javax.persistence.*; @Entity(access = AccessType.FIELD) @Table(name = "FTGO_COUPON") @Inheritance(strategy = InheritanceType.SINGLE_TABLE, discriminatorType = DiscriminatorType.STRING) @DiscriminatorColumn(name = "COUPON_TYPE", nullable = true) public abstract class AbstractCouponImpl implements Coupon { @Id(generate = GeneratorType.AUTO) private int id = -1; private String code; protected AbstractCouponImpl() { } protected AbstractCouponImpl(String code) { this.code = code; } public String getCode() { return code; } public int getId() { return id; } }
[ "chris@chrisrichardson.net" ]
chris@chrisrichardson.net
4f5478c99ab212bff81c7f931a301f561d525a98
982f6c3a3c006d2b03f4f53c695461455bee64e9
/src/main/java/com/alipay/api/domain/UserIdentityInfo.java
c37c489b639c40e2910cd9314370eb9f740612c9
[ "Apache-2.0" ]
permissive
zhaomain/Alipay-Sdk
80ffc0505fe81cc7dd8869d2bf9a894b823db150
552f68a2e7c10f9ffb33cd8e0036b0643c7c2bb3
refs/heads/master
2022-11-15T03:31:47.418847
2020-07-09T12:18:59
2020-07-09T12:18:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
644
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 用户身份信息(如:学生信息) * * @author auto create * @since 1.0, 2020-01-09 17:56:03 */ public class UserIdentityInfo extends AlipayObject { private static final long serialVersionUID = 2318519398634971758L; /** * 校园码身份信息 */ @ApiField("h_school_info") private HSchoolInfo hSchoolInfo; public HSchoolInfo gethSchoolInfo() { return this.hSchoolInfo; } public void sethSchoolInfo(HSchoolInfo hSchoolInfo) { this.hSchoolInfo = hSchoolInfo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
58be1cb86ab3b08aeef75062f348dbd7b4bc32b2
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project48/src/main/java/org/gradle/test/performance48_3/Production48_264.java
a9d92c7257c94a9b6cb24eca427f7c2dc52de22c
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance48_3; public class Production48_264 extends org.gradle.test.performance14_3.Production14_264 { private final String property; public Production48_264() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
31c18c6522fffddf81578085eafa795c0987cd0e
e199e44a4d765b739e94b3edf63d923c526e5a4f
/src/main/java/com/enfi/exam/application/JudgeApplication.java
3b7ebdcc79e132f8e5b7ac3f006f3b75cc0cc891
[]
no_license
dreamcc0817/edu-exam
1e962a362482b866f3ea192d43583f2e50eea8c6
8e0e50fae6a8e385deead7b9f0e106bf77bc2360
refs/heads/master
2023-05-29T18:06:11.541636
2021-06-23T05:54:59
2021-06-23T05:54:59
378,337,836
1
0
null
null
null
null
UTF-8
Java
false
false
199
java
package com.enfi.exam.application; /** * @author cloud-cc * @ClassName JudgeApplication * @Description 评判试卷 * @date 2021/6/18 16:49 * @Version 1.0 */ public class JudgeApplication { }
[ "dreamcc0817@gmail.com" ]
dreamcc0817@gmail.com
39fb41bbba7b19e29b5a35da45ca030754906e31
ff443bad5681f9aa8868a2f4000406a1668d1da6
/groovy-impl/src/main/java/org/jetbrains/plugins/groovy/impl/configSlurper/GroovyMapValueTypeEnhancer.java
df112f77357be7c159bec046e3710e01fba6ec6f
[ "Apache-2.0" ]
permissive
consulo/consulo-groovy
db1b6108922e838b40c590ba33b495d2d7084d1d
f632985a683dfc6053f5602c50a23f619aca78cf
refs/heads/master
2023-09-03T19:47:57.655695
2023-09-02T11:02:52
2023-09-02T11:02:52
14,021,532
0
0
null
null
null
null
UTF-8
Java
false
false
2,796
java
/* * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jetbrains.plugins.groovy.impl.configSlurper; import com.intellij.java.language.psi.CommonClassNames; import com.intellij.java.language.psi.PsiType; import consulo.annotation.component.ExtensionImpl; import consulo.language.psi.PsiElement; import org.jetbrains.plugins.groovy.impl.extensions.GroovyMapContentProvider; import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression; import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrMethodCall; import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression; import org.jetbrains.plugins.groovy.lang.psi.impl.GrMapType; import org.jetbrains.plugins.groovy.lang.psi.impl.GroovyPsiManager; import org.jetbrains.plugins.groovy.lang.psi.typeEnhancers.GrReferenceTypeEnhancer; import javax.annotation.Nullable; /** * @author Sergey Evdokimov */ @ExtensionImpl public class GroovyMapValueTypeEnhancer extends GrReferenceTypeEnhancer { @Override public PsiType getReferenceType(GrReferenceExpression ref, @Nullable PsiElement resolved) { if (resolved != null) return null; GrExpression qualifierExpression = ref.getQualifierExpression(); if (qualifierExpression == null) return null; PsiType mapType = qualifierExpression.getType(); if (!GroovyPsiManager.isInheritorCached(mapType, CommonClassNames.JAVA_UTIL_MAP)) { return null; } PsiElement qResolved; if (qualifierExpression instanceof GrReferenceExpression) { qResolved = ((GrReferenceExpression)qualifierExpression).resolve(); } else if (qualifierExpression instanceof GrMethodCall) { qResolved = ((GrMethodCall)qualifierExpression).resolveMethod(); } else { return null; } String key = ref.getReferenceName(); if (key == null) return null; for (GroovyMapContentProvider provider : GroovyMapContentProvider.EP_NAME.getExtensions()) { PsiType type = provider.getValueType(qualifierExpression, qResolved, key); if (type != null) { return type; } } if (mapType instanceof GrMapType) { return ((GrMapType)mapType).getTypeByStringKey(key); } return null; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
6d87e0652e9aa3257f17b2ea16aa3d5e6a05455c
28ce6f31fa72b9d42eb93d24b8832fa9b7c94616
/test-case-src/src/main/java/java/findbugsDiscuss/Bug20070301.java
ca57d4540533e7602d43d33ec28111d50ba201f6
[]
no_license
HarveyLuo91/KillBugTestCases
754ac1163b11add7261fc4cbe84e5d6269b392ac
e1da3c69d6ce1f9238fbe41c68d6ebffd5080be4
refs/heads/master
2021-08-28T04:26:44.356531
2017-12-11T07:23:38
2017-12-11T07:23:38
113,673,769
0
0
null
null
null
null
UTF-8
Java
false
false
1,890
java
package java.findbugsDiscuss; import java.io.Closeable; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; public class Bug20070301 { public static void falsePositive(String url, String[] schemas) { Connection conn = null; Statement stm = null; try { conn = DriverManager.getConnection(url); stm = conn.createStatement(); for (String schema : schemas) { String sql = "create schema " + schema + ";"; stm.executeUpdate(sql); } } catch (SQLException e) { log("exception", e); } finally { if (stm != null) try { stm.close(); } catch (SQLException e1) { log("exception", e1); } if (null != conn) { try { conn.close(); } catch (SQLException e) { log("exception", e); } } } } public static void closeQuietly(Closeable e) { if (e != null) try { e.close(); } catch (IOException e1) { log("Could not close", e1); } } public static void closeQuietly(Statement e) { if (e != null) try { e.close(); } catch (Exception e1) { log("Could not close", e1); } } public static void closeQuietly(Connection e) { if (e != null) try { e.close(); } catch (Exception e1) { log("Could not close", e1); } } public static void log(String msg, Exception e) { System.out.println(msg); } }
[ "93994822@qq.com" ]
93994822@qq.com
2d8fdd054596e684fcd228fc48f50c009f1861e6
0aea651570faa42de5214c1216fc79605133b19c
/entity-store/src/main/java/jetbrains/exodus/entitystore/iterate/EntityIteratorFixingDecorator.java
34fd2bc006c7a64667ce06175e521a0533c5d409
[ "Apache-2.0" ]
permissive
morj/xodus
5ce36c983806bf74cca8d9917dfa2bccd5ad2323
b7268bd1f1f95c7955d19ff5531a5464fa7706e2
refs/heads/master
2020-12-24T14:10:44.700740
2015-10-15T08:46:13
2015-10-15T08:46:13
42,998,284
1
0
null
2015-09-23T12:02:49
2015-09-23T12:02:49
null
UTF-8
Java
false
false
1,980
java
/** * Copyright 2010 - 2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package jetbrains.exodus.entitystore.iterate; import jetbrains.exodus.entitystore.EntityId; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** * Some EntityIteratorBase instances to dot allow to call hasNext() several times successively * without calling nextId(). This decorator fixes decorated entity iterator. */ public class EntityIteratorFixingDecorator extends EntityIteratorBase { private final EntityIteratorBase iterator; private boolean hasNext; private boolean hasNextValid; public EntityIteratorFixingDecorator(@NotNull final EntityIterableBase iterable, @NotNull final EntityIteratorBase iterator) { super(iterable); this.iterator = iterator; } @Override protected boolean hasNextImpl() { if (!hasNextValid) { hasNext = iterator.hasNextImpl(); hasNextValid = true; } return hasNext; } @Override @Nullable public EntityId nextIdImpl() { final EntityId result = hasNextImpl() ? iterator.nextIdImpl() : null; hasNextValid = false; return result; } @Override public boolean shouldBeDisposed() { return iterator.shouldBeDisposed(); } @Override public boolean dispose() { return iterator.dispose(); } }
[ "lvo@intellij.net" ]
lvo@intellij.net
4c8a7f7979482b3e4d9bf549ba70190f61f7b245
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/dji/thirdparty/io/reactivex/internal/operators/single/SingleAmb.java
d405443209c363d51898d94ac680dbc22364dbc7
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
4,541
java
package dji.thirdparty.io.reactivex.internal.operators.single; import dji.thirdparty.io.reactivex.Single; import dji.thirdparty.io.reactivex.SingleObserver; import dji.thirdparty.io.reactivex.SingleSource; import dji.thirdparty.io.reactivex.disposables.CompositeDisposable; import dji.thirdparty.io.reactivex.disposables.Disposable; import dji.thirdparty.io.reactivex.exceptions.Exceptions; import dji.thirdparty.io.reactivex.internal.disposables.EmptyDisposable; import dji.thirdparty.io.reactivex.plugins.RxJavaPlugins; import java.util.Iterator; import java.util.concurrent.atomic.AtomicBoolean; public final class SingleAmb<T> extends Single<T> { private final SingleSource<? extends T>[] sources; private final Iterable<? extends SingleSource<? extends T>> sourcesIterable; public SingleAmb(SingleSource<? extends T>[] sources2, Iterable<? extends SingleSource<? extends T>> sourcesIterable2) { this.sources = sources2; this.sourcesIterable = sourcesIterable2; } /* access modifiers changed from: protected */ public void subscribeActual(SingleObserver<? super T> s) { int count; SingleSource<? extends T>[] sources2 = this.sources; int count2 = 0; if (sources2 == null) { sources2 = new SingleSource[8]; try { Iterator i$ = this.sourcesIterable.iterator(); while (true) { try { int count3 = count2; if (!i$.hasNext()) { count = count3; break; } SingleSource<? extends T> element = (SingleSource) i$.next(); if (element == null) { EmptyDisposable.error(new NullPointerException("One of the sources is null"), s); int i = count3; return; } if (count3 == sources2.length) { SingleSource<? extends T>[] b = new SingleSource[((count3 >> 2) + count3)]; System.arraycopy(sources2, 0, b, 0, count3); sources2 = b; } count2 = count3 + 1; sources2[count3] = element; } catch (Throwable th) { e = th; Exceptions.throwIfFatal(e); EmptyDisposable.error(e, s); return; } } } catch (Throwable th2) { e = th2; } } else { count = sources2.length; } CompositeDisposable set = new CompositeDisposable(); AmbSingleObserver<T> shared = new AmbSingleObserver<>(s, set); s.onSubscribe(set); int i2 = 0; while (i2 < count) { SingleSource<? extends T> s1 = sources2[i2]; if (shared.get()) { return; } if (s1 == null) { set.dispose(); Throwable e = new NullPointerException("One of the sources is null"); if (shared.compareAndSet(false, true)) { s.onError(e); return; } else { RxJavaPlugins.onError(e); return; } } else { s1.subscribe(shared); i2++; } } } static final class AmbSingleObserver<T> extends AtomicBoolean implements SingleObserver<T> { private static final long serialVersionUID = -1944085461036028108L; final SingleObserver<? super T> s; final CompositeDisposable set; AmbSingleObserver(SingleObserver<? super T> s2, CompositeDisposable set2) { this.s = s2; this.set = set2; } public void onSubscribe(Disposable d) { this.set.add(d); } public void onSuccess(T value) { if (compareAndSet(false, true)) { this.set.dispose(); this.s.onSuccess(value); } } public void onError(Throwable e) { if (compareAndSet(false, true)) { this.set.dispose(); this.s.onError(e); return; } RxJavaPlugins.onError(e); } } }
[ "michael@districtrace.com" ]
michael@districtrace.com
4deca7ba54103c2c021a27cc9ae845b3fb3f1746
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_4ea0ba3b2696b47e58a530e19137ba89373e701f/LoginMessage/2_4ea0ba3b2696b47e58a530e19137ba89373e701f_LoginMessage_s.java
bcde19268c0d757730dea7e38fcab9234751ca13
[]
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,013
java
package gov.usgs.cida.watersmart.ldap; /** * * @author Jordan Walker <jiwalker@usgs.gov> */ public enum LoginMessage { BAD_PASS(0, "Incorrect username or password"), BAD_GROUP(1, "User is authorized to view this page"), NOT_HTTPS(2, "You have been redirected to the secure login page"), LOGOUT(3, "You have succesfully logged out"), ERROR(-1, "How did you get here?"); int code; String msg; LoginMessage(int code, String msg) { this.code = code; this.msg = msg; } public int getCode() { return code; } public static String getMessage(int code) { switch (code) { case 0: return BAD_PASS.msg; case 1: return BAD_GROUP.msg; case 2: return NOT_HTTPS.msg; case 3: return LOGOUT.msg; default: return ERROR.msg; } } @Override public String toString() { return "" + this.code; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2826303d84e3b7a20a8140e015b8a9de489830cd
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
/services/ief/src/main/java/com/huaweicloud/sdk/ief/v1/model/Exec.java
3ebc366e028b98c29da771ca9fd797e1c1d362d7
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-java-v3
51b32a451fac321a0affe2176663fed8a9cd8042
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
refs/heads/master
2023-08-29T06:50:15.642693
2023-08-24T08:34:48
2023-08-24T08:34:48
262,207,545
91
57
NOASSERTION
2023-09-08T12:24:55
2020-05-08T02:27:00
Java
UTF-8
Java
false
false
1,665
java
package com.huaweicloud.sdk.ief.v1.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; /** * Exec */ public class Exec { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "command") private String command; public Exec withCommand(String command) { this.command = command; return this; } /** * 探针执行命令,最大长度10240个字符 * @return command */ public String getCommand() { return command; } public void setCommand(String command) { this.command = command; } @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Exec that = (Exec) obj; return Objects.equals(this.command, that.command); } @Override public int hashCode() { return Objects.hash(command); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Exec {\n"); sb.append(" command: ").append(toIndentedString(command)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
f1e07bcd132671eeb0ee23708f2e5cf18a31cba5
bbb79cb1f203b20ba447829532a2726fdcb4c7d4
/work/jsp/06_javascript/src/kr/co/mlec/filter/AuthFilter.java
331da7bfbe3eb233563e9dc0992d2b68de165e8d
[]
no_license
shouvoo/bitAcademy
d9a2f53551fba9e0f4356ff49e4d5427220c4b1d
370b2a46f5f049fd1c9bccf5646374051c13ae58
refs/heads/master
2021-08-23T19:56:54.834420
2017-12-06T08:36:22
2017-12-06T08:36:22
111,503,706
0
0
null
null
null
null
UTF-8
Java
false
false
1,787
java
package kr.co.mlec.filter; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; public class AuthFilter implements Filter { // 로그인이 필요없는 페이지 주소를 담는다. private List<String> list = new ArrayList<>(); @Override public void init(FilterConfig config) throws ServletException { String pages = config.getInitParameter("pages"); // System.out.println(pages); String[] arr = pages.split(";"); for (String page : arr) { list.add(page.trim()); } // System.out.println(list); } @Override public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest hRequest = (HttpServletRequest)request; HttpServletResponse hResponse = (HttpServletResponse)response; // 웹 어플리케이션 path 경로 String contextPath = hRequest.getContextPath(); // 사용자가 요청한 페이지 주소 확인 String uri = hRequest.getRequestURI(); uri = uri.substring(contextPath.length()); boolean isRedirect = false; if (list.indexOf(uri) == -1) { HttpSession session = hRequest.getSession(); isRedirect = true; } if (isRedirect) { hResponse.sendRedirect(contextPath + "/login/loginform"); } else { chain.doFilter(request, response); } } @Override public void destroy() { // TODO Auto-generated method stub } }
[ "show79boo@naver.com" ]
show79boo@naver.com
0b6abfafdc0bd4dd4fcfdaa061851f24bcd4acc9
267a2858bc1823f71ceea66a603d5f880afb9fb8
/app/src/main/java/yh/app/activitytool/QRCodeActivity.java
812658daccdf4e654fe6f255d1d8eb2ad4161b49
[]
no_license
zsp19931222/LiGongApp
ad1d61f352481bb2ebecd059d0674f48e1ab6bef
1bc158c6c615afca490edc9ce229e8ad4f3ff35f
refs/heads/master
2020-03-23T07:21:09.914957
2018-08-13T03:05:27
2018-08-13T03:05:34
141,266,143
0
0
null
null
null
null
UTF-8
Java
false
false
571
java
package yh.app.activitytool; import android.content.Intent; import android.widget.Toast; import 云华.智慧校园.功能._二维码; public class QRCodeActivity extends ActivityPortrait { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == RESULT_OK) if (requestCode == _二维码.PHOTO_PIC) { String result = data.getExtras().getString("result"); Toast.makeText(this, "解析结果:" + result, Toast.LENGTH_SHORT).show(); } } }
[ "872126510@qq.com" ]
872126510@qq.com
b284c6b37bc33011dda91fb268db5ce8b6589b61
73fb3212274525b1ad47c4eeca7082a6a0a97250
/ademo/appindex/src/main/java/com/geek/appindex/logindemo/AdLoginImgActDemo.java
2f7c0a8f7d4a71df9c4c31d5c1a49586d7f0eadf
[]
no_license
dahui888/androidkuangjia2021
d6ba565e14b50f2a484154d8fffdb486ee56f433
624e212b97bb4b47d4763f644be30ef2a26d244d
refs/heads/main
2023-07-18T00:00:43.079443
2021-08-26T10:15:53
2021-08-26T10:15:53
383,725,172
1
0
null
2021-07-07T08:18:31
2021-07-07T08:18:30
null
UTF-8
Java
false
false
4,247
java
package com.geek.appindex.logindemo; import android.content.res.Resources; import android.os.Bundle; import android.text.TextUtils; import android.util.Log; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.Nullable; import com.blankj.utilcode.util.SPUtils; import com.bumptech.glide.Glide; import com.bumptech.glide.request.RequestOptions; import com.geek.appindex.R; import com.geek.libbase.base.SlbBaseActivity; import com.geek.libbase.utils.CommonUtils; import com.geek.libbase.widgets.NavigationBarUtil; import com.geek.libutils.SlbLoginUtil; import com.geek.libutils.data.MmkvUtils; import com.haier.cellarette.libwebview.hois2.HiosHelper; import me.jessyan.autosize.AutoSizeCompat; public class AdLoginImgActDemo extends SlbBaseActivity { public static final String TAG_ADCOMMON_ID = "id1";// 广告id private String id1; private String url1; private String img1; private TextView tv_adJumps; private ImageView iv1; @Override public Resources getResources() { //需要升级到 v1.1.2 及以上版本才能使用 AutoSizeCompat AutoSizeCompat.autoConvertDensityOfGlobal((super.getResources()));//如果没有自定义需求用这个方法 AutoSizeCompat.autoConvertDensity((super.getResources()), 667, false);//如果有自定义需求就用这个方法 return super.getResources(); } @Override protected int getLayoutId() { return R.layout.activity_loginactdemo2; } @Override protected void setup(@Nullable Bundle savedInstanceState) { super.setup(savedInstanceState); //虚拟键 if (NavigationBarUtil.hasNavigationBar(this)) { // NavigationBarUtil.initActivity(getWindow().getDecorView()); NavigationBarUtil.hideBottomUIMenu(this); } getWindow().getDecorView().setSystemUiVisibility(View.INVISIBLE);// topbar // tv_adJumps = findViewById(R.id.tv_adJumps); iv1 = findViewById(R.id.iv1); RequestOptions options = new RequestOptions() .placeholder(R.drawable.ic_def_loading) .error(R.drawable.ic_def_loading) .fallback(R.drawable.ic_def_loading); //url为空的时候,显示的图片; Glide.with(this).load(img1).apply(options).into(iv1); iv1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { SPUtils.getInstance().put(TAG_ADCOMMON_ID, id1); url1 = getIntent().getStringExtra("ces"); if (TextUtils.isEmpty(url1)) { // 测试1 url1 = "https://www.baidu.com/"; // 测试2 url1 = "https://www.baidu.com/?condition=login"; // 测试3 // url1 = "hios://" + AppUtils.getAppPackageName() + ".hs.act.slbapp.AdCommLoginAct{act}?act={i}1&sku_id={s}2a&category_id={s}3a"; // 测试4 // url1 = "hios://" + AppUtils.getAppPackageName() + ".hs.act.slbapp.AdCommLoginAct{act}?act={i}1&sku_id={s}2a&category_id={s}3a&condition=login"; } SlbLoginUtil.get().loginTowhere(AdLoginImgActDemo.this, new Runnable() { @Override public void run() { HiosHelper.resolveAd(AdLoginImgActDemo.this, AdLoginImgActDemo.this, url1); } }); set_url_hios_finish(url1); } }); tv_adJumps.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { SPUtils.getInstance().put(TAG_ADCOMMON_ID, id1); //test MmkvUtils.getInstance().set_common(CommonUtils.MMKV_TOKEN, ""); finish(); } }); // Log.e("gongshi", (Math.sqrt(Math.pow(812, 2) + (Math.pow(375, 2))) / 25.4 + "")); // Log.e("gongshi", (Math.sqrt(Math.pow(640, 2) + (Math.pow(360, 2))) / 25.4 + "")); Log.e("gongshi", (Math.sqrt(Math.pow(667, 2) + (Math.pow(375, 2))) / 25.4 + "")); } }
[ "liangxiao6@live.com" ]
liangxiao6@live.com
a06af02a1af59d87634867155795c1fa43763da2
dc7e818604634049acfa4373a04b8ad2a676b845
/design-pattern/src/main/java/com/vilin/chapter12/observer/example4/Reader.java
0abe07a79d538ec819e5b925d35663c16710fdbf
[]
no_license
guangyongluo/DesignPattern
47611c3e8196e783824cb4fc2030f81920450f40
3b16fcd5f4176f585df6a6e3f493dd2dcd8954c5
refs/heads/master
2022-07-18T01:01:03.273309
2021-02-05T01:54:49
2021-02-05T01:54:49
123,889,610
1
3
null
2022-06-21T04:14:14
2018-03-05T08:37:32
Java
UTF-8
Java
false
false
688
java
package com.vilin.chapter12.observer.example4; import java.util.Observable; /** * 真正的读者,为了简单就描述一下姓名 */ public class Reader implements java.util.Observer{ /** * 读者的姓名 */ private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } public void update(Observable o, Object obj) { //这了采用推的方式 System.out.println(name+"收到报纸了,阅读先。目标推过来的内容是==="+obj); //这里是拉的方式 System.out.println(name+"收到报纸了,阅读先。主动到目标对象去拉的内容是===" +((NewsPaper)o).getContent()); } }
[ "llooww@mail.ustc.edu.cn" ]
llooww@mail.ustc.edu.cn
544c58f5734f2fdde00783f46b8939d3ac1ee1ca
147f35c2154e5b9bb340ad8dcc682e18bf3d5bc8
/src/br/com/isaccanedo/TestCrypto.java
f88c4b4ad2e90b8de92d9e0caef04cbe7bcedac4
[]
no_license
isaccanedo/criptografia-decriptografia-AES
cf024e813b1901cdb149c29592c595c5c0c07d4b
9163b2f67cbc294b3383727986acdd2400120ace
refs/heads/master
2023-01-22T10:27:13.167794
2020-11-09T19:40:29
2020-11-09T19:40:29
310,008,597
1
0
null
null
null
null
UTF-8
Java
false
false
950
java
package br.com.isaccanedo; public class TestCrypto { public static void main(String[] args) { Crypto crypto = new Crypto(); String data = "Isac Canedo"; String key = "123MX5612YT3456123PLKM63"; System.out.println("+======================================================="); System.out.println("| Dados em claro: " + data); String encriptdata = crypto.Encrypt(data, key); System.out.println("| Dados encriptados ==> " + encriptdata); System.out.println("+======================================================="); String decriptData = crypto.Decrypt(encriptdata, key); System.out.println("+======================================================="); System.out.println("| Resultado da decriptografia:"); System.out.println("| " + decriptData); System.out.println("+======================================================="); } }
[ "isaccanedo@gmail.com" ]
isaccanedo@gmail.com
446a76fb60d7a6d9a0a4f46d3715fd6d4330131f
07faeaab515163f3493f86805e50f0b0d1aa258a
/src_sysMgr/com/seeyon/v3x/system/signet/domain/V3xHtmDocumentSignature.java
9fc6042825a998fa98c23f65d5344d92bba30020
[]
no_license
zhengxyzw/seeyon_v3x
033563e558794eb3d3c6d14b65fc3bd985f24e03
f2f91c1db65c93681ef504d410d517e77048deec
refs/heads/master
2020-06-12T20:33:08.873703
2017-07-11T01:21:52
2017-07-11T01:21:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,612
java
package com.seeyon.v3x.system.signet.domain; import org.apache.commons.lang.builder.ToStringBuilder; import com.seeyon.v3x.common.domain.BaseModel; public class V3xHtmDocumentSignature extends BaseModel { private static final long serialVersionUID = 1L; private java.sql.Timestamp dateTime; // 签章时间 private String fieldName; // 字段名称 private String fieldValue; // 签章数据 private String hostName; // 签名主机 private long summaryId; // 文单ID private String userName; // 用户名称 public V3xHtmDocumentSignature() { } public java.sql.Timestamp getDateTime() { return this.dateTime; } public void setDateTime(java.sql.Timestamp dateTime) { this.dateTime = dateTime; } public String getFieldName() { return this.fieldName; } public void setFieldName(String fieldName) { this.fieldName = fieldName; } public String getFieldValue() { return this.fieldValue; } public void setFieldValue(String fieldValue) { this.fieldValue = fieldValue; } public String getHostName() { return this.hostName; } public void setHostName(String hostName) { this.hostName = hostName; } public long getSummaryId() { return this.summaryId; } public void setSummaryId(long summaryId) { this.summaryId = summaryId; } public String getUserName() { return this.userName; } public void setUserName(String userName) { this.userName = userName; } public String toString() { return new ToStringBuilder(this) .append("id", getId()) .toString(); } }
[ "839428881@qq.com" ]
839428881@qq.com
4a787c57f6d213fb4eea780136075587851dfc6e
2903eadab6dad7e8d66462b9647f4baacfeababa
/homework180418/src/com/homework180418/PIAct.java
cf6cb6a2259d9241aeefae05a27d958bbaf0cb5d
[]
no_license
swchod1/multicampus_javaworkspace
53f9f811d2beac15dc3f11354b7c55fc70ed4e47
1c2296836a3fc50190df9c16f19ae353a382981c
refs/heads/master
2023-01-21T16:08:33.085840
2020-11-30T13:40:10
2020-11-30T13:40:10
316,420,968
0
0
null
null
null
null
UTF-8
Java
false
false
1,785
java
package com.homework180418; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class PIAct extends JFrame implements ActionListener { JButton bt; TextField[] tf; CheckboxGroup cg; JLabel[] l = new JLabel[4]; public PIAct(JButton bt, TextField[] tf, CheckboxGroup cg) { // TODO Auto-generated constructor stub this.bt = bt; this.tf = tf; this.cg = cg; } @Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub JDialog d = new JDialog(this, "정보 확인", false); d.setLayout(new FlowLayout(FlowLayout.CENTER)); if (e.getSource() == bt) { if(tf[1].getText().equals(tf[2].getText())) { for(int i = 0; i < 3; i++) { l[i] = new JLabel(); if(i == 2) { if(cg.getSelectedCheckbox().getLabel().equals("여자")) { l[2].setText("Woman"); } else { l[2].setText("Man"); } } else { l[i].setText(tf[i].getText()); } d.add(l[i]); } } else { /* l[3] = new JLabel("비밀번호가 일치하지 않습니다.", JLabel.CENTER); d.add(l[3]); */ JOptionPane.showMessageDialog(this, "비밀번호가 일치하지 않습니다.", "메시지", JOptionPane.INFORMATION_MESSAGE, icon2); return; } d.setSize(250, 100); d.setResizable(false); d.setVisible(true); d.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); } } private Icon icon1 = new ImageIcon("src/img/icon001.jpg"); private Icon icon2 = new ImageIcon("src/img/icon002.jpg"); private Icon icon3 = new ImageIcon("src/img/icon003.jpg"); private Icon icon4 = new ImageIcon("src/img/icon004.jpg"); }
[ "swchod1@gmail.com" ]
swchod1@gmail.com
fc1d3988188991b3ea4f918229df2f9390d69559
b5e99d79997d780786f93b57b955b229eae90ef0
/src/main/java/bupt/wxy/dp/NumMatrix.java
f39d1737f2756d4a3f8b72c3981f2d6f1faa6351
[]
no_license
wxyBUPT/solveLeetCode.java
7c7126d749c034a5453c734fead72116e1045f22
f8535bc6196b9e6fa5d897d83bec947e6d19c096
refs/heads/master
2020-12-04T11:18:39.136482
2016-11-22T03:22:23
2016-11-22T03:22:23
66,623,558
0
0
null
null
null
null
UTF-8
Java
false
false
2,378
java
package bupt.wxy.dp; /** * Created by xiyuanbupt on 10/23/16. Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2). Range Sum Query 2D The above rectangle (with the red border) is defined by (row1, col1) = (2, 1) and (row2, col2) = (4, 3), which contains sum = 8. Example: Given matrix = [ [3, 0, 1, 4, 2], [5, 6, 3, 2, 1], [1, 2, 0, 1, 5], [4, 1, 0, 1, 7], [1, 0, 3, 0, 5] ] sumRegion(2, 1, 4, 3) -> 8 sumRegion(1, 1, 2, 2) -> 11 sumRegion(1, 2, 2, 4) -> 12 */ // 高纬dp public class NumMatrix { int[][] dp; public NumMatrix(int[][] matrix){ int row = matrix.length; if(row==0)return; int col = matrix[0].length; dp = new int[row][col]; dp[0][0] = matrix[0][0]; for(int i = 1;i<col;i++){ dp[0][i] = dp[0][i-1] + matrix[0][i]; } for(int i = 1;i<row;i++){ dp[i][0] = dp[i-1][0] + matrix[i][0]; } for(int i = 1;i<row;i++) for(int j = 1;j<col;j++) dp[i][j] = matrix[i][j] + dp[i-1][j] + dp[i][j-1] - dp[i-1][j-1]; } public int sumRegion(int row1,int col1,int row2,int col2){ if(row1==0&&col1==0)return dp[row2][col2]; if(row1==0)return dp[row2][col2] - dp[row2][col1-1]; if(col1==0)return dp[row2][col2] - dp[row1-1][col2]; return dp[row2][col2] + dp[row1-1][col1-1] - dp[row1-1][col2] - dp[row2][col1-1]; } /** int[][][][] dp; public NumMatrix(int[][] matrix) { int row = matrix.length; if(row==0)return; int col = matrix[0].length; int[][][][] dp = new int[row][col][row][col]; dp[0][0][0][0] = matrix[0][0]; for(int i = 1;i<col;i++){ dp[0][0][0][i] = dp[0][0][0][i-1] + matrix[0][i-1]; } for(int i = 1;i<row;i++){ dp[0][0][i][0] = dp[0][0][i-1][0] + matrix[i-1][0]; } for(int i = 1;i<row;i++) for(int j = 1;j<col;j++){ dp[0][0][i][j] = dp[0][0][i-1][j] + dp[0][0][i][j-1] + matrix[i][j] - dp[0][0][i-1][j-1]; } } public int sumRegion(int row1, int col1, int row2, int col2) { return dp[0][0][row2][col2] - dp[0][0][row1-1][col2] - dp[0][0][row2][col1-1] + dp[0][0] } **/ }
[ "746451950@qq.com" ]
746451950@qq.com
3ae4ff8fad254d757be9ae7ec797e1a7d8ded24c
62cc557b43fb928a16f70b01bd83f45429b1103c
/fabric8/plugins/org.fusesource.ide.fabric8.ui/src/org/fusesource/ide/fabric8/ui/FabricExplorerActionProvider.java
1eda7f165c09b6bf067d77cc0663650a88e96ad1
[]
no_license
cominvent/fuseide
f40ab291aad7ec7f063659406e019bc4a1b17183
6fe7f077743db39a8c7b8e8c0ee1e3b8cac1edaa
refs/heads/master
2021-01-18T18:48:17.542452
2015-03-05T14:00:25
2015-03-05T14:04:25
31,892,473
0
1
null
2015-03-09T10:38:39
2015-03-09T10:38:39
null
UTF-8
Java
false
false
2,605
java
/******************************************************************************* * Copyright (c) 2014 Red Hat, Inc. * Distributed under license by Red Hat, Inc. All rights reserved. * This program is made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ package org.fusesource.ide.fabric8.ui; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.ui.IActionBars; import org.eclipse.ui.navigator.CommonActionProvider; import org.eclipse.ui.navigator.ICommonActionConstants; import org.eclipse.ui.navigator.ICommonActionExtensionSite; import org.fusesource.ide.commons.ui.ContextMenuProvider; import org.fusesource.ide.commons.ui.Selections; import org.fusesource.ide.fabric8.ui.actions.DoubleClickAction; import org.fusesource.ide.fabric8.ui.actions.RefreshAction; /** * @author lhein */ public class FabricExplorerActionProvider extends CommonActionProvider { private ICommonActionExtensionSite site; private DoubleClickAction doubleClickAction; private RefreshAction refreshAction; /** * */ public FabricExplorerActionProvider() { super(); } @Override public void init(ICommonActionExtensionSite site) { super.init(site); this.site = site; String viewId = site.getViewSite().getId(); doubleClickAction = new DoubleClickAction(); refreshAction = new RefreshAction(viewId); StructuredViewer viewer = site.getStructuredViewer(); refreshAction.setViewer(viewer); FabricPlugin.getLogger().debug("============================= View ID: " + viewId); } public StructuredViewer getStructuredViewer() { return site.getStructuredViewer(); } /* * (non-Javadoc) * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars) */ @Override public void fillActionBars(IActionBars actionBars) { super.fillActionBars(actionBars); actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, doubleClickAction); } @Override public void fillContextMenu(IMenuManager menu) { super.fillContextMenu(menu); menu.appendToGroup("additions", refreshAction); //$NON-NLS-1$ Object o = Selections.getFirstSelection(site.getStructuredViewer().getSelection()); if (o instanceof ContextMenuProvider) { ContextMenuProvider cmp = (ContextMenuProvider)o; cmp.provideContextMenu(menu); } } }
[ "lhein@apache.org" ]
lhein@apache.org
ef3904399dae97d1224be04e3707f1e8fd6ccbc6
aabc5f7f9796ec0b6bc754e35e26a0cb94333250
/SeleniumEvening/src/assignments/Assignment_2.java
42920de8669b56fb87dae67078bc023d7e125cd7
[]
no_license
nagarjunreddykasu/seleniumtraining
2006b733e9e75fcadd723d98709b6b5c36b6dc1f
e69b80fddae6dce8e65b280cd58bcd72fcd78187
refs/heads/master
2023-06-16T04:40:59.889078
2021-07-09T15:24:56
2021-07-09T15:24:56
345,562,967
0
1
null
null
null
null
UTF-8
Java
false
false
193
java
package assignments; public class Assignment_2 { } /* https://www.path2usa.com/travel-companions 1. Write a program to select current date. 2. Write a program to select August 15, 2021 */
[ "nagarjun.sdet@gmail.com" ]
nagarjun.sdet@gmail.com
cc7d16e27665cbf7ad17a23ba8cf7b71740f2ff2
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.jdt.ui/10578.java
778ab6d4bf0a4fed6708c5f88341c95a41ab1f55
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
364
java
package branch_out; import java.util.List; public class A_test758 { public void foo(List a) { extracted(a); } protected void extracted(List a) { /*[*/ for (Object x : a) { if (x == null) { continue; } System.out.println(); } /*]*/ } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
69da811a8562ff32dfde79cfcc7e3c28acbdb22f
4c304a7a7aa8671d7d1b9353acf488fdd5008380
/src/main/java/com/alipay/api/response/MybankCreditSceneprodBillSyncResponse.java
9e56e6f7786d1ea9ab9781cb4f2fe18c835649dc
[ "Apache-2.0" ]
permissive
zhaorongxi/alipay-sdk-java-all
c658983d390e432c3787c76a50f4a8d00591cd5c
6deda10cda38a25dcba3b61498fb9ea839903871
refs/heads/master
2021-02-15T19:39:11.858966
2020-02-16T10:44:38
2020-02-16T10:44:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
664
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: mybank.credit.sceneprod.bill.sync response. * * @author auto create * @since 1.0, 2019-04-01 09:48:57 */ public class MybankCreditSceneprodBillSyncResponse extends AlipayResponse { private static final long serialVersionUID = 3273696272166377615L; /** * 网商traceId,便于查询日志内容 */ @ApiField("trace_id") private String traceId; public void setTraceId(String traceId) { this.traceId = traceId; } public String getTraceId( ) { return this.traceId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ccbe361e996de2ed60807628dccadd5de3b82a98
a80ab0dcdf81c50efba27c8288c37e265c2535bb
/app/src/main/java/com/youthfireit/asiamegamart/domain/interactors/impl/CartInteractorImpl.java
28736fc5619e24621d4fdce0385135ea342aadce
[]
no_license
fitareq/asiamegamart
6dbb4e80c199e1bf4702b51300d89948f20ac72f
9e23888b44399058993e711a58c104d12d65ec33
refs/heads/master
2023-02-28T14:55:43.426245
2021-02-06T08:27:34
2021-02-06T08:27:34
336,481,176
0
0
null
null
null
null
UTF-8
Java
false
false
1,881
java
package com.youthfireit.asiamegamart.domain.interactors.impl; import android.util.Log; import com.youthfireit.asiamegamart.Network.ApiClient; import com.youthfireit.asiamegamart.Network.response.CartResponse; import com.youthfireit.asiamegamart.Network.services.CartApiInterface; import com.youthfireit.asiamegamart.domain.executor.Executor; import com.youthfireit.asiamegamart.domain.executor.MainThread; import com.youthfireit.asiamegamart.domain.interactors.CartInteractor; import com.youthfireit.asiamegamart.domain.interactors.base.AbstractInteractor; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; public class CartInteractorImpl extends AbstractInteractor { private CartInteractor.CallBack mCallback; private CartApiInterface apiService; private int user_id; private String token; public CartInteractorImpl(Executor threadExecutor, MainThread mainThread, CartInteractor.CallBack callBack, int id, String token) { super(threadExecutor, mainThread); mCallback = callBack; this.user_id = id; this.token = "Bearer "+token; } @Override public void run() { apiService = ApiClient.getClient().create(CartApiInterface.class); Call<CartResponse> call = apiService.getCartItems(token,"carts/"+user_id); call.enqueue(new Callback<CartResponse>() { @Override public void onResponse(Call<CartResponse> call, Response<CartResponse> response) { try { mCallback.onCartLodaded(response.body().getData()); } catch (Exception e) { Log.e("Exception", e.getMessage()); } } @Override public void onFailure(Call<CartResponse> call, Throwable t) { mCallback.onCartError(); } }); } }
[ "fitareq@gmail.com" ]
fitareq@gmail.com
399d2f00dd1a682beadf99ad70533b90b88134c0
46ef04782c58b3ed1d5565f8ac0007732cddacde
/app/diagram.styles/src/org/modelio/diagram/styles/viewer/StyleEditPanelController.java
9ee3b4c43b5422528368b9ba8738c3c1f1dd0fa0
[]
no_license
daravi/modelio
844917412abc21e567ff1e9dd8b50250515d6f4b
1787c8a836f7e708a5734d8bb5b8a4f1a6008691
refs/heads/master
2020-05-26T17:14:03.996764
2019-05-23T21:30:10
2019-05-23T21:30:45
188,309,762
0
1
null
null
null
null
UTF-8
Java
false
false
5,264
java
/* * Copyright 2013-2018 Modeliosoft * * This file is part of Modelio. * * Modelio 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. * * Modelio 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 Modelio. If not, see <http://www.gnu.org/licenses/>. * */ package org.modelio.diagram.styles.viewer; import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Stream; import com.modeliosoft.modelio.javadesigner.annotations.objid; import org.eclipse.jface.viewers.ColumnViewer; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.widgets.Composite; import org.modelio.core.ui.swt.SelectionHelper; import org.modelio.diagram.styles.core.IStyle; import org.modelio.diagram.styles.core.StyleKey; import org.modelio.diagram.styles.core.view.ISymbolViewItem; import org.modelio.ui.panel.IPanelListener; @objid ("8bbe7dd1-10ad-4830-b5b5-7db3ca4a9e5b") class StyleEditPanelController { @objid ("9120fb75-40c2-4560-b8eb-16e7384b4cb8") private StyleEditPanelUI ui; @objid ("1fbfd473-4197-40e0-89fc-34e2af23aa54") private StyleEditPanelUIData data; @objid ("bbc46eed-1ef4-4c66-a1c9-0021f6183fa0") private final List<IPanelListener> listeners = new ArrayList<>(); @objid ("32aa3d23-f30f-4e06-9aca-40313e55be25") public ColumnViewer createUi(Composite parent, boolean tableMode) { this.ui = new StyleEditPanelUI(this, tableMode); this.ui.createUI(parent); return this.ui.viewer; } @objid ("16edb377-18ff-4125-926f-5d1dc0128267") public synchronized void addListener(IPanelListener l) { if (this.listeners.contains(l)) { throw new InvalidParameterException("Listener already registered"); } this.listeners.add(l); } @objid ("826a9574-1fd8-49e3-a6ec-23f044ed1b33") public synchronized void removeListener(IPanelListener l) { this.listeners.remove(l); } @objid ("5f698368-cefe-4366-a26b-daaaf14e791c") public StyleEditPanelController() { // nothing } @objid ("8b9ffe68-db28-4d59-ac1c-f981e40a4b0b") public void onPropertySelection(ISymbolViewItem item) { this.ui.setDescription(item == null ? "" : item.getDescription()); } @objid ("d29b8fcf-0311-41b3-86c7-42546a1f7221") public StyleEditPanelUI getUi() { return this.ui; } @objid ("e44db11f-d5b3-4c35-af58-8f482141aff1") public StyleEditPanelUIData getData() { return this.data; } @objid ("a839442d-9ace-46df-a1e0-26390292d68e") public void setData(StyleEditPanelUIData data) { this.data = data; if (this.ui != null) { this.ui.update(this.data); } } @objid ("45515e54-6d9c-44c9-826c-5cb231f7a1db") private void fireListeners(StyleEditPanelUIData changedData, boolean isValidate) { this.listeners.forEach(l -> l.dataChanged(changedData, isValidate)); } @objid ("ff091d5a-d2ef-4099-923a-3d7f926749e3") public void dispose() { this.ui.dispose(); this.ui = null; } @objid ("1193c365-884c-4187-90e3-649dbbb3a1c9") public void showHelp(boolean showHelp) { if (showHelp) { this.ui.getSash().setWeights(new int[] { 90, 10 }); } else { this.ui.getSash().setWeights(new int[] { 100, 0 }); } this.ui.getSash().layout(true); } @objid ("05e661e6-5156-4995-bae8-5fdbf4c9700e") public void onStyleChanged() { fireListeners(this.data, true); } @objid ("0b8f605b-7232-4a0b-84f6-52f11a25555c") public void onNormalize(ISelection selection) { toStyleKeys(selection) .forEach(skey -> this.data.getStyleData().normalize(skey)); } @objid ("6e9f32fa-a651-40f0-b327-2f887e9b187d") public void onReset(ISelection selection) { // Process StyleKey toStyleKeys(selection) .forEach(skey -> this.data.getStyleData().removeProperty(skey)); } @objid ("9b2327f4-705c-4cfa-acb7-d8756d41d6ae") static Stream<StyleKey> toStyleKeys(ISelection selection) { return SelectionHelper.toStream(selection, ISymbolViewItem.class) .map(i -> i.getStyleKey()) .filter(Objects::nonNull); } @objid ("d86bbd49-7f36-4aed-960b-dc5ddd3d33fa") public void onApplyTo(ISelection selection, IStyle applyTo) { toStyleKeys(selection) .forEach(skey -> { IStyle styleData = this.data.getStyleData(); Object value = styleData.getProperty(skey); applyTo.setProperty(skey, value); styleData.removeProperty(skey); }); } }
[ "puya@motionmetrics.com" ]
puya@motionmetrics.com
4b7224dd140dddeba2cc0ee2fdf1dd32ed3cd767
dea7b1e67ba6da9632cb73041b9ad7ec82699774
/src/main/java/com/ltsllc/miranda/file/messages/VersionWireMessage.java
853836f3608572c560ecdc6132c2fec953da1c3b
[ "Apache-2.0" ]
permissive
miranda-messaging/miranda
fb7637e6b84a04a9cfc3b481087a113d3fffbd09
cda603f6ae41d2b9c953f1526e2cd7d908c33af5
refs/heads/master
2022-07-08T23:17:14.457316
2019-08-12T20:40:04
2019-08-12T20:40:04
96,714,204
2
1
Apache-2.0
2022-07-07T20:57:12
2017-07-09T22:06:55
Java
UTF-8
Java
false
false
1,109
java
/* * Copyright 2017 Long Term Software LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.ltsllc.miranda.file.messages; import com.ltsllc.miranda.node.NameVersion; import com.ltsllc.miranda.node.networkMessages.WireMessage; /** * Created by Clark on 2/11/2017. */ public class VersionWireMessage extends WireMessage { private NameVersion nameVersion; public VersionWireMessage(NameVersion nameVersion) { super(WireSubjects.Version); this.nameVersion = nameVersion; } public NameVersion getNameVersion() { return nameVersion; } }
[ "clark.hobbie@gmail.com" ]
clark.hobbie@gmail.com
d897ed2ebcb17016a51703cba3f6beb6767c8728
67e735ab2b0f3190968aa248e80a7b3a570f1101
/Spring/08_HibernateBasics/src/com/demo/BookData.java
2b0f3c638dc4b78465b14e466020bee80fbc4a06
[]
no_license
DivyaMaddipudi/HCL_Training
7ed68a19552310093895e12deacf0f019b07b49c
c7a6bd9fbac7f3398e7d68e8dce5f72ed13d14ec
refs/heads/master
2023-01-28T18:33:04.969333
2020-12-08T18:05:32
2020-12-08T18:05:32
304,354,730
0
1
null
null
null
null
UTF-8
Java
false
false
716
java
package com.demo; public class BookData { private String title; private double price; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public BookData(String title, double price) { super(); this.title = title; this.price = price; } public BookData() { super(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("BookData [title="); builder.append(title); builder.append(", price="); builder.append(price); builder.append("]"); return builder.toString(); } }
[ "divya.maddipudi1@gmail.com" ]
divya.maddipudi1@gmail.com
1e320a3743c6031938ef8afe25e27ac18c1a6dda
de2a04285b03139a03fa236e482a358b3c886f8f
/src/main/java/chapter14/case09/Part.java
df44b5454f8a6f6273c4e3b3630f6c28733e08b3
[]
no_license
LucasXuS/thinking
27eadb5e15c6aa413f9cdb627a67d753a94df1d1
9e71ef30d4b64b6c69593c565647c75a31c7558a
refs/heads/master
2021-01-24T00:04:37.064412
2018-06-05T15:27:48
2018-06-05T15:27:48
122,748,622
0
0
null
null
null
null
UTF-8
Java
false
false
851
java
package chapter14.case09; import java.util.ArrayList; import java.util.List; import java.util.Random; public class Part { @Override public String toString(){ return getClass().getSimpleName(); } static List<Factory<? extends Part>> factories = new ArrayList<>(); static { factories.add(new AirFilter.Factory()); factories.add(new CabinFilter.Factory()); factories.add(new FanBelt.Factory()); factories.add(new FuelFilter.Factory()); factories.add(new GeneratorBelt.Factory()); factories.add(new OilFilter.Factory()); factories.add(new PowerSteeringBelt.Factory()); } private static Random rand = new Random(47); public static Part randomCreate(){ int n = rand.nextInt(factories.size()); return factories.get(n).create(); } }
[ "595304523@qq.com" ]
595304523@qq.com
97f9682ca528fb7171a163900e7cdd9fda5046b3
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_b0396cdd86dd4b2cb5e851435d0c8f67fdedc493/HyPeerWebTest/2_b0396cdd86dd4b2cb5e851435d0c8f67fdedc493_HyPeerWebTest_s.java
3b4854cd0caa1c3850c6e71f946a64e2e3b43cdb
[]
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
6,179
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package hypeerweb; //blah import hypeerweb.visitors.SendVisitor; import java.util.HashSet; import java.util.Random; import java.util.Set; import org.junit.After; import org.junit.Test; import static org.junit.Assert.*; import hypeerweb.validator.NodeInterface; import hypeerweb.validator.Validator; /** * HyPeerWeb testing */ public class HyPeerWebTest { public static boolean STOP_TESTS = false; //Testing variables private static final int MAX_SIZE = 600, //Maximum HyPeerWeb size for tests TEST_EVERY = 1, //How often to validate the HyPeerWeb for add/delete SEND_TESTS = 2000, //How many times to test send operation BROADCAST_TESTS = 120, //How many times to test broadcast operation RAND_SEED = 5; //Seed for getting random nodes (use -1 for a random seed) private static final String DB_NAME = null; private static Segment web; private static String curTest; public HyPeerWebTest() throws Exception{ System.out.println("WARNING!!! These tests are synchronous; do not use them to test Proxy stuff"); web = new Segment(DB_NAME, RAND_SEED); } /** * Populates the HyPeerWeb with some nodes */ public void populate() throws Exception{ //Populate the DB with nodes, if needed //Add a bunch of nodes if it validates afterwards, methods should be working if (web.isEmpty()){ System.out.println("Populating..."); web.removeAllNodes(new SyncListener(){ @Override public void callback(Node n){ NodeCache temp; int old_size = 0; boolean halt; for (int i=1; i<=MAX_SIZE; i++){ final int final_i = i, final_size = ++old_size; web.addNode(new Node(0, 0), new SyncListener(){ @Override public void callback(Node n){ int size = web.getSegmentSize(); if (size != final_size){ System.err.println("HyPeerWeb is not the correct size; should be "+final_size+" but found "+size); STOP_TESTS = true; } if (final_i % TEST_EVERY == 0){ SegmentCache cache = web.getCache(0); Validator x = new Validator(cache); try{ if (!x.validate()){ System.out.println("VALIDATION FAILED:"); System.out.println(cache); STOP_TESTS = true; } }catch (Exception e){ System.out.println("VALIDATION FAILED:"); System.out.println(cache); e.printStackTrace(); STOP_TESTS = true; } } } }); if (STOP_TESTS) fail(); } } }); if (STOP_TESTS) fail(); } } public void begin(String type) throws Exception{ curTest = type; populate(); System.out.println("BEGIN:\t"+type); } @After public void end(){ if (curTest != null){ System.out.println("END:\t"+curTest); curTest = null; } } /** * Test of addNode method */ @Test public void testAdd() throws Exception { //This is a dummy method for populate() //Don't remove this method begin("ADDING"); } /** * Test of removeNode method (from zero, every time) */ /* @Test public void testRemoveZero() throws Exception { begin("REMOVING ZERO"); Node temp; int old_size = getSize(); assert(old_size == MAX_SIZE); for (int i=1; i<=MAX_SIZE; i++){ web.removeNode(0, RemoveListener); if (getSize() != --old_size) throw new Exception("HyPeerWeb is not the correct size"); if (i % TEST_EVERY == 0) assertTrue((new Validator(web.getSegmentNodeCache(0))).validate()); } } @Test public void testRemoveRandom() throws Exception { begin("REMOVING RANDOM"); SegmentCache.Node temp, rand; int old_size = getSize(); for (int i=1; i<=MAX_SIZE; i++){ rand = getRandom(); web.removeNode(rand.getWebId(), RemoveListener); if (getSize() != --old_size) throw new Exception("HyPeerWeb is not the correct size"); if (i % TEST_EVERY == 0) assertTrue((new Validator(web.getSegmentNodeCache(0))).validate()); } } @Test public void testSendValid() throws Exception { //Test send node begin("SENDING VALID"); SegmentCache.Node f1, f2, found; for (int j=0; j<SEND_TESTS; j++){ f1 = getRandom(); do{ f2 = getRandom(); } while (f2 == f1); SendVisitor x = new SendVisitor(f1.getWebId(), SendVisitorListener); //TODO: Figure out how to get a node x.visit(f2); found = x.getFinalNode(); if (found == null){ System.out.println("f1 = " + f1); System.out.println("f2 = " + f2); } assertNotNull(found); assert(found.getWebId() == f1.getWebId()); } } @Test public void testSendInvalid() throws Exception { begin("SENDING INVALID"); Random r = new Random(); for (int i=0; i<SEND_TESTS; i++){ int bad_id = r.nextInt(); while (web.getSegmentNodeCache(0).getNode(bad_id) != null) bad_id *= 3; SendVisitor x = new SendVisitor(bad_id, SendVisitorListener); //TODO: Figure out how to get a node x.visit(web.getFirstNode()); assertNull(x.getFinalNode()); } } @Test public void testBroadcast() throws Exception { begin("TESTING BROADCAST"); for (int i=0; i<BROADCAST_TESTS; i++){ SegmentCache.Node origin = getRandom(); //System.out.println("Starting with:"+origin); ListNodesVisitor x = new ListNodesVisitor(ListNodesVisitorListener); //TODO: Figure out how to get a node x.visit(web.getNode(origin.getWebId(), GetListener)); if(x.getNodeList().size() < getSize()) { for(Node n : web.getAllSegmentNodes()) { if(!x.getNodeList().contains(n)){ System.out.println("Missing: " + n); } } } assertTrue(x.getNodeList().size() == getSize()); for(SegmentCache.Node n : x.getNodeList()) { //TODO: Figure out how to get a node assertTrue(web.getNode(n.getWebId()) != null); } Set<NodeCache.Node> set = new HashSet<>(x.getNodeList()); assertTrue(set.size() == x.getNodeList().size()); } } */ }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f8c92bd85e7d1b6f3b8a828c1630e398fba9a2d1
f5049214ff99cdd7c37da74619b60ac4a26fc6ba
/runtime/jsf/eu.agno3.runtime.jsf/src/main/java/eu/agno3/runtime/jsf/components/selectoradd/SelectOrAdd.java
e05b9827b073565cf36fa89eb1bf5fc3832302a4
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
AgNO3/code
d17313709ee5db1eac38e5811244cecfdfc23f93
b40a4559a10b3e84840994c3fd15d5f53b89168f
refs/heads/main
2023-07-28T17:27:53.045940
2021-09-17T14:25:01
2021-09-17T14:31:41
407,567,058
0
2
null
null
null
null
UTF-8
Java
false
false
3,262
java
/** * © 2013 AgNO3 Gmbh & Co. KG * All right reserved. * * Created: 12.12.2013 by mbechler */ package eu.agno3.runtime.jsf.components.selectoradd; import javax.el.ValueExpression; import javax.faces.component.NamingContainer; import javax.faces.component.UIComponent; import javax.faces.component.UIInput; import javax.faces.component.UINamingContainer; import javax.faces.component.UISelectOne; import javax.faces.context.FacesContext; import org.apache.log4j.Logger; import org.primefaces.event.SelectEvent; /** * @author mbechler * */ public class SelectOrAdd extends UIInput implements NamingContainer { private static final Logger log = Logger.getLogger(SelectOrAdd.class); private UIComponent selectComponent; /** * Set select value * * @param ev */ public void setSelectedValue ( SelectEvent ev ) { if ( log.isDebugEnabled() ) { log.debug("Set value " + ev); //$NON-NLS-1$ } this.setValue(ev.getObject()); UISelectOne inputField = (UISelectOne) this.getSelectComponent(); inputField.resetValue(); } /** * Evaluate itemLabel from outer component * * @return the itemLabel */ public String proxySelectLabel () { ValueExpression e = this.getValueExpression("itemLabel"); //$NON-NLS-1$ if ( e == null ) { return null; } return (String) e.getValue(FacesContext.getCurrentInstance().getELContext()); } /** * Evaluate itemValue from outer component * * @return the itemValue */ public Object proxySelectValue () { ValueExpression e = this.getValueExpression("itemValue"); //$NON-NLS-1$ if ( e == null ) { return null; } return e.getValue(FacesContext.getCurrentInstance().getELContext()); } /** * @return the autoComplete component */ public UIComponent getSelectComponent () { return this.selectComponent; } /** * @param selectComponent * the select one menu component to set */ public void setSelectComponent ( UIComponent selectComponent ) { this.selectComponent = selectComponent; } /** * {@inheritDoc} * * @see javax.faces.component.UIInput#getFamily() */ @Override public String getFamily () { return UINamingContainer.COMPONENT_FAMILY; } /** * {@inheritDoc} * * @see javax.faces.component.UIInput#processValidators(javax.faces.context.FacesContext) */ @Override public void processValidators ( FacesContext context ) { this.pushComponentToEL(context, this); try { super.processValidators(context); } finally { this.popComponentFromEL(context); } } /** * {@inheritDoc} * * @see javax.faces.component.UIInput#processUpdates(javax.faces.context.FacesContext) */ @Override public void processUpdates ( FacesContext context ) { this.pushComponentToEL(context, this); try { super.processUpdates(context); } finally { this.popComponentFromEL(context); } } }
[ "bechler@agno3.eu" ]
bechler@agno3.eu
51c7963b0e732f23e9ae2f15444a25dc571f2241
cde4358da2cbef4d8ca7caeb4b90939ca3f1f1ef
/java/timebase/test/src/test/java/deltix/qsrv/hf/tickdb/Test_FixCorruptedPDStream.java
7f57ae52cdee50c82d3024056ccf682ce6a1d4e4
[ "Apache-2.0" ]
permissive
ptuyo/TimeBase
e17a33e0bfedcbbafd3618189e4de45416ec7259
812e178b814a604740da3c15cc64e42c57d69036
refs/heads/master
2022-12-18T19:41:46.084759
2020-09-29T11:03:50
2020-09-29T11:03:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,909
java
package deltix.qsrv.hf.tickdb; import deltix.qsrv.hf.pub.RawMessage; import deltix.qsrv.hf.tickdb.comm.server.TomcatServer; import deltix.timebase.api.messages.TradeMessage; import deltix.qsrv.hf.tickdb.pub.*; import deltix.util.io.Home; import deltix.util.io.IOUtil; import deltix.util.text.SimpleStringCodec; import deltix.util.vfs.ZipFileSystem; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import java.io.File; import java.io.FileInputStream; import java.util.ArrayList; import java.util.List; import org.junit.experimental.categories.Category; import deltix.util.JUnitCategories.TickDBFast; @Category(TickDBFast.class) public class Test_FixCorruptedPDStream { private static String TB_LOCATION_GEN = Home.getPath("temp/PDStreamCorruptedGen/timebase"); private static String TB_LOCATION = Home.getPath("temp/PDStreamCorrupted/timebase"); private static String CORRUPTED_STREAMS_ZIP = Home.getPath("testdata/tickdb/tb5streams/corrupted"); private static final String STREAM_NAME = "testdata"; private static final int NUM_MESSAGES = 13000; @BeforeClass public static void start() throws Throwable { } @AfterClass public static void end() throws Exception { } public void testPDStreamGenerate() throws Throwable { IOUtil.removeRecursive(new File(TB_LOCATION_GEN)); TDBRunner runner = new TDBRunner(false, true, TB_LOCATION_GEN, new TomcatServer()); runner.startup(); DXTickDB db = runner.getTickDb(); StreamOptions options = new StreamOptions(StreamScope.DURABLE, STREAM_NAME, STREAM_NAME, 0); options.setFixedType(StreamConfigurationHelper.mkUniversalTradeMessageDescriptor()); options.location = ""; DXTickStream stream = db.createStream(STREAM_NAME, options); TickLoader loader = stream.createLoader(new LoadingOptions(false)); TradeMessage msg = new TradeMessage(); msg.setSymbol("AAA"); msg.setTimeStampMs(1000); for (int i = 0; i < NUM_MESSAGES; ++i) { msg.setTimeStampMs(msg.getTimeStampMs() + 1); loader.send(msg); } loader.close(); runner.shutdown(); } @Test public void testPDStreamRestoreCorrupted() throws Throwable { File tbLocationDir = new File(TB_LOCATION); IOUtil.removeRecursive(tbLocationDir); tbLocationDir.mkdirs(); File[] streamZipFiles = new File(CORRUPTED_STREAMS_ZIP).listFiles(); String[] streamKeys = new String[streamZipFiles.length]; for (int i = 0; i < streamZipFiles.length; ++i) { File zipFile = streamZipFiles[i]; ZipFileSystem.unzip(new FileInputStream(zipFile), tbLocationDir); String name = zipFile.getName(); streamKeys[i] = name.substring(0, name.lastIndexOf(".zip")); //streamKeys[i] = SimpleStringCodec.DEFAULT_INSTANCE.decode(name); } TDBRunner runner = new TDBRunner(false, false, TB_LOCATION, new TomcatServer()); runner.startup(); DXTickDB db = runner.getTickDb(); List<DXTickStream> streams = new ArrayList<DXTickStream>(); for (String streamKey : streamKeys) { DXTickStream stream = db.getStream(streamKey); if (stream == null) stream = db.getStream(SimpleStringCodec.DEFAULT_INSTANCE.decode(streamKey)); streams.add(stream); TickCursor cursor = stream.select(Long.MIN_VALUE, new SelectionOptions(true, false)); int msgCount = 0; while (cursor.next()) { RawMessage msg = (RawMessage) cursor.getMessage(); ++msgCount; } System.out.println("Read " + streamKey + " stream: " + msgCount + " messages"); } runner.shutdown(); } }
[ "akarpovich@deltixlab.com" ]
akarpovich@deltixlab.com
0921e34b3b1af7c9521414c3b510ab450679fae7
9d32980f5989cd4c55cea498af5d6a413e08b7a2
/A92s_10_0_0/src/main/java/com/android/server/power/ColorPowerManagerRegistryHelper.java
b0d161a0e647189fd9b7e1bc76ec392ffb4a020e
[]
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
337
java
package com.android.server.power; import android.content.Context; public final class ColorPowerManagerRegistryHelper extends ColorPowerManagerCommonHelper { public ColorPowerManagerRegistryHelper(Context context, PowerManagerService pms) { super(context, pms); } public void registerColorCustomManager() { } }
[ "dstmath@163.com" ]
dstmath@163.com
cb19090af18d72515aff5313da9266f93be46392
f6beb7535dd2843dece84854c4cd354f782987d2
/payments/src/main/java/pl/wipek/payments/transfers/factory/TransferContainerFactory.java
dc48fe350313616a52687bb4cdac8c973bb38313
[]
no_license
WiPeK/JavaEE-Bank
b86f85e1e93371d8f9aa292746f0cec6bcc82378
5446e1c0fc87b7d4ef28e89bd3c5542de62ecaa7
refs/heads/master
2021-09-05T14:36:55.765139
2018-01-28T12:58:47
2018-01-28T12:58:47
110,385,594
0
2
null
null
null
null
UTF-8
Java
false
false
2,068
java
package pl.wipek.payments.transfers.factory; import pl.wipek.payments.transfers.composite.TransferContainer; import pl.wipek.payments.transfers.requests.TransferRequest; import pl.wipek.payments.transfers.strategy.TransferStrategy; import pl.wipek.shared.domain.entity.Beneficiary; import java.util.ArrayList; import java.util.List; public class TransferContainerFactory { public static TransferContainer createTransferContainer(TransferRequest transferRequest, TransferStrategy transferStrategy) { return checkIsTransfersPackage(transferRequest) ? createPackage(transferRequest, transferStrategy) : createOneTransfer(transferRequest, transferStrategy); } private static boolean checkIsTransfersPackage(TransferRequest transferRequest) { return transferRequest.getBeneficiary().size() > 1; } private static TransferContainer createOneTransfer(TransferRequest transferRequest, TransferStrategy transferStrategy) { return transferStrategy.createTransferContainer(transferRequest); } private static TransferContainer createPackage(TransferRequest transferRequest, TransferStrategy transferStrategy) { TransferContainer transferContainer = transferStrategy.createTransferPackage(); Beneficiary[] beneficiaries = transferRequest.getBeneficiary().toArray(new Beneficiary[0]); TransferRequest[] transferRequests = new TransferRequest[beneficiaries.length]; for (int i = 0; i < beneficiaries.length; i++) { transferRequests[i] = copyTransferRequest(transferRequest, beneficiaries[i]); transferContainer.add(createOneTransfer(transferRequests[i], transferStrategy)); } return transferContainer; } private static TransferRequest copyTransferRequest(TransferRequest transferRequest, Beneficiary beneficiary) { List<Beneficiary> beneficiaries = new ArrayList<>(); beneficiaries.add(beneficiary); transferRequest.setBeneficiary(beneficiaries); return transferRequest; } }
[ "wipekxxx@gmail.com" ]
wipekxxx@gmail.com
6075199d97fcbac71b6108b38289b9c051645384
d9eee40a76aecafde448db9f380e28e835f197c8
/src/com/smart/server/pushplat/common/Pushdbmodel.java
429a95245b621ee8ad18e01f4004ddc697acb13a
[]
no_license
liveqmock/SmartServer
94d1b1dc5b21e2b334298db93b40125250b15b82
914f34191cd827ffbabbabccfef828e488a1ae96
refs/heads/master
2021-01-21T16:54:21.468977
2013-10-28T13:21:05
2013-10-28T13:21:05
null
0
0
null
null
null
null
GB18030
Java
false
false
1,393
java
package com.smart.server.pushplat.common; import java.util.Vector; import com.smart.platform.gui.control.DBColumnDisplayInfo; import com.smart.platform.gui.control.DBTableModel; public class Pushdbmodel extends DBTableModel{ public Pushdbmodel() { super(createCols()); } public static Vector<DBColumnDisplayInfo> createCols(){ Vector<DBColumnDisplayInfo> cols=new Vector<DBColumnDisplayInfo>(); DBColumnDisplayInfo col; col=new DBColumnDisplayInfo("行号","行号","行号"); cols.add(col); col=new DBColumnDisplayInfo("pushid","number","推送ID"); cols.add(col); col=new DBColumnDisplayInfo("pushname","varchar","推送名称"); cols.add(col); col=new DBColumnDisplayInfo("groupname","varchar","分组名"); cols.add(col); col=new DBColumnDisplayInfo("level","number","级别"); col.setEditcomptype(DBColumnDisplayInfo.EDITCOMP_COMBOBOX); col.addComboxBoxItem("1", "非常紧急"); col.addComboxBoxItem("2", "紧急"); col.addComboxBoxItem("3", "普通"); cols.add(col); col=new DBColumnDisplayInfo("callopid","number","调用功能ID"); cols.add(col); col=new DBColumnDisplayInfo("callopname","varchar","调用功能"); cols.add(col); col=new DBColumnDisplayInfo("wheres","varchar","调用where条件"); cols.add(col); col=new DBColumnDisplayInfo("otherwheres","varchar","授权where条件"); cols.add(col); return cols; } }
[ "jsetter2046@gmail.com" ]
jsetter2046@gmail.com
9f8f87528e0949f475c789de86145f17c6465085
0981333953bdbf488421f094bd584efd0c789902
/SillyChildClient/app/src/main/java/com/sillykid/app/homepage/privatecustom/cityselect/search/CitySearchListPresenter.java
d47afff5a40d9ecb282d135c6e23b160f326e82a
[ "Apache-2.0" ]
permissive
921668753/SillyChildClient2-Android
ff7f0d9a97be64e610ecad304903bc853cbb3db0
f8f8ea3cca9013d39c9d7164bd2bd9573528093d
refs/heads/master
2020-03-23T09:18:15.433017
2018-12-04T13:46:33
2018-12-04T13:46:33
141,379,323
1
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package com.sillykid.app.homepage.privatecustom.cityselect.search; import com.common.cklibrary.common.KJActivityStack; import com.common.cklibrary.utils.httputil.HttpUtilParams; import com.common.cklibrary.utils.httputil.ResponseListener; import com.kymjs.rxvolley.client.HttpParams; import com.sillykid.app.retrofit.RequestClient; /** * Created by ruitu on 2018/9/24. */ public class CitySearchListPresenter implements CitySearchListContract.Presenter { private CitySearchListContract.View mView; public CitySearchListPresenter(CitySearchListContract.View view) { mView = view; mView.setPresenter(this); } @Override public void getCityByName(String name) { HttpParams httpParams = HttpUtilParams.getInstance().getHttpParams(); httpParams.put("name", name); RequestClient.getCityByName(KJActivityStack.create().topActivity(), httpParams, new ResponseListener<String>() { @Override public void onSuccess(String response) { mView.getSuccess(response, 0); } @Override public void onFailure(String msg) { mView.errorMsg(msg, 0); } }); } }
[ "921668753@qq.com" ]
921668753@qq.com
15e9d5bf0edbd74e8ab340b556f587f22638a519
72e1e90dd8e1e43bad4a6ba46a44d1f30aa76fe6
/java/jee/Jee_7_essentials/base/src/main/java/br/com/fernando/chapter05_soapBasedws/part05_dispatchBasedDynamicClient/DispatchBasedDynamicClient.java
c715d9ebeb17eeb45dacd07d9dde8f73f415314e
[ "Apache-2.0" ]
permissive
fernando-romulo-silva/myStudies
bfdf9f02778d2f4993999f0ffc0ddd0066ec41b4
aa8867cda5edd54348f59583555b1f8fff3cd6b3
refs/heads/master
2023-08-16T17:18:50.665674
2023-08-09T19:47:15
2023-08-09T19:47:15
230,160,136
3
0
Apache-2.0
2023-02-08T19:49:02
2019-12-25T22:27:59
null
UTF-8
Java
false
false
3,837
java
package br.com.fernando.chapter05_soapBasedws.part05_dispatchBasedDynamicClient; import static br.com.fernando.Util2.sourceToXMLString; import java.io.StringReader; import java.net.URL; import java.util.concurrent.Future; import javax.xml.namespace.QName; import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; import javax.xml.ws.AsyncHandler; import javax.xml.ws.Dispatch; import javax.xml.ws.Endpoint; import javax.xml.ws.Response; import javax.xml.ws.Service; public class DispatchBasedDynamicClient { // https://examples.javacodegeeks.com/enterprise-java/jws/jax-ws-dynamic-proxy-client-example/ public static void main(String[] args) throws Exception { // ---------------------------------------------------------------------------------------- // Server final Endpoint endpoint = Endpoint.publish("http://localhost:8080/example/NewSimpleWebService", new SimpleWebService()); // A Dispatch-based endpoint provides a dynamic alternative to the generated proxybased client. // Instead of just the mapped Java types, the complete protocol message or protocol message payload is prepared by way of XML APIs. // ----------------------------------------------------------------------------------------- // Client // // We create a Service by specifying the fully qualified QName, a port is created from the service, a Dispatch<Source> is created, // and the web service endpoint is invoked. final Service service = Service.create( // new URL("http://localhost:8080/example/NewSimpleWebService?wsdl"), // new QName("http://newdifferentwebservice.com.br", "NewDifferentWebService") // ); final String name = "Joao"; final String request = "<ns1:sayHello xmlns:ns1=\"http://newdifferentwebservice.com.br\"><arg0>" + name + "</arg0></ns1:sayHello>"; // The client can be implemented via Dispatch<Source>, Dispatch<SOAPMessage>, Dispatch<DataSource>, or Dispatch<JAXB Object>: final Dispatch<Source> dispatcher = service.createDispatch(new QName("http://newdifferentwebservice.com.br", "NewDifferentPort"), Source.class, Service.Mode.PAYLOAD); /******************* Username & Password ******************************/ dispatcher.getRequestContext().put(Dispatch.USERNAME_PROPERTY, "wsUser"); dispatcher.getRequestContext().put(Dispatch.PASSWORD_PROPERTY, "wsPassword"); /**********************************************************************/ // The business method invoked on the service endpoint is dispatched based upon the received SOAP message. final Source result01 = dispatcher.invoke(new StreamSource(new StringReader(request))); System.out.println("Received xml response: " + sourceToXMLString(result01)); // A new class, MyAsyncHandler, registers a callback class that receives control when the response is received from the endpoint. class MyAsyncHandler implements AsyncHandler<Source> { @Override public void handleResponse(final Response<Source> res) { System.out.println("It's done? " + res.isDone()); } } // A Dispatch client can also be invoked asynchronously Future<?> response = dispatcher.invokeAsync(new StreamSource(new StringReader(request)), new MyAsyncHandler()); // The response can be used to check if the web service invocation has completed, wait for its completion, or retrieve the result. The // handleResponse method of the callback is used to process the response received. final Object object = response.get(); System.out.println("Received xml async response: " + sourceToXMLString((Source) object)); // A one-way request using a Dispatch-based client may be made: dispatcher.invokeOneWay(new StreamSource(new StringReader(request))); // ---------------------------------------------------------------------------------------- // Stop server endpoint.stop(); } }
[ "fernando.romulo.silva@gmail.com" ]
fernando.romulo.silva@gmail.com
0a2abbd1b8343e68ad69f2572fd099600e5a08a2
33de98aeb1bb63dedff40bd707e1ed917048ec06
/spring-core/src/test/java/org/springframework/core/env/JOptCommandLinePropertySourceTests.java
680f0c10d4e1e5d5f93377cb438b36744fbb322b
[ "Apache-2.0" ]
permissive
Wan123ab/spring-framework-master
519fcc32ca7f72e91774729d15e9eb7f818af893
7866ed116e29b131eb3f7414d6c6c3258c0aedd0
refs/heads/master
2021-06-26T02:08:35.117922
2020-12-07T08:01:14
2020-12-07T08:01:14
185,965,422
0
0
null
null
null
null
UTF-8
Java
false
false
6,308
java
/* * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.core.env; import java.util.Arrays; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.junit.Test; import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.*; /** * Unit tests for {@link JOptCommandLinePropertySource}. * * @author Chris Beams * @since 3.1 */ public class JOptCommandLinePropertySourceTests { @Test public void withRequiredArg_andArgIsPresent() { OptionParser parser = new OptionParser(); parser.accepts("foo").withRequiredArg(); OptionSet options = parser.parse("--foo=bar"); PropertySource<?> ps = new JOptCommandLinePropertySource(options); assertThat((String)ps.getProperty("foo"), equalTo("bar")); } @Test public void withOptionalArg_andArgIsMissing() { OptionParser parser = new OptionParser(); parser.accepts("foo").withOptionalArg(); OptionSet options = parser.parse("--foo"); PropertySource<?> ps = new JOptCommandLinePropertySource(options); assertThat(ps.containsProperty("foo"), is(true)); assertThat((String)ps.getProperty("foo"), equalTo("")); } @Test public void withNoArg() { OptionParser parser = new OptionParser(); parser.accepts("o1"); parser.accepts("o2"); OptionSet options = parser.parse("--o1"); PropertySource<?> ps = new JOptCommandLinePropertySource(options); assertThat(ps.containsProperty("o1"), is(true)); assertThat(ps.containsProperty("o2"), is(false)); assertThat((String)ps.getProperty("o1"), equalTo("")); assertThat(ps.getProperty("o2"), nullValue()); } @Test public void withRequiredArg_andMultipleArgsPresent_usingDelimiter() { OptionParser parser = new OptionParser(); parser.accepts("foo").withRequiredArg().withValuesSeparatedBy(','); OptionSet options = parser.parse("--foo=bar,baz,biz"); CommandLinePropertySource<?> ps = new JOptCommandLinePropertySource(options); assertEquals(Arrays.asList("bar","baz","biz"), ps.getOptionValues("foo")); assertThat(ps.getProperty("foo"), equalTo("bar,baz,biz")); } @Test public void withRequiredArg_andMultipleArgsPresent_usingRepeatedOption() { OptionParser parser = new OptionParser(); parser.accepts("foo").withRequiredArg().withValuesSeparatedBy(','); OptionSet options = parser.parse("--foo=bar", "--foo=baz", "--foo=biz"); CommandLinePropertySource<?> ps = new JOptCommandLinePropertySource(options); assertEquals(Arrays.asList("bar","baz","biz"), ps.getOptionValues("foo")); assertThat(ps.getProperty("foo"), equalTo("bar,baz,biz")); } @Test public void withMissingOption() { OptionParser parser = new OptionParser(); parser.accepts("foo").withRequiredArg().withValuesSeparatedBy(','); OptionSet options = parser.parse(); // <-- no options whatsoever PropertySource<?> ps = new JOptCommandLinePropertySource(options); assertThat(ps.getProperty("foo"), nullValue()); } @Test public void withDottedOptionName() { OptionParser parser = new OptionParser(); parser.accepts("spring.profiles.active").withRequiredArg(); OptionSet options = parser.parse("--spring.profiles.active=p1"); CommandLinePropertySource<?> ps = new JOptCommandLinePropertySource(options); assertThat(ps.getProperty("spring.profiles.active"), equalTo("p1")); } @Test public void withDefaultNonOptionArgsNameAndNoNonOptionArgsPresent() { OptionParser parser = new OptionParser(); parser.acceptsAll(Arrays.asList("o1","option1")).withRequiredArg(); parser.accepts("o2"); OptionSet optionSet = parser.parse("--o1=v1", "--o2"); EnumerablePropertySource<?> ps = new JOptCommandLinePropertySource(optionSet); assertThat(ps.containsProperty("nonOptionArgs"), is(false)); assertThat(ps.containsProperty("o1"), is(true)); assertThat(ps.containsProperty("o2"), is(true)); assertThat(ps.containsProperty("nonOptionArgs"), is(false)); assertThat(ps.getProperty("nonOptionArgs"), nullValue()); assertThat(ps.getPropertyNames().length, is(2)); } @Test public void withDefaultNonOptionArgsNameAndNonOptionArgsPresent() { OptionParser parser = new OptionParser(); parser.accepts("o1").withRequiredArg(); parser.accepts("o2"); OptionSet optionSet = parser.parse("--o1=v1", "noa1", "--o2", "noa2"); PropertySource<?> ps = new JOptCommandLinePropertySource(optionSet); assertThat(ps.containsProperty("nonOptionArgs"), is(true)); assertThat(ps.containsProperty("o1"), is(true)); assertThat(ps.containsProperty("o2"), is(true)); String nonOptionArgs = (String)ps.getProperty("nonOptionArgs"); assertThat(nonOptionArgs, equalTo("noa1,noa2")); } @Test public void withCustomNonOptionArgsNameAndNoNonOptionArgsPresent() { OptionParser parser = new OptionParser(); parser.accepts("o1").withRequiredArg(); parser.accepts("o2"); OptionSet optionSet = parser.parse("--o1=v1", "noa1", "--o2", "noa2"); CommandLinePropertySource<?> ps = new JOptCommandLinePropertySource(optionSet); ps.setNonOptionArgsPropertyName("NOA"); assertThat(ps.containsProperty("nonOptionArgs"), is(false)); assertThat(ps.containsProperty("NOA"), is(true)); assertThat(ps.containsProperty("o1"), is(true)); assertThat(ps.containsProperty("o2"), is(true)); String nonOptionArgs = ps.getProperty("NOA"); assertThat(nonOptionArgs, equalTo("noa1,noa2")); } @Test public void withRequiredArg_ofTypeEnum() { OptionParser parser = new OptionParser(); parser.accepts("o1").withRequiredArg().ofType(OptionEnum.class); OptionSet options = parser.parse("--o1=VAL_1"); PropertySource<?> ps = new JOptCommandLinePropertySource(options); assertThat(ps.getProperty("o1"), equalTo("VAL_1")); } public static enum OptionEnum { VAL_1; } }
[ "853280347@qq.com" ]
853280347@qq.com
df8a7991a7bca3f118320c8128cfcd5b22e75f66
33190dbf5b7a5e19337bad0f766304f8e0b96bcb
/src/main/java/com/synycs/service/mapper/EntityMapper.java
fa7d6e3716243e9cf4c0fcb1638f5c3669a8b885
[]
no_license
nagabharat/testrepo
8a1817b4c14fcba207b5ed940bddc1b1df3ce7e6
6c2b0b0b3cbe53e16bba9d05d6606c6f2b5071a9
refs/heads/master
2021-08-30T06:57:31.073882
2017-12-16T15:23:43
2017-12-16T15:23:43
114,447,342
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
package com.synycs.service.mapper; import java.util.List; /** * Contract for a generic dto to entity mapper. * * @param <D> - DTO type parameter. * @param <E> - Entity type parameter. */ public interface EntityMapper <D, E> { public E toEntity(D dto); public D toDto(E entity); public List <E> toEntity(List<D> dtoList); public List <D> toDto(List<E> entityList); }
[ "you@example.com" ]
you@example.com
9fe354b5c7f3c9d66ddfc0fb342f26fd165abe8a
15ea3a4e9716a85bc80be0ce6dcda2341aad8549
/Spring/day06-spring-security-properties-override/spring-security-database/src/main/java/com/app/config/AppConfig.java
ccf2bd066f7eb1ca9d049ce07bad16768265a27b
[]
no_license
softwareengineerhub/examples2020
a0fdc71f147852a5aa5d07fc9fd19e201bbcd377
0f1f08673b67ff6074abe552bdd85ed52bade58b
refs/heads/master
2023-01-28T04:14:29.140556
2020-11-30T09:32:46
2020-11-30T09:32:46
293,599,357
0
1
null
2020-09-30T14:24:16
2020-09-07T18:09:26
Java
UTF-8
Java
false
false
2,169
java
package com.app.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.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.crypto.password.NoOpPasswordEncoder; import javax.sql.DataSource; @Configuration public class AppConfig extends WebSecurityConfigurerAdapter { @Autowired private DataSource dataSource; @SuppressWarnings("deprecation") @Bean public static NoOpPasswordEncoder passwordEncoder() { return (NoOpPasswordEncoder) NoOpPasswordEncoder.getInstance(); } @Override public void configure(WebSecurity web) throws Exception { web.ignoring().antMatchers("/api/open"); //web.ignoring().antMatchers("/api2/open"); } @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication() .usersByUsernameQuery("SELECT username, password, active FROM user_role where username=?") .authoritiesByUsernameQuery("SELECT username, role FROM user_role where username=?") .dataSource(dataSource); } @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .antMatchers("/api/all").permitAll() .antMatchers("/api/admin").hasAuthority("ADMIN".toLowerCase()) .antMatchers("/api/user").hasAuthority("USER".toLowerCase()) .antMatchers("/api/user-admin").hasAnyAuthority("USER".toLowerCase(), "ADMIN".toLowerCase()) .anyRequest() .authenticated().and().csrf().disable().httpBasic(); // .authenticated().and().csrf().disable().formLogin(); } }
[ "denis.prokopiuk@yahoo.com" ]
denis.prokopiuk@yahoo.com
ffeef363e081b373973bad429a7524e7ade0e083
26c90fa0cf157ffe2ea580012fa1371a7b9f5787
/docs/maps/java/ic_local_printshop.java
38357aaaf91e1ba8fbe7410af143c14567c1f4d8
[ "Apache-2.0" ]
permissive
ThePreviousOne/SVG-Android
a666e8b2298729d13a72530dee2f1f598dbd86f9
7be929196d23c547034400c7eb8ed937ba9dba4f
refs/heads/master
2020-03-28T08:38:51.300003
2018-09-09T01:07:44
2018-09-09T05:08:15
147,979,009
0
0
Apache-2.0
2018-09-09T00:03:26
2018-09-09T00:03:26
null
UTF-8
Java
false
false
2,768
java
package com.github.megatronking.svg.iconlibs; import android.content.Context; import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.Paint; import com.github.megatronking.svg.support.SVGRenderer; /** * AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * SVG-Generator. It should not be modified by hand. */ public class ic_local_printshop extends SVGRenderer { public ic_local_printshop(Context context) { super(context); mAlpha = 1.0f; mWidth = dip2px(24.0f); mHeight = dip2px(24.0f); } @Override public void render(Canvas canvas, int w, int h, ColorFilter filter) { final float scaleX = w / 24.0f; final float scaleY = h / 24.0f; mPath.reset(); mRenderPath.reset(); mFinalPathMatrix.setValues(new float[]{1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}); mFinalPathMatrix.postScale(scaleX, scaleY); mPath.moveTo(19.0f, 8.0f); mPath.lineTo(5.0f, 8.0f); mPath.rCubicTo(-1.66f, 0.0f, -3.0f, 1.34f, -3.0f, 3.0f); mPath.rLineTo(0f, 6.0f); mPath.rLineTo(4.0f, 0f); mPath.rLineTo(0f, 4.0f); mPath.rLineTo(12.0f, 0f); mPath.rLineTo(0f, -4.0f); mPath.rLineTo(4.0f, 0f); mPath.rLineTo(0f, -6.0f); mPath.rCubicTo(0.0f, -1.66f, -1.34f, -3.0f, -3.0f, -3.0f); mPath.close(); mPath.moveTo(19.0f, 8.0f); mPath.rMoveTo(-3.0f, 11.0f); mPath.lineTo(8.0f, 19.0f); mPath.rLineTo(0f, -5.0f); mPath.rLineTo(8.0f, 0f); mPath.rLineTo(0f, 5.0f); mPath.close(); mPath.moveTo(16.0f, 19.0f); mPath.rMoveTo(3.0f, -7.0f); mPath.rCubicTo(-0.55f, 0.0f, -1.0f, -0.45f, -1.0f, -1.0f); mPath.rCubicTo(0.0f, -0.5500002f, 0.45f, -1.0f, 1.0f, -1.0f); mPath.rCubicTo(0.54999924f, 0.0f, 1.0f, 0.45f, 1.0f, 1.0f); mPath.rCubicTo(0.0f, 0.5500002f, -0.45f, 1.0f, -1.0f, 1.0f); mPath.close(); mPath.moveTo(19.0f, 12.0f); mPath.rMoveTo(-1.0f, -9.0f); mPath.lineTo(6.0f, 3.0f); mPath.rLineTo(0f, 4.0f); mPath.rLineTo(12.0f, 0f); mPath.lineTo(18.0f, 3.0f); mPath.close(); mPath.moveTo(18.0f, 3.0f); mRenderPath.addPath(mPath, mFinalPathMatrix); if (mFillPaint == null) { mFillPaint = new Paint(); mFillPaint.setStyle(Paint.Style.FILL); mFillPaint.setAntiAlias(true); } mFillPaint.setColor(applyAlpha(-16777216, 1.0f)); mFillPaint.setColorFilter(filter); canvas.drawPath(mRenderPath, mFillPaint); } }
[ "jgy08954@ly.com" ]
jgy08954@ly.com
6ae54e837a0a7926e123519ec00ac7fd77cf3426
be609a4c07073521cd84c09ef242690cf45a583d
/schedule-console/src/main/java/com/asiainfo/monitor/exeframe/configmgr/abo/impl/AIMonHostConMode.java
b2e088b45b896ee99835ed8acf5b8ea06f8f57cb
[ "Apache-2.0" ]
permissive
zhengpeng2006/aischedule
23d852ae656f0674684fec39c393c7b1f67af931
5ff3138b8efb6f7c6f365dcdf34fc3d40400877b
refs/heads/master
2020-04-23T01:32:47.970514
2019-01-10T08:45:45
2019-01-10T08:45:45
170,816,132
0
1
Apache-2.0
2019-02-15T06:52:34
2019-02-15T06:52:32
null
UTF-8
Java
false
false
3,004
java
package com.asiainfo.monitor.exeframe.configmgr.abo.impl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.ailk.appengine.complex.abo.impl.AbstractABO; import com.ailk.appengine.util.DataBeanUtils; import com.asiainfo.monitor.exeframe.configmgr.abo.interfaces.IAIMonHostConMode; import com.asiainfo.monitor.exeframe.configmgr.abo.vo.interfaces.IAIMonHostConModeValue; public class AIMonHostConMode extends AbstractABO implements IAIMonHostConMode { private transient static Log log = LogFactory.getLog(AIMonHostConMode.class); private long con_id = 0; private long host_id = 0; private long relation_id = 0; private AIMonHostConMode(String id) { super(); this.relation_id = Long.parseLong(id); this.setComponent("asiainfo/monitor/exeframe/configmgr/AIMonHostConMode.cmpt"); } public IAIMonHostConModeValue getIAIMonHostConModeValue() throws Exception { return (IAIMonHostConModeValue) DataBeanUtils.getVoByAboAndCopy(this, true); } public void setCon_id(long con_id) { this.con_id = con_id; } public long getCon_id() { return this.con_id; } public void setHost_id(long host_id) { this.host_id = host_id; } public long getHost_id() { return this.host_id; } public void setRelation_id(long relation_id) { this.relation_id = relation_id; this.setKey(String.valueOf(relation_id)); } public long getRelation_id() { return this.relation_id; } public void save() throws Exception { synchronized(this) { if(this.isReqPersistence()) return; this.setReqPersistence(true); if(this.isCorrelationConsole()) { } } } public void executeLazyMethod() { } public void preload() throws Exception { } private String con_type = null; private short con_port = (short) 0; private String state = null; private java.sql.Timestamp create_date = null; private String remark = null; public void setCon_type(String con_type) { this.con_type = con_type; } public String getCon_type() { return this.con_type; } public void setCon_port(short con_port) { this.con_port = con_port; } public short getCon_port() { return this.con_port; } public void setState(String state) { this.state = state; } public String getState() { return this.state; } public void setCreate_date(java.sql.Timestamp create_date) { this.create_date = create_date; } public java.sql.Timestamp getCreate_date() { return this.create_date; } public void setRemark(String remark) { this.remark = remark; } public String getRemark() { return this.remark; } }
[ "wangfeng3@asiainfo.com" ]
wangfeng3@asiainfo.com
ceacc3011ab6ba7ac24f497c70ac80bfd054df1b
99a8722d0d16e123b69e345df7aadad409649f6c
/jpa/deferred/src/main/java/example/repo/Customer850Repository.java
0dd88b2076e35f4af07f701d53c9dfdf1712449e
[ "Apache-2.0" ]
permissive
spring-projects/spring-data-examples
9c69a0e9f3e2e73c4533dbbab00deae77b2aacd7
c4d1ca270fcf32a93c2a5e9d7e91a5592b7720ff
refs/heads/main
2023-09-01T14:17:56.622729
2023-08-22T16:51:10
2023-08-24T19:48:04
16,381,571
5,331
3,985
Apache-2.0
2023-08-25T09:02:19
2014-01-30T15:42:43
Java
UTF-8
Java
false
false
280
java
package example.repo; import example.model.Customer850; import java.util.List; import org.springframework.data.repository.CrudRepository; public interface Customer850Repository extends CrudRepository<Customer850, Long> { List<Customer850> findByLastName(String lastName); }
[ "ogierke@pivotal.io" ]
ogierke@pivotal.io
6239218f1ee35972a5b3b3a2e6e37d011210a03c
012e9bd5bfbc5ceca4e36af55a7ddf4fce98b403
/code/app/src/main/java/com/yzb/card/king/ui/my/activity/TimeTableActivity.java
bfa3dab2e700e1100110f4c4ed98ca5f7dc1208f
[]
no_license
litliang/ms
a7152567c2f0e4d663efdda39503642edd33b4b6
d7483bc76d43e060906c47acc1bc2c3179838249
refs/heads/master
2021-09-01T23:51:50.934321
2017-12-29T07:30:49
2017-12-29T07:30:49
115,697,248
1
0
null
null
null
null
UTF-8
Java
false
false
3,082
java
package com.yzb.card.king.ui.my.activity; import android.os.Bundle; import android.widget.ListView; import com.alibaba.fastjson.JSON; import com.yzb.card.king.R; import com.yzb.card.king.bean.common.Error; import com.yzb.card.king.http.BaseCallBack; import com.yzb.card.king.http.SimpleRequest; import com.yzb.card.king.ui.base.BaseActivity; import com.yzb.card.king.ui.my.bean.ServiceTime; import com.yzb.card.king.ui.my.holder.ServiceTimeHolder; import com.yzb.card.king.ui.other.Holder; import com.yzb.card.king.ui.other.adapter.AbsBaseListAdapter; import org.xutils.view.annotation.ContentView; import org.xutils.view.annotation.ViewInject; import java.util.ArrayList; import java.util.List; /** * 描述:到账时间 * 作者:殷曙光 * 日期:2016/12/28 14:06 */ @ContentView(R.layout.activity_time_table) public class TimeTableActivity extends BaseActivity { @ViewInject(R.id.listView) private ListView listView; private AbsBaseListAdapter adapter; private List<String> dataList = new ArrayList<>(); private List<ServiceTime> timeList = new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { defaultFlag = true; super.onCreate(savedInstanceState); initData(); } private void initData() { setDefaultHeader("到账时间"); setAdapter(); loadData(); } private void loadData() { SimpleRequest<List<ServiceTime>> request = new SimpleRequest<List<ServiceTime>>("QueryBankServiceTime") { @Override protected List<ServiceTime> parseData(String data) { return JSON.parseArray(data, ServiceTime.class); } }; request.sendRequestNew(new BaseCallBack<List<ServiceTime>>() { @Override public void onSuccess(List<ServiceTime> data) { // dataList.clear(); // dataList.add("支持银行"); // dataList.add("服务时间"); // for (int i = 0; i < data.size(); i++) // { // ServiceTime time = data.get(i); // dataList.add(time.getName()); // dataList.add(" " + time.getStartTime() + "-" + time.getEndTime() + " "); // } timeList.clear(); timeList.add(new ServiceTime("支持银行","服务时间","","")); timeList.addAll(data); adapter.notifyDataSetChanged(); } @Override public void onFail(Error error) { dataList.clear(); adapter.notifyDataSetChanged(); } }); } private void setAdapter() { adapter = new AbsBaseListAdapter<ServiceTime>(timeList) { @Override protected Holder getHolder(int position) { return new ServiceTimeHolder(); } }; listView.setAdapter(adapter); } }
[ "864631546@qq.com" ]
864631546@qq.com
a144228478f0185c74ab37371522455d291c86cb
cded08c92cd17d66eaf5c412eaa4ce0f11f4c54a
/inference-framework/checker-framework/checkers/jdk/reimN/src/java/util/HashSet.java
74340cfd0babd55dbe8af2ebe3cd9d883f3236cc
[ "Apache-2.0" ]
permissive
ANter-xidian/type-inference
77aa54f5fa93abc8dfcdbc93be4654cfebaa5ad9
90d002a1e2d0a3d160ab204084da9d5be5fdd971
refs/heads/master
2020-09-27T14:53:33.530140
2019-01-22T21:26:11
2019-01-22T21:26:11
226,540,844
1
0
NOASSERTION
2019-12-07T16:12:36
2019-12-07T16:12:35
null
UTF-8
Java
false
false
1,359
java
package java.util; import checkers.inference2.reimN.quals.*; public class HashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable, java.io.Serializable { private static final long serialVersionUID = 0L; public HashSet() { throw new RuntimeException("skeleton method"); } public HashSet(@ReadRead Collection<? extends E> c) { throw new RuntimeException("skeleton method"); } public HashSet(int initialCapacity, float loadFactor) { throw new RuntimeException("skeleton method"); } public HashSet(int initialCapacity) { throw new RuntimeException("skeleton method"); } public @PolyPoly Iterator<E> iterator(@PolyPoly HashSet<E> this) { throw new RuntimeException("skeleton method"); } public int size() { throw new RuntimeException("skeleton method"); } public boolean isEmpty() { throw new RuntimeException("skeleton method"); } public boolean contains(@ReadRead HashSet<E> this, @ReadRead Object o) { throw new RuntimeException("skeleton method"); } public boolean add(E e) { throw new RuntimeException("skeleton method"); } public boolean remove(@ReadRead Object o) { throw new RuntimeException("skeleton method"); } public void clear() { throw new RuntimeException("skeleton method"); } public Object clone(@ReadRead HashSet<E> this) { throw new RuntimeException("skeleton method"); } }
[ "dongyao83@gmail.com@e039eaa7-eea3-5927-096b-721137851c37" ]
dongyao83@gmail.com@e039eaa7-eea3-5927-096b-721137851c37
3c9ad44e52280cbfb307ec01e7951d0f75175e3d
7767bee7b48be702527cfe8c69c0293691edadc0
/src/com/zstar/SMMS/BaseData/SmmsPendingEvent/action/UpdateSmmsPendingEventAction.java
795c680819ad11c871f08dcc11e787cc06ff73da
[]
no_license
WayFareY/SMMS
bcec2ac9747b8180c787274dcf175968be801e8b
22438ae0dbfd99c5d10f3a385f2aee7b0930c76e
refs/heads/master
2021-05-13T15:58:46.938505
2018-05-28T01:48:59
2018-05-28T01:48:59
115,971,485
1
0
null
null
null
null
UTF-8
Java
false
false
350
java
package com.zstar.SMMS.BaseData.SmmsPendingEvent.action; import com.zstar.fmp.core.frame.action.CommonUpdateAction; public class UpdateSmmsPendingEventAction extends CommonUpdateAction { public void afterBiz() throws Exception { super.afterBiz(); } public void beforeBiz() throws Exception { super.beforeBiz(); } }
[ "WayFareY@github.com" ]
WayFareY@github.com
0e252c81199166ada90ea9d73334ec99b06ffda7
72cbc860070a3b4e323779385f045f63b97d79af
/AndroidStudioProjects/cw-omnibus/Animation/AnimatorFadeBC/app/src/main/java/com/commonsware/android/animator/fadebc/MainActivity.java
ddfd6ab3f0b2ea116ebbc5cceca1ca218ddb2a0b
[ "Apache-2.0" ]
permissive
clintonyeb/Android-Programs
2a1430ea4d72d56b6bba11e83f9a52073637ff55
3fe0d93470b725d0fc9481ec3839eef0122ed142
refs/heads/master
2021-09-24T09:22:04.718304
2018-06-30T11:42:36
2018-06-30T11:42:36
139,242,808
1
0
null
null
null
null
UTF-8
Java
false
false
1,761
java
/*** Copyright (c) 2012 CommonsWare, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. From _The Busy Coder's Guide to Android Development_ https://commonsware.com/Android */ package com.commonsware.android.animator.fadebc; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; import static com.nineoldandroids.view.ViewPropertyAnimator.animate; public class MainActivity extends Activity implements Runnable { private static int PERIOD=2000; private TextView fadee=null; private boolean fadingOut=true; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); fadee=(TextView)findViewById(R.id.fadee); } @Override public void onResume() { super.onResume(); run(); } @Override public void onPause() { fadee.removeCallbacks(this); super.onPause(); } @Override public void run() { if (fadingOut) { animate(fadee).alpha(0).setDuration(PERIOD); fadee.setText(R.string.fading_out); } else { animate(fadee).alpha(1).setDuration(PERIOD); fadee.setText(R.string.coming_back); } fadingOut=!fadingOut; fadee.postDelayed(this, PERIOD); } }
[ "clintonyeb@gmail.com" ]
clintonyeb@gmail.com
15a2278dd0426cffb2544b584c8396f9e92d5043
7d9f2aa533eae06dc14c4adf3ed4b9f29206bebe
/src/main/java/com/nexmo/smtp/MM4_forward_REQ.java
4aa0677c77c5cb067db19efb4d50ba37474e65c7
[]
no_license
peterjurkovic/smtp
bfabb2be8d60590861c2e6ecad799d0460474d6f
00af2bdff99b6d050d21ab5ddbdcc2db42d0fbf5
refs/heads/master
2020-04-02T09:08:00.811773
2018-12-03T12:12:15
2018-12-03T12:12:15
154,277,443
0
0
null
null
null
null
UTF-8
Java
false
false
1,022
java
package com.nexmo.smtp; import org.springframework.core.io.ClassPathResource; import org.springframework.mail.javamail.MimeMessageHelper; import javax.mail.MessagingException; import javax.mail.internet.MimeMessage; public class MM4_forward_REQ extends AbstractMM4Message { @Override public MM4Type getType() { return MM4Type.MM4_FORWARD_REQ; } @Override public void prepare(MimeMessage mimeMessage) throws Exception { getType().prepare(mimeMessage); MimeMessageHelper helper = createHelper(mimeMessage); setFromTo(helper); helper.setText("body text"); helper.addAttachment("company-logo.png", new ClassPathResource("nexmo-logo.png")); printMessage(mimeMessage); } @Override protected MimeMessageHelper createHelper(MimeMessage message) throws MessagingException { return new MimeMessageHelper(message, true, "UTF-8"); } public static void main(String[] args) { new MM4_forward_REQ().submit(); } }
[ "petojurkovic@gmail.com" ]
petojurkovic@gmail.com
a2f0efc43cc7adb63be5f72ee4f8c0c4add331f9
81b1cb8a87554af156ed7b84a21d24d0e074f25b
/.svn/pristine/a2/a2f0efc43cc7adb63be5f72ee4f8c0c4add331f9.svn-base
77b6226e9e0c2622d0f8c6d723a7c9fa92884a1d
[]
no_license
sengeiou/chp-core
03e5abd12d242b04e0060372e0dcfad3ad52ccd2
bdc410a1682ba2983ed64cc8377b5e7707210819
refs/heads/master
2020-05-16T02:55:41.694666
2017-07-06T06:17:16
2017-07-06T06:17:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,592
package com.creditharmony.core.users.dto; import java.io.Serializable; import java.util.Date; /** * @Class Name threeNetUser * @author 胡体勇 * @Create In 2016年6月21日 */ public class ThreeNetUserDto implements Serializable{ /** * long serialVersionUID */ private static final long serialVersionUID = 6981929088625215087L; public String id; // 用户id public String name; // 用户姓名 public String userCode; // 用户编号 public String status; // 用户状态 public String sex; // 性别 public String leaderId; // 上级 public String mobile; // 手机号 public String email; // 邮箱 public String orgId; // 机构id public String roleType; // 角色类型 public String departmentId;// 所属部门 public String flag; // 理财经理交割标识 public String teamId; // 当前团队 public String bussnessId; // 营业部 public Date createTime; // 创建时间 public Date modifyTime; // 修改时间 private String userId; //CX 用户ID private String loginName; //CX 登录名称 private String password; //CX 用户密码 public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getUserCode() { return userCode; } public void setUserCode(String userCode) { this.userCode = userCode; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public String getLeaderId() { return leaderId; } public void setLeaderId(String leaderId) { this.leaderId = leaderId; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getOrgId() { return orgId; } public void setOrgId(String orgId) { this.orgId = orgId; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getModifyTime() { return modifyTime; } public void setModifyTime(Date modifyTime) { this.modifyTime = modifyTime; } public String getDepartmentId() { return departmentId; } public void setDepartmentId(String departmentId) { this.departmentId = departmentId; } public String getRoleType() { return roleType; } public void setRoleType(String roleType) { this.roleType = roleType; } public String getFlag() { return flag; } public void setFlag(String flag) { this.flag = flag; } public String getTeamId() { return teamId; } public void setTeamId(String teamId) { this.teamId = teamId; } public String getBussnessId() { return bussnessId; } public void setBussnessId(String bussnessId) { this.bussnessId = bussnessId; } public String getUserId() { return userId; } public String getLoginName() { return loginName; } public String getPassword() { return password; } public void setUserId(String userId) { this.userId = userId; } public void setLoginName(String loginName) { this.loginName = loginName; } public void setPassword(String password) { this.password = password; } }
[ "qiang.guo3@creditharmony.cn" ]
qiang.guo3@creditharmony.cn
21cb216fcbef2a044d624e6c3d44109c7fca3f09
799cce351010ca320625a651fb2e5334611d2ebf
/Data Set/Synthetic/After/after_2250.java
6ad35f23609d7916fe200eb07c4f0cb17947e9b6
[]
no_license
dareenkf/SQLIFIX
239be5e32983e5607787297d334e5a036620e8af
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
refs/heads/main
2023-01-29T06:44:46.737157
2020-11-09T18:14:24
2020-11-09T18:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
public class Dummy { void sendRequest(Connection conn) throws SQLException { PreparedStatement stmt = conn.prepareStatement("SELECT EMPLOYEE_ID, MANAGER_ID, DEPARTMENT_ID FROM EMPLOYEES WHERE MANAGER_ID >=? AND DEPARTMENT_ID >?"); stmt.setObject(1 , val2); stmt.setObject(2 , rand8); ResultSet rs = stmt.executeQuery(); } }
[ "jahin99@gmail.com" ]
jahin99@gmail.com
93b6a93efaae416bff33627edd11b5c120e89786
556d6734a71c1215f32743eb93fc138096ed3543
/app/src/main/java/in/co/sattamaster/ui/AllBids/AllBidsMvpPresenter.java
8983c2335dfd030f184ca0db88b9fc5fb2eba0ee
[ "Apache-2.0" ]
permissive
sciage/sattaOwner
b7c1ddf44538d6458216922d8b4068ebea231c90
14a30f4738f01a7075731fc7c0c772aa02d32740
refs/heads/master
2020-06-25T06:24:27.164289
2019-11-22T15:14:46
2019-11-22T15:14:46
199,230,267
0
0
null
null
null
null
UTF-8
Java
false
false
407
java
package in.co.sattamaster.ui.AllBids; import android.content.SharedPreferences; import in.co.sattamaster.di.PerActivity; import in.co.sattamaster.ui.AllUsers.AllUsersMvpView; import in.co.sattamaster.ui.base.MvpPresenter; @PerActivity public interface AllBidsMvpPresenter <V extends AllBidsMvpView> extends MvpPresenter<V> { void getAllBids(SharedPreferences sharedPreferences, int currentPage); }
[ "dass.harish@gmail.com" ]
dass.harish@gmail.com
a4d42af38d8c2746beb126586e620e876ddf4374
2ffe0018d8d6b421e941c0e3ff9ecfaabc63165c
/fr.opensagres.nosql.ide.core/src/fr/opensagres/nosql/ide/core/IServerManager.java
7dad6b1ab884b543a979c33783ecf8024e36e652
[]
no_license
opensagres/mongodb-ide
8b5a8f41828017d425bd88b18c5638a211aab31f
a39d31b076cf27900c263894e55a2f6b6be67fbe
refs/heads/master
2023-06-10T14:00:41.340032
2014-05-13T11:26:56
2014-05-13T11:26:56
4,914,729
2
2
null
2014-05-13T11:26:57
2012-07-05T20:31:06
Java
UTF-8
Java
false
false
630
java
package fr.opensagres.nosql.ide.core; import java.util.List; import fr.opensagres.nosql.ide.core.extensions.IServerType; import fr.opensagres.nosql.ide.core.model.IServer; public interface IServerManager extends ISettingsManager { void addServer(IServer server) throws Exception; void removeServer(IServer server) throws Exception; List<IServer> getServers(); List<IServer> getServers(IServerType serverType); void addServerLifecycleListener(IServerLifecycleListener listener); void removeServerLifecycleListener(IServerLifecycleListener listener); IServer findServer(String serverId); }
[ "angelo.zerr@gmail.com" ]
angelo.zerr@gmail.com
926442f0e14f82182c3bb79733c1b276f1c95f2d
e3a09a1c199fb3e32d1e43c1393ec133fa34ceab
/game/data/scripts/ai/areas/Heine/WrapGate.java
e0bd14050b5a0882969cd168f65afaf3dc46e6ba
[]
no_license
Refuge89/l2mobius-helios
0fbaf2a11b02ce12c7970234d4b52efa066ef122
d1251e1fb5a2a40925839579bf459083a84b0c59
refs/heads/master
2020-03-23T01:37:03.354874
2018-07-14T06:52:51
2018-07-14T06:52:51
140,927,248
1
0
null
2018-07-14T07:49:40
2018-07-14T07:49:39
null
UTF-8
Java
false
false
1,948
java
/* * This file is part of the L2J Mobius project. * * 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/>. */ package ai.areas.Heine; import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.quest.QuestState; import ai.AbstractNpcAI; import quests.Q10455_ElikiasLetter.Q10455_ElikiasLetter; /** * Warp Gate AI. * @author Gigi */ public final class WrapGate extends AbstractNpcAI { // NPC private static final int WRAP_GATE = 33900; // Location private static final Location TELEPORT_LOC = new Location(-28575, 255984, -2195); private WrapGate() { addStartNpc(WRAP_GATE); addFirstTalkId(WRAP_GATE); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { if ("enter_hellbound".equals(event)) { final QuestState qs = player.getQuestState(Q10455_ElikiasLetter.class.getSimpleName()); if ((qs != null) && qs.isCond(1)) { playMovie(player, Movie.SC_HELLBOUND); } player.teleToLocation(TELEPORT_LOC); } return null; } @Override public String onFirstTalk(L2Npc npc, L2PcInstance player) { return "33900.html"; } public static void main(String[] args) { new WrapGate(); } }
[ "conan_513@hotmail.com" ]
conan_513@hotmail.com
e0d23318c249c3fc39a6e7e78aa9b8f5a750d83c
755adf77ac6a04139351bedac3141ee227842e6f
/src/main/java/com/edu/java8/lambda/listener/DemoEvent.java
7b78c91522c8727b9241dc0dd414c41000043102
[]
no_license
zuohuai/coreJava
e37b6873e4baeebe3ba6464a30bfaaef33c7af63
ca7ad299c141544d8b187100579a25a49c618a59
refs/heads/master
2021-01-17T13:39:56.335930
2017-07-20T06:55:54
2017-07-20T06:55:54
47,189,343
0
2
null
null
null
null
UTF-8
Java
false
false
491
java
package com.edu.java8.lambda.listener; public class DemoEvent extends java.util.EventObject { public DemoEvent(Object source) { super(source);//source—事件源对象—如在界面上发生的点击按钮事件中的按钮 //所有 Event 在构造时都引用了对象 "source",在逻辑上认为该对象是最初发生有关 Event 的对象 } public void say() { System.out.println("This is say method..."); } }
[ "zuo_huai@163.com" ]
zuo_huai@163.com
e146fb7db68c7ef33fe6be5d90e35ddc65ed6e5a
c2f9d69a16986a2690e72718783472fc624ded18
/com/whatsapp/so.java
4f7e8d89569bce1a9c0c4388ab1856883165f0bb
[]
no_license
mithileshongit/WhatsApp-Descompilado
bc973e1356eb043661a2efc30db22bcc1392d7f3
94a9d0b1c46bb78676ac401572aa11f60e12345e
refs/heads/master
2021-01-16T20:56:27.864244
2015-02-09T04:08:40
2015-02-09T04:08:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
487
java
package com.whatsapp; import android.content.Intent; import android.preference.Preference; import android.preference.Preference.OnPreferenceClickListener; class so implements OnPreferenceClickListener { final SettingsAccount a; so(SettingsAccount settingsAccount) { this.a = settingsAccount; } public boolean onPreferenceClick(Preference preference) { this.a.startActivity(new Intent(this.a, ChangeNumberOverview.class)); return true; } }
[ "hjcf@cin.ufpe.br" ]
hjcf@cin.ufpe.br
b0373e9ce79d0bc2b90e906df86ffd30d31c6da3
be444a27d3a5e45ef823148eb93ecedc54bae77f
/hybris-ems/source/entitlements/entitlements-api/src/main/java/com/hybris/services/entitlements/api/NotEmpty.java
672924ecf65ff029d885c7867d25a72cd627d832
[]
no_license
lun130220/hy57
a2065fc159d4380aa2e4932951900177c25852a9
2abddc8a343dc95f92108c3a6c77ebb79fb1a3b8
refs/heads/master
2021-05-14T01:48:14.463310
2018-01-07T15:13:45
2018-01-07T15:13:45
116,575,157
0
0
null
null
null
null
UTF-8
Java
false
false
861
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. */ package com.hybris.services.entitlements.api; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Tells validator that annotated string field can not be empty. */ @Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface NotEmpty { }
[ "lun130220@gamil.com" ]
lun130220@gamil.com
9840a511d3c1f369878e94bffd8439c78e4ae0f7
c37d2a36312534a55c319b19b61060649c7c862c
/app/src/main/java/com/spongycastle/crypto/signers/HMacDSAKCalculator.java
e38efad8b41fd2ca4f01b703e25c3f7799a4b42a
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
trwinowiecki/AndroidTexting
f5626ad91a07ea7b3cd3ee75893abf8b1fe7154f
27e84a420b80054e676c390b898705856364b340
refs/heads/master
2020-12-30T23:10:17.542572
2017-02-01T01:46:13
2017-02-01T01:46:13
80,580,124
0
0
null
null
null
null
UTF-8
Java
false
false
3,536
java
package com.spongycastle.crypto.signers; import java.math.BigInteger; import java.security.SecureRandom; import com.spongycastle.crypto.Digest; import com.spongycastle.crypto.macs.HMac; import com.spongycastle.crypto.params.KeyParameter; import com.spongycastle.util.Arrays; import com.spongycastle.util.BigIntegers; /** * A deterministic K calculator based on the algorithm in section 3.2 of RFC 6979. */ public class HMacDSAKCalculator implements DSAKCalculator { private static final BigInteger ZERO = BigInteger.valueOf(0); private final HMac hMac; private final byte[] K; private final byte[] V; private BigInteger n; /** * Base constructor. * * @param digest digest to build the HMAC on. */ public HMacDSAKCalculator(Digest digest) { this.hMac = new HMac(digest); this.V = new byte[hMac.getMacSize()]; this.K = new byte[hMac.getMacSize()]; } public boolean isDeterministic() { return true; } public void init(BigInteger n, SecureRandom random) { throw new IllegalStateException("Operation not supported"); } public void init(BigInteger n, BigInteger d, byte[] message) { this.n = n; Arrays.fill(V, (byte)0x01); Arrays.fill(K, (byte)0); byte[] x = new byte[(n.bitLength() + 7) / 8]; byte[] dVal = BigIntegers.asUnsignedByteArray(d); System.arraycopy(dVal, 0, x, x.length - dVal.length, dVal.length); byte[] m = new byte[(n.bitLength() + 7) / 8]; BigInteger mInt = bitsToInt(message); if (mInt.compareTo(n) >= 0) { mInt = mInt.subtract(n); } byte[] mVal = BigIntegers.asUnsignedByteArray(mInt); System.arraycopy(mVal, 0, m, m.length - mVal.length, mVal.length); hMac.init(new KeyParameter(K)); hMac.update(V, 0, V.length); hMac.update((byte)0x00); hMac.update(x, 0, x.length); hMac.update(m, 0, m.length); hMac.doFinal(K, 0); hMac.init(new KeyParameter(K)); hMac.update(V, 0, V.length); hMac.doFinal(V, 0); hMac.update(V, 0, V.length); hMac.update((byte)0x01); hMac.update(x, 0, x.length); hMac.update(m, 0, m.length); hMac.doFinal(K, 0); hMac.init(new KeyParameter(K)); hMac.update(V, 0, V.length); hMac.doFinal(V, 0); } public BigInteger nextK() { byte[] t = new byte[((n.bitLength() + 7) / 8)]; for (;;) { int tOff = 0; while (tOff < t.length) { hMac.update(V, 0, V.length); hMac.doFinal(V, 0); int len = Math.min(t.length - tOff, V.length); System.arraycopy(V, 0, t, tOff, len); tOff += len; } BigInteger k = bitsToInt(t); if (k.compareTo(ZERO) > 0 && k.compareTo(n) < 0) { return k; } hMac.update(V, 0, V.length); hMac.update((byte)0x00); hMac.doFinal(K, 0); hMac.init(new KeyParameter(K)); hMac.update(V, 0, V.length); hMac.doFinal(V, 0); } } private BigInteger bitsToInt(byte[] t) { BigInteger v = new BigInteger(1, t); if (t.length * 8 > n.bitLength()) { v = v.shiftRight(t.length * 8 - n.bitLength()); } return v; } }
[ "trw0511@gmail.com" ]
trw0511@gmail.com
6a4eab95a67459a4ff2cd4679907b1207be0df42
5e723b415f63a571aee8b1d6f217e84aec2102c0
/standalone/src/main/java/org/jboss/as/console/client/domain/groups/deployment/NewDeploymentWizard.java
be2b9b58488ddad34471fec8f1aa6bdaddfe7763
[]
no_license
yongyang/as7-console
dc845b1829c6f19f0ecdea62997923ada8c7fbf7
0b0ee25b3246c7ee12b888ccf9d0b594bb69c994
refs/heads/master
2021-01-17T23:12:22.450022
2011-04-21T13:18:33
2011-04-21T13:18:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,463
java
/* * JBoss, Home of Professional Open Source * Copyright <YEAR> Red Hat Inc. and/or its affiliates and other contributors * as indicated by the @author tags. All rights reserved. * See the copyright.txt in the distribution for a * full listing of individual contributors. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU Lesser General Public License, v. 2.1. * This program is distributed in the hope that it will be useful, but WITHOUT A * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License, * v.2.1 along with this distribution; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ package org.jboss.as.console.client.domain.groups.deployment; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.DeckPanel; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; import org.jboss.as.console.client.shared.BeanFactory; /** * @author Heiko Braun * @date 4/7/11 */ public class NewDeploymentWizard { private VerticalPanel layout; private DeploymentsPresenter presenter; private DeckPanel deck; private BeanFactory factory = GWT.create(BeanFactory.class); private DeploymentStep1 step1; private DeploymentStep2 step2; public NewDeploymentWizard(final DeploymentsPresenter presenter) { super(); this.presenter = presenter; deck = new DeckPanel(); step1 = new DeploymentStep1(this); step2 = new DeploymentStep2(this); deck.add(step1.asWidget()); deck.add(step2.asWidget()); deck.showWidget(0); } public DeploymentsPresenter getPresenter() { return presenter; } public Widget asWidget() { return deck; } public void onUploadComplete(String fileName, String hash) { System.out.println(fileName +" > "+hash); DeploymentReference deploymentRef = factory.deploymentReference().as(); deploymentRef.setHash(hash); deploymentRef.setName(fileName); step2.edit(deploymentRef); deck.showWidget(1); // proceed to step2 } }
[ "ike.braun@googlemail.com" ]
ike.braun@googlemail.com
ac27131d93279a87de051fa95be7feb4f7930ba2
5c7740f64069339f6e489472f5f8cbff24fb6e9e
/app/src/main/java/com/proyectos/javi/mlgbici_jmedinilla/MainActivity.java
b5a17e4dd9060532baf7d17b682bb75c4f355019
[ "Apache-2.0" ]
permissive
JMedinilla/acdat_ev1_Bikes
705248356b821aa4a8efbefcffdd09d78c4effd7
02e3d2ae6ba2a824d4c9ff4a9690b197e00488cb
refs/heads/master
2021-01-13T11:23:05.565920
2016-12-23T02:34:21
2016-12-23T02:34:21
77,189,040
0
0
null
null
null
null
UTF-8
Java
false
false
4,148
java
package com.proyectos.javi.mlgbici_jmedinilla; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.Toast; import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.JsonHttpResponseHandler; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import cz.msebera.android.httpclient.Header; public class MainActivity extends AppCompatActivity implements AdapterView.OnItemClickListener { public static final String WEB = "http://datosabiertos.malaga.eu/api/action/datastore_search?resource_id=3bb304f9-9de3-4bac-943e-7acce7e8e8f9"; ListView listaEstaciones; ArrayList<Estacion> estaciones; ArrayAdapter<Estacion> adapter; AsyncHttpClient client; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); listaEstaciones = (ListView)findViewById(R.id.listaEstaciones); listaEstaciones.setOnItemClickListener(this); client = new AsyncHttpClient(); client.get(WEB, new JsonHttpResponseHandler() { @Override public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject response) { Toast toast = Toast.makeText(MainActivity.this, "No se ha podido descargar", Toast.LENGTH_SHORT); toast.show(); } @Override public void onSuccess(int statusCode, Header[] headers, JSONObject response) { try { estaciones = analizarEstaciones(response); Toast.makeText(MainActivity.this, "Datos descargados", Toast.LENGTH_SHORT).show(); mostrar(); } catch (JSONException e) { e.printStackTrace(); Toast.makeText(MainActivity.this, "Excepción: " + e.getMessage(), Toast.LENGTH_SHORT).show(); } } }); } @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent i = new Intent(MainActivity.this, VisorEstacion.class); i.putExtra("direccion", estaciones.get(position).direccion); i.putExtra("latitud", estaciones.get(position).latitud); i.putExtra("longitud", estaciones.get(position).longitud); i.putExtra("estado", estaciones.get(position).estado); i.putExtra("plazas", estaciones.get(position).plazas); i.putExtra("plazasLibres", estaciones.get(position).plazasLibres); i.putExtra("plazasOcupadas", estaciones.get(position).plazasOcupadas); startActivity(i); } private void mostrar() { if (estaciones != null) { adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, estaciones); listaEstaciones.setAdapter(adapter); } else { Toast.makeText(getApplicationContext(), "Error al crear la lista", Toast.LENGTH_SHORT).show(); } } private ArrayList<Estacion> analizarEstaciones(JSONObject response) throws JSONException { ArrayList<Estacion> ests = new ArrayList<>(); JSONObject result = response.getJSONObject("result"); JSONArray records = result.getJSONArray("records"); for (int i = 0; i< records.length(); i++){ Estacion est = new Estacion(); JSONObject numE = records.getJSONObject(i); est.direccion = numE.getString("DIRECCION"); est.latitud = numE.getString("LAT"); est.longitud = numE.getString("LON"); est.estado = numE.getString("NOMBRE_ESTADO"); est.plazas = numE.getString("NUM_DERBIS"); est.plazasLibres = numE.getString("NUM_LIBRES"); est.plazasOcupadas = numE.getString("NUM_OCUPADOS"); ests.add(est); } return ests; } }
[ "javimedinilla@gmail.com" ]
javimedinilla@gmail.com
d2492627da57da6efe83145f785448d5fb4cdf3b
c36b3bacc4cf0d268d63d351b51a8a2517d571d1
/Core/test/com/rr/core/codec/binary/fastfix/field/delta/string/StringFieldTest.java
920d69ac7be640cf0873beff8416887abec0fbfb
[]
no_license
renicl/alphaProject
e4ced0c8de85b933f8b3af1903577bd0143a9acf
1785ecc8c7d930fda2c60452504a141e417712b6
refs/heads/master
2021-05-15T09:02:55.542649
2017-12-03T16:32:05
2017-12-03T16:32:05
108,066,861
0
1
null
null
null
null
UTF-8
Java
false
false
4,958
java
/******************************************************************************* * Copyright (c) 2015 Low Latency Trading Limited : Author Richard Rose * 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.rr.core.codec.binary.fastfix.field.delta.string; import com.rr.core.codec.binary.fastfix.FastFixDecodeBuilder; import com.rr.core.codec.binary.fastfix.FastFixBuilder; import com.rr.core.codec.binary.fastfix.PresenceMapReader; import com.rr.core.codec.binary.fastfix.PresenceMapWriter; import com.rr.core.codec.binary.fastfix.msgdict.delta.string.StringReaderDelta; import com.rr.core.codec.binary.fastfix.msgdict.delta.string.StringWriterDelta; import com.rr.core.lang.BaseTestCase; import com.rr.core.lang.ReusableString; public class StringFieldTest extends BaseTestCase { private FastFixDecodeBuilder _decoder = new FastFixDecodeBuilder(); private FastFixBuilder _encoder; private PresenceMapWriter _mapWriter; private PresenceMapReader _mapReader; private byte[] _buf = new byte[8192]; private StringReaderDelta _fieldReader; private StringWriterDelta _fieldWriter; @Override public void setUp(){ _encoder = new FastFixBuilder( _buf, 0 ); _mapWriter = new PresenceMapWriter( _encoder, 0, 1 ); _mapReader = new PresenceMapReader(); _fieldReader = new StringReaderDelta( "TestULong", 10018 ); _fieldWriter = new StringWriterDelta( "TestULong", 10018 ); } @Override public String toString() { return new String( _buf, 0, _decoder.getNextFreeIdx() ); } public void testVals() { checkField( "A", 3 ); checkField( "", 3 ); checkField( "AABBCCDDEE", 12 ); checkField( "AABBCCDDEEZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ", 74 ); } private void checkField( String sVal, int expPostIndex ) { setUp(); // force reset ReusableString value = new ReusableString( sVal ); _fieldWriter.write( _encoder, value ); _mapWriter.end(); _decoder.start( _buf, 0, _encoder.getCurrentIndex() ); _mapReader.readMap( _decoder ); assertEquals( 1, _decoder.getCurrentIndex() ); readValAndCheck( value.toString(), expPostIndex ); } private void readValAndCheck( String sExpValue, int expPostIndex ) { ReusableString expValue = new ReusableString( sExpValue ); ReusableString value = new ReusableString(); _fieldReader.read( _decoder, value ); assertEquals( expValue, value ); assertEquals( expPostIndex, _decoder.getCurrentIndex() ); } private void writeField( String val, int expPostIdx ) { ReusableString v = new ReusableString(); v.setValue( val ); _fieldWriter.write( _encoder, v ); assertEquals( v, _fieldWriter.getPreviousValue() ); assertEquals( expPostIdx, _encoder.getCurrentIndex() ); } public void testPrevCopy() { writeField( "ABCDEF", 8 ); writeField( "", 10 ); writeField( "ABCDEF", 17 ); writeField( "ABCDEF", 19 ); writeField( "ABCDEFGH", 22 ); writeField( "ABC", 24 ); writeField( "ZYXABC", 28 ); writeField( "EDCBAZYXABC", 34 ); writeField( "ABXABCDEF", 44 ); writeField( "CDEF", 46 ); writeField( "", 48 ); writeField( "ZYX", 52 ); _mapWriter.end(); _decoder.start( _buf, 0, _encoder.getCurrentIndex() ); _mapReader.readMap( _decoder ); assertEquals( 1, _decoder.getCurrentIndex() ); readValAndCheck( "ABCDEF", 8 ); readValAndCheck( "", 10 ); readValAndCheck( "ABCDEF", 17 ); readValAndCheck( "ABCDEF", 19 ); readValAndCheck( "ABCDEFGH", 22 ); readValAndCheck( "ABC", 24 ); readValAndCheck( "ZYXABC", 28 ); readValAndCheck( "EDCBAZYXABC", 34 ); readValAndCheck( "ABXABCDEF", 44 ); readValAndCheck( "CDEF", 46 ); readValAndCheck( "", 48 ); readValAndCheck( "ZYX", 52 ); } }
[ "lucasrenick@lucass-mbp.fios-router.home" ]
lucasrenick@lucass-mbp.fios-router.home
89c126e71eb6e8f0fb4595922f6b106f16e5d0a7
5597d65a8476ad8fef6fe3621823e475baa5539d
/app/src/main/java/com/app/elixir/brewz_rock_cafe/utils/CustomTypefaceSpan.java
265b95719cfd5035b3df563778a1032d40a9b828
[]
no_license
Ravikumawat1990/Brewz_Rock_Cafe
970ee2bf0eb418c11f35d98a241c66a7845d4441
2eb98262b951fe40b27d7e59d389f803b2c7f96e
refs/heads/master
2020-12-02T22:04:15.865255
2017-07-03T06:16:45
2017-07-03T06:16:45
96,076,244
0
0
null
null
null
null
UTF-8
Java
false
false
1,154
java
package com.app.elixir.brewz_rock_cafe.utils; import android.graphics.Paint; import android.graphics.Typeface; import android.text.TextPaint; import android.text.style.TypefaceSpan; public class CustomTypefaceSpan extends TypefaceSpan { private final Typeface newType; public CustomTypefaceSpan(String family, Typeface type) { super(family); newType = type; } @Override public void updateDrawState(TextPaint ds) { applyCustomTypeFace(ds, newType); } @Override public void updateMeasureState(TextPaint paint) { applyCustomTypeFace(paint, newType); } private static void applyCustomTypeFace(Paint paint, Typeface tf) { int oldStyle; Typeface old = paint.getTypeface(); if (old == null) { oldStyle = 0; } else { oldStyle = old.getStyle(); } int fake = oldStyle & ~tf.getStyle(); if ((fake & Typeface.BOLD) != 0) { paint.setFakeBoldText(true); } if ((fake & Typeface.ITALIC) != 0) { paint.setTextSkewX(-0.25f); } paint.setTypeface(tf); } }
[ "kravi@elixirinfo.com" ]
kravi@elixirinfo.com
bb5073b377b014005c0cc77a29c5ceba357a1301
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/31_xisemele-net.sf.xisemele.impl.WriterEditorImpl-0.5-9/net/sf/xisemele/impl/WriterEditorImpl_ESTest.java
66e6fdc7ac2192efb49cb27ba0ed2a6d17f5957d
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
658
java
/* * This file was automatically generated by EvoSuite * Tue Oct 29 17:16:40 GMT 2019 */ package net.sf.xisemele.impl; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class WriterEditorImpl_ESTest extends WriterEditorImpl_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
abb421d3af98b0197c1fb42e30cd5fbba8bbf4a6
e3d128798d62b66f281ad1c0351af52cad822676
/CoreJava/src/main/java/jrout/tutorial/corejava/io/studentReview/CopyDirectory.java
0c0c9451af42c8cf3bf28ef66d852daa99797b47
[]
no_license
jayramrout/trunk
f33500d4dae363b2d6bb63bf2b0994bf6a89fd95
de6645ca73107a99dfafc0860e887881090fb191
refs/heads/master
2022-12-24T13:18:21.385118
2020-12-10T00:01:06
2020-12-10T00:01:06
31,351,164
5
26
null
2022-12-16T05:26:02
2015-02-26T04:52:14
Java
UTF-8
Java
false
false
3,046
java
package jrout.tutorial.corejava.io.studentReview; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class CopyDirectory { public static String sourceFolder; public static String destinationFolder; public static void main(String arg[]) { if(arg.length != 2) { System.err.println("Run Program with the Source and Destination Folder as Arguments"); System.exit(0); } sourceFolder = arg[0]; destinationFolder = arg[1]; try { unZipFolder(destinationFolder); copyDirectory(new File(sourceFolder), new File(destinationFolder)); zipFolder(destinationFolder); deleteDirectory(destinationFolder); } catch (IOException e) { e.printStackTrace(); } } public static void zipFolder(String directoryToZip) { try{ Zip.zip(directoryToZip); }catch(Exception exp) { exp.printStackTrace(); } } public static void unZipFolder(String directoryToZip) { try{ UnZip.unZip(directoryToZip); }catch(Exception exp) { exp.printStackTrace(); } } public static void copyDirectory(File sourceLocation, File targetLocation) throws IOException { System.out.println("Copying folders from "+sourceFolder + " to "+destinationFolder+" ..."); if (sourceLocation.isDirectory()) { if (!targetLocation.exists()) { targetLocation.mkdir(); } String[] children = sourceLocation.list(); for (int i = 0; i < children.length; i++) { copyDirectory(new File(sourceLocation, children[i]), new File( targetLocation, children[i])); } } else { InputStream in = new FileInputStream(sourceLocation); if (targetLocation.exists()) return; OutputStream out = new FileOutputStream(targetLocation); // Copy the bits from instream to outstream byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); } in.close(); out.close(); } System.out.println("Copying done..."); } /** * * @param sourceLocation * @throws IOException */ public static void deleteDirectory(String sourceLocation) throws IOException { File srcLocationDirectory = new File(sourceLocation); String[] children = srcLocationDirectory.list(); if(children != null) { System.out.println("Deleting Folders started..."); for (int i = 0; i < children.length; i++) { File file = new File(srcLocationDirectory, children[i]); if(file.isDirectory()) { deleteDirectory(file); } } System.out.println("Deleting Folders Ends..."); } } /** * * @param path * @return */ static public boolean deleteDirectory(File path) { if (path.exists()) { File[] files = path.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { deleteDirectory(files[i]); } else { files[i].delete(); } } } return (path.delete()); } }
[ "jayram.rout@gmail.com" ]
jayram.rout@gmail.com
3a201567ed9b60a863ddfa4d6404af6746f0ac2d
c63f98aa97940e865ba52d52e02b82b69c0bc138
/high-concurrency/src/main/java/com/zhanbq/highconcurrency/chapter2/c2_5deamon/DeamonDemo.java
76c55ad393448ec421d6d4071a6cf4b7fc561fff
[ "Apache-2.0" ]
permissive
zhanbq/java-hightcurrency
58d30fa07ffed1a7bdafb62994195aeabf1269f9
2b61db04eab037b75a50b650b8347e50733788f1
refs/heads/master
2022-09-22T05:42:18.488739
2020-08-07T11:25:44
2020-08-07T11:25:44
132,551,853
1
0
Apache-2.0
2022-09-01T23:31:13
2018-05-08T04:02:20
Java
UTF-8
Java
false
false
1,793
java
package com.zhanbq.highconcurrency.chapter2.c2_5deamon; import com.zhanbq.highconcurrency.chapter2.c2_5deamon.DeamonDemo.DeamonT; /** * * @author o * */ public class DeamonDemo { public static class DeamonT extends Thread{ @Override public void run() { while (true) { System.out.println("I am alive"); try { Thread.sleep(1000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } public static void main(String[] args) throws InterruptedException { DeamonT t = new DeamonT(); t.setDaemon(true); //设置为守护线程,必须在start之前设置.否则抛异常并被视为用户线程继续执行 t.start(); Thread.sleep(2000); } } /** * 守护线程是一种特殊的线程,就和它的名字一样,他是系统的守护者, * 在后台默默的完成一些系统性的服务,比如垃圾回收,JIT线程就可以理解为 * 守护线程. * 与之相对应的用户线程,用户线程可以认为是系统的工作线程,他会完成这个程序应该要 * 完成的业务操作.如果用户线程全部结束,这也意味着这个程序实际上无事可做了. * 守护线程要守护的对象已经不存在了,那么整个应用程序就自然应该结束了. * 因此当一个java应用内,只有守护线程时,java虚拟机就会自然退出. * * 在上面的例子中,由于t1被设置为守护线程,系统中只有主线程main为用户线程, * 因此在main线程休眠2秒后退出是,整个程序也随之结束.但是如果不把线程t作为守护线程, * main线程结束后,t线程还是会不停的打印,永远不会结束. */
[ "996388047@qq.com" ]
996388047@qq.com
4000cd3c73d9b2d558fbc897227c0533c7bfcac4
ede2dd5017fb3f92a7f158a8cb4a27b8acfaf20d
/sslr-core/src/main/java/org/sonar/sslr/internal/ast/select/package-info.java
cd02691a7fdbcaedb4987ee3a57036ee67263ab6
[]
no_license
pynicolas/sslr
2a3e53429c8bb5259d8aa42bb753e3bcf3631b2b
74008891ebac6b93891c0c370d2a9c8db5916719
refs/heads/master
2021-01-21T02:59:07.837280
2015-05-26T17:14:49
2015-05-26T17:14:49
38,372,235
0
0
null
2015-07-01T13:20:35
2015-07-01T13:20:35
null
UTF-8
Java
false
false
948
java
/* * SonarSource Language Recognizer * Copyright (C) 2010 SonarSource * dev@sonar.codehaus.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ /** * @since 1.18 */ @javax.annotation.ParametersAreNonnullByDefault package org.sonar.sslr.internal.ast.select;
[ "mandrikov@gmail.com" ]
mandrikov@gmail.com
784b76b3ad351d4ea0181ac7b72ef1163338a7ca
e16037054e77f49ada84d43d8e72eb0924519c2e
/backend/src/main/java/br/com/sisdb/dscatalog/resources/ClientResource.java
a5f333fc4220e70ba24ee618bb53272e827c3680
[]
no_license
danielbortolozo/dscatalog-bootcamp-devsuperior
e45ed086efa06c03af4ed3d628915dde5e3ef066
0ac709015292010710d145d15313f9c7f03fdbc6
refs/heads/main
2023-04-21T05:46:42.257948
2021-05-02T20:57:28
2021-05-02T20:57:28
330,244,104
1
0
null
null
null
null
UTF-8
Java
false
false
2,633
java
package br.com.sisdb.dscatalog.resources; import java.net.URI; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort.Direction; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import br.com.sisdb.dscatalog.dto.ClientDTO; import br.com.sisdb.dscatalog.services.ClientService; @RestController @RequestMapping(value = "/clients") public class ClientResource { @Autowired private ClientService service; @GetMapping public ResponseEntity<Page<ClientDTO>> findAll( @RequestParam(value = "page", defaultValue = "0") Integer page, @RequestParam(value = "linesPerPage", defaultValue = "12") Integer linesPerPage, @RequestParam(value = "orderBy", defaultValue = "name") String orderBy, @RequestParam(value = "direction", defaultValue = "DESC") String direction ) { PageRequest pageRequest = PageRequest.of(page, linesPerPage, Direction.valueOf(direction), orderBy); Page<ClientDTO> list = service.findAllPaged(pageRequest); return ResponseEntity.ok(list); } @GetMapping(value = "/{id}") public ResponseEntity<ClientDTO> findById(@PathVariable Long id) { ClientDTO dto = service.findById(id); return ResponseEntity.ok(dto); } @PostMapping public ResponseEntity<ClientDTO> insert(@RequestBody ClientDTO dto) { dto = service.inster(dto); URI uri = ServletUriComponentsBuilder.fromCurrentRequest().path("/{id}") .buildAndExpand(dto.getId()).toUri(); return ResponseEntity.created(uri).body(dto); } @PutMapping(value = "/{id}") public ResponseEntity<ClientDTO> update(@PathVariable Long id, @RequestBody ClientDTO dto) { dto = service.update(id, dto); return ResponseEntity.ok(dto); } @DeleteMapping(value = "/{id}") public ResponseEntity<ClientDTO> delete(@PathVariable Long id) { service.delete(id); return ResponseEntity.noContent().build(); } }
[ "danielbortolozo@hotmail.com" ]
danielbortolozo@hotmail.com
1de9e386faac71a38174d6fddb1af62e9932a0c7
2fe1db06ec4785534803171e5c24ba2fb39e4e18
/Java/Java Advanced/Defining classes/Exercise/src/SpeedRacing/Main.java
a4451c2cfdee632bf18bfe04e2b9f7d4cdd5a12c
[ "MIT" ]
permissive
galin-kostadinov/Software-Engineering
f83d561fa314d4137d5f4f68c10de03b97f7c8d7
55189648d787b35f1e9cd24cc4449c6beda51c90
refs/heads/master
2021-07-14T19:15:02.999720
2020-08-30T12:42:48
2020-08-30T12:42:48
197,240,774
1
0
null
null
null
null
UTF-8
Java
false
false
1,410
java
package SpeedRacing; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedHashMap; import java.util.Map; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int count = Integer.parseInt(reader.readLine()); Map<String, Car> carMap = new LinkedHashMap<>(); while (count-- > 0) { String[] tokens = reader.readLine().split("\\s+"); String model = tokens[0]; double fuelAmount = Double.parseDouble(tokens[1]); double FuelCostFor1km = Double.parseDouble(tokens[2]); carMap.putIfAbsent(model, new Car(model, fuelAmount, FuelCostFor1km)); } String input; while (!"End".equals(input = reader.readLine())) { String[] tokens = input.split("\\s+"); String carModel = tokens[1]; double amountOfKm = Double.parseDouble(tokens[2]); Car car = carMap.get(carModel); if (car != null) { car.setDistanceTraveled(amountOfKm); } } carMap.forEach((key, value) -> System.out.println(String.format("%s %.2f %.0f", key, value.getFuelAmount(), value.getDistanceTraveled()))); } }
[ "gk_1988@abv.bg" ]
gk_1988@abv.bg
cb7c65768166354bb939b90f017e0efd97698265
92296490bdd2aef5e7684ef0a66316adf4506006
/src/main/java/com/s/t/m/project/core/SafetyParm.java
b9bfe3025d8b6d207301c56f72ef926f0ab1b898
[]
no_license
tianyaleixiaowu/SoltripTravelMember
a5545bbbd367c7e48764f0ed49e92d17e066630f
19435c1a665cdee64b6997ea948b28f827bc827e
refs/heads/master
2020-04-10T04:48:58.907255
2018-12-07T11:42:58
2018-12-07T11:42:58
160,809,975
0
0
null
null
null
null
UTF-8
Java
false
false
298
java
package com.s.t.m.project.core; import lombok.Data; /** * 安全验证参数 */ @Data public class SafetyParm { /** * 时间戳 */ private String timestamp; /** * 账号 */ private String account; /** * 密码 */ private String password; }
[ "272551766@qq.com" ]
272551766@qq.com
48a911ba9a3a42ddc16accc745a317550e67fea1
2bd57e390da97c8e5b230cf385a26bc3f158f027
/src/chapter02/TwoPoint7.java
6dd387ecc931fd5f9eb396e116ccfdaa65657f8f
[]
no_license
sevakkalpesh315/cracking-the-coding-interview-solutions
28bcf5fde05cd1330ba2e6e796f7b2c5aed595e9
c38ea316b281e6c468c6c1fb2119e1e0e6e8695e
refs/heads/master
2021-01-19T22:08:41.845074
2017-02-04T10:39:31
2017-02-04T10:39:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,254
java
package chapter02; import java.util.Stack; /* Removes duplicates from unsorted list * * Solutions Runtime Preference * ----------------------------------------------------------------------------- * 1) Turn LL into array. O(n) Clever * 2) Deep copy list. Reverse it. Compare to original O(n) Clever * 3) Use Stack to reverse list O(n) Favorite */ public class TwoPoint7 { /* Solution 1 - Rodney's Solution: Since it's easy to solve this problem for an array * (using a head and a tail pointer that move inwards), we COULD * create an array from the linked list and solve it that way. */ /****************************************/ /* Solution 2 - Not implemented in book */ /****************************************/ /* - Create Deep Copy of List * - Reverse that list * - Compare the 2 lists. */ public static boolean palindrome_1(Node head){ int size = ListFunctions.calculateSize(head); // O(n) to calculate size Node reversed = ListFunctions.reverseListIterative(ListFunctions.deepCopy(head)); // O(n) to reverse list Node original = head; for (int i = 0; i < size/2; i++){ // we only have to check 1/2 the list. if (original.data != reversed.data) return false; original = original.next; reversed = reversed.next; } return true; } /********************************************************/ /* Solution 3 - Use a STACK to reverse half of the list */ /********************************************************/ /* Since we don't know size of list, we use SLOW and FAST runners */ public static boolean palindrome_2(Node head){ Node slow = head; Node fast = head; Stack<Integer> stack = new Stack<Integer>(); while (fast != null && fast.next != null){ //tricky knowing this is a terminating condition. stack.push(slow.data); slow = slow.next; fast = fast.next.next; } /* CLEVER TRICK - detects if odd number of elements in list, and skips middle element */ if (fast != null) slow = slow.next; while (slow != null){ if (stack.pop().intValue() != slow.data) return false; slow = slow.next; } return true; } }
[ "9rodney@gmail.com" ]
9rodney@gmail.com
80058652a483e55c19879c2ea65ff7f07c69a792
653c34fd6d06d5859e2c707620d04ac28b40ecb3
/25. Exam Preparation/Bunny-Wars - Author's solutions/Java-Solution/src/test/correctness/Previous.java
0f373d45f730b1ac12897e56388759f1935d267d
[]
no_license
Martin-BG/SoftUni-DataStructures
a92233825d5e81c6e173a2e77eec58bce58f8979
c8b9efd7c4003e80ea5f28577f08deef6547add9
refs/heads/master
2021-07-11T18:02:25.681519
2020-10-13T16:16:45
2020-10-13T16:16:45
92,556,291
2
0
null
2021-03-31T20:16:40
2017-05-26T23:44:29
C#
UTF-8
Java
false
false
2,393
java
package test.correctness; import main.Bunny; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; import test.helpers.BaseTest; import test.types.CorrectnessTests; public class Previous extends BaseTest { @Category(CorrectnessTests.class) @Test(expected = IllegalArgumentException.class) public void Previous_WithANonExistantBunny_ShouldThrowException() { //Act this.BunnyWarCollection.Next("Nasko"); } @Category(CorrectnessTests.class) @Test public void Previous_WithASingleRoom_ShouldStayInTheSameRoom() { //Arrange this.BunnyWarCollection.AddRoom(1); this.BunnyWarCollection.AddBunny("Nasko", 3, 1); //Act this.BunnyWarCollection.Previous("Nasko"); Iterable<Bunny> bunnies = this.BunnyWarCollection.ListBunniesByTeam(3); Bunny bunny = bunnies.iterator().next(); //Assert Assert.assertEquals("Room Id was incorrect!", 1, bunny.getRoomId()); } @Category(CorrectnessTests.class) @Test public void Previous_WithMultipleRooms_ShouldMoveBunnyToNextRoom() { //Arrange this.BunnyWarCollection.AddRoom(1); this.BunnyWarCollection.AddRoom(5); this.BunnyWarCollection.AddBunny("Nasko", 3, 5); //Act this.BunnyWarCollection.Previous("Nasko"); Iterable<Bunny> bunnies = this.BunnyWarCollection.ListBunniesByTeam(3); Bunny bunny = bunnies.iterator().next(); //Assert Assert.assertEquals("Room Id was incorrect!", 1, bunny.getRoomId()); } @Category(CorrectnessTests.class) @Test public void Previous_WithBunnyInTheLastRoom_ShouldMoveBunnyToTheFirstRoom() { //Arrange this.BunnyWarCollection.AddRoom(-20); this.BunnyWarCollection.AddRoom(1); this.BunnyWarCollection.AddRoom(5); this.BunnyWarCollection.AddRoom(20); this.BunnyWarCollection.AddRoom(100); this.BunnyWarCollection.AddRoom(666); this.BunnyWarCollection.AddBunny("Nasko", 2, -20); //Act this.BunnyWarCollection.Previous("Nasko"); Iterable<Bunny> bunnies = this.BunnyWarCollection.ListBunniesByTeam(2); Bunny bunny = bunnies.iterator().next(); //Assert Assert.assertEquals("Room Id was incorrect!", 666, bunny.getRoomId()); } }
[ "MartinBG@abv.bg" ]
MartinBG@abv.bg
57a634af6272bd25c5b6d5c1140bd507194c1054
4a47c37bcea65b6b852cc7471751b5239edf7c94
/src/academy/everyonecodes/java/week6/set2/exercise4/DigitSumCalculatorTest.java
26f0c516f28d0d728616bc9af48f0abe10609734
[]
no_license
uanave/java-module
acbe808944eae54cfa0070bf8b80edf453a3edcf
f98e49bd05473d394329602db82a6945ad1238b5
refs/heads/master
2022-04-07T15:42:36.210153
2020-02-27T14:43:29
2020-02-27T14:43:29
226,831,034
0
0
null
null
null
null
UTF-8
Java
false
false
647
java
package academy.everyonecodes.java.week6.set2.exercise4; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; class DigitSumCalculatorTest { DigitSumCalculator digitSumCalculator = new DigitSumCalculator(); @ParameterizedTest @CsvSource({ "15, 12345", "3, 1000010001", "17, 248102", "12, 1220301012", "0, 0" }) void calculate(int expected, int number) { int result = digitSumCalculator.calculate(number); Assertions.assertEquals(expected, result); } }
[ "uanavasile@gmail.com" ]
uanavasile@gmail.com
4f11e6464ad3ae0e4b07c07259166ef565fec7f8
e1328205daa5e27d6827427b6f31baa353cdb9d0
/common/src/main/java/com/rockchips/common/logger/Printer.java
8d08b2e6b2124b57136667d72446dbb2dd0c4349
[ "Apache-2.0" ]
permissive
MoMoWait/RKTvLauncher
bb33fcdd98c4031b6afc36b1b8a470c2197a1e0c
f86c2995abc4468309f0131f16487af648b82836
refs/heads/master
2021-01-25T06:55:31.573382
2017-06-14T00:11:48
2017-06-14T00:13:14
93,623,380
0
0
null
null
null
null
UTF-8
Java
false
false
597
java
package com.rockchips.common.logger; /** * @author Orhan Obut */ public interface Printer { Printer t(String tag, int methodCount); Settings init(String tag); Settings getSettings(); void d(String message, Object... args); void e(String message, Object... args); void e(Throwable throwable, String message, Object... args); void w(String message, Object... args); void i(String message, Object... args); void v(String message, Object... args); void wtf(String message, Object... args); void json(String json); void xml(String xml); }
[ "1432220483@qq.com" ]
1432220483@qq.com
d8e6b3f8983b5e0598f09dfdf33495e9cd761c83
1676b6e02d3795523db3f9307e94d6d7a2f00ecd
/aliyun-java-sdk-lrg/src/main/java/com/aliyuncs/lrg/model/v20191010/ProcessActionStartResponse.java
8d42c25bc483e7d5144ec24607a746d4ed316b8c
[ "Apache-2.0" ]
permissive
ZyKing/aliyun-openapi-java-sdk
8bf559bd6ad81bdc855de6f339e033d826a6f97e
751f7da685e44ebaf19d4ae5e2d884d5f3ff8b16
refs/heads/master
2022-09-05T22:07:50.512906
2020-06-03T02:13:49
2020-06-03T02:13:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,814
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.lrg.model.v20191010; import java.util.Map; import com.aliyuncs.AcsResponse; import com.aliyuncs.lrg.transform.v20191010.ProcessActionStartResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class ProcessActionStartResponse extends AcsResponse { private Integer code; private Boolean success; private String message; private Map<Object,Object> data; public Integer getCode() { return this.code; } public void setCode(Integer code) { this.code = code; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public Map<Object,Object> getData() { return this.data; } public void setData(Map<Object,Object> data) { this.data = data; } @Override public ProcessActionStartResponse getInstance(UnmarshallerContext context) { return ProcessActionStartResponseUnmarshaller.unmarshall(this, context); } @Override public boolean checkShowJsonItemName() { return false; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
46a06e9c7fcf13c5e1f006cf3294d6ff3f7400ea
bafb55687ea16b1aefb3a1988b76fe8039088caf
/FourEyes001/foureyes/src/main/java/com/boha/foureyes/util/WebSocketUtil.java
a183db652250552ef80b57e0847c47a6e67efd14
[]
no_license
bohatmx/SmartCityAppSuiteRepo
06647b4d8c27a77a2ef1fc4593c07b6bf8e09def
8607d8a6846b83fbe9a3c527146184484a0ad493
refs/heads/master
2021-06-10T21:55:14.039889
2017-01-26T10:29:58
2017-01-26T10:29:58
29,147,650
1
0
null
null
null
null
UTF-8
Java
false
false
5,145
java
package com.boha.foureyes.util; import android.content.Context; import android.util.Log; import com.boha.foureyes.dto.RequestDTO; import com.boha.foureyes.dto.ResponseDTO; import com.google.gson.Gson; import java.nio.ByteBuffer; import de.tavendo.autobahn.WebSocketConnection; import de.tavendo.autobahn.WebSocketException; import de.tavendo.autobahn.WebSocketHandler; import de.tavendo.autobahn.WebSocketOptions; /** * Created by aubreyM on 15/04/19. */ public class WebSocketUtil { static final String LOG = WebSocketUtil.class.getSimpleName(); static SocketListener socketListener; static final WebSocketConnection mConnection = new WebSocketConnection(); static final Gson GSON = new Gson(); static boolean shouldReconnect; public interface SocketListener { void onOpen(); void onMessage(ResponseDTO response); void onError(String message); } public static void sendRequest(Context ctx, final String suffix,RequestDTO w, SocketListener listener) { socketListener = listener; final String url = Statics.WEBSOCKET_URL + suffix; final String json = GSON.toJson(w); try { if (mConnection.isConnected()) { Log.i(LOG, "### WebSocket Status: Connected. using: " + url + " sending: \n" + json); mConnection.sendTextMessage(json); } else { connect(url,json); } } catch (Exception e) { e.printStackTrace(); } } private static void connect(final String url, final String json) { WebSocketOptions options = new WebSocketOptions(); options.setSocketConnectTimeout(5000); options.setSocketReceiveTimeout(1000); try { if (mConnection.isConnected()) { Log.i(LOG, "### Status: Connected to " + url + " sending: \n" + json); mConnection.sendTextMessage(json); } else { mConnection.connect(url, new WebSocketHandler() { @Override public void onOpen() { Log.e(LOG, "OnOpen: Connected to " + url + " sending...: \n" + json); mConnection.sendTextMessage(json); } @Override public void onTextMessage(String payload) { try { ResponseDTO r = GSON.fromJson(payload, ResponseDTO.class); Log.i(LOG, "Response with sessionID: " + r.getSessionID()); } catch (Exception e) { socketListener.onError("Failed to communicate, data format may be a problem"); } } @Override public void onBinaryMessage(byte[] payload) { ByteBuffer byteBuffer = ByteBuffer.wrap(payload); parseData(byteBuffer); } @Override public void onClose(int code, String reason) { Log.e(LOG, "Connection lost. " + reason + ". will issue disconnect"); mConnection.disconnect(); socketListener.onError("Connection to server lost. Please try again."); } },options); } } catch (WebSocketException e) { Log.e(LOG, "WebSocket failed.", e); socketListener.onError(e.getMessage()); } } private static void parseData(ByteBuffer bb) { Log.i(LOG, "### parseData ByteBuffer capacity: " + ZipUtil.getKilobytes(bb.capacity())); String content = null; try { try { content = new String(bb.array()); ResponseDTO response = GSON.fromJson(content, ResponseDTO.class); if (response.getStatusCode() == 0) { socketListener.onMessage(response); } else { socketListener.onError(response.getMessage()); } return; } catch (Exception e) { content = ZipUtil.uncompressGZip(bb); } if (content != null) { ResponseDTO response = GSON.fromJson(content, ResponseDTO.class); if (response.getStatusCode() == 0) { Log.w(LOG, "### response status code is 0 - OK"); socketListener.onMessage(response); } else { Log.e(LOG, "## response status code is > 0 - server found ERROR"); socketListener.onError(response.getMessage()); } } else { Log.e(LOG, "-- Content from server failed. Response content is null"); socketListener.onError("Content from server failed. Response is null"); } } catch (Exception e) { Log.e(LOG, "parseData Failed", e); socketListener.onError("Failed to unpack server response"); } } }
[ "malengatiger@gmail.com" ]
malengatiger@gmail.com
382a111d972ba1ca384fa6115f1b4164563a6f97
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13544-53-27-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/com/xpn/xwiki/web/XWikiAction_ESTest_scaffolding.java
b7143f19b3d54793eb1ad1420a8478a186c904cb
[]
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
433
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Jan 22 02:24:02 UTC 2020 */ package com.xpn.xwiki.web; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XWikiAction_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
d6bcf696640a67fcae9fa016c5d3cd0d4515696e
f2d85e3f5d6dcac0a7b18cbfef6d6b7c62ab570a
/rdma-based-storm/external/storm-opentsdb/src/main/java/org/apache/storm/opentsdb/client/ClientResponse.java
3d16b6c565733d23103616d3f924364fb2b614bf
[ "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
4,937
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.opentsdb.client; import org.apache.storm.opentsdb.OpenTsdbMetricDatapoint; import java.io.Serializable; import java.util.List; /** * This class represents the response from OpenTsdb for a request sent. */ public interface ClientResponse extends Serializable { class Summary implements ClientResponse { private int failed; private int success; private int timeouts; public Summary() { } public Summary(int success, int failed, int timeouts) { this.failed = failed; this.success = success; this.timeouts = timeouts; } public int getFailed() { return failed; } public int getSuccess() { return success; } public int getTimeouts() { return timeouts; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Summary)) return false; Summary summary = (Summary) o; if (failed != summary.failed) return false; if (success != summary.success) return false; return timeouts == summary.timeouts; } @Override public int hashCode() { int result = failed; result = 31 * result + success; result = 31 * result + timeouts; return result; } @Override public String toString() { return "Summary{" + "failed=" + failed + ", success=" + success + ", timeouts=" + timeouts + '}'; } } class Details extends Summary { private List<Error> errors; public Details() { } public Details(int success, int failed, int timeouts, List<Error> errors) { super(success, failed, timeouts); this.errors = errors; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Details)) return false; if (!super.equals(o)) return false; Details details = (Details) o; return errors.equals(details.errors); } public List<Error> getErrors() { return errors; } @Override public int hashCode() { int result = super.hashCode(); result = 31 * result + errors.hashCode(); return result; } @Override public String toString() { return "Details{" + "errors=" + errors + super.toString()+'}'; } public static class Error implements Serializable { private String error; private OpenTsdbMetricDatapoint datapoint; public Error() { } public Error(String error, OpenTsdbMetricDatapoint datapoint) { this.error = error; this.datapoint = datapoint; } public String getError() { return error; } public OpenTsdbMetricDatapoint getDatapoint() { return datapoint; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Error)) return false; Error error1 = (Error) o; if (!error.equals(error1.error)) return false; return datapoint.equals(error1.datapoint); } @Override public int hashCode() { int result = error.hashCode(); result = 31 * result + datapoint.hashCode(); return result; } @Override public String toString() { return "Error{" + "error='" + error + '\'' + ", datapoint=" + datapoint + '}'; } } } }
[ "wnghd9999@naver.com" ]
wnghd9999@naver.com
84638629d805a106493a1e939225b668609a7982
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/com/tencent/mm/ui/f$4$1.java
3aaa5a7547ba7bc27ea4beaaba105f245a482c09
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
431
java
package com.tencent.mm.ui; import com.tencent.mm.ui.base.preference.IconPreference; final class f$4$1 implements Runnable { f$4$1(f.4 param4) {} public final void run() { f.a(kKS.kKO, false); f.a((IconPreference)f.a(kKS.kKO).IR("more_tab_game_recommend"), 8, 8, false, 8, 8, 8); } } /* Location: * Qualified Name: com.tencent.mm.ui.f.4.1 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
38bb5c0083559767a91abc9b6bc17e00aaa73e89
64fafc6f4235b561ddbd99e8f98a484a8092e7fd
/src/main/java/com/std/forum/dao/impl/CommentDAOImpl.java
14a5dcc256a13a4c8cb309ce97969909c2dda252
[]
no_license
pyezxyj/cd-forum
9efbc09bbd4d2f2b6e4564758041d5c89693dc16
c0eee85b35e9da5b07ca3f1f77078bbe8145014f
refs/heads/master
2020-12-25T14:14:37.562151
2016-08-29T06:18:57
2016-08-29T06:18:57
66,760,844
0
0
null
null
null
null
UTF-8
Java
false
false
2,201
java
/** * @Title CommentDAOImpl.java * @Package com.std.forum.dao.impl * @Description * @author xieyj * @date 2016年8月29日 上午10:32:38 * @version V1.0 */ package com.std.forum.dao.impl; import java.util.List; import org.springframework.stereotype.Repository; import com.std.forum.dao.ICommentDAO; import com.std.forum.dao.base.support.AMybatisTemplate; import com.std.forum.domain.Comment; /** * 评论记录DAO层 * @author: xieyj * @since: 2016年8月29日 上午10:32:38 * @history: */ @Repository("commentDAOImpl") public class CommentDAOImpl extends AMybatisTemplate implements ICommentDAO { /** * @see com.std.forum.dao.base.IBaseDAO#insert(java.lang.Object) */ @Override public int insert(Comment data) { return super.insert(NAMESPACE.concat("insert_comment"), data); } /** * @see com.std.forum.dao.base.IBaseDAO#delete(java.lang.Object) */ @Override public int delete(Comment data) { return super.delete(NAMESPACE.concat("delete_comment"), data); } /** * @see com.std.forum.dao.base.IBaseDAO#select(java.lang.Object) */ @Override public Comment select(Comment condition) { return (Comment) super.select(NAMESPACE.concat("select_comment"), condition, Comment.class); } /** * @see com.std.forum.dao.base.IBaseDAO#selectTotalCount(java.lang.Object) */ @Override public long selectTotalCount(Comment condition) { return super.selectTotalCount(NAMESPACE.concat("select_comment_count"), condition); } /** * @see com.std.forum.dao.base.IBaseDAO#selectList(java.lang.Object) */ @Override public List<Comment> selectList(Comment condition) { return super.selectList(NAMESPACE.concat("select_comment"), condition, Comment.class); } /** * @see com.std.forum.dao.base.IBaseDAO#selectList(java.lang.Object, int, int) */ @Override public List<Comment> selectList(Comment condition, int start, int count) { return super.selectList(NAMESPACE.concat("select_comment"), start, count, condition, Comment.class); } }
[ "pyez1158@163.com" ]
pyez1158@163.com