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
1e900e5f2750d2858c701397dde9a042ddd917a4
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/ad/pub/rec/AD_PUB_3550_LCURLISTRecord.java
1ca8f1e3d8e4703febce2276132004043533e500
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
3,168
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.ad.pub.rec; import java.sql.*; import chosun.ciis.ad.pub.dm.*; import chosun.ciis.ad.pub.ds.*; /** * */ public class AD_PUB_3550_LCURLISTRecord extends java.lang.Object implements java.io.Serializable{ public String exct_mm; public String exct_amt; public String fee; public String fee_dfn; public String easy_amt; public String mms_amt; public String tot_amt; public String mms_fee; public String sale_fee; public String card_fee; public String insur_fee; public String tot_fee; public String mod_fee; public String total; public AD_PUB_3550_LCURLISTRecord(){} public void setExct_mm(String exct_mm){ this.exct_mm = exct_mm; } public void setExct_amt(String exct_amt){ this.exct_amt = exct_amt; } public void setFee(String fee){ this.fee = fee; } public void setFee_dfn(String fee_dfn){ this.fee_dfn = fee_dfn; } public void setEasy_amt(String easy_amt){ this.easy_amt = easy_amt; } public void setMms_amt(String mms_amt){ this.mms_amt = mms_amt; } public void setTot_amt(String tot_amt){ this.tot_amt = tot_amt; } public void setMms_fee(String mms_fee){ this.mms_fee = mms_fee; } public void setSale_fee(String sale_fee){ this.sale_fee = sale_fee; } public void setCard_fee(String card_fee){ this.card_fee = card_fee; } public void setInsur_fee(String insur_fee){ this.insur_fee = insur_fee; } public void setTot_fee(String tot_fee){ this.tot_fee = tot_fee; } public void setMod_fee(String mod_fee){ this.mod_fee = mod_fee; } public void setTotal(String total){ this.total = total; } public String getExct_mm(){ return this.exct_mm; } public String getExct_amt(){ return this.exct_amt; } public String getFee(){ return this.fee; } public String getFee_dfn(){ return this.fee_dfn; } public String getEasy_amt(){ return this.easy_amt; } public String getMms_amt(){ return this.mms_amt; } public String getTot_amt(){ return this.tot_amt; } public String getMms_fee(){ return this.mms_fee; } public String getSale_fee(){ return this.sale_fee; } public String getCard_fee(){ return this.card_fee; } public String getInsur_fee(){ return this.insur_fee; } public String getTot_fee(){ return this.tot_fee; } public String getMod_fee(){ return this.mod_fee; } public String getTotal(){ return this.total; } } /* 작성시간 : Tue Jan 24 16:42:50 KST 2017 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
3ea2b9e64a0ed29955fb89eca26b7e016a2b1116
6832918e1b21bafdc9c9037cdfbcfe5838abddc4
/jdk_11_maven/cs/graphql/timbuctoo/timbuctoo-instancev4/src/main/java/nl/knaw/huygens/timbuctoo/v5/jsonfilebackeddata/JsonFileBackedData.java
542c2c17f19360c74bb5c4c6a67f642a57b853ac
[ "GPL-1.0-or-later", "GPL-3.0-only", "Apache-2.0", "LGPL-2.0-or-later" ]
permissive
EMResearch/EMB
200c5693fb169d5f5462d9ebaf5b61c46d6f9ac9
092c92f7b44d6265f240bcf6b1c21b8a5cba0c7f
refs/heads/master
2023-09-04T01:46:13.465229
2023-04-12T12:09:44
2023-04-12T12:09:44
94,008,854
25
14
Apache-2.0
2023-09-13T11:23:37
2017-06-11T14:13:22
Java
UTF-8
Java
false
false
3,230
java
package nl.knaw.huygens.timbuctoo.v5.jsonfilebackeddata; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.guava.GuavaModule; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import nl.knaw.huygens.timbuctoo.v5.jacksonserializers.TimbuctooCustomSerializers; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.function.Function; import java.util.function.Supplier; public class JsonFileBackedData<T> implements JsonDataStore<T> { private static ObjectMapper objectMapper = new ObjectMapper() .registerModule(new Jdk8Module()) .registerModule(new JavaTimeModule()) .registerModule(new GuavaModule()) .registerModule(new TimbuctooCustomSerializers()) .enable(SerializationFeature.INDENT_OUTPUT); private static final Map<String, JsonFileBackedData> existing = new HashMap<>(); //We make sure that there's only one instance per file so that we don't have multiple simultaneous writes public static <T> JsonFileBackedData<T> getOrCreate(File file, Supplier<T> emptyValue, TypeReference<T> valueType) throws IOException { return getOrCreate(file, emptyValue, valueType, null); } //We make sure that there's only one instance per file so that we don't have multiple simultaneous writes public static <T> JsonFileBackedData<T> getOrCreate(File file, Supplier<T> emptyValue, TypeReference<T> valueType, Function<T, T> hydrator) throws IOException { synchronized (existing) { if (existing.containsKey(file.getCanonicalPath())) { return existing.get(file.getCanonicalPath()); } else { return new JsonFileBackedData<>(file, emptyValue, valueType, hydrator); } } } public static void remove(File file) throws IOException { synchronized (existing) { existing.remove(file.getCanonicalPath()); } } private final File file; private T value; private JsonFileBackedData(File file, Supplier<T> emptyValue, TypeReference<T> valueType, Function<T,T> hydrator) throws IOException { this.file = file; if (file.exists()) { value = objectMapper.readValue(file, valueType); if (hydrator != null) { value = hydrator.apply(value); } } else { file.getParentFile().mkdirs(); // make sure the directories exist value = emptyValue.get(); objectMapper.writeValue(file, value); } //is synchronized because ctor is called from a synchronized block existing.put(file.getCanonicalPath(), this); } @Override public void updateData(Function<T, T> mutator) throws IOException { synchronized (file) { value = mutator.apply(value); objectMapper.writeValue(file, value); } } @Override public T getData() { return value; } static void regenerateSoWeCanTestHowWellLoadingWorks(File file) throws IOException { synchronized (existing) { existing.remove(file.getCanonicalPath()); } } }
[ "arcuri82@gmail.com" ]
arcuri82@gmail.com
707fe89c1e7e20d33fd25dce586610943125e4e3
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_199/Testnull_19840.java
f6f6cf57870e79701ea7772b90d7d41a1e4c987e
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_199; import static org.junit.Assert.*; public class Testnull_19840 { private final Productionnull_19840 production = new Productionnull_19840("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
bc691d32117a153ab2c82f272f0cc51d8a9b4c75
23458bdfb7393433203985569e68bc1935a022d6
/NDC-GraphQL-Client/src/generated-sources/java/org/iata/oo/schema/AirShoppingRQ/KeyWord.java
ecef1b6b9053dc5a644ed287f59e2952313c60e7
[]
no_license
joelmorales/NDC
7c6baa333c0285b724e6356bd7ae808f1f74e7ec
ebddd30369ec74e078a2c9996da0402f9ac448a1
refs/heads/master
2021-06-30T02:49:12.522375
2019-06-13T14:55:05
2019-06-13T14:55:05
171,594,242
1
0
null
2020-10-13T12:03:33
2019-02-20T03:29:16
Java
UTF-8
Java
false
false
1,091
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // 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: 2019.03.05 at 04:29:40 PM CST // package org.iata.oo.schema.AirShoppingRQ; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;extension base="{http://www.iata.org/IATA/EDIST/2017.2}KeyWordType"> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "KeyWord") public class KeyWord extends KeyWordType { }
[ "joel.moralesmorales@hotmail.com" ]
joel.moralesmorales@hotmail.com
dd64e9806d9b30fda6057dcf6fe6b6a11dd5aa7a
fb9c6ffebe0b0b03d86b1fdfe53cce1f3f1f6bcd
/src/main/java/org/revo/torrent/tracker/TrackerHTTP.java
2483eef46fb6049908969750709c13d97199d3fc
[]
no_license
ashraf-revo/torrentclient
6bfaec81b0a308477a39dee1e4ae8c55bd8c43e5
eeecaca6d52d89dc96c3dcd599e37b0441c2d5b2
refs/heads/master
2021-03-27T12:01:05.709045
2018-02-07T19:53:53
2018-02-07T19:53:53
120,652,131
0
0
null
null
null
null
UTF-8
Java
false
false
5,783
java
package org.revo.torrent.tracker; import org.revo.torrent.bencode.BencodeDecode; import java.io.UnsupportedEncodingException; import java.net.*; import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; /** * Created by Dani on 2016. 11. 19.. */ class TrackerHTTP extends Tracker { private String baseUrl; private String trackerId; private long downloadedAtStart = 0; TrackerHTTP(TrackerManager listener, String baseUrl) { super(listener); this.baseUrl = baseUrl; } protected void connect(TrackerTorrentInformation information){ StringBuilder fullUriB = new StringBuilder(); fullUriB.append(baseUrl); switch (state){ default: case STARTING: fullUriB.append("?event=started"); downloadedAtStart = information.getDownloaded(); break; case STOPPING: fullUriB.append("?event=stopped"); break; case COMPLETING: fullUriB.append("?event=completed"); break; } try { fullUriB.append("&info_hash=").append(URLEncoder.encode(new String(information.getInfoHash(),"ISO-8859-1"),"ISO-8859-1")) //TODO: Encoding, maybe write custom .append("&peer_id=").append(information.getPeerId()) .append("&port=").append(information.getPort()) .append("&downloaded=").append(information.getDownloaded() - downloadedAtStart) .append("&uploaded=").append(information.getUploaded()) .append("&left=").append(information.getLeft()) .append("&compact=").append(information.isCompact() ? "1" : "0"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } if (information.getKey() != -1){ fullUriB.append("&key=").append(information.getKey()); } if (trackerId != null){ fullUriB.append(trackerId); } String fullUri = fullUriB.toString(); HttpURLConnection targetUrl; try { System.out.println("*****"+fullUri); targetUrl = (HttpURLConnection) new URL(fullUri).openConnection(); System.out.println("++++++"+targetUrl); //int responseCode = targetUrl.getResponseCode(); Map<String, Object> item = (Map<String, Object>) BencodeDecode.bDecodeStream(targetUrl.getInputStream()); targetUrl.disconnect(); if (item != null){ if (item.get("failure reason") != null){ String error = (String) item.get("failure reason"); this.listener.onFailedRequest(this, error); state = TrackerState.FAILED; failureReason = error; } else { lastResponseTime = System.nanoTime(); Long interval = (Long) item.get("interval"); if (interval != null){ this.interval = TimeUnit.SECONDS.toNanos(interval); } else { this.interval = TimeUnit.MINUTES.toNanos(30); } Long minInterval = (Long) item.get("min interval"); if (minInterval != null){ this.minInterval = TimeUnit.SECONDS.toNanos(minInterval); } String trackerId = (String) item.get("trackerid"); if (trackerId != null){ this.trackerId = trackerId; } Long complete = (Long) item.get("complete"); if (complete != null){ this.seederCount = complete; } Long incomplete = (Long) item.get("incomplete"); if (incomplete != null){ this.leecherCount = incomplete; } switch (state){ case COMPLETING: case STARTING: state = TrackerState.STARTED; break; case STOPPING: state = TrackerState.STOPPED; break; } String peers = (String) item.get("peers"); if (peers != null){ Set<SocketAddress> foundPeers = new HashSet<>(); //TODO: check if it's not compact byte[] peerArray = peers.getBytes("ISO-8859-1"); for (int i = 0; i < peerArray.length / 6; i++){ InetAddress peerAddress = InetAddress.getByAddress(Arrays.copyOfRange(peerArray,i*6,i*6+4)); int peerPort = ((peerArray[i*6 + 4] & 0xff) << 8) | (peerArray[i*6+5] & 0xff); foundPeers.add(new InetSocketAddress(peerAddress, peerPort)); } listener.onResponseReceived(foundPeers); } } } } catch (Exception e) { // e.printStackTrace(); listener.onFailedRequest(this, e.toString()); state = TrackerState.FAILED; failureReason = e.getMessage(); } } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TrackerHTTP that = (TrackerHTTP) o; return baseUrl != null ? baseUrl.equals(that.baseUrl) : that.baseUrl == null; } @Override public int hashCode() { return baseUrl != null ? baseUrl.hashCode() : 0; } }
[ "ashraf1abdelrasool@gmail.com" ]
ashraf1abdelrasool@gmail.com
daecc163be7aabcfab55dc46119260c1d0926a20
d277ee3f92afb29db21b4af3df0b99816d00cc57
/src/MinhQuery/cau1/Cau1.java
d5d8b8d3f7827b06524ac424c8770362b073c03a
[]
no_license
hungnv281/CSDL
584702f5670682bf2849bb368578223ec64a0fa3
debba54a162436d43e84c52f6b68bcca4f6bee10
refs/heads/main
2023-05-14T18:00:04.083222
2021-06-10T08:15:35
2021-06-10T08:15:35
375,621,378
0
0
null
null
null
null
UTF-8
Java
false
false
1,478
java
package MinhQuery.cau1; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import javafx.scene.control.cell.PropertyValueFactory; import java.net.URL; import java.util.ResourceBundle; public class Cau1 implements Initializable { @FXML private TableView<class1> tablePB; @FXML private TableColumn<class1, String> mpbColumn; @FXML private TableColumn<class1, String> tenpbColumn; @FXML private TableColumn<class1, String> sdtColumn; @FXML private TableColumn<class1, String> diachiColumn; @FXML private TableColumn<class1, Integer> soLuongColumn; ObservableList<class1> listInf1 = FXCollections.observableArrayList(); @Override public void initialize(URL url, ResourceBundle resourceBundle) { mpbColumn.setCellValueFactory(new PropertyValueFactory<>("mapb")); tenpbColumn.setCellValueFactory(new PropertyValueFactory<>("tenpb")); sdtColumn.setCellValueFactory(new PropertyValueFactory<>("sdtpb")); diachiColumn.setCellValueFactory(new PropertyValueFactory<>("diachipb")); soLuongColumn.setCellValueFactory(new PropertyValueFactory<>("soluong")); listInf1 = DatabaseConnectionQuery1.getInf1(); tablePB.setItems(listInf1); } }
[ "=" ]
=
efb9ca4b11c52ebc5446530f82ada55621284e28
d49e3ff34467c71630681df5a791cb3e4bd72ab7
/src/com/adobe/primetime/va/plugins/ah/engine/model/dao/Dao$DaoField.java
f34498a1d5df3498c886dcd010dfa3d861acbfb3
[]
no_license
reverseengineeringer/com.gogoair.ife
124691cf49e832f5dd8009ceb590894a7a058dfa
e88a26eec5640274844e6cdafcd706be727e8ae3
refs/heads/master
2020-09-15T19:45:27.094286
2016-09-01T13:32:34
2016-09-01T13:32:34
67,133,682
0
0
null
null
null
null
UTF-8
Java
false
false
439
java
package com.adobe.primetime.va.plugins.ah.engine.model.dao; public class Dao$DaoField { public final Object hint; public final Object value; public Dao$DaoField(Object paramObject1, Object paramObject2) { value = paramObject1; hint = paramObject2; } } /* Location: * Qualified Name: com.adobe.primetime.va.plugins.ah.engine.model.dao.Dao.DaoField * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
6a38f4f1a63ba1db3cd04942115eadd901571772
dcbec0cdd7c337f3572830f30adedee756ce7eae
/project-pension-core/src/main/java/com/longjun/cto/framework/sm/sys/entity/view/AdminOperRecordView.java
b9dfbb3d0b8ce39064572942d379bd73f1daf4cf
[]
no_license
lm568618500/project-pension
8c590e7f8eeffab7d3ae21e9610fee2745017c8c
68c1fcd1206ea36482c1a21b19368d32c4262a29
refs/heads/master
2023-03-14T10:13:13.418797
2021-03-04T02:38:50
2021-03-04T02:38:50
330,593,390
0
0
null
null
null
null
UTF-8
Java
false
false
3,486
java
package com.longjun.cto.framework.sm.sys.entity.view; import com.baomidou.mybatisplus.annotations.TableField; import com.eims.cto.framework.module.base.model.BaseView; import com.fasterxml.jackson.annotation.JsonFormat; import com.longjun.cto.framework.sm.sys.entity.model.AdminOperRecordModel; /** * 操作日志View * @author lp * @date 2018-12-13 15:54:41 */ public class AdminOperRecordView extends BaseView { private static final long serialVersionUID = 1544687681921L; public AdminOperRecordView(AdminOperRecordModel model) { //this.model = model; this.id = model.getId(); this.time = model.getTime(); this.adminId = model.getAdminId(); this.operDate = model.getOperDate(); this.toRelationStr = model.getToRelationStr(); this.toRelationId = model.getToRelationId(); this.toRelationType = model.getToRelationType(); this.operRecord = model.getOperRecord(); this.operType = model.getOperType(); this.ip = model.getIp(); this.status = model.getStatus(); this.lastupdate = model.getLastupdate(); } public AdminOperRecordView() { } @TableField("account") private String account; @TableField("rolename") private String rolename; /** * 管理员id */ @TableField("admin_id") private long adminId; /** * 操作时间 */ @TableField("oper_date") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private java.util.Date operDate; /** * 被操作对象 */ @TableField("to_relation_str") private String toRelationStr; /** * 被操作对象ID */ @TableField("to_relation_id") private long toRelationId; /** * 被操作对象类型 */ @TableField("to_relation_type") private int toRelationType; /** * 操作记录 */ @TableField("oper_record") private String operRecord; /** * 操作日志类型 */ @TableField("oper_type") private int operType; /** * */ @TableField("ip") private String ip; public void setAdminId(long adminId) { this.adminId = adminId; } public long getAdminId() { return this.adminId; } public void setOperDate(java.util.Date operDate) { this.operDate = operDate; } public java.util.Date getOperDate() { return this.operDate; } public void setToRelationStr(String toRelationStr) { this.toRelationStr = toRelationStr; } public String getToRelationStr() { return this.toRelationStr; } public void setToRelationId(long toRelationId) { this.toRelationId = toRelationId; } public long getToRelationId() { return this.toRelationId; } public void setToRelationType(int toRelationType) { this.toRelationType = toRelationType; } public int getToRelationType() { return this.toRelationType; } public void setOperRecord(String operRecord) { this.operRecord = operRecord; } public String getOperRecord() { return this.operRecord; } public void setOperType(int operType) { this.operType = operType; } public int getOperType() { return this.operType; } public void setIp(String ip) { this.ip = ip; } public String getIp() { return this.ip; } /** * @return the rolename */ public String getRolename() { return rolename; } /** * @param rolename the rolename to set */ public void setRolename(String rolename) { this.rolename = rolename; } /** * @return the account */ public String getAccount() { return account; } /** * @param account the account to set */ public void setAccount(String account) { this.account = account; } }
[ "568618500@qq.com" ]
568618500@qq.com
5c04f8da0e5ba4b6d6817555ea4c39a9b48c3d7c
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/arc058/B/817319.java
eceb359096d770224f1317c7de31085d661f4de3
[]
no_license
Kawser-nerd/CLCDSA
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
aee32551795763b54acb26856ab239370cac4e75
refs/heads/master
2022-02-09T11:08:56.588303
2022-01-26T18:53:40
2022-01-26T18:53:40
211,783,197
23
9
null
null
null
null
UTF-8
Java
false
false
2,548
java
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.math.BigInteger; import java.util.NoSuchElementException; public class Main { static long[] fac = new long[200001]; static final long mod = 1000000007; static final BigInteger MOD = BigInteger.valueOf(1000000007); public static void main(String[] args) { FastScanner sc = new FastScanner(); PrintWriter out = new PrintWriter(System.out); int h = sc.nextInt(); int w = sc.nextInt(); int a = sc.nextInt(); int b = sc.nextInt(); calc(); long ans = 0; for (int i = b; i < w; i++) { ans = (ans + modCombi(i + (h - a - 1), i) * modCombi((w - i - 1) + (a - 1), w - i - 1) % mod) % mod; } out.println(ans); out.flush(); } static void calc() { fac[0] = 1; for (int i = 1; i < fac.length; i++) { fac[i] = (fac[i - 1] * i) % mod; } } static long modCombi(int n, int r) { long a = BigInteger.valueOf(fac[r]).modInverse(MOD).longValue(); long b = BigInteger.valueOf(fac[n - r]).modInverse(MOD).longValue(); return fac[n] * a % mod * b % mod; } } class FastScanner { private final InputStream in = System.in; private final byte[] buffer = new byte[1024]; private int ptr = 0; private int buflen = 0; private boolean hasNextByte() { if (ptr < buflen) { return true; } else { ptr = 0; try { buflen = in.read(buffer); } catch (IOException e) { e.printStackTrace(); } if (buflen <= 0) { return false; } } return true; } private byte readByte() { if (hasNextByte()) { return buffer[ptr++]; } else { return -1; } } private boolean isPrintableChar(int c) { return '!' <= c && c <= '~'; } private void skipUnprintable() { while (hasNextByte() && !isPrintableChar(buffer[ptr])) { ptr++; } } public boolean hasNext() { skipUnprintable(); return hasNextByte(); } public int nextInt() { if (!hasNext()) { throw new NoSuchElementException(); } int n = 0; boolean minus = false; byte b = readByte(); if (b == '-') { minus = true; b = readByte(); } if (b < '0' || '9' < b) { throw new NumberFormatException(); } while (true) { if ('0' <= b && b <= '9') { n *= 10; n += b - '0'; } else if (b == -1 || !isPrintableChar(b)) { return minus ? -n : n; } else { throw new NumberFormatException(); } b = readByte(); } } }
[ "kwnafi@yahoo.com" ]
kwnafi@yahoo.com
bb5a3b55ff6280cb1e56417e4d59eab0bb367bae
9e9ea5ee255ea56eccbb5de0c106396ac28102c0
/zebra-silkworm/src/main/java/org/zebra/silkworm/plugin/NewsPageSaver.java
c21affaedf2e0e34fbee9ffc0d92c47ce67f35ca
[]
no_license
kadashu/zebra
8dbbfe8a3929c10a43403c2343f85dc670c34add
8367da6cefce9c99813ebeda9488c30220f8be54
refs/heads/master
2021-01-16T20:29:10.146998
2013-03-06T07:33:43
2013-03-06T07:33:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,761
java
package org.zebra.silkworm.plugin; import java.util.List; import java.util.Date; import org.apache.log4j.Logger; import org.zebra.common.Context; import org.zebra.common.CrawlDocument; import org.zebra.common.UrlInfo; import org.zebra.common.flow.Processor; import org.zebra.common.utils.ProcessorUtil; import org.zebra.silkworm.dao.NewsDao; import org.zebra.silkworm.domain.News; public class NewsPageSaver implements Processor { private final Logger logger = Logger.getLogger(NewsPageSaver.class); private NewsDao newsDao = null; public void setNewsDao(NewsDao dao) { this.newsDao = dao; } public NewsDao getNewsDao() { return this.newsDao; } @Override public boolean destroy() { logger.info("successful destroied " + getName()); return true; } @Override public String getName() { return this.getClass().getName(); } @Override public boolean initialize() { logger.info("successful initialize " + getName()); return true; } @Override public boolean process(CrawlDocument doc, Context context) { if (null == doc || null == context) { logger.warn("invalid parameter."); return false; } UrlInfo currentUrlInfo = doc.getUrlInfo(); News news = new News(); String title = (String)context.getVariable(ProcessorUtil.COMMON_PROP_ARTICLETITLE); String publishTime = (String)context.getVariable(ProcessorUtil.COMMON_PROP_PUBLISHTIME); String mainText = (String)context.getVariable(ProcessorUtil.COMMON_PROP_MAINBODY); String source = (String)context.getVariable(ProcessorUtil.COMMON_PROP_PUBLISHSOURCE); List<String> binaryFiles = (List<String>)context.getVariable(ProcessorUtil.COMMON_PROP_BINARYLINKS); news.setMainText(mainText); news.setUrl(currentUrlInfo.getUrl()); news.setPublisher(source); news.setTitle(title); news.setDownloadTime(new Date().toString()); news.setPublishTime(publishTime); if (null != binaryFiles && binaryFiles.size() > 0) { boolean isFirst = true; StringBuilder sb = new StringBuilder(); for (String file : binaryFiles) { if (isFirst) { sb.append(file); isFirst = false; } else { sb.append("," + file); } } news.setAttachmentPath(sb.toString()); } try { this.newsDao.save(news); } catch (Exception ex) { logger.warn("failed to save News Document. cause:" + ex.getMessage()); return false; } return true; } }
[ "jwfing@gmail.com" ]
jwfing@gmail.com
15d87b5df4c113a5b5599667498bc2068a1bd819
7e0e55f371bb0f4f14efd30f5f27ae74a75d46bc
/src/test/java/com/swissre/factory/FactoriesTest.java
a17d0eaff7bf959d8900b80fdc4bbf16b48805bd
[]
no_license
antoniosignore/crypto
5650f0fda8296c43e2d1fdd5f0ae9227f0529278
0f0f05fc601c47c00fbc611f20c68a18311add00
refs/heads/master
2020-12-10T07:42:39.308717
2020-01-13T10:25:26
2020-01-13T10:25:26
233,537,407
0
0
null
2020-10-13T18:49:00
2020-01-13T07:33:02
Java
UTF-8
Java
false
false
833
java
package com.swissre.factory; import com.swissre.filereader.FileReader; import com.swissre.service.QuotesService; import org.junit.Assert; import org.junit.Test; public class FactoriesTest { final FileReader fileReader = FileReaderFactory.newInstance("StreamFileReader"); final QuotesService quotesService = QuoteServiceFactory.newInstance("CRYPTOCOMPARE"); final FileReader fileReaderBad = FileReaderFactory.newInstance("bad"); final QuotesService quotesServiceBad = QuoteServiceFactory.newInstance("bad"); @Test public void should_create_factories() { Assert.assertNotNull(fileReader); Assert.assertNotNull(quotesService); } @Test public void should_not_create_factories() { Assert.assertNull(fileReaderBad); Assert.assertNull(quotesServiceBad); } }
[ "antonio.signore@gmail.com" ]
antonio.signore@gmail.com
4dc722894f8485aa7bad0f03fb7225faa1fc3761
0205999a193bf670cd9d6e5b37e342b75f4e15b8
/spring-core/src/main/java/org/springframework/core/io/VfsResource.java
a13b57f335cd037997c69e2e0757d9b4ce022c22
[ "Apache-2.0" ]
permissive
leaderli/spring-source
18aa9a8c7c5e22d6faa6167e999ff88ffa211ba0
0edd75b2cedb00ad1357e7455a4fe9474b3284da
refs/heads/master
2022-02-18T16:34:19.625966
2022-01-29T08:56:48
2022-01-29T08:56:48
204,468,286
0
0
null
null
null
null
UTF-8
Java
false
false
4,021
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.io; import org.springframework.core.NestedIOException; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URL; /** * JBoss VFS based {@link Resource} implementation. * * <p>As of Spring 4.0, this class supports VFS 3.x on JBoss AS 6+ * (package {@code org.jboss.vfs}) and is in particular compatible with * JBoss AS 7 and WildFly 8+. * * @author Ales Justin * @author Juergen Hoeller * @author Costin Leau * @author Sam Brannen * @see org.jboss.vfs.VirtualFile * @since 3.0 */ public class VfsResource extends AbstractResource { private final Object resource; /** * Create a new {@code VfsResource} wrapping the given resource handle. * * @param resource a {@code org.jboss.vfs.VirtualFile} instance * (untyped in order to avoid a static dependency on the VFS API) */ public VfsResource(Object resource) { Assert.notNull(resource, "VirtualFile must not be null"); this.resource = resource; } @Override public InputStream getInputStream() throws IOException { return VfsUtils.getInputStream(this.resource); } @Override public boolean exists() { return VfsUtils.exists(this.resource); } @Override public boolean isReadable() { return VfsUtils.isReadable(this.resource); } @Override public URL getURL() throws IOException { try { return VfsUtils.getURL(this.resource); } catch (Exception ex) { throw new NestedIOException("Failed to obtain URL for file " + this.resource, ex); } } @Override public URI getURI() throws IOException { try { return VfsUtils.getURI(this.resource); } catch (Exception ex) { throw new NestedIOException("Failed to obtain URI for " + this.resource, ex); } } @Override public File getFile() throws IOException { return VfsUtils.getFile(this.resource); } @Override public long contentLength() throws IOException { return VfsUtils.getSize(this.resource); } @Override public long lastModified() throws IOException { return VfsUtils.getLastModified(this.resource); } @Override public Resource createRelative(String relativePath) throws IOException { if (!relativePath.startsWith(".") && relativePath.contains("/")) { try { return new VfsResource(VfsUtils.getChild(this.resource, relativePath)); } catch (IOException ex) { // fall back to getRelative } } return new VfsResource(VfsUtils.getRelative(new URL(getURL(), relativePath))); } @Override public String getFilename() { return VfsUtils.getName(this.resource); } @Override public String getDescription() { return "VFS resource [" + this.resource + "]"; } @Override public boolean equals(@Nullable Object other) { return (this == other || (other instanceof VfsResource && this.resource.equals(((VfsResource) other).resource))); } @Override public int hashCode() { return this.resource.hashCode(); } }
[ "429243408@qq.com" ]
429243408@qq.com
8d845f224d269d03126be6e2175f8305965f13ea
cd9ac872b19bd95b64b0433f015773d0bfe81b72
/src/main/java/com/znsx/cms/persistent/dao/PolicyDeviceDAO.java
e698cefdf293eec7fe0b5cbbf7e301ee9d5b4f0d
[]
no_license
github188/cms14
6a9f670e6d4590aa15b99d11e94810b459fb65b4
d0184613afb8e55c7bf01de12bde8740cc39b9dd
refs/heads/master
2021-01-18T00:38:46.186300
2016-01-25T06:08:26
2016-01-25T06:08:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,739
java
package com.znsx.cms.persistent.dao; import java.util.List; import java.util.Vector; import com.znsx.cms.persistent.model.PolicyDevice; import com.znsx.cms.service.exception.BusinessException; import com.znsx.cms.service.model.LightVO; /** * 策略与设备的关联数据库接口 * * @author huangbuji * <p /> * Create at 2013-11-26 下午3:37:20 */ public interface PolicyDeviceDAO extends BaseDAO<PolicyDevice, String> { /** * 存储新增策略关联的设备的列表,直到调用excuteBatch方法才批量写入数据库 */ public static List<PolicyDevice> vector = new Vector<PolicyDevice>(); /** * 批量添加 * * @param record * 策略关联的设备对象 * @throws BusinessException * @author huangbuji * <p /> * Create at 2013-11-27 上午10:05:29 */ public void batchInsert(PolicyDevice record) throws BusinessException; /** * 将vector里面的信息批量保存入库 * * @throws BusinessException * @author huangbuji * <p /> * Create at 2013-11-27 上午10:05:55 */ public void excuteBatch() throws BusinessException; /** * 根据策略删除策略关联的设备 * * @param policyId * 策略ID * @throws BusinessException * @author huangbuji * <p /> * Create at 2013-11-27 上午10:19:20 */ public void deleteByPolicy(String policyId) throws BusinessException; /** * 根据策略查询策略关联的设备列表 * * @param policyId * 策略ID * @return 策略关联的设备列表 * @author huangbuji * <p /> * Create at 2013-11-27 下午2:18:57 */ public List<LightVO> listByPolicy(String policyId); }
[ "hbj@scsvision.com" ]
hbj@scsvision.com
ceb8dbcb1e3f136f2706d6f928a90bb266403d41
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/ttpic/filter/ShakaFilterBase.java
2b576ebb30615ff801538b390cf4d63189d1d0fc
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,819
java
package com.tencent.ttpic.filter; import android.opengl.GLES20; import android.text.TextUtils; import com.tencent.filter.C25624m; import com.tencent.filter.C41672h; import com.tencent.ttpic.gles.AttributeParam; import com.tencent.ttpic.gles.GlUtil; import com.tencent.ttpic.gles.GlUtil.DRAW_MODE; import com.tencent.ttpic.shader.Shader; import com.tencent.ttpic.shader.ShaderCreateFactory.PROGRAM_TYPE; import com.tencent.ttpic.shader.ShaderManager; import java.util.HashMap; import java.util.Map; public abstract class ShakaFilterBase { private Map<String, AttributeParam> mAttrParams; private int mCoordNum; private DRAW_MODE mDrawMode; private Map<String, C25624m> mParamList; private int mRenderMode; protected int mSTextureHandle; private boolean needDelProgram; private Shader shader; public abstract float getDefaultParamValue(); public abstract String[] getParamKeys(); public abstract void initParams(); public abstract void setParameterDic(Map<String, Float> map); public ShakaFilterBase(String str, String str2) { this(new Shader(str, str2)); this.needDelProgram = true; } public ShakaFilterBase(PROGRAM_TYPE program_type) { this(ShaderManager.getInstance().getShader(program_type)); } private ShakaFilterBase(Shader shader) { this.shader = shader; this.mAttrParams = new HashMap(); this.mParamList = new HashMap(); this.mSTextureHandle = -1; this.mCoordNum = 4; this.mDrawMode = DRAW_MODE.TRIANGLE_FAN; } public void addAttribParam(String str, float[] fArr) { addAttribParam(str, fArr, false); } public void addAttribParam(String str, float[] fArr, boolean z) { if (!TextUtils.isEmpty(str)) { AttributeParam attributeParam = (AttributeParam) this.mAttrParams.get(str); if (attributeParam == null) { attributeParam = new AttributeParam(str, fArr, z); this.mAttrParams.put(str, attributeParam); } attributeParam.setVertices(fArr); } } public void addAttribParam(AttributeParam attributeParam) { if (attributeParam != null) { AttributeParam attributeParam2 = (AttributeParam) this.mAttrParams.get(attributeParam.name); if (attributeParam2 == null) { attributeParam2 = new AttributeParam(attributeParam.name, attributeParam.vertices, attributeParam.perVertexFloat, false); this.mAttrParams.put(attributeParam.name, attributeParam2); } attributeParam2.setVertices(attributeParam.vertices); attributeParam2.perVertexFloat = attributeParam.perVertexFloat; } } public AttributeParam getAttribParam(String str) { return (AttributeParam) this.mAttrParams.get(str); } public void addParam(C25624m c25624m) { if (c25624m != null) { C25624m c25624m2 = (C25624m) this.mParamList.get(c25624m.name); if (c25624m2 == null) { this.mParamList.put(c25624m.name, c25624m); return; } c25624m.handle = c25624m2.handle; this.mParamList.put(c25624m.name, c25624m); } } public void ApplyGLSLFilter() { initAttribParams(); initParams(); this.shader.compile(); for (C25624m initialParams : this.mParamList.values()) { initialParams.initialParams(this.shader.getShaderProgram()); } for (AttributeParam initialParams2 : this.mAttrParams.values()) { initialParams2.initialParams(this.shader.getShaderProgram()); } this.mSTextureHandle = GLES20.glGetUniformLocation(this.shader.getShaderProgram(), "inputImageTexture"); } public void initAttribParams() { setPositions(GlUtil.ORIGIN_POSITION_COORDS); setTexCords(GlUtil.ORIGIN_TEX_COORDS); } public boolean renderTexture(int i, int i2, int i3) { GLES20.glActiveTexture(33984); GLES20.glBindTexture(3553, i); GLES20.glTexParameterf(3553, 10241, 9729.0f); GLES20.glTexParameterf(3553, 10240, 9729.0f); GLES20.glTexParameterf(3553, 10242, 33071.0f); GLES20.glTexParameterf(3553, 10243, 33071.0f); GLES20.glUniform1i(this.mSTextureHandle, 0); if (this.mDrawMode == DRAW_MODE.TRIANGLE_STRIP) { GLES20.glDrawArrays(5, 0, this.mCoordNum); } else if (this.mDrawMode == DRAW_MODE.TRIANGLES) { GLES20.glDrawArrays(4, 0, this.mCoordNum); } else if (this.mDrawMode == DRAW_MODE.TRIANGLE_FAN) { GLES20.glDrawArrays(6, 0, this.mCoordNum); } else if (this.mDrawMode == DRAW_MODE.LINES) { GLES20.glDrawArrays(1, 0, this.mCoordNum); } if (this.mRenderMode == 0) { GLES20.glFinish(); } else if (this.mRenderMode == 1) { GLES20.glFlush(); } return true; } public void OnDrawFrameGLSL() { this.shader.bind(); for (C25624m params : this.mParamList.values()) { params.setParams(this.shader.getShaderProgram()); } for (AttributeParam attributeParam : this.mAttrParams.values()) { if (attributeParam.handle >= 0) { attributeParam.setParams(this.shader.getShaderProgram()); } } } public void OnDrawFrameGLSLSuper() { this.shader.bind(); for (C25624m params : this.mParamList.values()) { params.setParams(this.shader.getShaderProgram()); } } public boolean setPositions(float[] fArr) { addAttribParam("position", fArr); return true; } public boolean setTexCords(float[] fArr) { addAttribParam("inputTextureCoordinate", fArr); return true; } public boolean setPositions(float[] fArr, boolean z) { addAttribParam("position", fArr, z); return true; } public boolean setTexCords(float[] fArr, boolean z) { addAttribParam("inputTextureCoordinate", fArr, z); return true; } public boolean setCoordNum(int i) { this.mCoordNum = i; return true; } public boolean setRenderMode(int i) { this.mRenderMode = i; return true; } public void setDrawMode(DRAW_MODE draw_mode) { this.mDrawMode = draw_mode; } public void clearGLSLSelf() { if (this.needDelProgram) { this.shader.clear(); } for (C25624m clear : this.mParamList.values()) { clear.clear(); } for (AttributeParam clear2 : this.mAttrParams.values()) { clear2.clear(); } } public int getProgramIds() { return this.shader.getShaderProgram(); } public void RenderProcess(int i, int i2, int i3, int i4, double d, C41672h c41672h) { c41672h.mo67189a(i4, i2, i3, d); OnDrawFrameGLSL(); renderTexture(i, i2, i3); } public void updateFilterShader(PROGRAM_TYPE program_type) { this.shader = ShaderManager.getInstance().getShader(program_type); this.needDelProgram = false; } public void updateFilterShader(String str, String str2) { this.shader = new Shader(str, str2); this.needDelProgram = true; } public void setParameters(Map<String, Float> map) { setParameterDic(fillMissingParams(map, getParamKeys())); } private Map<String, Float> fillMissingParams(Map<String, Float> map, String[] strArr) { for (Object obj : strArr) { if (!map.containsKey(obj)) { map.put(obj, Float.valueOf(getDefaultParamValue())); } } return map; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
6d307489827af1a04e6ef029798613e4969b8322
e270666104d8980ccadba0745559eb31c40c233c
/src/main/java/svenhjol/charm/base/block/CharmBlock.java
5d7cd4126afab83146fd7ac92a3636b69162cf96
[ "MIT" ]
permissive
Devan-Kerman/Charm
31772d1545cc48c99293298ae4d5e6618f291891
8edd701656918f191d93962971edffe6633d32ae
refs/heads/master
2023-04-18T22:17:59.683279
2021-04-17T20:25:32
2021-04-17T20:25:32
358,965,898
0
0
MIT
2021-04-17T19:32:40
2021-04-17T19:32:39
null
UTF-8
Java
false
false
1,094
java
package svenhjol.charm.base.block; import net.minecraft.block.AbstractBlock; import net.minecraft.block.Block; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraft.util.collection.DefaultedList; import svenhjol.charm.base.CharmModule; import svenhjol.charm.base.helper.ModHelper; import java.util.Arrays; import java.util.List; public abstract class CharmBlock extends Block implements ICharmBlock { public CharmModule module; private final List<String> loadedMods; public CharmBlock(CharmModule module, String name, AbstractBlock.Settings props, String... loadedMods) { super(props); this.module = module; this.loadedMods = Arrays.asList(loadedMods); register(module, name); } @Override public void addStacksForDisplay(ItemGroup group, DefaultedList<ItemStack> items) { if (enabled()) super.addStacksForDisplay(group, items); } @Override public boolean enabled() { return module.enabled && loadedMods.stream().allMatch(ModHelper::isLoaded); } }
[ "sven.hjol@protonmail.com" ]
sven.hjol@protonmail.com
d3bf3c6f5a7752f55e8422dd37f98d3344b67908
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_8021.java
9f67ae710caad3307ad9f26ec8ade0bf560d9a4a
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
663
java
private MessageObject findFolderTopMessage(){ ArrayList<TLRPC.Dialog> dialogs=DialogsActivity.getDialogsArray(currentAccount,dialogsType,currentDialogFolderId,false); MessageObject maxMessage=null; if (!dialogs.isEmpty()) { for (int a=0, N=dialogs.size(); a < N; a++) { TLRPC.Dialog dialog=dialogs.get(a); MessageObject object=MessagesController.getInstance(currentAccount).dialogMessage.get(dialog.id); if (object != null && (maxMessage == null || object.messageOwner.date > maxMessage.messageOwner.date)) { maxMessage=object; } if (dialog.pinnedNum == 0) { break; } } } return maxMessage; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
a151ec4a4951d9f70d2e1f393e2f855006cbd387
e9124854d2bb3a40f6642858f3777e89a88b1d54
/custom/toint/tointstorefront/web/src/org/toint/storefront/interceptors/beforecontroller/ThemeBeforeControllerHandler.java
fe9c8bc8b1902b6c2d8b6babdb1b4c079cd282ad
[]
no_license
Prashanth-techouts/Toint
9bcba94fd0422f20131c24cd9e0ec19e789941d6
dbd466fae6303a6c796ffd52f169119a4a7ee134
refs/heads/master
2023-09-03T02:20:49.827317
2021-10-22T10:48:30
2021-10-22T10:48:30
419,990,956
0
0
null
null
null
null
UTF-8
Java
false
false
999
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package org.toint.storefront.interceptors.beforecontroller; import de.hybris.platform.acceleratorstorefrontcommons.interceptors.BeforeControllerHandler; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.ui.context.ThemeSource; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.ThemeResolver; public class ThemeBeforeControllerHandler implements BeforeControllerHandler { @Resource(name = "themeResolver") private ThemeResolver themeResolver; @Resource(name = "themeSource") private ThemeSource themeSource; @Override public boolean beforeController(final HttpServletRequest request, final HttpServletResponse response, final HandlerMethod handler) throws Exception { themeSource.getTheme(themeResolver.resolveThemeName(request)); return true; } }
[ "prashanth.g@techouts.com" ]
prashanth.g@techouts.com
721301facea5038709ea71045d8d2a434084ad99
16f726820b7df1aa31acb6d02bd89ecb38ac186d
/util/hack/src/TemplateCompiler/ASTIncludeFile.java
392553e12f9df53b66366aa103e27fc50aebd92a
[]
no_license
donnaken15/Exterieur
c8bcee1e52a57783525547fc0d2c3a3aa34190d5
550435cba73e3ec3252b97bf77cfd172d7a5e449
refs/heads/master
2020-03-16T13:25:47.231107
2018-05-09T02:41:46
2018-05-09T02:41:46
132,690,016
0
0
null
null
null
null
UTF-8
Java
false
false
825
java
/* */ package TemplateCompiler; /* */ /* */ import java.util.StringTokenizer; /* */ /* */ public class ASTIncludeFile extends ASTJessRule /* */ { /* */ public ASTIncludeFile(int paramInt) { /* 8 */ super(paramInt); /* */ } /* */ /* */ public ASTIncludeFile(NLU paramNLU, int paramInt) { /* 12 */ super(paramNLU, paramInt); /* */ } /* */ /* */ String getfile() { /* 16 */ StringTokenizer localStringTokenizer = new StringTokenizer(dumpTokens()); /* 17 */ localStringTokenizer.nextToken(); /* 18 */ return localStringTokenizer.nextToken(); /* */ } /* */ } /* Location: C:\Program Files (x86)\Extérieur\util\classes\!\TemplateCompiler\ASTIncludeFile.class * Java compiler version: 4 (48.0) * JD-Core Version: 0.7.1 */
[ "myminecraftfriend15@yahoo.com" ]
myminecraftfriend15@yahoo.com
eb54179c0615c88427b03874a24667b8fa3bbe15
23d21d575da06d8a0f0c3a266915df321b5154eb
/java/designpattern/src/main/java/designpattern/gof_adapter/sample02/EmergencySituation.java
80b8bbf0f0d2482c95e952559a1d734cd50676fe
[]
no_license
keepinmindsh/sample
180431ce7fce20808e65d885eab1ca3dca4a76a9
4169918f432e9008b4715f59967f3c0bd619d3e6
refs/heads/master
2023-04-30T19:26:44.510319
2023-04-23T12:43:43
2023-04-23T12:43:43
248,352,910
4
0
null
2023-03-05T23:20:43
2020-03-18T22:03:16
Java
UTF-8
Java
false
false
228
java
package designpattern.gof_adapter.sample02; public class EmergencySituation { public static void main(String[] args) { CarDriver driver = new DriverChanger(new KoreanAirDriver()); driver.Driving(); } }
[ "keepinmindsh@gmail.com" ]
keepinmindsh@gmail.com
c27b5154da38079e51017983c4b8a5e66921aa96
b1eee7989acdad29096ef323a7609b5af2828792
/AppDyC/DaoDyC/src/main/java/mx/gob/sat/siat/dyc/dao/documento/impl/mapper/DocsGestionMapper.java
1bcaefbd593e0f9b69a67069260da473072d327d
[]
no_license
xtaticzero/AppDyC
2185e5d25840ddbb73d0de6c6c0d61a497a6cdfa
1562a358558323ef6adb84fb0e70ba7560200bda
refs/heads/master
2021-09-09T21:50:41.930101
2018-03-19T21:38:45
2018-03-19T21:38:45
73,757,634
1
0
null
null
null
null
UTF-8
Java
false
false
1,739
java
/* * Todos los Derechos Reservados 2013 SAT. * Servicio de Administracion Tributaria (SAT). * * Este software contiene informacion propiedad exclusiva del SAT considerada * Confidencial. Queda totalmente prohibido su uso o divulgacion en forma * parcial o total. */ package mx.gob.sat.siat.dyc.dao.documento.impl.mapper; import java.sql.ResultSet; import java.sql.SQLException; import mx.gob.sat.siat.dyc.vo.SolicitudAdministrarSolVO; import org.springframework.jdbc.core.RowMapper; public class DocsGestionMapper implements RowMapper<SolicitudAdministrarSolVO> { @Override public SolicitudAdministrarSolVO mapRow(ResultSet resultSet, int i) throws SQLException { SolicitudAdministrarSolVO solicitudAdministrarSolVO = new SolicitudAdministrarSolVO(); solicitudAdministrarSolVO.setFechaRegistro(resultSet.getDate("FECHAREGISTRO")); solicitudAdministrarSolVO.setFechaNotificacion(resultSet.getDate("FECHANOTIFICACION")); solicitudAdministrarSolVO.setNombreArchivo(resultSet.getString("NOMBREARCHIVO")); solicitudAdministrarSolVO.setUrl(resultSet.getString("URL")); solicitudAdministrarSolVO.setFolio(resultSet.getString("FOLIONYV")); solicitudAdministrarSolVO.setNumControlDoc(resultSet.getString("NUMCONTROLDOC")); solicitudAdministrarSolVO.setEditFolio(resultSet.getString("FOLIONYV") == null ? Boolean.TRUE : Boolean.FALSE); solicitudAdministrarSolVO.setTieneFechaNotificacion(resultSet.getString("FECHANOTIFICACION") == null ? Boolean.FALSE : Boolean.TRUE); solicitudAdministrarSolVO.setTieneFolioNyV(resultSet.getString("FOLIONYV") == null ? Boolean.FALSE : Boolean.TRUE); return solicitudAdministrarSolVO; } }
[ "emmanuel.estrada@stksat.com" ]
emmanuel.estrada@stksat.com
018255686c572c5dc95d342d162c76c7c97900a0
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-422-5-6-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/listener/chaining/AbstractChainingListener_ESTest_scaffolding.java
25120eb6fd964d8ad4f62ff275ca623bcf490f78
[]
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
466
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Apr 03 17:19:27 UTC 2020 */ package org.xwiki.rendering.listener.chaining; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractChainingListener_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
dfe6cf7ee6a79a7a8e0716ca3bc0ddc2e5ecb235
bd9170a4f4d0a1288f39ca718495bd310c913498
/Server/GSFlashFlood/src/com/spd/grid/tool/ClassUtil.java
a34e75332321de2bda2f3fd7baea910355fc4913
[]
no_license
wklion/GS_IntegratedPlatform
dbeb6c01c77abd8a3b44fe3db25608b3df916bf5
c7e961d6792779959406d88703c414d6f35734e9
refs/heads/master
2021-01-24T16:51:49.910224
2018-02-28T02:24:34
2018-02-28T02:24:34
123,213,917
0
0
null
null
null
null
UTF-8
Java
false
false
508
java
package com.spd.grid.tool; import java.lang.reflect.Method; public class ClassUtil { public Object getFieldValueByName(String fieldName, Object obj){ String firstLetter = fieldName.substring(0, 1).toUpperCase(); String getter = "get" + firstLetter + fieldName.substring(1); Object value = null; try { Method method = obj.getClass().getMethod(getter, new Class[] {}); value = method.invoke(obj, new Object[] {}); } catch (Exception e) { e.printStackTrace(); } return value; } }
[ "304413137@qq.com" ]
304413137@qq.com
a03b859c595fbac9eeafbb78c034b58777465033
8eaff2a93beb45d2ccb301fe09395006cd150ffd
/app/src/main/java/com/kunminx/puremusic/domain/message/PageMessenger.java
f15700678c9eb56f374fa6662c652c47ce7f11bb
[ "Apache-2.0" ]
permissive
kimiffy/Jetpack-MVVM-Best-Practice
4a3302ebafb9e8665f3b98292f9831634588aaea
12ec590355069ebd29c9b16387e30e7382c22c2a
refs/heads/master
2023-04-05T10:04:24.705475
2023-02-10T11:37:14
2023-02-10T11:37:14
219,398,423
2
0
null
2019-11-04T02:10:49
2019-11-04T02:10:48
null
UTF-8
Java
false
false
1,603
java
package com.kunminx.puremusic.domain.message; import com.kunminx.architecture.domain.dispatch.MviDispatcher; import com.kunminx.puremusic.domain.event.Messages; /** * TODO:Note 2022.07.04 * 可于领域层通过 MVI-Dispatcher 实现 "唯一可信源", * 使支持 LiveData 连续发送多种类事件 + 彻底消除 mutable 样板代码 + 彻底杜绝团队新手 LiveData.setValue 误用滥用, * 鉴于本项目场景难发挥 MVI-Dispatcher 潜能,故目前仅以改造 SharedViewModel 为例, * 通过对比 SharedViewModel 和 PageMessenger 易得,后者可简洁优雅实现可靠一致消息分发, * * 具体可参见专为 MVI-Dispatcher 唯一可信源编写 MVI 使用案例: * * https://github.com/KunMinX/MVI-Dispatcher * * Create by KunMinX at 2022/7/4 */ public class PageMessenger extends MviDispatcher<Messages> { @Override protected void onHandle(Messages event) { /* TODO 于唯一可信源中统一鉴权处理业务逻辑,并通过 sendResult 回推结果至表现层 switch (event.eventId) { case Messages.EVENT_ADD_SLIDE_LISTENER: //... 业务逻辑处理 //... 末端消息回推: // event.result.xxx = xxx; // sendResult(event); break; case Messages.EVENT_CLOSE_ACTIVITY_IF_ALLOWED: break; case Messages.EVENT_CLOSE_SLIDE_PANEL_IF_EXPANDED: break; case Messages.EVENT_OPEN_DRAWER: break; } */ sendResult(event); } }
[ "kunminx@gmail.com" ]
kunminx@gmail.com
2863e6111feee58eb987deb5567ac912915c6f7b
78460394b2380ac9b2892733bcdb298191005a7c
/cloud-web/cloud-web-demo/src/main/java/com/shf/controller/RoleController.java
937c142b367dad889f89fd81f121ed4222ac637c
[]
no_license
hello-shf/spring-cloud-cli
77007b4d824331bb3e755bc94bee82c778d20d41
96b51850ccebf92d8ea3e1de1af4bd52e7d3d4f5
refs/heads/master
2022-11-27T13:04:57.332426
2019-09-05T12:33:02
2019-09-05T12:33:02
195,320,647
3
0
null
2022-11-16T12:25:40
2019-07-05T01:43:32
Java
UTF-8
Java
false
false
1,482
java
package com.shf.controller; import com.shf.tool.Response; import lombok.extern.slf4j.Slf4j; //import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * 描述: * * @Author shf * @Date 2019/7/1 16:47 * @Version V1.0 **/ @RestController @Slf4j public class RoleController { // @PreAuthorize("hasAuthority('admin:get')") @RequestMapping("/admin/get") public Response adminGet(HttpServletRequest request, HttpServletResponse response){ Response result = new Response(); result.buildSuccessResponse("admin有权限访问"); log.info("admin有权限访问"); return result; } // @PreAuthorize("hasAuthority('vip:get')") @RequestMapping("/vip/get") public Response vipGet(){ Response response = new Response(); response.buildSuccessResponse("admin,vip有权限访问"); log.info("admin,vip有权限访问"); return response; } // @PreAuthorize("hasAuthority('user:get')") @RequestMapping("/user/get") public Response userGet(){ Response response = new Response(); response.buildSuccessResponse("admin,vip,user有权限访问"); log.info("admin,vip,user有权限访问"); return response; } }
[ "877635632@qq.com" ]
877635632@qq.com
4d7171a711965fb8f594d13fd4a05c70f5072e85
73ddf37cb32504a6f504fe7bff8ef7842b15550a
/src/test/java/com/alibaba/druid/bvt/sql/oracle/select/OracleSelectTest17.java
7656900b73c693d0f8704e9a2f8337832860354e
[ "Apache-2.0" ]
permissive
onlyscorpion/scorpion-sql-parser
2c0ecd4758d5bc5e6f1a50e0fadcfcb012e3524f
a55f9597c7a3a8b9c610cacc5a957a41d3ea018a
refs/heads/master
2021-08-19T14:15:55.462593
2017-11-26T15:47:17
2017-11-26T15:47:17
112,094,653
1
0
null
null
null
null
UTF-8
Java
false
false
2,563
java
/* * Copyright 1999-2017 Alibaba Group Holding Ltd. * * 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.alibaba.druid.bvt.sql.oracle.select; import java.util.List; import org.junit.Assert; import com.alibaba.druid.sql.OracleTest; import com.alibaba.druid.sql.ast.SQLStatement; import com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser; import com.alibaba.druid.sql.dialect.oracle.visitor.OracleSchemaStatVisitor; import com.alibaba.druid.stat.TableStat; public class OracleSelectTest17 extends OracleTest { public void test_0() throws Exception { String sql = "select /* EXEC_FROM_DBMS_XPLAN */ 1, prev_sql_id, prev_child_number from v$session where sid=userenv('sid') and username is not null and prev_hash_value <> 0 "; // OracleStatementParser parser = new OracleStatementParser(sql); List<SQLStatement> statementList = parser.parseStatementList(); SQLStatement statemen = statementList.get(0); print(statementList); Assert.assertEquals(1, statementList.size()); OracleSchemaStatVisitor visitor = new OracleSchemaStatVisitor(); statemen.accept(visitor); System.out.println("Tables : " + visitor.getTables()); System.out.println("fields : " + visitor.getColumns()); System.out.println("coditions : " + visitor.getConditions()); System.out.println("relationships : " + visitor.getRelationships()); System.out.println("orderBy : " + visitor.getOrderByColumns()); Assert.assertEquals(1, visitor.getTables().size()); Assert.assertTrue(visitor.getTables().containsKey(new TableStat.Name("v$session"))); Assert.assertEquals(5, visitor.getColumns().size()); // Assert.assertTrue(visitor.getColumns().contains(new TableStat.Column("pivot_table", "*"))); // Assert.assertTrue(visitor.getColumns().contains(new TableStat.Column("pivot_table", "YEAR"))); // Assert.assertTrue(visitor.getColumns().contains(new TableStat.Column("pivot_table", "order_mode"))); } }
[ "zhengchenglei@jd.com" ]
zhengchenglei@jd.com
20f9c6821afa6ec3accdde00dcb7039c16813e04
d52fd93e19f1b228589cde9f983ac4eaeb2b2e2f
/flexodesktop/modules/flexosourcegeneratormodule/src/main/java/org/openflexo/sgmodule/controller/action/SynchronizeRepositoryCodeGenerationInitializer.java
ba2383724855883a81b9229000490a89e2f96694
[]
no_license
bmangez/openflexo
597dbb3836bcb0ebe7ab1e4f601a22fca470d4d7
7d8773c59b96f460864b4408cf1f2cfc9633cf8d
refs/heads/master
2020-12-25T04:54:16.874230
2012-12-05T16:19:04
2012-12-06T15:41:49
2,393,923
0
0
null
null
null
null
UTF-8
Java
false
false
5,620
java
/* * (c) Copyright 2010-2011 AgileBirds * * This file is part of OpenFlexo. * * OpenFlexo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenFlexo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OpenFlexo. If not, see <http://www.gnu.org/licenses/>. * */ package org.openflexo.sgmodule.controller.action; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.util.logging.Logger; import javax.swing.Icon; import javax.swing.KeyStroke; import org.openflexo.FlexoCst; import org.openflexo.foundation.FlexoException; import org.openflexo.foundation.action.FlexoActionFinalizer; import org.openflexo.foundation.action.FlexoActionInitializer; import org.openflexo.foundation.action.FlexoExceptionHandler; import org.openflexo.generator.action.DismissUnchangedGeneratedFiles; import org.openflexo.generator.action.SynchronizeRepositoryCodeGeneration; import org.openflexo.icon.GeneratorIconLibrary; import org.openflexo.localization.FlexoLocalization; import org.openflexo.sgmodule.SGPreferences; import org.openflexo.sgmodule.controller.SGController; import org.openflexo.sgmodule.view.SourceRepositoryModuleView; import org.openflexo.view.ModuleView; import org.openflexo.view.controller.ActionInitializer; import org.openflexo.view.controller.ControllerActionInitializer; import org.openflexo.view.controller.FlexoController; public class SynchronizeRepositoryCodeGenerationInitializer extends ActionInitializer { private static final Logger logger = Logger.getLogger(ControllerActionInitializer.class.getPackage().getName()); SynchronizeRepositoryCodeGenerationInitializer(SGControllerActionInitializer actionInitializer) { super(SynchronizeRepositoryCodeGeneration.actionType, actionInitializer); } @Override protected SGControllerActionInitializer getControllerActionInitializer() { return (SGControllerActionInitializer) super.getControllerActionInitializer(); } @Override protected FlexoActionInitializer<SynchronizeRepositoryCodeGeneration> getDefaultInitializer() { return new FlexoActionInitializer<SynchronizeRepositoryCodeGeneration>() { @Override public boolean run(ActionEvent e, SynchronizeRepositoryCodeGeneration action) { if (action.getRepository().getDirectory() == null) { FlexoController.notify(FlexoLocalization.localizedForKey("please_supply_valid_directory")); return false; } if (!action.getRepository().getDirectory().exists()) { if (FlexoController.confirm(FlexoLocalization.localizedForKey("directory") + " " + action.getRepository().getDirectory().getAbsolutePath() + " " + FlexoLocalization.localizedForKey("does_not_exist") + "\n" + FlexoLocalization.localizedForKey("would_you_like_to_create_it_and_continue?"))) { action.getRepository().getDirectory().mkdirs(); } else { return false; } } action.setSaveBeforeGenerating(SGPreferences.getSaveBeforeGenerating()); ModuleView cgRepositoryView = getController().moduleViewForObject(action.getRepository()); if (cgRepositoryView != null && cgRepositoryView instanceof SourceRepositoryModuleView) { ((SourceRepositoryModuleView) cgRepositoryView).getConsole().clear(); } action.getProjectGenerator().startHandleLogs(); ((SGController) getController()).getBrowser().setHoldStructure(); return true; } }; } @Override protected FlexoActionFinalizer<SynchronizeRepositoryCodeGeneration> getDefaultFinalizer() { return new FlexoActionFinalizer<SynchronizeRepositoryCodeGeneration>() { @Override public boolean run(ActionEvent e, SynchronizeRepositoryCodeGeneration action) { action.getProjectGenerator().stopHandleLogs(); action.getProjectGenerator().flushLogs(); if (SGPreferences.getAutomaticallyDismissUnchangedFiles()) { DismissUnchangedGeneratedFiles.actionType.makeNewAction(action.getFocusedObject(), action.getGlobalSelection(), action.getEditor()).doAction(); } ((SGController) getController()).getBrowser().resetHoldStructure(); ((SGController) getController()).getBrowser().update(); return true; } }; } @Override protected FlexoExceptionHandler<SynchronizeRepositoryCodeGeneration> getDefaultExceptionHandler() { return new FlexoExceptionHandler<SynchronizeRepositoryCodeGeneration>() { @Override public boolean handleException(FlexoException exception, SynchronizeRepositoryCodeGeneration action) { ((SGController) getController()).getBrowser().resetHoldStructure(); ((SGController) getController()).getBrowser().update(); action.getProjectGenerator().stopHandleLogs(); getControllerActionInitializer().getSGController().disposeProgressWindow(); exception.printStackTrace(); FlexoController.showError(FlexoLocalization.localizedForKey("code_generation_synchronization_for_repository_failed") + ":\n" + exception.getLocalizedMessage()); return true; } }; } @Override protected KeyStroke getShortcut() { return KeyStroke.getKeyStroke(KeyEvent.VK_R, FlexoCst.META_MASK); } @Override protected Icon getEnabledIcon() { return GeneratorIconLibrary.SYNCHRONIZE_CODE_GENERATION_ICON; } }
[ "guillaume.polet@gmail.com" ]
guillaume.polet@gmail.com
e060908756a808b4d7c38c08cbca65431742a437
fc6c869ee0228497e41bf357e2803713cdaed63e
/weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/sns/storage/c.java
8f0d34dc8faedfcd8c118151707d142c156d0e88
[]
no_license
hyb1234hi/reverse-wechat
cbd26658a667b0c498d2a26a403f93dbeb270b72
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
refs/heads/master
2020-09-26T10:12:47.484174
2017-11-16T06:54:20
2017-11-16T06:54:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,599
java
package com.tencent.mm.plugin.sns.storage; import com.tencent.gmtrace.GMTrace; import com.tencent.mm.g.b.aa; import com.tencent.mm.sdk.e.c.a; import java.lang.reflect.Field; import java.util.Map; public final class c extends aa { protected static c.a fTp; static { GMTrace.i(16641119223808L, 123986); c.a locala = new c.a(); locala.gZM = new Field[3]; locala.columns = new String[4]; StringBuilder localStringBuilder = new StringBuilder(); locala.columns[0] = "canvasId"; locala.vmt.put("canvasId", "LONG PRIMARY KEY "); localStringBuilder.append(" canvasId LONG PRIMARY KEY "); localStringBuilder.append(", "); locala.vms = "canvasId"; locala.columns[1] = "canvasXml"; locala.vmt.put("canvasXml", "TEXT"); localStringBuilder.append(" canvasXml TEXT"); localStringBuilder.append(", "); locala.columns[2] = "createTime"; locala.vmt.put("createTime", "LONG"); localStringBuilder.append(" createTime LONG"); locala.columns[3] = "rowid"; locala.vmu = localStringBuilder.toString(); fTp = locala; GMTrace.o(16641119223808L, 123986); } public c() { GMTrace.i(16640850788352L, 123984); GMTrace.o(16640850788352L, 123984); } protected final c.a uw() { GMTrace.i(16640985006080L, 123985); c.a locala = fTp; GMTrace.o(16640985006080L, 123985); return locala; } } /* Location: D:\tools\apktool\weixin6519android1140\jar\classes2-dex2jar.jar!\com\tencent\mm\plugin\sns\storage\c.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "robert0825@gmail.com" ]
robert0825@gmail.com
dac3584cd739572129accc9b366dc17fa15daba2
0529524c95045b3232f6553d18a7fef5a059545e
/app/src/androidTest/java/TestCase_442AA57E3F134A3BFB5DF11C5A535016DAC52A181915B53DBC074656BDB08C30_36996956.java
d9217b08b808920f999e5c207950117541b83a5f
[]
no_license
sunxiaobiu/BasicUnitAndroidTest
432aa3e10f6a1ef5d674f269db50e2f1faad2096
fed24f163d21408ef88588b8eaf7ce60d1809931
refs/heads/main
2023-02-11T21:02:03.784493
2021-01-03T10:07:07
2021-01-03T10:07:07
322,577,379
0
0
null
null
null
null
UTF-8
Java
false
false
534
java
import androidx.appcompat.widget.ActionBarContextView; import androidx.test.runner.AndroidJUnit4; import org.easymock.EasyMock; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) public class TestCase_442AA57E3F134A3BFB5DF11C5A535016DAC52A181915B53DBC074656BDB08C30_36996956 { @Test public void testCase() throws Exception { Object var2 = EasyMock.createMock(ActionBarContextView.class); Object var1 = null; ((ActionBarContextView)var2).setTitle((CharSequence)var1); } }
[ "sunxiaobiu@gmail.com" ]
sunxiaobiu@gmail.com
efd3475345d2385e462df3d3ec87ccbd489ac05f
7a1bb60ca85dd388ed50aac2eda2217b75bb23d6
/android/app/src/main/java/com/jizhi/jlongg/main/adpter/ChooseTeamAdapter.java
88fb37b49e47d07508f849ca469a0f0cb0c6327c
[]
no_license
sqwu/jgj_RN
5b8c83891294cf926fe5165b3e0908f375293c94
7c8c41c88f10819eda4f8450be3fec3eb5c5edfc
refs/heads/master
2022-01-08T06:28:47.865575
2019-05-28T08:06:04
2019-05-28T08:06:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,251
java
package com.jizhi.jlongg.main.adpter; import android.annotation.TargetApi; import android.graphics.Color; import android.os.Build; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.TextUtils; import android.text.style.ForegroundColorSpan; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.jizhi.jlongg.R; import com.jizhi.jlongg.groupimageviews.NineGroupChatGridImageView; import com.jizhi.jlongg.main.activity.BaseActivity; import com.jizhi.jlongg.main.bean.GroupDiscussionInfo; import com.jizhi.jlongg.main.util.MessageUtil; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * 功能:聊天适配器 * 时间:2016-3-18 19:13 * 作者:xuj */ public class ChooseTeamAdapter extends BaseAdapter { /** * 成员列表数据 */ private List<GroupDiscussionInfo> list; /** * xml数据解析器 */ private LayoutInflater inflater; /** * true 需要显示成员数量 */ private boolean showMemberNumber; /** * 显示类型 * 1、表示只显示项目,班组 2、表示查询群聊 */ private int showGroupType; /** * 过滤文本 */ private String filterValue; public ChooseTeamAdapter(BaseActivity activity, List<GroupDiscussionInfo> list, boolean showMemberNumber, int showGroupType) { super(); this.list = list; this.showMemberNumber = showMemberNumber; this.showGroupType = showGroupType; inflater = LayoutInflater.from(activity); } public void updateListView(List<GroupDiscussionInfo> list) { this.list = list; notifyDataSetChanged(); } @Override public int getCount() { return list == null ? 0 : list.size(); } @Override public Object getItem(int position) { return list.get(position); } @Override public long getItemId(int position) { return position; } @TargetApi(Build.VERSION_CODES.JELLY_BEAN) @Override public View getView(final int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = inflater.inflate(R.layout.item_choose_team, null); holder = new ViewHolder(convertView); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } bindData(holder, position); return convertView; } private void bindData(final ViewHolder holder, int position) { final GroupDiscussionInfo bean = list.get(position); String groupName = bean.getGroup_name(); if (!TextUtils.isEmpty(filterValue)) { //如果过滤文字不为空 Pattern p = Pattern.compile(filterValue); if (!TextUtils.isEmpty(groupName)) { //姓名不为空的时才进行模糊匹配 SpannableStringBuilder builder = new SpannableStringBuilder(groupName); Matcher nameMatch = p.matcher(groupName); while (nameMatch.find()) { ForegroundColorSpan redSpan = new ForegroundColorSpan(Color.parseColor("#EF272F")); builder.setSpan(redSpan, nameMatch.start(), nameMatch.end(), Spannable.SPAN_INCLUSIVE_INCLUSIVE); } holder.proName.setText(builder); } } else { // String str = "<font color='#333333'>" + groupName + "</font>"; // if (showMemberNumber) { // str += "<font color='#333333'>(" + bean.getMembers_num() + ")</font>"; // } // holder.proName.setText(Html.fromHtml(str)); holder.proName.setText(groupName); } if (!TextUtils.isEmpty(bean.getClass_type()) && (bean.getMembers_head_pic() != null && bean.getMembers_head_pic().size() > 0)) { holder.teamHeads.setVisibility(View.VISIBLE); holder.teamHeads.setImagesData(bean.getMembers_head_pic()); } else { holder.teamHeads.setVisibility(View.INVISIBLE); } if (showMemberNumber) { holder.membersNum.setVisibility(View.VISIBLE); holder.membersNum.setText("(" + bean.getMembers_num() + ")"); } else { holder.membersNum.setVisibility(View.GONE); } if (position == getCount() - 1) { holder.itemDivider.setVisibility(View.GONE); holder.bottomDesc.setVisibility(View.VISIBLE); holder.bottomDesc.setText("共" + list.size() + (showGroupType == MessageUtil.TYPE_GROUP_AND_TEAM ? "个项目" : "个群组")); } else { holder.itemDivider.setVisibility(View.VISIBLE); holder.bottomDesc.setVisibility(View.GONE); } } class ViewHolder { /** * 讨论组聊天头像 */ private NineGroupChatGridImageView teamHeads; /** * 名称 */ private TextView proName; /** * 人数 */ private TextView membersNum; /** * 底部人数 */ private TextView bottomDesc; /** * 分割线 */ private View itemDivider; public ViewHolder(View view) { proName = (TextView) view.findViewById(R.id.proName); membersNum = (TextView) view.findViewById(R.id.membersNum); bottomDesc = (TextView) view.findViewById(R.id.bottomDesc); teamHeads = (NineGroupChatGridImageView) view.findViewById(R.id.teamHeads); itemDivider = view.findViewById(R.id.itemDiver); if (!showMemberNumber) { membersNum.setVisibility(View.GONE); } } } public List<GroupDiscussionInfo> getList() { return list; } public void setList(List<GroupDiscussionInfo> list) { this.list = list; } public String getFilterValue() { return filterValue; } public void setFilterValue(String filterValue) { this.filterValue = filterValue; } }
[ "1261545300@qq.com" ]
1261545300@qq.com
c0ffe9ed0c7ee573503e7e5343d5e189e536a6b7
2d70d4ac27a66b6a623dd7df7e300c307b0c054b
/src/main/java/com/envyclient/core/impl/commands/ExitCommand.java
b0292a682faad34efe2d82f68d50dbd47aa4c377
[]
no_license
MaDMeDiaz/core
03523be06f467db17ad333ec4b1211cc494415aa
d5132a1519874534afce9fcc174c4b20bc337317
refs/heads/master
2020-07-05T08:12:12.899771
2019-05-06T00:00:51
2019-05-06T00:00:51
202,584,988
1
0
null
2019-08-15T17:35:46
2019-08-15T17:35:46
null
UTF-8
Java
false
false
523
java
package com.envyclient.core.impl.commands; import com.mojang.realmsclient.gui.ChatFormatting; import me.ihaq.commandmanager.Command; import net.minecraft.client.Minecraft; public class ExitCommand implements Command { @Override public boolean onCommand(String[] strings) { Minecraft.getMinecraft().shutdown(); return true; } @Override public String usage() { return "USAGE: " + ChatFormatting.GRAY + "[ " + ChatFormatting.WHITE + "exit" + ChatFormatting.GRAY + " ]"; } }
[ "haqgamer66@gmail.com" ]
haqgamer66@gmail.com
6d3bc7c2a0067126f32ce990853f70ca22a69a43
5d715e8e8ff3573bd60f30820c2cec50c4c4c076
/ch06/src/ch06/N6_22.java
dc5d37d48a2a1144ba6c0c7cca0028bb5c1cd9aa
[]
no_license
scox1090/work_java
e75d203cb5702ac230a3435231fb266b13105fb6
89507165c9f5c4293ed5ccb7f1faf96e3fb78794
refs/heads/master
2020-03-21T02:36:42.885130
2018-07-25T12:29:34
2018-07-25T12:29:34
134,252,683
0
0
null
null
null
null
UHC
Java
false
false
521
java
package ch06; public class N6_22 { static boolean isNumber(String str) { if (str == null || str.equals("")) return false; for (int i = 0; i < str.length(); i++) { char ch = str.charAt(i); if (ch < '0' || ch > '9') return false; } return true; } public static void main(String[] args) { String str = "123"; System.out.println(str + "는 숫자입니까? " + isNumber(str)); str = "1234o"; System.out.println(str + "는 숫자입니까? " + isNumber(str)); } }
[ "KOITT@KOITT-PC" ]
KOITT@KOITT-PC
20f1281eb82ed95fbdcf2e352604ad57f7ed8399
237fe95c6238b5cfc5761e5da57f9d2ebd6eb0e4
/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/EpisodeofcareTypeEnumFactory.java
ede75478ac4da0b712443b64cab583e02ed441ce
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
xymondeath/hapi-fhir
fb9ca9181395e3ab1c639cd53d54937c7b2304cb
f5f9dff3915f3acbb43aa8b69a08ac374a88cbdb
refs/heads/master
2020-04-12T09:49:52.682163
2018-12-18T19:09:20
2018-12-18T19:09:20
162,409,610
0
0
Apache-2.0
2018-12-19T08:52:51
2018-12-19T08:52:51
null
UTF-8
Java
false
false
2,939
java
package org.hl7.fhir.r4.model.codesystems; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 import org.hl7.fhir.r4.model.EnumFactory; public class EpisodeofcareTypeEnumFactory implements EnumFactory<EpisodeofcareType> { public EpisodeofcareType fromCode(String codeString) throws IllegalArgumentException { if (codeString == null || "".equals(codeString)) return null; if ("hacc".equals(codeString)) return EpisodeofcareType.HACC; if ("pac".equals(codeString)) return EpisodeofcareType.PAC; if ("diab".equals(codeString)) return EpisodeofcareType.DIAB; if ("da".equals(codeString)) return EpisodeofcareType.DA; if ("cacp".equals(codeString)) return EpisodeofcareType.CACP; throw new IllegalArgumentException("Unknown EpisodeofcareType code '"+codeString+"'"); } public String toCode(EpisodeofcareType code) { if (code == EpisodeofcareType.HACC) return "hacc"; if (code == EpisodeofcareType.PAC) return "pac"; if (code == EpisodeofcareType.DIAB) return "diab"; if (code == EpisodeofcareType.DA) return "da"; if (code == EpisodeofcareType.CACP) return "cacp"; return "?"; } public String toSystem(EpisodeofcareType code) { return code.getSystem(); } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
cacf6af281e37fce359cb66d5e2e2c54362ad0ac
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_5/Testnull_463.java
293d19e83e38b87a5c2c8645b9694da582bc5f0b
[]
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
300
java
package org.gradle.test.performancenull_5; import static org.junit.Assert.*; public class Testnull_463 { private final Productionnull_463 production = new Productionnull_463("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
eea6d3b37129debd5df95fc720256ea5ccf0b251
b59f5a4fa9c6151ee1f757a0d265543eea7331dc
/examples/fuml/language_workbench/org.modelexecution.xmof.examples.fuml.fewsteps.xmof.dynamic/src/fumlConfigurationFewSteps/impl/ActivityParameterNodeConfigurationImpl.java
00d60d3896a3a12dd4610d43a887587f8ad3ac91
[]
no_license
vatmi/moliz.gemoc
a8b7a6ac5d7bafb6b331655010975f2a44206d95
471f3128608986ddee1a7c4722d3620446e3726d
refs/heads/master
2020-03-30T23:32:19.818605
2017-10-20T09:20:17
2017-10-20T09:21:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,810
java
/** */ package fumlConfigurationFewSteps.impl; import fumlConfigurationFewSteps.ActivityContentConfiguration; import fumlConfigurationFewSteps.ActivityNodeConfiguration; import fumlConfigurationFewSteps.ActivityParameterNodeConfiguration; import fumlConfigurationFewSteps.ElementConfiguration; import fumlConfigurationFewSteps.FumlConfigurationFewStepsPackage; import fumlConfigurationFewSteps.LociFewSteps.LociFewStepsPackage; import fumlConfigurationFewSteps.LociFewSteps.SemanticVisitor; import fumlConfigurationFewSteps.NamedElementConfiguration; import fumlConfigurationFewSteps.ObjectNodeConfiguration; import fumlConfigurationFewSteps.RedefinableElementConfiguration; import fumlConfigurationFewSteps.TypedElementConfiguration; import java.util.Collection; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.uml2.uml.internal.impl.ActivityParameterNodeImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Activity Parameter Node Configuration</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link fumlConfigurationFewSteps.impl.ActivityParameterNodeConfigurationImpl#getSemanticVisitor <em>Semantic Visitor</em>}</li> * </ul> * * @generated */ public class ActivityParameterNodeConfigurationImpl extends ActivityParameterNodeImpl implements ActivityParameterNodeConfiguration { /** * The cached value of the '{@link #getSemanticVisitor() <em>Semantic Visitor</em>}' reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getSemanticVisitor() * @generated * @ordered */ protected EList<SemanticVisitor> semanticVisitor; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ActivityParameterNodeConfigurationImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return FumlConfigurationFewStepsPackage.eINSTANCE.getActivityParameterNodeConfiguration(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<SemanticVisitor> getSemanticVisitor() { if (semanticVisitor == null) { semanticVisitor = new EObjectWithInverseResolvingEList<SemanticVisitor>(SemanticVisitor.class, this, FumlConfigurationFewStepsPackage.ACTIVITY_PARAMETER_NODE_CONFIGURATION__SEMANTIC_VISITOR, LociFewStepsPackage.SEMANTIC_VISITOR__RUNTIME_MODEL_ELEMENT); } return semanticVisitor; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case FumlConfigurationFewStepsPackage.ACTIVITY_PARAMETER_NODE_CONFIGURATION__SEMANTIC_VISITOR: return ((InternalEList<InternalEObject>)(InternalEList<?>)getSemanticVisitor()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case FumlConfigurationFewStepsPackage.ACTIVITY_PARAMETER_NODE_CONFIGURATION__SEMANTIC_VISITOR: return ((InternalEList<?>)getSemanticVisitor()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case FumlConfigurationFewStepsPackage.ACTIVITY_PARAMETER_NODE_CONFIGURATION__SEMANTIC_VISITOR: return getSemanticVisitor(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case FumlConfigurationFewStepsPackage.ACTIVITY_PARAMETER_NODE_CONFIGURATION__SEMANTIC_VISITOR: getSemanticVisitor().clear(); getSemanticVisitor().addAll((Collection<? extends SemanticVisitor>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case FumlConfigurationFewStepsPackage.ACTIVITY_PARAMETER_NODE_CONFIGURATION__SEMANTIC_VISITOR: getSemanticVisitor().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case FumlConfigurationFewStepsPackage.ACTIVITY_PARAMETER_NODE_CONFIGURATION__SEMANTIC_VISITOR: return semanticVisitor != null && !semanticVisitor.isEmpty(); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { if (baseClass == ElementConfiguration.class) { switch (derivedFeatureID) { case FumlConfigurationFewStepsPackage.ACTIVITY_PARAMETER_NODE_CONFIGURATION__SEMANTIC_VISITOR: return FumlConfigurationFewStepsPackage.ELEMENT_CONFIGURATION__SEMANTIC_VISITOR; default: return -1; } } if (baseClass == NamedElementConfiguration.class) { switch (derivedFeatureID) { default: return -1; } } if (baseClass == RedefinableElementConfiguration.class) { switch (derivedFeatureID) { default: return -1; } } if (baseClass == ActivityContentConfiguration.class) { switch (derivedFeatureID) { default: return -1; } } if (baseClass == ActivityNodeConfiguration.class) { switch (derivedFeatureID) { default: return -1; } } if (baseClass == TypedElementConfiguration.class) { switch (derivedFeatureID) { default: return -1; } } if (baseClass == ObjectNodeConfiguration.class) { switch (derivedFeatureID) { default: return -1; } } return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { if (baseClass == ElementConfiguration.class) { switch (baseFeatureID) { case FumlConfigurationFewStepsPackage.ELEMENT_CONFIGURATION__SEMANTIC_VISITOR: return FumlConfigurationFewStepsPackage.ACTIVITY_PARAMETER_NODE_CONFIGURATION__SEMANTIC_VISITOR; default: return -1; } } if (baseClass == NamedElementConfiguration.class) { switch (baseFeatureID) { default: return -1; } } if (baseClass == RedefinableElementConfiguration.class) { switch (baseFeatureID) { default: return -1; } } if (baseClass == ActivityContentConfiguration.class) { switch (baseFeatureID) { default: return -1; } } if (baseClass == ActivityNodeConfiguration.class) { switch (baseFeatureID) { default: return -1; } } if (baseClass == TypedElementConfiguration.class) { switch (baseFeatureID) { default: return -1; } } if (baseClass == ObjectNodeConfiguration.class) { switch (baseFeatureID) { default: return -1; } } return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); } } //ActivityParameterNodeConfigurationImpl
[ "ebousse@users.noreply.github.com" ]
ebousse@users.noreply.github.com
62e07782c24d0b9d227a886804237349524bc09e
6839a6da1a9714088412a7edb97d56c372541a1c
/plus/src/main/java/com/example/youhe/youhecheguanjiaplus/ui/base/ExpressCheckActivity.java
ceebe6b99bf41cb384c4494d2bdf569e3c5866fe
[]
no_license
laiyongshan/feigouplus
a66544a75896d58442063cc6aee8162f611c819a
34449b312e6bb224d3cd2968c7ae132178bdd834
refs/heads/master
2021-01-20T09:49:54.769419
2017-10-16T06:06:34
2017-10-16T06:06:34
101,609,229
1
0
null
null
null
null
UTF-8
Java
false
false
5,421
java
package com.example.youhe.youhecheguanjiaplus.ui.base; import android.app.Activity; import android.os.Build; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.android.volley.VolleyError; import com.example.youhe.youhecheguanjiaplus.R; import com.example.youhe.youhecheguanjiaplus.adapter.TraceListAdapter; import com.example.youhe.youhecheguanjiaplus.bean.Trace; import com.example.youhe.youhecheguanjiaplus.db.biz.TokenSQLUtils; import com.example.youhe.youhecheguanjiaplus.https.URLs; import com.example.youhe.youhecheguanjiaplus.logic.VolleyInterface; import com.example.youhe.youhecheguanjiaplus.utils.EncryptUtil; import com.example.youhe.youhecheguanjiaplus.utils.SystemBarUtil; import com.example.youhe.youhecheguanjiaplus.utils.UIHelper; import com.example.youhe.youhecheguanjiaplus.utils.VolleyUtil; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.HashMap; import java.util.List; /** * Created by Administrator on 2017/6/16. */ public class ExpressCheckActivity extends Activity{ private ImageView back_iv; private RecyclerView rvTrace; private List<Trace> traceList = new ArrayList<Trace>(); private TraceListAdapter adapter; private TextView express_status_tv,express_name_tv,express_code_tv,timediff_tv; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_check_express); // 4.4及以上版本开启 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { SystemBarUtil.setTranslucentStatus(true,ExpressCheckActivity.this); } SystemBarUtil.useSystemBarTint(ExpressCheckActivity.this); String express=getIntent().getStringExtra("express"); initView();//初始化控件 initData(express!=null?express:"");//获取数据 } private void initView(){ back_iv= (ImageView) findViewById(R.id.back_iv); back_iv.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ finish(); } }); express_status_tv= (TextView) findViewById(R.id.express_status_tv); express_name_tv= (TextView) findViewById(R.id.express_name_tv); express_code_tv= (TextView) findViewById(R.id.express_code_tv); timediff_tv= (TextView) findViewById(R.id.timediff_tv); rvTrace= (RecyclerView) findViewById(R.id.rvTrace); } /** * 初始化数据 * */ private void initData(String express){ UIHelper.showPd(ExpressCheckActivity.this); HashMap map=new HashMap(); map.put("token", TokenSQLUtils.check()); map.put("express",express); VolleyUtil.getVolleyUtil(ExpressCheckActivity.this).StringRequestPostVolley(URLs.GET_EXPRESS_INFO, EncryptUtil.encrypt(map), new VolleyInterface() { @Override public void ResponseResult(Object jsonObject) { try { JSONObject obj=new JSONObject(EncryptUtil.decryptJson(jsonObject.toString(),ExpressCheckActivity.this)); String status=obj.optString("status"); if(status.equals("ok")) { JSONObject dataObj = obj.optJSONObject("data"); JSONArray arr = dataObj.optJSONArray("data"); String expTextName = dataObj.optString("expTextName"); String mailNo = dataObj.optString("mailNo"); String timediff = dataObj.optString("timediff"); express_status_tv.setText("" + dataObj.optString("status")); express_name_tv.setText("" + expTextName); express_code_tv.setText("" + mailNo); timediff_tv.setText("耗时" + timediff); Trace trace; for (int i = 0; i < arr.length(); i++) { trace = new Trace(); trace.setAcceptStation(arr.getJSONObject(i).getString("context")); trace.setAcceptTime(arr.getJSONObject(i).getString("time")); traceList.add(trace); } adapter = new TraceListAdapter(ExpressCheckActivity.this, traceList); rvTrace.setLayoutManager(new LinearLayoutManager(ExpressCheckActivity.this)); rvTrace.setAdapter(adapter); }else{ if(obj.has("show_msg")){ Toast.makeText(ExpressCheckActivity.this,""+obj.optString("show_msg"),Toast.LENGTH_SHORT).show(); } } }catch (JSONException e) { e.printStackTrace(); }finally{ UIHelper.dismissPd(); } } @Override public void ResponError(VolleyError volleyError) { } }); } }
[ "850422483@qq.com" ]
850422483@qq.com
5869cdfe60655c29e5de8bf2fbe2d568b04e92b4
077d623883ad0e3895156f54ad1f68565bad5aab
/trunk/J2SE/TTT_cn/src/com/server/finance/Finance.java
72d3d80e4a3186ea9a21095314d1ba2af281b47f
[]
no_license
BGCX262/zsfwebserver-svn-to-git
50c0d28c9a7cc8d9980df3ef099c0d873a1f89ee
95eb8e4f8ede1a58cd8a61f28fea4f64969a8ee7
refs/heads/master
2020-05-05T07:15:00.593832
2015-08-23T06:55:12
2015-08-23T06:55:12
41,255,564
0
2
null
null
null
null
UTF-8
Java
false
false
441
java
package com.server.finance; import com.database.model.bean.FinanceBean; public interface Finance { /** * <h1>not permit to modify the return value</h1> */ public FinanceBean getFinance(long id); public boolean charge(FinanceBean bean); public boolean consume(FinanceBean addend); /*public boolean isMaster(long id);*/ public boolean afford(FinanceBean augend, FinanceBean addend); public void offline(long id); }
[ "you@example.com" ]
you@example.com
b69f53d89f28b603db2726184d6c48344fb240e1
4d6f449339b36b8d4c25d8772212bf6cd339f087
/netreflected/src/Core/PresentationCore,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35/system/windows/input/Tablet.java
cd6938788799882c8d3f82283849c430f9c45745
[ "MIT" ]
permissive
lvyitian/JCOReflector
299a64550394db3e663567efc6e1996754f6946e
7e420dca504090b817c2fe208e4649804df1c3e1
refs/heads/master
2022-12-07T21:13:06.208025
2020-08-28T09:49:29
2020-08-28T09:49:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,616
java
/* * MIT License * * Copyright (c) 2020 MASES s.r.l. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /************************************************************************************** * <auto-generated> * This code was generated from a template using JCOReflector * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. * </auto-generated> *************************************************************************************/ package system.windows.input; import org.mases.jcobridge.*; import org.mases.jcobridge.netreflection.*; import java.util.ArrayList; // Import section import system.windows.input.TabletDevice; import system.windows.input.TabletDeviceCollection; /** * The base .NET class managing System.Windows.Input.Tablet, PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Extends {@link NetObject}. * <p> * * See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Input.Tablet" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Input.Tablet</a> */ public class Tablet extends NetObject { /** * Fully assembly qualified name: PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 */ public static final String assemblyFullName = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; /** * Assembly name: PresentationCore */ public static final String assemblyShortName = "PresentationCore"; /** * Qualified class name: System.Windows.Input.Tablet */ public static final String className = "System.Windows.Input.Tablet"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Tablet(Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link Tablet}, a cast assert is made to check if types are compatible. */ public static Tablet cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new Tablet(from.getJCOInstance()); } // Constructors section public Tablet() throws Throwable { } // Methods section // Properties section public TabletDevice getCurrentTabletDevice() throws Throwable, system.ArgumentException, system.ArgumentNullException, system.security.SecurityException, system.ObjectDisposedException, system.UnauthorizedAccessException, system.io.IOException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.componentmodel.Win32Exception, system.OverflowException, system.componentmodel.InvalidEnumArgumentException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("CurrentTabletDevice"); return new TabletDevice(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TabletDeviceCollection getTabletDevices() throws Throwable, system.ArgumentException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.security.SecurityException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.UnauthorizedAccessException, system.io.IOException, system.InvalidOperationException, system.componentmodel.InvalidEnumArgumentException, system.componentmodel.Win32Exception, system.OverflowException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("TabletDevices"); return new TabletDeviceCollection(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }
[ "mario.mastrodicasa@masesgroup.com" ]
mario.mastrodicasa@masesgroup.com
1f9de8c2a23cef27a52f211206b5873bb2a31722
197cb19f16a2674453434bea6dae4b4425dfae5b
/src/main/java/i5/ex2.java
0d9fd7f098b1474309d7f94e9aa464e15f2d6659
[]
no_license
barba-dorada/j8se
815e822f36afb649c67fbfb4b6f93f48bc949421
f9c7e2e4c3dbba7fb2a59842991820cdbdae6c47
refs/heads/master
2021-01-13T09:07:34.432865
2017-02-12T22:14:57
2017-02-12T22:14:57
68,920,199
0
0
null
null
null
null
UTF-8
Java
false
false
476
java
package i5; import java.time.LocalDate; /** 2. What happens when you add one year to LocalDate.of(2000, 2, 29)? Four years? Four times one year? */ public class ex2 { public static void main(String[] args) { LocalDate d = LocalDate.of(2000, 2, 29); System.out.println(d); System.out.println(d.plusYears(1)); System.out.println(d.plusYears(4)); System.out.println(d.plusYears(1).plusYears(1).plusYears(1).plusYears(1)); } }
[ "vad.tishenko@gmail.com" ]
vad.tishenko@gmail.com
24ad837c5cca798201cb771c2e8db4011585b7f7
0d99f22858afa00110201dccd2f177a04812bd94
/src/main/java/jp/plusplus/fbs/block/BlockMushroom.java
3d355155dcc3fb1e7f5f7a561ff0fa90efee44e6
[]
no_license
faroreJP/Insanity-Assorted-Magics
8123f70ac8c98dd85925fa1880a8591fdfffbc4d
fc2dddf445cbd2539d498f0dee172b05b28c58c4
refs/heads/master
2021-01-09T20:26:27.050434
2016-06-01T15:03:59
2016-06-01T15:03:59
60,179,531
0
0
null
null
null
null
UTF-8
Java
false
false
4,245
java
package jp.plusplus.fbs.block; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import jp.plusplus.fbs.FBS; import jp.plusplus.fbs.Registry; import jp.plusplus.fbs.alchemy.AlchemyRegistry; import jp.plusplus.fbs.alchemy.ItemAlchemyMaterial; import jp.plusplus.fbs.item.ItemCore; import jp.plusplus.fbs.tileentity.TileEntityHavestable; import jp.plusplus.fbs.tileentity.TileEntityHavestableMushroom; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import java.util.ArrayList; import java.util.List; import java.util.Random; /** * Created by plusplus_F on 2016/02/23. */ public class BlockMushroom extends BlockHerb { public BlockMushroom() { setBlockName("mushroom"); } @Override @SideOnly(Side.CLIENT) public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) { for (int i = 0; i < 3; i++) p_149666_3_.add(new ItemStack(p_149666_1_, 1, i)); } @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityHavestableMushroom(60, p_149915_2_); } @Override public String getUnlocalizedName(int meta) { return "tile.fbs.mushroom"+meta; } @Override public ArrayList<ItemStack> getHarvestItems(World world, int x, int y, int z) { ArrayList<ItemStack> ret = new ArrayList<ItemStack>(); int meta = world.getBlockMetadata(x, y, z); switch (meta){ case 0: ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 25)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 26)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 27)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 29)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 41)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterialEatable, 1, 0)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterialEatable, 1, 2)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterialEatable, 1, 3)); break; case 1: ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 25)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 26)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 27)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 28)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 29)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 41)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterialEatable, 1, 1)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterialEatable, 1, 2)); break; case 2: ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 42)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 43)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 44)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterial, 1, 45)); ret.add(AlchemyRegistry.getItemStack(ItemCore.alchemyMaterialEatable, 1, 1)); break; } return ret; } @Override public ArrayList<ItemStack> harvest(World world, int x, int y, int z, Random rand) { ArrayList<ItemStack> ret = new ArrayList<ItemStack>(); ArrayList<ItemStack> list = getHarvestItems(world, x, y, z); int num = 1 + rand.nextInt(2); int index=rand.nextInt(list.size()-1); for (int i = 0; i < num; i++) { ret.add(list.get(index).copy()); } getTE(world, x, y, z).onHarvest(); return ret; } }
[ "creator.farore@gmail.com" ]
creator.farore@gmail.com
c441c23031697f2338a48065c1a8374d01e842b0
8c085f12963e120be684f8a049175f07d0b8c4e5
/castor/branches/query_engine/xmlctf-framework/src/main/java/org/exolab/castor/tests/framework/testDescriptor/types/TypeType.java
a6a5dd68126751bb9f5f5ccd6c94b630f7f90819
[]
no_license
alam93mahboob/castor
9963d4110126b8f4ef81d82adfe62bab8c5f5bce
974f853be5680427a195a6b8ae3ce63a65a309b6
refs/heads/master
2020-05-17T08:03:26.321249
2014-01-01T20:48:45
2014-01-01T20:48:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,058
java
/* * This class was automatically generated with * <a href="http://www.castor.org">Castor 1.1-M2</a>, using an XML * Schema. * $Id: TypeType.java 6721 2007-01-05 04:33:29Z ekuns $ */ package org.exolab.castor.tests.framework.testDescriptor.types; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import java.util.Hashtable; /** * Class TypeType. * * @version $Revision: 6721 $ $Date$ */ public class TypeType implements java.io.Serializable { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * The Marshal type */ public static final int MARSHAL_TYPE = 0; /** * The instance of the Marshal type */ public static final TypeType MARSHAL = new TypeType(MARSHAL_TYPE, "Marshal"); /** * The Unmarshal type */ public static final int UNMARSHAL_TYPE = 1; /** * The instance of the Unmarshal type */ public static final TypeType UNMARSHAL = new TypeType(UNMARSHAL_TYPE, "Unmarshal"); /** * The Both type */ public static final int BOTH_TYPE = 2; /** * The instance of the Both type */ public static final TypeType BOTH = new TypeType(BOTH_TYPE, "Both"); /** * Field _memberTable. */ private static java.util.Hashtable _memberTable = init(); /** * Field type. */ private int type = -1; /** * Field stringValue. */ private java.lang.String stringValue = null; //----------------/ //- Constructors -/ //----------------/ private TypeType(final int type, final java.lang.String value) { super(); this.type = type; this.stringValue = value; } //-----------/ //- Methods -/ //-----------/ /** * Method enumerate.Returns an enumeration of all possible * instances of TypeType * * @return an Enumeration over all possible instances of TypeTyp */ public static java.util.Enumeration enumerate( ) { return _memberTable.elements(); } /** * Method getType.Returns the type of this TypeType * * @return the type of this TypeType */ public int getType( ) { return this.type; } /** * Method init. * * @return the initialized Hashtable for the member table */ private static java.util.Hashtable init( ) { Hashtable members = new Hashtable(); members.put("Marshal", MARSHAL); members.put("Unmarshal", UNMARSHAL); members.put("Both", BOTH); return members; } /** * Method readResolve. will be called during deserialization to * replace the deserialized object with the correct constant * instance. * * @return this deserialized object */ private java.lang.Object readResolve( ) { return valueOf(this.stringValue); } /** * Method toString.Returns the String representation of this * TypeType * * @return the String representation of this TypeType */ public java.lang.String toString( ) { return this.stringValue; } /** * Method valueOf.Returns a new TypeType based on the given * String value. * * @param string * @return the TypeType value of parameter 'string' */ public static org.exolab.castor.tests.framework.testDescriptor.types.TypeType valueOf( final java.lang.String string) { java.lang.Object obj = null; if (string != null) { obj = _memberTable.get(string); } if (obj == null) { String err = "" + string + " is not a valid TypeType"; throw new IllegalArgumentException(err); } return (TypeType) obj; } }
[ "rjoachim@b24b0d9a-6811-0410-802a-946fa971d308" ]
rjoachim@b24b0d9a-6811-0410-802a-946fa971d308
cf3ad3487b56b13c75128c49b4a10bc765f4e45e
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/clickhouse-20220101/src/main/java/com/aliyun/clickhouse20220101/models/CheckDeleteVirtualWareHouseRequest.java
eeeaf1566b4c6133e35c1ad0d4c1fe6d2b6d1cca
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,364
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.clickhouse20220101.models; import com.aliyun.tea.*; public class CheckDeleteVirtualWareHouseRequest extends TeaModel { @NameInMap("DBClusterId") public String DBClusterId; @NameInMap("RegionId") public String regionId; // 计算组ID @NameInMap("VirtualWareHouseId") public String virtualWareHouseId; public static CheckDeleteVirtualWareHouseRequest build(java.util.Map<String, ?> map) throws Exception { CheckDeleteVirtualWareHouseRequest self = new CheckDeleteVirtualWareHouseRequest(); return TeaModel.build(map, self); } public CheckDeleteVirtualWareHouseRequest setDBClusterId(String DBClusterId) { this.DBClusterId = DBClusterId; return this; } public String getDBClusterId() { return this.DBClusterId; } public CheckDeleteVirtualWareHouseRequest setRegionId(String regionId) { this.regionId = regionId; return this; } public String getRegionId() { return this.regionId; } public CheckDeleteVirtualWareHouseRequest setVirtualWareHouseId(String virtualWareHouseId) { this.virtualWareHouseId = virtualWareHouseId; return this; } public String getVirtualWareHouseId() { return this.virtualWareHouseId; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
9a17a746b11d45533b46c75d7dc7662a4fb4d8c8
a1ba5e72d6fba53e7f965fc0c334390e3cc5b713
/mosby/src/main/java/com/nullcognition/mosby/model/Repo.java
f46bb1b68423816336f9b0ec17321d38cdc59974
[]
no_license
ersin-ertan/android-ui
733fd4c811d597a8f6b457445981cfc42d0e9c68
770d5d71f23ea7013f8c1d89694e4f9199dea5e7
refs/heads/master
2021-01-02T08:47:22.796204
2017-04-21T03:46:08
2017-04-21T03:46:08
40,839,353
5
1
null
2015-12-28T04:33:54
2015-08-16T20:36:16
Java
UTF-8
Java
false
false
371
java
package com.nullcognition.mosby.model; // ersin 30/09/15 Copyright (c) 2015+ All rights reserved. public class Repo{ long id; String name; String description; User owner; public long getId(){ return id; } public String getName(){ return name; } public String getDescription(){ return description; } public User getOwner(){ return owner; } }
[ "ersin_the_ertan@hotmail.com" ]
ersin_the_ertan@hotmail.com
e514de0376f6f9ae6fd4ea3f15ba03899c42a3e4
17fdc38df32efbd873302f699889f8b3e93690ff
/android/expoview/src/main/java/versioned/host/exp/exponent/modules/api/sensors/MagnetometerModule.java
a45e09065079fe8e063517405ff6a727d78e616f
[ "MIT", "BSD-3-Clause", "CC-BY-4.0", "Apache-2.0" ]
permissive
mohebifar/expo
a83d51a1e2f886375aa6fb5c535719891dc3efdd
083f2254c65e71385054172e147765edfb676fe4
refs/heads/master
2021-01-15T21:24:31.714042
2017-08-09T23:02:36
2017-08-09T23:02:36
99,859,373
2
0
null
2017-08-09T22:58:22
2017-08-09T22:58:22
null
UTF-8
Java
false
false
1,571
java
// Copyright 2015-present 650 Industries. All rights reserved. package versioned.host.exp.exponent.modules.api.sensors; import android.hardware.Sensor; import android.hardware.SensorEvent; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactMethod; import com.facebook.react.bridge.WritableMap; import com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter; public class MagnetometerModule extends SensorModuleBase { @Override public String getName() { return "ExponentMagnetometer"; } public MagnetometerModule(ReactApplicationContext reactContext) { super(reactContext); } private static WritableMap eventToMap(SensorEvent sensorEvent) { WritableMap map = Arguments.createMap(); map.putDouble("x", sensorEvent.values[0]); map.putDouble("y", sensorEvent.values[1]); map.putDouble("z", sensorEvent.values[2]); return map; } @Override public int getSensorType() { return Sensor.TYPE_MAGNETIC_FIELD; } @Override public void onSensorDataChanged(SensorEvent sensorEvent) { getReactApplicationContext().getJSModule(RCTDeviceEventEmitter.class). emit("magnetometerDidUpdate", eventToMap(sensorEvent)); } @ReactMethod public void setUpdateInterval(int updateInterval) { super.setUpdateInterval(updateInterval); } @ReactMethod public void startObserving() { super.startObserving(); } @ReactMethod public void stopObserving() { super.stopObserving(); } }
[ "aurora@exp.host" ]
aurora@exp.host
ed6b129b314548400aabf4bfaa9f8defe1fc98cc
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/philliphsu_ClockPlus/app/src/main/java/com/philliphsu/clock2/alarms/misc/DaysOfWeek.java
e1a19d99ead688755ff8049404691d1b0b6e80b0
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,441
java
// isComment package com.philliphsu.clock2.alarms.misc; import android.content.Context; import android.support.annotation.VisibleForTesting; import android.util.Log; import java.text.DateFormatSymbols; import java.util.Arrays; /** * isComment */ public final class isClassOrIsInterface { private static final String isVariable = "isStringConstant"; // isComment public static final int isVariable = isIntegerConstant; public static final int isVariable = isIntegerConstant; public static final int isVariable = isIntegerConstant; public static final int isVariable = isIntegerConstant; public static final int isVariable = isIntegerConstant; public static final int isVariable = isIntegerConstant; public static final int isVariable = isIntegerConstant; public static final int isVariable = isIntegerConstant; private static final int[] isVariable = new int[isNameExpr]; private static final String[] isVariable = new DateFormatSymbols().isMethod(); private static DaysOfWeek isVariable; private static int isVariable; public static DaysOfWeek isMethod(Context isParameter) { int isVariable = isNameExpr.isMethod(isNameExpr); if (isNameExpr == null || isNameExpr != isNameExpr) { isNameExpr = isNameExpr; isNameExpr = new DaysOfWeek(isNameExpr); } isNameExpr.isMethod(isNameExpr, isNameExpr.isMethod()); return isNameExpr; } /** * isComment */ public static String isMethod(int isParameter) { // isComment return isNameExpr[isNameExpr + isIntegerConstant]; } /** * isComment */ public int isMethod(int isParameter) { if (isNameExpr < isIntegerConstant || isNameExpr > isIntegerConstant) throw new ArrayIndexOutOfBoundsException("isStringConstant"); return isNameExpr[isNameExpr]; } /** * isComment */ public int isMethod(int isParameter) { if (isNameExpr < isNameExpr || isNameExpr > isNameExpr) throw new ArrayIndexOutOfBoundsException("isStringConstant" + isNameExpr + "isStringConstant"); for (int isVariable = isIntegerConstant; isNameExpr < isNameExpr.isFieldAccessExpr; isNameExpr++) if (isNameExpr[isNameExpr] == isNameExpr) return isNameExpr; return -isIntegerConstant; } @Override public String isMethod() { return "isStringConstant" + "isStringConstant" + isNameExpr.isMethod(isNameExpr) + "isStringConstant"; } @VisibleForTesting isConstructor(int isParameter) { if (isNameExpr != isNameExpr && isNameExpr != isNameExpr && isNameExpr != isNameExpr) throw new IllegalArgumentException("isStringConstant" + isNameExpr); isNameExpr[isIntegerConstant] = isNameExpr; for (int isVariable = isIntegerConstant; isNameExpr < isIntegerConstant; isNameExpr++) { if (isNameExpr == isNameExpr) { isNameExpr[isNameExpr] = isNameExpr - isIntegerConstant; } else if (isNameExpr == isNameExpr) { if (isNameExpr == isIntegerConstant) { isNameExpr[isNameExpr] = isNameExpr; } else { isNameExpr[isNameExpr] = isNameExpr + isIntegerConstant; } } else { isNameExpr[isNameExpr] = isNameExpr; } } } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
4e3effade4143fab07147a51ab70757cced5b6c0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_d7b74ca614ff63da7ef251d5eced462672d9b764/NovelFrame/3_d7b74ca614ff63da7ef251d5eced462672d9b764_NovelFrame_t.java
2fa21097c3ce78ea3f6c7adcb2af9288c31c5b2b
[]
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,524
java
/* * [The "New BSD" license] * Copyright (c) 2012 The Board of Trustees of The University of Alabama * All rights reserved. * * See LICENSE for details. */ package edu.ua.eng.software.novel; import java.awt.Desktop; import java.awt.Dimension; import java.awt.Event; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.KeyStroke; /** * Creates the main UI frame and menu * * @author Colin C. Hemphill <colin@hemphill.us> */ @SuppressWarnings("serial") public class NovelFrame extends JFrame implements ActionListener { private NovelPanel panel; public final void initUI() { // top level menu items JMenuBar menu = new JMenuBar(); JMenu file = new JMenu("File"); JMenu edit = new JMenu("Edit"); JMenu source = new JMenu("Source"); JMenu help = new JMenu("Help"); menu.add(file); menu.add(edit); menu.add(source); menu.add(help); // sub menu items JMenuItem fileImport = new JMenuItem("Import/Run"); JMenuItem filePrefs = new JMenuItem("Preferences"); JMenuItem fileExit = new JMenuItem("Exit"); JMenuItem editDif = new JMenuItem("Difference"); JMenuItem editFilter = new JMenuItem("Filter"); JMenuItem sourceSelect = new JMenuItem("Select All"); JMenuItem sourceCopy = new JMenuItem("Copy Selection"); JMenuItem helpTut = new JMenuItem("Tutorials"); JMenuItem helpAbout = new JMenuItem("About"); // gray out currently unavailable menu items filePrefs.setEnabled(false); editDif.setEnabled(false); editFilter.setEnabled(false); sourceSelect.setEnabled(false); sourceCopy.setEnabled(false); helpTut.setEnabled(false); // set action commands fileImport.setActionCommand("OPEN"); fileImport.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.CTRL_MASK)); fileImport.addActionListener(this); filePrefs.setActionCommand("PREFS"); filePrefs.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.CTRL_MASK)); filePrefs.addActionListener(this); fileExit.setActionCommand("EXIT"); fileExit.addActionListener(this); editDif.setActionCommand("DIFF"); editDif.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK + Event.SHIFT_MASK)); editDif.addActionListener(this); editFilter.setActionCommand("FILTER"); editFilter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, Event.CTRL_MASK + Event.SHIFT_MASK)); editFilter.addActionListener(this); sourceSelect.setActionCommand("SELECT"); sourceSelect.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, Event.CTRL_MASK)); sourceSelect.addActionListener(this); sourceCopy.setActionCommand("COPY"); sourceCopy.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, Event.CTRL_MASK)); sourceCopy.addActionListener(this); helpTut.setActionCommand("TUTORIAL"); helpTut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); helpTut.setMnemonic(KeyEvent.VK_F1); helpTut.addActionListener(this); helpAbout.setActionCommand("ABOUT"); helpAbout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0)); helpAbout.setMnemonic(KeyEvent.VK_F2); helpAbout.addActionListener(this); // add the sub menus file.add(fileImport); file.add(filePrefs); file.add(fileExit); edit.add(editDif); edit.add(editFilter); source.add(sourceSelect); source.add(sourceCopy); help.add(helpTut); help.add(helpAbout); setJMenuBar(menu); // initiate the window setTitle("NoVEL"); setSize(1024, 768); setLocationRelativeTo(null); setMinimumSize(new Dimension(800, 600)); // setExtendedState(MAXIMIZED_BOTH); setDefaultCloseOperation(DISPOSE_ON_CLOSE); panel = new NovelPanel(); setContentPane(panel); NovelPanelController.getInstance().setPanel(panel); } /** * Handle menu interactions * * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("OPEN")) { NovelImportDialog importDialog = new NovelImportDialog(this); } else if (e.getActionCommand().equals("PREFS")) prefsDialog(); else if (e.getActionCommand().equals("EXIT")) System.exit(0); else if (e.getActionCommand().equals("TUTORIAL")) try { tutorialDialog(); } catch (IOException e1) { e1.printStackTrace(); } catch (URISyntaxException e1) { e1.printStackTrace(); } else if (e.getActionCommand().equals("ABOUT")) aboutDialog(); } /** * Create dialog to handle user preferences */ public void prefsDialog() { // will use java.util.prefs package to handle preference storage // will most likely use a new "NovelPrefs" class to display } /** * Open software tutorials, most likely to be hosted online * * @throws IOException * @throws URISyntaxException */ public void tutorialDialog() throws IOException, URISyntaxException { Desktop.getDesktop().browse(new URI("about:blank")); } /** * Create "About" dialog */ public void aboutDialog() { JOptionPane.showMessageDialog(this, "N.o.V.E.L. © Copyright 2012" + "\nVersion 1.0" + "\n\nBlake Bassett, Casey Ferris" + "\nColin Hemphill, Conor Kirkman" + "\nNicholas Kraft, Paige Rodeghero", "About N.o.V.E.L.", JOptionPane.INFORMATION_MESSAGE); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
cba1b32fa96734fba33b00fb26d0ca53cab404e1
a6b7a7e5c51ea74f65c3864662f20de0ffba36fb
/src/main/java/org/esp/homelab/config/LoggingConfiguration.java
856f27cee993ae6060bb7ebf289ba268640678ef
[]
no_license
homelab21/homelab
eabf0eb160d3047960f954bf9f74dd96636ed7d1
1c5484dceffc3db84c1c856ebb1094bafdbcde71
refs/heads/main
2023-03-14T21:04:55.146981
2021-03-11T20:42:58
2021-03-11T20:42:58
346,739,038
0
0
null
null
null
null
UTF-8
Java
false
false
1,982
java
package org.esp.homelab.config; import static io.github.jhipster.config.logging.LoggingUtils.*; import ch.qos.logback.classic.LoggerContext; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import io.github.jhipster.config.JHipsterProperties; import java.util.HashMap; import java.util.Map; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; /* * Configures the console and Logstash log appenders from the app properties */ @Configuration public class LoggingConfiguration { public LoggingConfiguration( @Value("${spring.application.name}") String appName, @Value("${server.port}") String serverPort, JHipsterProperties jHipsterProperties, ObjectMapper mapper ) throws JsonProcessingException { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); Map<String, String> map = new HashMap<>(); map.put("app_name", appName); map.put("app_port", serverPort); String customFields = mapper.writeValueAsString(map); JHipsterProperties.Logging loggingProperties = jHipsterProperties.getLogging(); JHipsterProperties.Logging.Logstash logstashProperties = loggingProperties.getLogstash(); if (loggingProperties.isUseJsonFormat()) { addJsonConsoleAppender(context, customFields); } if (logstashProperties.isEnabled()) { addLogstashTcpSocketAppender(context, customFields, logstashProperties); } if (loggingProperties.isUseJsonFormat() || logstashProperties.isEnabled()) { addContextListener(context, customFields, loggingProperties); } if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { setMetricsMarkerLogbackFilter(context, loggingProperties.isUseJsonFormat()); } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
0ec994be794e5bd3c65a68a97f3879a22913939b
830426fd71738ba1460232e3e50aa72cb802695c
/concurrent-util-ee/src/main/java/org/xbib/concurrent/util/ee/AbstractManagedExecutorServiceAdapter.java
2d19f042a662339af086123b444b3f49500bdf9e
[]
no_license
jprante/concurrent-util
9171f7ab4cbcf7c32abe9f4650d6e1ccccc4302e
2f9650b16214c0ec2b5594aae522b3646883c28b
refs/heads/master
2023-01-14T14:55:45.763017
2020-11-23T08:56:57
2020-11-23T08:56:57
315,153,061
0
0
null
null
null
null
UTF-8
Java
false
false
1,987
java
/* * Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at * http://www.eclipse.org/legal/epl-2.0. * * This Source Code may also be made available under the following Secondary * Licenses when the conditions for such availability set forth in the * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, * version 2 with the GNU Classpath Exception, which is available at * https://www.gnu.org/software/classpath/license.html. * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ package org.xbib.concurrent.util.ee; import org.xbib.concurrent.util.ee.api.ManagedExecutorService; import java.util.List; import java.util.concurrent.TimeUnit; /** * Abstract base class for {@code ManagedExecutorService} and * {@code ManagedScheduledExecutorService} * implementation with life cycle operations disabled for handing out to * application components. */ public abstract class AbstractManagedExecutorServiceAdapter implements ManagedExecutorService { protected static final String LIFECYCLE_OPER_NOT_SUPPORTED = "Lifecycle operation not supported"; @Override public void shutdown() { throw new IllegalStateException(LIFECYCLE_OPER_NOT_SUPPORTED); } @Override public List<Runnable> shutdownNow() { throw new IllegalStateException(LIFECYCLE_OPER_NOT_SUPPORTED); } @Override public boolean isShutdown() { throw new IllegalStateException(LIFECYCLE_OPER_NOT_SUPPORTED); } @Override public boolean isTerminated() { throw new IllegalStateException(LIFECYCLE_OPER_NOT_SUPPORTED); } @Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { throw new IllegalStateException(LIFECYCLE_OPER_NOT_SUPPORTED); } }
[ "joergprante@gmail.com" ]
joergprante@gmail.com
1bbc49f2a761e5dba6a49229078fb7777fff8a03
d73c707a600765ca4d928d0ec3b0b9f170cdaf8c
/src/main/java/at/yawk/wm/ui/WidgetChain.java
9c1b365ea41c5dcb06f0485f8bb03a8dbb48450d
[]
no_license
yawkat/wm
cc8b2823036d9d9211a1fca69350e26051160d33
11fcdc1c253c5e5567df6803c3bab5667203de61
refs/heads/master
2023-04-27T09:39:48.928122
2021-04-09T08:04:13
2021-04-09T08:04:13
37,268,017
4
0
null
2023-04-16T14:55:22
2015-06-11T15:02:34
Java
UTF-8
Java
false
false
621
java
package at.yawk.wm.ui; import javax.annotation.concurrent.NotThreadSafe; /** * @author yawkat */ @NotThreadSafe abstract class WidgetChain implements WidgetSet { private final LayoutManager layoutManager; private Positioned front; public WidgetChain(LayoutManager layoutManager, Positioned front) { this.layoutManager = layoutManager; this.front = front; } @Override public void addWidget(Widget widget) { layoutManager.addWidget(widget); chain(widget, front); front = widget; } protected abstract void chain(Widget widget, Positioned to); }
[ "me@yawk.at" ]
me@yawk.at
ec78d9d39e884bd314a5dbb1041597bf47c6d0fc
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/13/org/apache/commons/math3/linear/SparseFieldVector_append_187.java
119030879c8a7fad993798b412ae66848bfc918c
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,243
java
org apach common math3 linear link field vector fieldvector link open int field hash map openinttofieldhashmap back store param type field element version deprec version deprec reason expos jira href http issu apach org jira brows math ticket remov version spars field vector sparsefieldvector field element fieldel field vector fieldvector serializ inherit doc inheritdoc field vector fieldvector append field vector fieldvector spars field vector sparsefieldvector append spars field vector sparsefieldvector dimens getdimens field vector fieldvector re spars field vector sparsefieldvector re set entri setentri virtual size virtuals entri getentri re
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
b60dc5a960e799e68eba65f85ab74e8e512ec3a3
39b7e86a2b5a61a1f7befb47653f63f72e9e4092
/src/main/java/com/alipay/api/domain/AlipayCommerceIotWifiResultQueryModel.java
8d1f0180b7eb0d6c85cfa047bd88c4e364f96c92
[ "Apache-2.0" ]
permissive
slin1972/alipay-sdk-java-all
dbec0604c2d0b76d8a1ebf3fd8b64d4dd5d21708
63095792e900bbcc0e974fc242d69231ec73689a
refs/heads/master
2020-08-12T14:18:07.203276
2019-10-13T09:00:11
2019-10-13T09:00:11
214,782,009
0
0
Apache-2.0
2019-10-13T07:56:34
2019-10-13T07:56:34
null
UTF-8
Java
false
false
601
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * wifi配网结果轮询 * * @author auto create * @since 1.0, 2019-06-20 21:52:47 */ public class AlipayCommerceIotWifiResultQueryModel extends AlipayObject { private static final long serialVersionUID = 4243734267622158195L; /** * 设备唯一标识,设备id */ @ApiField("biz_tid") private String bizTid; public String getBizTid() { return this.bizTid; } public void setBizTid(String bizTid) { this.bizTid = bizTid; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
07dfebb6638a4fe204f5f292bf287d23a9a7c0a1
db1d29246f3a02d1ea9a13552fcf330164979b6e
/alpaca-common/src/main/java/cn/ucaner/alpaca/framework/utils/tools/core/convert/impl/CastConverter.java
a566a3b1a8a4d35f504d8c16b1b6ae305fbaae9a
[ "Apache-2.0" ]
permissive
Jasonandy/alpaca
ceace4cb9662996a36daf471a826f4ede56bd105
08514459b4d3ab02cded0d45c321140aff406950
refs/heads/master
2020-03-17T05:46:01.106620
2018-06-25T06:54:58
2018-06-25T06:54:58
132,857,096
0
0
null
null
null
null
UTF-8
Java
false
false
1,018
java
package cn.ucaner.alpaca.framework.utils.tools.core.convert.impl; import cn.ucaner.alpaca.framework.utils.tools.core.convert.AbstractConverter; import cn.ucaner.alpaca.framework.utils.tools.core.convert.ConvertException; /** * @Package:cn.ucaner.alpaca.framework.utils.tools.core.convert.impl * @ClassName:CastConverter * @Description: <p> 强转转换器 </p> * @Author: - * @CreatTime:2018年5月26日 上午10:31:40 * @Modify By: * @ModifyTime: 2018年5月26日 * @Modify marker: * @version V1.0 */ public class CastConverter<T> extends AbstractConverter<T> { private Class<T> targetType; @Override protected T convertInternal(Object value) { // 由于在AbstractConverter中已经有类型判断并强制转换,因此当在上一步强制转换失败时直接抛出异常 throw new ConvertException("Can not cast value to [{}]", this.targetType); } @Override public Class<T> getTargetType() { return this.targetType; } }
[ "jasonandy@hotmail.com" ]
jasonandy@hotmail.com
93ba3f48602c8039c0b370c5c5955a4f4b07a806
990b94f1e2ef63810aebd8a11cb2b08ba10659ff
/src/main/java/kz/anuar/app/HelloController.java
95d667abe4843bef7e67ff21b48d8b2902ccc102
[]
no_license
anuar-k/SpringMVC
c09c049e23a940a4fd96575b9aabc7da2e6464f6
8463344091f6f6715783490658bb1bde9c0831ac
refs/heads/master
2022-12-13T05:19:29.776258
2020-09-12T18:32:22
2020-09-12T18:32:22
295,003,101
0
0
null
null
null
null
UTF-8
Java
false
false
1,342
java
package kz.anuar.app; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import javax.servlet.http.HttpServletRequest; @Controller @RequestMapping("/hello") public class HelloController { @RequestMapping("/") public String showMain() { return "index"; } @RequestMapping("/showForm") public String showForm() { return "helloworld-form"; } @RequestMapping("/processForm") public String processForm() { return "helloworld"; } @RequestMapping("/processFormVersionTwo") public String transformModelToUpperCase(HttpServletRequest request, Model model) { String theName = request.getParameter("studentName"); theName = theName.toUpperCase(); String result = "Yo! " + theName; model.addAttribute("message", result); return "helloworld"; } @RequestMapping("/processFormVersionThree") public String transformModelToUpperCase2( @RequestParam("studentName") String theName, Model model) { theName = theName.toUpperCase(); String result = "Yo! " + theName; model.addAttribute("message", result); return "helloworld"; } }
[ "-" ]
-
7054867f8f6da5767db3064fa043e11b59312e19
2b0cd7405327f2b598951dbbf25d947e42f9f363
/dev_java/src/com/network2_b/Protocol.java
dd0e3486247a28c5a5bcd62fbe3ed96cc3087f63
[]
no_license
8kosmo/workspace_java
8212cc0513dcec738f5ff6eef935c11845a9d79c
5faeeee72df1fbcb7c69b8e2f48e0ec450ee7bf7
refs/heads/master
2020-06-15T19:17:52.322189
2019-07-19T09:37:09
2019-07-19T09:37:09
195,372,162
0
0
null
null
null
null
UTF-8
Java
false
false
721
java
package com.network2_b; public class Protocol { public static final int WAIT = 100;//대기상태 public static final int ROOM_CREATE = 110;//톡방개설 public static final int ROOM_LIST = 120;//톡방이름목록 public static final int ROOM_IN = 130;//톡방 입장 public static final int ROOM_INLIST = 140;//톡방에 있는 사람목록 public static final int ROOM_OUT = 500;//톡방 나가기 public static final int MESSAGE = 200;//일반 대화 public static final int WHISPER = 210;//1:1 public static final int CHANGE = 300;//대화명변경 public static final int EXIT = 500;//종료 //메세지 열에서 값에 대한 구분자를 선언 public static String seperator = "|"; }
[ "titicaca-lake@naver.com" ]
titicaca-lake@naver.com
676aa46dec92e093ff30c76e64c670cb322dc04c
4d6f449339b36b8d4c25d8772212bf6cd339f087
/netreflected/src/Core/UIAutomationTypes,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35/system/windows/automation/AsyncContentLoadedEventArgs.java
d5d9b5cf5ff3740d89182c0222216f3f05085305
[ "MIT" ]
permissive
lvyitian/JCOReflector
299a64550394db3e663567efc6e1996754f6946e
7e420dca504090b817c2fe208e4649804df1c3e1
refs/heads/master
2022-12-07T21:13:06.208025
2020-08-28T09:49:29
2020-08-28T09:49:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,614
java
/* * MIT License * * Copyright (c) 2020 MASES s.r.l. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /************************************************************************************** * <auto-generated> * This code was generated from a template using JCOReflector * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. * </auto-generated> *************************************************************************************/ package system.windows.automation; import org.mases.jcobridge.*; import org.mases.jcobridge.netreflection.*; import java.util.ArrayList; // Import section import system.windows.automation.AutomationEventArgs; import system.windows.automation.AsyncContentLoadedState; /** * The base .NET class managing System.Windows.Automation.AsyncContentLoadedEventArgs, UIAutomationTypes, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Extends {@link NetObject}. * <p> * * See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Automation.AsyncContentLoadedEventArgs" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Automation.AsyncContentLoadedEventArgs</a> */ public class AsyncContentLoadedEventArgs extends AutomationEventArgs { /** * Fully assembly qualified name: UIAutomationTypes, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 */ public static final String assemblyFullName = "UIAutomationTypes, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; /** * Assembly name: UIAutomationTypes */ public static final String assemblyShortName = "UIAutomationTypes"; /** * Qualified class name: System.Windows.Automation.AsyncContentLoadedEventArgs */ public static final String className = "System.Windows.Automation.AsyncContentLoadedEventArgs"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } public AsyncContentLoadedEventArgs(Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link AsyncContentLoadedEventArgs}, a cast assert is made to check if types are compatible. */ public static AsyncContentLoadedEventArgs cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new AsyncContentLoadedEventArgs(from.getJCOInstance()); } // Constructors section public AsyncContentLoadedEventArgs() throws Throwable { } public AsyncContentLoadedEventArgs(AsyncContentLoadedState asyncContentState, double percentComplete) throws Throwable { try { // add reference to assemblyName.dll file addReference(JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(asyncContentState == null ? null : asyncContentState.getJCOInstance(), percentComplete)); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Methods section // Properties section public double getPercentComplete() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (double)classInstance.Get("PercentComplete"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public AsyncContentLoadedState getAsyncContentLoadedState() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("AsyncContentLoadedState"); return new AsyncContentLoadedState(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }
[ "mario.mastrodicasa@masesgroup.com" ]
mario.mastrodicasa@masesgroup.com
0fa4c59b70c6f65a17a50920014c95e41607705d
d2f840933180c4041f5c103c041909366464661e
/app/src/main/java/net/coding/mart/common/BaseActivity.java
e339fed044ba8d3b70463f89511ebeef67ee3334
[ "MIT" ]
permissive
fenildf/Mart-Android
1374928522e1bcd579d05c60e5104ab33b133c7a
150e5d9c47d6c20ae114728115ebd6537b8bba2d
refs/heads/master
2020-03-27T14:47:35.462253
2018-05-21T10:22:05
2018-05-21T10:22:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,285
java
package net.coding.mart.common; import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import com.umeng.analytics.MobclickAgent; import net.coding.mart.R; import net.coding.mart.common.widget.SingleToast; import org.json.JSONObject; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; import rx.Subscription; /** * Created by chenchao on 15/10/7. * 放一些公共的 activity 方法 */ public class BaseActivity extends AppCompatActivity { SingleToast mSingleToast; private boolean mResume = false; private List<WeakReference<Subscription>> manager = new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mSingleToast = new SingleToast(this); mProgressDialog = new ProgressDialog(this); mProgressDialog.setIndeterminate(true); mProgressDialog.setCancelable(false); MobclickAgent.openActivityDurationTrack(false); } protected void bindSubscription(Subscription sub) { WeakReference<Subscription> wp = new WeakReference<Subscription>(sub); manager.add(wp); } protected void setActionBarTitle(int title) { String s = getResources().getString(title); setActionBarTitle(s); } protected void setActionBarTitle(String title) { if (title == null) { return; } ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setTitle(title); } } @Override protected void onDestroy() { if (mProgressDialog != null) { mProgressDialog.dismiss(); mProgressDialog = null; } for (WeakReference<Subscription> item : manager) { Subscription sub = item.get(); if (sub != null && !sub.isUnsubscribed()) { sub.unsubscribe(); } } manager.clear(); super.onDestroy(); } @Override public void onResume() { super.onResume(); MobclickAgent.onPageStart(getClass().getSimpleName()); MobclickAgent.onResume(this); mResume = true; } @Override public void onPause() { super.onPause(); MobclickAgent.onPageEnd(getClass().getSimpleName()); MobclickAgent.onPause(this); mResume = false; } public boolean isResume() { return mResume; } public void showButtomToast(String msg) { mSingleToast.showButtomToast(msg); } public void showMiddleToast(int id) { mSingleToast.showMiddleToast(id); } public void showMiddleToast(String msg) { mSingleToast.showMiddleToast(msg); } public void showMiddleToast(String msg, int duration) { mSingleToast.showMiddleToast(msg, duration); } public void showButtomToast(int messageId) { mSingleToast.showButtomToast(messageId); } public void showErrorMsg(int code, JSONObject json) { if (code == NetworkImpl.NETWORK_CONNECT_FAIL) { showButtomToast(R.string.connect_service_fail); } else { String msg = Global.getErrorMsg(json); if (!msg.isEmpty()) { showButtomToast(msg); } } } public void showSending(boolean show) { showSending(show, ""); } public void showSending(boolean show, String message) { if (mProgressDialog == null) { return; } if (show) { if (message == null) message = ""; mProgressDialog.setMessage(message); mProgressDialog.show(); } else { mProgressDialog.hide(); } } ProgressDialog mProgressDialog; protected void umengEvent(String s, String param) { MobclickAgent.onEvent(this, s, param); } /** * 返回自身 Context格式 * @return */ public Context ctx(){return this;} /** * 返回自身 Activity格式 * @return */ public Activity act(){return this;} }
[ "8206503@qq.com" ]
8206503@qq.com
4185b804436fe655775697d86c3c9619b4d587e3
6dc34d2ab1312154685e47f474bcaf9d85fe315b
/fundamentals7/src/main/java/com/manchesterdigital/SpotifyAccountService.java
2fb2217440b9d9c60ae9f856eb685be9ed4da1ee
[]
no_license
johannalongmuir/bootcamp-2019
64e40f14c238031a307ca096adde8a2b471c97e0
b9ed19b39003cb850077f47edddce8d18459cfea
refs/heads/master
2021-07-11T19:44:08.486157
2019-10-12T20:55:34
2019-10-12T20:55:34
210,178,931
1
0
null
2020-10-13T16:40:21
2019-09-22T16:29:39
Java
UTF-8
Java
false
false
546
java
package com.manchesterdigital; public class SpotifyAccountService { private AuthenticationService authenticationService; public SpotifyAccountService(AuthenticationService authenticationService) { this.authenticationService = authenticationService; } public SpotifyAccount verify(String username, String password) { if (!authenticationService.authenticate(username,password)) { throw new SpotifyAccountNotValidException(); } return new SpotifyAccount(username, password); } }
[ "johannalongmuir@gmail.com" ]
johannalongmuir@gmail.com
0595732e516f1123d120e286acb4e111e259b9b5
630b959161e2c81c84c34dc5cb56f4e879c6258c
/source/com/barrybecker4/simulation/verhulst/Population.java
4ec0d5a4e0c5b86f4251af5dd4e4fa51effa1a41
[ "MIT" ]
permissive
brianjamesbecker/bb4-simulations
7cb3506c1364d7eae8bebd1c71a413276a80aa34
6a1f324565ab6177a1f30d43e07f310a141b03be
refs/heads/master
2021-01-16T22:05:43.116802
2016-01-10T18:09:57
2016-01-10T18:09:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
878
java
// Copyright by Barry G. Becker, 2012. Licensed under MIT License: http://www.opensource.org/licenses/MIT package com.barrybecker4.simulation.verhulst; /** * Everything we need to know about a population of creatures. * * @author Barry Becker */ public abstract class Population { public double birthRate; private double population; public Population() { reset(); } public abstract String getName(); public void reset() { population = getInitialPopulation(); birthRate = getInitialBirthRate(); } public double getPopulation() { return population; } public void setPopulation(double value) { population = value; } public abstract double getInitialPopulation(); public abstract double getInitialBirthRate(); public double getMaxBirthRate() { return 3.0; } }
[ "barrybecker4@yahoo.com" ]
barrybecker4@yahoo.com
4f2c6d2505e7b3ddf67a0696a5b5ca42cc17bc42
4f3613a5f643862a604473010fe24dd3dc516a51
/app/src/main/java/com/bber/company/android/util/CircleProgress.java
e7948332c027f25145d044167a7ff6b9a283e9db
[]
no_license
chenqian19911214/BberCole
c2bb89ff4bf76f03fe92fd159a3aac54257ea95e
437da365938ee8c1e71ac428fce450ff284b4ea1
refs/heads/master
2020-03-23T10:39:18.226709
2018-07-18T15:38:46
2018-07-19T00:42:28
141,454,510
0
0
null
null
null
null
UTF-8
Java
false
false
6,593
java
package com.bber.company.android.util; import android.content.Context; import android.graphics.Canvas; import android.graphics.LinearGradient; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Shader; import android.graphics.SweepGradient; import android.support.annotation.ColorInt; import android.support.annotation.ColorRes; import com.bber.company.android.entity.CircleStyle; import com.bber.company.android.entity.GradientType; /** * Created by peng on 16-10-18. The CircleProgress class extends BaseProgress */ public class CircleProgress extends BaseProgress { // The Paint of the Ring private Paint mCirclePaint; // The Size of the Ring private float mCircleWidth; // The progress Color for the Ring private int mCircleProgressColor; // The bottom color for the Ring private int mCircleBottomColor; //THe bottom circle width private int mCircleBottomWidth; // the radius of the Ring private int mCircleRadius; // Padding of line padding int the fan style private int mFanPadding; // The Style of the Circle private CircleStyle mCircleStyle = CircleStyle.RING; // The linear color private int[] mGradientColor; //The Gradient Type private GradientType mGradientType = GradientType.LINEAR; /* * initCircleProgress */ @Override public void initProperty() { super.initProperty(); // init mCircleproerty mCirclePaint = new Paint(); mCirclePaint.setAntiAlias(true); mCirclePaint.setStrokeWidth(10); mCirclePaint.setStrokeCap(Paint.Cap.ROUND); mCircleProgressColor = 0xaa59c8cc; mCircleBottomColor = 0xdddddddd; mCircleWidth = 8; mCircleRadius = 50; mFanPadding = 5; mCircleBottomWidth = 2; } @Override public void DrawOther(Canvas canvas) { drawCircle(canvas); drawArc(canvas); } /* * draw the circle background */ private void drawCircle(Canvas canvas) { Rect bounds = getBounds(); int xpos = bounds.left + bounds.width() / 2; int ypos = bounds.bottom - bounds.height() / 2; mCirclePaint.setColor(mCircleBottomColor); mCirclePaint.setStrokeWidth(mCircleStyle == CircleStyle.RING ? mCircleWidth : mCircleBottomWidth); mCirclePaint.setStyle(Paint.Style.STROKE); mCirclePaint.setShader(null); canvas.drawCircle(xpos, ypos, mCircleStyle == CircleStyle.RING ? mCircleRadius : mCircleRadius + mFanPadding, mCirclePaint); } /* * draw the arc for the progress */ private void drawArc(Canvas canvas) { mCirclePaint.setStyle(mCircleStyle == CircleStyle.RING ? Paint.Style.STROKE : Paint.Style.FILL); Rect bounds = getBounds(); int xpos = bounds.left + bounds.width() / 2; int ypos = bounds.bottom - bounds.height() / 2; RectF rectF = new RectF(xpos - mCircleRadius, ypos - mCircleRadius, xpos + mCircleRadius, ypos + mCircleRadius); float degree = (float) mProgress / (float) mMaxValue * 360; mCirclePaint.setStrokeWidth(mCircleWidth); if (mGradientColor != null) { if (mGradientType == GradientType.LINEAR) mCirclePaint.setShader(new LinearGradient(bounds.centerX(), bounds.centerY() - mCircleRadius, bounds.centerX(), bounds.centerY() + mCircleRadius, mGradientColor, null, Shader.TileMode.MIRROR)); else { mCirclePaint.setShader(new SweepGradient(bounds.centerX(), bounds.centerY(), mGradientColor, null)); } mCirclePaint.setColor(0xffffffff); } else { mCirclePaint.setColor(mCircleProgressColor); } canvas.drawArc(rectF, 270, degree, mCircleStyle == CircleStyle.FAN, mCirclePaint); } public static class Builder extends BaseBuilder<CircleProgress, Builder> { public Builder() { mProgress = new CircleProgress(); } /* * set The Circle line width */ public Builder setCircleWidth(float width) { mProgress.mCircleWidth = width; return this; } /* * set the Circle radius */ public Builder setCircleRadius(int Radius) { mProgress.mCircleRadius = Radius; return this; } /** * set the GradientType:SWEEP,LINEAR * * @param type * @return Builder */ public Builder setGradientType(GradientType type) { mProgress.mGradientType = type; return this; } /* * set the Progress Circle Color */ public Builder setProgressColor(@ColorInt int Color) { mProgress.mCircleProgressColor = Color; return this; } /* * set the Bottom Circle Color */ public Builder setBottomColor(@ColorInt int Color) { mProgress.mCircleBottomColor = Color; return this; } /* * set the Bottom Circle Color with resource */ public Builder setBottomColorRes(@ColorRes int ColorRes, Context context) { mProgress.mCircleBottomColor = context.getResources().getColor(ColorRes); return this; } /* * set the Progress Circle Color */ public Builder setProgressColorRes(@ColorRes int ColorRes, Context context) { mProgress.mCircleProgressColor = context.getResources().getColor(ColorRes); return this; } /* *set the Progress CircleStyle */ public Builder setStyle(CircleStyle style) { mProgress.mCircleStyle = style; return this; } /* * set the Gradient Colors */ public Builder setGradientColor(int[] colors) { mProgress.mGradientColor = colors; return this; } /** * set the fan style padding * * @param padding * @return */ public Builder setFanPadding(int padding) { mProgress.mFanPadding = padding; return this; } /** * set the Bottom Stroke Width * * @return */ public Builder setBottomWidth(int width) { mProgress.mCircleBottomWidth = width; return this; } } }
[ "1096011884@qq.com" ]
1096011884@qq.com
7d1bad7273d1c8763e2f0a4d9749b8a8b0e7b707
a0b3e77790630ac4de591c9105e2b1d4e3bd9c8f
/jrap-core/src/main/java/com/jingrui/jrap/attachment/exception/AttachmentException.java
0f6f49204223d8795acaf3ab3a333c242bb2e906
[]
no_license
IvanStephenYuan/JRAP_Lease
799c0b1a88fecb0b7d4b9ab73f8da9b47ce19fdb
4b4b08d4c23e9181718374eb77676095d3a298dc
refs/heads/master
2022-12-23T07:54:57.213203
2019-06-11T07:43:48
2019-06-11T07:43:48
174,286,707
3
5
null
2022-12-16T09:43:59
2019-03-07T06:39:02
JavaScript
UTF-8
Java
false
false
347
java
package com.jingrui.jrap.attachment.exception; import com.jingrui.jrap.core.exception.BaseException; /** * @author njq.niu@jingrui.com */ public class AttachmentException extends BaseException { public AttachmentException(String code, String descriptionKey, Object[] parameters) { super(code, descriptionKey, parameters); } }
[ "Ivan.Stphen.Y@gmail.com" ]
Ivan.Stphen.Y@gmail.com
d45b0faeb47110789700a1d35fa30a1eb2cdb7d4
16f726820b7df1aa31acb6d02bd89ecb38ac186d
/util/hack/src/facade/primact/DoGraceArmsBothPickupObjGesture.java
2e364dbc381e9d660fdac9e792109b3d38162988
[]
no_license
donnaken15/Exterieur
c8bcee1e52a57783525547fc0d2c3a3aa34190d5
550435cba73e3ec3252b97bf77cfd172d7a5e449
refs/heads/master
2020-03-16T13:25:47.231107
2018-05-09T02:41:46
2018-05-09T02:41:46
132,690,016
0
0
null
null
null
null
UTF-8
Java
false
false
815
java
/* */ package facade.primact; /* */ /* */ public class DoGraceArmsBothPickupObjGesture extends DoPickupObjGestureAnimation /* */ { /* */ public void execute(Object[] paramArrayOfObject) { /* 6 */ Object[] arrayOfObject = new Object[5]; /* */ /* 8 */ arrayOfObject[0] = new Integer(0); /* 9 */ arrayOfObject[1] = new Integer(2); /* 10 */ arrayOfObject[2] = paramArrayOfObject[0]; /* 11 */ arrayOfObject[3] = paramArrayOfObject[1]; /* 12 */ arrayOfObject[4] = paramArrayOfObject[2]; /* */ /* 14 */ super.execute(arrayOfObject); /* */ } /* */ } /* Location: C:\Program Files (x86)\Extérieur\util\classes\!\facade\primact\DoGraceArmsBothPickupObjGesture.class * Java compiler version: 4 (48.0) * JD-Core Version: 0.7.1 */
[ "myminecraftfriend15@yahoo.com" ]
myminecraftfriend15@yahoo.com
a61c4c628d96fe05b6e1ba1ffd5d373aa748235f
ba005c6729aed08554c70f284599360a5b3f1174
/lib/selenium-server-standalone-3.4.0/net/sf/cglib/transform/ClassTransformer.java
49d86dcc783d36a3fde51c7b0e115a3355aa0bff
[]
no_license
Viral-patel703/Testyourbond-aut0
f6727a6da3b1fbf69cc57aeb89e15635f09e249a
784ab7a3df33d0efbd41f3adadeda22844965a56
refs/heads/master
2020-08-09T00:27:26.261661
2017-11-07T10:12:05
2017-11-07T10:12:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
package net.sf.cglib.transform; import net.sf.cglib.asm..ClassVisitor; public abstract class ClassTransformer extends .ClassVisitor { public ClassTransformer() { super(327680); } public ClassTransformer(int opcode) { super(opcode); } public abstract void setTarget(.ClassVisitor paramClassVisitor); }
[ "VIRUS-inside@users.noreply.github.com" ]
VIRUS-inside@users.noreply.github.com
da90fe8f59962a71cc1668dd2cd7cb6a3e47dc4f
bc44f09347e813d7a4e2f359f974eef55124f3d7
/app/src/main/java/haoshi/com/shop/fragment/chat/ChatMessageNetBean.java
3bb140ba165facf91c3614875027cd93beaec457
[]
no_license
dmz1024/HaoShiShop2
088a30e718d50b6af291b9128f8007b13cb89880
f5a51cf9bb9f9fa9898ea74ca49907bec22c161a
refs/heads/master
2021-01-19T20:16:01.300975
2017-04-26T12:03:31
2017-04-26T12:03:31
82,548,952
0
0
null
null
null
null
UTF-8
Java
false
false
890
java
package haoshi.com.shop.fragment.chat; import java.util.ArrayList; import base.bean.ListBaseBean; import haoshi.com.shop.bean.chat.dao.ChatMessageBean; import haoshi.com.shop.bean.chat.impl.ChatViewsImpl; import haoshi.com.shop.bean.chat.impl.MessagesImpl; /** * Created by dengmingzhi on 2017/3/17. */ public class ChatMessageNetBean extends ListBaseBean<ArrayList<ArrayList<ChatMessageBean>>> { @Override public ArrayList<ArrayList<ChatMessageBean>> getData() { data = super.getData(); for (ArrayList<ChatMessageBean> list : data) { MessagesImpl.getInstance().add(list.get(list.size() - 1), ChatViewsImpl.getInstance().add(list.get(list.size() - 1))); for (int i = 0; i < list.size() - 1; i++) { ChatViewsImpl.getInstance().add(list.get(i)); } } data.clear(); return data; } }
[ "894350911@qq.com" ]
894350911@qq.com
036fd81570b7ae8eb3dcd35ef7f5e1c7a6ae6c23
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_38599e4e98451dc140fccf5c51aa83b5a1763c7f/JdbmEntityStoreAssembler/4_38599e4e98451dc140fccf5c51aa83b5a1763c7f_JdbmEntityStoreAssembler_t.java
ef63713d83be9e5f705926f495f89aeb77997c32
[]
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,798
java
/* * Copyright 2008 Niclas Hedhman. * * 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.qi4j.entitystore.jdbm; import org.qi4j.api.common.Visibility; import org.qi4j.bootstrap.Assembler; import org.qi4j.bootstrap.AssemblyException; import org.qi4j.bootstrap.ModuleAssembly; import org.qi4j.entitystore.memory.MemoryEntityStoreService; import org.qi4j.spi.entity.helpers.EntityTypeRegistryService; import org.qi4j.spi.entity.helpers.UuidIdentityGeneratorService; public class JdbmEntityStoreAssembler implements Assembler { private String jdbmConfigurationModule; public JdbmEntityStoreAssembler( String jdbmConfigurationModule ) { this.jdbmConfigurationModule = jdbmConfigurationModule; } public void assemble( ModuleAssembly module ) throws AssemblyException { module.addServices( JdbmEntityStoreService.class, UuidIdentityGeneratorService.class, EntityTypeRegistryService.class ).visibleIn(Visibility.layer); ModuleAssembly config = module.layerAssembly().newModuleAssembly( jdbmConfigurationModule ); config.addEntities( JdbmConfiguration.class ).visibleIn( Visibility.layer ); config.addServices( MemoryEntityStoreService.class ); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d86e2cf60d052fdc9b38e2ef8e6a7b6587faa89c
ca7da6499e839c5d12eb475abe019370d5dd557d
/spring-core/src/main/java/org/springframework/core/type/classreading/ClassMetadataReadingVisitor.java
6590a45732331744b7d9dcdf43ad2bd5c35756b3
[ "Apache-2.0" ]
permissive
yangfancoming/spring-5.1.x
19d423f96627636a01222ba747f951a0de83c7cd
db4c2cbcaf8ba58f43463eff865d46bdbd742064
refs/heads/master
2021-12-28T16:21:26.101946
2021-12-22T08:55:13
2021-12-22T08:55:13
194,103,586
0
1
null
null
null
null
UTF-8
Java
false
false
5,298
java
package org.springframework.core.type.classreading; import java.util.LinkedHashSet; import java.util.Set; import org.springframework.asm.AnnotationVisitor; import org.springframework.asm.Attribute; import org.springframework.asm.ClassVisitor; import org.springframework.asm.FieldVisitor; import org.springframework.asm.MethodVisitor; import org.springframework.asm.Opcodes; import org.springframework.asm.SpringAsmInfo; import org.springframework.core.type.ClassMetadata; import org.springframework.lang.Nullable; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; /** * ASM class visitor which looks only for the class name and implemented types,exposing them through the {@link org.springframework.core.type.ClassMetadata} interface. * @since 2.5 */ class ClassMetadataReadingVisitor extends ClassVisitor implements ClassMetadata { private String className = ""; private boolean isInterface; private boolean isAnnotation; private boolean isAbstract; private boolean isFinal; @Nullable private String enclosingClassName; private boolean independentInnerClass; @Nullable private String superClassName; private String[] interfaces = new String[0]; private Set<String> memberClassNames = new LinkedHashSet<>(4); public ClassMetadataReadingVisitor() { super(SpringAsmInfo.ASM_VERSION); } @Override public void visit(int version, int access, String name, String signature, @Nullable String supername, String[] interfaces) { this.className = ClassUtils.convertResourcePathToClassName(name); this.isInterface = ((access & Opcodes.ACC_INTERFACE) != 0); this.isAnnotation = ((access & Opcodes.ACC_ANNOTATION) != 0); this.isAbstract = ((access & Opcodes.ACC_ABSTRACT) != 0); this.isFinal = ((access & Opcodes.ACC_FINAL) != 0); if (supername != null && !this.isInterface) { this.superClassName = ClassUtils.convertResourcePathToClassName(supername); } this.interfaces = new String[interfaces.length]; for (int i = 0; i < interfaces.length; i++) { this.interfaces[i] = ClassUtils.convertResourcePathToClassName(interfaces[i]); } } @Override public void visitOuterClass(String owner, String name, String desc) { this.enclosingClassName = ClassUtils.convertResourcePathToClassName(owner); } @Override public void visitInnerClass(String name, @Nullable String outerName, String innerName, int access) { if (outerName != null) { String fqName = ClassUtils.convertResourcePathToClassName(name); String fqOuterName = ClassUtils.convertResourcePathToClassName(outerName); if (this.className.equals(fqName)) { this.enclosingClassName = fqOuterName; this.independentInnerClass = ((access & Opcodes.ACC_STATIC) != 0); }else if (this.className.equals(fqOuterName)) { this.memberClassNames.add(fqName); } } } @Override public void visitSource(String source, String debug) { // no-op } @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { // no-op return new EmptyAnnotationVisitor(); } @Override public void visitAttribute(Attribute attr) { // no-op } @Override public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) { // no-op return new EmptyFieldVisitor(); } @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { // no-op return new EmptyMethodVisitor(); } @Override public void visitEnd() { // no-op } @Override public String getClassName() { return this.className; } @Override public boolean isInterface() { return this.isInterface; } @Override public boolean isAnnotation() { return this.isAnnotation; } @Override public boolean isAbstract() { return this.isAbstract; } @Override public boolean isConcrete() { return !(this.isInterface || this.isAbstract); } @Override public boolean isFinal() { return this.isFinal; } @Override public boolean isIndependent() { return (this.enclosingClassName == null || this.independentInnerClass); } @Override public boolean hasEnclosingClass() { return (this.enclosingClassName != null); } @Override @Nullable public String getEnclosingClassName() { return this.enclosingClassName; } @Override public boolean hasSuperClass() { return (this.superClassName != null); } @Override @Nullable public String getSuperClassName() { return this.superClassName; } @Override public String[] getInterfaceNames() { return this.interfaces; } @Override public String[] getMemberClassNames() { return StringUtils.toStringArray(this.memberClassNames); } private static class EmptyAnnotationVisitor extends AnnotationVisitor { public EmptyAnnotationVisitor() { super(SpringAsmInfo.ASM_VERSION); } @Override public AnnotationVisitor visitAnnotation(String name, String desc) { return this; } @Override public AnnotationVisitor visitArray(String name) { return this; } } private static class EmptyMethodVisitor extends MethodVisitor { public EmptyMethodVisitor() { super(SpringAsmInfo.ASM_VERSION); } } private static class EmptyFieldVisitor extends FieldVisitor { public EmptyFieldVisitor() { super(SpringAsmInfo.ASM_VERSION); } } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
c6079588a157b391867cf7bfd9a8689d8ee7d681
057edb3f20f883af275329ba49a0f1c7e14884e3
/netty/src/main/java/com/nettyrpc/registry/Constant.java
95618e39077b7658b22da865e609f5d905d20988
[]
no_license
hryou0922/spring
1755ae01cf2f0ca429839de99c918035b91a7c46
098f912d17493ef52a0037d07b471977485b0a5b
refs/heads/master
2021-01-20T17:53:56.955349
2017-06-09T15:04:21
2017-06-09T15:04:21
63,929,380
3
2
null
null
null
null
UTF-8
Java
false
false
250
java
package com.nettyrpc.registry; /** * ZooKeeper constant * * @author huangyong */ public interface Constant { int ZK_SESSION_TIMEOUT = 5000; String ZK_REGISTRY_PATH = "/registry"; String ZK_DATA_PATH = ZK_REGISTRY_PATH + "/data"; }
[ "hryou0922@126.com" ]
hryou0922@126.com
a098cc12f6207f409474a455d92ad2290b123362
5b5f90c99f66587cea981a640063a54b6ea75185
/src/main/java/com/coxandkings/travel/operations/criteria/managedocumentation/HandoverAndCustomerDocInfoSearchCriteria.java
223ccba36927ace9088e60c1c06ead821cda2964
[]
no_license
suyash-capiot/operations
02558d5f4c72a895d4a7e7e743495a118b953e97
b6ad01cbdd60190e3be1f2a12d94258091fec934
refs/heads/master
2020-04-02T06:22:30.589898
2018-10-26T12:11:11
2018-10-26T12:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,617
java
package com.coxandkings.travel.operations.criteria.managedocumentation; public class HandoverAndCustomerDocInfoSearchCriteria { private String id; private String orderId; private String bookId; private String documentSettingId; private String paxId; private String roomId; private String documentWise; private String documentType; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getOrderId() { return orderId; } public void setOrderId(String orderId) { this.orderId = orderId; } public String getBookId() { return bookId; } public void setBookId(String bookId) { this.bookId = bookId; } public String getDocumentSettingId() { return documentSettingId; } public void setDocumentSettingId(String documentSettingId) { this.documentSettingId = documentSettingId; } public String getPaxId() { return paxId; } public void setPaxId(String paxId) { this.paxId = paxId; } public String getRoomId() { return roomId; } public void setRoomId(String roomId) { this.roomId = roomId; } public String getDocumentWise() { return documentWise; } public void setDocumentWise(String documentWise) { this.documentWise = documentWise; } public String getDocumentType() { return documentType; } public void setDocumentType(String documentType) { this.documentType = documentType; } }
[ "sahil@capiot.com" ]
sahil@capiot.com
255c59bd7d775d364cb26d80954989b5291dea11
84ae8a8d2b92a4fb8837b75c74e69b0d48c9daad
/src/com/syt/health/kitchen/widget/PopupWindows.java
d6bde9239290c05194f3271fd5ca704e6ad04250
[]
no_license
winglight/kitchenandroid
4a3824c0de9b563e360c58a13a5f8777aec9a4e6
ae6dc06b68a05619e8abd2174930811245134d69
refs/heads/master
2020-05-17T02:33:21.499315
2014-04-03T08:50:26
2014-04-03T08:50:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,937
java
package com.syt.health.kitchen.widget; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; import android.view.View.OnTouchListener; import android.widget.PopupWindow; import android.content.Context; /** * Custom popup window. * * @author Lorensius W. L. T <lorenz@londatiga.net> * */ public class PopupWindows { protected Context mContext; protected PopupWindow mWindow; protected View mRootView; protected Drawable mBackground = null; protected WindowManager mWindowManager; /** * Constructor. * * @param context Context */ public PopupWindows(Context context) { mContext = context; mWindow = new PopupWindow(context); mWindow.setTouchInterceptor(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_OUTSIDE) { mWindow.dismiss(); return true; } return false; } }); mWindowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); } /** * On dismiss */ protected void onDismiss() { } /** * On show */ protected void onShow() { } /** * On pre show */ protected void preShow() { if (mRootView == null) throw new IllegalStateException("setContentView was not called with a view to display."); onShow(); if (mBackground == null) mWindow.setBackgroundDrawable(new BitmapDrawable()); else mWindow.setBackgroundDrawable(mBackground); mWindow.setWidth(WindowManager.LayoutParams.WRAP_CONTENT); mWindow.setHeight(WindowManager.LayoutParams.WRAP_CONTENT); mWindow.setTouchable(true); mWindow.setFocusable(true); mWindow.setOutsideTouchable(true); mWindow.setContentView(mRootView); } /** * Set background drawable. * * @param background Background drawable */ public void setBackgroundDrawable(Drawable background) { mBackground = background; } /** * Set content view. * * @param root Root view */ public void setContentView(View root) { mRootView = root; mWindow.setContentView(root); } /** * Set content view. * * @param layoutResID Resource id */ public void setContentView(int layoutResID) { LayoutInflater inflator = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); setContentView(inflator.inflate(layoutResID, null)); } /** * Set listener on window dismissed. * * @param listener */ public void setOnDismissListener(PopupWindow.OnDismissListener listener) { mWindow.setOnDismissListener(listener); } /** * Dismiss the popup window. */ public void dismiss() { mWindow.dismiss(); } }
[ "wing_light@hotmail.com" ]
wing_light@hotmail.com
9a4ae3b40d5a3c1ab08d9a63de56cc7c4b528a53
ebdcaff90c72bf9bb7871574b25602ec22e45c35
/examples/admanager_axis/src/main/java/admanager/axis/v201808/reportservice/RunAdExchangeReport.java
16d3c8272ec4b67d948616b5fc87d4b3935196b4
[ "Apache-2.0" ]
permissive
ColleenKeegan/googleads-java-lib
3c25ea93740b3abceb52bb0534aff66388d8abd1
3d38daadf66e5d9c3db220559f099fd5c5b19e70
refs/heads/master
2023-04-06T16:16:51.690975
2018-11-15T20:50:26
2018-11-15T20:50:26
158,986,306
1
0
Apache-2.0
2023-04-04T01:42:56
2018-11-25T00:56:39
Java
UTF-8
Java
false
false
7,435
java
// Copyright 2015 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package admanager.axis.v201808.reportservice; import static com.google.api.ads.common.lib.utils.Builder.DEFAULT_CONFIGURATION_FILENAME; import com.google.api.ads.admanager.axis.factory.AdManagerServices; import com.google.api.ads.admanager.axis.utils.v201808.ReportDownloader; import com.google.api.ads.admanager.axis.v201808.ApiError; import com.google.api.ads.admanager.axis.v201808.ApiException; import com.google.api.ads.admanager.axis.v201808.Column; import com.google.api.ads.admanager.axis.v201808.DateRangeType; import com.google.api.ads.admanager.axis.v201808.Dimension; import com.google.api.ads.admanager.axis.v201808.ExportFormat; import com.google.api.ads.admanager.axis.v201808.ReportDownloadOptions; import com.google.api.ads.admanager.axis.v201808.ReportJob; import com.google.api.ads.admanager.axis.v201808.ReportQuery; import com.google.api.ads.admanager.axis.v201808.ReportServiceInterface; import com.google.api.ads.admanager.axis.v201808.TimeZoneType; import com.google.api.ads.admanager.lib.client.AdManagerSession; import com.google.api.ads.common.lib.auth.OfflineCredentials; import com.google.api.ads.common.lib.auth.OfflineCredentials.Api; import com.google.api.ads.common.lib.conf.ConfigurationLoadException; import com.google.api.ads.common.lib.exception.OAuthException; import com.google.api.ads.common.lib.exception.ValidationException; import com.google.api.client.auth.oauth2.Credential; import com.google.common.io.Files; import com.google.common.io.Resources; import java.io.File; import java.io.IOException; import java.net.URL; import java.rmi.RemoteException; /** * This example runs a report on Ad Exchange data via the Ad Manager API. * * <p>Credentials and properties in {@code fromFile()} are pulled from the "ads.properties" file. * See README for more info. */ public class RunAdExchangeReport { /** * Runs the example. * * @param adManagerServices the services factory. * @param session the session. * @throws ApiException if the API request failed with one or more service errors. * @throws RemoteException if the API request failed due to other errors. * @throws IOException if the report's contents could not be written to a temp file. * @throws InterruptedException if the thread was interrupted while waiting for the report to be * ready. */ public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws IOException, InterruptedException { // Get the ReportService. ReportServiceInterface reportService = adManagerServices.get(session, ReportServiceInterface.class); // Create report query. ReportQuery reportQuery = new ReportQuery(); reportQuery.setDimensions( new Dimension[] {Dimension.AD_EXCHANGE_DATE, Dimension.AD_EXCHANGE_COUNTRY_NAME}); reportQuery.setColumns(new Column[] {Column.AD_EXCHANGE_AD_REQUESTS, Column.AD_EXCHANGE_IMPRESSIONS, Column.AD_EXCHANGE_ESTIMATED_REVENUE}); // Run in pacific time. reportQuery.setTimeZoneType(TimeZoneType.AD_EXCHANGE); reportQuery.setAdxReportCurrency("EUR"); // Set the dynamic date range type or a custom start and end date. reportQuery.setDateRangeType(DateRangeType.YESTERDAY); // Create report job. ReportJob reportJob = new ReportJob(); reportJob.setReportQuery(reportQuery); // Run report job. reportJob = reportService.runReportJob(reportJob); // Create report downloader. ReportDownloader reportDownloader = new ReportDownloader(reportService, reportJob.getId()); // Wait for the report to be ready. reportDownloader.waitForReportReady(); // Change to your file location. File file = File.createTempFile("adexchange-report-", ".csv.gz"); System.out.printf("Downloading report to %s ...", file.toString()); // Download the report. ReportDownloadOptions options = new ReportDownloadOptions(); options.setExportFormat(ExportFormat.CSV_DUMP); options.setUseGzipCompression(true); URL url = reportDownloader.getDownloadUrl(options); Resources.asByteSource(url).copyTo(Files.asByteSink(file)); System.out.println("done."); } public static void main(String[] args) { AdManagerSession session; try { // Generate a refreshable OAuth2 credential. Credential oAuth2Credential = new OfflineCredentials.Builder() .forApi(Api.AD_MANAGER) .fromFile() .build() .generateCredential(); // Construct a AdManagerSession. session = new AdManagerSession.Builder().fromFile().withOAuth2Credential(oAuth2Credential).build(); } catch (ConfigurationLoadException cle) { System.err.printf( "Failed to load configuration from the %s file. Exception: %s%n", DEFAULT_CONFIGURATION_FILENAME, cle); return; } catch (ValidationException ve) { System.err.printf( "Invalid configuration in the %s file. Exception: %s%n", DEFAULT_CONFIGURATION_FILENAME, ve); return; } catch (OAuthException oe) { System.err.printf( "Failed to create OAuth credentials. Check OAuth settings in the %s file. " + "Exception: %s%n", DEFAULT_CONFIGURATION_FILENAME, oe); return; } AdManagerServices adManagerServices = new AdManagerServices(); try { runExample(adManagerServices, session); } catch (ApiException apiException) { // ApiException is the base class for most exceptions thrown by an API request. Instances // of this exception have a message and a collection of ApiErrors that indicate the // type and underlying cause of the exception. Every exception object in the admanager.axis // packages will return a meaningful value from toString // // ApiException extends RemoteException, so this catch block must appear before the // catch block for RemoteException. System.err.println("Request failed due to ApiException. Underlying ApiErrors:"); if (apiException.getErrors() != null) { int i = 0; for (ApiError apiError : apiException.getErrors()) { System.err.printf(" Error %d: %s%n", i++, apiError); } } } catch (RemoteException re) { // RemoteException extends IOException, so this catch block must appear before the catch // block for IOException. System.err.printf( "Request failed unexpectedly due to RemoteException: %s%n", re); } catch (IOException ioe) { System.err.printf( "Request failed unexpectedly due to IOException: %s%n", ioe); } catch (InterruptedException ie) { System.err.printf("Thread was interrupted while waiting for the report to be ready: %s.%n", ie); } } }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
aae00eb8d8e4ec651b619bcd5675b62e20754558
d02193e934a9357b27671db6523ae623a5536c74
/src/main/java/com/god/gallery/adapter/PhotoAdapter.java
2723c5713a45be2ed51295beb1785b5deac4f3b0
[ "Apache-2.0" ]
permissive
abook23/godlibrary-gallery
9ac799d7ec844c6975a302543d0ddb2715a11fbf
fb46c8594ab7701486928b4dc6e7999c7ba101f8
refs/heads/master
2021-01-20T07:13:33.128413
2017-06-06T05:45:48
2017-06-06T05:45:48
89,979,369
1
0
null
null
null
null
UTF-8
Java
false
false
5,105
java
package com.god.gallery.adapter; import android.content.Context; import android.support.v4.util.ArrayMap; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.CheckBox; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.bumptech.glide.Glide; import com.god.gallery.R; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by abook23 on 2015/10/20. */ public class PhotoAdapter extends RecyclerView.Adapter<PhotoAdapter.PhotoViewHolder> { public static final String KEY_PHOTO = "PHOTO"; public static final String KEY_NAME = "NAME"; public static final String KEY_COUNT = "COUNT"; private Context context; private List<ArrayMap<String,String>> data; private HashMap<String, ArrayList<String>> checkImages; private AdapterView.OnItemClickListener mOnItemClickListener; public PhotoAdapter(Context context) { this.context = context; } public void setDate(List<ArrayMap<String,String>> data) { this.data = data; } public String getPhotoName(int position) { return data.get(position).get(KEY_NAME); } public void setCheckImages(HashMap<String, ArrayList<String>> checkImages) { this.checkImages = checkImages; } @Override public PhotoViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.gallery_item_list_1, parent, false); return new PhotoViewHolder(view); } @Override public void onBindViewHolder(PhotoViewHolder holder, int position) { ArrayMap<String,String> itemData = data.get(position); String name; switch (itemData.get(KEY_NAME)) { case "Camera": name = "相册"; break; case "Screenshots": name = "截屏"; break; default: name = itemData.get(KEY_NAME); break; } holder.tv1.setText(name); holder.tv2.setText(itemData.get(KEY_COUNT)); Glide.with(context).load(itemData.get(KEY_PHOTO)).into(holder.iv1); holder.linearLayout.removeAllViews(); if (checkImages != null && checkImages.size() > 0) { ArrayList<String> images = checkImages.get(itemData.get(KEY_NAME)); if (images != null) for (String path : images) { View view = getView(path, 25, 25); holder.linearLayout.addView(view); } } //holder.itemView.setTag(); } @Override public int getItemCount() { return data == null ? 0 : data.size(); } public View getView(String path, float width, float height) { View convertView = View.inflate(context, R.layout.gallery_item_image_check, null); CheckBox checkBox = (CheckBox) convertView.findViewById(R.id.checkBox); checkBox.setVisibility(View.GONE); ImageView imageView = (ImageView) convertView.findViewById(R.id.imageView1); FrameLayout frameLayout = (FrameLayout) convertView.findViewById(R.id.gb_fl_check_image); ViewGroup.LayoutParams layoutParams = frameLayout.getLayoutParams(); layoutParams.width = dp2px(context, width); layoutParams.height = dp2px(context, height); frameLayout.setLayoutParams(layoutParams); //imageFetcher.loadImage(path, imageView); Glide.with(context).load(path).into(imageView); return convertView; } /** * dp和像素转换 */ private int dp2px(Context context, float dipValue) { float m = context.getResources().getDisplayMetrics().density; return (int) (dipValue * m + 0.5f); } public void setOnItemClickListener(AdapterView.OnItemClickListener onItemClickListener) { mOnItemClickListener = onItemClickListener; } public class PhotoViewHolder extends RecyclerView.ViewHolder { public TextView tv1; public TextView tv2; public ImageView iv1; public LinearLayout linearLayout; public PhotoViewHolder(View itemView) { super(itemView); iv1 = (ImageView) itemView.findViewById(R.id.imageView1); tv1 = (TextView) itemView.findViewById(R.id.textView1); tv2 = (TextView) itemView.findViewById(R.id.textView2); linearLayout = (LinearLayout) itemView.findViewById(R.id.gb_df_p_select); if (mOnItemClickListener != null) itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mOnItemClickListener.onItemClick(null, v, getAdapterPosition(), getItemId()); } }); } } }
[ "abook23@163.com" ]
abook23@163.com
5e71025d55853beb57760156b84d9ab26d185c1d
d61cbe04b46e3480d5f2acf356f8ccdbab28dbc7
/Otros Cursos/backend_proyect_ismael/src/com/icaballero/daos/test/VisitorDAOTest.java
33394c857e2c6477be10b990b1723d11286de8e7
[]
no_license
decalion/Formaciones-Platzi-Udemy
d479548c50f3413eba5bad3d01bdd6a33ba75f60
3180d5062d847cc466d4a614863a731189137e50
refs/heads/master
2022-11-30T18:59:39.796599
2021-06-08T20:11:18
2021-06-08T20:11:18
200,000,005
1
2
null
2022-11-24T09:11:48
2019-08-01T07:27:00
Java
UTF-8
Java
false
false
2,384
java
package com.icaballero.daos.test; import static org.junit.Assert.*; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import com.icaballero.daos.DAOManager; import com.icaballero.daos.VisitorDAO; import com.icaballero.domain.Visitor; /** * Test de EventDAO * @author Ismael Caballero * */ public class VisitorDAOTest { DAOManager manager; VisitorDAO visitorDAO; @Before public void setUp() throws Exception { manager = new DAOManager(); visitorDAO = (VisitorDAO) manager.getVisitorDAO(); } @After public void tearDown() throws Exception { visitorDAO = null; manager.closeError(); } /** * Test Constructor */ @Test public void testVisitorDAO() { VisitorDAO v = (VisitorDAO) manager.getVisitorDAO(); Assert.assertNotNull(visitorDAO); } /** * Test del metodo insertData */ @Test public void testInsertData() { Visitor visitor = new Visitor(); visitor.setVisitorId(2); visitor.setFirstName("Ismael"); visitor.setLastName("Caballero"); visitor.setDni("45858750Q"); visitor.setEmail("aaaa@gmail.com"); visitor.setPhoneNumber("999 999 9999"); visitor.setAddres("Carrer Vallirran"); visitor.setUserName("ich245"); visitor.setPassword("ich666"); visitor.setAdmin(true); visitorDAO.insertData(visitor); } /** * test del metodo searchUser */ @Test public void testSearchUser() { Visitor v = new Visitor(); v.setUserName("pepe234"); Visitor visitor = visitorDAO.searchUser(v); System.out.println(visitor.getFirstName()+" " +visitor.getLastName()+" "+visitor.getUserName()+" " + visitor.getPassword()); } /** * Test del metodo updateVisitor */ @Test public void testUpdateVisitor() { Visitor visitor = new Visitor(); visitor.setVisitorId(1); visitor.setFirstName("Ismael2"); visitor.setLastName("Caballero2"); visitor.setDni("45858750Q"); visitor.setEmail("aaaa@gmail.com"); visitor.setPhoneNumber("999 999 9999"); visitor.setAddres("Carrer Vallirran2"); visitor.setUserName("ich245"); visitor.setPassword("ich666"); visitor.setAdmin(true); visitorDAO.updateVisitor(visitor); } /** * Test del metodo changePassword */ @Test public void testChangePassword() { Visitor visitor = new Visitor(); visitor.setVisitorId(1); visitor.setPassword("klmo90"); visitorDAO.changePassword(visitor); } }
[ "icaballerohernandez@gmail.com" ]
icaballerohernandez@gmail.com
464c5529f83bd56261be617ed6bf1aa4713fd1a2
a94619fdc8770da90d0d307da64f19e95bcbbfc7
/java/aon.java
4b29b06f195e7d3d6b154a31532ca3f5b41aabe9
[]
no_license
BeCandid/CFR
b95cf21629ced30fac290a61ff51d443057a5919
ab5019fb6196b6c8f8e2a3fe18f557b89831d690
refs/heads/master
2021-01-12T05:52:09.792333
2016-12-24T10:04:51
2016-12-24T10:04:51
77,222,002
3
0
null
null
null
null
UTF-8
Java
false
false
979
java
/* * Decompiled with CFR 0_110. * * Could not load the following classes: * java.lang.Object */ public class aon { public static final aon a = new a().a(500).a(); private long b; aon(long l2) { this.b = l2; } public long a() { return this.b; } /* * Enabled aggressive block sorting * Lifted jumps to return sites */ public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof aon)) { return false; } aon aon2 = (aon)object; if (this.b == aon2.b) return true; return false; } public int hashCode() { return (int)(this.b ^ this.b >>> 32); } public static class a { private long a; public a a(long l2) { this.a = l2; return this; } public aon a() { return new aon(this.a); } } }
[ "admin@timo.de.vc" ]
admin@timo.de.vc
3f6f6cbff86f78c79c492a31ba46a6e09f0079db
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/g/a/nm$a.java
d0e4d120668c6ca78f2f3d5d806a1cf95f37d3d3
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
353
java
package com.tencent.mm.g.a; import com.tencent.mm.af.j.b; public final class nm$a { public String cEa; public j.b cJM; public long cvx; } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes3-dex2jar.jar * Qualified Name: com.tencent.mm.g.a.nm.a * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
0f4ba38a2509f5b4569149dc3a1af0cf68621cdd
e3e2c4f42c4a7bb366439d713066d7207cb03ba8
/app/src/main/java/com/gzligo/ebizzcardstranslator/utils/ButterKnifeUtils.java
4ec5380f402960869120d6fc30e41a6cc3bc6634
[]
no_license
vidylin/EbizzcardsT
94a85bf5ca9e49db6b8754b349c4fed867521a5d
3f350dcd994808c60980bf40f9d5380e77afde0c
refs/heads/master
2021-08-26T09:44:36.653655
2017-11-23T02:17:49
2017-11-23T02:17:49
111,752,967
0
0
null
null
null
null
UTF-8
Java
false
false
728
java
package com.gzligo.ebizzcardstranslator.utils; import android.app.Activity; import android.app.Dialog; import android.view.View; import butterknife.ButterKnife; import butterknife.Unbinder; /** * Created by xfast on 2017/5/31. */ public class ButterKnifeUtils { public static Unbinder bindTarget(Object target, Object source) { if (source instanceof Activity) { return ButterKnife.bind(target, (Activity) source); } else if (source instanceof View) { return ButterKnife.bind(target, (View) source); } else if (source instanceof Dialog) { return ButterKnife.bind(target, (Dialog) source); } else { return Unbinder.EMPTY; } } }
[ "linwd" ]
linwd
3e1165cf61be3b6df07b63f436eddaaa720f9232
f909ec612f17254be491c3ef9cdc1f0b186e8daf
/java_plugin/jun_designpattern/src/main/src_designpatterns/com/jun/plugin/designpatterns/结构型模式/享元模式/WebSiteFactory.java
c0328dd48d3f95537d9cacb2bb21c7dabc8d5476
[]
no_license
kingking888/jun_java_plugin
8853f845f242ce51aaf01dc996ed88784395fd83
f57e31fa496d488fc96b7e9bab3c245f90db5f21
refs/heads/master
2023-06-04T19:30:29.554726
2021-06-24T17:19:55
2021-06-24T17:19:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,288
java
package com.jun.plugin.designpatterns.结构型模式.享元模式; import java.util.HashMap; import java.util.Map; /** * 使用工厂创建 * * 作者: zhoubang * 日期:2015年10月28日 下午3:33:27 */ public class WebSiteFactory { //存储实例对象 private static Map<String, WebSite> webSites = new HashMap<String, WebSite>(); /** * 禁止外部创建 * * 作者: zhoubang * 日期:2015年10月28日 下午3:37:18 */ private WebSiteFactory() {} /** * type作为对象公共的属性,使用该属性获取对应的对象实例 * * 作者: zhoubang * 日期:2015年10月28日 下午3:36:01 * @param type * @return */ public static WebSite createWebSite(String type) { WebSite webSite = webSites.get(type); if (webSite == null) {//没有则创建 webSite = new ConcurrentWebSite(type); //添加到列表中存储 webSites.put(type, webSite); } return webSite; } /** * 获取实例对象的个数 * * 作者: zhoubang * 日期:2015年10月28日 下午3:37:05 * @return */ public static int webSitesCount() { return webSites.size(); } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
bc1b920506e89aa4f9abfc639fca97fc47a10dc0
dfda9a782091598f54a4f8c45d7c7fdf29708fd2
/util/src/test/java/net/automatalib/util/automata/copy/DFSTraversalCopyTest.java
8e6b72a1a7644825bcf15b688a9f0e588f276e0d
[ "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
mmuesly/automatalib
0526e65b261fe0c089a7dcb7e9659fced657f792
5496709e61e4218061ebd00e8060a9e6486047bf
refs/heads/develop
2021-04-06T10:46:06.374266
2019-10-13T16:38:06
2019-10-13T16:38:06
124,900,999
0
0
Apache-2.0
2018-03-12T14:23:37
2018-03-12T14:23:34
null
UTF-8
Java
false
false
923
java
/* Copyright (C) 2013-2019 TU Dortmund * This file is part of AutomataLib, http://www.automatalib.net/. * * 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.automatalib.util.automata.copy; /** * @author frohme */ public class DFSTraversalCopyTest extends AbstractAutomatonCopyTest { @Override protected AutomatonCopyMethod getCopyMethod() { return AutomatonCopyMethod.DFS; } }
[ "markus.frohme@udo.edu" ]
markus.frohme@udo.edu
7f2e8a1982b62d073494ac87c291af774c76de07
e010f83b9d383a958fc73654162758bda61f8290
/src/main/java/com/alipay/api/response/AlipayOpenPublicMessageContentModifyResponse.java
0a5c3ed8ad3d92220a2b80f9117b2dace42dc973
[ "Apache-2.0" ]
permissive
10088/alipay-sdk-java
3a7984dc591eaf196576e55e3ed657a88af525a6
e82aeac7d0239330ee173c7e393596e51e41c1cd
refs/heads/master
2022-01-03T15:52:58.509790
2018-04-03T15:50:35
2018-04-03T15:50:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
872
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.public.message.content.modify response. * * @author auto create * @since 1.0, 2018-02-09 16:28:22 */ public class AlipayOpenPublicMessageContentModifyResponse extends AlipayResponse { private static final long serialVersionUID = 2618296554981747882L; /** * 内容id */ @ApiField("content_id") private String contentId; /** * 内容详情内链url */ @ApiField("content_url") private String contentUrl; public void setContentId(String contentId) { this.contentId = contentId; } public String getContentId( ) { return this.contentId; } public void setContentUrl(String contentUrl) { this.contentUrl = contentUrl; } public String getContentUrl( ) { return this.contentUrl; } }
[ "liuqun.lq@alibaba-inc.com" ]
liuqun.lq@alibaba-inc.com
936d9623edccadacf83f05ce454e456fd7682f4f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13457-34-18-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/container/servlet/filters/internal/SavedRequestRestorerFilter_ESTest.java
2d26d45cee489b8ae3a58eddd59217821e3d5466
[]
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
603
java
/* * This file was automatically generated by EvoSuite * Wed Apr 01 20:35:05 UTC 2020 */ package org.xwiki.container.servlet.filters.internal; 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 SavedRequestRestorerFilter_ESTest extends SavedRequestRestorerFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
1719f3b1b654ec6a117b94355c4941e09412472c
027cd7112ef70fbcdb2670a009654f360bb7e06e
/net/htmlparser/jericho/NumericCharacterReference.java
895ab0e5ee4f82d1d5d4a7c683a667cf7d7721e9
[]
no_license
code4ghana/courseScheduler
1c968ebc249a75661bdc22075408fc60e6d0df19
9885df3638c6b287841f8a7b751cfe1523a68fb2
refs/heads/master
2016-08-03T14:06:38.715664
2014-08-03T03:37:36
2014-08-03T03:37:36
22,566,289
0
1
null
null
null
null
UTF-8
Java
false
false
4,778
java
package net.htmlparser.jericho; import java.io.IOException; public class NumericCharacterReference extends CharacterReference { private boolean hex; private NumericCharacterReference(Source paramSource, int paramInt1, int paramInt2, int paramInt3, boolean paramBoolean) { super(paramSource, paramInt1, paramInt2, paramInt3); this.hex = paramBoolean; } public boolean isDecimal() { return !this.hex; } public boolean isHexadecimal() { return this.hex; } public static String encode(CharSequence paramCharSequence) { if (paramCharSequence == null) return null; StringBuilder localStringBuilder = new StringBuilder(paramCharSequence.length() * 2); for (int i = 0; i < paramCharSequence.length(); i++) { char c = paramCharSequence.charAt(i); if (requiresEncoding(c)) try { appendDecimalCharacterReferenceString(localStringBuilder, c); } catch (IOException localIOException) { throw new RuntimeException(localIOException); } else localStringBuilder.append(c); } return localStringBuilder.toString(); } public static String encodeDecimal(CharSequence paramCharSequence) { return encode(paramCharSequence); } public static String encodeHexadecimal(CharSequence paramCharSequence) { if (paramCharSequence == null) return null; StringBuilder localStringBuilder = new StringBuilder(paramCharSequence.length() * 2); for (int i = 0; i < paramCharSequence.length(); i++) { char c = paramCharSequence.charAt(i); if (requiresEncoding(c)) try { appendHexadecimalCharacterReferenceString(localStringBuilder, c); } catch (IOException localIOException) { throw new RuntimeException(localIOException); } else localStringBuilder.append(c); } return localStringBuilder.toString(); } public String getCharacterReferenceString() { return this.hex ? getHexadecimalCharacterReferenceString(this.codePoint) : getDecimalCharacterReferenceString(this.codePoint); } public static String getCharacterReferenceString(int paramInt) { return getDecimalCharacterReferenceString(paramInt); } static CharacterReference construct(Source paramSource, int paramInt, Config.UnterminatedCharacterReferenceSettings paramUnterminatedCharacterReferenceSettings) { ParseText localParseText = paramSource.getParseText(); int i = paramInt + 2; boolean bool; if ((bool = localParseText.charAt(i) == 'x' ? 1 : 0) != 0) i++; int j = bool ? paramUnterminatedCharacterReferenceSettings.hexadecimalCharacterReferenceMaxCodePoint : paramUnterminatedCharacterReferenceSettings.decimalCharacterReferenceMaxCodePoint; int k = paramSource.end - 1; int n = i; int i1 = 0; int m; String str; while (true) { i2 = localParseText.charAt(n); if (i2 == 59) { m = n + 1; str = paramSource.substring(i, n); break; } if (((i2 >= 48) && (i2 <= 57)) || ((bool) && (((i2 >= 97) && (i2 <= 102)) || ((i2 >= 65) && (i2 <= 70))))) { if (n == k) { i1 = 1; n++; } } else i1 = 1; if (i1 != 0) { if (j == -1) return null; m = n; str = paramSource.substring(i, n); break; } n++; } if (str.length() == 0) return null; int i2 = -1; try { i2 = Integer.parseInt(str, bool ? 16 : 10); if ((i1 != 0) && (i2 > j)) return null; if (i2 > 1114111) i2 = -1; } catch (NumberFormatException localNumberFormatException) { if (i1 != 0) return null; } return new NumericCharacterReference(paramSource, paramInt, m, i2, bool); } public String getDebugInfo() { StringBuilder localStringBuilder = new StringBuilder(); localStringBuilder.append('"'); try { if (this.hex) appendHexadecimalCharacterReferenceString(localStringBuilder, this.codePoint); else appendDecimalCharacterReferenceString(localStringBuilder, this.codePoint); localStringBuilder.append("\" "); appendUnicodeText(localStringBuilder, this.codePoint); } catch (IOException localIOException) { throw new RuntimeException(localIOException); } localStringBuilder.append(' ').append(super.getDebugInfo()); return localStringBuilder.toString(); } } /* Location: /Users/jeff.kusi/Downloads/AutomatedScheduler - Fakhry & Kusi.jar * Qualified Name: net.htmlparser.jericho.NumericCharacterReference * JD-Core Version: 0.6.2 */
[ "jeff.kusi@willowtreeapps.com" ]
jeff.kusi@willowtreeapps.com
aeee2af9ffdaa7ce0f0749a9e7777d730f3a3582
1f9baaa9d5ae5d31a68f8958421192b287338439
/app/src/main/java/ci/function/MyTrips/Detail/CIFlightInfoFragment.java
dd6344e8088c01f8a18d8476f0a563c55e735e4c
[]
no_license
TkWu/CAL_live_code-1
538dde0ce66825026ef01d3fadfcbf4d6e4b1dd0
ba30ccfd8056b9cc3045b8e06e8dc60b654c1e55
refs/heads/master
2020-08-29T09:16:35.600796
2019-10-23T06:46:53
2019-10-23T06:46:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,834
java
package ci.function.MyTrips.Detail; import android.content.Intent; import android.os.Message; import android.support.v4.app.FragmentManager; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.RelativeLayout; import com.chinaairlines.mobile30.R; import ci.function.Base.BaseFragment; import ci.ui.define.ViewScaleDef; import ci.ui.dialog.CIAlertDialog; import ci.ui.view.ImageHandle; /** * Created by kevincheng on 2016/3/4. */ public class CIFlightInfoFragment extends BaseFragment implements View.OnClickListener{ private RelativeLayout m_rlFlightStatus = null, m_rlShare = null; private ImageView m_ivFlightStatic = null; @Override protected int getLayoutResourceId() { return R.layout.fragment_flight_tab_flight_status; } @Override protected void initialLayoutComponent(LayoutInflater inflater, View view) { m_rlFlightStatus = (RelativeLayout)view.findViewById(R.id.rl_flight_status_click); m_rlShare = (RelativeLayout)view.findViewById(R.id.rl_share_click); m_ivFlightStatic = (ImageView) view.findViewById(R.id.iv_flight_status); } @Override protected void setTextSizeAndLayoutParams(View view, ViewScaleDef vScaleDef) { vScaleDef.selfAdjustAllView(view.findViewById(R.id.root)); vScaleDef.selfAdjustSameScaleView(view.findViewById(R.id.iv_ic_share_b),24,24); m_ivFlightStatic .setImageBitmap(ImageHandle.getRoundedCornerBitmap(getActivity(), R.drawable.sample_flight_status, vScaleDef.getLayoutMinUnit(3))); } @Override protected void setOnParameterAndListener(View view) { m_rlFlightStatus.setOnClickListener(this); m_rlShare.setOnClickListener(this); } @Override protected void registerFragment(FragmentManager fragmentManager) { } @Override protected boolean bOtherHandleMessage(Message msg) { return false; } @Override protected void removeOtherHandleMessage() { } @Override public void onLanguageChangeUpdateUI() { } @Override public void onClick(View v) { switch (v.getId()){ case R.id.rl_share_click: shareMessage("這是一則透過華航App分享的訊息,請多多支持,謝謝!"); break; } } private void shareMessage(String msg){ Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, msg); sendIntent.setType("text/plain"); startActivity(sendIntent); } }
[ "s2213005@gmail.com" ]
s2213005@gmail.com
623eb0e613d650f6a22d0272a576ec31ee127b2d
e820097c99fb212c1c819945e82bd0370b4f1cf7
/gwt-sh/src/main/java/com/skynet/spms/persistence/entity/customerService/order/leasePostponeOrder/customerLeasePostponeOrder.java
ac8a0db5631b4d7aaabb846220caa90b98bd15bf
[]
no_license
jayanttupe/springas-train-example
7b173ca4298ceef543dc9cf8ae5f5ea365431453
adc2e0f60ddd85d287995f606b372c3d686c3be7
refs/heads/master
2021-01-10T10:37:28.615899
2011-12-20T07:47:31
2011-12-20T07:47:31
36,887,613
0
0
null
null
null
null
UTF-8
Java
false
false
408
java
package com.skynet.spms.persistence.entity.customerService.order.leasePostponeOrder; import com.skynet.spms.persistence.entity.base.baseOrderEntity.BaseOrderEntity; /** * @author 曹宏炜 * @version 1.0 * @created 05-五月-2011 11:15:15 */ public class customerLeasePostponeOrder extends BaseOrderEntity { private String customerContractNumber; private String suppierContractNumber; }
[ "usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d" ]
usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d
8c4b0c11d8008359562e3832f8bc424321963c20
6941b73e80730b8ac9937cc92246be9ebb4a4461
/src/M1W4D1_G16_for_break_continue/for4.java
8932bcac457097ad6af8579ef2e865765328a270
[]
no_license
MustafAydn1/MyJavaCourse
ab64dfab36f723e6c70b4715c4f311f308030bdb
75d6857c5e60130c7809f891fec7c85a64c20fa7
refs/heads/master
2023-02-09T22:32:18.393558
2020-12-25T13:03:35
2020-12-25T13:03:35
324,765,044
0
0
null
null
null
null
UTF-8
Java
false
false
568
java
package M1W4D1_G16_for_break_continue; import java.util.Scanner; public class for4 { public static void main(String[] args) { // 2 ler çarpım tablosunu , tablo olarak yazdırınız. // 2 x 1 = 2 // 2 x 2 = 4 // 2 x 3 = 6 // 2 x 4 = 8 // 2 x 5 = 10 // 2 x 6 = 12 // 2 x 7 = 14 // 2 x 8 = 16 // 2 x 9 = 18 // 2 x 10 = 20 for(int ilk=1;ilk<=10;ilk++) { System.out.println("2 x "+ilk+" = " +(ilk*2) ); } } }
[ "mustafaaydin1029@gmail.com" ]
mustafaaydin1029@gmail.com
e1d83bcdb9792d75677f0186edbd3a9f1547ba17
4e71296dbf7fc0d72279bf1871b77a27f4e087a6
/workspace/L-11-23/src/www/lmj/dome2/Zoon.java
3a8f0d72be25a7598613f5ead39f814a98337dd6
[ "MIT" ]
permissive
lmj1995/li-gettest
52683396a6f8ddbf243332792b1af085de86e74d
51aaaabb359a55e3f411e8949a44da537697d06c
refs/heads/master
2021-01-11T12:01:43.722013
2017-01-10T07:45:17
2017-01-10T07:45:17
76,611,853
1
2
null
2016-12-16T06:23:53
2016-12-16T01:54:18
null
WINDOWS-1252
Java
false
false
359
java
package www.lmj.dome2; import org.omg.CORBA.PUBLIC_MEMBER; public class Zoon { public String name=""; public Zoon(String name){ this.name=name; } public void eat(){ System.out.println(name+"³Ô¶«Î÷"); } public void sleep(){ System.out.println(name+"˯¾õ¾õ"); } public String getName() { return name; } }
[ "you@example.com" ]
you@example.com
27d01eedb1db239056688dc4313f72b825e586ee
a3123a1eccc415e2e855b7954702b831b4775958
/src/main/java/mariculture/core/config/Enchantments.java
bf65a297c9a9aafe6b0439a3d90a3b4e35d63858
[ "MIT" ]
permissive
soundlogic2236/Mariculture
34d126a2ee18031886ac65b44ff34f922dfab65c
c4929634654b5cf152a7cd6413e2f6e431f470cb
refs/heads/master
2020-12-03T09:27:21.770810
2014-08-28T19:51:31
2014-08-28T19:51:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,866
java
package mariculture.core.config; import static mariculture.core.helpers.ConfigHelper.getBoolean; import static mariculture.core.helpers.ConfigHelper.getDouble; import static mariculture.core.helpers.ConfigHelper.getInt; import static mariculture.core.helpers.ConfigHelper.setCategory; import static mariculture.core.helpers.ConfigHelper.setConfig; import net.minecraftforge.common.config.Configuration; public class Enchantments { public static class EnchantIds { public static int hungry; public static int oneRing; public static int speed; public static int health; public static int repair; public static int jump; public static int spider; public static int glide; public static int fall; public static int resurrection; public static int blink; public static int flight; public static int stepUp; public static int elemental; } public static int JUMPS_PER; public static double JUMP_FACTOR; public static int SPEED_TICKS; public static double SPEED_FACTOR; public static int TICK_REPAIR; public static boolean ALLOW_MC_ANVIL; public static void init(Configuration config) { setConfig(config); setCategory("IDs"); EnchantIds.blink = getInt("Blink", 75); EnchantIds.elemental = getInt("Elemental Affinity", 76); EnchantIds.fall = getInt("Fall Resistance", 77); EnchantIds.flight = getInt("Superman", 78); EnchantIds.glide = getInt("Paraglide", 79); EnchantIds.health = getInt("1 Up", 80); EnchantIds.jump = getInt("Leapfrog", 81); EnchantIds.hungry = getInt("Never Hungry", 82); EnchantIds.oneRing = getInt("The One Ring", 83); EnchantIds.repair = getInt("Restoration", 84); EnchantIds.resurrection = getInt("Reaper", 85); EnchantIds.speed = getInt("Sonic the Hedgehog", 86); EnchantIds.spider = getInt("Spiderman", 87); EnchantIds.stepUp = getInt("Step Up", 88); setCategory("Jewelry"); Jewelry.JEWELRY_OFFLINE = getBoolean("Enable Singleplayer Jewelry Offline Mode", false); Jewelry.DROP_JEWELRY = getBoolean("Jewelry Drops on Death", false); setCategory("Tweaks"); JUMPS_PER = getInt("Leapfrog > Jumps per Damage", 10); JUMP_FACTOR = getDouble("Leapfrog > Jump Factor", 0.15); SPEED_TICKS = getInt("Sonic the Hedgehog > Ticks per Damage", 1200); SPEED_FACTOR = getDouble("Sonic the Hedgehog > Speed Factor", 0.025); TICK_REPAIR = getInt("Restoration - Ticks between Repair", 100); ALLOW_MC_ANVIL = getBoolean("Enable Books being applied to Jewelry", false); } public static class Jewelry { public static boolean JEWELRY_OFFLINE; public static boolean DROP_JEWELRY; } }
[ "joshjackwildman@gmail.com" ]
joshjackwildman@gmail.com
5594f6fa5cf3a33d02b311a43166fc4d97b851c8
26abb1a01668c70f45d884da5b8be7dfade4023a
/modules/ads_lib/src/main/java/com/google/api/ads/adwords/lib/jaxb/v201402/DownloadFormat.java
884ff54776eef346855afba282b8e5b2b834481f
[ "Apache-2.0" ]
permissive
WalmartCanada/googleads-java-lib
f55750391b57912033e7b015284300b50f1a9023
e9e2236e8c1231bb18dc50daa32a3f4b588851d2
refs/heads/master
2020-12-28T14:45:11.150754
2014-09-11T19:28:42
2014-09-11T19:28:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,366
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-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: 2014.09.11 at 11:14:13 AM PDT // package com.google.api.ads.adwords.lib.jaxb.v201402; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for DownloadFormat. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="DownloadFormat"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="CSVFOREXCEL"/> * &lt;enumeration value="CSV"/> * &lt;enumeration value="TSV"/> * &lt;enumeration value="XML"/> * &lt;enumeration value="GZIPPED_CSV"/> * &lt;enumeration value="GZIPPED_XML"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "DownloadFormat") @XmlEnum public enum DownloadFormat { CSVFOREXCEL, CSV, TSV, XML, GZIPPED_CSV, GZIPPED_XML; public String value() { return name(); } public static DownloadFormat fromValue(String v) { return valueOf(v); } }
[ "jradcliff@google.com" ]
jradcliff@google.com
10136b6d93201dfb66b146213a4eeb4ef212ae76
19761207afd3a6f92dd7f958ee1d8b1acf39fc0f
/src/sample/Controller.java
14f585c46d2d855238d71d93ff8218ce32dd0bae
[]
no_license
nitinporwal/BMI
e5877c549a4eedfab1c1f4e480575c1878a7eb47
5bb3055eb15c8d40f3360211600e9997c5988f66
refs/heads/master
2022-12-19T04:29:23.352653
2020-07-15T06:27:35
2020-07-15T06:27:35
300,060,850
0
0
null
2020-09-30T20:57:33
2020-09-30T20:57:32
null
UTF-8
Java
false
false
838
java
package sample; import javafx.scene.control.Label; import javafx.scene.control.TextField; public class Controller { public TextField theight; public TextField tweight; public Label lbmi; public Label lresult; public void buttonclicked() { double height; double weight; double bmi; String result=""; height= Double.parseDouble(theight.getText()); weight= Double.parseDouble(tweight.getText()); bmi= height*height; bmi= weight/bmi; lbmi.setText("BMI IS: "+bmi); if(bmi<18.5){ result="Under weight"; } else if(bmi>18.5 && bmi<25){ result="Normal"; } else if(bmi>25){ result="Over Weight"; } lresult.setText("You are "+result); } }
[ "sudhanshumallick9@gmail.com" ]
sudhanshumallick9@gmail.com
621e1f24d29f9cc6229c5d69ea48fa7d25eeef4c
c67b82cc356f9d81a595ac3ffd7a3165d966e30a
/src/test/java/com/aparapi/codegen/test/AccessByteArray.java
0421cfbd74fb1928853a08a3eb068079144069e0
[ "Apache-2.0" ]
permissive
Gleethos/aparapi
2912c6f91214773b81152137cab2e4386457ed1c
a07b107d3a93d3db13c43410b43bff9954a9fb45
refs/heads/master
2020-07-25T14:48:31.477171
2019-08-22T16:31:53
2019-08-22T16:31:53
208,328,376
2
0
Apache-2.0
2019-09-13T18:59:20
2019-09-13T18:59:20
null
UTF-8
Java
false
false
1,290
java
/** * Copyright (c) 2016 - 2018 Syncleus, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aparapi.codegen.test; /** * * Test whether we can assign a byte array element. * @author gfrost * */ public class AccessByteArray { byte[] bytes = new byte[1024]; public void run() { for (int i = 0; i < 1024; i++) { bytes[i] = (byte) 1; } } } /**{OpenCL{ typedef struct This_s{ __global char *bytes; int passid; }This; int get_pass_id(This *this){ return this->passid; } __kernel void run( __global char *bytes, int passid ){ This thisStruct; This* this=&thisStruct; this->bytes = bytes; this->passid = passid; { for (int i = 0; i<1024; i++){ this->bytes[i] = 1; } return; } } }OpenCL}**/
[ "jeffrey.freeman@syncleus.com" ]
jeffrey.freeman@syncleus.com
c809ef8f73c54aea91bc139cc2ce4d5945358f94
0af1843170809e2c31894630ed044fbcebadd236
/src/com/massivecraft/massivecore/ps/PSBuilder.java
f174948894305699dedd86f40a7585fa4cc230d3
[ "MIT" ]
permissive
magnusulf/MassiveCore
0c8a337345db2f7806bfd3f510e9c5fe57ebf74f
54aea0f9ddce57fe41ad37eabfbf27f7c96754c8
refs/heads/master
2021-07-07T14:05:47.159069
2021-05-23T11:56:33
2021-05-23T11:56:33
29,487,972
4
14
null
2021-02-21T03:02:55
2015-01-19T19:32:24
Java
UTF-8
Java
false
false
4,093
java
package com.massivecraft.massivecore.ps; import org.bukkit.World; public class PSBuilder { // -------------------------------------------- // // FIELDS // -------------------------------------------- // private String world = null; public String world() { return this.world; } public PSBuilder world(String worldName) { this.world = worldName; return this; } public PSBuilder world(World world) { this.world = PS.calcWorldName(world); return this; } private Integer blockX = null; public Integer blockX() { return this.blockX; } public PSBuilder blockX(Integer blockX) { this.blockX = blockX; return this; } private Integer blockY = null; public Integer blockY() { return this.blockY; } public PSBuilder blockY(Integer blockY) { this.blockY = blockY; return this; } private Integer blockZ = null; public Integer blockZ() { return this.blockZ; } public PSBuilder blockZ(Integer blockZ) { this.blockZ = blockZ; return this; } private Double locationX = null; public Double locationX() { return this.locationX; } public PSBuilder locationX(Double locationX) { this.locationX = locationX; return this; } private Double locationY = null; public Double locationY() { return this.locationY; } public PSBuilder locationY(Double locationY) { this.locationY = locationY; return this; } private Double locationZ = null; public Double locationZ() { return this.locationZ; } public PSBuilder locationZ(Double locationZ) { this.locationZ = locationZ; return this; } private Integer chunkX = null; public Integer chunkX() { return this.chunkX; } public PSBuilder chunkX(Integer chunkX) { this.chunkX = chunkX; return this; } private Integer chunkZ = null; public Integer chunkZ() { return this.chunkZ; } public PSBuilder chunkZ(Integer chunkZ) { this.chunkZ = chunkZ; return this; } private Float pitch = null; public Float pitch() { return this.pitch; } public PSBuilder pitch(Float pitch) { this.pitch = pitch; return this; } private Float yaw = null; public Float yaw() { return this.yaw; } public PSBuilder yaw(Float yaw) { this.yaw = yaw; return this; } private Double velocityX = null; public Double velocityX() { return this.velocityX; } public PSBuilder velocityX(Double velocityX) { this.velocityX = velocityX; return this; } private Double velocityY = null; public Double velocityY() { return this.velocityY; } public PSBuilder velocityY(Double velocityY) { this.velocityY = velocityY; return this; } private Double velocityZ = null; public Double velocityZ() { return this.velocityZ; } public PSBuilder velocityZ(Double velocityZ) { this.velocityZ = velocityZ; return this; } // -------------------------------------------- // // CONSTRUCT // -------------------------------------------- // public PSBuilder(String world, Integer blockX, Integer blockY, Integer blockZ, Double locationX, Double locationY, Double locationZ, Integer chunkX, Integer chunkZ, Float pitch, Float yaw, Double velocityX, Double velocityY, Double velocityZ) { this.world = world; this.blockX = blockX; this.blockY = blockY; this.blockZ = blockZ; this.locationX = locationX; this.locationY = locationY; this.locationZ = locationZ; this.chunkX = chunkX; this.chunkZ = chunkZ; this.pitch = pitch; this.yaw = yaw; this.velocityX = velocityX; this.velocityY = velocityY; this.velocityZ = velocityZ; } public PSBuilder(PS ps) { this(ps.getWorld(), ps.getBlockX(), ps.getBlockY(), ps.getBlockZ(), ps.getLocationX(), ps.getLocationY(), ps.getLocationZ(), ps.getChunkX(), ps.getChunkZ(), ps.getPitch(), ps.getYaw(), ps.getVelocityX(), ps.getVelocityY(), ps.getVelocityZ()); } public PSBuilder() { } // -------------------------------------------- // // BUILD // -------------------------------------------- // public PS build() { return PS.valueOf(world, blockX, blockY, blockZ, locationX, locationY, locationZ, chunkX, chunkZ, pitch, yaw, velocityX, velocityY, velocityZ); } }
[ "olof@sylt.nu" ]
olof@sylt.nu
a21ebfaf593f3eb6809abd0a1c45391799e142ba
774d36285e48bd429017b6901a59b8e3a51d6add
/sources/com/google/android/exoplayer2/upstream/HttpDataSource$InvalidContentTypeException.java
e05cf2a3aa5fab9614e1f346d9329d500a3b772a
[]
no_license
jorge-luque/hb
83c086851a409e7e476298ffdf6ba0c8d06911db
b467a9af24164f7561057e5bcd19cdbc8647d2e5
refs/heads/master
2023-08-25T09:32:18.793176
2020-10-02T11:02:01
2020-10-02T11:02:01
300,586,541
0
0
null
null
null
null
UTF-8
Java
false
false
162
java
package com.google.android.exoplayer2.upstream; public final class HttpDataSource$InvalidContentTypeException extends HttpDataSource$HttpDataSourceException { }
[ "jorge.luque@taiger.com" ]
jorge.luque@taiger.com
c11c67f13afd7a595a267a3f9926ec7af60c0224
571ce46236afb5d836b713c5f3cc165db5d2ae77
/packages/apps/PrizeGalleryV8/src/com/android/gallery3d/filtershow/pipeline/Buffer.java
695b48aac71cd0dc2730c9b27f3168fba1126a2c
[]
no_license
sengeiou/prize
d6f56746ba82e0bbdaa47b5bea493ceddb0abd0c
e27911e194c604bf651f7bed0f5f9ce8f7dc8d4d
refs/heads/master
2020-04-28T04:45:42.207852
2018-11-23T13:50:20
2018-11-23T13:50:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,291
java
/* * Copyright (C) 2014 MediaTek Inc. * Modification based on code covered by the mentioned copyright * and/or permission notice(s). */ /* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.gallery3d.filtershow.pipeline; import android.graphics.Bitmap; import android.graphics.Canvas; import android.renderscript.Allocation; import android.renderscript.RenderScript; import android.util.Log; import com.android.gallery3d.filtershow.cache.BitmapCache; import com.android.gallery3d.filtershow.imageshow.MasterImage; public class Buffer { private static final String LOGTAG = "Buffer"; private Bitmap mBitmap; private Allocation mAllocation; private boolean mUseAllocation = false; private ImagePreset mPreset; public Buffer(Bitmap bitmap) { RenderScript rs = CachingPipeline.getRenderScriptContext(); if (bitmap != null) { BitmapCache cache = MasterImage.getImage().getBitmapCache(); mBitmap = cache.getBitmapCopy(bitmap, BitmapCache.PREVIEW_CACHE); } if (mUseAllocation) { // TODO: recreate the allocation when the RS context changes mAllocation = Allocation.createFromBitmap(rs, mBitmap, Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SHARED | Allocation.USAGE_SCRIPT); } } public boolean isSameSize(Bitmap bitmap) { if (mBitmap == null || bitmap == null) { return false; } if (mBitmap.getWidth() == bitmap.getWidth() && mBitmap.getHeight() == bitmap.getHeight()) { return true; } return false; } public synchronized void useBitmap(Bitmap bitmap) { /// M: [BUG.ADD] @{ //clear to black background if (mBitmap != null) { mBitmap.eraseColor(0); } /// @} Canvas canvas = new Canvas(mBitmap); canvas.drawBitmap(bitmap, 0, 0, null); } public synchronized Bitmap getBitmap() { return mBitmap; } public Allocation getAllocation() { return mAllocation; } public void sync() { if (mUseAllocation) { mAllocation.copyTo(mBitmap); } } public ImagePreset getPreset() { return mPreset; } public void setPreset(ImagePreset preset) { if ((mPreset == null) || (!mPreset.same(preset))) { mPreset = new ImagePreset(preset); } else { mPreset.updateWith(preset); } } public void remove() { BitmapCache cache = MasterImage.getImage().getBitmapCache(); if (cache.cache(mBitmap)) { mBitmap = null; } } }
[ "18218724438@163.com" ]
18218724438@163.com
5dbe35168338926c4aacf09d579840c4fada213a
6a922e840b33f11ab3d0f154afa0b33cff272676
/src/docx4j-extras/XmlPartToJavaString/org/jvnet/jaxb2_commons/xpath_tracker/Histgram.java
1c37ecefa867b1631d96f3211625313ea7b3900a
[ "Apache-2.0" ]
permissive
baochanghong/docx4j
912fc146cb5605e6f7869c4839379a83a8b4afd8
4c83d8999c9396067dd583b82a6fc892469a3919
refs/heads/master
2021-01-12T15:30:26.971311
2016-10-20T00:44:25
2016-10-20T00:44:25
71,792,895
3
0
null
2016-10-24T13:39:57
2016-10-24T13:39:57
null
UTF-8
Java
false
false
1,613
java
package org.jvnet.jaxb2_commons.xpath_tracker; import javax.xml.namespace.QName; import org.apache.log4j.Logger; import java.util.Map; import java.util.HashMap; /** * Keeps track of the number of siblings element found so far. * * @author Kohsuke Kawaguchi */ public final class Histgram { private static Logger log = Logger.getLogger(Histgram.class); private final Map<QName,Integer> occurrence = new HashMap<QName, Integer>(); private String current; private int currentValue; public void update(String uri, String localName, String qName) { QName qn = null; if (uri.equals("http://schemas.openxmlformats.org/spreadsheetml/2006/main")) { // Avoid using the default namespace qn = new QName(uri,localName, "s"); qName = qn.getPrefix() + ":" + qn.getLocalPart(); if (!qn.getPrefix().equals("s")) { // only a problem with MOXy log.debug("ignoring requested prefix!"); } } else { // log.debug("'" + uri +"'"); qn = new QName(uri,localName); } Integer v = occurrence.get(qn); if(v==null) { v=1; } else { v++; } occurrence.put(qn,v); current = qName; currentValue = v; } public void appendPath(StringBuilder buf) { if(current==null) return; // this is the head buf.append('/'); buf.append(current); buf.append('['); buf.append(currentValue); buf.append(']'); } }
[ "jason@plutext.org" ]
jason@plutext.org
796031545b413be6769d1c7e137065531548119b
41b7449443c2de93c34b5423c9ae554f496ea723
/src/entidadeImpl/ListaDuplamenteEncadeada.java
96b0ef665ad3f3b4d6f406a1c04549a7f6462c84
[]
no_license
willbigas/EstruturaDeDados
4e212d41cf3a1c2696ce9c0925bec9fec2516e23
ee35393387b14775c5159bba8a976635e7f33b5b
refs/heads/master
2020-04-07T21:23:03.495705
2018-12-05T12:18:33
2018-12-05T12:18:33
158,724,625
1
0
null
null
null
null
UTF-8
Java
false
false
4,443
java
package entidadeImpl; import br.com.entidade.NoDuplo; import br.com.negocio.ListaDupla; /** * * @author William Bigas Mauro * @since 20/12/2018 */ public class ListaDuplamenteEncadeada implements ListaDupla { private Integer tamanho; private NoDuplo inicio; public ListaDuplamenteEncadeada() { this.tamanho = 0; } @Override public void adicionar(Object objeto) { NoDuplo novoElemento = new NoDuplo(); novoElemento.setElemento(objeto); if (null == inicio) { inicio = novoElemento; tamanho++; } else { NoDuplo auxiliar = inicio; while (auxiliar.getProximo() != null) { auxiliar = auxiliar.getProximo(); } auxiliar.setProximo(novoElemento); novoElemento.setAnterior(auxiliar); tamanho++; } } @Override public void adicionar(Object objeto, Integer posicao) { NoDuplo novoElemento = new NoDuplo(); novoElemento.setElemento(objeto); if (posicao > tamanho) { throw new UnsupportedOperationException("Posição inexistente."); } if (posicao.equals(1)) { NoDuplo auxiliar = inicio; inicio = novoElemento; inicio.setProximo(auxiliar); auxiliar.setAnterior(inicio); tamanho++; } else { NoDuplo auxiliar = inicio; Integer indice = 1; while (!posicao.equals(indice + 1)) { auxiliar = auxiliar.getProximo(); indice++; } NoDuplo temporario = auxiliar.getProximo(); novoElemento.setProximo(temporario); if (temporario != null) { temporario.setAnterior(novoElemento); } auxiliar.setProximo(novoElemento); novoElemento.setAnterior(auxiliar); tamanho++; } } @Override public Boolean remover(Integer posicao) { if (posicao > tamanho || posicao <= 0 || tamanho <= 0) { return false; } if (posicao.equals(1)) { inicio = inicio.getProximo(); if (inicio != null) { inicio.setAnterior(null); } tamanho--; } else { NoDuplo auxiliar = inicio; Integer indice = 1; while (!posicao.equals(indice)) { auxiliar = auxiliar.getProximo(); indice++; } auxiliar.getAnterior().setProximo(auxiliar.getProximo()); if (auxiliar.getProximo() != null) { auxiliar.getProximo().setAnterior(auxiliar.getAnterior()); } tamanho--; } return true; } @Override public String inverso() { String texto = ""; NoDuplo auxiliar = inicio; while (auxiliar.getProximo() != null) { auxiliar = auxiliar.getProximo(); } while (auxiliar != null) { texto += auxiliar.getElemento().toString() + ", "; auxiliar = auxiliar.getAnterior(); } if (texto.length() > 0) { texto = texto.substring(0, texto.length() - 1); } return texto; } @Override public Boolean existe(Object objeto) { if (inicio == null) { return false; } NoDuplo auxiliar = inicio; if (objeto.equals(auxiliar.getElemento())) { return true; } else { while (auxiliar.getProximo() != null) { auxiliar = auxiliar.getProximo(); if (objeto.equals(auxiliar.getElemento())) { return true; } } } return false; } @Override public String toString() { String texto = ""; if (this.tamanho > 0) { NoDuplo auxiliar = inicio; while (auxiliar != null) { texto += auxiliar.getElemento().toString() + " > "; auxiliar = auxiliar.getProximo(); } if (texto.length() > 0) { texto = texto.substring(0, texto.length() - 2); } } return texto; } }
[ "williambmauro@hotmail.com" ]
williambmauro@hotmail.com
d5ea8ea25d305b453d3b481e7ed9dc3b8e9a3659
33a5fcf025d92929669d53cf2dc3f1635eeb59c6
/济源环保/Agencyweibao/src/com/jy/environment/database/Database.java
3e927fa8b5b02ca09b7236c1d10a57da6950a547
[]
no_license
dayunxiang/MyHistoryProjects
2cacbe26d522eeb3f858d69aa6b3c77f3c533f37
6e041f53a184e7c4380ce25f5c0274aa10f06c8e
refs/heads/master
2020-11-29T09:23:27.085614
2018-03-12T07:07:18
2018-03-12T07:07:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,180
java
package com.jy.environment.database; import java.util.ArrayList; import java.util.List; import java.util.Map; import com.jy.environment.util.MyLog; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; import com.thoughtworks.xstream.annotations.XStreamImplicit; @XStreamAlias("Database") public class Database { @XStreamAsAttribute @XStreamAlias("DatabaseName") private String mDatabaseName; @XStreamAsAttribute @XStreamAlias("Version") private int mVersion; @XStreamImplicit private List<Table> mTableList; @XStreamImplicit private List<DatabaseUpgrate> mUpgrateSqlList; @XStreamImplicit @XStreamAlias("InitSql") private List<String> mInitSqlList; private Database() { } public String getDatabaseName() { return mDatabaseName; } public int getVersion() { return mVersion; } public String getTableName(String pModelClassName) { return getModelTableByModelClassName(pModelClassName).getTableName(); } public String getModelClassName(String pTableName) { return getModelTableByTableName(pTableName).getModelClassName(); } public List<String> getAllTableName() { List<String> _AllTableNames = new ArrayList<String>(); for (Table _ModelTable : mTableList) { _AllTableNames.add(_ModelTable.getTableName()); } return _AllTableNames; } public List<String> getAllColumnName(String pTableName) { return getModelTableByTableName(pTableName).getAllColumnName(); } public Map<String, String> getAllColumnExtra(String pTableName) { return getModelTableByTableName(pTableName).getAllColumnExtra(); } public Map<String, String> getFieldColumnMap(String pTableName) { return getModelTableByTableName(pTableName).getFieldColumnMap(); } public Map<String, String> getColumnFieldMap(String pTableName) { return getModelTableByTableName(pTableName).getColumnFieldMap(); } public List<String> getCreatDatabaseSql() { List<String> _SqlList = new ArrayList<String>(); for (Table _Table : mTableList) { _SqlList.add(_Table.getCreatTableSql()); MyLog.i("bai _TableSQL" + _Table.getTableName() + _Table.getCreatTableSql()); } if (mInitSqlList != null && mInitSqlList.size() > 0) { for (String _String : mInitSqlList) { _SqlList.add(_String); MyLog.i("bai _TableSQL" + _String); } } return _SqlList; } public List<String> getUpgrateDatabaseSql(int pOldVersion, int pNewVersion) { List<String> _UpgrateSqlList = new ArrayList<String>(); try { for (int i = 0; i < mUpgrateSqlList.size(); i++) { MyLog.e("bai mUpgrateSqlList" + i + " :" + mUpgrateSqlList.get(i).toString()); } while (pOldVersion != pNewVersion) { for (DatabaseUpgrate _DatabaseUpgrate : mUpgrateSqlList) { if (pOldVersion == _DatabaseUpgrate.getOldVersion()) { _UpgrateSqlList.addAll(_DatabaseUpgrate.getSqlList()); pOldVersion = _DatabaseUpgrate.getNewVersion(); break; } } } } catch (Exception e) { // TODO: handle exception } return _UpgrateSqlList; } private Table getModelTableByTableName(String pTableName) { Table _ModelTable = null; for (Table _tmpModelTable : mTableList) { if (pTableName.equals(_tmpModelTable.getTableName())) { _ModelTable = _tmpModelTable; break; } } return _ModelTable; } private Table getModelTableByModelClassName(String pModelClassName) { Table _ModelTable = null; for (Table _tmpModelTable : mTableList) { if (pModelClassName.equals(_tmpModelTable.getModelClassName())) { _ModelTable = _tmpModelTable; break; } } return _ModelTable; } @Override public String toString() { return "bai Database [mDatabaseName=" + mDatabaseName + ", mVersion=" + mVersion + ", mTableList=" + mTableList + ", mUpgrateSqlList=" + mUpgrateSqlList + ", mInitSqlList=" + mInitSqlList + ", getDatabaseName()=" + getDatabaseName() + ", getVersion()=" + getVersion() + ", getAllTableName()=" + getAllTableName() + ", getCreatDatabaseSql()=" + getCreatDatabaseSql() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode() + ", toString()=" + super.toString() + "]"; } }
[ "you@example.com" ]
you@example.com
febc301f976e57006cba154966f188be49680323
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_f9ba38783c629b138570a889b9fa0ea4597370aa/MapPanel/9_f9ba38783c629b138570a889b9fa0ea4597370aa_MapPanel_s.java
a971d433c3177316aef336b99a512c636ee43df9
[]
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
2,859
java
import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JLabel; public class MapPanel extends JPanel{ private Map map=null; private GridLayout grid=null; private boolean random; //implement random maps later private GameMain frame; private static JLabel curPlayerName, currRoundLabel, currMoney; private static JLabel remainTime; private JButton done; private static boolean isDone; private int currRound; protected Player curPlayer; private JPanel entire,sub; public MapPanel(boolean random, GameMain frame){ this.frame=frame; this.random = random; entire = new JPanel(); sub = new JPanel(); setVisible(true); map= new Map(false, frame); //System.out.println(this.toString()); grid = new GridLayout(Map.NUM_ROW, Map.NUM_COL); setLayout(grid); JButton[][] buttons = map.getMap(); for(int r=0; r<buttons.length; r++){ if(buttons[r]!=null){ for(int c=0; c<buttons[r].length; c++){ if(buttons[r][c]!=null){ System.out.println(buttons[r][c].toString()); add(buttons[r][c]); } } } } curPlayerName = new JLabel("Current Player: " ); currRoundLabel = new JLabel("Current Round: "); remainTime = new JLabel("Remaining Time: "); currMoney = new JLabel("Money amount: "); sub.add(curPlayerName); sub.add(currRoundLabel); sub.add(remainTime); sub.add(currMoney); done = new JButton("Done"); sub.add(done); done.addActionListener(new DListener()); currRound = 1; entire.add(this); entire.add(sub); this.frame.setContentPane(entire); } public static void setIsDone(boolean isDonex){ isDone = isDonex; } public boolean getIsDone(){ return isDone; } public void setCurPlayer(Player p){ curPlayer = GameMain.getCurrPlayer(); } public Player getCurrPlayer(){ return curPlayer; } public void nextTurn(){ currRound++; } public boolean gameOver(int currTurn){ if(currTurn<12) return false; return true; } public String toString(){ return "I am a Map Panel"; } public int getCurrTurn(){ return currRound; } public void setCurrPlayerLabel(String name){ curPlayerName.setText("Current Player: " + name); } public void setCurrRound(int round){ currRoundLabel.setText("Current Round: " + round); } public void setRemainTime(int time){ remainTime.setText("Remaining Time: "+time); } public void setCurrMoney(int money){ currMoney.setText("Money Amount: " + money); } } class DListener implements ActionListener{ public void actionPerformed(ActionEvent event) { Player p = GameMain.getCurrPlayer(); p.setDone(true); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a55434abcd4d99e446527bc1ab4301cda0d0552e
307af86157b35b4887acdf4a2bea5ed5d1494e98
/src/main/java/org/bian/dto/ContactDialogueOfferBase.java
aedc8640f29d78fe87cc2f6b64b09a90b76a25f1
[ "Apache-2.0" ]
permissive
bianapis/sd-contact-dialog
42706cbd98cbbd5296445a067d437248e9f6291d
aede3dd301d37ebd55214e393e375a43bb94c10c
refs/heads/master
2020-04-01T18:38:48.703333
2018-10-21T05:32:28
2018-10-21T05:32:28
153,505,698
0
0
null
null
null
null
UTF-8
Java
false
false
3,745
java
package org.bian.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; /** * ContactDialogueOfferBase */ public class ContactDialogueOfferBase { private Object contactRecord = null; private Object contactDialogueRecord = null; private String customerReference = null; private String productServiceReference = null; private String customerOfferReference = null; private String customerOfferAccessStartEndTime = null; private String customerOfferAccessResult = null; /** * `status: Provisionally Registered` bian-reference: CustomerDialogueSystem.CustomerContactSession general-info: \"contact details including authentication level provided by SD-Contact Handler\" * @return contactRecord **/ public Object getContactRecord() { return contactRecord; } public void setContactRecord(Object contactRecord) { this.contactRecord = contactRecord; } /** * `status: Provisionally Registered` bian-reference: CustomerDialogueSystem.CustomerContactSession.ExecutedInteraction.ExecutedAction general-info: \"session dialogue log of actions returned to SD-Contact Handler\" * @return contactDialogueRecord **/ public Object getContactDialogueRecord() { return contactDialogueRecord; } public void setContactDialogueRecord(Object contactDialogueRecord) { this.contactDialogueRecord = contactDialogueRecord; } /** * `status: Provisionally Registered` bian-reference: RepresentativeOfCustomer.RepresentedCustomer * @return customerReference **/ public String getCustomerReference() { return customerReference; } public void setCustomerReference(String customerReference) { this.customerReference = customerReference; } /** * `status: Provisionally Registered` bian-reference: CustomerDialogueSystem.CustomerContactSession.ExecutedInteraction.CustomerOffer.OfferedAgreement(as MasterAgreement).GovernedContract(as Agreement).Product general-info: \"type of product or service being offered\" * @return productServiceReference **/ public String getProductServiceReference() { return productServiceReference; } public void setProductServiceReference(String productServiceReference) { this.productServiceReference = productServiceReference; } /** * `status: Provisionally Registered` bian-reference: CustomerDialogueSystem.CustomerContactSession.ExecutedInteraction.CustomerOffer general-info: \"Reference to the customer offer\" * @return customerOfferReference **/ public String getCustomerOfferReference() { return customerOfferReference; } public void setCustomerOfferReference(String customerOfferReference) { this.customerOfferReference = customerOfferReference; } /** * Get customerOfferAccessStartEndTime * @return customerOfferAccessStartEndTime **/ public String getCustomerOfferAccessStartEndTime() { return customerOfferAccessStartEndTime; } public void setCustomerOfferAccessStartEndTime(String customerOfferAccessStartEndTime) { this.customerOfferAccessStartEndTime = customerOfferAccessStartEndTime; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: \"customer offer access result\" * @return customerOfferAccessResult **/ public String getCustomerOfferAccessResult() { return customerOfferAccessResult; } public void setCustomerOfferAccessResult(String customerOfferAccessResult) { this.customerOfferAccessResult = customerOfferAccessResult; } }
[ "team1@bian.org" ]
team1@bian.org
66ffaf36815e72df63c87492d2f82bf65cf114a2
d6e5e25f7a17b2edee64e7acd5e0b57f860057fa
/question10.java
70f75b1b92358d222943a4c6b6d050eb91085ec3
[]
no_license
abhi7104/Basics-of-Multi-Threading
091ea0df1392afbac17938e9950a911bbfdd2755
3140c27b7f861da399f19e5809882ab11e2d4aee
refs/heads/master
2023-03-06T17:11:10.979391
2021-02-24T09:45:55
2021-02-24T09:45:55
341,507,179
0
0
null
null
null
null
UTF-8
Java
false
false
855
java
class sample{ static int count=0; synchronized void Tellcount(int n) { for(int i=0;i<n;i++){ System.out.println(count++); try{ Thread.sleep(400); }catch(Exception e) { System.out.println(e); } } } } class MyThread1 extends Thread{ sample t; MyThread1(sample t){ this.t=t; } public void run(){ t.Tellcount(2); } } class MyThread2 extends Thread{ sample t; MyThread2(sample t){ this.t=t; } public void run(){ t.Tellcount(3); } } public class question10{ public static void main(String args[]){ sample s = new sample(); MyThread1 t1=new MyThread1(s); MyThread2 t2=new MyThread2(s); t1.start(); t2.start(); } }
[ "you@example.com" ]
you@example.com
01f5bd2c419303586968f932870b0fefc1b008d2
f7e7ae1bad707652916c950c1bdb2dd494157e02
/Javabase_Plus/Two/setName/MyThread.java
f9d48f7b3a8e0cc8a06fd5bb911e2fb111f0f507
[]
no_license
jacklizekun/Java_Base
811d0eb4304618325d383f970dbd235589e2b597
c35d64f98684ecc61c63142189bd276afde6820c
refs/heads/master
2022-04-10T22:44:07.375468
2020-03-26T06:47:01
2020-03-26T06:47:01
250,180,331
0
0
null
null
null
null
UTF-8
Java
false
false
874
java
package setName; /** * 设置线程名称 * @author 李泽坤 * */ public class MyThread extends Thread{ /* 设置线程的名称:(了解) 1.使用Thread类中的方法setName(名字) void setName(String name) 改变线程名称,使之与参数 name 相同。 2.创建一个带参数的构造方法,参数传递线程的名称;调用父类的带参构造方法,把线程名称传递给父类,让父类(Thread)给子线程起一个名字 Thread(String name) 分配新的 Thread 对象。 */ public MyThread(){} public MyThread(String name){ super(name);//把线程名称传递给父类,让父类(Thread)给子线程起一个名字 } @Override public void run() { //获取线程的名称 System.out.println(Thread.currentThread().getName()); } }
[ "beike88888888@163.com" ]
beike88888888@163.com
65e0da5ed2def7cee498f34b829bc1b374061729
7085f39201ba756b3b3dbe3ee90f6e369d498f78
/quickstart-logging/quickstart-jul/src/test/java/org/quickstart/jul/Slf4jJdkTest.java
192474f8f0cd0ecac347b64887a4f48306982359
[ "Apache-2.0" ]
permissive
chenglinjava68/quickstart-framework
a11a297d86bc7f7b19c29aaed5e7c6019f2f2a55
d8aa246c8704ed03b44cc4c09a72972d9f437471
refs/heads/master
2022-12-08T07:06:08.285226
2020-09-02T01:43:12
2020-09-02T01:43:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
988
java
package org.quickstart.jul; import java.io.IOException; import java.io.InputStream; import java.util.logging.LogManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author youngzil@163.com * @description TODO * @createTime 2019-07-28 12:31 */ public class Slf4jJdkTest { private static final Logger logger = LoggerFactory.getLogger(Slf4jJdkTest.class); static LogManager logManager = LogManager.getLogManager(); public static void main(String[] args) throws IOException { InputStream in = LoggerPropretiesTest.class.getResourceAsStream("/logging.properties"); logManager.readConfiguration(in); // logManager.addLogger(logger); // 添加Logger logger.info("sssss"); if (logger.isDebugEnabled()) { logger.debug("slf4j-jdk debug message"); } if (logger.isInfoEnabled()) { logger.debug("slf4j-jdk info message"); } if (logger.isTraceEnabled()) { logger.debug("slf4j-jdk trace message"); } } }
[ "youngzil@163.com" ]
youngzil@163.com
8495ae4b8b12ce27d7e757cf995355b582b65ad7
5aaf23a0425077d4d6f634f14dc2a9eb56d79bcb
/src/main/java/com/bis/operox/OperoxAuthenticationFailureHandler.java
913a5934338e31a5edec249dc4df8299e06d770d
[]
no_license
naidu8242/operox_shopping
578e35cc6de437e3dd526834a796d63159d9f900
fe4f3080fc58546e774110e31c022c55bcb326cb
refs/heads/master
2022-12-23T04:38:20.470280
2020-02-03T09:53:48
2020-02-03T09:53:48
237,930,620
0
0
null
2022-12-16T08:01:12
2020-02-03T09:38:49
Java
UTF-8
Java
false
false
1,408
java
package com.bis.operox; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.authentication.AuthenticationFailureHandler; /** * Custom AuthenticationFailureHandler for customizing error messages * * @author: Naresh Bolisetty */ @Configuration public class OperoxAuthenticationFailureHandler implements AuthenticationFailureHandler{ @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { request.setAttribute("username", request.getParameter("username")); request.setAttribute("password", request.getParameter("password")); if(exception.getClass().isAssignableFrom(BadCredentialsException.class)) { request.setAttribute(exception.getMessage(),true); } ServletContext context = request.getServletContext(); RequestDispatcher rd = context.getRequestDispatcher("/operox/login"); rd.forward(request, response); } }
[ "plakshunnaidu@gmail.com" ]
plakshunnaidu@gmail.com
1277c1ab797873f27ac34fac11eef9bb90d4e18b
3914f5d9864ad49f5d152c7ee3e20a7b617c6435
/app/src/main/java/com/dace/textreader/bean/ErrorCorrectionBean.java
5bbf7c7574aa438b08c73755c51ba71f11a37f89
[]
no_license
PCchenpeng/TextReader
ad0434eb93030036857fbfbf6919ada61143eb0f
07fbf9fa828698a1d6785ac0b13e49ba8e00bea3
refs/heads/master
2020-04-30T20:27:01.872810
2019-05-27T06:50:41
2019-05-27T06:50:41
177,066,879
2
3
null
null
null
null
UTF-8
Java
false
false
1,595
java
package com.dace.textreader.bean; /** * ============================================================================= * Copyright (c) 2018 Administrator All rights reserved. * Packname com.dace.textreader.bean * Created by Administrator. * Created time 2018/11/16 0016 下午 2:39. * Version 1.0; * Describe : 纠错内容 * History: * ============================================================================== */ public class ErrorCorrectionBean { private String error; private String tips; private int section; //错误所在的段落 private int position; private int length; private int corrected; //1 有错别字改正,0 没有提示,给出建议。 public ErrorCorrectionBean() { } public String getError() { return error; } public void setError(String error) { this.error = error; } public String getTips() { return tips; } public void setTips(String tips) { this.tips = tips; } public int getSection() { return section; } public void setSection(int section) { this.section = section; } public int getPosition() { return position; } public void setPosition(int position) { this.position = position; } public int getLength() { return length; } public void setLength(int length) { this.length = length; } public int getCorrected() { return corrected; } public void setCorrected(int corrected) { this.corrected = corrected; } }
[ "cheung29@foxmail.com" ]
cheung29@foxmail.com
8b331e089bdacd99dd86f6c5c7412953230f626c
b2f44ba766a44426cd06ebfb922d8b75c1773d63
/src/com/leetcode/P981_TimeBasedKeyValueStore.java
53073ec405be3b4dcab4b9630d1fbedf52b68bed
[]
no_license
joy32812/leetcode
a1179ecff91127a6cda83cf70838354b0670970f
9bd74b9774012df0e2e221eedc63d10f3ba88238
refs/heads/master
2023-08-16T14:11:34.232388
2023-08-13T11:30:05
2023-08-13T11:30:05
81,704,645
10
5
null
null
null
null
UTF-8
Java
false
false
946
java
package com.leetcode; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; /** * use TreeMap floor */ class TimeMap { Map<String, TreeMap<Integer, String>> valMap; /** Initialize your data structure here. */ public TimeMap() { valMap = new HashMap<>(); } public void set(String key, String value, int timestamp) { valMap.computeIfAbsent(key, k -> new TreeMap<>()).put(timestamp, value); } public String get(String key, int timestamp) { TreeMap<Integer, String> treeMap = valMap.computeIfAbsent(key, k -> new TreeMap<>()); if (treeMap.size() == 0) return ""; Map.Entry<Integer, String> integerStringEntry = treeMap.floorEntry(timestamp); if (integerStringEntry == null) return ""; return integerStringEntry.getValue(); } } public class P981_TimeBasedKeyValueStore { public static void main(String[] args) { } }
[ "joy32812@qq.com" ]
joy32812@qq.com