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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b148a57fb804caa7243809abf6cde670237cc906
|
57e3929533d9af36c163a0fc2a0f08e813a8a214
|
/src/main/java/com/qatix/base/lang/string/StringMultiply.java
|
98a473e96dd0d7f855a24c0a9f4186609b25adb5
|
[
"MIT"
] |
permissive
|
qatix/JavaBase
|
866c9b87520e9668764bbadb56a20322e80505be
|
12fd0ba643918a26ba88077e491f178a461a9aed
|
refs/heads/master
| 2022-11-28T04:26:45.684298
| 2022-06-01T07:21:12
| 2022-06-01T07:21:12
| 153,476,220
| 1
| 1
|
MIT
| 2023-09-05T21:58:14
| 2018-10-17T15:01:00
|
Java
|
UTF-8
|
Java
| false
| false
| 2,421
|
java
|
package com.qatix.base.lang.string;
public class StringMultiply {
public static void main(String[] args) {
String a = "721";
String b = "0";
System.out.println(multiply(a, b));
}
public static String multiply(String num1, String num2) {
if ("0".equals(num1) || "0".equals(num2)) {
return "0";
}
StringBuilder sb = new StringBuilder();
String[] parts = new String[num2.length()];
for (int j = num2.length() - 1; j >= 0; j--) {
parts[num2.length() - 1 - j] = mult(num1, num2.charAt(j), num2.length() - 1 - j);
}
int[] pointer = new int[num2.length()];
int pre = 0;
while (true) {
int t = 0;
boolean flag = false;
for (int i = 0; i < num2.length(); i++) {
if (pointer[i] < parts[i].length()) {
t = t + (parts[i].charAt(pointer[i]) - '0');
flag = true;
}
pointer[i]++;
}
t = t + pre;
if (t > 0 || flag) {
sb.append((char) (t % 10 + '0'));
pre = t / 10;
}
if (!flag) {
break;
}
}
if (pre > 0 || sb.length() < 1) {
sb.append((char) (pre + '0'));
}
return reserve(sb.toString());
}
private static String mult(String num, char ch, int paddingLen) {
StringBuilder sb = new StringBuilder();
int t = ch - '0';
if (t < 1) {
return "0";
}
while (paddingLen-- > 0) {
sb.append('0');
}
int pre = 0;
for (int i = num.length() - 1; i >= 0; i--) {
int ct = num.charAt(i) - '0';
int cm = t * ct + pre;
sb.append((char) (cm % 10 + '0'));
pre = cm / 10;
}
if (pre > 0) {
sb.append((char) (pre + '0'));
}
return sb.toString();
}
public static String reserve(String str) {
if (str == null) {
return null;
}
int len = str.length();
char[] chars = str.toCharArray();
for (int i = 0; i < len / 2; i++) {
char tmp = chars[i];
chars[i] = chars[len - 1 - i];
chars[len - 1 - i] = tmp;
}
return String.valueOf(chars);
}
}
|
[
"tangxiaojun@checheweike.com"
] |
tangxiaojun@checheweike.com
|
ad9a50085d3b045c15e29d54526ab58403a818f7
|
e9ba0cb5188329bf9e97c39d349e193a88235e57
|
/app/src/main/java/com/zhishen/aixuexue/weight/tag/TagAdapter.java
|
38c779296b1af870b18df822d30950b3245ede5e
|
[] |
no_license
|
GoogleJ/laji
|
c64801d24b73de3fe4de04f5f2261c2c260b326e
|
ebaa18b84fb928d06883979d575d2c006b2fa29e
|
refs/heads/master
| 2020-04-06T14:42:00.556562
| 2019-03-12T14:09:10
| 2019-03-12T14:09:10
| 157,550,077
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,070
|
java
|
package com.zhishen.aixuexue.weight.tag;
import android.util.Log;
import android.view.View;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Created by Jerome on 2018/6/30
*/
public abstract class TagAdapter<T> {
private List<T> mTagDatas;
private OnDataChangedListener mOnDataChangedListener;
@Deprecated
private HashSet<Integer> mCheckedPosList = new HashSet<Integer>();
public TagAdapter(List<T> datas) {
mTagDatas = datas;
}
@Deprecated
public TagAdapter(T[] datas) {
mTagDatas = new ArrayList<T>(Arrays.asList(datas));
}
interface OnDataChangedListener {
void onChanged();
}
void setOnDataChangedListener(OnDataChangedListener listener) {
mOnDataChangedListener = listener;
}
@Deprecated
public void setSelectedList(int... poses) {
Set<Integer> set = new HashSet<>();
for (int pos : poses) {
set.add(pos);
}
setSelectedList(set);
}
@Deprecated
public void setSelectedList(Set<Integer> set) {
mCheckedPosList.clear();
if (set != null) {
mCheckedPosList.addAll(set);
}
notifyDataChanged();
}
@Deprecated
HashSet<Integer> getPreCheckedList() {
return mCheckedPosList;
}
public int getCount() {
return mTagDatas == null ? 0 : mTagDatas.size();
}
public void notifyDataChanged() {
if (mOnDataChangedListener != null)
mOnDataChangedListener.onChanged();
}
public T getItem(int position) {
return mTagDatas.get(position);
}
public abstract View getView(FlowLayout parent, int position, T t);
public void onSelected(int position, View view) {
Log.d("zhy", "onSelected " + position);
}
public void unSelected(int position, View view) {
Log.d("zhy", "unSelected " + position);
}
public boolean setSelected(int position, T t) {
return false;
}
}
|
[
"574170873@qq.com"
] |
574170873@qq.com
|
22c2afc27891b49d2bd32dd8d63824888446d778
|
18b372f96eccbe9ad08b42dda7324c7e9d0348ef
|
/microservices/clients/flagging-client/src/main/java/org/xcolab/client/flagging/pojo/Report.java
|
f5067c9ed31c9db9fa4854b9bd4f224b81e71051
|
[
"MIT"
] |
permissive
|
mikirockerful/XCoLab
|
ea1e0cdfb9d438d355b479c52420fbcdd9d36bf1
|
b83e9e612081b97e2cd53d70e7655a140abc14ff
|
refs/heads/master
| 2020-04-27T22:05:50.837028
| 2019-03-09T02:52:26
| 2019-03-09T02:52:26
| 174,723,153
| 0
| 0
| null | 2019-03-09T17:12:38
| 2019-03-09T17:12:38
| null |
UTF-8
|
Java
| false
| false
| 4,212
|
java
|
package org.xcolab.client.flagging.pojo;
import org.springframework.core.ParameterizedTypeReference;
import org.xcolab.util.http.client.types.TypeProvider;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;
public class Report implements Serializable {
private static final long serialVersionUID = -2000370137;
public static final TypeProvider<Report> TYPES = new TypeProvider<>(Report.class,
new ParameterizedTypeReference<List<Report>>() {});
private Long reportId;
private Long reporteruserId;
private String targetType;
private Long targetId;
private Long targetAdditionalId;
private String reason;
private String comment;
private Integer weight;
private String managerAction;
private Long manageruserId;
private Timestamp managerActionDate;
private Timestamp createdAt;
public Report() {
}
public Report(Long reportId, Long reporteruserId, String targetType, Long targetId,
String reason, String comment, Integer weight, String managerAction,
Long manageruserId, Timestamp managerActionDate, Timestamp createdAt) {
this.reportId = reportId;
this.reporteruserId = reporteruserId;
this.targetType = targetType;
this.targetId = targetId;
this.reason = reason;
this.comment = comment;
this.weight = weight;
this.managerAction = managerAction;
this.manageruserId = manageruserId;
this.managerActionDate = managerActionDate;
this.createdAt = createdAt;
}
public Long getReportId() {
return this.reportId;
}
public void setReportId(Long reportid) {
this.reportId = reportid;
}
public Long getReporteruserId() {
return this.reporteruserId;
}
public void setReporteruserId(Long reporteruserId) {
this.reporteruserId = reporteruserId;
}
public String getTargetType() {
return this.targetType;
}
public void setTargetType(String targettype) {
this.targetType = targettype;
}
public Long getTargetId() {
return this.targetId;
}
public void setTargetId(Long targetid) {
this.targetId = targetid;
}
public String getReason() {
return this.reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public String getComment() {
return this.comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public Integer getWeight() {
return this.weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public String getManagerAction() {
return this.managerAction;
}
public void setManagerAction(String manageraction) {
this.managerAction = manageraction;
}
public Long getManageruserId() {
return this.manageruserId;
}
public void setManageruserId(Long manageruserId) {
this.manageruserId = manageruserId;
}
public Timestamp getManagerActionDate() {
return this.managerActionDate;
}
public void setManagerActionDate(Timestamp manageractiondate) {
this.managerActionDate = manageractiondate;
}
public Timestamp getCreatedAt() {
return this.createdAt;
}
public void setCreatedAt(Timestamp createdAt) {
this.createdAt = createdAt;
}
public Long getTargetAdditionalId() {
return targetAdditionalId;
}
public void setTargetAdditionalId(Long targetAdditionalId) {
this.targetAdditionalId = targetAdditionalId;
}
@Override
public String toString() {
return "Report (" + reportId +
", " + reporteruserId +
", " + targetType +
", " + targetId +
", " + targetAdditionalId +
", " + reason +
", " + comment +
", " + weight +
", " + managerAction +
", " + manageruserId +
", " + managerActionDate +
", " + createdAt +
")";
}
}
|
[
"jobachhu@mit.edu"
] |
jobachhu@mit.edu
|
efcce711171602972dbdfd32cc727cc6f69390fd
|
184ca59b6a1bdc7bb9cd802e854a97b552f72767
|
/src/main/java/org/smartdeveloperhub/curator/protocol/ResponseMessage.java
|
a7318935239871246eb326f179eb99b80480359c
|
[
"Apache-2.0"
] |
permissive
|
SmartDeveloperHub/sdh-curator-connector
|
a14c418797d516d417665186c55093bc5eec5fcc
|
ddfbaf6c76eae09f87550aeda981f3ea44a71dcb
|
refs/heads/master
| 2021-01-17T14:20:44.162174
| 2016-07-07T07:45:07
| 2016-07-07T07:45:07
| 43,059,330
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,561
|
java
|
/**
* #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
* This file is part of the Smart Developer Hub Project:
* http://www.smartdeveloperhub.org/
*
* Center for Open Middleware
* http://www.centeropenmiddleware.com/
* #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
* Copyright (C) 2015-2016 Center for Open Middleware.
* #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
* 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.
* #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
* Artifact : org.smartdeveloperhub.curator:sdh-curator-connector:0.2.0
* Bundle : sdh-curator-connector-0.2.0.jar
* #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
*/
package org.smartdeveloperhub.curator.protocol;
import java.util.UUID;
public interface ResponseMessage extends Message {
UUID responseTo();
long responseNumber();
}
|
[
"m.esteban.gutierrez@gmail.com"
] |
m.esteban.gutierrez@gmail.com
|
3bd23471956d1e7140dd0334751e7ea7579670a2
|
0b657fbc76dcbb2544b01e8dbbe83e30289c142f
|
/528/20210601.java
|
6c6548adb1259ae270e33bf6fde3c9ba3fc8afa4
|
[] |
no_license
|
MaCoredroid/leetcode
|
68cbd343ea4a99067a497d9c034e5ab1ca3525e6
|
58080590f3a4f4d1f8082474a3ec344b87b18b4d
|
refs/heads/master
| 2022-03-11T07:17:45.908007
| 2022-02-08T01:41:24
| 2022-02-08T01:41:24
| 227,243,204
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 722
|
java
|
class Solution {
List<Integer> sum=new ArrayList<>();
int pre=0;
Random rand=new Random();
public Solution(int[] w) {
for(int x:w){
pre+=x;
sum.add(pre);
}
}
public int pickIndex() {
int target=rand.nextInt(pre);
int left=0;
int right=sum.size()-1;
while(left<=right){
int mid=left+((right-left)>>1);
if(sum.get(mid)>target){
right=mid-1;
}else{
left=mid+1;
}
}
return left;
}
}
/**
* Your Solution object will be instantiated and called as such:
* Solution obj = new Solution(w);
* int param_1 = obj.pickIndex();
*/
|
[
"coredroid0401@gmail.com"
] |
coredroid0401@gmail.com
|
686c09c4a4e2a079aef9a00370bb9bbfd6f1ec2d
|
fef6e599164ab8b26cc3b628dc14a016dd93367c
|
/univocity-trader-iqfeed/src/main/java/com/univocity/trader/iqfeed/IQFeedExchange.java
|
85e2d9945808b9e6b378f3cd854cf5ba006bef12
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
redtramp/univocity-trader
|
4614f310ace30e0b8d55c1287e9daf1133151a84
|
16e45f72bfeb1aa72a9676d558ab1cd95ff67033
|
refs/heads/master
| 2021-02-14T21:54:20.201629
| 2020-02-16T20:07:28
| 2020-02-16T20:07:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,282
|
java
|
package com.univocity.trader.iqfeed;
import com.univocity.trader.*;
import com.univocity.trader.candles.*;
import com.univocity.trader.indicators.base.*;
import com.univocity.trader.iqfeed.api.*;
import com.univocity.trader.iqfeed.api.domain.candles.*;
import com.univocity.trader.iqfeed.api.domain.request.*;
import com.univocity.trader.utils.*;
import io.netty.channel.*;
import io.netty.channel.nio.*;
import org.asynchttpclient.*;
import org.slf4j.*;
import java.io.*;
import java.math.*;
import java.time.*;
import java.time.temporal.*;
import java.util.*;
import java.util.concurrent.*;
class IQFeedExchange implements Exchange<IQFeedCandle, Account> {
private static final Logger logger = LoggerFactory.getLogger(IQFeedExchange.class);
private IQFeedApiWebSocketClient socketClient;
private org.asynchttpclient.ws.WebSocket socketClientCloseable;
private final Map<String, SymbolInformation> symbolInformation = new ConcurrentHashMap<>();
private boolean iqPortal = false;
private final EventLoopGroup eventLoopGroup = new NioEventLoopGroup(2);
// TODO: ask about maxFrameSize
private final AsyncHttpClient asyncHttpClient = HttpUtils.newAsyncHttpClient(eventLoopGroup, 655356);
@Override
public IQFeedClientAccount connectToAccount(Account account) {
if (!iqPortal) {
try {
Runtime.getRuntime().exec(account.iqPortalPath(), null, new File(account.iqPortalPath()));
iqPortal = true;
} catch (Exception e) {
logger.info(e.getMessage());
}
}
return new IQFeedClientAccount();
}
// TODO: implement
@Override
public Map<String, SymbolInformation> getSymbolInformation() {
return new HashMap<>();
}
@Override
public IQFeedCandle getLatestTick(String symbol, TimeInterval interval) {
// TODO: implement - IF AND ONLY IF the exchange doesn't restrict polling .
return null;
}
@Override
public Map<String, Double> getLatestPrices() {
return new HashMap<>();
}
@Override
public double getLatestPrice(String assetSymbol, String fundSymbol) {
return new Double(0);
}
@Override
public IncomingCandles<IQFeedCandle> getLatestTicks(String symbol, TimeInterval interval) {
// TODO: implement
ChronoUnit timeUnit = null;
switch (TimeInterval.getUnitStr(interval.unit)) {
case "d":
timeUnit = ChronoUnit.DAYS;
break;
case "h":
timeUnit = ChronoUnit.HOURS;
break;
case "m":
timeUnit = ChronoUnit.MINUTES;
break;
case "s":
timeUnit = ChronoUnit.SECONDS;
break;
case "ms":
timeUnit = ChronoUnit.MILLIS;
break;
}
StringBuilder requestIDBuilder = new StringBuilder("IQFeedLatestTicksRequest_" + Instant.now().toString());
requestIDBuilder.append("_symbol:" + symbol + "_interval:" + interval.toString());
IQFeedHistoricalRequest request = new IQFeedHistoricalRequestBuilder()
.setRequestID(requestIDBuilder.toString())
.setSymbol(symbol)
.setIntervalType(interval)
.setBeginDateTime(Instant.now().minus(100L, timeUnit).toEpochMilli())
.setEndDateTime(Instant.now().toEpochMilli())
.build();
List<IQFeedCandle> candles = socketClient().getHistoricalCandlestickBars(request);
return IncomingCandles.fromCollection(candles);
}
//TODO: implement
@Override
public IncomingCandles<IQFeedCandle> getHistoricalTicks(String symbol, TimeInterval interval, long startTime, long endTime) {
StringBuilder requestIDBuilder = new StringBuilder("IQFeedHistoricalRequest_" + Instant.now().toString());
requestIDBuilder.append("_symbol:" + symbol + "_interval:" + interval.toString() + "_start:" + startTime + "_end:" + endTime);
IQFeedHistoricalRequest request = new IQFeedHistoricalRequestBuilder()
.setRequestID(requestIDBuilder.toString())
.setSymbol(symbol)
.setIntervalType(interval)
.setBeginDateTime(startTime)
.setEndDateTime(endTime)
.build();
return IncomingCandles.fromCollection(socketClient.getHistoricalCandlestickBars(request));
}
// TODO: add callback for connection login via IQFeed
@Override
public Candle generateCandle(IQFeedCandle c) {
return new Candle(
c.getOpenTime(),
c.getCloseTime(),
c.getOpen(),
c.getHigh(),
c.getLow(),
c.getClose(),
c.getVolume()
);
}
public PreciseCandle generatePreciseCandle(IQFeedCandle c) {
return new PreciseCandle(
c.getOpenTime(),
c.getCloseTime(),
BigDecimal.valueOf(c.getOpen()),
BigDecimal.valueOf(c.getHigh()),
BigDecimal.valueOf(c.getLow()),
BigDecimal.valueOf(c.getClose()),
BigDecimal.valueOf(c.getVolume()));
}
// @Override
// public List<Candlestick> getHistoricalTicks(String symbol, TimeInterval interval, long startTime, long endTime){
// return socketClient().getC
// }
// TODO: implement this...
@Override
public void openLiveStream(String symbols, TimeInterval tickInterval, TickConsumer<IQFeedCandle> consumer) {
}
@Override
public void closeLiveStream() {
if (socketClientCloseable != null) {
socketClientCloseable.sendCloseFrame();
socketClientCloseable = null;
}
}
private IQFeedApiWebSocketClient socketClient() {
if (socketClient == null) {
IQFeedApiClientFactory factory = IQFeedApiClientFactory.newInstance(asyncHttpClient);
socketClient = factory.newWebSocketClient();
}
return socketClient;
}
}
|
[
"jbax@univocity.com"
] |
jbax@univocity.com
|
8ef07700addd0c04c89de98387245b5a663b7164
|
c9dccd9b91885c4f932cb6288a4a8ccdc70c4944
|
/src/main/java/com/github/lwhite1/tablesaw/filtering/IntGreaterThan.java
|
8e61c3dfc918401b580005636d56d19f35f27dbc
|
[
"Apache-2.0"
] |
permissive
|
awclives/tablesaw
|
bcc2d1eab77d283d6d8249f758f6c92d16c4f4ee
|
0015c27b9e04fdc27d0387d3d7211734c678b664
|
refs/heads/master
| 2020-12-24T09:24:35.224047
| 2016-07-01T13:33:04
| 2016-07-01T13:33:04
| 62,394,863
| 0
| 0
| null | 2016-07-01T13:28:24
| 2016-07-01T13:28:24
| null |
UTF-8
|
Java
| false
| false
| 1,413
|
java
|
package com.github.lwhite1.tablesaw.filtering;
import com.github.lwhite1.tablesaw.api.ColumnType;
import com.github.lwhite1.tablesaw.api.Table;
import com.github.lwhite1.tablesaw.columns.Column;
import com.github.lwhite1.tablesaw.columns.ColumnReference;
import com.github.lwhite1.tablesaw.api.IntColumn;
import com.github.lwhite1.tablesaw.api.LongColumn;
import com.github.lwhite1.tablesaw.api.ShortColumn;
import org.roaringbitmap.RoaringBitmap;
/**
*
*/
public class IntGreaterThan extends ColumnFilter {
private int value;
public IntGreaterThan(ColumnReference reference, int value) {
super(reference);
this.value = value;
}
public RoaringBitmap apply(Table relation) {
String name = columnReference.getColumnName();
Column column = relation.column(name);
ColumnType type = column.type();
switch (type) {
case INTEGER:
IntColumn intColumn = relation.intColumn(name);
return intColumn.isGreaterThan(value);
case LONG_INT:
LongColumn longColumn = relation.longColumn(name);
return longColumn.isGreaterThan(value);
case SHORT_INT:
ShortColumn shortColumn = relation.shortColumn(name);
return shortColumn.isGreaterThan(value);
default:
throw new UnsupportedOperationException("Columns of type " + type.name() + " do not support the operation "
+ "greaterThan(anInt) ");
}
}
}
|
[
"ljw1001@gmail.com"
] |
ljw1001@gmail.com
|
742daaf9850c72d1504fd4f714a6c96d4df06a41
|
352f6ae2cc37cf37adf79e48071581e6082715e8
|
/src/main/java/com/lam/coder/codeChef/CompilersAndParsers.java
|
5f819f22eeab3e65e8067c7f2933eb2b21fc4c81
|
[] |
no_license
|
ludoviko/codeRacing
|
91380a38a096c023648f315eb73fee30bb1d81f8
|
253d70779c886092e256f752d8b530acc8894aee
|
refs/heads/master
| 2021-01-23T21:01:48.362779
| 2020-05-02T23:38:58
| 2020-05-02T23:38:58
| 40,973,712
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,037
|
java
|
package com.lam.coder.codeChef;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Deque;
import java.util.InputMismatchException;
import java.util.LinkedList;
/**
* @author Code Chef.
* <p/>
* Solution by: L.Azuaje.
* <p/>
* Problem: https://www.codechef.com/problems/COMPILER.
*/
public class CompilersAndParsers {
public static final String YES = "YES";
public static final String NO = "NO";
public CompilersAndParsers() {
}
public static void main(String[] args) throws IOException {
FastInputReader scanner = new FastInputReader();
PrintStream out = System.out;
int n = scanner.nextInt();
for (int i = 0; i < n; i++) {
int count = 0;
int previousCount = 0;
Deque<Character> openingAngulars = new LinkedList<>();
String string = scanner.nextString();
for (int j = 0; j < string.length(); j++) {
char aChar = string.charAt(j);
if (aChar == '<') {
openingAngulars.push(aChar);
} else {
if (openingAngulars.isEmpty()) {
break;
} else {
openingAngulars.pop();
count += 2;
if (openingAngulars.isEmpty()) {
previousCount += count;
count = 0;
} else {
}
}
}
}
out.println(previousCount);
}
out.close();
}
// -----------MyScanner class for faster input----------
public static class FastInputReader {
private byte[] buf = new byte[16384];
private int curChar;
private int numChars;
public int read() {
if (numChars == -1)
throw new InputMismatchException();
if (curChar >= numChars) {
curChar = 0;
try {
numChars = System.in.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
public String nextLine() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isEndOfLine(c));
return res.toString();
}
public String nextString() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
public long nextLong() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public int nextInt() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public int[] nextIntArray(int n) {
int[] arr = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = nextInt();
}
return arr;
}
public Integer[] nextIntegerArray(int n) {
Integer[] arr = new Integer[n];
for (int i = 0; i < n; i++) {
arr[i] = nextInt();
}
return arr;
}
public long[] nextLongArray(int n) {
long[] arr = new long[n];
for (int i = 0; i < n; i++) {
arr[i] = nextLong();
}
return arr;
}
private boolean isSpaceChar(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
private boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
}
}
|
[
"ludovikoazuaje@yahoo.com"
] |
ludovikoazuaje@yahoo.com
|
8ac2c9bc71a7695eec59a2da40a4fc2f6437fdd8
|
464f36e710b08f67dcf833139c3c233b7eeb7837
|
/libCompiler/src/main/java/com/duy/pascal/backend/runtime_exception/HeapOverflowError.java
|
d80a328a2c41a26d978b01ad2042ee36dd964ae7
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
Traider09/pascalnide
|
887fe92b58281dbfedd623ac72b6252657998baa
|
fbd0407392de7bbc7856b37f619b24c5d22bfe24
|
refs/heads/master
| 2020-12-02T16:41:46.153868
| 2017-06-29T07:42:46
| 2017-06-29T07:42:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 599
|
java
|
package com.duy.pascal.backend.runtime_exception;
/**
* The heap has grown beyond its boundaries. This is caused when trying to allocate memory
* explicitly with New, GetMem or ReallocMem, or when a class or object instance is created
* and no memory is left. Please note that, by default, Free Pascal provides a growing heap,
* i.e. the heap will try to allocate more memory if needed. However, if the heap has reached
* the maximum size allowed by the operating system or hardware, then you will get this error.
* <p>
* Created by Duy on 07-Apr-17.
*/
public class HeapOverflowError {
}
|
[
"tranleduy1233@gmail.com"
] |
tranleduy1233@gmail.com
|
7c9c970e0c16b48f35138ac6bf45b68e02c7be6c
|
042342f9dc0e8662a1a7da671ab5dc9d82ccd835
|
/registry/org.wso2.developerstudio.eclipse.greg.manager.remote/src/org/wso2/developerstudio/eclipse/greg/manager/remote/wizards/SetPermissionWizardPage1.java
|
2ea9ec5631249c34862800c81e70210bffc40e94
|
[
"Apache-2.0"
] |
permissive
|
ksdperera/developer-studio
|
6fe6d50a66e4fb73de3a4dbeef8d68b461da1ab6
|
9c0f601b91cc34dda036c660598a93c232260e08
|
refs/heads/developer-studio-3.8.0
| 2021-01-15T08:50:21.571267
| 2018-10-26T12:59:17
| 2018-10-26T12:59:17
| 39,486,894
| 0
| 1
|
Apache-2.0
| 2018-10-26T12:59:18
| 2015-07-22T05:13:13
|
Java
|
UTF-8
|
Java
| false
| false
| 3,978
|
java
|
/*
* Copyright (c) 2010, WSO2 Inc. (http://www.wso2.org) 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 org.wso2.developerstudio.eclipse.greg.manager.remote.wizards;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.wso2.developerstudio.eclipse.greg.base.model.RegistryNode;
import org.wso2.developerstudio.eclipse.greg.base.model.RegistryResourceNode;
import org.wso2.developerstudio.eclipse.greg.base.ui.dialog.UserPermissionDialog;
import org.wso2.developerstudio.eclipse.greg.base.usermgt.ui.controls.UserPermissionTreeViewer;
import java.util.ArrayList;
import java.util.List;
/**
*
*/
public class SetPermissionWizardPage1 extends WizardPage{
private UserPermissionTreeViewer treeViewer;
private List<RegistryResourceNode> selectedItemsList;
private RegistryNode registryData;
private String registryResourcePath;
private RegistryResourceNode resourceNode;
/**
* @param pageName
*/
protected SetPermissionWizardPage1(String pageName, RegistryNode registryData, String registryResourcePath,RegistryResourceNode resourceNode) {
super(pageName);
setPageComplete(true);
setTitle("Set Permissions to Role");
this.registryData=registryData;
this.registryResourcePath=registryResourcePath;
this.resourceNode=resourceNode;
}
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
Composite container = new Composite(parent, SWT.BORDER);
GridLayout layout = new GridLayout();
layout.numColumns = 1;
container.setLayout(layout);
// layout.verticalSpacing = 10;
GridData gd = new GridData(GridData.FILL_BOTH);
container.setLayoutData(gd);
treeViewer=new UserPermissionTreeViewer(container, SWT.BORDER | SWT.CHECK,registryData, registryResourcePath);
treeViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
// treeViewer.expandAll();
treeViewer.expandToLevel(3);
// treeViewer.setSelection(new StructuredSelection(resourceNode), true);
// treeViewer.refresh(resourceNode);
treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent arg0) {
selectedItemsList= selectedItemList();
// if(!selectedItemsList.isEmpty()){
// setPageComplete(true);
// }
}
});
setControl(container);
}
public void savePageInfo() {
List<RegistryResourceNode> selectedCollectionList = treeViewer
.getSelectedRegistryPathCollections();
List<RegistryResourceNode> selectedResourceList = treeViewer
.getSelectedRegistryPathResources();
}
public List<RegistryResourceNode> selectedItemList() {
List<RegistryResourceNode> list = new ArrayList();
for (int i = 0; i < treeViewer.getSelectedRegistryPathCollections().size(); i++) {
list.add(treeViewer.getSelectedRegistryPathCollections().get(i));
}
for (int i = 0; i < treeViewer.getSelectedRegistryPathResources().size(); i++) {
list.add(treeViewer.getSelectedRegistryPathResources().get(i));
}
return list;
}
}
|
[
"harshana@wso2.com"
] |
harshana@wso2.com
|
2f426d6fe3a4380816ada4461c270320b9835575
|
6cd31c3fb9e69ada922611d34639b63380027107
|
/vergilyn-seata-examples/vergilyn-storage-examples/src/main/java/com/vergilyn/examples/storage/service/impl/StorageServiceImpl.java
|
966bb6527290447ef974ae3824a8995d0c21f49a
|
[
"Apache-2.0"
] |
permissive
|
vergilyn/seata-fork
|
6d7c40a25a14c18acd13a58426a849aca9588c2e
|
11871c49295f7975b3676f31797bd974f7110993
|
refs/heads/branch-1.0.0-vergilyn
| 2020-12-19T09:21:06.889807
| 2020-03-04T08:21:51
| 2020-03-04T08:21:51
| 235,693,530
| 0
| 0
|
Apache-2.0
| 2020-07-28T04:39:49
| 2020-01-23T00:12:14
|
Java
|
UTF-8
|
Java
| false
| false
| 1,192
|
java
|
package com.vergilyn.examples.storage.service.impl;
import javax.transaction.Transactional;
import com.vergilyn.examples.response.ObjectResponse;
import com.vergilyn.examples.storage.entity.Storage;
import com.vergilyn.examples.storage.repository.StorageRepository;
import com.vergilyn.examples.storage.service.StorageService;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class StorageServiceImpl implements StorageService {
@Autowired
private StorageRepository storageRepository;
@Override
@Transactional
@GlobalTransactional(name = "vergilyn-first-global-transaction")
public ObjectResponse<Void> decrease(String commodityCode, int total) {
int storage = storageRepository.decreaseStorage(commodityCode, total);
return storage > 0 ? ObjectResponse.success() : ObjectResponse.failure();
}
@Override
public ObjectResponse<Storage> getByCommodityCode(String code) {
Storage storage = storageRepository.getFirstByCommodityCode(code);
return ObjectResponse.success(storage);
}
}
|
[
"vergilyn@vip.qq.com"
] |
vergilyn@vip.qq.com
|
eb6a0e3a4eff87b24daafec9d051c49c68f20296
|
d86f114539dc4d17461c828432358cca45cd622d
|
/jslack-api-client/src/test/java/util/sample_json_generation/JsonDataRecordingListener.java
|
9630133e5299ce8fdac1499423d9f4d7782b5c77
|
[
"MIT"
] |
permissive
|
darkmatterbiz/jslack
|
607f7e2c83c9736627df16dd686b8f0334d5c13b
|
6499a314638ff320d93afc6a633bd529cda9cbd4
|
refs/heads/master
| 2020-09-06T16:40:46.786046
| 2019-12-11T23:33:44
| 2019-12-11T23:33:44
| 220,483,599
| 0
| 0
|
MIT
| 2019-11-08T14:30:00
| 2019-11-08T14:30:00
| null |
UTF-8
|
Java
| false
| false
| 648
|
java
|
package util.sample_json_generation;
import com.github.seratch.jslack.common.http.listener.HttpResponseListener;
import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
@Slf4j
public class JsonDataRecordingListener extends HttpResponseListener {
@Override
public void accept(State state) {
try {
JsonDataRecorder recorder = new JsonDataRecorder(state.getConfig(), "../json-logs");
recorder.writeMergedResponse(state.getResponse(), state.getParsedResponseBody());
} catch (IOException e) {
log.error("Failed to write JSON files because {}", e.getMessage(), e);
}
}
}
|
[
"seratch@gmail.com"
] |
seratch@gmail.com
|
6593fef40d6e3311a19468c8fe1d100856534f46
|
1e694075179ff36e8bb4ccb900f1212f4f71e137
|
/crm-spi/src/main/java/com/kycrm/member/service/user/IUserBillInfoService.java
|
60bf01507549e704ec3334f7a9be0ba0215f1adb
|
[] |
no_license
|
benling1/bd
|
6d544203c51163b1d986789db5b3851a01d4d9e0
|
8847d9178ceca0e6cff59c23c1efe9a7be136240
|
refs/heads/master
| 2022-12-20T17:02:30.599118
| 2019-08-22T14:06:59
| 2019-08-22T14:06:59
| 203,808,240
| 1
| 0
| null | 2022-12-16T11:54:10
| 2019-08-22T14:08:43
|
Java
|
UTF-8
|
Java
| false
| false
| 435
|
java
|
package com.kycrm.member.service.user;
import com.kycrm.member.domain.entity.user.UserBillInfo;
import com.kycrm.member.domain.entity.user.UserInfo;
import com.kycrm.member.domain.vo.user.UserBillInfoVO;
public interface IUserBillInfoService {
Integer saveBillInfo(UserInfo user, UserBillInfoVO userBillInfoVO);
UserBillInfo selcetBillInfo(Long uid);
Integer updateBillInfo(UserInfo user, UserBillInfoVO userBillInfoVO);
}
|
[
"yubenling1004@163.com"
] |
yubenling1004@163.com
|
79bd7eab5cd9430e3cf28bba61aa72155be241ec
|
d48eb49021c591b0eadd3e7328d8b4bcf67796be
|
/mvi-integration-test/src/main/java/com/hannesdorfmann/mosby3/mvi/integrationtest/lifecycle/fragment/backstack/MviLifecycleBackstackActivity.java
|
b886955cde87bb287ed7da1d0531b4a331187728
|
[
"Apache-2.0"
] |
permissive
|
Sherchen/ArchitectureTemplate
|
d83bb28c7c94e4515277a1a59db43699738fe1bf
|
282ad608b392352e8361329a4ec82a6b3fbb3fe8
|
refs/heads/master
| 2021-01-21T10:00:06.904555
| 2017-07-07T11:46:22
| 2017-07-07T11:46:22
| 91,676,515
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,126
|
java
|
/*
* Copyright 2016 Hannes Dorfmann.
*
* 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.hannesdorfmann.mosby3.mvi.integrationtest.lifecycle.fragment.backstack;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.util.Log;
import com.hannesdorfmann.mosby3.mvi.MviActivity;
import com.hannesdorfmann.mosby3.mvi.integrationtest.R;
import com.hannesdorfmann.mosby3.mvi.integrationtest.lifecycle.LifecycleTestPresenter;
import com.hannesdorfmann.mosby3.mvi.integrationtest.lifecycle.LifecycleTestView;
public class MviLifecycleBackstackActivity
extends MviActivity<LifecycleTestView, LifecycleTestPresenter> implements LifecycleTestView {
private static MviLifecycleBackstackActivity currentActivity;
private static final String FIRST_TAG = "firstFragment";
private static final String SECOND_TAG = "secondFragment";
public LifecycleTestPresenter presenter;
public static int createPresenterInvokations = 0;
@Override protected void onCreate(Bundle savedInstanceState) {
currentActivity = this;
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_backstack_mvi_container);
Log.d(getClass().getSimpleName(), "onCreate() " + this);
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction()
.replace(R.id.fragmentContainer, new FirstBackstackMviLifecycleFragment(), FIRST_TAG)
.addToBackStack("first")
.commit();
}
}
public FirstBackstackMviLifecycleFragment getFirstFragment() {
return (FirstBackstackMviLifecycleFragment) getSupportFragmentManager().findFragmentByTag(
FIRST_TAG);
}
public SecondBackstackMviLifecycleFragment getSecondFragment() {
return (SecondBackstackMviLifecycleFragment) getSupportFragmentManager().findFragmentByTag(
SECOND_TAG);
}
public void putSecondFragmentOnTopOfBackStack() {
getSupportFragmentManager().beginTransaction()
.replace(R.id.fragmentContainer, new SecondBackstackMviLifecycleFragment(), SECOND_TAG)
.addToBackStack("second")
.commit();
}
@Override protected void onDestroy() {
super.onDestroy();
Log.d(getClass().getSimpleName(), "onDestroy() " + this);
currentActivity = null;
}
@NonNull @Override public LifecycleTestPresenter createPresenter() {
createPresenterInvokations++;
presenter = new LifecycleTestPresenter();
Log.d(getClass().getSimpleName(), "createPresenter() " + this + " " + presenter);
return presenter;
}
public static void pressBackButton() {
currentActivity.onBackPressed();
}
}
|
[
"hannes.dorfmann@gmail.com"
] |
hannes.dorfmann@gmail.com
|
84d83dbc7e339f5b863e8cb53220e3ad3acaf1d7
|
7c1a70d7c314c67930b09131ded68da5a5a698a5
|
/src/com/kan/hro/dao/mybatis/impl/biz/settlement/SettlementAdjustmentImportHeaderDaoImpl.java
|
837ee95dcb32e9a6a3aaa6b27ee4b280d4253b53
|
[] |
no_license
|
sunwenjie/hris_pro
|
8d21c8e2955438086d3bbbacaad7511b3423b3a0
|
dfd2a598604f4dc98d5e6e57671e3d479974610c
|
refs/heads/master
| 2020-12-02T22:17:10.263131
| 2017-07-03T12:36:41
| 2017-07-03T12:36:41
| 96,108,657
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,920
|
java
|
package com.kan.hro.dao.mybatis.impl.biz.settlement;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import com.kan.base.core.Context;
import com.kan.base.util.KANException;
import com.kan.hro.dao.inf.biz.settlement.SettlementAdjustmentImportHeaderDao;
import com.kan.hro.domain.biz.settlement.SettlementAdjustmentImportHeaderVO;
public class SettlementAdjustmentImportHeaderDaoImpl extends Context implements SettlementAdjustmentImportHeaderDao
{
@Override
public int insertSettlementAdjustmentHeaderTempToHeader( final String batchId )
{
return insert( "insertSettlementAdjustmentHeaderTempToHeader", batchId );
}
@Override
public void deleteSettlementAdjustmentImportHeaderTempByBatchId( final String batchId )
{
delete( "deleteSettlementAdjustmentImportHeaderTempByBatchId", batchId );
}
@Override
public int countSettlementAdjustmentImportHeaderVOsByCondition( final SettlementAdjustmentImportHeaderVO settlementAdjustmentImportHeaderVO ) throws KANException
{
return ( Integer ) select( "countSettlementAdjustmentImportHeaderVOsByCondition", settlementAdjustmentImportHeaderVO );
}
@Override
public List< Object > getSettlementAdjustmentImportHeaderVOsByCondition( final SettlementAdjustmentImportHeaderVO settlementAdjustmentImportHeaderVO ) throws KANException
{
return selectList( "getSettlementAdjustmentImportHeaderVOsByCondition", settlementAdjustmentImportHeaderVO );
}
@Override
public List< Object > getSettlementAdjustmentImportHeaderVOsByCondition( final SettlementAdjustmentImportHeaderVO settlementAdjustmentImportHeaderVO, RowBounds rowBounds ) throws KANException
{
return selectList( "getSettlementAdjustmentImportHeaderVOsByCondition", settlementAdjustmentImportHeaderVO, rowBounds );
}
@Override
public void deleteHeaderTempRecord( String[] ids ) throws KANException
{
delete( "deleteSettlementAdjustmentImportHeaderTempRecord", ids );
}
@Override
public int getHeaderCountByBatchId( String batchId )
{
return ( Integer ) select( "getSettlementAdjustmentImportHeaderCountByBatchId", batchId );
}
@Override
public SettlementAdjustmentImportHeaderVO getSettlementAdjustmentImportHeaderVOsById( final String headerId, final String accountId ) throws KANException
{
Map< String, String > args = new HashMap< String, String >();
args.put( "headerId", headerId );
args.put( "accountId", accountId );
return ( SettlementAdjustmentImportHeaderVO ) select( "getSettlementAdjustmentImportHeaderVOsById", args );
}
@Override
public void updateHeaderStatus( final String batchId ) throws KANException
{
update( "updateSettlementAdjustmentImportHeaderStatus", batchId );
}
}
|
[
"wenjie.sun@i-click.com"
] |
wenjie.sun@i-click.com
|
7ba91f858cc8decf39b36a63a1c709e93b912674
|
7af846ccf54082cd1832c282ccd3c98eae7ad69a
|
/ftmap/src/main/java/taxi/nicecode/com/ftmap/generated/package_22/Foo92.java
|
fcdcedd74fdee1eae0d156b3cc65d3f64cf39a51
|
[] |
no_license
|
Kadanza/TestModules
|
821f216be53897d7255b8997b426b359ef53971f
|
342b7b8930e9491251de972e45b16f85dcf91bd4
|
refs/heads/master
| 2020-03-25T08:13:09.316581
| 2018-08-08T10:47:25
| 2018-08-08T10:47:25
| 143,602,647
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 268
|
java
|
package taxi.nicecode.com.ftmap.generated.package_22;
public class Foo92 {
public void foo0(){
new Foo91().foo5();
}
public void foo1(){
foo0();
}
public void foo2(){
foo1();
}
public void foo3(){
foo2();
}
public void foo4(){
foo3();
}
public void foo5(){
foo4();
}
}
|
[
"1"
] |
1
|
aa441624eb62bccd99146ea9852bd7adeb5a9762
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/21/21_91199bf4788cff955662226dbbc828215eb003b5/UtilTags/21_91199bf4788cff955662226dbbc828215eb003b5_UtilTags_t.java
|
e0ea388ff97e02fc8b307d9b5d3b5f20020f730a
|
[] |
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
| 4,286
|
java
|
package net.aufdemrand.denizen.tags.core;
import net.aufdemrand.denizen.Denizen;
import net.aufdemrand.denizen.events.ReplaceableTagEvent;
import net.aufdemrand.denizen.utilities.arguments.aH;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
import java.util.UUID;
public class UtilTags implements Listener {
public UtilTags(Denizen denizen) {
denizen.getServer().getPluginManager().registerEvents(this, denizen);
}
@EventHandler
public void utilTags(ReplaceableTagEvent event) {
if (!event.matches("UTIL")) return;
String type = event.getType() != null ? event.getType() : "";
String subType = event.getSubType() != null ? event.getSubType() : "";
String subTypeContext = event.getSubTypeContext() != null ? event.getSubTypeContext().toUpperCase() : "";
String specifier = event.getSpecifier() != null ? event.getSpecifier() : "";
String specifierContext = event.getSpecifierContext() != null ? event.getSpecifierContext().toUpperCase() : "";
if (type.equalsIgnoreCase("RANDOM")) {
if (subType.equalsIgnoreCase("INT")) {
if (specifier.equalsIgnoreCase("TO")) {
if (aH.matchesInteger(subTypeContext) && aH.matchesInteger(specifierContext)) {
int min = aH.getIntegerFrom(subTypeContext);
int max = aH.getIntegerFrom(specifierContext);
// in case the first number is larger than the second, reverse them
if (min > max) {
int store = min;
min = max;
max = store;
}
Random rand = new Random();
event.setReplaced(String.valueOf(rand.nextInt(max - min + 1) + min));
}
}
}
else if (subType.equalsIgnoreCase("UUID"))
event.setReplaced(UUID.randomUUID().toString());
}
else if (type.equalsIgnoreCase("TRIM")) {
String item_to_trim = event.getTypeContext();
int from = 1;
try {
if (subType.equalsIgnoreCase("FROM"))
from = Integer.valueOf(subTypeContext);
} catch (NumberFormatException e) { }
int to = item_to_trim.length();
try {
if (specifier.equalsIgnoreCase("TO"))
to = Integer.valueOf(specifierContext);
} catch (NumberFormatException e) { }
if (to > item_to_trim.length())
to = item_to_trim.length()+1;
event.setReplaced(item_to_trim.substring(from - 1, to - 1));
}
else if (type.equalsIgnoreCase("REPLACE")) {
String item_to_replace = event.getTypeContext();
String replace = event.getSubTypeContext();
String replacement = event.getSpecifierContext();
event.setReplaced(item_to_replace.replace(replace, replacement));
}
else if (type.equalsIgnoreCase("UPPERCASE")) {
String item_to_uppercase = event.getTypeContext();
event.setReplaced(item_to_uppercase.toUpperCase());
}
else if (type.equalsIgnoreCase("LOWERCASE")) {
String item_to_uppercase = event.getTypeContext();
event.setReplaced(item_to_uppercase.toLowerCase());
}
else if (type.equalsIgnoreCase("DATE")) {
Date currentDate = new Date();
SimpleDateFormat format = new SimpleDateFormat();
if (subType.equalsIgnoreCase("TIME")) {
if (specifier.equalsIgnoreCase("24HOUR")) {
format.applyPattern("k:mm");
} else format.applyPattern("K:mm a");
} else format.applyPattern("EEE, MMM d, yyyy");
event.setReplaced(format.format(currentDate));
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
40fe44a4d68d704a382b22f32471851f22b6a654
|
e7897d8841d609c2dad786ac805f4ed2c2910f63
|
/src/main/java/contentmod/fr/craftechmc/contentmod/common/blocks/customs/BlockCustomSlab.java
|
b8781da57119a1d306ed98a7621453b8ba09dff0
|
[
"Apache-2.0"
] |
permissive
|
CraftechMC/Mods
|
4157f6b6bd796a3ddde85c955a2df57496e371d1
|
61302bbe4eb1c3168f599bb18c88b3669c845229
|
refs/heads/master
| 2021-01-13T02:55:30.081712
| 2016-12-21T21:29:03
| 2016-12-21T21:29:03
| 77,086,874
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,150
|
java
|
package fr.craftechmc.contentmod.common.blocks.customs;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import fr.craftechmc.core.common.tab.CTabManager;
import net.minecraft.block.BlockSlab;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
/**
*
* @author Ourten
*
*/
public class BlockCustomSlab extends BlockSlab
{
public BlockObject model;
public BlockCustomSlab(final String name, final BlockObject model)
{
super(false, model.getBlock().getMaterial());
this.model = model;
this.setStepSound(model.getBlock().stepSound);
this.setLightOpacity(0);
this.setUnlocalizedName(name);
this.setCreativeTab(CTabManager.getTab("CONTENT_DECLINAISON"));
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(final int side, final int data)
{
return this.model.getBlock().getIcon(side, this.model.getMeta());
}
@Override
public Item getItemDropped(final int meta, final Random p_149650_2_, final int p_149650_3_)
{
return Item.getItemFromBlock(this);
}
@Override
public Item getItem(final World par1, final int par2, final int par3, final int par4)
{
return Item.getItemFromBlock(this);
}
/**
* Returns an item stack containing a single instance of the current block
* type. 'i' is the block's subtype/damage and is ignored for blocks which
* do not support subtypes. Blocks which cannot be harvested should return
* null.
*/
@Override
protected ItemStack createStackedBlock(final int p_149644_1_)
{
return new ItemStack(Item.getItemFromBlock(this), 2, p_149644_1_ & 7);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(final IIconRegister par1IconRegister)
{
}
@Override
@SideOnly(Side.CLIENT)
public String getFullSlabName(final int p_150002_1_)
{
return this.getUnlocalizedName();
}
}
|
[
"ourtencoop@gmail.com"
] |
ourtencoop@gmail.com
|
d572a5df7330255d5c1cc10cf5fbafb0e51c8dcc
|
809b0e78d1665230a2c3df179501fd6d4f3e089a
|
/datastructure-amazonQuestions/walmartPreparation/src/com/practise/tree/NutsAndBolts.java
|
1e08659ec803441f4c36984fb3703d03773967c1
|
[] |
no_license
|
vinay25788/datastructure-amazonQuestions
|
c4b67cbd783c9990e7335c1dce1225b4bce988a5
|
7de42100f3b70492984b98aebc9fd44dfa17a415
|
refs/heads/master
| 2020-05-20T04:25:02.347694
| 2020-01-19T08:23:13
| 2020-01-19T08:23:13
| 185,382,625
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 894
|
java
|
package com.practise.tree;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
public class NutsAndBolts {
public static void main(String[] args) {
char nuts[] = {'@', '#', '$', '%', '^', '&'};
char bolts[] = {'$', '%', '&', '^', '@', '#'};
findMatch(nuts,bolts);
}
public static void findMatch(char[] nuts,char[] bolts)
{
Set<Character> set = new LinkedHashSet<>();
for(char ch:nuts)
{
if(!set.contains(ch))
set.add(ch);
}
/*Iterator it= set.iterator();
while(it.hasNext())
{
System.out.print(it.next()+" ");
}*/
for(int i=0;i<bolts.length;i++)
{
if(set.contains(bolts[i]))
{
nuts[i] = bolts[i];
}
}
for(int i=0;i<nuts.length;i++)
{
System.out.print(nuts[i]+ " ");
}
System.out.println();
for(int i=0;i<bolts.length;i++)
{
System.out.print(bolts[i]+ " ");
}
}
}
|
[
"vinay25788@gmail.com"
] |
vinay25788@gmail.com
|
25abe2ce33778d7f6dae4eee4fd671af2f5917f2
|
0ca8bfc45aab4edd504ca866dc6017293b0fb00c
|
/tfkc_shop/src/com/koala/foundation/service/impl/ActivityServiceImpl.java
|
edefd5d2c63c420ee0b50332ecf52c6659c84775
|
[] |
no_license
|
kkhsl/MetooRespository
|
939969c5627aaec0824394450b00d47a9f222e7b
|
920373344a6b4e5dafdf69e06bb3418d9492a8c7
|
refs/heads/master
| 2022-12-23T13:08:02.019395
| 2019-03-29T11:26:51
| 2019-03-29T11:26:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,562
|
java
|
package com.koala.foundation.service.impl;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import com.koala.core.query.PageObject;
import com.koala.core.query.support.IPageList;
import com.koala.core.query.support.IQueryObject;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.koala.core.dao.IGenericDAO;
import com.koala.core.query.GenericPageList;
import com.koala.foundation.domain.Activity;
import com.koala.foundation.service.IActivityService;
@Service
@Transactional
public class ActivityServiceImpl implements IActivityService {
@Resource(name = "activityDAO")
private IGenericDAO<Activity> activityDao;
public boolean save(Activity activity) {
/**
* init other field here
*/
try {
this.activityDao.save(activity);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public Activity getObjById(Long id) {
Activity activity = this.activityDao.get(id);
if (activity != null) {
return activity;
}
return null;
}
public boolean delete(Long id) {
try {
this.activityDao.remove(id);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public boolean batchDelete(List<Serializable> activityIds) {
// TODO Auto-generated method stub
for (Serializable id : activityIds) {
delete((Long) id);
}
return true;
}
public IPageList list(IQueryObject properties) {
if (properties == null) {
return null;
}
String query = properties.getQuery();
String construct = properties.getConstruct();
Map params = properties.getParameters();
GenericPageList pList = new GenericPageList(Activity.class, construct,
query, params, this.activityDao);
if (properties != null) {
PageObject pageObj = properties.getPageObj();
if (pageObj != null)
pList.doList(
pageObj.getCurrentPage() == null ? 0 : pageObj
.getCurrentPage(),
pageObj.getPageSize() == null ? 0 : pageObj
.getPageSize());
} else
pList.doList(0, -1);
return pList;
}
public boolean update(Activity activity) {
try {
this.activityDao.update(activity);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public List<Activity> query(String query, Map params, int begin, int max) {
return this.activityDao.query(query, params, begin, max);
}
}
|
[
"460751446@qq.com"
] |
460751446@qq.com
|
24c72dd7a29c8bc1e56d28aa40319a3d472271ff
|
7ef841751c77207651aebf81273fcc972396c836
|
/astream/src/main/java/com/loki/astream/stubs/SampleClass588.java
|
e5c3292115fd0b7bac886f4486cc568714e1e58a
|
[] |
no_license
|
SergiiGrechukha/ModuleApp
|
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
|
00e22d51c8f7100e171217bcc61f440f94ab9c52
|
refs/heads/master
| 2022-05-07T13:27:37.704233
| 2019-11-22T07:11:19
| 2019-11-22T07:11:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 371
|
java
|
package com.loki.astream.stubs;import com.jenzz.pojobuilder.api.Builder;import com.jenzz.pojobuilder.api.Ignore;
@Builder public class SampleClass588 {
@Ignore private SampleClass589 sampleClass;
public SampleClass588(){
sampleClass = new SampleClass589();
}
public String getClassName() {
return sampleClass.getClassName();
}
}
|
[
"sergey.grechukha@gmail.com"
] |
sergey.grechukha@gmail.com
|
d1409cd5cabbd947566af58cdd025e4a9fd61f97
|
cc4e954a2fce90a835b648d5cb5a61097837749f
|
/projectlibre/openproj_ui/src/com/projity/pm/graphic/spreadsheet/common/GradientCorner.java
|
ec7568e753a17f97222b133d5981d5cdadb3baac
|
[] |
no_license
|
vmazurashu/lp-pl-integration
|
dc9cac67e12e85540ce5e4dffe5e73f414cf13b4
|
f1eff6232a36a895b48d4cd6486aca822dab9ea2
|
refs/heads/master
| 2020-04-08T23:22:14.044103
| 2018-11-30T12:42:20
| 2018-11-30T12:42:20
| 159,821,841
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,827
|
java
|
/*
The contents of this file are subject to the Common Public Attribution License
Version 1.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.projity.com/license . The License is based on the Mozilla Public
License Version 1.1 but Sections 14 and 15 have been added to cover use of
software over a computer network and provide for limited attribution for the
Original Developer. In addition, Exhibit A has been modified to be consistent
with Exhibit B.
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
specific language governing rights and limitations under the License. The
Original Code is OpenProj. The Original Developer is the Initial Developer and
is Projity, Inc. All portions of the code written by Projity are Copyright (c)
2006, 2007. All Rights Reserved. Contributors Projity, Inc.
Alternatively, the contents of this file may be used under the terms of the
Projity End-User License Agreeement (the Projity License), in which case the
provisions of the Projity License are applicable instead of those above. If you
wish to allow use of your version of this file only under the terms of the
Projity License and not to allow others to use your version of this file under
the CPAL, indicate your decision by deleting the provisions above and replace
them with the notice and other provisions required by the Projity License. If
you do not delete the provisions above, a recipient may use your version of this
file under either the CPAL or the Projity License.
[NOTE: The text of this license may differ slightly from the text of the notices
in Exhibits A and B of the license at http://www.projity.com/license. You should
use the latest text at http://www.projity.com/license for your modifications.
You may not remove this license text from the source files.]
Attribution Information: Attribution Copyright Notice: Copyright (c) 2006, 2007
Projity, Inc. Attribution Phrase (not exceeding 10 words): Powered by OpenProj,
an open source solution from Projity. Attribution URL: http://www.projity.com
Graphic Image as provided in the Covered Code as file: openproj_logo.png with
alternatives listed on http://www.projity.com/logo
Display of Attribution Information is required in Larger Works which are defined
in the CPAL as a work which combines Covered Code or portions thereof with code
not governed by the terms of the CPAL. However, in addition to the other notice
obligations, all copies of the Covered Code in Executable and Source Code form
distributed must, as a form of attribution of the original author, include on
each user interface screen the "OpenProj" logo visible to all users. The
OpenProj logo should be located horizontally aligned with the menu bar and left
justified on the top left of the screen adjacent to the File menu. The logo
must be at least 100 x 25 pixels. When users click on the "OpenProj" logo it
must direct them back to http://www.projity.com.
*/
package com.projity.pm.graphic.spreadsheet.common;
import java.awt.Graphics;
import javax.swing.JComponent;
import com.projity.pm.graphic.frames.GraphicManager;
/**
*
*/
public class GradientCorner extends JComponent {
protected boolean selected;
public GradientCorner() {
super();
}
protected void paintComponent(Graphics g) {
super.paintComponent(g);
GraphicManager.getInstance().getLafManager().paintComponent(g, this, selected);
}
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
if (this.selected != selected){
//System.out.println("selected="+selected);
this.selected = selected;
repaint();
}
}
}
|
[
"mazurashuvadim@gmail.com"
] |
mazurashuvadim@gmail.com
|
5e7c2659cbd086cb3d5412f84249bba9b301ae84
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/test_apks/insecurebank/source/com/google/android/gms/internal/zzov.java
|
bad75cce6b07bdee78e071a9798c94861359c605
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 4,059
|
java
|
package com.google.android.gms.internal;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.api.zza.zza;
import com.google.android.gms.common.api.zza.zzb;
import com.google.android.gms.panorama.Panorama;
import com.google.android.gms.panorama.PanoramaApi;
import com.google.android.gms.panorama.PanoramaApi.PanoramaResult;
public class zzov
implements PanoramaApi
{
public zzov() {}
private static void zza(Context paramContext, Uri paramUri)
{
paramContext.revokeUriPermission(paramUri, 1);
}
private static void zza(Context paramContext, zzou paramZzou, final zzot paramZzot, final Uri paramUri, Bundle paramBundle)
throws RemoteException
{
paramContext.grantUriPermission("com.google.android.gms", paramUri, 1);
paramZzot = new zzot.zza()
{
public void zza(int paramAnonymousInt1, Bundle paramAnonymousBundle, int paramAnonymousInt2, Intent paramAnonymousIntent)
throws RemoteException
{
zzov.zzb(this.zzqV, paramUri);
paramZzot.zza(paramAnonymousInt1, paramAnonymousBundle, paramAnonymousInt2, paramAnonymousIntent);
}
};
try
{
paramZzou.zza(paramZzot, paramUri, paramBundle, true);
return;
}
catch (RemoteException paramZzou)
{
zza(paramContext, paramUri);
throw paramZzou;
}
catch (RuntimeException paramZzou)
{
zza(paramContext, paramUri);
throw paramZzou;
}
}
public PendingResult<PanoramaApi.PanoramaResult> loadPanoramaInfo(GoogleApiClient paramGoogleApiClient, final Uri paramUri)
{
paramGoogleApiClient.zza(new zza(paramGoogleApiClient)
{
protected void zza(Context paramAnonymousContext, zzou paramAnonymousZzou)
throws RemoteException
{
paramAnonymousZzou.zza(new zzov.zzb(this), paramUri, null, false);
}
});
}
public PendingResult<PanoramaApi.PanoramaResult> loadPanoramaInfoAndGrantAccess(GoogleApiClient paramGoogleApiClient, final Uri paramUri)
{
paramGoogleApiClient.zza(new zza(paramGoogleApiClient)
{
protected void zza(Context paramAnonymousContext, zzou paramAnonymousZzou)
throws RemoteException
{
zzov.zzb(paramAnonymousContext, paramAnonymousZzou, new zzov.zzb(this), paramUri, null);
}
});
}
private static abstract class zza
extends zzov.zzc<PanoramaApi.PanoramaResult>
{
public zza(GoogleApiClient paramGoogleApiClient)
{
super();
}
protected PanoramaApi.PanoramaResult zzaN(Status paramStatus)
{
return new zzox(paramStatus, null);
}
}
private static final class zzb
extends zzot.zza
{
private final zza.zzb<PanoramaApi.PanoramaResult> zzOs;
public zzb(zza.zzb<PanoramaApi.PanoramaResult> paramZzb)
{
this.zzOs = paramZzb;
}
public void zza(int paramInt1, Bundle paramBundle, int paramInt2, Intent paramIntent)
{
if (paramBundle != null) {}
for (paramBundle = (PendingIntent)paramBundle.getParcelable("pendingIntent");; paramBundle = null)
{
paramBundle = new Status(paramInt1, null, paramBundle);
this.zzOs.zzm(new zzox(paramBundle, paramIntent));
return;
}
}
}
private static abstract class zzc<R extends Result>
extends zza.zza<R, zzow>
{
protected zzc(GoogleApiClient paramGoogleApiClient)
{
super(paramGoogleApiClient);
}
protected abstract void zza(Context paramContext, zzou paramZzou)
throws RemoteException;
protected final void zza(zzow paramZzow)
throws RemoteException
{
zza(paramZzow.getContext(), (zzou)paramZzow.zznM());
}
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
0781e43237a469d659156be6b84fd3141d5dfbfd
|
a263d163cc786e5c49b1fd8929a24f695379de34
|
/products/src/main/java/org/example/sample/ProductsResource.java
|
00745dc77276cc995a053d3aa664b9772cdc23cd
|
[] |
no_license
|
hpfloresj/quarkus-robotostore
|
f21b6085e3a70997a1516b8ccf9f978fd93f1dbf
|
80b98608fb7708b145669e75a6fd10997129ef05
|
refs/heads/master
| 2023-01-04T21:31:03.628183
| 2020-10-31T18:18:25
| 2020-10-31T18:18:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,779
|
java
|
package org.example.sample;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import lombok.extern.slf4j.Slf4j;
import org.bson.types.ObjectId;
import org.eclipse.microprofile.reactive.messaging.Channel;
import org.example.sample.products.model.Product;
import org.example.sample.products.repository.ProductsRepository;
import org.reactivestreams.Publisher;
import javax.inject.Inject;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@Path("/products")
@Slf4j
public class ProductsResource {
@Inject
ProductsRepository productsRepository;
@Inject
@Channel("products")
Publisher<Product> productsListener;
@GET
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public Multi<Product> getProducts(){
return productsRepository
.findAll()
.stream();
}
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public Uni<Product> createProduct(Product product){
return productsRepository
.persist(product)
.map(v -> product)
.onFailure()
.invoke(e -> log.error("Error on product creation , ", e))
;
}
@GET
@Path("/{id}")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public Uni<Response> getProduct(@PathParam("id") String id) {
return productsRepository
.findById(new ObjectId(id))
.onItem()
.transform(p -> p!=null ? Response.ok(p) : Response.status(Response.Status.NOT_FOUND))
.onItem()
.transform(Response.ResponseBuilder::build);
}
}
|
[
"marcozfr@gmail.com"
] |
marcozfr@gmail.com
|
b3ffe249557b291d34330ffabd257c13faf14866
|
d7a761a9b1e091b585dc9511cffea7ecc2fa87f3
|
/src/com/example/projectcircle/util/StringUtil.java
|
7c514f4ef5ab8e6fb1ec142544aaf3ecf972a0be
|
[] |
no_license
|
bingdon/ProCir
|
2cfdfad22830b44d5b3575781c8c2fddfeaba675
|
d05c2421bb0ac8a9b05fbc0ff8e16bdaa96b4784
|
refs/heads/master
| 2021-01-25T10:29:25.898877
| 2014-08-28T02:36:22
| 2014-08-28T02:36:22
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 962
|
java
|
package com.example.projectcircle.util;
public class StringUtil {
public static String bSubstring(String s, int length) throws Exception {
byte[] bytes = s.getBytes("Unicode");
int n = 0; // 表示当前的字节数
int i = 2; // 要截取的字节数,从第3个字节开始
for (; i < bytes.length && n < length; i++) {
// 奇数位置,如3、5、7等,为UCS2编码中两个字节的第二个字节
if (i % 2 == 1) {
n++; // 在UCS2第二个字节时n加1
} else {
// 当UCS2编码的第一个字节不等于0时,该UCS2字符为汉字,一个汉字算两个字节
if (bytes[i] != 0) {
n++;
}
}
}
// 如果i为奇数时,处理成偶数
if (i % 2 == 1)
{
// 该UCS2字符是汉字时,去掉这个截一半的汉字
if (bytes[i - 1] != 0)
i = i - 1;
// 该UCS2字符是字母或数字,则保留该字符
else
i = i + 1;
}
return new String(bytes, 0, i, "Unicode");
}
}
|
[
"1525218075@qq.com"
] |
1525218075@qq.com
|
64e1b4199b30f025250c6aa99d9dad2106eb8f21
|
6500848c3661afda83a024f9792bc6e2e8e8a14e
|
/gp_JADX/com/google/android/finsky/billing/lightpurchase/vr/p163a/ak.java
|
d5020b8db283a354682bd4f6941f5910cb906ac9
|
[] |
no_license
|
enaawy/gproject
|
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
|
91cb88559c60ac741d4418658d0416f26722e789
|
refs/heads/master
| 2021-09-03T03:49:37.813805
| 2018-01-05T09:35:06
| 2018-01-05T09:35:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 504
|
java
|
package com.google.android.finsky.billing.lightpurchase.vr.p163a;
import com.google.vr.a.a.a.c;
import com.google.vr.a.a.a.d;
public final class ak implements d {
public final /* synthetic */ C1978o f10006a;
public final /* synthetic */ C1986w f10007b;
public ak(C1986w c1986w, C1978o c1978o) {
this.f10007b = c1986w;
this.f10006a = c1978o;
}
public final void m10464a(c cVar) {
this.f10006a.f9987t = false;
this.f10007b.f10100d.mo2558k();
}
}
|
[
"genius.ron@gmail.com"
] |
genius.ron@gmail.com
|
d99cbbfcef91c2dc520c84caacc287adfcb74d8b
|
bba1ebf0b3023e1827deaec37ec593e6d3e23af3
|
/catalogo-web/src/main/java/br/com/vivo/catalogoPRS/ws/catalogoServico/sn/ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo.java
|
c4b9c12261fef46349248901dd00b593d8874d50
|
[] |
no_license
|
douglasikoshima/teste-repositorio
|
91a2844c2b8a7cc4f5d423ed25bfd24bfd1eff28
|
c85512ec57b9a1fd450bba950b6e71c019ca14c3
|
refs/heads/master
| 2021-01-19T09:00:23.590328
| 2017-02-15T19:46:02
| 2017-02-15T19:46:02
| 82,079,552
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,484
|
java
|
/**
* ResultadoBuscarListaServicoParametrizacaoListaBuscarListaServicoParametrizacaoRetornoBuscarListaServicoParametrizacaoInDisponibilidadeCatalogo.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package br.com.vivo.catalogoPRS.ws.catalogoServico.sn;
public class ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _S = "S";
public static final java.lang.String _N = "N";
public static final ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo S = new ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo(_S);
public static final ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo N = new ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo(_N);
public java.lang.String getValue() { return _value_;}
public static ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo enumeration = (ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumSerializer(
_javaType, _xmlType);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(ParametrizacaoRetornoBuscarListaServicoParametrizacaoInCatalogo.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.vivo.com.br/SN/CatalogoServico", ">>>>ResultadoBuscarListaServicoParametrizacao>ListaBuscarListaServicoParametrizacao>RetornoBuscarListaServicoParametrizacao>inDisponibilidadeCatalogo"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
|
[
"vfabio@indracompany.com"
] |
vfabio@indracompany.com
|
5e8a29c1b6e2d9a0d39bc27a0aeb1dcaeccc994e
|
b95f32b4d4799b940f61feab492fdaf3e709d6d4
|
/invoice/src/main/java/io/polarpoint/invoice/web/rest/ShipmentResource.java
|
765c3d27b88ccd14701ee130cdcb4b22d1392021
|
[] |
no_license
|
polarpoint-io/istio-demo
|
ccef4765695dbd692490a674c08a522e36f1acd4
|
29c8623eed327cf06e572f6418b21f5f1a4ba497
|
refs/heads/master
| 2020-12-12T17:09:05.739609
| 2020-01-20T08:53:46
| 2020-01-20T08:53:46
| 234,182,157
| 0
| 0
| null | 2020-07-19T08:45:49
| 2020-01-15T22:01:41
|
Java
|
UTF-8
|
Java
| false
| false
| 5,530
|
java
|
package io.polarpoint.invoice.web.rest;
import io.polarpoint.invoice.domain.Shipment;
import io.polarpoint.invoice.service.ShipmentService;
import io.polarpoint.invoice.web.rest.errors.BadRequestAlertException;
import io.github.jhipster.web.util.HeaderUtil;
import io.github.jhipster.web.util.PaginationUtil;
import io.github.jhipster.web.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Optional;
/**
* REST controller for managing {@link io.polarpoint.invoice.domain.Shipment}.
*/
@RestController
@RequestMapping("/api")
public class ShipmentResource {
private final Logger log = LoggerFactory.getLogger(ShipmentResource.class);
private static final String ENTITY_NAME = "invoiceShipment";
@Value("${jhipster.clientApp.name}")
private String applicationName;
private final ShipmentService shipmentService;
public ShipmentResource(ShipmentService shipmentService) {
this.shipmentService = shipmentService;
}
/**
* {@code POST /shipments} : Create a new shipment.
*
* @param shipment the shipment to create.
* @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new shipment, or with status {@code 400 (Bad Request)} if the shipment has already an ID.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PostMapping("/shipments")
public ResponseEntity<Shipment> createShipment(@Valid @RequestBody Shipment shipment) throws URISyntaxException {
log.debug("REST request to save Shipment : {}", shipment);
if (shipment.getId() != null) {
throw new BadRequestAlertException("A new shipment cannot already have an ID", ENTITY_NAME, "idexists");
}
Shipment result = shipmentService.save(shipment);
return ResponseEntity.created(new URI("/api/shipments/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(applicationName, true, ENTITY_NAME, result.getId().toString()))
.body(result);
}
/**
* {@code PUT /shipments} : Updates an existing shipment.
*
* @param shipment the shipment to update.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated shipment,
* or with status {@code 400 (Bad Request)} if the shipment is not valid,
* or with status {@code 500 (Internal Server Error)} if the shipment couldn't be updated.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PutMapping("/shipments")
public ResponseEntity<Shipment> updateShipment(@Valid @RequestBody Shipment shipment) throws URISyntaxException {
log.debug("REST request to update Shipment : {}", shipment);
if (shipment.getId() == null) {
throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
}
Shipment result = shipmentService.save(shipment);
return ResponseEntity.ok()
.headers(HeaderUtil.createEntityUpdateAlert(applicationName, true, ENTITY_NAME, shipment.getId().toString()))
.body(result);
}
/**
* {@code GET /shipments} : get all the shipments.
*
* @param pageable the pagination information.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and the list of shipments in body.
*/
@GetMapping("/shipments")
public ResponseEntity<List<Shipment>> getAllShipments(Pageable pageable) {
log.debug("REST request to get a page of Shipments");
Page<Shipment> page = shipmentService.findAll(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(ServletUriComponentsBuilder.fromCurrentRequest(), page);
return ResponseEntity.ok().headers(headers).body(page.getContent());
}
/**
* {@code GET /shipments/:id} : get the "id" shipment.
*
* @param id the id of the shipment to retrieve.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the shipment, or with status {@code 404 (Not Found)}.
*/
@GetMapping("/shipments/{id}")
public ResponseEntity<Shipment> getShipment(@PathVariable Long id) {
log.debug("REST request to get Shipment : {}", id);
Optional<Shipment> shipment = shipmentService.findOne(id);
return ResponseUtil.wrapOrNotFound(shipment);
}
/**
* {@code DELETE /shipments/:id} : delete the "id" shipment.
*
* @param id the id of the shipment to delete.
* @return the {@link ResponseEntity} with status {@code 204 (NO_CONTENT)}.
*/
@DeleteMapping("/shipments/{id}")
public ResponseEntity<Void> deleteShipment(@PathVariable Long id) {
log.debug("REST request to delete Shipment : {}", id);
shipmentService.delete(id);
return ResponseEntity.noContent().headers(HeaderUtil.createEntityDeletionAlert(applicationName, true, ENTITY_NAME, id.toString())).build();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
f683dd8962035b327ae619b427fcb0207a0f1526
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/plugin/qqmail/b/ac.java
|
478ee611551c1b64fc3d757ce162480a7d0f8d9c
|
[] |
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
| 2,369
|
java
|
package com.tencent.mm.plugin.qqmail.b;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.cd.h.d;
import com.tencent.mm.kernel.g;
import com.tencent.mm.model.at;
import com.tencent.mm.model.bf;
import com.tencent.mm.model.q;
import com.tencent.mm.plugin.messenger.foundation.a.j;
import com.tencent.mm.protocal.d;
import com.tencent.mm.sdk.platformtools.al;
import com.tencent.mm.storage.be;
import java.util.HashMap;
public class ac
implements at
{
private ab puY;
private v pvA;
private b pvB;
public ac()
{
AppMethodBeat.i(68060);
this.pvB = new b();
AppMethodBeat.o(68060);
}
private static ac ccB()
{
AppMethodBeat.i(68061);
ac localac = (ac)q.Y(ac.class);
AppMethodBeat.o(68061);
return localac;
}
public static v ccC()
{
AppMethodBeat.i(68062);
g.RN().QU();
if (ccB().pvA == null)
ccB().pvA = new v(d.vxo, d.eSg);
v localv = ccB().pvA;
AppMethodBeat.o(68062);
return localv;
}
public static ab ccD()
{
AppMethodBeat.i(68063);
g.RN().QU();
if (ccB().puY == null)
ccB().puY = new ab();
ab localab = ccB().puY;
AppMethodBeat.o(68063);
return localab;
}
public static void ccE()
{
AppMethodBeat.i(68066);
bf.oD("qqmail");
((j)g.K(j.class)).XR().aoX("qqmail");
ccC().clearData();
AppMethodBeat.o(68066);
}
public final HashMap<Integer, h.d> Jx()
{
return null;
}
public final void bA(boolean paramBoolean)
{
}
public final void bz(boolean paramBoolean)
{
AppMethodBeat.i(68067);
com.tencent.mm.sdk.b.a.xxA.c(this.pvB);
g.RS().aa(new ac.1(this));
AppMethodBeat.o(68067);
}
public final void iy(int paramInt)
{
AppMethodBeat.i(68065);
if ((paramInt & 0x1) != 0)
ccE();
AppMethodBeat.o(68065);
}
public final void onAccountRelease()
{
AppMethodBeat.i(68064);
v localv = ccB().pvA;
if (localv != null)
localv.reset();
com.tencent.mm.sdk.b.a.xxA.d(this.pvB);
AppMethodBeat.o(68064);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.qqmail.b.ac
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
1ac0af439ae267058475c74aff3857f738335606
|
0e4adc5b9d3b560a14e3e133d56c2f3388220e87
|
/src/test/java/data/daos/AllDaosITests.java
|
ad9b2449d5e57a8a5a3075734ecf4edf68e932d0
|
[] |
no_license
|
mduenast/JEE.Paddle
|
7fb6c1289cc33a62c8379c11699577ee6444081a
|
cf041b9a4ef24e88773494e3fe8c23c3e17cd472
|
refs/heads/master
| 2021-06-13T08:57:15.583737
| 2017-02-25T18:32:24
| 2017-02-25T18:32:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 328
|
java
|
package data.daos;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
@SuiteClasses({
TokenDaoITest.class,
UserDaoITest.class,
AuthorizationDaoITest.class,
ReserveDaoITest.class
})
public class AllDaosITests {
}
|
[
"jbernal@etsisi.upm.es"
] |
jbernal@etsisi.upm.es
|
f8b430730f5cfa591b591d0fa122b9a6fd9f4d35
|
4cd34a06cb14a5670ebae7feab52e665f3d29aa0
|
/junior1_kuangshen_case1/src/main/java/com/ryzezhao/example7/Main.java
|
9b65343625f073f4f43d1fb6913f75b34c0eb250
|
[] |
no_license
|
Ryze-Zhao/basic-spring-framework
|
cbd684bd59eb0a15220500355737c695739a1ded
|
c6aec0a53b5fd5e1d623e91d86923ad0ef103d61
|
refs/heads/master
| 2022-04-21T21:42:07.432339
| 2020-04-24T10:01:40
| 2020-04-24T10:01:40
| 256,726,844
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 436
|
java
|
package com.ryzezhao.example7;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Main {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("example7.xml");
People people = context.getBean("people", People.class);
System.out.println(people.toString());
}
}
|
[
"643080112@qq.com"
] |
643080112@qq.com
|
8e7c4fb78d27b6af526588a3ae7a4a25b9faeaf9
|
3e4ab592071e8d58fc6867eed9bee1424f89ca27
|
/EMWMatrix3/src/main/java/cc/emw/mobile/chat/imagepicker/ui/ImagePreviewBaseActivity.java
|
d2f7a8a169844231e319448eacf7601f38d1ef6e
|
[] |
no_license
|
Jeffery336699/EMWMatrix
|
8e7a2d7ff1866849e7669716bc2ddf75c2c52ba5
|
1a47328cf63fb3b10635de113003d95f23b8df2f
|
refs/heads/master
| 2020-04-13T17:39:37.665204
| 2019-01-09T05:59:26
| 2019-01-09T05:59:26
| 163,353,607
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,042
|
java
|
package cc.emw.mobile.chat.imagepicker.ui;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.util.ArrayList;
import cc.emw.mobile.R;
import cc.emw.mobile.chat.imagepicker.DataHolder;
import cc.emw.mobile.chat.imagepicker.ImagePicker;
import cc.emw.mobile.chat.imagepicker.adapter.ImagePageAdapter;
import cc.emw.mobile.chat.imagepicker.bean.ImageItem;
import cc.emw.mobile.chat.imagepicker.util.Utils;
import cc.emw.mobile.chat.imagepicker.view.ViewPagerFixed;
/**
* ================================================
* 作 者:jeasonlzy(廖子尧 Github地址:https://github.com/jeasonlzy0216
* 版 本:1.0
* 创建日期:2016/5/19
* 描 述:
* 修订历史:图片预览的基类
* ================================================
*/
public abstract class ImagePreviewBaseActivity extends ImageBaseActivity {
protected ImagePicker imagePicker;
protected ArrayList<ImageItem> mImageItems; //跳转进ImagePreviewFragment的图片文件夹
protected int mCurrentPosition = 0; //跳转进ImagePreviewFragment时的序号,第几个图片
protected TextView mTitleCount; //显示当前图片的位置 例如 5/31
protected ArrayList<ImageItem> selectedImages; //所有已经选中的图片
protected View content;
protected View topBar;
protected ViewPagerFixed mViewPager;
protected ImagePageAdapter mAdapter;
protected boolean isFromItems = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_image_preview);
mCurrentPosition = getIntent().getIntExtra(ImagePicker.EXTRA_SELECTED_IMAGE_POSITION, 0);
isFromItems = getIntent().getBooleanExtra(ImagePicker.EXTRA_FROM_ITEMS,false);
if (isFromItems){
// 据说这样会导致大量图片崩溃
mImageItems = (ArrayList<ImageItem>) getIntent().getSerializableExtra(ImagePicker.EXTRA_IMAGE_ITEMS);
}else{
// 下面采用弱引用会导致预览崩溃
mImageItems = (ArrayList<ImageItem>) DataHolder.getInstance().retrieve(DataHolder.DH_CURRENT_IMAGE_FOLDER_ITEMS);
}
imagePicker = ImagePicker.getInstance();
selectedImages = imagePicker.getSelectedImages();
//初始化控件
content = findViewById(R.id.content);
//因为状态栏透明后,布局整体会上移,所以给头部加上状态栏的margin值,保证头部不会被覆盖
topBar = findViewById(R.id.top_bar);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) topBar.getLayoutParams();
params.topMargin = Utils.getStatusHeight(this);
topBar.setLayoutParams(params);
}
topBar.findViewById(R.id.btn_ok).setVisibility(View.GONE);
topBar.findViewById(R.id.btn_back).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
mTitleCount = (TextView) findViewById(R.id.tv_des);
mViewPager = (ViewPagerFixed) findViewById(R.id.viewpager);
mAdapter = new ImagePageAdapter(this, mImageItems);
mAdapter.setPhotoViewClickListener(new ImagePageAdapter.PhotoViewClickListener() {
@Override
public void OnPhotoTapListener(View view, float v, float v1) {
onImageSingleTap();
}
});
mViewPager.setAdapter(mAdapter);
mViewPager.setCurrentItem(mCurrentPosition, false);
//初始化当前页面的状态
mTitleCount.setText(getString(R.string.preview_image_count, mCurrentPosition + 1, mImageItems.size()));
}
/** 单击时,隐藏头和尾 */
public abstract void onImageSingleTap();
}
|
[
"912833721@qq.com"
] |
912833721@qq.com
|
f77c80375b5518dfc19f0c7d6a2c5739839b9d18
|
03eddd8bd97847de405494ac6119d76191bf819b
|
/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/valuesets/V3EntityStatusEnumFactory.java
|
aaec22092c515e4452bc6e956e7e8455388b4eb5
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
sashrika/hapi-fhir
|
e9cc8430a869cd2de78d8317c6656b77dfb61fd9
|
3fa7c545265942290c3cd06152c2ca7f9935105c
|
refs/heads/master
| 2021-01-17T23:19:20.982619
| 2015-07-13T14:31:02
| 2015-07-13T14:31:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,741
|
java
|
package org.hl7.fhir.instance.model.valuesets;
/*
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 Wed, Jul 8, 2015 17:35-0400 for FHIR v0.5.0
import org.hl7.fhir.instance.model.EnumFactory;
public class V3EntityStatusEnumFactory implements EnumFactory<V3EntityStatus> {
public V3EntityStatus fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("normal".equals(codeString))
return V3EntityStatus.NORMAL;
if ("active".equals(codeString))
return V3EntityStatus.ACTIVE;
if ("inactive".equals(codeString))
return V3EntityStatus.INACTIVE;
if ("nullified".equals(codeString))
return V3EntityStatus.NULLIFIED;
throw new IllegalArgumentException("Unknown V3EntityStatus code '"+codeString+"'");
}
public String toCode(V3EntityStatus code) {
if (code == V3EntityStatus.NORMAL)
return "normal";
if (code == V3EntityStatus.ACTIVE)
return "active";
if (code == V3EntityStatus.INACTIVE)
return "inactive";
if (code == V3EntityStatus.NULLIFIED)
return "nullified";
return "?";
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
5d2ade7939b3e606f3d6f0cc05e2bdd8efb21138
|
e4da97ab81ec813fbecade1ad1fc4f346aed35e6
|
/src/core/ref-impl/resource-access-advanced/src/test/java/org/ogema/pattern/test/pattern/ContainerPattern.java
|
45ae11b25c6b8beeb04d272b32b2aef12e3ab7ae
|
[
"Apache-2.0"
] |
permissive
|
JoKoo619/ogema
|
49ae2afbdfed4141e1e2c9c4375b0788219ea6ed
|
21e3d6827e416893461e9e8a8b80c01d75d135f9
|
refs/heads/public
| 2020-12-11T09:30:27.575002
| 2015-11-27T09:42:42
| 2015-11-27T09:42:42
| 49,029,409
| 0
| 1
| null | 2016-01-04T23:23:52
| 2016-01-04T23:23:48
| null |
UTF-8
|
Java
| false
| false
| 1,636
|
java
|
/**
* This file is part of OGEMA.
*
* OGEMA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3
* as published by the Free Software Foundation.
*
* OGEMA 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 OGEMA. If not, see <http://www.gnu.org/licenses/>.
*/
package org.ogema.pattern.test.pattern;
import org.ogema.core.model.Resource;
import org.ogema.core.model.simple.BooleanResource;
import org.ogema.core.model.simple.FloatResource;
import org.ogema.core.resourcemanager.pattern.ContextSensitivePattern;
import org.ogema.model.devices.generators.ElectricHeater;
public class ContainerPattern extends ContextSensitivePattern<ElectricHeater, Container> {
private int id = -1;
public final BooleanResource sc = model.onOffSwitch().stateControl();
public final FloatResource readng = model.location().room().temperatureSensor().reading();
public ContainerPattern(Resource match) {
super(match);
}
@Override
public boolean accept() {
if (id < 0)
id = context.getNextId();
return id < 5;
}
@Override
public void init() {
model.onOffSwitch().stateFeedback().create();
model.onOffSwitch().stateFeedback().setValue(context.getFeedbackState());
}
public int getId() {
return id;
}
@Override
public String toString() {
return "ContainerPattern " + id;
}
}
|
[
"jan.lapp@iwes.fraunhofer.de"
] |
jan.lapp@iwes.fraunhofer.de
|
5fa316b8681857001f59247df5ada87f2fb6856d
|
d295f598ad9cf3e3b0f478c09bc2461865fd7799
|
/chapter15/c15_p2/src/mymodapp/appsrc/userfuncsimp/module-info.java
|
adb553fca6019571e3f1f3e303535e7607899938
|
[] |
no_license
|
theagoliveira/java-beginners-guide
|
71286d2d5ea32991e35adc172b03694ac16c1695
|
eec45916fd2d5261c76bec13ffaa004451f80049
|
refs/heads/main
| 2023-07-11T22:12:15.439510
| 2021-08-16T19:30:17
| 2021-08-16T19:30:17
| 350,165,622
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 208
|
java
|
module userfuncsimp {
requires userfuncs;
provides userfuncs.binaryfuncs.BinFuncProvider with userfuncsimp.binaryfuncsimp.AbsPlusProvider,
userfuncsimp.binaryfuncsimp.AbsMinusProvider;
}
|
[
"thiago.kun@gmail.com"
] |
thiago.kun@gmail.com
|
b31ae0ed9fad849e2da724c0c4b1f5b475ea801d
|
17a0a0934f604119d0e2267bee263b4a6ff80244
|
/app/src/main/java/com/innoviussoftwaresolution/tjss/APIcalls/APIClient.java
|
fac15605fb1ee2d82747c3cda8df11b2e03a1c60
|
[] |
no_license
|
iamRAJASHEKAR/TJSS_fixed
|
b9473c266fab341917716167e6661b1800f4e28b
|
e0ae291f8e760c3b549cd8df870a0d98d5db2dae
|
refs/heads/master
| 2020-03-24T20:42:19.219014
| 2018-07-31T09:32:18
| 2018-07-31T09:32:18
| 142,992,676
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,305
|
java
|
package com.innoviussoftwaresolution.tjss.APIcalls;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.innoviussoftwaresolution.tjss.BuildConfig;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* Created by admin on 3/29/2018.
*/
public class APIClient {
//public static final String BASE_URL = "http://innoviussoftware.com/tjss/tjss_api/public/";
private static Retrofit retrofit = null;
public static Retrofit getClient() {
if (retrofit == null) {
Gson gson = new GsonBuilder()
.setLenient()
.create();
retrofit = new Retrofit.Builder()
.baseUrl(APIconstants.BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
}
/*if (BuildConfig.DEBUG)
{
Log.d("Error",HttpLoggingInterceptor.Level.BODY.toString());
}
*/
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
// set your desired log level
if (BuildConfig.DEBUG)
{
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
}
return retrofit;
}
}
|
[
"rajashekar.reddy1995@gmail.com"
] |
rajashekar.reddy1995@gmail.com
|
4629349008f833826139259949b99241a1cd396d
|
2b8c47031dddd10fede8bcf16f8db2b52521cb4f
|
/subject SPLs and test cases/Lampiro(6)/Lampiro_P6/evosuite-tests4/it/yup/util/StderrConsumer_ESTest4.java
|
c9a14e7736ddb26339e472684faf14ac5aa393c6
|
[] |
no_license
|
psjung/SRTST_experiments
|
6f1ff67121ef43c00c01c9f48ce34f31724676b6
|
40961cb4b4a1e968d1e0857262df36832efb4910
|
refs/heads/master
| 2021-06-20T04:45:54.440905
| 2019-09-06T04:05:38
| 2019-09-06T04:05:38
| 206,693,757
| 1
| 0
| null | 2020-10-13T15:50:41
| 2019-09-06T02:10:06
|
Java
|
UTF-8
|
Java
| false
| false
| 793
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Jul 01 16:00:12 KST 2018
*/
package it.yup.util;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVNET = true, separateClassLoader = true, useJEE = true)
public class StderrConsumer_ESTest4 extends StderrConsumer_ESTest_scaffolding4 {
@Test(timeout = 4000)
public void test0() throws Throwable {
StderrConsumer stderrConsumer0 = new StderrConsumer();
stderrConsumer0.gotMessage("", 0);
}
@Test(timeout = 4000)
public void test1() throws Throwable {
StderrConsumer stderrConsumer0 = new StderrConsumer();
stderrConsumer0.setExiting();
}
}
|
[
"psjung@kaist.ac.kr"
] |
psjung@kaist.ac.kr
|
8eb70bd3423e40bd2ba48bf59b30571ee66b8be6
|
cc8d0547d04461fdd78adc4268fafa662f799dcb
|
/Bug_Venture_App/app/build/generated/source/buildConfig/debug/com/example/bug_venture_app/BuildConfig.java
|
a66dbde0b6e54f0445242da0d316c69bbcccc808
|
[] |
no_license
|
MFC-VIT/Bug-Venture-Quiz-App
|
4ede0458044d6046e08e8a1d9d151eca80530d12
|
a6ae5c641f8a12e35aa121d13b174e5e79c1af7c
|
refs/heads/master
| 2022-12-24T13:24:20.442054
| 2020-10-03T14:01:17
| 2020-10-03T14:01:17
| 288,651,415
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 419
|
java
|
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.example.bug_venture_app;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.example.bug_venture_app";
public static final String BUILD_TYPE = "debug";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}
|
[
"you@example.com"
] |
you@example.com
|
e9bb08bf85fe348e9d35a9a6bb2f6a2a46f1e5e9
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/validation/org/apache/activemq/shiro/subject/ConnectionSubjectResolverTest.java
|
c1ae59b1777760ded9901d5f9b47db8217cd6780
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,905
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.activemq.shiro.subject;
import java.security.Principal;
import java.util.Set;
import org.apache.activemq.broker.ConnectionContext;
import org.apache.activemq.command.ConnectionInfo;
import org.apache.activemq.security.SecurityContext;
import org.apache.shiro.env.DefaultEnvironment;
import org.apache.shiro.subject.Subject;
import org.junit.Test;
/**
*
*
* @since 5.10.0
*/
public class ConnectionSubjectResolverTest {
@Test(expected = IllegalArgumentException.class)
public void testNullConstructorArg() {
new ConnectionSubjectResolver(((ConnectionContext) (null)));
}
@Test(expected = IllegalArgumentException.class)
public void testNullSecurityContext() {
SubjectConnectionReference reference = new SubjectConnectionReference(new ConnectionContext(), new ConnectionInfo(), new DefaultEnvironment(), new SubjectAdapter());
new ConnectionSubjectResolver(reference);
}
@Test(expected = IllegalArgumentException.class)
public void testNonSubjectSecurityContext() {
SubjectConnectionReference reference = new SubjectConnectionReference(new ConnectionContext(), new ConnectionInfo(), new DefaultEnvironment(), new SubjectAdapter());
reference.getConnectionContext().setSecurityContext(new SecurityContext("") {
@Override
public Set<Principal> getPrincipals() {
return null;
}
});
new ConnectionSubjectResolver(reference);
}
@Test(expected = IllegalStateException.class)
public void testNullSubject() {
SubjectConnectionReference reference = new SubjectConnectionReference(new ConnectionContext(), new ConnectionInfo(), new DefaultEnvironment(), new SubjectAdapter());
reference.getConnectionContext().setSecurityContext(new SubjectSecurityContext(reference) {
@Override
public Subject getSubject() {
return null;
}
});
ConnectionSubjectResolver resolver = new ConnectionSubjectResolver(reference);
resolver.getSubject();
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
e6c0a4e41e0234ac37a4e09a5312c25eece7230f
|
e4851ef058c1bb230f9c57e5758b245aa70f5092
|
/JML+Kelinci_Examples/StudentEnrollment/bug1/jml/StudentEnrollment.java
|
c4dbbcaf5a52613540d5fc1ea4c5ea18388530be
|
[] |
no_license
|
Amirfarhad-Nilizadeh/GSoC_Fuzzer_RAC
|
29b3c19eadb04e896313bae188fb5faeb6ab6262
|
bc146c3dd9fa3905db0e22b4a0b19eadada4a73f
|
refs/heads/main
| 2023-07-17T18:12:05.458473
| 2021-08-25T03:21:54
| 2021-08-25T03:21:54
| 373,240,258
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,173
|
java
|
public class StudentEnrollment {
public static final int costPerCredit = 200;
public static final int totalCredits = 120;
public static final int maxSemesterCredits = 20;
/*@ spec_public @*/ private String firstName;
/*@ spec_public @*/ private String lastName;
StudentEnrollment(/*@ non_null @*/ String firstName,
/*@ non_null @*/ String lastName)
{
this.firstName = firstName;
this.lastName = lastName;
}
/*@
@ requires 0 < payment;
@ requires passedCredits + semesterCredits <= totalCredits;
@ requires 0 <= semesterCredits && semesterCredits <= maxSemesterCredits;
@ requires 0 <= passedCredits && passedCredits <= totalCredits;
@ {|
@ requires option && initialBalance <= 0;
@ also
@ requires !option && initialBalance <= maxSemesterCredits * costPerCredit + maxSemesterCredits * ((costPerCredit/100)*6);
@ |} @*/
public void enrollmentProcess(int passedCredits, int semesterCredits, int payment, int initialBalance, boolean lateRegistration, boolean debit, boolean option)
{ }
}
|
[
"amirfarhad.nilizadeh@gmail.com"
] |
amirfarhad.nilizadeh@gmail.com
|
6a9e28f434b14229242726e1df685efc1a4f5374
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_5a0fc6e49ce0a70caba2d1a6fd1bb86c2898a8ee/ResourceLocator/10_5a0fc6e49ce0a70caba2d1a6fd1bb86c2898a8ee_ResourceLocator_s.java
|
572333ab90024954e5ad373b8da18908e0ddfc20
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,519
|
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.toolbox;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Enumeration;
import java.util.List;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author bmangez
*
* <B>Class Description</B>
*/
public class ResourceLocator {
private static final Logger logger = Logger.getLogger(ResourceLocator.class.getPackage().getName());
static File locateFile(String relativePathName) {
File locateFile = locateFile(relativePathName, false);
if (locateFile != null && locateFile.exists()) {
return locateFile;
}
return locateFile(relativePathName, true);
}
static File locateFile(String relativePathName, boolean lenient) {
// logger.info("locateFile: "+relativePathName);
for (Enumeration<File> e = getDirectoriesSearchOrder().elements(); e.hasMoreElements();) {
File nextTry = new File(e.nextElement(), relativePathName);
if (nextTry.exists()) {
if (logger.isLoggable(Level.FINER)) {
logger.finer("Found " + nextTry.getAbsolutePath());
}
try {
if (nextTry.getCanonicalFile().getName().equals(nextTry.getName()) || lenient) {
return nextTry;
}
} catch (IOException e1) {
}
} else {
if (logger.isLoggable(Level.FINER)) {
logger.finer("Searched for a " + nextTry.getAbsolutePath());
}
}
}
if (logger.isLoggable(Level.WARNING)) {
logger.warning("Could not locate resource " + relativePathName);
}
return new File(userDirectory, relativePathName);
}
static String retrieveRelativePath(FileResource fileResource) {
for (Enumeration<File> e = getDirectoriesSearchOrder().elements(); e.hasMoreElements();) {
File f = e.nextElement();
if (fileResource.getAbsolutePath().startsWith(f.getAbsolutePath())) {
return fileResource.getAbsolutePath().substring(f.getAbsolutePath().length() + 1).replace('\\', '/');
}
}
if (fileResource.getAbsolutePath().startsWith(userDirectory.getAbsolutePath())) {
return fileResource.getAbsolutePath().substring(userDirectory.getAbsolutePath().length() + 1).replace('\\', '/');
}
if (logger.isLoggable(Level.SEVERE)) {
logger.severe("File resource cannot be found: " + fileResource.getAbsolutePath());
}
return null;
}
public static String cleanPath(String relativePathName) {
try {
return locateFile(relativePathName).getCanonicalPath();
} catch (IOException e) {
return locateFile(relativePathName).getAbsolutePath();
}
// return cleanAbsolutePath(dirtyPath);
}
private static Vector<File> directoriesSearchOrder = null;
private static File preferredResourcePath;
private static File userDirectory = null;
private static File userHomeDirectory = null;
public static File getPreferredResourcePath() {
return preferredResourcePath;
}
public static void resetFlexoResourceLocation(File newLocation) {
preferredResourcePath = newLocation;
directoriesSearchOrder = null;
}
public static void printDirectoriesSearchOrder(PrintStream out) {
out.println("Directories search order is:");
for (File file : getDirectoriesSearchOrder()) {
out.println(file.getAbsolutePath());
}
}
public static void init() {
getDirectoriesSearchOrder();
}
public static void addProjectDirectory(File projectDirectory) {
init();
if (projectDirectory.exists()) {
addProjectResourceDirs(directoriesSearchOrder, projectDirectory);
}
}
private static Vector<File> getDirectoriesSearchOrder() {
if (directoriesSearchOrder == null) {
synchronized (ResourceLocator.class) {
if (directoriesSearchOrder == null) {
if (logger.isLoggable(Level.INFO)) {
logger.info("Initializing directories search order");
}
directoriesSearchOrder = new Vector<File>();
if (preferredResourcePath != null) {
if (logger.isLoggable(Level.INFO)) {
logger.info("Adding directory " + preferredResourcePath.getAbsolutePath());
}
directoriesSearchOrder.add(preferredResourcePath);
}
File workingDirectory = new File(System.getProperty("user.dir"));
File flexoDesktopDirectory = findProjectDirectoryWithName(workingDirectory, "flexodesktop");
if (flexoDesktopDirectory != null) {
findAllFlexoProjects(flexoDesktopDirectory, directoriesSearchOrder);
}
File technologyadaptersintegrationDirectory = new File(flexoDesktopDirectory.getParentFile(),
"packaging/technologyadaptersintegration");
if (technologyadaptersintegrationDirectory != null) {
findAllFlexoProjects(technologyadaptersintegrationDirectory, directoriesSearchOrder);
}
directoriesSearchOrder.add(workingDirectory);
}
}
}
return directoriesSearchOrder;
}
public static File findProjectDirectoryWithName(File currentDir, String projectName) {
if (currentDir != null) {
File attempt = new File(currentDir, projectName);
if (attempt.exists()) {
return attempt;
} else {
return findProjectDirectoryWithName(currentDir.getParentFile(), projectName);
}
}
return null;
}
public static void findAllFlexoProjects(File dir, List<File> files) {
if (new File(dir, "pom.xml").exists()) {
files.add(dir);
for (File f : dir.listFiles()) {
if (f.getName().startsWith("flexo") || f.getName().equals("technologyadaptersintegration")) {
addProjectResourceDirs(files, f);
} else if (f.isDirectory()) {
findAllFlexoProjects(f, files);
}
}
}
}
public static void addProjectResourceDirs(List<File> files, File f) {
File file1 = new File(f.getAbsolutePath() + "/src/main/resources");
File file2 = new File(f.getAbsolutePath() + "/src/test/resources");
File file3 = new File(f.getAbsolutePath() + "/src/dev/resources");
// File file4 = new File(f.getAbsolutePath());
if (logger.isLoggable(Level.FINE)) {
logger.info("Adding directory " + file1.getAbsolutePath());
}
if (logger.isLoggable(Level.FINE)) {
logger.fine("Adding directory " + file2.getAbsolutePath());
}
if (logger.isLoggable(Level.FINE)) {
logger.fine("Adding directory " + file3.getAbsolutePath());
}
/*if (logger.isLoggable(Level.FINE)) {
logger.fine("Adding directory " + file4.getAbsolutePath());
}*/
if (file1.exists()) {
files.add(file1);
}
if (file2.exists()) {
files.add(file2);
}
if (file3.exists()) {
files.add(file3);
}
/*if (file4.exists()) {
files.add(file4);
}*/
}
public static File getUserDirectory() {
return userDirectory;
}
public static File getUserHomeDirectory() {
return userHomeDirectory;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
9b877a78482855b9077e9689595f535f5359e4fe
|
aa97f7091839a6e755713fd7e709d0c3005839b6
|
/app/src/main/java/tv/merabihar/app/merabihar/UI/Activity/ContentList.java
|
75bc330b04127f1885da2911b5f21ddb96f04266
|
[] |
no_license
|
nisharzingo/BiharMera
|
0f9d9fe878b26c88dfb0442eead80f376b3bd887
|
b6ba5834e568f7210fe4b94b908c416d780486ca
|
refs/heads/master
| 2020-04-03T16:00:09.928133
| 2018-12-04T12:15:56
| 2018-12-04T12:15:56
| 155,386,848
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 490
|
java
|
package tv.merabihar.app.merabihar.UI.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import tv.merabihar.app.merabihar.R;
public class ContentList extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try{
setContentView(R.layout.activity_content_list);
}catch (Exception e){
e.printStackTrace();
}
}
}
|
[
"nishar@zingohotels.com"
] |
nishar@zingohotels.com
|
d72ed8314164b573fa47286ca47985bc0e683952
|
47b10920de379d354e043708aea7d736981979bb
|
/RxJava_Demos/RxJavaRetrofit/app/src/main/java/com/fmtech/rxjavaretrofit/modules/zip/ZipFragment.java
|
77ade8ca1904a699a5e6934c2346076f3c51c786
|
[
"Apache-2.0"
] |
permissive
|
kenkieo/FMTech
|
7e3cfe3a7321faccc4b6ae3e3728061918f8cf3f
|
1ad94f68283ec91c56a9e25a366fc3770c3b648b
|
refs/heads/master
| 2020-05-31T07:55:08.213772
| 2018-10-05T07:25:58
| 2018-10-05T07:25:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,035
|
java
|
package com.fmtech.rxjavaretrofit.modules.zip;
import android.content.ClipData;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import com.fmtech.rxjavaretrofit.BaseFragment;
import com.fmtech.rxjavaretrofit.R;
import com.fmtech.rxjavaretrofit.adapter.RecyclerListAdapter;
import com.fmtech.rxjavaretrofit.model.Image;
import com.fmtech.rxjavaretrofit.network.NetWorkService;
import com.fmtech.rxjavaretrofit.util.GankBeautyResultToItemsMapper;
import java.util.ArrayList;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import rx.Observable;
import rx.Observer;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Func2;
import rx.observers.Observers;
import rx.schedulers.Schedulers;
/**
* ==================================================================
* Copyright (C) 2016 FMTech All Rights Reserved.
*
* @author Drew.Chiang
* @version v1.0.0
* @email chiangchuna@gmail.com
* @create_date 2016/7/3 16:37
* @description ${todo}
* <p/>
* ==================================================================
*/
public class ZipFragment extends BaseFragment {
private RecyclerListAdapter mAdapter = new RecyclerListAdapter();
@Bind(R.id.swipeRefreshLayout)
SwipeRefreshLayout mSwipeRefreshLayout;
@Bind(R.id.gridRv)
RecyclerView mRecyclerGridList;
@OnClick(R.id.zipLoadBt)
void loadData(){
mSwipeRefreshLayout.setRefreshing(true);
unsubscribe();
mSubscription = Observable.zip(NetWorkService.getGankApi().getBeauties(200, 1).map(GankBeautyResultToItemsMapper.getInstance()),
NetWorkService.getZbApi().search("装逼"), new Func2<List<Image>, List<Image>, List<Image>>() {
@Override
public List<Image> call(List<Image> images1, List<Image> images2) {
List<Image> images = new ArrayList<Image>();
for(int i = 0; i < images1.size()/2 && i < images2.size(); i++){
images.add(images1.get(i * 2));
images.add(images1.get(i * 2 + 1));
images.add(images2.get(i));
}
return images;
}
})
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(mObserver);
}
private Observer<List<Image>> mObserver = new Observer<List<Image>>(){
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
mSwipeRefreshLayout.setRefreshing(false);
Toast.makeText(getActivity(), R.string.loading_failed, Toast.LENGTH_SHORT).show();
}
@Override
public void onNext(List<Image> images) {
mSwipeRefreshLayout.setRefreshing(false);
mAdapter.setImages(images);
}
};
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_zip, container, false);
ButterKnife.bind(this, view);
mRecyclerGridList.setLayoutManager(new GridLayoutManager(getActivity(), 2));
mRecyclerGridList.setAdapter(mAdapter);
mSwipeRefreshLayout.setColorSchemeColors(Color.BLUE, Color.RED, Color.GREEN, Color.YELLOW);
mSwipeRefreshLayout.setEnabled(false);
return view;
}
@Override
protected int getDialogTitleRes() {
return 0;
}
@Override
protected int getDialogViewRes() {
return 0;
}
}
|
[
"jiangchuna@126.com"
] |
jiangchuna@126.com
|
8b173ccef875d8b9cc8a82e6233c5462023ead2e
|
61f0a3924ce3433b178cf032a8cda24ddff3000b
|
/moduli-wp-neural/src/main/java/edu/tigers/sumatra/wp/neural/NeuralRobotPredictionData.java
|
beac575b5a3cfc273261c70b098d554d1d9666a0
|
[] |
no_license
|
orochigalois/ROBOCUP_SSL_EDU_PLATFORM
|
46e0e011baedea8e9f4643656a8319bf65208175
|
5e7b39559cf32d6682e3a78ace199d9df8ccf395
|
refs/heads/master
| 2021-07-16T08:08:36.893055
| 2017-10-21T03:20:27
| 2017-10-21T03:20:27
| 107,742,374
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,828
|
java
|
/*
* *********************************************************
* Copyright (c) 2017 智动天地(北京)科技有限公司
* All rights reserved.
* Project: 标准平台决策开发系统
* Authors:
* 智动天地(北京)科技有限公司
* *********************************************************
*/
package edu.tigers.sumatra.wp.neural;
import edu.tigers.sumatra.cam.data.CamRobot;
import edu.tigers.sumatra.ids.BotID;
import edu.tigers.sumatra.math.AVector2;
import edu.tigers.sumatra.math.IVector2;
public class NeuralRobotPredictionData implements INeuralPredicitonData
{
private long lastUpdate = 0;
private CamRobot lastData;
private IVector2 pos = AVector2.ZERO_VECTOR;
private IVector2 vel = AVector2.ZERO_VECTOR;
private IVector2 acc = AVector2.ZERO_VECTOR;
private double orient = 0;
private double orientVel = 0;
private double orientAcc = 0;
private BotID id;
public void update(final BotID id, final CamRobot cr, final long time,
final IVector2 pos, final IVector2 vel, final IVector2 acc, final double orient,
final double orientVel, final double orientAcc)
{
lastUpdate = time;
lastData = cr;
this.id = id;
this.pos = pos;
this.vel = vel;
this.acc = acc;
this.orient = orient;
this.orientVel = orientVel;
this.orientAcc = orientAcc;
}
public long getUpdateTimestamp()
{
return lastUpdate;
}
public CamRobot getLastData()
{
return lastData;
}
public IVector2 getPos()
{
return pos;
}
public IVector2 getVel()
{
return vel;
}
public IVector2 getAcc()
{
return acc;
}
public double getOrient()
{
return orient;
}
public double getOrientVel()
{
return orientVel;
}
public double getOrientAcc()
{
return orientAcc;
}
public BotID getId()
{
return id;
}
}
|
[
"fudanyinxin@gmail.com"
] |
fudanyinxin@gmail.com
|
7c78c98e60e5118f435c9a9a1a1edc6e105d5654
|
e9a1c617df2bc7744a3e890892f260c050a6ef30
|
/server/catgenome/src/main/java/com/epam/catgenome/controller/vo/ProjectVO.java
|
ac0b5add2eefcba86091d6262264887dd05a5f20
|
[
"MIT"
] |
permissive
|
XingGao-PKI/NGB
|
30ade1f2324fe30b4095e7ad1dd86c129f2306dd
|
2e15927ba31e74717ad49e3a2477622ee26fba09
|
refs/heads/develop
| 2023-05-07T22:08:56.843359
| 2021-05-27T10:36:12
| 2021-05-27T10:36:12
| 371,596,017
| 0
| 0
|
MIT
| 2021-05-28T06:00:08
| 2021-05-28T06:00:08
| null |
UTF-8
|
Java
| false
| false
| 3,825
|
java
|
/*
* MIT License
*
* Copyright (c) 2016 EPAM Systems
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.epam.catgenome.controller.vo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.epam.catgenome.entity.BiologicalDataItemFormat;
/**
* Source: ProjectVO
* Created: 22.01.16, 15:03
* Project: CATGenome Browser
* Make: IntelliJ IDEA 14.1.4, JDK 1.8
*
* <p>
* A View Object for Project entity representation
* </p>
*/
public class ProjectVO {
private Long id;
private String name;
private Long createdBy;
private Date createdDate;
private List<ProjectItemVO> items;
private Integer itemsCount;
private Map<BiologicalDataItemFormat, Integer> itemsCountPerFormat;
private Date lastOpenedDate;
private List<ProjectVO> nestedProjects;
private Long parentId;
private String prettyName;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public List<ProjectItemVO> getItems() {
return items;
}
public void setItems(List<ProjectItemVO> items) {
this.items = items;
}
public Integer getItemsCount() {
return itemsCount;
}
public void setItemsCount(Integer itemsCount) {
this.itemsCount = itemsCount;
}
public Map<BiologicalDataItemFormat, Integer> getItemsCountPerFormat() {
return itemsCountPerFormat;
}
public void setItemsCountPerFormat(Map<BiologicalDataItemFormat, Integer> itemsCountPerFormat) {
this.itemsCountPerFormat = itemsCountPerFormat;
}
public Date getLastOpenedDate() {
return lastOpenedDate;
}
public void setLastOpenedDate(Date lastOpenedDate) {
this.lastOpenedDate = lastOpenedDate;
}
public List<ProjectVO> getNestedProjects() {
return nestedProjects;
}
public void setNestedProjects(List<ProjectVO> nestedProjects) {
this.nestedProjects = nestedProjects;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public String getPrettyName() {
return prettyName;
}
public void setPrettyName(String prettyName) {
this.prettyName = prettyName;
}
}
|
[
"aleksandr_sidoruk@epam.com"
] |
aleksandr_sidoruk@epam.com
|
2e9c0676171d72fd3281f24a9f2cb408916bd2e8
|
91682c22fa06d64b6fff5008e86260297f28ce0b
|
/mobile-runescape-client/src/main/java/com/jagex/mobilesdk/payments/CategoryListRecyclerViewAdapter$2.java
|
37d8c954bd6d6fe5f4fff97e658ee3145552388e
|
[
"BSD-2-Clause"
] |
permissive
|
morscape/mors-desktop
|
a32b441b08605bd4cd16604dc3d1bc0b9da62ec9
|
230174cdfd2e409816c7699756f1a98e89c908d9
|
refs/heads/master
| 2023-02-06T15:35:04.524188
| 2020-12-27T22:00:22
| 2020-12-27T22:00:22
| 324,747,526
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,910
|
java
|
/*
* Decompiled with CFR 0.150.
*
* Could not load the following classes:
* android.graphics.Bitmap
* android.graphics.drawable.BitmapDrawable
* android.graphics.drawable.Drawable
* com.jagex.mobilesdk.payments.CategoryListRecyclerViewAdapter
* net.runelite.mapping.Implements
*/
package com.jagex.mobilesdk.payments;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import com.jagex.mobilesdk.common.comms.CommsResult;
import com.jagex.mobilesdk.payments.CategoryListRecyclerViewAdapter;
import com.jagex.mobilesdk.payments.CategoryListRecyclerViewAdapter$ViewHolder;
import com.jagex.mobilesdk.payments.comms.FetchImageComms$FetchImageCallback;
import net.runelite.mapping.Implements;
@Implements(value="CategoryListRecyclerViewAdapter$2")
class CategoryListRecyclerViewAdapter$2
implements FetchImageComms$FetchImageCallback {
final /* synthetic */ CategoryListRecyclerViewAdapter this$0;
final /* synthetic */ CategoryListRecyclerViewAdapter$ViewHolder val$holder;
CategoryListRecyclerViewAdapter$2(CategoryListRecyclerViewAdapter categoryListRecyclerViewAdapter, CategoryListRecyclerViewAdapter$ViewHolder categoryListRecyclerViewAdapter$ViewHolder) {
this.this$0 = categoryListRecyclerViewAdapter;
this.val$holder = categoryListRecyclerViewAdapter$ViewHolder;
}
@Override
public void onFetchImageResult(CommsResult commsResult, Exception exception) {
if (commsResult.responseCode == 200 && CategoryListRecyclerViewAdapter.access$300((CategoryListRecyclerViewAdapter)this.this$0) != null && commsResult != null) {
this.val$holder.categoryImage.setBackground((Drawable)new BitmapDrawable(CategoryListRecyclerViewAdapter.access$300((CategoryListRecyclerViewAdapter)this.this$0).getResources(), (Bitmap)commsResult.getResultValue()));
}
}
}
|
[
"lorenzo.vaccaro@hotmail.com"
] |
lorenzo.vaccaro@hotmail.com
|
b7a730523a17024b73786de957d0ce773750850a
|
ef44d044ff58ebc6c0052962b04b0130025a102b
|
/com.freevisiontech.fvmobile_source_from_JADX/sources/p010me/iwf/photopicker/entity/PhotoDirectory.java
|
c8877118a3ee889ecc603106ede0446f9a37befa
|
[] |
no_license
|
thedemoncat/FVShare
|
e610bac0f2dc394534ac0ccec86941ff523e2dfd
|
bd1e52defaec868f0d1f9b4f2039625c8ff3ee4a
|
refs/heads/master
| 2023-08-06T04:11:16.403943
| 2021-09-25T10:11:13
| 2021-09-25T10:11:13
| 410,232,121
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,161
|
java
|
package p010me.iwf.photopicker.entity;
import android.text.TextUtils;
import java.util.ArrayList;
import java.util.List;
import p010me.iwf.photopicker.utils.FileUtils;
/* renamed from: me.iwf.photopicker.entity.PhotoDirectory */
public class PhotoDirectory {
private String coverPath;
private long dateAdded;
/* renamed from: id */
private String f1208id;
private String name;
private List<Photo> photos = new ArrayList();
public boolean equals(Object o) {
boolean hasId;
boolean otherHasId;
if (this == o) {
return true;
}
if (!(o instanceof PhotoDirectory)) {
return false;
}
PhotoDirectory directory = (PhotoDirectory) o;
if (!TextUtils.isEmpty(this.f1208id)) {
hasId = true;
} else {
hasId = false;
}
if (!TextUtils.isEmpty(directory.f1208id)) {
otherHasId = true;
} else {
otherHasId = false;
}
if (!hasId || !otherHasId || !TextUtils.equals(this.f1208id, directory.f1208id)) {
return false;
}
return TextUtils.equals(this.name, directory.name);
}
public int hashCode() {
if (!TextUtils.isEmpty(this.f1208id)) {
int result = this.f1208id.hashCode();
if (!TextUtils.isEmpty(this.name)) {
return (result * 31) + this.name.hashCode();
}
return result;
} else if (TextUtils.isEmpty(this.name)) {
return 0;
} else {
return this.name.hashCode();
}
}
public String getId() {
return this.f1208id;
}
public void setId(String id) {
this.f1208id = id;
}
public String getCoverPath() {
return this.coverPath;
}
public void setCoverPath(String coverPath2) {
this.coverPath = coverPath2;
}
public String getName() {
return this.name;
}
public void setName(String name2) {
this.name = name2;
}
public long getDateAdded() {
return this.dateAdded;
}
public void setDateAdded(long dateAdded2) {
this.dateAdded = dateAdded2;
}
public List<Photo> getPhotos() {
return this.photos;
}
public void setPhotos(List<Photo> photos2) {
if (photos2 != null) {
int j = 0;
int num = photos2.size();
for (int i = 0; i < num; i++) {
Photo p = photos2.get(j);
if (p == null || !FileUtils.fileIsExists(p.getPath())) {
photos2.remove(j);
} else {
j++;
}
}
this.photos = photos2;
}
}
public List<String> getPhotoPaths() {
List<String> paths = new ArrayList<>(this.photos.size());
for (Photo photo : this.photos) {
paths.add(photo.getPath());
}
return paths;
}
public void addPhoto(int id, String path) {
if (FileUtils.fileIsExists(path)) {
this.photos.add(new Photo(id, path));
}
}
}
|
[
"nl.ruslan@yandex.ru"
] |
nl.ruslan@yandex.ru
|
9d49cc54ea411fa559580c8a1972c97091c6c3a9
|
2edbc7267d9a2431ee3b58fc19c4ec4eef900655
|
/AL-Game/src/com/aionemu/gameserver/model/autogroup/AutoEngulfedOphidanBridgeInstance.java
|
8f029bc7f5c167c61236d1809d4358b1e3ba636f
|
[] |
no_license
|
EmuZONE/Aion-Lightning-5.1
|
3c93b8bc5e63fd9205446c52be9b324193695089
|
f4cfc45f6aa66dfbfdaa6c0f140b1861bdcd13c5
|
refs/heads/master
| 2020-03-08T14:38:42.579437
| 2018-04-06T04:18:19
| 2018-04-06T04:18:19
| 128,191,634
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,925
|
java
|
/*
* This file is part of Encom. **ENCOM FUCK OTHER SVN**
*
* Encom is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Encom is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser Public License for more details.
*
* You should have received a copy of the GNU Lesser Public License
* along with Encom. If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.model.autogroup;
import java.util.List;
import static ch.lambdaj.Lambda.*;
import static org.hamcrest.Matchers.*;
import com.aionemu.gameserver.model.Race;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.model.instance.instancereward.EngulfedOphidanBridgeReward;
import com.aionemu.gameserver.model.team2.TeamType;
import com.aionemu.gameserver.model.team2.group.PlayerGroup;
import com.aionemu.gameserver.model.team2.group.PlayerGroupService;
import com.aionemu.gameserver.services.instance.EngulfedOphidanBridgeService;
/**
* @author Rinzler (Encom)
*/
public class AutoEngulfedOphidanBridgeInstance extends AutoInstance
{
@Override
public AGQuestion addPlayer(Player player, SearchInstance searchInstance) {
super.writeLock();
try {
if (!satisfyTime(searchInstance) || (players.size() >= agt.getPlayerSize())) {
return AGQuestion.FAILED;
}
EntryRequestType ert = searchInstance.getEntryRequestType();
List<AGPlayer> playersByRace = getAGPlayersByRace(player.getRace());
if (ert.isGroupEntry()) {
if (searchInstance.getMembers().size() + playersByRace.size() > 2) {
return AGQuestion.FAILED;
}
for (Player member : player.getPlayerGroup2().getOnlineMembers()) {
if (searchInstance.getMembers().contains(member.getObjectId())) {
players.put(member.getObjectId(), new AGPlayer(player));
}
}
} else {
if (playersByRace.size() >= 2) {
return AGQuestion.FAILED;
}
players.put(player.getObjectId(), new AGPlayer(player));
}
return instance != null ? AGQuestion.ADDED : (players.size() == agt.getPlayerSize() ? AGQuestion.READY : AGQuestion.ADDED);
}
finally {
super.writeUnlock();
}
}
@Override
public void onEnterInstance(Player player) {
super.onEnterInstance(player);
List<Player> playersByRace = getPlayersByRace(player.getRace());
playersByRace.remove(player);
if (playersByRace.size() == 1 && !playersByRace.get(0).isInGroup2()) {
PlayerGroup newGroup = PlayerGroupService.createGroup(playersByRace.get(0), player, TeamType.AUTO_GROUP);
int groupId = newGroup.getObjectId();
if (!instance.isRegistered(groupId)) {
instance.register(groupId);
}
} else if (!playersByRace.isEmpty() && playersByRace.get(0).isInGroup2()) {
PlayerGroupService.addPlayer(playersByRace.get(0).getPlayerGroup2(), player);
}
Integer object = player.getObjectId();
if (!instance.isRegistered(object)) {
instance.register(object);
}
}
@Override
public void onPressEnter(Player player) {
super.onPressEnter(player);
EngulfedOphidanBridgeService.getInstance().addCoolDown(player);
((EngulfedOphidanBridgeReward) instance.getInstanceHandler().getInstanceReward()).portToPosition(player);
}
@Override
public void onLeaveInstance(Player player) {
super.unregister(player);
PlayerGroupService.removePlayer(player);
}
private List<AGPlayer> getAGPlayersByRace(Race race) {
return select(players, having(on(AGPlayer.class).getRace(), equalTo(race)));
}
private List<Player> getPlayersByRace(Race race) {
return select(instance.getPlayersInside(), having(on(Player.class).getRace(), equalTo(race)));
}
}
|
[
"naxdevil@gmail.com"
] |
naxdevil@gmail.com
|
f3b8040690ad278104f69f5d345260333f8a48a2
|
43b6aa98e66e06711c018ea441abfbaf33bc7f38
|
/sources/android/support/p003v7/graphics/drawable/DrawableWrapper.java
|
4bc01833cb77112bd6efd6adcd1dccdee573ecd2
|
[] |
no_license
|
nagpalShaurya/tic-tac-toe
|
8d4c6c093f923d0d27419f8da2b8c50c4a3a78de
|
28cb820916a591ab5137df43343fee8fd0df9482
|
refs/heads/master
| 2020-07-06T23:51:50.683624
| 2019-08-21T09:41:55
| 2019-08-21T09:41:55
| 203,176,484
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,646
|
java
|
package android.support.p003v7.graphics.drawable;
import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.PorterDuff.Mode;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.Callback;
import android.support.annotation.RestrictTo;
import android.support.annotation.RestrictTo.Scope;
import android.support.p000v4.graphics.drawable.DrawableCompat;
@RestrictTo({Scope.LIBRARY_GROUP})
/* renamed from: android.support.v7.graphics.drawable.DrawableWrapper */
public class DrawableWrapper extends Drawable implements Callback {
private Drawable mDrawable;
public DrawableWrapper(Drawable drawable) {
setWrappedDrawable(drawable);
}
public void draw(Canvas canvas) {
this.mDrawable.draw(canvas);
}
/* access modifiers changed from: protected */
public void onBoundsChange(Rect bounds) {
this.mDrawable.setBounds(bounds);
}
public void setChangingConfigurations(int configs) {
this.mDrawable.setChangingConfigurations(configs);
}
public int getChangingConfigurations() {
return this.mDrawable.getChangingConfigurations();
}
public void setDither(boolean dither) {
this.mDrawable.setDither(dither);
}
public void setFilterBitmap(boolean filter) {
this.mDrawable.setFilterBitmap(filter);
}
public void setAlpha(int alpha) {
this.mDrawable.setAlpha(alpha);
}
public void setColorFilter(ColorFilter cf) {
this.mDrawable.setColorFilter(cf);
}
public boolean isStateful() {
return this.mDrawable.isStateful();
}
public boolean setState(int[] stateSet) {
return this.mDrawable.setState(stateSet);
}
public int[] getState() {
return this.mDrawable.getState();
}
public void jumpToCurrentState() {
DrawableCompat.jumpToCurrentState(this.mDrawable);
}
public Drawable getCurrent() {
return this.mDrawable.getCurrent();
}
public boolean setVisible(boolean visible, boolean restart) {
return super.setVisible(visible, restart) || this.mDrawable.setVisible(visible, restart);
}
public int getOpacity() {
return this.mDrawable.getOpacity();
}
public Region getTransparentRegion() {
return this.mDrawable.getTransparentRegion();
}
public int getIntrinsicWidth() {
return this.mDrawable.getIntrinsicWidth();
}
public int getIntrinsicHeight() {
return this.mDrawable.getIntrinsicHeight();
}
public int getMinimumWidth() {
return this.mDrawable.getMinimumWidth();
}
public int getMinimumHeight() {
return this.mDrawable.getMinimumHeight();
}
public boolean getPadding(Rect padding) {
return this.mDrawable.getPadding(padding);
}
public void invalidateDrawable(Drawable who) {
invalidateSelf();
}
public void scheduleDrawable(Drawable who, Runnable what, long when) {
scheduleSelf(what, when);
}
public void unscheduleDrawable(Drawable who, Runnable what) {
unscheduleSelf(what);
}
/* access modifiers changed from: protected */
public boolean onLevelChange(int level) {
return this.mDrawable.setLevel(level);
}
public void setAutoMirrored(boolean mirrored) {
DrawableCompat.setAutoMirrored(this.mDrawable, mirrored);
}
public boolean isAutoMirrored() {
return DrawableCompat.isAutoMirrored(this.mDrawable);
}
public void setTint(int tint) {
DrawableCompat.setTint(this.mDrawable, tint);
}
public void setTintList(ColorStateList tint) {
DrawableCompat.setTintList(this.mDrawable, tint);
}
public void setTintMode(Mode tintMode) {
DrawableCompat.setTintMode(this.mDrawable, tintMode);
}
public void setHotspot(float x, float y) {
DrawableCompat.setHotspot(this.mDrawable, x, y);
}
public void setHotspotBounds(int left, int top, int right, int bottom) {
DrawableCompat.setHotspotBounds(this.mDrawable, left, top, right, bottom);
}
public Drawable getWrappedDrawable() {
return this.mDrawable;
}
public void setWrappedDrawable(Drawable drawable) {
Drawable drawable2 = this.mDrawable;
if (drawable2 != null) {
drawable2.setCallback(null);
}
this.mDrawable = drawable;
if (drawable != null) {
drawable.setCallback(this);
}
}
}
|
[
"shauryanagpal1998@gmail.com"
] |
shauryanagpal1998@gmail.com
|
853ad80098a3655c77b2631420edcf6c8ca0e49c
|
e635fb4ec1a29afd113145531e661eb644ea84ce
|
/inference-framework/checker-framework/checkers/inference-tests/swift/src/webil/runtime/client/WilService.java
|
0f859fbf5fa1155071e6c56a130ca761a9b42470
|
[] |
no_license
|
flankerhqd/type-inference
|
82f4538db3dd46021403cd3867faab2ee09aa6e3
|
437af6525c050bb6689d8626e696d14cb6742cbf
|
refs/heads/master
| 2016-08-04T00:38:21.756067
| 2015-05-04T03:10:56
| 2015-05-04T03:10:56
| 35,372,790
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 515
|
java
|
package webil.runtime.client;
import webil.runtime.common.ExtendedClosure;
import webil.runtime.common.ObjectID;
import webil.runtime.common.WilServiceException;
import com.google.gwt.user.client.rpc.RemoteService;
/**
* GWT remote service RPC interface for WebIL's runtime.
*/
public interface WilService extends RemoteService {
public ExtendedClosure getClosure(ExtendedClosure closure) throws WilServiceException;
public ObjectID getClientPrincipal(int subSession) throws WilServiceException;
}
|
[
"dongyao83@gmail.com@e039eaa7-eea3-5927-096b-721137851c37"
] |
dongyao83@gmail.com@e039eaa7-eea3-5927-096b-721137851c37
|
9da96e05be51bff0edb8954544f87f3e5e3a7c3e
|
60396b0de6562a3bf63b5b2d3a9915ec2bc35688
|
/src/com/esup/module/ProductsModule.java
|
b0069736d07ccf8237d79ceb61a3fc775b0088da
|
[] |
no_license
|
howe/interface
|
ca330145b4331dd3f22d2bdb17bf005160098085
|
84d5e1fae13cbe00deb8b4dd548ce478d6461a1a
|
refs/heads/master
| 2020-06-04T09:00:48.381606
| 2012-09-14T08:03:56
| 2012-09-14T08:03:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,570
|
java
|
package com.esup.module;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.nutz.dao.pager.Pager;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Param;
import org.nutz.service.EntityService;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import com.esup.bean.Products;
@At("/Products")
@IocBean(fields={"dao"})
public class ProductsModule extends EntityService<Products>{
private static final Log log = Logs.get();
@At
public Object list(@Param("page") int page ,@Param("rows") int rows){
if (rows < 1)
rows = 10;
Pager pager = dao().createPager(page, rows);
List<Products> list = dao().query(Products.class, null, pager);
Map<String, Object> map = new HashMap<String, Object>();
if (pager != null) {
pager.setRecordCount(dao().count(Products.class));
map.put("pager", pager);
}
map.put("list", list);
return map;
}
@At
public boolean add(@Param("..") Products obj){
try{
dao().insert(obj);
return true;
}catch (Throwable e) {
if (log.isDebugEnabled())
log.debug("E!!",e);
return false;
}
}
@At
public boolean delete(@Param("..") Products obj){
try{
dao().delete(obj);
return true;
}catch (Throwable e) {
if (log.isDebugEnabled())
log.debug("E!!",e);
return false;
}
}
@At
public boolean update(@Param("..") Products obj){
try{
dao().update(obj);
return true;
}catch (Throwable e) {
if (log.isDebugEnabled())
log.debug("E!!",e);
return false;
}
}
}
|
[
"howechiang@gmail.com"
] |
howechiang@gmail.com
|
04bcd624762a9e2325874d0630df1a85cd0a703d
|
e70abc02efbb8a7637eb3655f287b0a409cfa23b
|
/hyjf-admin/src/main/java/com/hyjf/admin/manager/borrow/batchcenter/batchborrowrepay/BatchBorrowRepayDefine.java
|
b47e0ea3f2c2544eb945b7c0fcb1cc6d98b83f3e
|
[] |
no_license
|
WangYouzheng1994/hyjf
|
ecb221560460e30439f6915574251266c1a49042
|
6cbc76c109675bb1f120737f29a786fea69852fc
|
refs/heads/master
| 2023-05-12T03:29:02.563411
| 2020-05-19T13:49:56
| 2020-05-19T13:49:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,812
|
java
|
package com.hyjf.admin.manager.borrow.batchcenter.batchborrowrepay;
import com.hyjf.admin.BaseDefine;
import com.hyjf.common.util.ShiroConstants;
import com.hyjf.common.util.StringPool;
public class BatchBorrowRepayDefine extends BaseDefine {
/** 权限 CONTROLLOR @RequestMapping值 */
public static final String REQUEST_MAPPING = "/manager/borrow/batchcenter/batchborrowrepay";
/** 列表画面 路径 */
public static final String LIST_PATH = "manager/borrow/batchcenter/borrowrepay/batchborrowrepay";
/** 列表画面 @RequestMapping值 */
public static final String INIT = "init";
/** 迁移到详细画面 @RequestMapping值 */
public static final String INFO_ACTION = "infoAction";
/** 检索数据 @RequestMapping值 */
public static final String SEARCH_ACTION = "searchAction";
/** 导出数据 @RequestMapping值 */
public static final String EXPORT_ACTION = "exportAction";
/** FROM */
public static final String BORROW_FORM = "form";
/** 查看权限 */
public static final String PERMISSIONS = "batchborrowrepay";
/** 查看权限 */
public static final String PERMISSIONS_VIEW = PERMISSIONS + StringPool.COLON + ShiroConstants.PERMISSION_VIEW;
/** 检索权限 */
public static final String PERMISSIONS_SEARCH = PERMISSIONS + StringPool.COLON + ShiroConstants.PERMISSION_SEARCH;
/** 导出权限 */
public static final String PERMISSIONS_EXPORT = PERMISSIONS + StringPool.COLON + ShiroConstants.PERMISSION_EXPORT;
public static final String QUERY_BATCH_DETAILS_ACTION = "queryBatchDetailClkAction";
public static final String PERMISSIONS_QUERY_BATCH_DETAILS = PERMISSIONS + StringPool.COLON + ShiroConstants.PERMISSION_QUERY_BATCHDETAIL;
public static final String QUERY_BATCH_DETAILS_PATH = "manager/borrow/batchcenter/borrowrepay/queryBatchDetails";
}
|
[
"heshuying@hyjf.com"
] |
heshuying@hyjf.com
|
d857e7695d7e64cd3a22f7b1a7dbd6fb2aacd94e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/19/19_e9277875d940ba5a06408b0e35f073755c07b1f0/AtomQueryItemServiceImpl/19_e9277875d940ba5a06408b0e35f073755c07b1f0_AtomQueryItemServiceImpl_t.java
|
da6bfea58fb13ec661a20142391f8385f1e3faeb
|
[] |
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,723
|
java
|
package com.abudko.reseller.huuto.query.service.item.atom;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import com.abudko.reseller.huuto.query.service.item.AbstractQueryItemService;
import com.abudko.reseller.huuto.query.service.item.ItemResponse;
import com.sun.syndication.feed.atom.Feed;
@Component
public class AtomQueryItemServiceImpl extends AbstractQueryItemService {
private static final String API_HOST = "http://api.huuto.net/somt/0.9/items/";
@Autowired
@Qualifier("restTemplateAtom")
private RestTemplate restTemplate;
@Autowired
private AtomXmlItemParser atomXmlItemParser;
@Override
public ItemResponse callAndParse(String urlSuffix) {
String itemUrl = constructFullItemUrl(urlSuffix);
log.info(String.format("Quering item: %s", itemUrl));
Feed atomXmlResponse = restTemplate.getForObject(itemUrl, Feed.class);
ItemResponse itemResponse = atomXmlItemParser.parse(atomXmlResponse);
itemResponse.setItemUrl(itemUrl);
return itemResponse;
}
private String constructFullItemUrl(String urlSuffix) {
String id = extractIdFromUrl(urlSuffix);
StringBuilder sb = new StringBuilder(API_HOST);
sb.append(id);
return sb.toString();
}
protected String extractIdFromUrl(String urlSuffix) {
int index = urlSuffix.lastIndexOf("/");
return urlSuffix.substring(index + 1);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
9e5f44cde16eb44a088bb76e31a3156d378692aa
|
1f742409cbab86f55d310ab282359fccf5f907c0
|
/day16/Client.java
|
02bc5b294d62347348fe777e06e98b486bcf6738
|
[] |
no_license
|
sriramselvaraj21/Java
|
fc675550a4476b9e5975c69db7218253ae920897
|
6b9df408fcc439308148c54a5b4cad55adafe5af
|
refs/heads/main
| 2023-04-25T10:48:30.105298
| 2021-04-27T05:35:35
| 2021-04-27T05:35:35
| 353,292,828
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 885
|
java
|
package day16;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
public class Client {
ServerSocket ss;
Socket s;
PrintWriter out;
BufferedReader br, in;
public Client() {
try {
while (true) {
s = new Socket("localhost", 2000);
br = new BufferedReader(new InputStreamReader(s.getInputStream()));
String msgFromServer = br.readLine();
System.out.println("Message From Server...:" + msgFromServer);
out = new PrintWriter(s.getOutputStream(), true);
in = new BufferedReader(new InputStreamReader(System.in));
System.out.println("please enter a message for Server...:");
String msg = in.readLine();
out.println(msg);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
new Client();
}
}
|
[
"Sriram.Selvaraj@gds.ey.com"
] |
Sriram.Selvaraj@gds.ey.com
|
23b287291e91a1aa19c49fe18baf01f1e6bef805
|
fe94bb01bbaf452ab1752cb3c1d1e4ecf297b9be
|
/src/main/java/com/opencart/entity/OcProductToStoreId.java
|
7f9fed533cdebf2b7e94a39898e4a40463667a35
|
[] |
no_license
|
gmai2006/opencart
|
9d3b037f09294973112bafbadd22d5edd8457de5
|
dba44adabf4b8eab3bdb07062c887ba0a2a5405f
|
refs/heads/master
| 2020-12-31T06:13:33.113098
| 2018-01-24T07:35:45
| 2018-01-24T07:35:45
| 80,637,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 850
|
java
|
package com.opencart.entity;
import java.util.*;
import javax.persistence.*;
import java.io.Serializable;
/**
This class is auto generated from database schema
*/
public class OcProductToStoreId implements Serializable {
@Column(name="store_id")
private Integer store_id;
@Column(name="product_id")
private Integer product_id;
public OcProductToStoreId() {
// Your class must have a no-arq constructor
}
public void setStoreId( Integer value) {
this.store_id = value;
}
public void setProductId( Integer value) {
this.product_id = value;
}
public Integer getStoreId() {
return this.store_id;
}
public Integer getProductId() {
return this.product_id;
}
@Override
public int hashCode() {
return store_id.hashCode()
+ product_id.hashCode();
}
}
|
[
"gmai2006@gmail.com"
] |
gmai2006@gmail.com
|
eedd6ff534ac7dd32d8582c3a1111b7ba0f232b9
|
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
|
/aliyun-java-sdk-dataworks-public/src/main/java/com/aliyuncs/dataworks_public/model/v20200518/DeleteTableThemeResponse.java
|
6970101513ebc1fe04152d26c8c26b1292327f62
|
[
"Apache-2.0"
] |
permissive
|
caojiele/aliyun-openapi-java-sdk
|
b6367cc95469ac32249c3d9c119474bf76fe6db2
|
ecc1c949681276b3eed2500ec230637b039771b8
|
refs/heads/master
| 2023-06-02T02:30:02.232397
| 2021-06-18T04:08:36
| 2021-06-18T04:08:36
| 172,076,930
| 0
| 0
|
NOASSERTION
| 2019-02-22T14:08:29
| 2019-02-22T14:08:29
| null |
UTF-8
|
Java
| false
| false
| 2,295
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.dataworks_public.model.v20200518;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.dataworks_public.transform.v20200518.DeleteTableThemeResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class DeleteTableThemeResponse extends AcsResponse {
private String requestId;
private String errorCode;
private String errorMessage;
private Integer httpStatusCode;
private Boolean success;
private Boolean deleteResult;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getErrorCode() {
return this.errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public String getErrorMessage() {
return this.errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public Integer getHttpStatusCode() {
return this.httpStatusCode;
}
public void setHttpStatusCode(Integer httpStatusCode) {
this.httpStatusCode = httpStatusCode;
}
public Boolean getSuccess() {
return this.success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public Boolean getDeleteResult() {
return this.deleteResult;
}
public void setDeleteResult(Boolean deleteResult) {
this.deleteResult = deleteResult;
}
@Override
public DeleteTableThemeResponse getInstance(UnmarshallerContext context) {
return DeleteTableThemeResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
76f844bd20d48628f4691f4ef9e520aff22a27ba
|
ee461488c62d86f729eda976b421ac75a964114c
|
/trunk/flash/src/main/java/org/apache/flex/forks/batik/ext/awt/image/rendered/RenderedImageCachableRed.java
|
59e16dff03b73c89beb2de1928ea21c24a45a506
|
[] |
no_license
|
svn2github/htmlunit
|
2c56f7abbd412e6d9e0efd0934fcd1277090af74
|
6fc1a7d70c08fb50fef1800673671fd9cada4899
|
refs/heads/master
| 2023-09-03T10:35:41.987099
| 2015-07-26T13:12:45
| 2015-07-26T13:12:45
| 37,107,064
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,090
|
java
|
/*
Copyright 2001,2003 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.apache.flex.forks.batik.ext.awt.image.rendered;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.Raster;
import java.awt.image.RenderedImage;
import java.awt.image.SampleModel;
import java.awt.image.WritableRaster;
import java.util.Vector;
/**
* This implements CachableRed around a RenderedImage.
* You can use this to wrap a RenderedImage that you want to
* appear as a CachableRed.
* It essentially ignores the dependency and dirty region methods.
*
* @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
* @version $Id$ */
public class RenderedImageCachableRed implements CachableRed {
public static CachableRed wrap(RenderedImage ri) {
if (ri instanceof CachableRed)
return (CachableRed) ri;
if (ri instanceof BufferedImage)
return new BufferedImageCachableRed((BufferedImage)ri);
return new RenderedImageCachableRed(ri);
}
private RenderedImage src;
private Vector srcs = new Vector(0);
public RenderedImageCachableRed(RenderedImage src) {
if(src == null){
throw new IllegalArgumentException();
}
this.src = src;
}
public Vector getSources() {
return srcs; // should always be empty...
}
public Rectangle getBounds() {
return new Rectangle(getMinX(),
getMinY(),
getWidth(),
getHeight());
}
public int getMinX() {
return src.getMinX();
}
public int getMinY() {
return src.getMinY();
}
public int getWidth() {
return src.getWidth();
}
public int getHeight() {
return src.getHeight();
}
public ColorModel getColorModel() {
return src.getColorModel();
}
public SampleModel getSampleModel() {
return src.getSampleModel();
}
public int getMinTileX() {
return src.getMinTileX();
}
public int getMinTileY() {
return src.getMinTileY();
}
public int getNumXTiles() {
return src.getNumXTiles();
}
public int getNumYTiles() {
return src.getNumYTiles();
}
public int getTileGridXOffset() {
return src.getTileGridXOffset();
}
public int getTileGridYOffset() {
return src.getTileGridYOffset();
}
public int getTileWidth() {
return src.getTileWidth();
}
public int getTileHeight() {
return src.getTileHeight();
}
public Object getProperty(String name) {
return src.getProperty(name);
}
public String[] getPropertyNames() {
return src.getPropertyNames();
}
public Raster getTile(int tileX, int tileY) {
return src.getTile(tileX, tileY);
}
public WritableRaster copyData(WritableRaster raster) {
return src.copyData(raster);
}
public Raster getData() {
return src.getData();
}
public Raster getData(Rectangle rect) {
return src.getData(rect);
}
public Shape getDependencyRegion(int srcIndex, Rectangle outputRgn) {
throw new IndexOutOfBoundsException
("Nonexistant source requested.");
}
public Shape getDirtyRegion(int srcIndex, Rectangle inputRgn) {
throw new IndexOutOfBoundsException
("Nonexistant source requested.");
}
}
|
[
"asashour@5f5364db-9458-4db8-a492-e30667be6df6"
] |
asashour@5f5364db-9458-4db8-a492-e30667be6df6
|
f391bb37416484fb42dd25f20606a82be93aa945
|
3343050b340a8594d802598cddfd0d8709ccc45a
|
/src/share/classes/sun/tracing/dtrace/DTraceProbe.java
|
eedd5d44f54538188763e359b8644599e55e8b0d
|
[
"Apache-2.0"
] |
permissive
|
lcyanxi/jdk8
|
be07ce687ca610c9e543bf3c1168be8228c1f2b3
|
4f4c2d72670a30dafaf9bb09b908d4da79119cf6
|
refs/heads/master
| 2022-05-25T18:11:28.236578
| 2022-05-03T15:28:01
| 2022-05-03T15:28:01
| 228,209,646
| 0
| 0
|
Apache-2.0
| 2022-05-03T15:28:03
| 2019-12-15T15:49:24
|
Java
|
UTF-8
|
Java
| false
| false
| 2,761
|
java
|
/*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.tracing.dtrace;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import sun.tracing.ProbeSkeleton;
class DTraceProbe extends ProbeSkeleton {
private Object proxy;
private Method declared_method;
private Method implementing_method;
DTraceProbe(Object proxy, Method m) {
super(m.getParameterTypes());
this.proxy = proxy;
this.declared_method = m;
try {
// The JVM will override the proxy method's implementation with
// a version that will invoke the probe.
this.implementing_method = proxy.getClass().getMethod(
m.getName(), m.getParameterTypes());
} catch (NoSuchMethodException e) {
throw new RuntimeException("Internal error, wrong proxy class");
}
}
public boolean isEnabled() {
return JVM.isEnabled(implementing_method);
}
public void uncheckedTrigger(Object[] args) {
try {
implementing_method.invoke(proxy, args);
} catch (IllegalAccessException e) {
assert false;
} catch (InvocationTargetException e) {
assert false;
}
}
String getProbeName() {
return DTraceProvider.getProbeName(declared_method);
}
String getFunctionName() {
return DTraceProvider.getFunctionName(declared_method);
}
Method getMethod() {
return implementing_method;
}
Class<?>[] getParameterTypes() {
return this.parameters;
}
}
|
[
"2757710657@qq.com"
] |
2757710657@qq.com
|
601263bf0dab931da6872d1e8cde2eda5bf124d6
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_5690574640250880_1/java/Bench/MinesweeperMaster.java
|
380b37148acb1651a6e0ecd10a79f5d9dd2534f9
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,260
|
java
|
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class MinesweeperMaster {
public static void main(String[] args) {
Scanner scanner = null;
try {
scanner = new Scanner(new File("input.txt"));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
int T = scanner.nextInt();
FileWriter writer = null;
try {
writer = new FileWriter(new File("output.txt"));
} catch (IOException e1) {
e1.printStackTrace();
}
for (int trial = 1; trial <= T; trial++) {
try {
writer.write("Case #" + trial + ":\n");
} catch (IOException e1) {
e1.printStackTrace();
}
try {
solveTrial(scanner, writer);
} catch (IOException e) {
e.printStackTrace();
}
/*
* try { writer.write("\n"); } catch (IOException e) {
* e.printStackTrace(); }
*/
}
try {
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
scanner.close();
}
static void solveTrial(Scanner scanner, FileWriter writer)
throws IOException {
int R = scanner.nextInt(); // num rows
int C = scanner.nextInt(); // num columns
int M = scanner.nextInt(); // num bombs
int X = R * C - M;
if (X == 0) {
writer.write("Impossible\n");
return;
}
if (X == 1) // special case where everything but one is a bomb
{
for (int i = 0; i < R - 1; i++) {
for (int b = 0; b < C; b++)
writer.write('*');
writer.write('\n');
}
for (int b = 0; b < C - 1; b++)
writer.write('*');
writer.write("c\n");
return;
} else if (R == 1 || C == 1) {
for (int i = 0; i < R; i++) {
for (int b = 0; b < C; b++) {
if (i * C + b + 1 <= M)
writer.write('*');
else if (i == R - 1 && b == C - 1)
writer.write('c');
else
writer.write('.');
}
writer.write('\n');
}
return;
} else if (X < 4) {
writer.write("Impossible\n");
return;
} else if (X <= 2 * C) {
if (X % 2 == 0) // if there are an even number
{
for (int i = 0; i < R - 2; i++) {
for (int b = 0; b < C; b++)
writer.write('*');
writer.write('\n');
}
for (int i = 0; i < 2; i++) {
for (int b = 0; b < X / 2; b++) {
if (i == 1 && b == 0)
writer.write('c');
else
writer.write('.');
}
for (int b = X / 2; b < C; b++) {
writer.write('*');
}
writer.write('\n');
}
return;
} else { // if there are an odd number
if (R < 3 || C < 3 || X < 9) {
writer.write("Impossible\n");
return;
} else {
for (int i = 0; i < R - 3; i++) {
for (int b = 0; b < C; b++)
writer.write('*');
writer.write('\n');
}
writer.write("...");
for (int i = 0; i < C - 3; i++)
writer.write('*');
writer.write('\n');
for (int i = 0; i < 2; i++) {
for (int b = 0; b < (X - 3) / 2; b++) {
if (i == 1 && b == 0)
writer.write('c');
else
writer.write('.');
}
for (int b = (X - 3) / 2; b < C; b++)
writer.write('*');
writer.write('\n');
}
}
}
return;
} else if (X % C == 1) {
// need at least 4 columns to have an offset of 1
if (C < 3 || X < 9) {
writer.write("Impossible\n");
return;
}
if (X / C >= 3) {
for (int i = 0; i < R - (X / C + 1); i++) {
for (int b = 0; b < C; b++)
writer.write('*');
writer.write('\n');
}
writer.write("..");
for (int i = 0; i < C - 2; i++)
writer.write('*');
writer.write("\nc");
for (int i = 1; i < C - 1; i++)
writer.write('.');
writer.write("*\n");
for (int i = 0; i < X / C + 1 - 2; i++) {
for (int b = 0; b < C; b++)
writer.write('.');
writer.write('\n');
}
return;
} else {
for (int i = 0; i < R - (X / C + 1); i++) {
for (int b = 0; b < C; b++)
writer.write('*');
writer.write('\n');
}
writer.write("...");
for (int i = 0; i < C - 3; i++)
writer.write('*');
writer.write('\n');
for (int i = 0; i < 2; i++) {
for (int b = 0; b < C - 1; b++) {
if (i == 1 && b == 0)
writer.write('c');
else
writer.write('.');
}
writer.write("*\n");
}
for (int i = 0; i < X / C + 1 - 3; i++) {
for (int b = 0; b < C; b++)
writer.write('.');
writer.write('\n');
}
return;
}
} else {
for (int i = 0; i < R - (X / C + 1); i++) {
for (int b = 0; b < C; b++)
writer.write('*');
writer.write('\n');
}
if (X % C != 0) {
for (int i = 0; i < X % C; i++)
writer.write('.');
for (int i = X % C; i < C; i++)
writer.write('*');
writer.write('\n');
} else if (M != 0) {
for (int i = 0; i < C; i++)
writer.write('*');
writer.write('\n');
}
for (int i = 0; i < X / C; i++) {
for (int b = 0; b < C; b++) {
if (i == 1 && b == 0)
writer.write('c');
else
writer.write('.');
}
writer.write('\n');
}
return;
}
}
}
|
[
"eewestman@gmail.com"
] |
eewestman@gmail.com
|
c351cb8b61fd2c2b4d745e4295cf998b377817ac
|
816e53ced1f741006ed5dd568365aba0ec03f0cf
|
/TeamBattle/temp/src/minecraft/net/minecraft/scoreboard/ServerScoreboard.java
|
816a275f22f5066fc338b63f8f045671375c9a51
|
[] |
no_license
|
TeamBattleClient/TeamBattleRemake
|
ad4eb8379ebc673ef1e58d0f2c1a34e900bd85fe
|
859afd1ff2cd7527abedfbfe0b3d1dae09d5cbbc
|
refs/heads/master
| 2021-03-12T19:41:51.521287
| 2015-03-08T21:34:32
| 2015-03-08T21:34:32
| 31,624,440
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,111
|
java
|
package net.minecraft.scoreboard;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S3BPacketScoreboardObjective;
import net.minecraft.network.play.server.S3CPacketUpdateScore;
import net.minecraft.network.play.server.S3DPacketDisplayScoreboard;
import net.minecraft.network.play.server.S3EPacketTeams;
import net.minecraft.scoreboard.Score;
import net.minecraft.scoreboard.ScoreObjective;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Scoreboard;
import net.minecraft.scoreboard.ScoreboardSaveData;
import net.minecraft.server.MinecraftServer;
public class ServerScoreboard extends Scoreboard {
private final MinecraftServer field_96555_a;
private final Set field_96553_b = new HashSet();
private ScoreboardSaveData field_96554_c;
private static final String __OBFID = "CL_00001424";
public ServerScoreboard(MinecraftServer p_i1501_1_) {
this.field_96555_a = p_i1501_1_;
}
public void func_96536_a(Score p_96536_1_) {
super.func_96536_a(p_96536_1_);
if(this.field_96553_b.contains(p_96536_1_.func_96645_d())) {
this.field_96555_a.func_71203_ab().func_148540_a(new S3CPacketUpdateScore(p_96536_1_, 0));
}
this.func_96551_b();
}
public void func_96516_a(String p_96516_1_) {
super.func_96516_a(p_96516_1_);
this.field_96555_a.func_71203_ab().func_148540_a(new S3CPacketUpdateScore(p_96516_1_));
this.func_96551_b();
}
public void func_96530_a(int p_96530_1_, ScoreObjective p_96530_2_) {
ScoreObjective var3 = this.func_96539_a(p_96530_1_);
super.func_96530_a(p_96530_1_, p_96530_2_);
if(var3 != p_96530_2_ && var3 != null) {
if(this.func_96552_h(var3) > 0) {
this.field_96555_a.func_71203_ab().func_148540_a(new S3DPacketDisplayScoreboard(p_96530_1_, p_96530_2_));
} else {
this.func_96546_g(var3);
}
}
if(p_96530_2_ != null) {
if(this.field_96553_b.contains(p_96530_2_)) {
this.field_96555_a.func_71203_ab().func_148540_a(new S3DPacketDisplayScoreboard(p_96530_1_, p_96530_2_));
} else {
this.func_96549_e(p_96530_2_);
}
}
this.func_96551_b();
}
public boolean func_151392_a(String p_151392_1_, String p_151392_2_) {
if(super.func_151392_a(p_151392_1_, p_151392_2_)) {
ScorePlayerTeam var3 = this.func_96508_e(p_151392_2_);
this.field_96555_a.func_71203_ab().func_148540_a(new S3EPacketTeams(var3, Arrays.asList(new String[]{p_151392_1_}), 3));
this.func_96551_b();
return true;
} else {
return false;
}
}
public void func_96512_b(String p_96512_1_, ScorePlayerTeam p_96512_2_) {
super.func_96512_b(p_96512_1_, p_96512_2_);
this.field_96555_a.func_71203_ab().func_148540_a(new S3EPacketTeams(p_96512_2_, Arrays.asList(new String[]{p_96512_1_}), 4));
this.func_96551_b();
}
public void func_96522_a(ScoreObjective p_96522_1_) {
super.func_96522_a(p_96522_1_);
this.func_96551_b();
}
public void func_96532_b(ScoreObjective p_96532_1_) {
super.func_96532_b(p_96532_1_);
if(this.field_96553_b.contains(p_96532_1_)) {
this.field_96555_a.func_71203_ab().func_148540_a(new S3BPacketScoreboardObjective(p_96532_1_, 2));
}
this.func_96551_b();
}
public void func_96533_c(ScoreObjective p_96533_1_) {
super.func_96533_c(p_96533_1_);
if(this.field_96553_b.contains(p_96533_1_)) {
this.func_96546_g(p_96533_1_);
}
this.func_96551_b();
}
public void func_96523_a(ScorePlayerTeam p_96523_1_) {
super.func_96523_a(p_96523_1_);
this.field_96555_a.func_71203_ab().func_148540_a(new S3EPacketTeams(p_96523_1_, 0));
this.func_96551_b();
}
public void func_96538_b(ScorePlayerTeam p_96538_1_) {
super.func_96538_b(p_96538_1_);
this.field_96555_a.func_71203_ab().func_148540_a(new S3EPacketTeams(p_96538_1_, 2));
this.func_96551_b();
}
public void func_96513_c(ScorePlayerTeam p_96513_1_) {
super.func_96513_c(p_96513_1_);
this.field_96555_a.func_71203_ab().func_148540_a(new S3EPacketTeams(p_96513_1_, 1));
this.func_96551_b();
}
public void func_96547_a(ScoreboardSaveData p_96547_1_) {
this.field_96554_c = p_96547_1_;
}
protected void func_96551_b() {
if(this.field_96554_c != null) {
this.field_96554_c.func_76185_a();
}
}
public List func_96550_d(ScoreObjective p_96550_1_) {
ArrayList var2 = new ArrayList();
var2.add(new S3BPacketScoreboardObjective(p_96550_1_, 0));
for(int var3 = 0; var3 < 3; ++var3) {
if(this.func_96539_a(var3) == p_96550_1_) {
var2.add(new S3DPacketDisplayScoreboard(var3, p_96550_1_));
}
}
Iterator var5 = this.func_96534_i(p_96550_1_).iterator();
while(var5.hasNext()) {
Score var4 = (Score)var5.next();
var2.add(new S3CPacketUpdateScore(var4, 0));
}
return var2;
}
public void func_96549_e(ScoreObjective p_96549_1_) {
List var2 = this.func_96550_d(p_96549_1_);
Iterator var3 = this.field_96555_a.func_71203_ab().field_72404_b.iterator();
while(var3.hasNext()) {
EntityPlayerMP var4 = (EntityPlayerMP)var3.next();
Iterator var5 = var2.iterator();
while(var5.hasNext()) {
Packet var6 = (Packet)var5.next();
var4.field_71135_a.func_147359_a(var6);
}
}
this.field_96553_b.add(p_96549_1_);
}
public List func_96548_f(ScoreObjective p_96548_1_) {
ArrayList var2 = new ArrayList();
var2.add(new S3BPacketScoreboardObjective(p_96548_1_, 1));
for(int var3 = 0; var3 < 3; ++var3) {
if(this.func_96539_a(var3) == p_96548_1_) {
var2.add(new S3DPacketDisplayScoreboard(var3, p_96548_1_));
}
}
return var2;
}
public void func_96546_g(ScoreObjective p_96546_1_) {
List var2 = this.func_96548_f(p_96546_1_);
Iterator var3 = this.field_96555_a.func_71203_ab().field_72404_b.iterator();
while(var3.hasNext()) {
EntityPlayerMP var4 = (EntityPlayerMP)var3.next();
Iterator var5 = var2.iterator();
while(var5.hasNext()) {
Packet var6 = (Packet)var5.next();
var4.field_71135_a.func_147359_a(var6);
}
}
this.field_96553_b.remove(p_96546_1_);
}
public int func_96552_h(ScoreObjective p_96552_1_) {
int var2 = 0;
for(int var3 = 0; var3 < 3; ++var3) {
if(this.func_96539_a(var3) == p_96552_1_) {
++var2;
}
}
return var2;
}
}
|
[
"honzajurak@hotmail.co.uk"
] |
honzajurak@hotmail.co.uk
|
88a80e0dfaf7923a19990c9909ba361db73b1d1e
|
f0397daab2782944f01d49de38849d8ebce754cc
|
/OLink-kernel/OLink-bpm/src/main/java/OLink/bpm/core/user/action/OnlineUserBindingListener.java
|
cc592c716bb9b235dc2fde076b174f42a9c04e3a
|
[] |
no_license
|
jameszgw/account-kernel
|
2687949a94cb1c79d62ae5fd8bbeb15dc1368ed8
|
ef6f7d2cfea0592abc4a8cac6ca875392fddc851
|
refs/heads/master
| 2023-05-14T12:30:07.501608
| 2018-05-04T03:18:40
| 2018-05-04T03:18:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,142
|
java
|
/*
* Created on 2005-4-25
*
* Window - Preferences - Java - Code Style - Code Templates
*/
package OLink.bpm.core.user.action;
/**
* @author Administrator
*
* Preferences - Java - Code Style - Code Templates
*/
import java.io.Serializable;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
import eWAP.core.Tools;
public class OnlineUserBindingListener implements HttpSessionBindingListener, Serializable{
private static final long serialVersionUID = 6544377366339056471L;
WebUser _user;
public OnlineUserBindingListener(WebUser user) {
_user = user;
}
public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) {
String onlineUserid = null;
try {
onlineUserid = Tools.getTimeSequence();
} catch (Exception e) {
onlineUserid = Tools.getUUID();
}
if (this._user != null) {
this._user.setOnlineUserid(onlineUserid);
}
OnlineUsers.add(onlineUserid, _user);
}
public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) {
if (this._user != null) {
OnlineUsers.remove(this._user.getOnlineUserid());
}
}
}
|
[
"391289241@qq.com"
] |
391289241@qq.com
|
6e5a178677869a5a8bfae1e8fb46d15bc4afb03f
|
19b0ddc45e90a6d938bacc65648d805a941fc90d
|
/Server/InformationAcquisition/src/jma/handlers/preprocess/cashloan/CheckUserCreditOnTdPreprocessor.java
|
2eeaa89bc2df87d49dd3e7a1280b3255220f09ef
|
[] |
no_license
|
dachengzi-software/ap
|
bec5371a4004eb318258646a7e34fc0352e641c2
|
ccca3d6c4fb86a698a064c3005eba2b405e8d822
|
refs/heads/master
| 2021-12-23T09:26:24.595456
| 2017-11-10T02:33:18
| 2017-11-10T02:33:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 898
|
java
|
package jma.handlers.preprocess.cashloan;
import grasscarp.account.model.Account;
import grasscarp.user.model.User;
import catfish.cowfish.application.model.ApplicationModel;
import jma.handlers.preprocess.IPreprocessor;
import jma.handlers.preprocess.model.CheckUserCreditOnTdPreModel;
import jma.resource.CLApplicationResourceFactory;
import jma.resource.UserResourceFactory;
public class CheckUserCreditOnTdPreprocessor implements IPreprocessor<CheckUserCreditOnTdPreModel> {
@Override
public CheckUserCreditOnTdPreModel getPreModel(String appId) {
ApplicationModel clApp = CLApplicationResourceFactory.getApplication(appId);
User user = UserResourceFactory.getUser(clApp.userId);
Account userAccount = UserResourceFactory.getUserAccount(clApp.userId);
return new CheckUserCreditOnTdPreModel(
user.getIdName(), user.getIdNumber(), userAccount.getMobile());
}
}
|
[
"gum@fenqi.im"
] |
gum@fenqi.im
|
2bca0b42d0cb9c6835d0ff3e6837e461d5eb706e
|
75f821238e6b2570986c1809925bdb638b7a9264
|
/app/src/main/java/com/tonfun/codecsnetty/bll/protocol/t808/T0302.java
|
cab887d699315b572df3992502fbf0acbad83fb9
|
[] |
no_license
|
zgy520/Android808
|
16d9dcf75de1e5c097629e9c1fa1fb94d640a827
|
4643bca92228366eadbbde8a3566da3319ea4462
|
refs/heads/master
| 2023-04-09T20:59:56.352962
| 2021-04-10T03:40:14
| 2021-04-10T03:40:14
| 356,259,966
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 988
|
java
|
package com.tonfun.codecsnetty.bll.protocol.t808;
import com.tonfun.codecsnetty.bll.protocol.basics.JTMessage;
import com.tonfun.codecsnetty.bll.protocol.commons.JT808;
import io.github.yezhihao.protostar.DataType;
import io.github.yezhihao.protostar.annotation.Field;
import io.github.yezhihao.protostar.annotation.Message;
/**
* @author yezhihao
* @home https://gitee.com/yezhihao/jt808-server
* 该消息2019版本已删除
*/
@Message(JT808.提问应答)
public class T0302 extends JTMessage {
private int serialNo;
private int answerId;
@Field(index = 0, type = DataType.WORD, desc = "应答流水号")
public int getSerialNo() {
return serialNo;
}
public void setSerialNo(int serialNo) {
this.serialNo = serialNo;
}
@Field(index = 2, type = DataType.BYTE, desc = "答案ID")
public int getAnswerId() {
return answerId;
}
public void setAnswerId(int answerId) {
this.answerId = answerId;
}
}
|
[
"a442391947@gmail.com"
] |
a442391947@gmail.com
|
bc772373a3d37ec985a90053ea3a6c76ff88b742
|
de5a5c6c2f6a92240bf59d45810a12c0802c9cad
|
/Graph Udemy/src/spanningTreePrimsLazy/PrimsAlgorithm.java
|
40a2ede8b08f8c53b7e3b0d03b7c972dc5cef05d
|
[] |
no_license
|
AkashMaharana/Playing_With_DS_ALGO
|
08daed71a4a4a5a0fe580a880ebb8e679991bedd
|
459e7af0a625edfa2debd0409a95bb7bd23c39b3
|
refs/heads/main
| 2023-07-01T18:00:44.398251
| 2021-07-19T15:40:34
| 2021-07-19T15:40:34
| 387,494,253
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,393
|
java
|
package spanningTreePrimsLazy;
import java.util.PriorityQueue;
import java.util.List;
import java.util.ArrayList;
public class PrimsAlgorithm {
private List<Vertex> unvisitedVertex;
private List<Edge> spanningTree;
private PriorityQueue<Edge> edgeHeap;
private double fullCost;
public PrimsAlgorithm(List<Vertex> unvisitedVertex){
this.unvisitedVertex=unvisitedVertex;
this.spanningTree=new ArrayList<>();
this.edgeHeap=new PriorityQueue<>();
}
public void primsAlgorithm(Vertex vertex){
unvisitedVertex.remove(vertex);
while(!unvisitedVertex.isEmpty()){
for(Edge edge : vertex.getAdjacenciesList()){
if(unvisitedVertex.contains(edge.getEndVertex())){
this.edgeHeap.add(edge);
}
}
Edge tempEdge=edgeHeap.poll();
this.spanningTree.add(tempEdge);
this.fullCost=this.fullCost+tempEdge.getWeight();
Vertex tempVertex=tempEdge.getEndVertex();
unvisitedVertex.remove(tempVertex);
}
for(Edge edge : spanningTree){
System.out.print(edge.getStartVertex()+""+edge.getEndVertex()+"-");
}
System.out.println();
System.out.println("Full Cost : "+fullCost);
}
public void setUnvisitedVertices(List<Vertex> unvisitedVertex) {
this.unvisitedVertex = unvisitedVertex;
}
public List<Edge> getSpanningTree() {
return this.spanningTree;
}
public void clearData() {
this.spanningTree.clear();
this.edgeHeap.clear();
}
}
|
[
"akashmaharana93@gmail.com"
] |
akashmaharana93@gmail.com
|
0b401fc2e2feb2b3e18c0ecd6ec12f7b9ea37ad0
|
a6a217a2da016648a4d42971071437b8adf93781
|
/bin/custom/myb2bhybris/myb2bhybrisstorefront/web/src/mx/myb2bhybris/storefront/interceptors/beforecontroller/RequireHardLoginBeforeControllerHandler.java
|
cc2c118864b0e610b7d239a2f9aef4a57656e7af
|
[] |
no_license
|
lmartinezmx/MyB2BStoreHybris
|
87d67900b85105e905b53e7059b32f93fb3e6a3c
|
62f1ff8c925fcb22087568c8c7c35b8f43b44fe2
|
refs/heads/master
| 2020-12-28T12:07:25.332179
| 2020-02-06T17:25:26
| 2020-02-06T17:25:26
| 238,326,664
| 0
| 0
| null | 2020-04-30T14:35:53
| 2020-02-04T23:16:20
|
Java
|
UTF-8
|
Java
| false
| false
| 3,476
|
java
|
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package mx.myb2bhybris.storefront.interceptors.beforecontroller;
import java.lang.annotation.Annotation;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.security.web.RedirectStrategy;
import org.springframework.web.method.HandlerMethod;
import de.hybris.platform.acceleratorstorefrontcommons.annotations.RequireHardLogIn;
import de.hybris.platform.acceleratorstorefrontcommons.interceptors.BeforeControllerHandler;
import mx.myb2bhybris.storefront.security.evaluator.impl.RequireHardLoginEvaluator;
/**
*/
public class RequireHardLoginBeforeControllerHandler implements BeforeControllerHandler
{
private static final Logger LOG = Logger.getLogger(RequireHardLoginBeforeControllerHandler.class);
public static final String SECURE_GUID_SESSION_KEY = "acceleratorSecureGUID";
private String loginUrl;
private String loginAndCheckoutUrl;
private RedirectStrategy redirectStrategy;
private RequireHardLoginEvaluator requireHardLoginEvaluator;
protected String getLoginUrl()
{
return loginUrl;
}
@Required
public void setLoginUrl(final String loginUrl)
{
this.loginUrl = loginUrl;
}
protected RedirectStrategy getRedirectStrategy()
{
return redirectStrategy;
}
@Required
public void setRedirectStrategy(final RedirectStrategy redirectStrategy)
{
this.redirectStrategy = redirectStrategy;
}
public String getLoginAndCheckoutUrl()
{
return loginAndCheckoutUrl;
}
@Required
public void setLoginAndCheckoutUrl(final String loginAndCheckoutUrl)
{
this.loginAndCheckoutUrl = loginAndCheckoutUrl;
}
protected RequireHardLoginEvaluator getRequireHardLoginEvaluator()
{
return requireHardLoginEvaluator;
}
@Required
public void setRequireHardLoginEvaluator(RequireHardLoginEvaluator requireHardLoginEvaluator)
{
this.requireHardLoginEvaluator = requireHardLoginEvaluator;
}
@Override
public boolean beforeController(final HttpServletRequest request, final HttpServletResponse response,
final HandlerMethod handler) throws Exception
{
// We only care if the request is secure
if (request.isSecure())
{
// Check if the handler has our annotation
final RequireHardLogIn annotation = findAnnotation(handler, RequireHardLogIn.class);
if (annotation != null)
{
boolean redirect = requireHardLoginEvaluator.evaluate(request, response);
if (redirect)
{
LOG.warn("Redirection required");
getRedirectStrategy().sendRedirect(request, response, getRedirectUrl(request));
return false;
}
}
}
return true;
}
protected String getRedirectUrl(final HttpServletRequest request)
{
if (request != null && request.getServletPath().contains("checkout"))
{
return getLoginAndCheckoutUrl();
}
else
{
return getLoginUrl();
}
}
protected <T extends Annotation> T findAnnotation(final HandlerMethod handlerMethod, final Class<T> annotationType)
{
// Search for method level annotation
final T annotation = handlerMethod.getMethodAnnotation(annotationType);
if (annotation != null)
{
return annotation;
}
// Search for class level annotation
return AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), annotationType);
}
}
|
[
"leonardo.lmv@gmail.com"
] |
leonardo.lmv@gmail.com
|
c4b0e6a9855d62b7b3eab67ec19747227c5a8a7c
|
48a2135f2f05fc09c1bc367ef594ee9f704a4289
|
/ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/price/dedicatedcloud/_2018v3/rbx2b/infrastructure/filer/OvhHourlyEnum.java
|
e124a4cdc36c16376bbf8a80172041d0c12f219e
|
[
"BSD-3-Clause"
] |
permissive
|
UrielCh/ovh-java-sdk
|
913c1fbd4d3ea1ff91de8e1c2671835af67a8134
|
e41af6a75f508a065a6177ccde9c2491d072c117
|
refs/heads/master
| 2022-09-27T11:15:23.115006
| 2022-09-02T04:41:33
| 2022-09-02T04:41:33
| 87,030,166
| 13
| 4
|
BSD-3-Clause
| 2022-09-02T04:41:34
| 2017-04-03T01:59:23
|
Java
|
UTF-8
|
Java
| false
| false
| 735
|
java
|
package net.minidev.ovh.api.price.dedicatedcloud._2018v3.rbx2b.infrastructure.filer;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Enum of Hourlys
*/
public enum OvhHourlyEnum {
@JsonProperty("nfs-1200-GB")
nfs_1200_GB("nfs-1200-GB"),
@JsonProperty("nfs-13200-GB")
nfs_13200_GB("nfs-13200-GB"),
@JsonProperty("nfs-1600-GB")
nfs_1600_GB("nfs-1600-GB"),
@JsonProperty("nfs-2400-GB")
nfs_2400_GB("nfs-2400-GB"),
@JsonProperty("nfs-3300-GB")
nfs_3300_GB("nfs-3300-GB"),
@JsonProperty("nfs-6600-GB")
nfs_6600_GB("nfs-6600-GB"),
@JsonProperty("nfs-800-GB")
nfs_800_GB("nfs-800-GB");
final String value;
OvhHourlyEnum(String s) {
this.value = s;
}
public String toString() {
return this.value;
}
}
|
[
"uriel.chemouni@gmail.com"
] |
uriel.chemouni@gmail.com
|
01fa94d370ea0ee03701b4d8906ba38699790b97
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-418-33-18-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/xhtml/filter/DefaultXMLFilter_ESTest.java
|
0be6f66ef0f22d072715fa4b94307ef4c2286006
|
[] |
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
| 581
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Apr 08 04:40:19 UTC 2020
*/
package org.xwiki.rendering.wikimodel.xhtml.filter;
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 DefaultXMLFilter_ESTest extends DefaultXMLFilter_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
a0f802da38cfc5db616cb3e4b0f7e75a194aea04
|
39390e1c0bf53d7f2e44b5242f1fb2b47300aaf7
|
/trunk/EZMIS/jteap-question/com/jteap/question/web/QuestionFeedbackAction.java
|
3326a0733578ea7dc3adf5540d8a087383e2666f
|
[] |
no_license
|
BGCX067/ezmis-svn-to-git
|
3e061173c86055de6a1c0204271b3d3276cea7cf
|
24b15ab52a8d750a0ce782a6b64226583c859e03
|
refs/heads/master
| 2021-01-11T11:08:51.702990
| 2015-12-28T14:08:08
| 2015-12-28T14:08:08
| 48,874,376
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,382
|
java
|
package com.jteap.question.web;
import java.text.SimpleDateFormat;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jteap.core.dao.HibernateEntityDao;
import com.jteap.core.utils.HqlUtil;
import com.jteap.core.utils.StringUtil;
import com.jteap.core.web.AbstractAction;
import com.jteap.question.manager.QuestionFeedbackManager;
import com.jteap.question.model.QuestionFeedback;
@SuppressWarnings("serial")
public class QuestionFeedbackAction extends AbstractAction {
private QuestionFeedbackManager questionFeedbackManager;
public QuestionFeedbackManager getQuestionFeedbackManager() {
return questionFeedbackManager;
}
public void setQuestionFeedbackManager(
QuestionFeedbackManager questionFeedbackManager) {
this.questionFeedbackManager = questionFeedbackManager;
}
@SuppressWarnings("unchecked")
@Override
public HibernateEntityDao getManager() {
return questionFeedbackManager;
}
@Override
public String[] listJsonProperties() {
return new String[]{
"id","createPerson","createDate","content","remark","time"
};
}
@Override
public String[] updateJsonProperties() {
return new String[]{
"id","createPerson","createDate","content","remark"
};
}
@Override
protected void beforeShowList(HttpServletRequest request,
HttpServletResponse response, StringBuffer hql) {
HqlUtil.addOrder(hql, "createDate", "desc");
}
/**
* 保存或修改问题反馈信息
* @return
*/
public String saveOrUpdateAction(){
try {
QuestionFeedback questionFeedback = new QuestionFeedback();
String id = request.getParameter("id");
// questionFeedback = questionFeedbackManager.get(id);
if(StringUtil.isNotEmpty(id)){
questionFeedback.setId(id);
}
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
questionFeedback.setCreatePerson(request.getParameter("createPerson"));
questionFeedback.setCreateDate(dateFormat.parse(request.getParameter("createDate")));
questionFeedback.setContent(request.getParameter("content"));
questionFeedback.setRemark(request.getParameter("remark"));
questionFeedbackManager.save(questionFeedback);
this.outputJson("{success:true}");
} catch (Exception e) {
e.printStackTrace();
}
return NONE;
}
}
|
[
"you@example.com"
] |
you@example.com
|
f675a87406ec27d68c51dc0fa066089ae532f014
|
6252c165657baa6aa605337ebc38dd44b3f694e2
|
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-600-Files/boiler-To-Generate-600-Files/syncregions-600Files/BoilerActuator1702.java
|
a81a970f32b5a55b99bb711e57e87ffc74acce83
|
[] |
no_license
|
soha500/EglSync
|
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
|
55101bc781349bb14fefc178bf3486e2b778aed6
|
refs/heads/master
| 2021-06-23T02:55:13.464889
| 2020-12-11T19:10:01
| 2020-12-11T19:10:01
| 139,832,721
| 0
| 1
| null | 2019-05-31T11:34:02
| 2018-07-05T10:20:00
|
Java
|
UTF-8
|
Java
| false
| false
| 263
|
java
|
package syncregions;
public class BoilerActuator1702 {
public execute(int temperatureDifference1702, boolean boilerStatus1702) {
//sync _bfpnGUbFEeqXnfGWlV1702, behaviour
Half Change - return temperature - targetTemperature;
//endSync
}
}
|
[
"sultanalmutairi@172.20.10.2"
] |
sultanalmutairi@172.20.10.2
|
584838e026d72fe1be40e6b83a6c0becc328fe8b
|
edfc9119d058ce549ce1021da06ca6c8881ef3e5
|
/src/main/java/com/belong/service/ArticleServiceImpl.java
|
bf70f9dfb13aabf1ad2fad1f204ce4fb49a54ce2
|
[] |
no_license
|
BarryPro/My_Video
|
9d5b461befc125a4477295ffd8c3e61602c9f566
|
e3650dd4201c51cae1b60a08a01210baddcc314f
|
refs/heads/master
| 2021-09-16T13:49:55.324440
| 2018-03-18T02:19:41
| 2018-03-18T02:19:41
| 78,999,735
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,182
|
java
|
package com.belong.service;
import com.belong.dao.ArticleMapper;
import com.belong.dao.PageMapper;
import com.belong.model.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Map;
/**
* Created by belong on 2017/1/10.
*/
@Service
public class ArticleServiceImpl implements IArticleService{
@Autowired
private PageMapper pdao;
@Autowired
private ArticleMapper dao;
@Override
public void addArticle(Map map) {
dao.addArticle(map);
}
@Override
public ArrayList<Article> queryArticle(Map map) {
return pdao.query(map);
}
@Override
public void deleteArticle(Map map) {
dao.deleteArticle(map);
}
@Override
public void updateArticle(Map map) {
dao.updateArticle(map);
}
@Override
public Article queryArticleByAid(Map map) {
return dao.queryArticleByAid(map);
}
@Override
public void updateAgree(Map map) {
dao.updataAgree(map);
}
@Override
public void updataDisagree(Map map) {
dao.updataDisagree(map);
}
}
|
[
"belong.belong@outlook.com"
] |
belong.belong@outlook.com
|
c2929555b94faa01ec6c5148423da3429b1d8724
|
b9ba39b54063408004244365d2d274b781ab0087
|
/app/src/main/java/com/nfu/old/utils/LogUtil.java
|
a765d668c99ba6a699ed46fb2a10dab3e38b098f
|
[] |
no_license
|
magichill33/older
|
844505af1d45969d14b728a677e001eb7da187b4
|
63972143744d868acad3303f647505269cfd9097
|
refs/heads/master
| 2021-01-01T17:13:58.745465
| 2017-08-22T07:50:30
| 2017-08-22T07:50:30
| 98,029,659
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,336
|
java
|
package com.nfu.old.utils;
import android.util.Log;
public class LogUtil {
private static String TAG = "NFU";
private static final byte LV = 0x20;
private static final byte LD = 0x10;
private static final byte LI = 0x08;
private static final byte LW = 0x04;
private static final byte LE = 0x02;
private static final byte LA = 0x01;
//
private static int sLevel = 0x3f;
private static boolean isDisplayLog = true;
public static void setDisplayLog(boolean b){
isDisplayLog = b;
}
public static void setTag(String tag){
if(tag != null && tag.length() > 0){
TAG = tag;
}
}
public static void setLevel(String level){
int le = Integer.valueOf(level);
setLevel(le);
}
public static void setLevel(int level){
if(level >=0 && level <= 0x3f){
sLevel = level;
}
}
public static void v(String msg){
if(( LV & sLevel) > 0 && isDisplayLog){
Log.v(TAG,msg);
}
}
public static void d(String msg){
if(( LD & sLevel) > 0 && isDisplayLog){
Log.i(TAG,msg);
}
}
public static void i(String msg){
if(( LI & sLevel) > 0 && isDisplayLog){
Log.i(TAG,msg);
}
}
public static void w(String msg){
if(( LW & sLevel) > 0 && isDisplayLog){
Log.w(TAG,msg);
}
}
public static void e(String msg){
if(( LE & sLevel) > 0 && isDisplayLog){
Log.e(TAG,msg);
}
}
}
|
[
"986417576@qq.com"
] |
986417576@qq.com
|
8188a06b297f5a83a56d7c42ac3f97060f34a2c6
|
7b12f67da8c10785efaebe313547a15543a39c77
|
/jjg-security-core/src/main/java/com/xdl/jjg/code/ValidateCodeBeanConfig.java
|
b2cac455e60127560b171fc9a5d331df8e5c03f1
|
[] |
no_license
|
liujinguo1994/xdl-jjg
|
071eaa5a8fb566db6b47dbe046daf85dd2b9bcd8
|
051da0a0dba18e6e5021ecb4ef3debca16b01a93
|
refs/heads/master
| 2023-01-06T09:11:30.487559
| 2020-11-06T14:42:45
| 2020-11-06T14:42:45
| 299,525,315
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,168
|
java
|
package com.xdl.jjg.code;
import com.xdl.jjg.code.image.ImageCodeGenerator;
import com.xdl.jjg.code.sms.DefaultSmsCodeSenderImpl;
import com.xdl.jjg.code.sms.SmsCodeSender;
import com.xdl.jjg.properties.SecurityProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Author: ciyuan
* @Date: 2019/5/20 1:16
*/
@Configuration
public class ValidateCodeBeanConfig {
@Autowired
private SecurityProperties securityProperties;
@Bean
@ConditionalOnMissingBean(name = "imageValidateCodeGenerator")
public ValidateCodeGenerator imageValidateCodeGenerator() {
ImageCodeGenerator codeGenerator = new ImageCodeGenerator();
codeGenerator.setSecurityProperties(securityProperties);
return codeGenerator;
}
@Bean
@ConditionalOnMissingBean(SmsCodeSender.class)
public SmsCodeSender smsCodeSender() {
return new DefaultSmsCodeSenderImpl();
}
}
|
[
"344009799@qq.com"
] |
344009799@qq.com
|
42f0079ba6db7af9b28f73725fa0bfeed3a05b73
|
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
|
/app/src/main/wechat6.5.3/com/tencent/mm/modelvoice/RemoteController.java
|
c701e82bdcb0f9a23fd2c7a9ea080d35edc5c190
|
[] |
no_license
|
newtonker/wechat6.5.3
|
8af53a870a752bb9e3c92ec92a63c1252cb81c10
|
637a69732afa3a936afc9f4679994b79a9222680
|
refs/heads/master
| 2020-04-16T03:32:32.230996
| 2017-06-15T09:54:10
| 2017-06-15T09:54:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,253
|
java
|
package com.tencent.mm.modelvoice;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
import com.tencent.mm.sdk.platformtools.ah;
import com.tencent.mm.sdk.platformtools.v;
import java.lang.reflect.Method;
public final class RemoteController {
private static Method diK;
private static Method diL;
private AudioManager diI;
private ComponentName diJ;
public static class RemoteControlReceiver extends BroadcastReceiver {
private static ah aSW;
private static a diM;
public void onReceive(Context context, Intent intent) {
if (intent != null) {
if ("android.intent.action.MEDIA_BUTTON".equals(intent.getAction())) {
if (aSW == null && diM != null) {
v.d("MicroMsg.RemoteControlReceiver", "got remote key event down");
aSW = new ah(new com.tencent.mm.sdk.platformtools.ah.a(this) {
final /* synthetic */ RemoteControlReceiver diN;
{
this.diN = r1;
}
public final boolean oU() {
v.d("MicroMsg.RemoteControlReceiver", "got remote key event up");
RemoteControlReceiver.aSW = null;
return false;
}
}, true);
}
if (aSW != null) {
aSW.ea(1000);
return;
}
return;
}
v.d("MicroMsg.RemoteControlReceiver", "unknown action, ignore" + intent.getAction());
}
}
public static void Lt() {
diM = null;
if (aSW != null) {
aSW.QI();
aSW = null;
}
}
}
public interface a {
}
static {
try {
if (diK == null) {
diK = AudioManager.class.getMethod("registerMediaButtonEventReceiver", new Class[]{ComponentName.class});
}
if (diL == null) {
diL = AudioManager.class.getMethod("unregisterMediaButtonEventReceiver", new Class[]{ComponentName.class});
}
} catch (NoSuchMethodException e) {
}
}
protected final void finalize() {
try {
if (diL != null) {
diL.invoke(this.diI, new Object[]{this.diJ});
RemoteControlReceiver.Lt();
}
} catch (Throwable e) {
Throwable th = e;
Throwable e2 = th.getCause();
if (e2 instanceof RuntimeException) {
throw ((RuntimeException) e2);
} else if (e2 instanceof Error) {
throw ((Error) e2);
} else {
throw new RuntimeException(th);
}
} catch (IllegalAccessException e3) {
v.e("MicroMsg.RemoteControlReceiver", "unexpected " + e3);
}
super.finalize();
}
}
|
[
"zhangxhbeta@gmail.com"
] |
zhangxhbeta@gmail.com
|
d6b860a17f9c0a7dacc5278b84433f136307c4e5
|
f07bd2f4a84e81de267d2f274c417173b8a35625
|
/book_second/src/pojo/Order.java
|
763045225b6fb19f7e0d5ab82ad4260d07a91b49
|
[] |
no_license
|
ckong-start/javawebExer
|
5e66b8cd5523534ebbb602ea36891df8a44ba953
|
64461e6ec0e7e8374907bb39bce70614c2102cce
|
refs/heads/master
| 2021-01-09T11:08:20.971213
| 2020-02-22T06:15:24
| 2020-02-22T06:15:38
| 242,276,693
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,489
|
java
|
package pojo;
import java.math.BigDecimal;
import java.util.Date;
public class Order {
// 订单号
private String orderId;
// 生成订单的时间
private Date createDate;
// 订单的金额
private BigDecimal price;
// 订单状态 0未发货,1已发货,2已签收
private Integer status;
// 用户编号
private Integer userId;
public Order() {
super();
}
public Order(String orderId, Date createDate, BigDecimal price, Integer status, Integer userId) {
super();
this.orderId = orderId;
this.createDate = createDate;
this.price = price;
this.status = status;
this.userId = userId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
@Override
public String toString() {
return "Order [orderId=" + orderId + ", createDate=" + createDate + ", price=" + price + ", status=" + status
+ ", userId=" + userId + "]";
}
}
|
[
"289128945@qq.com"
] |
289128945@qq.com
|
3fd3be01f9611b743b138e1b15a532166c1e8150
|
5b89acddd55d942b87f217fc03f98de3ed24004e
|
/innodev-pdp-core/src/main/java/cn/com/innodev/pdp/community/persistence/object/ComRoomDO.java
|
1eb8a764fb54b6fcde548173ef05582cfea8d3fb
|
[] |
no_license
|
soltex/pdp
|
5acd4a79c222fa2302f92138d05ac3bb6bb55e48
|
10d39984c51ad2cb9d85251b43d7d4fc6c32e423
|
refs/heads/master
| 2021-01-25T08:55:18.856224
| 2014-11-24T07:16:30
| 2014-11-24T07:16:30
| 26,630,100
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 877
|
java
|
package cn.com.innodev.pdp.community.persistence.object;
public class ComRoomDO {
private Integer id;
private String roomNo;
private Integer proprietorCount;
private Integer buildingId;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getRoomNo() {
return roomNo;
}
public void setRoomNo(String roomNo) {
this.roomNo = roomNo;
}
public Integer getProprietorCount() {
return proprietorCount;
}
public void setProprietorCount(Integer proprietorCount) {
this.proprietorCount = proprietorCount;
}
public Integer getBuildingId() {
return buildingId;
}
public void setBuildingId(Integer buildingId) {
this.buildingId = buildingId;
}
}
|
[
"shipengpipi@126.com"
] |
shipengpipi@126.com
|
4dbc68b56c894cf7e09cfeb52af4deb81b33b00b
|
7c8a313363e7ef0a04fa95d60c69d6d17a128873
|
/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/DoseRateTypeEnumFactory.java
|
3a59a68380d4fb5328c497425f95317f8bc58d19
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
radmilabord/hapi-fhir
|
5c8f404e7549ae750ad7716e6b305909f7737cb1
|
f7ec81ac3c6592c281f8fd9a30a95f76621411d8
|
refs/heads/master
| 2020-03-11T11:40:08.633791
| 2018-04-25T13:50:50
| 2018-04-25T13:50:50
| 129,975,425
| 0
| 0
|
Apache-2.0
| 2018-04-17T23:13:57
| 2018-04-17T23:13:57
| null |
UTF-8
|
Java
| false
| false
| 2,525
|
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 Sat, Mar 3, 2018 18:00-0500 for FHIR v3.2.0
import org.hl7.fhir.r4.model.EnumFactory;
public class DoseRateTypeEnumFactory implements EnumFactory<DoseRateType> {
public DoseRateType fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("calculated".equals(codeString))
return DoseRateType.CALCULATED;
if ("ordered".equals(codeString))
return DoseRateType.ORDERED;
throw new IllegalArgumentException("Unknown DoseRateType code '"+codeString+"'");
}
public String toCode(DoseRateType code) {
if (code == DoseRateType.CALCULATED)
return "calculated";
if (code == DoseRateType.ORDERED)
return "ordered";
return "?";
}
public String toSystem(DoseRateType code) {
return code.getSystem();
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
d6737e868c9f3efcfb9f005049536ecc41467514
|
40665051fadf3fb75e5a8f655362126c1a2a3af6
|
/chaokunyang-jkes/eb2458473277d01dde8834df5852f537fd97f998/75/EsKafkaUtils.java
|
71065e5435fdc752fe87032e11d1600384b31416
|
[] |
no_license
|
fermadeiral/StyleErrors
|
6f44379207e8490ba618365c54bdfef554fc4fde
|
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
|
refs/heads/master
| 2020-07-15T12:55:10.564494
| 2019-10-24T02:30:45
| 2019-10-24T02:30:45
| 205,546,543
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,061
|
java
|
package com.timeyang.jkes.core.kafka.util;
import com.timeyang.jkes.core.annotation.Document;
import com.timeyang.jkes.core.util.Asserts;
import com.timeyang.jkes.core.support.Config;
import com.timeyang.jkes.core.util.DocumentUtils;
import com.timeyang.jkes.core.annotation.DocumentId;
import com.timeyang.jkes.core.elasticsearch.exception.IlllegalSearchStateException;
import com.timeyang.jkes.core.util.StringUtils;
import javax.persistence.Id;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* @author chaokunyang
*/
public class EsKafkaUtils {
public static String getTopicWithoutPrefix(Object entity) {
Class<?> clazz = entity.getClass();
Asserts.check(clazz.isAnnotationPresent(Document.class), "The class " + clazz.getCanonicalName() + " of entity " + entity + " must be annotated with " + Document.class.getCanonicalName());
return getTopicWithoutPrefix(clazz);
}
public static String getTopicWithoutPrefix(Class<?> clazz) {
Asserts.check(clazz.isAnnotationPresent(Document.class), "The class " + clazz.getCanonicalName() + " must be annotated with " + Document.class.getCanonicalName());
return DocumentUtils.getTypeName(clazz);
}
/**
* Get kafka topic to publish message
* @param entity the entity to be indexed
* @return kafka topic to publish message
*/
public static String getTopic(Object entity) {
return getTopic(entity.getClass());
}
/**
* Get kafka topic to publish message
* @param clazz the class of entity to be indexed
* @return kafka topic to publish message
*/
public static String getTopic(Class<?> clazz) {
String topic = getTopicWithoutPrefix(clazz);
String prefix = Config.getJkesProperties().getKafkaTopicPrefix();
if(StringUtils.hasText(prefix)) {
return prefix + "_" + topic;
}
return topic;
}
/**
* Get kafka message key
* @param entity the entity to be indexed
* @return kafka message key
*/
public static String getKey(Object entity) {
Class<?> domainClass = entity.getClass();
Asserts.check(domainClass.isAnnotationPresent(Document.class), "The class " + domainClass.getCanonicalName() + " must be annotated with " + Document.class.getCanonicalName());
Method[] methods = domainClass.getMethods(); // 包括从父类继承的方法
for(Method method : methods) {
if(method.isAnnotationPresent(DocumentId.class) ||
method.isAnnotationPresent(Id.class)) {
try {
Object key = method.invoke(entity);
return String.valueOf(key);
} catch (IllegalAccessException e) {
throw new IlllegalSearchStateException(
DocumentId.class + " or " + Id.class + "can only be annotated on public class", e);
} catch (InvocationTargetException e) {
throw new RuntimeException(e);
}
}
}
Class<?> clazz = entity.getClass();
do {
Field[] fields = clazz.getDeclaredFields();
for(Field field : fields) {
if (field.isAnnotationPresent(Id.class)) {
try {
field.setAccessible(true);
Object key = field.get(entity);
return String.valueOf(key);
} catch (IllegalAccessException e) {
throw new RuntimeException(e); // impossible, because we set accessibility to true
}
}
}
clazz = clazz.getSuperclass();
}while (clazz != null);
throw new IlllegalSearchStateException(domainClass + " doesn't have a document id. You either annotated a method with " + DocumentId.class + " , or annotated a field or getter method with " + Id.class);
}
}
|
[
"fer.madeiral@gmail.com"
] |
fer.madeiral@gmail.com
|
ee92bc87946de3d61356572665ecbaac67bb1789
|
cd602223060180939d6eb2a02729f1bfa35a4fa5
|
/app/src/main/java/com/chunsun/redenvelope/entities/BaseEntity.java
|
6b41858d400b92c879928048faef4146d5ca3942
|
[] |
no_license
|
himon/ChunSunRE
|
25c351ea2385b9c7c0ef494e5604a09fa315c07e
|
44cfdec4ad97eaecc9913f48dcec278aba84f963
|
refs/heads/master
| 2021-01-18T22:09:20.095786
| 2016-04-28T14:25:01
| 2016-04-28T14:25:01
| 41,711,612
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 603
|
java
|
package com.chunsun.redenvelope.entities;
/**
* Created by Administrator on 2015/7/29.
*/
public class BaseEntity {
private boolean success;
private String code;
private String msg;
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
|
[
"258798596@qq.com"
] |
258798596@qq.com
|
33fbc489a3bb38942d7e149bcb9913aeb3563cd9
|
0f9e2962e6d881b2ae6e449d2c8aa96cfb64e9e1
|
/app/src/main/java/com/indtel/mcf/ui/home/sse/SseHomeViewModel.java
|
2c4efe64f7f487afc40b9d0ac6c946ada964facc
|
[
"Apache-2.0"
] |
permissive
|
Arvindo9/MCF
|
f3aca80978042fc3d9f30921b6019b7bd21c29a8
|
aa83ee08346b36c1845b26c8e6b2aa447cb30a99
|
refs/heads/master
| 2020-06-25T05:47:33.834297
| 2019-12-03T18:41:12
| 2019-12-03T18:41:12
| 199,219,359
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,790
|
java
|
package com.indtel.mcf.ui.home.sse;
import androidx.databinding.ObservableField;
import com.indtel.mcf.base.BaseViewModel;
import com.indtel.mcf.data.DataManager;
import com.indtel.mcf.utils.rx.SchedulerProvider;
/**
* Author : Arvindo Mondal
* Created on : 22-08-2019
* Email : arvindo@aiprog.in
* Company : AIPROG
* Designation : Programmer
* About : I am a human can only think, I can't be a person like machine which have lots of memory and knowledge.
* Quote : No one can measure limit of stupidity but stupid things bring revolutions
* Strength : Never give up
* Motto : To be known as great Mathematician
* Skills : Algorithms and logic
* Website : www.aiprog.in
*/
public class SseHomeViewModel extends BaseViewModel<SseHomeNavigator> {
public final ObservableField<String> userName;
public SseHomeViewModel(DataManager dataManager, SchedulerProvider schedulerProvider) {
super(dataManager, schedulerProvider);
userName = new ObservableField<>(getDataManager().getUserName());
}
//Resource--------------------------
public void onLogOutClick(){
getNavigator().onLogOutClick();
getDataManager().setLoggedInMode(DataManager.LoggedInMode.LOGGED_IN_MODE_LOGGED_OUT);
}
public void onVendorRepliedCasesClick(){
getNavigator().onVendorRepliedCasesClick();
}
public void onCasesAfterAssessmentClick(){
getNavigator().onCasesAfterAssessmentClick();
}
public void onRevertCasesClick(){
getNavigator().onRevertCasesClick();
}
public void onVendorWiseReportClick(){
getNavigator().onVendorWiseReportClick();
}
public void onDashboardClick(){
getNavigator().onDashboardClick();
}
}
|
[
"arvindomondal@gmail.com"
] |
arvindomondal@gmail.com
|
cb9f57bf4c990a16632efc1ff818cfa2bc9a33c0
|
c3a040404912172ca92ed2096836978947275442
|
/fUML/implementations/MonolithicRevisitor/org.modelexecution.operationalsemantics.ad.monolithicrevisitor/src/monolithicactivitydiagram/revisitor/operations/BooleanBinaryExpressionOperation.java
|
5ae996d6c911caf18fcd066fa56af3241592a560
|
[] |
no_license
|
manuelleduc/ale-compiler-benchmarks
|
c7f632f5556e5bac171ca2bb8a84dbbda514d278
|
6e4a2c13ec35f5598fed57bd3eeff74e86e05b03
|
refs/heads/master
| 2021-01-20T02:01:57.243459
| 2017-07-08T14:15:54
| 2017-07-08T14:15:54
| 89,361,724
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 210
|
java
|
package monolithicactivitydiagram.revisitor.operations;
public interface BooleanBinaryExpressionOperation extends monolithicactivitydiagram.revisitor.operations.BooleanExpressionOperation {
void execute();
}
|
[
"degueule@cwi.nl"
] |
degueule@cwi.nl
|
d20b819347cda58da16d8ae19d74cc1a1c95b1c6
|
43ca534032faa722e206f4585f3075e8dd43de6c
|
/src/com/instagram/android/people/widget/b.java
|
5bf3d4afeec42f79c6311f683d5a47bee08ab347
|
[] |
no_license
|
dnoise/IG-6.9.1-decompiled
|
3e87ba382a60ba995e582fc50278a31505109684
|
316612d5e1bfd4a74cee47da9063a38e9d50af68
|
refs/heads/master
| 2021-01-15T12:42:37.833988
| 2014-10-29T13:17:01
| 2014-10-29T13:17:01
| 26,952,948
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 762
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.instagram.android.people.widget;
import com.android.internal.util.Predicate;
import com.instagram.user.c.a;
// Referenced classes of package com.instagram.android.people.widget:
// a
final class b
implements Predicate
{
final com.instagram.android.people.widget.a a;
b(com.instagram.android.people.widget.a a1)
{
a = a1;
super();
}
private boolean a(a a1)
{
return !com.instagram.android.people.widget.a.a(a).a(a1);
}
public final boolean apply(Object obj)
{
return a((a)obj);
}
}
|
[
"leo.sjoberg@gmail.com"
] |
leo.sjoberg@gmail.com
|
2a344fe896d9cb6e482647669ea60187542d70c3
|
c036169035069f6f9ea16f089e47aa8a707f947e
|
/manifold-deps-parent/manifold-json/src/main/java/manifold/api/json/schema/JsonSchemaType.java
|
a44db077c1a4e59f5285697256c48e6788895163
|
[
"Apache-2.0"
] |
permissive
|
vsch/manifold
|
94fe50cc51b59de6801f8d96b31a774cb0870adf
|
16e6768046adb780c071c0226c6439f3c1cd6459
|
refs/heads/master
| 2023-06-20T05:45:10.660098
| 2018-05-19T16:50:26
| 2018-05-19T16:50:26
| 134,075,748
| 1
| 0
| null | 2018-05-19T15:47:59
| 2018-05-19T15:47:59
| null |
UTF-8
|
Java
| false
| false
| 3,209
|
java
|
package manifold.api.json.schema;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import manifold.api.json.IJsonParentType;
import manifold.api.json.IJsonType;
import manifold.api.json.Json;
import manifold.api.json.JsonIssue;
import manifold.api.json.JsonListType;
import manifold.util.JsonUtil;
/**
*/
public abstract class JsonSchemaType implements IJsonParentType
{
private final String _name;
private final JsonSchemaType _parent;
private List<IJsonType> _definitions;
private URL _file;
private List<JsonIssue> _issues;
protected JsonSchemaType( String name, URL source, JsonSchemaType parent )
{
_name = name;
_parent = parent;
_file = source;
_issues = Collections.emptyList();
}
public abstract String getFqn();
protected boolean isParentRoot()
{
return getParent() == null ||
getParent().getParent() == null && (getParent() instanceof JsonListType ||
!getParent().getName().equals( JsonSchemaTransformer.JSCH_DEFINITIONS ));
}
public URL getFile()
{
return _file != null
? _file
: _parent != null
? _parent.getFile()
: null;
}
public String getLabel()
{
return getName();
}
@Override
public String getName()
{
return _name;
}
@Override
public String getIdentifier()
{
return JsonUtil.makeIdentifier( getName() );
}
@Override
public JsonSchemaType getParent()
{
return _parent;
}
@Override
public List<IJsonType> getDefinitions()
{
return _definitions;
}
public void setDefinitions( List<IJsonType> definitions )
{
_definitions = definitions;
}
protected boolean mergeInnerTypes( IJsonParentType other, IJsonParentType mergedType, Map<String, IJsonParentType> innerTypes )
{
for( Map.Entry<String, IJsonParentType> e : innerTypes.entrySet() )
{
String name = e.getKey();
IJsonType innerType = other.findChild( name );
if( innerType != null )
{
innerType = Json.mergeTypes( e.getValue(), innerType );
}
else
{
innerType = e.getValue();
}
if( innerType != null )
{
mergedType.addChild( name, (IJsonParentType)innerType );
}
else
{
return false;
}
}
return true;
}
@Override
public List<JsonIssue> getIssues()
{
if( getParent() != null )
{
return getParent().getIssues();
}
return _issues;
}
@Override
public void addIssue( JsonIssue issue )
{
if( getParent() != null )
{
getParent().addIssue( issue );
return;
}
if( _issues.isEmpty() )
{
_issues = new ArrayList<>();
}
_issues.add( issue );
}
@Override
public boolean equals( Object o )
{
if( this == o )
{
return true;
}
if( o == null || getClass() != o.getClass() )
{
return false;
}
JsonSchemaType that = (JsonSchemaType)o;
return getName().equals( that.getName() );
}
@Override
public int hashCode()
{
return getName().hashCode();
}
}
|
[
"rsmckinney@hotmail.com"
] |
rsmckinney@hotmail.com
|
cd7a23a9e1652788b636c81391dea4f3ae4310dd
|
5598faaaaa6b3d1d8502cbdaca903f9037d99600
|
/code_changes/Apache_projects/HDFS-162/586bd479cb4cb90dab6a49f5e9ec3976901ffd58/ResourceBundles.java
|
b65a697d8d0c1ed38e470f17b31e7b6d291ace2d
|
[] |
no_license
|
SPEAR-SE/LogInBugReportsEmpirical_Data
|
94d1178346b4624ebe90cf515702fac86f8e2672
|
ab9603c66899b48b0b86bdf63ae7f7a604212b29
|
refs/heads/master
| 2022-12-18T02:07:18.084659
| 2020-09-09T16:49:34
| 2020-09-09T16:49:34
| 286,338,252
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,222
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.mapreduce.util;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.MissingResourceException;
/**
* Helper class to handle resource bundles in a saner way
*/
public class ResourceBundles {
/**
* Get a resource bundle
* @param bundleName of the resource
* @return the resource bundle
* @throws MissingResourceException
*/
public static ResourceBundle getBundle(String bundleName) {
return ResourceBundle.getBundle(bundleName.replace('$', '_'),
Locale.getDefault(), Thread.currentThread().getContextClassLoader());
}
/**
* Get a resource given bundle name and key
* @param <T> type of the resource
* @param bundleName name of the resource bundle
* @param key to lookup the resource
* @param suffix for the key to lookup
* @param defaultValue of the resource
* @return the resource or the defaultValue
* @throws ClassCastException if the resource found doesn't match T
*/
@SuppressWarnings("unchecked")
public static synchronized <T> T getValue(String bundleName, String key,
String suffix, T defaultValue) {
T value;
try {
ResourceBundle bundle = getBundle(bundleName);
value = (T) bundle.getObject(getLookupKey(key, suffix));
}
catch (Exception e) {
return defaultValue;
}
return value == null ? defaultValue : value;
}
private static String getLookupKey(String key, String suffix) {
if (suffix == null || suffix.isEmpty()) return key;
return key + suffix;
}
/**
* Get the counter group display name
* @param group the group name to lookup
* @param defaultValue of the group
* @return the group display name
*/
public static String getCounterGroupName(String group, String defaultValue) {
return getValue(group, "CounterGroupName", "", defaultValue);
}
/**
* Get the counter display name
* @param group the counter group name for the counter
* @param counter the counter name to lookup
* @param defaultValue of the counter
* @return the counter display name
*/
public static String getCounterName(String group, String counter,
String defaultValue) {
return getValue(group, counter, ".name", defaultValue);
}
}
|
[
"archen94@gmail.com"
] |
archen94@gmail.com
|
ae0d19b3b537ab881665bc82aab7936f7262a87c
|
dcf58cd350b4f414b5e7075a7444883167e4e47d
|
/src/main/java/de/ad/tools/redmine/cli/util/HashMapDuplicates.java
|
68935aaa0d5e30199170e1eff94c939ae3d1b5cb
|
[
"MIT"
] |
permissive
|
albfan/RedmineJavaCLI
|
1bcfa5744ad2f5850ec5fbdbe05f08532adfe32a
|
510ebcdf9d8c6b16d2515c39231e89fa6be1965f
|
refs/heads/master
| 2020-04-05T22:51:38.000306
| 2017-02-11T20:54:50
| 2017-02-11T20:54:50
| 62,551,026
| 6
| 1
| null | 2016-07-04T09:46:21
| 2016-07-04T09:46:20
| null |
UTF-8
|
Java
| false
| false
| 2,185
|
java
|
package de.ad.tools.redmine.cli.util;
import java.util.*;
public class HashMapDuplicates extends HashMap<String, String> {
Set<Entry<String, String>> entries;
@Override
public Set<Entry<String, String>> entrySet() {
if (entries == null) {
entries = new AbstractSet<Entry<String, String>>() {
ArrayList<Entry<String, String>> list = new ArrayList<>();
@Override
public Iterator<Entry<String, String>> iterator() {
return list.iterator();
}
@Override
public int size() {
return list.size();
}
@Override
public boolean add(Entry<String, String> stringStringEntry) {
return list.add(stringStringEntry);
}
};
}
return entries;
}
@Override
public int size() {
return entries.size();
}
public String put(String key, String value) {
Set<Entry<String, String>> entries = entrySet();
EntryDuplicates entry = new EntryDuplicates();
entry.setKey(key);
entry.setValue(value);
entries.add(entry);
return value;
}
public static void addFormParameterEqual(Map<String, String> parameters, String key, String value) {
addFormParameter(parameters, key, value, "=");
}
public static void addFormParameter(Map<String, String> parameters, String key, String value, String op) {
parameters.put("f[]", key);
parameters.put("op["+key+"]", op);
if(value != null) {
parameters.put("v[" + key + "][]", value);
}
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof HashMapDuplicates)) {
return false;
}
Map<?,?> m = (Map<?,?>) o;
if (m.size() != size()) {
return false;
}
for (Entry<String, String> entry : entries) {
boolean equal = false;
for (Entry<?, ?> entry1 : m.entrySet()) {
if (entry.getKey().equals(entry1.getKey()) && entry.getValue().equals(entry1.getValue())) {
equal = true;
break;
}
}
if (!equal) {
return false;
}
}
return true;
}
}
|
[
"albertofanjul@gmail.com"
] |
albertofanjul@gmail.com
|
0e3d3ffa70e33eaa9e243f320eaa7c536d4793c8
|
0f16fefcf3e11a7539d4e3636527ee06af8ee89c
|
/price/src/main/java/com/abt/price/core/bean/price/SimplePriceBean.java
|
1dc02b7238a67f7a0b0a686c02d22c508303ebab
|
[] |
no_license
|
AppOpenSource/April
|
b7f1b370a1c49574dec2f6c07661330d6743bbc8
|
82ff98b1c1a3082c93e97f7e15d8fa5c6e6935ab
|
refs/heads/master
| 2021-07-07T23:55:10.593085
| 2019-01-06T02:33:51
| 2019-01-06T02:33:51
| 128,861,089
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 778
|
java
|
package com.abt.price.core.bean.price;
import android.databinding.ObservableBoolean;
import android.databinding.ObservableField;
import android.databinding.ObservableInt;
/**
* @描述: @SimplePriceBean
* @作者: @黄卫旗
* @创建时间: @08/06/2018
*/
public class SimplePriceBean {
public ObservableInt id = new ObservableInt();
public ObservableField<String> title = new ObservableField<>();
public ObservableField<String> thumbnail = new ObservableField<>();
public ObservableField<String> description = new ObservableField<>();
public ObservableBoolean done = new ObservableBoolean();
//public ObservableField<String> name = new ObservableField<>();
//public ObservableBoolean isGood = new ObservableBoolean(); //是否点赞
}
|
[
"askviky2010@gmail.com"
] |
askviky2010@gmail.com
|
dc04e0de22293d54978fb4dafe995821f1058969
|
4370971acf1f422557e3f7de83d47f7705fd3719
|
/ph-oton-datatables/src/main/java/com/helger/photon/uictrls/datatables/EDataTablesOrderDirectionType.java
|
99109e2e861030679a3e8d2f982a181bd860dd84
|
[
"Apache-2.0"
] |
permissive
|
phax/ph-oton
|
848676b328507b5ea96877d0b8ba80d286fd9fb7
|
6d28dcb7de123f4deb77de1bc022faf77ac37e49
|
refs/heads/master
| 2023-08-27T20:41:11.706035
| 2023-08-20T15:30:44
| 2023-08-20T15:30:44
| 35,175,824
| 5
| 5
|
Apache-2.0
| 2023-02-23T20:20:41
| 2015-05-06T18:27:20
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,165
|
java
|
/*
* Copyright (C) 2014-2023 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* 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.helger.photon.uictrls.datatables;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.helger.commons.annotation.Nonempty;
import com.helger.commons.compare.ESortOrder;
import com.helger.commons.name.IHasName;
import com.helger.commons.string.StringHelper;
/**
* DataTables column order sequence type
*
* @author Philip Helger
*/
public enum EDataTablesOrderDirectionType implements IHasName
{
ASC ("asc", ESortOrder.ASCENDING),
DESC ("desc", ESortOrder.DESCENDING);
private final String m_sName;
private final ESortOrder m_eSortOrder;
EDataTablesOrderDirectionType (@Nonnull @Nonempty final String sName, @Nonnull final ESortOrder eSortOrder)
{
m_sName = sName;
m_eSortOrder = eSortOrder;
}
@Nonnull
@Nonempty
public String getName ()
{
return m_sName;
}
@Nonnull
public ESortOrder getSortOrder ()
{
return m_eSortOrder;
}
@Nullable
public static ESortOrder getSortOrderFromNameOrNull (@Nullable final String sName)
{
if (StringHelper.hasText (sName))
for (final EDataTablesOrderDirectionType e : values ())
if (e.m_sName.equals (sName))
return e.m_eSortOrder;
return null;
}
@Nullable
public static String getNameFromSortOrderOrNull (@Nullable final ESortOrder eSortOrder)
{
if (eSortOrder != null)
for (final EDataTablesOrderDirectionType e : values ())
if (e.m_eSortOrder.equals (eSortOrder))
return e.m_sName;
return null;
}
}
|
[
"philip@helger.com"
] |
philip@helger.com
|
4fa7e7906289280683ead0851fc62940c0fe8b90
|
92225460ebca1bb6a594d77b6559b3629b7a94fa
|
/src/com/kingdee/eas/fdc/sellhouse/ISignManage.java
|
b50ef2b37b9bfc1e1cfd07b6666fb3571d1ef2a5
|
[] |
no_license
|
yangfan0725/sd
|
45182d34575381be3bbdd55f3f68854a6900a362
|
39ebad6e2eb76286d551a9e21967f3f5dc4880da
|
refs/heads/master
| 2023-04-29T01:56:43.770005
| 2023-04-24T05:41:13
| 2023-04-24T05:41:13
| 512,073,641
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,009
|
java
|
package com.kingdee.eas.fdc.sellhouse;
import com.kingdee.bos.BOSException;
//import com.kingdee.bos.metadata.*;
import com.kingdee.bos.framework.*;
import com.kingdee.bos.util.*;
import com.kingdee.bos.Context;
import java.lang.String;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.bos.dao.IObjectPK;
import java.util.Date;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import com.kingdee.eas.framework.CoreBaseCollection;
import com.kingdee.bos.metadata.entity.SorterItemCollection;
import com.kingdee.bos.util.*;
import com.kingdee.bos.metadata.entity.FilterInfo;
import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.bos.framework.*;
import com.kingdee.bos.util.BOSUuid;
public interface ISignManage extends IBaseTransaction
{
public boolean exists(IObjectPK pk) throws BOSException, EASBizException;
public boolean exists(FilterInfo filter) throws BOSException, EASBizException;
public boolean exists(String oql) throws BOSException, EASBizException;
public SignManageInfo getSignManageInfo(IObjectPK pk) throws BOSException, EASBizException;
public SignManageInfo getSignManageInfo(IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException;
public SignManageInfo getSignManageInfo(String oql) throws BOSException, EASBizException;
public IObjectPK addnew(SignManageInfo model) throws BOSException, EASBizException;
public void addnew(IObjectPK pk, SignManageInfo model) throws BOSException, EASBizException;
public void update(IObjectPK pk, SignManageInfo model) throws BOSException, EASBizException;
public void updatePartial(SignManageInfo model, SelectorItemCollection selector) throws BOSException, EASBizException;
public void updateBigObject(IObjectPK pk, SignManageInfo model) throws BOSException;
public void delete(IObjectPK pk) throws BOSException, EASBizException;
public IObjectPK[] getPKList() throws BOSException, EASBizException;
public IObjectPK[] getPKList(String oql) throws BOSException, EASBizException;
public IObjectPK[] getPKList(FilterInfo filter, SorterItemCollection sorter) throws BOSException, EASBizException;
public SignManageCollection getSignManageCollection() throws BOSException;
public SignManageCollection getSignManageCollection(EntityViewInfo view) throws BOSException;
public SignManageCollection getSignManageCollection(String oql) throws BOSException;
public IObjectPK[] delete(FilterInfo filter) throws BOSException, EASBizException;
public IObjectPK[] delete(String oql) throws BOSException, EASBizException;
public void delete(IObjectPK[] arrayPK) throws BOSException, EASBizException;
public void onRecord(BOSUuid id, Date date, String contractNumber) throws BOSException, EASBizException;
public void unOnRecord(BOSUuid id) throws BOSException, EASBizException;
}
|
[
"yfsmile@qq.com"
] |
yfsmile@qq.com
|
7481bb161152cd193ea465e9d1b171aeff039f91
|
4641944d785740726bb4b78accc0c3cb8a442acb
|
/spring-jdbc/src/main/java/org/springframework/jdbc/core/ConnectionCallback.java
|
0145813aad6c68351122876855bc5d24d9558c71
|
[
"Apache-2.0"
] |
permissive
|
sdisk/springSourceCode
|
6f15fa164bd47e1099c9a65c6dcd73fcf5b6a5b4
|
6b1d89fd76d07c0188e560975dc8c2b22af6e84b
|
refs/heads/master
| 2020-07-24T18:47:01.212418
| 2020-05-28T02:52:45
| 2020-05-28T02:52:45
| 208,012,379
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,956
|
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.jdbc.core;
import org.springframework.dao.DataAccessException;
import org.springframework.lang.Nullable;
import java.sql.Connection;
import java.sql.SQLException;
/**
* Generic callback interface for code that operates on a JDBC Connection.
* Allows to execute any number of operations on a single Connection,
* using any type and number of Statements.
*
* <p>This is particularly useful for delegating to existing data access code
* that expects a Connection to work on and throws SQLException. For newly
* written code, it is strongly recommended to use JdbcTemplate's more specific
* operations, for example a {@code query} or {@code update} variant.
*
* @author Juergen Hoeller
* @since 1.1.3
* @param <T> the result type
* @see JdbcTemplate#execute(ConnectionCallback)
* @see JdbcTemplate#query
* @see JdbcTemplate#update
*/
@FunctionalInterface
public interface ConnectionCallback<T> {
/**
* Gets called by {@code JdbcTemplate.execute} with an active JDBC
* Connection. Does not need to care about activating or closing the
* Connection, or handling transactions.
* <p>If called without a thread-bound JDBC transaction (initiated by
* DataSourceTransactionManager), the code will simply get executed on the
* JDBC connection with its transactional semantics. If JdbcTemplate is
* configured to use a JTA-aware DataSource, the JDBC Connection and thus
* the callback code will be transactional if a JTA transaction is active.
* <p>Allows for returning a result object created within the callback, i.e.
* a domain object or a collection of domain objects. Note that there's special
* support for single step actions: see {@code JdbcTemplate.queryForObject}
* etc. A thrown RuntimeException is treated as application exception:
* it gets propagated to the caller of the template.
* @param con active JDBC Connection
* @return a result object, or {@code null} if none
* @throws SQLException if thrown by a JDBC method, to be auto-converted
* to a DataAccessException by a SQLExceptionTranslator
* @throws DataAccessException in case of custom exceptions
* @see JdbcTemplate#queryForObject(String, Class)
* @see JdbcTemplate#queryForRowSet(String)
*/
@Nullable
T doInConnection(Connection con) throws SQLException, DataAccessException;
}
|
[
"huang50179@163.com"
] |
huang50179@163.com
|
710c33c9e5a4b338ef394b21b3f8c20cb7690656
|
9f1c65d3a3a203a9ec9e663c22e47910afb2defb
|
/department.business.war/src/com/wiiy/business/service/ContractAgreementService.java
|
0cff6f4609d3b76c6d09804dc7943fdc00188f94
|
[] |
no_license
|
qiandonghf/wiiy_work
|
0bbcd56088134a6495cbbc9f133bd85049e0bd2a
|
157a8c5449566b8bcfa4c007974a0aa286c2981e
|
refs/heads/master
| 2020-06-01T10:11:26.696646
| 2015-05-07T01:46:12
| 2015-05-07T01:46:12
| 35,191,422
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 474
|
java
|
package com.wiiy.business.service;
import java.util.List;
import com.wiiy.business.entity.ContractAgreement;
import com.wiiy.business.entity.ContractAgreementAtt;
import com.wiiy.commons.service.IService;
import com.wiiy.hibernate.Result;
/**
* @author my
*/
public interface ContractAgreementService extends IService<ContractAgreement> {
Result<ContractAgreement> save(ContractAgreement t,List<ContractAgreementAtt> sessionContractAgreementAttList);
}
|
[
"811208477@qq.com"
] |
811208477@qq.com
|
6817adaaef3ca9664844feed39f33270e034128b
|
b9efc2abc0fd1d64cdc35f61641bd5203c5ab07c
|
/app/src/main/java/com/deity/bedtimestory/adapter/NewContentAdapter.java
|
a1fa62665e475d6883b520749edfae6565a72429
|
[] |
no_license
|
langrenbule/BedtimeStory
|
dfacc9acd26ef6846046b2b6cf5db75bd1bc1a8c
|
800096e22e4962f66bd52c2388e3573b8128faee
|
refs/heads/master
| 2021-05-15T01:09:28.210668
| 2016-11-08T14:21:19
| 2016-11-08T14:21:19
| 55,953,631
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,647
|
java
|
package com.deity.bedtimestory.adapter;
import android.content.Context;
import android.graphics.Bitmap;
import android.support.v7.widget.RecyclerView;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.deity.bedtimestory.R;
import com.deity.bedtimestory.entity.News;
import com.deity.bedtimestory.entity.News.NewsType;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.nostra13.universalimageloader.core.assist.ImageScaleType;
import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer;
import java.util.ArrayList;
import java.util.List;
public class NewContentAdapter extends RecyclerView.Adapter<NewContentAdapter.ViewHolder> {
private LayoutInflater mInflater;
private List<News> mDatas = new ArrayList<News>();
private ImageLoader imageLoader = ImageLoader.getInstance();
private DisplayImageOptions options;
public NewContentAdapter(Context context) {
mInflater = LayoutInflater.from(context);
imageLoader.init(ImageLoaderConfiguration.createDefault(context));
options = new DisplayImageOptions.Builder().showStubImage(R.drawable.images)
.showImageForEmptyUri(R.drawable.images).showImageOnFail(R.drawable.images).cacheInMemory()
.cacheOnDisc().imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565)
.displayer(new FadeInBitmapDisplayer(300)).build();
}
public void setData(List<News> datas) {
mDatas = datas;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public int getItemCount() {
if (null==mDatas)return 0;
return mDatas.size();
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View convertView = null;
switch (viewType){
case NewsType.TITLE:
convertView = mInflater.inflate(R.layout.news_content_title_item, null);
break;
case NewsType.SUMMARY:
convertView = mInflater.inflate(R.layout.news_content_summary_item, null);
break;
case NewsType.CONTENT:
convertView = mInflater.inflate(R.layout.news_content_item, null);
break;
case NewsType.IMG:
convertView = mInflater.inflate(R.layout.news_content_img_item, null);
break;
default://NewsType.BOLD_TITLE
convertView = mInflater.inflate(R.layout.news_content_bold_title_item, null);
break;
}
//将创建的View注册点击事件
return new NewContentAdapter.ViewHolder(convertView);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
News news = mDatas.get(position);
switch (news.getType()){
case NewsType.IMG:
// imageLoader.displayImage(news.getImageLink(), holder.mImageView, options);
break;
case NewsType.TITLE:
// holder.mTextView.setText(news.getTitle());
break;
case NewsType.SUMMARY:
holder.mTextView.setText(news.getSummary());
break;
case NewsType.CONTENT:
holder.mTextView.setText(Html.fromHtml(news.getContent()));
break;
case NewsType.BOLD_TITLE:
holder.mTextView.setText(Html.fromHtml(news.getContent()));
default:
break;
}
}
@Override
public int getItemViewType(int position) {
switch (mDatas.get(position).getType()) {
case NewsType.TITLE:
return 0;
case NewsType.SUMMARY:
return 1;
case NewsType.CONTENT:
return 2;
case NewsType.IMG:
return 3;
case NewsType.BOLD_TITLE:
return 4;
}
return -1;
}
public class ViewHolder extends RecyclerView.ViewHolder{
TextView mTextView;
ImageView mImageView;
public ViewHolder(View itemView) {
super(itemView);
mTextView = (TextView) itemView.findViewById(R.id.text);
mImageView = (ImageView) itemView.findViewById(R.id.imageView);
}
}
}
|
[
"546024423@qq.com"
] |
546024423@qq.com
|
4d08a63eba94a6ea59483ddf40a622f25b6efc13
|
34bb6be9f81d8a052d05318ab7cd63eadf4bf9c2
|
/student-gateway/src/main/java/com/microservice/gateway/student/security/SpringSecurityAuditorAware.java
|
747ba8a1edf70df6297063c099c4cd07f8bbd167
|
[] |
no_license
|
jreyesromero/jhipster-microservices
|
4a3786f22e44bb8c9dcecb737bf78d6e65bc9aaa
|
b809f19226487f5617f7915143542525624f994f
|
refs/heads/master
| 2021-01-18T13:16:21.511903
| 2017-03-10T17:08:13
| 2017-03-10T17:08:13
| 80,745,458
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 564
|
java
|
package com.microservice.gateway.student.security;
import com.microservice.gateway.student.config.Constants;
import org.springframework.data.domain.AuditorAware;
import org.springframework.stereotype.Component;
/**
* Implementation of AuditorAware based on Spring Security.
*/
@Component
public class SpringSecurityAuditorAware implements AuditorAware<String> {
@Override
public String getCurrentAuditor() {
String userName = SecurityUtils.getCurrentUserLogin();
return userName != null ? userName : Constants.SYSTEM_ACCOUNT;
}
}
|
[
"vagrant@vagrant.vm"
] |
vagrant@vagrant.vm
|
904ae8d2d4f3d1f87a801bc4d7e3a0e43e41c289
|
c68d8507620d3b9f0c04745245bd4f77a5fec9ea
|
/src/test/java/com/netflix/astyanax/fake/TestConnectionPool.java
|
10599a95e8c2210c8acd3d76ad7aa242a111ac30
|
[
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] |
permissive
|
arankin/astyanax
|
e039d70a200682bf3b8dbfc61fc22548000f0925
|
0157d6409b9d587d711db2cfb172d329fa85302d
|
refs/heads/master
| 2021-01-18T09:14:03.465244
| 2012-03-02T18:35:31
| 2012-03-02T18:35:31
| 3,541,178
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,453
|
java
|
/*******************************************************************************
* Copyright 2011 Netflix
*
* 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.netflix.astyanax.fake;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;
import com.netflix.astyanax.connectionpool.ConnectionPool;
import com.netflix.astyanax.connectionpool.Host;
import com.netflix.astyanax.connectionpool.HostConnectionPool;
import com.netflix.astyanax.connectionpool.Operation;
import com.netflix.astyanax.connectionpool.OperationResult;
import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
import com.netflix.astyanax.connectionpool.exceptions.OperationException;
import com.netflix.astyanax.retry.RetryPolicy;
public class TestConnectionPool implements ConnectionPool<TestClient> {
Map<BigInteger, List<Host>> ring;
public Map<BigInteger, List<Host>> getHosts() {
return this.ring;
}
@Override
public boolean addHost(Host host, boolean refresh) {
return true;
}
@Override
public boolean removeHost(Host host, boolean refresh) {
return true;
}
@Override
public void setHosts(Map<BigInteger, List<Host>> ring) {
this.ring = ring;
}
@Override
public <R> OperationResult<R> executeWithFailover(
Operation<TestClient, R> op, RetryPolicy retry) throws ConnectionException,
OperationException {
// TODO Auto-generated method stub
return null;
}
@Override
public void shutdown() {
}
@Override
public void start() {
}
@Override
public boolean isHostUp(Host host) {
return false;
}
@Override
public boolean hasHost(Host host) {
return false;
}
@Override
public HostConnectionPool<TestClient> getHostPool(Host host) {
return null;
}
@Override
public List<HostConnectionPool<TestClient>> getActivePools() {
// TODO Auto-generated method stub
return null;
}
}
|
[
"elandau@yahoo.com"
] |
elandau@yahoo.com
|
3ff0eeee02a3a1901ecd024b4b27ab90474a3edd
|
f127d54e14b4b7ad7c5e04a84f27254fca273847
|
/src/org/mindinformatics/gwt/domeo/plugins/annotation/micropubs/serialization/JsoMicroPublicationAnnotation.java
|
88f02941fec8ce1214e45d7eff39a51ab21d27d7
|
[
"Apache-2.0"
] |
permissive
|
rkboyce/DomeoClient
|
98674b8c043c60182479b4799da8ff12ae9fdd27
|
f247733cc9a67c34d0d983defcec74124c3b0dc5
|
refs/heads/master
| 2020-12-25T03:21:00.695112
| 2015-11-19T20:50:22
| 2015-11-19T20:50:22
| 10,744,526
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,958
|
java
|
package org.mindinformatics.gwt.domeo.plugins.annotation.micropubs.serialization;
import java.util.Date;
import org.mindinformatics.gwt.domeo.plugins.persistence.json.model.JsAnnotationTarget;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.i18n.client.DateTimeFormat;
/**
* @author Paolo Ciccarese <paolo.ciccarese@gmail.com>
*/
public class JsoMicroPublicationAnnotation extends JavaScriptObject {
protected JsoMicroPublicationAnnotation() {};
// ------------------------------------------------------------------------
// Identity
// ------------------------------------------------------------------------
public final native String getId() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IDomeoOntology::generalId];
}-*/;
// ------------------------------------------------------------------------
// General (RDFS and Dublin Core Terms
// ------------------------------------------------------------------------
public final native String getLabel() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IRdfsOntology::label];
}-*/;
// ------------------------------------------------------------------------
// PAV (Provenance, Authoring and Versioning) Ontology
// ------------------------------------------------------------------------
public final native String getCreatedOn() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IPavOntology::createdOn];
}-*/;
public final native String getCreatedBy() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IPavOntology::createdBy];
}-*/;
public final native String getCreatedWith() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IPavOntology::createdWith];
}-*/;
public final native String getLastSaved() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IPavOntology::lastSavedOn];
}-*/;
public final native String getVersionNumber() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IPavOntology::versionNumber];
}-*/;
public final native String getPreviousVersion() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IPavOntology::previousVersion];
}-*/;
public final native String getLineageUri() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IPavOntology::lineageUri];
}-*/;
public final Date getFormattedCreatedOn() {
DateTimeFormat fmt = DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss Z");
return fmt.parse(getCreatedOn());
}
public final Date getFormattedLastSaved() {
DateTimeFormat fmt = DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss Z");
return fmt.parse(getLastSaved());
}
// ------------------------------------------------------------------------
// Annotation Ontology
// ------------------------------------------------------------------------
public final native JsArray<JsAnnotationTarget> getTargets() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IDomeoOntology::hasTarget];
}-*/;
public final native JsArray<JsoMicroPublication> getBody() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IDomeoOntology::content];
}-*/;
// ------------------------------------------------------------------------
// Permissions Ontology
// ------------------------------------------------------------------------
public final native boolean isLocked() /*-{
return this[@org.mindinformatics.gwt.domeo.model.persistence.ontologies.IPermissionsOntology::isLocked];
}-*/;
public final native String getTitle() /*-{ return this.domeo_title; }-*/;
public final native String getType() /*-{ return this.domeo_postItType; }-*/;
}
|
[
"paolo.ciccarese@gmail.com"
] |
paolo.ciccarese@gmail.com
|
50b9753711c6766a6727cfd8c18c5c53f3f9d1d0
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/33_javaviewcontrol-com.pmdesigns.jvc.tools.JVCBootstrapGenerator-0.5-7/com/pmdesigns/jvc/tools/JVCBootstrapGenerator_ESTest.java
|
45b558674f9982b57488c64edcc4d626a9e41612
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 671
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Oct 29 15:08:08 GMT 2019
*/
package com.pmdesigns.jvc.tools;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class JVCBootstrapGenerator_ESTest extends JVCBootstrapGenerator_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
5ed0775f05edc3377aadfad1ab3b60548f4017ba
|
86215bd7ab2457497727be0193d3960feec3b524
|
/demo-fpml/src/main/generated-source/org/fpml/reporting/Currency.java
|
18c4d573be360789ed9fda4d1fe7d3fe0a20588b
|
[] |
no_license
|
prasobhpk/stephennimmo-templates
|
4770d5619488fe39ffa289b6ede36578c29d6c4d
|
ce2b04c09b6352311df65ad8643f682452f9d6a7
|
refs/heads/master
| 2016-09-11T13:47:44.366025
| 2013-08-21T18:29:55
| 2013-08-21T18:29:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,301
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
// 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: 2011.06.01 at 08:58:10 AM CDT
//
package org.fpml.reporting;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* The code representation of a currency or fund. By default it is a valid currency code as defined by the ISO standard 4217 - Codes for representation of currencies and funds http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html.
*
* <p>Java class for Currency complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="Currency">
* <simpleContent>
* <extension base="<http://www.fpml.org/FpML-5/reporting>Scheme">
* <attribute name="currencyScheme" type="{http://www.w3.org/2001/XMLSchema}anyURI" default="http://www.fpml.org/ext/iso4217-2001-08-15" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Currency", propOrder = {
"value"
})
@XmlSeeAlso({
IdentifiedCurrency.class
})
public class Currency implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlValue
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String value;
@XmlAttribute
@XmlSchemaType(name = "anyURI")
protected String currencyScheme;
/**
* The base class for all types which define coding schemes.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the currencyScheme property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCurrencyScheme() {
if (currencyScheme == null) {
return "http://www.fpml.org/ext/iso4217-2001-08-15";
} else {
return currencyScheme;
}
}
/**
* Sets the value of the currencyScheme property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCurrencyScheme(String value) {
this.currencyScheme = value;
}
}
|
[
"stephennimmo@gmail.com@ea902603-27ce-0092-70ca-3da810587992"
] |
stephennimmo@gmail.com@ea902603-27ce-0092-70ca-3da810587992
|
7591855aef0c44a4ed18bfa33c4820c5fa3c7759
|
2eabca5167cc1d5c669c35febdd9574a7e0392a9
|
/src/main/java/com/waylau/lite/news/security/WebSecurityConfig.java
|
e09fb35259be8ab575da9f78e8166b3cc07736b8
|
[] |
no_license
|
waylau/lite-news-server
|
de9a6bf136ebe2c34de63e2daf544a613eef16f8
|
5a4de8c2bfa4a739bda7a8ae9a16727d18f83eee
|
refs/heads/master
| 2020-03-26T19:49:26.892579
| 2019-02-14T18:12:22
| 2019-02-14T18:12:22
| 145,288,885
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,732
|
java
|
/**
* Welcome to https://waylau.com
*/
package com.waylau.lite.news.security;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.Order;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
/**
* Spring Security Configuration.
*
* @since 1.0.0 2019年1月31日
* @author <a href="https://waylau.com">Way Lau</a>
*/
@EnableWebSecurity // 启用Spring Security功能
@Order(1) // 覆盖Lite框架里面的配置
public class WebSecurityConfig
extends WebSecurityConfigurerAdapter {
@Autowired
private UserDetailsService userDetailsService;
@Autowired
private PasswordEncoder passwordEncoder;
@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder(); // 使用 BCrypt 加密
}
@Bean
public AuthenticationProvider authenticationProvider() {
DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider();
authenticationProvider.setUserDetailsService(userDetailsService);
authenticationProvider.setPasswordEncoder(passwordEncoder); // 设置密码加密方式
return authenticationProvider;
}
/**
* 认证信息管理
* @param auth
* @throws Exception
*/
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(userDetailsService);
auth.authenticationProvider(authenticationProvider());
}
/**
* 自定义配置
*/
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().antMatchers("/css/**", "/js/**", "/fonts/**", "/index").permitAll() // 都可以访问
.antMatchers("/admins/**").hasRole("ADMIN") // 需要相应的角色才能访问
//.and()
//.formLogin() //基于 Form 表单登录验证
.and()
.httpBasic(); // HTTP基本认证
http.csrf().disable(); // 禁用CSRF
}
}
|
[
"waylau521@gmail.com"
] |
waylau521@gmail.com
|
84019cd842deeb2a232b5361140ccbd8bbbd882f
|
1caf423dc5eeb40df34e0b75c08900562f881d66
|
/stratosphere-runtime/src/test/java/eu/stratosphere/pact/runtime/test/util/UniformIntPairGenerator.java
|
bf8f93161ca64512ea08697a2b79528bdd673e51
|
[] |
no_license
|
tuantrieu/stratosphere-1
|
50e3ccee0f3dcd568e57b2ad2a03609e0de31aa7
|
58c7babd2a120ce9cb7d410a9dfe1d2ff4ee831d
|
refs/heads/master
| 2021-01-22T19:14:38.365217
| 2014-03-18T15:26:07
| 2014-03-18T15:26:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,837
|
java
|
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
*
* 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 eu.stratosphere.pact.runtime.test.util;
import eu.stratosphere.pact.runtime.test.util.types.IntPair;
import eu.stratosphere.util.MutableObjectIterator;
public class UniformIntPairGenerator implements MutableObjectIterator<IntPair>
{
final int numKeys;
final int numVals;
int keyCnt = 0;
int valCnt = 0;
boolean repeatKey;
public UniformIntPairGenerator(int numKeys, int numVals, boolean repeatKey) {
this.numKeys = numKeys;
this.numVals = numVals;
this.repeatKey = repeatKey;
}
@Override
public boolean next(IntPair target) {
if(!repeatKey) {
if(valCnt >= numVals) {
return false;
}
target.setKey(keyCnt++);
target.setValue(valCnt);
if(keyCnt == numKeys) {
keyCnt = 0;
valCnt++;
}
} else {
if(keyCnt >= numKeys) {
return false;
}
target.setKey(keyCnt);
target.setValue(valCnt++);
if(valCnt == numVals) {
valCnt = 0;
keyCnt++;
}
}
return true;
}
}
|
[
"stephan.ewen@tu-berlin.de"
] |
stephan.ewen@tu-berlin.de
|
48e88fe1b6f48f3e2d704d39f82224eeb99f4922
|
f2b6d20a53b6c5fb451914188e32ce932bdff831
|
/src/com/linkedin/android/pegasus/gen/voyager/entities/shared/JobApplyingInfoBuilder.java
|
e990c976e3f1934b01b1bf8218910688b514f7ed
|
[] |
no_license
|
reverseengineeringer/com.linkedin.android
|
08068c28267335a27a8571d53a706604b151faee
|
4e7235e12a1984915075f82b102420392223b44d
|
refs/heads/master
| 2021-04-09T11:30:00.434542
| 2016-07-21T03:54:43
| 2016-07-21T03:54:43
| 63,835,028
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,810
|
java
|
package com.linkedin.android.pegasus.gen.voyager.entities.shared;
import com.linkedin.android.fission.interfaces.FissileDataModelBuilder;
import com.linkedin.android.fission.interfaces.FissionAdapter;
import com.linkedin.android.fission.interfaces.FissionTransaction;
import com.linkedin.android.pegasus.gen.common.Urn;
import com.linkedin.android.pegasus.gen.common.UrnCoercer;
import com.linkedin.data.lite.DataReader;
import com.linkedin.data.lite.DataReaderException;
import com.linkedin.data.lite.DataTemplateBuilder;
import com.linkedin.data.lite.HashStringKeyStore;
import com.linkedin.data.lite.JsonKeyStore;
import java.io.IOException;
import java.nio.ByteBuffer;
public final class JobApplyingInfoBuilder
implements FissileDataModelBuilder<JobApplyingInfo>, DataTemplateBuilder<JobApplyingInfo>
{
public static final JobApplyingInfoBuilder INSTANCE = new JobApplyingInfoBuilder();
private static final JsonKeyStore JSON_KEY_STORE;
static
{
HashStringKeyStore localHashStringKeyStore = new HashStringKeyStore();
JSON_KEY_STORE = localHashStringKeyStore;
localHashStringKeyStore.put("entityUrn");
JSON_KEY_STORE.put("applied");
JSON_KEY_STORE.put("appliedTime");
JSON_KEY_STORE.put("appliedAt");
}
public static JobApplyingInfo build(DataReader paramDataReader)
throws DataReaderException
{
Object localObject = null;
boolean bool5 = false;
long l2 = 0L;
long l1 = 0L;
boolean bool3 = false;
boolean bool4 = false;
boolean bool2 = false;
boolean bool1 = false;
paramDataReader.startRecord();
while (paramDataReader.hasMoreFields$255f299()) {
if (paramDataReader.shouldReadField$11ca93e7("entityUrn", JSON_KEY_STORE))
{
paramDataReader.startField();
localObject = UrnCoercer.INSTANCE;
localObject = UrnCoercer.coerceToCustomType(paramDataReader.readString());
bool3 = true;
}
else if (paramDataReader.shouldReadField$11ca93e7("applied", JSON_KEY_STORE))
{
paramDataReader.startField();
bool5 = paramDataReader.readBoolean();
bool4 = true;
}
else if (paramDataReader.shouldReadField$11ca93e7("appliedTime", JSON_KEY_STORE))
{
paramDataReader.startField();
l2 = paramDataReader.readLong();
bool2 = true;
}
else if (paramDataReader.shouldReadField$11ca93e7("appliedAt", JSON_KEY_STORE))
{
paramDataReader.startField();
l1 = paramDataReader.readLong();
bool1 = true;
}
else
{
paramDataReader.skipField();
}
}
if (!bool4) {
throw new DataReaderException("Failed to find required field: applied when building com.linkedin.android.pegasus.gen.voyager.entities.shared.JobApplyingInfo");
}
return new JobApplyingInfo((Urn)localObject, bool5, l2, l1, bool3, bool4, bool2, bool1);
}
public static JobApplyingInfo readFromFission(FissionAdapter paramFissionAdapter, ByteBuffer paramByteBuffer, String paramString, FissionTransaction paramFissionTransaction)
throws IOException
{
if ((paramByteBuffer == null) && (paramString == null)) {
throw new IOException("Cannot read without at least one of key or input byteBuffer when building JobApplyingInfo");
}
ByteBuffer localByteBuffer = paramByteBuffer;
if (paramString != null)
{
paramString = paramFissionAdapter.readFromCache(paramString, paramFissionTransaction);
if (paramString == null) {
return null;
}
int i = paramString.get();
int j;
do
{
do
{
localObject = paramString;
if (i != 0) {
break;
}
localObject = paramFissionAdapter.readString(paramString);
paramFissionAdapter.recycle(paramString);
localObject = paramFissionAdapter.readFromCache((String)localObject, paramFissionTransaction);
if (localObject == null) {
return null;
}
j = ((ByteBuffer)localObject).get();
paramString = (String)localObject;
i = j;
} while (j == 1);
paramString = (String)localObject;
i = j;
} while (j == 0);
paramFissionAdapter.recycle((ByteBuffer)localObject);
throw new IOException("Invalid header prefix. Can't read cached data when building JobApplyingInfo");
}
Object localObject = localByteBuffer;
if (localByteBuffer.get() != 1)
{
paramFissionAdapter.recycle(localByteBuffer);
throw new IOException("Invalid header prefix. Can't read cached data when building JobApplyingInfo");
}
if (((ByteBuffer)localObject).getInt() != 1046571988)
{
paramFissionAdapter.recycle((ByteBuffer)localObject);
throw new IOException("UID mismatch. Can't read cached data when building JobApplyingInfo");
}
paramString = null;
boolean bool1 = false;
long l1 = 0L;
long l2 = 0L;
boolean bool2;
boolean bool3;
label253:
label270:
boolean bool4;
if (((ByteBuffer)localObject).get() == 1)
{
bool2 = true;
if (bool2)
{
paramString = UrnCoercer.INSTANCE;
paramString = UrnCoercer.coerceToCustomType(paramFissionAdapter.readString((ByteBuffer)localObject));
}
if (((ByteBuffer)localObject).get() != 1) {
break label351;
}
bool3 = true;
if (bool3)
{
if (((ByteBuffer)localObject).get() != 1) {
break label357;
}
bool1 = true;
}
if (((ByteBuffer)localObject).get() != 1) {
break label363;
}
bool4 = true;
label282:
if (bool4) {
l1 = ((ByteBuffer)localObject).getLong();
}
if (((ByteBuffer)localObject).get() != 1) {
break label369;
}
}
label351:
label357:
label363:
label369:
for (boolean bool5 = true;; bool5 = false)
{
if (bool5) {
l2 = ((ByteBuffer)localObject).getLong();
}
if (paramByteBuffer == null) {
paramFissionAdapter.recycle((ByteBuffer)localObject);
}
if (bool3) {
break label375;
}
throw new IOException("Failed to find required field: applied when reading com.linkedin.android.pegasus.gen.voyager.entities.shared.JobApplyingInfo from fission.");
bool2 = false;
break;
bool3 = false;
break label253;
bool1 = false;
break label270;
bool4 = false;
break label282;
}
label375:
return new JobApplyingInfo(paramString, bool1, l1, l2, bool2, bool3, bool4, bool5);
}
}
/* Location:
* Qualified Name: com.linkedin.android.pegasus.gen.voyager.entities.shared.JobApplyingInfoBuilder
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
b061f08d95bb201f2255d2892a4ebbb521401e03
|
03e77254906627f81d7918f2a050d2d25e0c0075
|
/tests/unit_Java/org/fudgemsg/proto/PolymorphismTest.java
|
d4a39e0c444daa38f672298a86d359fe7fd73b42
|
[
"Apache-2.0"
] |
permissive
|
sparks1372/Fudge-Proto
|
8d296b8b4f3bbe4e47b5ef7d677f8b10b0d69294
|
741623fa40b6a6ca1d4d1065a35991fd4765107c
|
refs/heads/master
| 2021-01-16T21:26:03.877122
| 2011-03-07T11:27:58
| 2011-03-07T11:27:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,687
|
java
|
/* Copyright 2009 by OpenGamma Inc and other contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.fudgemsg.proto;
import static org.junit.Assert.assertEquals;
import org.fudgemsg.FudgeContext;
import org.fudgemsg.FudgeFieldContainer;
import org.fudgemsg.proto.tests.polymorphism.M1;
import org.fudgemsg.proto.tests.polymorphism.M2;
import org.fudgemsg.proto.tests.polymorphism.M3;
import org.fudgemsg.proto.tests.polymorphism.M4;
import org.junit.Test;
public class PolymorphismTest {
@Test
public void testMessage () {
M1 m1 = new M1 ();
m1.setId ("this is M1");
M2 m2 = new M2 ();
m2.setId ("this is M2");
m2.setFoo ("hello");
M3 m3 = new M3 ();
m3.setId ("this is M3");
m3.setBar ("world");
M4 m4 = new M4 ();
m4.setFoo (m2);
m4.setBar (m3);
m4.setOther (m1);
FudgeFieldContainer c = m4.toFudgeMsg (FudgeContext.GLOBAL_DEFAULT);
System.out.println ("M4=" + c);
M4 m_out = M4.fromFudgeMsg (c);
assertEquals (M2.class, m_out.getFoo ().getClass ());
assertEquals (M3.class, m_out.getBar ().getClass ());
assertEquals (M1.class, m_out.getOther ().getClass ());
}
}
|
[
"andrew@opengamma.com"
] |
andrew@opengamma.com
|
902e4dd59e5998f442089b805b05aeb7599d705f
|
5877c1186447bb5b835ec57d177c30e3f5a36c55
|
/app/src/main/java/com/finance/ymt/sgr/finance/model/GsonTip.java
|
7548b73fedfa8b353f89e174e06666c68a524f91
|
[] |
no_license
|
514721857/Finance
|
23002f972bf24ea0932d25132a3ee88b5d4dfe50
|
2d9fb85b769d1b81ebf00456cc4d0e9ab1922384
|
refs/heads/master
| 2020-03-21T00:47:53.671012
| 2018-12-06T14:33:23
| 2018-12-06T14:33:23
| 137,910,398
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 785
|
java
|
package com.finance.ymt.sgr.finance.model;
/**
* Data:2018/11/27/027-16:49
* By 沈国荣
* Description:推送过来的json数据
*/
public class GsonTip {
String orderId;
int type;
String shopId;
int status;
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getShopId() {
return shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
}
|
[
"2090161812@qq.com"
] |
2090161812@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.