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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
69385ecd13ea4f8c0f90ae7a921e81381f9e4bb1 | 6ef4869c6bc2ce2e77b422242e347819f6a5f665 | /devices/google/Pixel 2/29/QPP6.190730.005/src/framework/com/android/internal/telephony/CallInfo.java | 5dcb75f016fd669f0284bdb36fce6e6de97d4033 | [] | no_license | hacking-android/frameworks | 40e40396bb2edacccabf8a920fa5722b021fb060 | 943f0b4d46f72532a419fb6171e40d1c93984c8e | refs/heads/master | 2020-07-03T19:32:28.876703 | 2019-08-13T03:31:06 | 2019-08-13T03:31:06 | 202,017,534 | 2 | 0 | null | 2019-08-13T03:33:19 | 2019-08-12T22:19:30 | Java | UTF-8 | Java | false | false | 884 | java | /*
* Decompiled with CFR 0.145.
*/
package com.android.internal.telephony;
import android.os.Parcel;
import android.os.Parcelable;
public class CallInfo
implements Parcelable {
public static final Parcelable.Creator<CallInfo> CREATOR = new Parcelable.Creator<CallInfo>(){
@Override
public CallInfo createFromParcel(Parcel parcel) {
return new CallInfo(parcel.readString());
}
public CallInfo[] newArray(int n) {
return new CallInfo[n];
}
};
private String handle;
public CallInfo(String string2) {
this.handle = string2;
}
@Override
public int describeContents() {
return 0;
}
public String getHandle() {
return this.handle;
}
@Override
public void writeToParcel(Parcel parcel, int n) {
parcel.writeString(this.handle);
}
}
| [
"me@paulo.costa.nom.br"
] | me@paulo.costa.nom.br |
1d0ebc100e93f7cedc8fffbe3d42cbc1f77eb530 | 9254e7279570ac8ef687c416a79bb472146e9b35 | /r-kvstore-20150101/src/main/java/com/aliyun/r_kvstore20150101/models/ResetAccountPasswordRequest.java | 68ca5c09474ad9cb71b21c137087e3002673472c | [
"Apache-2.0"
] | permissive | lquterqtd/alibabacloud-java-sdk | 3eaa17276dd28004dae6f87e763e13eb90c30032 | 3e5dca8c36398469e10cdaaa34c314ae0bb640b4 | refs/heads/master | 2023-08-12T13:56:26.379027 | 2021-10-19T07:22:15 | 2021-10-19T07:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,781 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.r_kvstore20150101.models;
import com.aliyun.tea.*;
public class ResetAccountPasswordRequest extends TeaModel {
@NameInMap("SecurityToken")
public String securityToken;
@NameInMap("OwnerId")
public Long ownerId;
@NameInMap("ResourceOwnerAccount")
public String resourceOwnerAccount;
@NameInMap("ResourceOwnerId")
public Long resourceOwnerId;
@NameInMap("OwnerAccount")
public String ownerAccount;
@NameInMap("InstanceId")
public String instanceId;
@NameInMap("AccountName")
public String accountName;
@NameInMap("AccountPassword")
public String accountPassword;
public static ResetAccountPasswordRequest build(java.util.Map<String, ?> map) throws Exception {
ResetAccountPasswordRequest self = new ResetAccountPasswordRequest();
return TeaModel.build(map, self);
}
public ResetAccountPasswordRequest setSecurityToken(String securityToken) {
this.securityToken = securityToken;
return this;
}
public String getSecurityToken() {
return this.securityToken;
}
public ResetAccountPasswordRequest setOwnerId(Long ownerId) {
this.ownerId = ownerId;
return this;
}
public Long getOwnerId() {
return this.ownerId;
}
public ResetAccountPasswordRequest setResourceOwnerAccount(String resourceOwnerAccount) {
this.resourceOwnerAccount = resourceOwnerAccount;
return this;
}
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
public ResetAccountPasswordRequest setResourceOwnerId(Long resourceOwnerId) {
this.resourceOwnerId = resourceOwnerId;
return this;
}
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
public ResetAccountPasswordRequest setOwnerAccount(String ownerAccount) {
this.ownerAccount = ownerAccount;
return this;
}
public String getOwnerAccount() {
return this.ownerAccount;
}
public ResetAccountPasswordRequest setInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
public String getInstanceId() {
return this.instanceId;
}
public ResetAccountPasswordRequest setAccountName(String accountName) {
this.accountName = accountName;
return this;
}
public String getAccountName() {
return this.accountName;
}
public ResetAccountPasswordRequest setAccountPassword(String accountPassword) {
this.accountPassword = accountPassword;
return this;
}
public String getAccountPassword() {
return this.accountPassword;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
a4d67aefcdd59ee222d4ee7c4b44dde37d8efcd3 | 7af9a322cbbab1eac9c70ade4b1be266c3392665 | /src/main/java/stringbuilder/PalindromeValidator.java | f97bc8e90fe183550cf0c7e54678b5700ace7d67 | [] | no_license | henimia/training-solutions | 3ac8335120f5fa0b8979997bb29933a0683ded12 | 6fdbfd49baac584266b86c9dc35a9f6a7d1826eb | refs/heads/master | 2023-03-25T04:25:14.148219 | 2021-03-16T10:01:15 | 2021-03-16T10:01:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 415 | java | package stringbuilder;
public class PalindromeValidator {
public boolean isPalindrome(String word) {
if (word == null || "".equals(word)) {
throw new IllegalArgumentException("Text cannot not be empty");
}
word = word.trim();
StringBuilder stringbuilder = new StringBuilder(word);
return word.equalsIgnoreCase(stringbuilder.reverse().toString());
}
}
| [
"66733574+manikola@users.noreply.github.com"
] | 66733574+manikola@users.noreply.github.com |
14b21d68561b6016cb3af7195996f0d009014cf3 | 7f777e6eb1c327c2ed580ca08000914c888f0b3c | /ruoyi-admin/src/main/java/com/ruoyi/web/controller/SendSmsUtil/Config.java | 45ddca32fe190ff308485c488450c9951cb7fab3 | [
"MIT"
] | permissive | asjc/baohan2 | c9bc29071be632384237454e609bd65717532e89 | 02f215264ac44f82b63178c7f36e8ea95b5456c7 | refs/heads/master | 2022-09-19T19:08:48.916790 | 2019-07-12T10:00:54 | 2019-07-12T10:00:54 | 196,554,554 | 0 | 0 | MIT | 2022-09-01T23:10:03 | 2019-07-12T09:52:47 | HTML | UTF-8 | Java | false | false | 685 | java | package com.ruoyi.web.controller.SendSmsUtil;
/**
* 系统常量
*/
public class Config
{
/**
* url前半部分
*/
public static final String BASE_URL = "https://api.miaodiyun.com/20150822";
/**
* 开发者注册后系统自动生成的账号,可在官网登录后查看
*/
public static final String ACCOUNT_SID = "540b17629eab40f289562c744381c6db";
/**
* 开发者注册后系统自动生成的TOKEN,可在官网登录后查看
*/
public static final String AUTH_TOKEN = "7c614963036b4b2a804470e688763e9b";
/**
* 响应数据类型, JSON或XML
*/
public static final String RESP_DATA_TYPE = "json";
} | [
"you@example.com"
] | you@example.com |
2fb6060c6a2e76d0c7269b24d30502c5bd5951a0 | 6544a1e9412e4e9f9f879705ceb68f87a56c35f9 | /GoalGroup_Android/src/com/goalgroup/utils/NetworkUtil.java | 9a7df0c0509f5fc66735ee0e398956e237257e09 | [] | no_license | caesarmarx/GoalGroup | 4c8ff5d74fd448594b6704b228b7c5d2adc4228b | 9944899d21a7df74e5b495c28db0751adc6764fa | refs/heads/master | 2018-04-10T13:19:42.562599 | 2017-05-02T09:52:10 | 2017-05-02T09:52:10 | 89,854,071 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 929 | java | package com.goalgroup.utils;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.widget.Toast;
import com.goalgroup.R;
public class NetworkUtil {
public static boolean isNetworkAvailable(Context context) {
ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo[] info = connMgr.getAllNetworkInfo();
boolean state = false;
if (info != null) {
for (int i = 0; i < info.length; i++) {
if (info[i].getState() == NetworkInfo.State.CONNECTED) {
state = true;
break;
}
}
}
if (!state) {
Toast.makeText(context, context.getString(R.string.none_network), Toast.LENGTH_SHORT).show();
}
return state;
}
}
| [
"grigarthur@outlook.com"
] | grigarthur@outlook.com |
4ae589149d8e77034a658806864d06da235b2dc9 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /single-medium-project/src/test/java/org/gradle/test/performancenull_37/Testnull_3664.java | b78e4a39bce922b26f881c7a85aef7ef042f3587 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 304 | java | package org.gradle.test.performancenull_37;
import static org.junit.Assert.*;
public class Testnull_3664 {
private final Productionnull_3664 production = new Productionnull_3664("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
d96d4deaf124dc3f37285888352e88cd6ec73fa4 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/19/org/jfree/chart/axis/Axis_isAxisLineVisible_547.java | 811cd69c3c7f7ac2604d59ee40d1547744a894ec | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,713 | java |
org jfree chart axi
base ax free chart jfreechart subclass divid
displai valu link axi valueaxi displai
categori link categori axi categoryaxi
axi cloneabl serializ
flag control axi line drawn
axi line paint getaxislinepaint
axi line stroke getaxislinestrok
set axi line visibl setaxislinevis
axi line visibl isaxislinevis
axi line visibl axislinevis
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
16696868386b111ba7b574b9a795e5d3ae5ab2e3 | d866c060f4752eafb10664b0855e02d112537788 | /webuy-backstage/src/main/java/com/weweibuy/webuy/backstage/config/WebSocketConfig.java | 4fd12cf7c080f1b2ad0839b723569793286879a4 | [] | no_license | weweibuy/weweibuy | 75910a4fa229efda39b626740f0f8138db4d4cb2 | d48ec7ce9135293991703ecfae4bfc3b08112e85 | refs/heads/master | 2023-07-20T06:27:57.327861 | 2022-12-24T14:13:16 | 2022-12-24T14:13:16 | 150,745,949 | 14 | 5 | null | 2023-09-05T22:03:32 | 2018-09-28T13:37:34 | Java | UTF-8 | Java | false | false | 510 | java | package com.weweibuy.webuy.backstage.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
/**
* @ClassName WebSocketConfig
* @Description
* @Author durenhao
* @Date 2019/3/17 21:13
**/
@Configuration
public class WebSocketConfig {
@Bean
public ServerEndpointExporter serverEndpointExporter() {
return new ServerEndpointExporter();
}
}
| [
"ak514250@126.com"
] | ak514250@126.com |
c00d5575fc6a34798732f1fa722b97d1a795c824 | 8799ac7be9e0fe8a80ea2ae002beb7a68a1a4392 | /Algorithm/BaekJoon Algorithm/BJ2744.java | 99196235c2d42086a6327e070b68234e5b54fa2e | [] | no_license | jeon9825/TIP | c45f73db7e1f9dffc8edf5a4268f0d7ee14e6709 | fc8067e4597189b1762453ed29ba91d000e03160 | refs/heads/master | 2021-08-18T10:00:26.373784 | 2021-08-05T13:52:42 | 2021-08-05T13:52:42 | 174,329,195 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 560 | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class BJ2744 {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s = reader.readLine();
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if ('A' <= c && c <= 'Z')
System.out.print(String.valueOf(c).toLowerCase());
else if ('a' <= c && c <= 'z')
System.out.print(String.valueOf(c).toUpperCase());
}
}
}
| [
"jeon9825@naver.com"
] | jeon9825@naver.com |
a2c1f8e4330550f328a74fd703b25abeca482474 | f29f8f1fc8a23ef96e4c359afb82eeb5622756bf | /src/main/java/io/github/nucleuspowered/nucleus/modules/info/handlers/InfoHelper.java | 15c5aaa1c281ca292a456fc09f688071b30dc913 | [
"MIT",
"Apache-2.0"
] | permissive | IdrisDose/Nucleus | ccf4684d48b70176a978dcb87ab332c073107e63 | bf1e5260b0832f7fe7cb9d8e7966d254250ccaea | refs/heads/sponge-api/5 | 2021-01-13T03:37:47.058799 | 2016-12-22T17:00:01 | 2016-12-22T17:32:32 | 77,278,336 | 0 | 0 | MIT | 2018-10-18T06:12:56 | 2016-12-24T10:35:34 | Java | UTF-8 | Java | false | false | 2,235 | java | /*
* This file is part of Nucleus, licensed under the MIT License (MIT). See the LICENSE.txt file
* at the root of this project for more details.
*/
package io.github.nucleuspowered.nucleus.modules.info.handlers;
import io.github.nucleuspowered.nucleus.ChatUtil;
import io.github.nucleuspowered.nucleus.internal.TextFileController;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.source.ConsoleSource;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.service.pagination.PaginationList;
import org.spongepowered.api.service.pagination.PaginationService;
import org.spongepowered.api.text.Text;
import org.spongepowered.api.text.format.TextColors;
import org.spongepowered.api.text.serializer.TextSerializers;
import java.util.List;
import java.util.stream.Collectors;
public class InfoHelper {
private static final Text padding = Text.of(TextColors.GOLD, "-");
private static final Text emptyPadding = Text.of(" ");
public static void sendInfo(TextFileController tfc, CommandSource src, ChatUtil chatUtil, String motdTitle) {
sendInfo(tfc.getFileContents(), src, chatUtil, motdTitle);
}
public static List<Text> getTextFromStrings(List<String> tfc, CommandSource src, ChatUtil chatUtil) {
return chatUtil.getMessageFromTemplate(tfc, src, true).stream()
.map(x -> chatUtil.addLinksToText(x, src instanceof Player ? (Player)src : null)).collect(Collectors.toList());
}
public static void sendInfo(List<String> tfc, CommandSource src, ChatUtil chatUtil, String motdTitle) {
// Get the text.
List<Text> textList = getTextFromStrings(tfc, src, chatUtil);
PaginationService ps = Sponge.getServiceManager().provideUnchecked(PaginationService.class);
PaginationList.Builder pb = ps.builder().contents(textList);
if (!motdTitle.isEmpty()) {
pb.title(TextSerializers.FORMATTING_CODE.deserialize(motdTitle)).padding(padding);
} else {
pb.padding(emptyPadding);
}
if (src instanceof ConsoleSource) {
pb.linesPerPage(-1);
}
pb.sendTo(src);
}
} | [
"git@drnaylor.co.uk"
] | git@drnaylor.co.uk |
6583a3dbd1b9d9114afcec66b433c00636570665 | 0f0df09c7a0163b718b35aef58b5fab453e972d3 | /workshop/java/microservices-with-springcloud/examples/oyster-card/src/main/java/com/yauritux/exception/CardException.java | e428639218ad0c62394ebe9feb9792f6d68e0f46 | [] | no_license | yauritux/g2lab | fa79988f4c837554e364bc19a12208a989d894eb | 725b5a417773cd46e9ae488ada34ec096a25a15c | refs/heads/master | 2023-01-10T00:13:23.856487 | 2020-06-06T12:34:32 | 2020-06-06T12:34:32 | 140,901,904 | 0 | 3 | null | 2023-01-04T09:22:03 | 2018-07-13T23:47:17 | Go | UTF-8 | Java | false | false | 284 | java | package com.yauritux.exception;
/**
*
* @author yauritux
* @version 1.0.0
* @since 1.0.0
*
*/
public class CardException extends Exception {
private static final long serialVersionUID = -3150066052679687298L;
public CardException(String message) {
super(message);
}
}
| [
"yauritux@gmail.com"
] | yauritux@gmail.com |
6f839e8c5043434947b866b9ec13bfc2532776aa | 9630c7c54e36bf6f1e5f6921f0890f9725f972b9 | /src/main/java/com/jxf/svc/persistence/dialect/db/SQLServer2005Dialect.java | 28545c8223386b43bc2af933b145ddd0daa29879 | [] | no_license | happyjianguo/wyjt | df1539f6227ff38b7b7990fb0c56d20105d9c0b1 | a5de0f17db2e5e7baf25ea72159e100c656920ea | refs/heads/master | 2022-11-18T01:16:29.783973 | 2020-07-14T10:32:42 | 2020-07-14T10:32:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,237 | java | package com.jxf.svc.persistence.dialect.db;
import org.apache.commons.lang3.StringUtils;
import com.jxf.svc.persistence.dialect.Dialect;
/**
* Sql 2005的方言实现
* @author jxf
* @version 1.0 2015-07-10
*/
public class SQLServer2005Dialect implements Dialect {
@Override
public boolean supportsLimit() {
return true;
}
@Override
public String getLimitString(String sql, int offset, int limit) {
return getLimitString(sql, offset,
limit, Integer.toString(limit));
}
/**
* Add a LIMIT clause to the given SQL SELECT
* <p/>
* The LIMIT SQL will look like:
* <p/>
* WITH query AS
* (SELECT TOP 100 percent ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __row_number__, * from table_name)
* SELECT *
* FROM query
* WHERE __row_number__ BETWEEN :offset and :lastRows
* ORDER BY __row_number__
*
* @param querySqlString The SQL statement to base the limit query off of.
* @param offset Offset of the first row to be returned by the query (zero-based)
* @param limit Maximum number of rows to be returned by the query
* @param limitPlaceholder limitPlaceholder
* @return A new SQL statement with the LIMIT clause applied.
*/
private String getLimitString(String querySqlString, int offset, int limit, String limitPlaceholder) {
StringBuilder pagingBuilder = new StringBuilder();
String orderby = getOrderByPart(querySqlString);
String distinctStr = "";
String loweredString = querySqlString.toLowerCase();
String sqlPartString = querySqlString;
if (loweredString.trim().startsWith("select")) {
int index = 6;
if (loweredString.startsWith("select distinct")) {
distinctStr = "DISTINCT ";
index = 15;
}
sqlPartString = sqlPartString.substring(index);
}
pagingBuilder.append(sqlPartString);
// if no ORDER BY is specified use fake ORDER BY field to avoid errors
if (StringUtils.isEmpty(orderby)) {
orderby = "ORDER BY CURRENT_TIMESTAMP";
}
StringBuilder result = new StringBuilder();
result.append("WITH query AS (SELECT ")
.append(distinctStr)
.append("TOP 100 PERCENT ")
.append(" ROW_NUMBER() OVER (")
.append(orderby)
.append(") as __row_number__, ")
.append(pagingBuilder)
.append(") SELECT * FROM query WHERE __row_number__ BETWEEN ")
.append(offset).append(" AND ").append(offset + limit)
.append(" ORDER BY __row_number__");
return result.toString();
}
static String getOrderByPart(String sql) {
String loweredString = sql.toLowerCase();
int orderByIndex = loweredString.indexOf("order by");
if (orderByIndex != -1) {
// if we find a new "order by" then we need to ignore
// the previous one since it was probably used for a subquery
return sql.substring(orderByIndex);
} else {
return "";
}
}
}
| [
"gbojob@126.com"
] | gbojob@126.com |
dc073aeec24971b4df5e058b924fbb3ce8d1e052 | a78cbb3413a46c8b75ed2d313b46fdd76fff091f | /src/mobius.esc/escjava/tags/escjava-2-0a9/ESCTools/Javafe/test/javafe/test/Print.java | 8fbd0308487d7fb0799b1abb10b13bc2462944b0 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | wellitongb/Mobius | 806258d483bd9b893312d7565661dadbf3f92cda | 4b16bae446ef5b91b65fd248a1d22ffd7db94771 | refs/heads/master | 2021-01-16T22:25:14.294886 | 2013-02-18T20:25:24 | 2013-02-18T20:25:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,438 | java | /* Copyright 2000, 2001, Compaq Computer Corporation */
package javafe.test;
import java.util.Enumeration;
import java.util.Vector;
import javafe.*;
import javafe.ast.*;
import javafe.tc.*;
import javafe.parser.*;
import javafe.util.*;
/**
** <code>Print</code> is a <code>SrcTool</code> that parses input
** file(s) and pretty prints them, optionally doing typechecking on the
** type declarations inside of them.
**/
public class Print extends SrcTool {
/***************************************************
* *
* Generating a usage message: *
* *
***************************************************/
/**
** Return the name of this tool. E.g., "ls" or "cp".<p>
**
** Used in usage and error messages.<p>
**/
public String name() { return "Print"; }
public javafe.Options makeOptions() { return new Options(); }
public final Options options() { return (Options)options; }
public class Options extends SrcToolOptions {
public Options() {
PrettyPrint.displayInferred = false;
}
/**
** Print option information to
** <code>System.err</code>. <p>
**/
public String showOptions(boolean all) {
return super.showOptions(all) +
" -typecheck" + eol +
" -noprint" + eol +
" -printtype" + eol +
" -showinferred" + eol;
}
/***************************************************
* *
* Option processing: *
* *
***************************************************/
private boolean typecheck = false;
private boolean print = true;
private boolean printType = false;
// -showinferred controls PrettyPrint.displayInferred
/**
** Process next tool option. <p>
**
** See <code>Tool.processOption</code> for the complete
** specification of this routine.<p>
**/
public int processOption(String option, String[] args, int offset)
throws UsageError {
if (option.equals("-typecheck")) {
typecheck = true;
return offset;
} else if (option.equals("-noprint")) {
print = false;
return offset;
} else if (option.equals("-printtype")) {
printType = true;
return offset;
} else if (option.equals("-showinferred")) {
PrettyPrint.displayInferred = true;
return offset;
}
// Pass on unrecognized options:
return super.processOption(option, args, offset);
}
}
/***************************************************
* *
* Front-end setup: *
* *
***************************************************/
/**
** Setup: see FrontEnd.setup for original spec. <p>
**
** Print overrides this method to handle printtype.
**/
public void setup() {
super.setup();
if (options().printType) {
TypePrint T = new TypePrint(); //@ nowarn Pre;
PrettyPrint.inst = new StandardPrettyPrint(T);
T.del = PrettyPrint.inst; // Establish del != null
// as required by TypePrint()
}
}
/***************************************************
* *
* Main processing code: *
* *
***************************************************/
/**
** Start up an instance of this tool using command-line arguments
** <code>args</code>. <p>
**
** <b>Note</b>: this code needs to be copied verbatim to each
** subclass of <code>Tool</code> except with the name of the actual
** subclass inserted after the new operator and the comment
** characters (//) removed.<p>
**
** (This needs to be done because static methods cannot be
** inherited.)<p>
**/
//@ requires \nonnullelements(args);
public static void main(String[] args) {
Tool t = new Print();
int result = t.run(args);
if (result != 0) System.exit(result);
}
/***************************************************
* *
* SrcTool-instance specific processing: *
* *
***************************************************/
/**
** This method is called on each <code>CompilationUnit</code>
** that this tool processes. <p>
**/
public void handleCU(CompilationUnit cu) {
if (!options().typecheck)
System.out.println("=== File: " + Location.toFileName(cu.loc)
+" ===");
super.handleCU(cu);
if (options().print) PrettyPrint.inst.print(System.out, cu);
}
/**
** This method is called on the TypeDecl of each
** outside type that SrcTool is to process. <p>
**/
public void handleTD(TypeDecl td) {
td.check();
if (options().typecheck && !td.specOnly) {
TypeCheck.inst.checkTypeDecl(td);
TypeSig sig = TypeSig.getSig(td);
Assert.notFalse(sig.state == TypeSig.CHECKED); //@ nowarn Pre;
if (ErrorSet.errors == 0) {
sig.deepCheck();
td.check();
}
}
}
}
| [
"nobody@c6399e9c-662f-4285-9817-23cccad57800"
] | nobody@c6399e9c-662f-4285-9817-23cccad57800 |
9c871bb17236b6d577982609d9bb1ae554bc35a6 | fea7b8763c948019e2027fe8646dd2f600866ac5 | /src/com/aconic/lessons/Lesson08/OddFrame.java | c1f6caf691ca02c386b8634a321d100662d734c5 | [] | no_license | Aconic/JavaGroupCode | b308151db9b4adaaa9675f88f8269cd4bad2583d | 89558e61bcbc892be092e3bcf8e6d623f294a940 | refs/heads/master | 2021-03-12T19:44:33.164540 | 2015-05-24T13:44:37 | 2015-05-24T13:44:37 | 29,580,520 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 331 | java | package com.aconic.lessons.Lesson08;
import javax.swing.JFrame;
public class OddFrame extends JFrame
{
public OddFrame()
{
setTitle("App for odd calculation");
setDefaultCloseOperation(EXIT_ON_CLOSE);
setBounds(200, 150, 500, 450);
add( new OddPanel() );
setVisible(true);
}
}
| [
"tygreman@gmail.com"
] | tygreman@gmail.com |
389240532b0325743333a6156759a83c7ba5130c | ce2813f714d83602ee9b3b237c7304446ae741da | /src/LINTCODE11/LINTCODE1033.java | 78ab54cbd407aeab97b96ee0dd43f54ad0f51091 | [] | no_license | tmhbatw/LINTCODEANSWER | bc54bb40a4826b0f9aa11aead4d99978a22e1ee8 | 7db879f075cde6e1b2fce86f6a3068e59f4e9b34 | refs/heads/master | 2021-12-13T16:38:05.780408 | 2021-10-09T16:50:59 | 2021-10-09T16:50:59 | 187,010,547 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 798 | java | package LINTCODE11;
import datastructure.TreeNode;
import java.util.ArrayList;
import java.util.List;
public class LINTCODE1033 {
/*Description
* 给定一个确定根的二叉搜索树,返回树中任意两个不同节点的值的最小差。
* */
public int minDiffInBST(TreeNode root) {
List<Integer> value=new ArrayList<>();
inOrder(root,value);
int min=Integer.MAX_VALUE;
for(int i=1;i<value.size();i++){
min=Math.min(min,value.get(i)-value.get(i-1));
}
return min;
// Write your code here
}
private void inOrder(TreeNode root,List<Integer> list){
if(root==null)
return;
inOrder(root.left,list);
list.add(root.val);
inOrder(root.right,list);
}
}
| [
"1060226998@qq.com"
] | 1060226998@qq.com |
a4e973086d3f18c73ce57cba345d5c775d4d5bac | 13cdd0ddb1e5ed977ea9fabe8e1ac0b917b3bf5d | /src/main/java/com/anl/user/persistence/mapper/PurchasingOrderMapper.java | a2684fe600ba51202145888978b3da5b2fb80b2d | [] | no_license | kpdtd/card_service | 30bfd5d00d2cb55c6b12fa75d137878cfe39d212 | e596f59459d4e9f839a9daaa7c57d79fef4e7547 | refs/heads/master | 2020-03-22T23:45:07.195325 | 2018-09-26T09:18:37 | 2018-09-26T09:18:37 | 140,826,810 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 307 | java | package com.anl.user.persistence.mapper;
import com.anl.user.persistence.mapper.BaseMapper;
import com.anl.user.persistence.po.PurchasingOrder;
/**
* 类名: PurchasingOrder
* 创建日期:
* 功能描述:
*/
public interface PurchasingOrderMapper extends BaseMapper<PurchasingOrder> {
} | [
"yqyanghn@126.com"
] | yqyanghn@126.com |
f53266e148290584fb1acd8997d9b95fb50f7e27 | 3c483e32e28e21721e9c007e725f827348d04850 | /eclipse/src/duro/preflang/ast/ASTFalse.java | c2de70e412b63f4dcee2074074cc1ce43aaa51de | [
"MIT",
"BSD-3-Clause"
] | permissive | jakobehmsen/duro | 755d27c5459a0a8ec2ff2536dec029f9adc7dc95 | 2ff58ff60f80246d6c63fa3598026a6e65eb61b6 | refs/heads/master | 2020-05-31T11:57:06.241633 | 2014-11-02T16:49:27 | 2014-11-02T16:49:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 370 | java | package duro.preflang.ast;
import java.io.IOException;
import duro.io.TreeWriter;
public class ASTFalse implements AST {
public static final ASTFalse INSTANCE = new ASTFalse();
@Override
public void accept(ASTVisitor visitor) {
visitor.visitFalse(this);
}
@Override
public void writeTo(TreeWriter writer) throws IOException {
writer.write("false");
}
}
| [
"jakobehmsen.github@gmail.com"
] | jakobehmsen.github@gmail.com |
08bf963574a60ee8b627b0040fa2cfafc123fef6 | 236b2da5d748ef26a90d66316b1ad80f3319d01e | /trunk/photon/plugins/org.marketcetera.photon.strategy.engine.ui.workbench.ws/src/main/java/org/marketcetera/photon/strategy/engine/ui/workbench/ws/Messages.java | 795108b1d63b2707e1f5037d9a668e6a28212ad6 | [
"Apache-2.0"
] | permissive | nagyist/marketcetera | a5bd70a0369ce06feab89cd8c62c63d9406b42fd | 4f3cc0d4755ee3730518709412e7d6ec6c1e89bd | refs/heads/master | 2023-08-03T10:57:43.504365 | 2023-07-25T08:37:53 | 2023-07-25T08:37:53 | 19,530,179 | 0 | 2 | Apache-2.0 | 2023-07-25T08:37:54 | 2014-05-07T10:22:59 | Java | UTF-8 | Java | false | false | 844 | java | package org.marketcetera.photon.strategy.engine.ui.workbench.ws;
import org.marketcetera.photon.commons.ReflectiveMessages;
import org.marketcetera.util.log.I18NMessage0P;
import org.marketcetera.util.misc.ClassVersion;
/* $License$ */
/**
* The internationalization constants used by this package.
*
* @author <a href="mailto:will@marketcetera.com">Will Horn</a>
* @version $Id: Messages.java 16154 2012-07-14 16:34:05Z colin $
* @since 2.0.0
*/
@ClassVersion("$Id: Messages.java 16154 2012-07-14 16:34:05Z colin $")
final class Messages {
static I18NMessage0P STRATEGY_ENGINE_WORKSPACE_UI_FILE_DIALOG_BUTTON__LABEL;
static {
ReflectiveMessages.init(Messages.class);
}
private Messages() {
throw new AssertionError("non-instantiable"); //$NON-NLS-1$
}
}
| [
"nagyist@mailbox.hu"
] | nagyist@mailbox.hu |
9b819a59b9e14791383035ae09aaccfe19ac2e14 | 684f50dd1ae58a766ce441d460214a4f7e693101 | /common/src/main/java/com/dimeng/p2p/S62/enums/T6282_F16.java | 3a87147a5c004e33e8e3b99b11d09b9e1c00b758 | [] | no_license | wang-shun/rainiee-core | a0361255e3957dd58f653ae922088219738e0d25 | 80a96b2ed36e3460282e9e21d4f031cfbd198e69 | refs/heads/master | 2020-03-29T16:40:18.372561 | 2018-09-22T10:05:17 | 2018-09-22T10:05:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 841 | java | package com.dimeng.p2p.S62.enums;
import com.dimeng.util.StringHelper;
/**
* 是否实地认证
*/
public enum T6282_F16{
/**
* 是
*/
S("是"),
/**
* 否
*/
F("否");
protected final String chineseName;
private T6282_F16(String chineseName){
this.chineseName = chineseName;
}
/**
* 获取中文名称.
*
* @return {@link String}
*/
public String getChineseName() {
return chineseName;
}
/**
* 解析字符串.
*
* @return {@link T6282_F16}
*/
public static final T6282_F16 parse(String value) {
if(StringHelper.isEmpty(value)){
return null;
}
try{
return T6282_F16.valueOf(value);
}catch(Throwable t){
return null;
}
}
}
| [
"humengmeng@rainiee.com"
] | humengmeng@rainiee.com |
df9c55b913c7df17107650505eb68d36daba10d0 | 83d781a9c2ba33fde6df0c6adc3a434afa1a7f82 | /MarketPublicMobileAPI/src/com/newco/marketplace/api/mobile/beans/so/search/SearchStringElement.java | 01a5245aeab12be96c7af53a5f7f814ba1538c22 | [] | no_license | ssriha0/sl-b2b-platform | 71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6 | 5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2 | refs/heads/master | 2023-01-06T18:32:24.623256 | 2020-11-05T12:23:26 | 2020-11-05T12:23:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 597 | java | package com.newco.marketplace.api.mobile.beans.so.search;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
@XmlAccessorType(XmlAccessType.FIELD)
public class SearchStringElement {
@XStreamImplicit(itemFieldName="value")
private List<String> value;
public List<String> getValue() {
return value;
}
public void setValue(List<String> value) {
this.value = value;
}
}
| [
"Kunal.Pise@transformco.com"
] | Kunal.Pise@transformco.com |
385e742e7f4f84ee863f77bcdd1ca4251fdb0f99 | d5f09c7b0e954cd20dd613af600afd91b039c48a | /sources/com/coolapk/market/network/CoolApkRuntimeException.java | 8965b62bc0b3c1478aa59ae59c89972e88d3052a | [] | no_license | t0HiiBwn/CoolapkRelease | af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3 | a6a2b03e32cde0e5163016e0078391271a8d33ab | refs/heads/main | 2022-07-29T23:28:35.867734 | 2021-03-26T11:41:18 | 2021-03-26T11:41:18 | 345,290,891 | 5 | 2 | null | null | null | null | UTF-8 | Java | false | false | 224 | java | package com.coolapk.market.network;
public class CoolApkRuntimeException extends RuntimeException {
public CoolApkRuntimeException() {
}
public CoolApkRuntimeException(String str) {
super(str);
}
}
| [
"test@gmail.com"
] | test@gmail.com |
7070e95fae1afb3771177c026a311a00c6b389a1 | 5a20c1c51d80793fad6c857623fb72d8b7e94940 | /webframe/src/com/qzgf/application/biz/testModel/action/TestAction.java | b34e3251bce01b5c17896f774ea5b97787389ce1 | [] | no_license | worgent/fjfdszjtest | a83975b5798c8c695556bdff01ca768eaec75327 | 9c66e33c5838a388230e3150cd2bd8ca0358e9e8 | refs/heads/master | 2021-01-10T02:21:53.352796 | 2012-05-08T02:47:01 | 2012-05-08T02:47:01 | 55,039,210 | 0 | 1 | null | null | null | null | GB18030 | Java | false | false | 2,063 | java | package com.qzgf.application.biz.testModel.action;
import java.util.HashMap;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.qzgf.application.BaseAction;
import com.qzgf.application.biz.testModel.domain.TestFacade;
import com.qzgf.context.PageList;
import com.qzgf.context.Pages;
/**
* 框架测试模块
* @author lsr
*
*/
@SuppressWarnings("serial")
public class TestAction extends BaseAction {
Log log = LogFactory.getLog(TestAction.class);
@SuppressWarnings("unchecked")
private HashMap search = new HashMap();
private TestFacade testFacade;
@SuppressWarnings("unchecked")
private List testList;
private PageList pageList;
public String execute() {
try {
return this.executeMethod(this.getAction());
} catch (Exception e) {
log.error(e);
return "index";
}
}
public String index() {
Pages pages = new Pages();
pages.setPage(this.getPage());//默认第一页
pages.setPerPageNum(10); //设置每页大小
//设置fileName是为了返回到前台后的页面跳转
//fileName="http://localhost:8088/webframe/test/list.do?action=index&page=3&total=49"
pages.setFileName("list.do?action=" + this.getAction());
this.setPageList(this.testFacade.findTest(search, pages));
return "index";
}
@SuppressWarnings("unchecked")
public HashMap getSearch() {
return search;
}
@SuppressWarnings("unchecked")
public void setSearch(HashMap search) {
this.search = search;
}
public TestFacade getTestFacade() {
return testFacade;
}
public void setTestFacade(TestFacade testFacade) {
this.testFacade = testFacade;
}
@SuppressWarnings("unchecked")
public List getTestList() {
return testList;
}
@SuppressWarnings("unchecked")
public void setTestList(List testList) {
this.testList = testList;
}
public PageList getPageList() {
return pageList;
}
public void setPageList(PageList pageList) {
this.pageList = pageList;
}
}
| [
"fjfdszj@0f449ecc-ff57-11de-b631-23daf5ca4ffa"
] | fjfdszj@0f449ecc-ff57-11de-b631-23daf5ca4ffa |
d9b7cf09eb47db56e15267d98f381dbdae107374 | 4ff004f56b1b2b79c64414eadf81f780fb50f0d5 | /ApiMonumentosBasic/src/main/java/com/salesianostriana/dam/rest/seguridad/SpringSecurityConfig.java | 3cc293f1783a1f74403fabdd118f88265774c230 | [] | no_license | lmlopezmagana/psp-ad-spring-2019-20 | cbf92d3500125abd14cffd7212e3aba395b6427d | 0586f5762559c1072799aff71003c44670b30f2e | refs/heads/master | 2020-08-09T04:10:06.265428 | 2019-10-23T09:13:05 | 2019-10-23T09:13:05 | 213,993,659 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,601 | java | package com.salesianostriana.dam.rest.seguridad;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
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.WebSecurityConfigurerAdapter;
import org.springframework.security.web.AuthenticationEntryPoint;
@Configuration
public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private AuthenticationEntryPoint authenticationEntryPoint;
@Override
protected void configure(HttpSecurity http) throws Exception {
http.
httpBasic()
.authenticationEntryPoint(authenticationEntryPoint)
.and()
.authorizeRequests()
.antMatchers(HttpMethod.GET, "/monumentos/**").hasAnyRole("USER", "ADMIN")
.antMatchers(HttpMethod.POST, "/monumento/").hasRole("ADMIN")
.antMatchers(HttpMethod.PUT, "/monumentos/**").hasRole("ADMIN")
.antMatchers(HttpMethod.DELETE, "/monumentos/**").hasRole("ADMIN")
.anyRequest().authenticated()
.and()
.csrf().disable();
}
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication().withUser("admin").password("{noop}admin").roles("ADMIN")
.and().withUser("user").password("{noop}user").roles("USER");
}
}
| [
"luismi.lopez@salesianos.edu"
] | luismi.lopez@salesianos.edu |
73100b2fe86a51d25125bffe07b8afa975b153d1 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module0518_generated/src/java/module0518_generated/a/Foo3.java | 8c0de27e72c30d916ff2c50e084f1dabee005710 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 1,584 | java | package module0518_generated.a;
import java.rmi.*;
import java.nio.file.*;
import java.sql.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.util.logging.Filter
* @see java.util.zip.Deflater
* @see javax.annotation.processing.Completion
*/
@SuppressWarnings("all")
public abstract class Foo3<V> extends module0518_generated.a.Foo2<V> implements module0518_generated.a.IFoo3<V> {
javax.lang.model.AnnotatedConstruct f0 = null;
javax.management.Attribute f1 = null;
javax.naming.directory.DirContext f2 = null;
public V element;
public static Foo3 instance;
public static Foo3 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module0518_generated.a.Foo2.create(input);
}
public String getName() {
return module0518_generated.a.Foo2.getInstance().getName();
}
public void setName(String string) {
module0518_generated.a.Foo2.getInstance().setName(getName());
return;
}
public V get() {
return (V)module0518_generated.a.Foo2.getInstance().get();
}
public void set(Object element) {
this.element = (V)element;
module0518_generated.a.Foo2.getInstance().set(this.element);
}
public V call() throws Exception {
return (V)module0518_generated.a.Foo2.getInstance().call();
}
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
70bfc84253ee3a080bcff0d5d6fd348ffb2777e8 | 7b4f8397c2ae7cc527de946cfd5ca22ebec48186 | /org/omg/PortableServer/ImplicitActivationPolicyValue.java | 0eca028705cb3e80c47ae1820f9ab4ff78564ea6 | [] | no_license | hjsw1/jdk8-source | cd025ebd0f1231c021de894c5df88a05e1f9c060 | 75c2330e65a472e1a672d4ec8e86a5b07c711f42 | refs/heads/main | 2023-06-19T23:29:42.308929 | 2021-07-21T16:46:38 | 2021-07-21T16:46:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,813 | java | package org.omg.PortableServer;
/**
* org/omg/PortableServer/ImplicitActivationPolicyValue.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /HUDSON3/workspace/8-2-build-linux-amd64/jdk8u112/7884/corba/src/share/classes/org/omg/PortableServer/poa.idl
* Thursday, September 22, 2016 9:11:52 PM PDT
*/
/**
* ImplicitActivationPolicyValue has the following
* semantics.
* IMPLICIT_ACTIVATION to indicate implicit activation
* of servants. This requires SYSTEM_ID and RETAIN
* policies to be set.
* NO_IMPLICIT_ACTIVATION to indicate no implicit
* servant activation.
*/
public class ImplicitActivationPolicyValue implements org.omg.CORBA.portable.IDLEntity
{
private int __value;
private static int __size = 2;
private static org.omg.PortableServer.ImplicitActivationPolicyValue[] __array = new org.omg.PortableServer.ImplicitActivationPolicyValue [__size];
public static final int _IMPLICIT_ACTIVATION = 0;
public static final org.omg.PortableServer.ImplicitActivationPolicyValue IMPLICIT_ACTIVATION = new org.omg.PortableServer.ImplicitActivationPolicyValue(_IMPLICIT_ACTIVATION);
public static final int _NO_IMPLICIT_ACTIVATION = 1;
public static final org.omg.PortableServer.ImplicitActivationPolicyValue NO_IMPLICIT_ACTIVATION = new org.omg.PortableServer.ImplicitActivationPolicyValue(_NO_IMPLICIT_ACTIVATION);
public int value ()
{
return __value;
}
public static org.omg.PortableServer.ImplicitActivationPolicyValue from_int (int value)
{
if (value >= 0 && value < __size)
return __array[value];
else
throw new org.omg.CORBA.BAD_PARAM ();
}
protected ImplicitActivationPolicyValue (int value)
{
__value = value;
__array[__value] = this;
}
} // class ImplicitActivationPolicyValue
| [
"2506597416@qq.com"
] | 2506597416@qq.com |
751d637683079f13ed6f285d50307e7afbbb6caa | 64e61f5a5082fb0cb0b2c3fbf738382519802e50 | /org.eclipse.acme.action.language.tests/src/action_argumentation/tests/CreateArgumentPackageTest.java | 5cf2409ff19f7797ea356344a92e57e24d729331 | [] | no_license | wrwei/OMG-specification-implementations | f33e37a0d2a2609d4c0db851d185773aaac950bc | 40001210089c773432ff0b074035dffbc06add60 | refs/heads/master | 2020-04-28T16:35:07.148838 | 2019-03-15T07:58:04 | 2019-03-15T07:58:04 | 175,416,471 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,969 | java | /**
*/
package action_argumentation.tests;
import action_argumentation.Action_argumentationFactory;
import action_argumentation.CreateArgumentPackage;
import junit.framework.TestCase;
import junit.textui.TestRunner;
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>Create Argument Package</b></em>'.
* <!-- end-user-doc -->
* @generated
*/
public class CreateArgumentPackageTest extends TestCase {
/**
* The fixture for this Create Argument Package test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CreateArgumentPackage fixture = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static void main(String[] args) {
TestRunner.run(CreateArgumentPackageTest.class);
}
/**
* Constructs a new Create Argument Package test case with the given name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CreateArgumentPackageTest(String name) {
super(name);
}
/**
* Sets the fixture for this Create Argument Package test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void setFixture(CreateArgumentPackage fixture) {
this.fixture = fixture;
}
/**
* Returns the fixture for this Create Argument Package test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CreateArgumentPackage getFixture() {
return fixture;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#setUp()
* @generated
*/
@Override
protected void setUp() throws Exception {
setFixture(Action_argumentationFactory.eINSTANCE.createCreateArgumentPackage());
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#tearDown()
* @generated
*/
@Override
protected void tearDown() throws Exception {
setFixture(null);
}
} //CreateArgumentPackageTest
| [
"ran.wei@york.ac.uk"
] | ran.wei@york.ac.uk |
0629badd1cfc992fd1632308741fd80b82edd948 | 90f17cd659cc96c8fff1d5cfd893cbbe18b1240f | /src/main/java/com/google/zxing/oned/UPCEANWriter.java | 3feb9592432ab102857a80443890f6f774341168 | [] | no_license | redpicasso/fluffy-octo-robot | c9b98d2e8745805edc8ddb92e8afc1788ceadd08 | b2b62d7344da65af7e35068f40d6aae0cd0835a6 | refs/heads/master | 2022-11-15T14:43:37.515136 | 2020-07-01T22:19:16 | 2020-07-01T22:19:16 | 276,492,708 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 171 | java | package com.google.zxing.oned;
public abstract class UPCEANWriter extends OneDimensionalCodeWriter {
public int getDefaultMargin() {
return 9;
}
}
| [
"aaron@goodreturn.org"
] | aaron@goodreturn.org |
82f34c9af56fa07660437610ec6072c39b25444e | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /Jmol/rev11338-12238/right-trunk-12238/src/org/jmol/adapter/readers/quantum/SpartanSmolReader.java | 4ae57fde3ab9116e336c9115063074907a92d21e | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 6,778 | java |
package org.jmol.adapter.readers.quantum;
import org.jmol.adapter.smarter.*;
import java.io.BufferedReader;
import java.util.Hashtable;
import org.jmol.util.Logger;
public class SpartanSmolReader extends SpartanInputReader {
public void readAtomSetCollection(BufferedReader reader) {
modelName = "Spartan file";
this.reader = reader;
try {
readLine();
atomSetCollection = new AtomSetCollection("spartan smol", this);
boolean iHaveModelStatement = false;
boolean iHaveModel = false;
while (line != null) {
if (line.indexOf("JMOL_MODEL") >= 0 && !line.startsWith("END")) {
if (modelNumber > 0)
applySymmetryAndSetTrajectory();
iHaveModelStatement = true;
int modelNo = getModelNumber();
modelNumber = (bsModels == null && modelNo != Integer.MIN_VALUE ? modelNo : modelNumber + 1);
bondData = "";
if (!doGetModel(modelNumber)) {
if (isLastModel(modelNumber) && iHaveModel)
break;
iHaveModel = false;
readLine();
continue;
}
iHaveModel = true;
atomSetCollection.newAtomSet();
moData = new Hashtable();
if (modelNo == Integer.MIN_VALUE) {
modelNo = modelNumber;
title = "Model " + line.substring(line.lastIndexOf(" ") + 1);
} else {
title = (String) titles.get("Title" + modelNo);
title = "Profile " + modelNo + (title == null ? "" : ": " + title);
}
Logger.info(title);
atomSetCollection.setAtomSetAuxiliaryInfo("title", title);
atomSetCollection.setAtomSetName(title);
atomSetCollection.setAtomSetAuxiliaryInfo("isPDB", Boolean.FALSE);
atomSetCollection.setAtomSetNumber(modelNo);
readLine();
continue;
}
if (iHaveModelStatement && !iHaveModel) {
readLine();
continue;
}
if ((line.indexOf("BEGIN") == 0)) {
String lcline = line.toLowerCase();
if (lcline.endsWith("input")) {
bondData = "";
readInputRecords();
if (atomSetCollection.errorMessage != null)
return;
if (title != null)
atomSetCollection.setAtomSetName(title);
} else if (lcline.endsWith("_output")) {
readLine();
continue;
} else if (lcline.endsWith("output")) {
readOutput();
continue;
} else if (lcline.endsWith("molecule") || lcline.endsWith("molecule:asbinarystring")) {
readTransform();
continue;
} else if (lcline.endsWith("proparc")
|| lcline.endsWith("propertyarchive")) {
readProperties();
continue;
} else if (lcline.endsWith("archive")) {
readArchive();
continue;
}
}
if (line != null && line.indexOf("5D shell") >= 0) {
moData.put("calculationType", calculationType = line);
}
readLine();
}
if (atomCount > 0)
applySymmetryAndSetTrajectory();
if (atomCount > 0 && spartanArchive != null && atomSetCollection.getBondCount() == 0
&& bondData != null)
spartanArchive.addBonds(bondData, 0);
} catch (Exception e) {
setError(e);
}
}
private class MoleculeRecord {
float[] mat;
MoleculeRecord(String binaryCodes) {
String[] tokens = getTokens(binaryCodes.trim());
if (tokens.length < 16)
return;
byte[] bytes = new byte[tokens.length];
for (int i = 0; i < tokens.length;i++)
bytes[i] = (byte) Integer.parseInt(tokens[i], 16);
mat = new float[16];
for (int i = 16, j = bytes.length; --i >= 0; j -= 8)
mat[i] = bytesToDoubleToFloat(bytes, j);
}
private float bytesToDoubleToFloat(byte[] bytes, int j) {
double d = Double.longBitsToDouble((((long) bytes[--j]) & 0xff) << 56
| (((long) bytes[--j]) & 0xff) << 48
| (((long) bytes[--j]) & 0xff) << 40
| (((long) bytes[--j]) & 0xff) << 32
| (((long) bytes[--j]) & 0xff) << 24
| (((long) bytes[--j]) & 0xff) << 16
| (((long) bytes[--j]) & 0xff) << 8
| (((long) bytes[--j]) & 0xff));
return (float) d;
}
protected void setTrans() {
if (mat == null)
return;
setTransform(
mat[0], mat[1], mat[2],
mat[4], mat[5], mat[6],
mat[8], mat[9], mat[10]);
}
}
private String endCheck = "END Directory Entry ";
private Hashtable moData = new Hashtable();
private String title;
SpartanArchive spartanArchive;
Hashtable titles;
private void readOutput() throws Exception {
titles = new Hashtable();
String header = "";
int pt;
while (readLine() != null && !line.startsWith("END ")) {
header += line + "\n";
if ((pt = line.indexOf(")")) > 0)
titles.put("Title"+parseInt(line.substring(0, pt))
, (line.substring(pt + 1).trim()));
}
atomSetCollection.setAtomSetCollectionAuxiliaryInfo("fileHeader", header);
}
private void readArchive() throws Exception {
spartanArchive = new SpartanArchive(this, atomSetCollection, moData,
bondData, endCheck);
if (readArchiveHeader()) {
modelAtomCount = spartanArchive.readArchive(line, false, atomCount, false);
if (atomCount == 0 || !isTrajectory)
atomCount += modelAtomCount;
}
}
private void readProperties() throws Exception {
spartanArchive.readProperties();
if (!atomSetCollection
.setAtomSetCollectionPartialCharges("MULCHARGES"))
atomSetCollection.setAtomSetCollectionPartialCharges("Q1_CHARGES");
Float n = (Float) atomSetCollection
.getAtomSetCollectionAuxiliaryInfo("HOMO_N");
if (moData != null && n != null)
moData.put("HOMO", new Integer(n.intValue()));
readLine();
}
private int getModelNumber() {
try {
int pt = line.indexOf("JMOL_MODEL ") + 11;
return parseInt(line, pt);
} catch (NumberFormatException e) {
return 0;
}
}
private void readTransform() throws Exception {
MoleculeRecord mr = new MoleculeRecord(readLine());
mr.setTrans();
}
private boolean readArchiveHeader()
throws Exception {
String modelInfo = readLine();
Logger.debug(modelInfo);
if (modelInfo.indexOf("Error:") == 0)
return false;
atomSetCollection.setCollectionName(modelInfo);
modelName = readLine();
Logger.debug(modelName);
readLine();
return true;
}
}
| [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
17bda3c4eb984e8be789a2b93c2511192a21068f | 8986ddafa9f9c4fb5564762046e4652b569370f1 | /modules/packed/src/main/java/sandbox/program/ProgramX.java | a89feb123ac8e158494c3a794ea0f9f4395aacae | [
"Apache-2.0"
] | permissive | packedapp/packedtmp | 51acb999abebef823e1f4749e17826c4a8310a5a | a8422495b8ca18a77abc95e1daccbaeab2c9b3ed | refs/heads/master | 2023-07-22T03:22:36.485202 | 2023-05-20T06:16:34 | 2023-06-09T08:22:16 | 153,333,951 | 5 | 3 | Apache-2.0 | 2023-07-11T00:39:04 | 2018-10-16T18:24:32 | Java | UTF-8 | Java | false | false | 6,040 | java | /*
* Copyright (c) 2008 Kasper Nielsen.
*
* 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 sandbox.program;
import app.packed.application.ApplicationMirror;
import app.packed.application.BootstrapApp;
import app.packed.application.BootstrapApp.Image;
import app.packed.container.Assembly;
import app.packed.container.Wirelet;
import app.packed.extension.BaseExtensionPoint;
import app.packed.service.ServiceLocator;
import app.packed.util.Key;
import sandbox.extension.container.ContainerCarrierService;
import sandbox.lifetime.external.LifecycleController;
/**
* An App (application) is a type of artifact provided by Packed.
*/
// Skal have et
// Maaske bliver den sgu app igen
public interface ProgramX extends AutoCloseable {
/**
* Closes the app (synchronously). Calling this method is equivalent to calling {@code host().stop()}, but this method
* is called close in order to support try-with resources via {@link AutoCloseable}.
*
* @see ManagedLifetimeController#stop(ManagedLifetimeController.StopOption...)
**/
@Override
default void close() {
runtime().stop();
}
/** {@return the name of this application} */
String name();
/**
* Returns the applications's host.
*
* @return this application's host.
*/
LifecycleController runtime();
/**
* Returns this app's service locator.
*
* @return the service locator for this app
*/
ServiceLocator services();
/**
* Returns a service with the specified key, if it exists. Otherwise, fails by throwing {@link NoSuchElementException}.
* <p>
* This method is shortcut for {@code services().use(key)}
* <p>
* If the application is not already running
*
* @param <T>
* the type of service to return
* @param key
* the key of the service to return
* @return a service of the specified type
* @throws NoSuchElementException
* if a service with the specified key does not exist.
*/
default <T> T use(Class<T> key) {
return services().use(key);
}
/**
* Returns a service with the specified key, if it exists. Otherwise, fails by throwing {@link NoSuchElementException}.
* <p>
* This method is shortcut for {@code services().use(key)}
* <p>
* If the application is not already running
*
* @param <T>
* the type of service to return
* @param key
* the key of the service to return
* @return a service of the specified type
* @throws NoSuchElementException
* if a service with the specified key does not exist.
*/
default <T> T use(Key<T> key) {
return services().use(key);
}
/**
* Returns an {@link BootstrapApp artifact driver} for {@link Program}.
*
* @return an artifact driver for App
*/
private static BootstrapApp<ProgramImplementationX> driver() {
return ProgramImplementationX.DRIVER;
}
/**
* Creates a new app image from the specified assembly.
* <p>
* The state of the applications returned by {@link ApplicationLauncher#launch(Wirelet...)} will be unless
* GuestWirelet.delayStart
*
* @param assembly
* the assembly to use for creating the image
* @param wirelets
* optional wirelets
* @return a new app image
* @see ApplicationImageWirelets
* @see BootstrapApp#newImage(Assembly, Wirelet...)
*/
static Image<ProgramX> imageOf(Assembly assembly, Wirelet... wirelets) {
return driver().imageOf(assembly, wirelets).map(e -> e);
}
static ApplicationMirror mirrorOf(Assembly assembly, Wirelet... wirelets) {
return driver().mirrorOf(assembly, wirelets);
}
/**
* Build and start a new application using the specified assembly. The state of the returned application is running
* <p>
* Should be used with try-with-resources
* <p>
* Applications that are created using this method is always automatically started. If you wish to delay the start
* process you can use LifetimeWirelets#lazyStartE. Which will return an application in the {@link RunState#INITIALIZED}
* phase instead.
*
* @param assembly
* the assembly to use for creating the application
* @param wirelets
* optional wirelets
* @return the new application
* @throws RuntimeException
* if the application could not be build, initialized or started
*/
static ProgramX start(Assembly assembly, Wirelet... wirelets) {
return driver().launch(assembly, wirelets);
}
}
/** The default implementation of {@link Program}. */
record ProgramImplementationX(@ContainerCarrierService String name, @ContainerCarrierService ServiceLocator services,
@ContainerCarrierService LifecycleController runtime) implements ProgramX {
ProgramImplementationX {
// System.out.println(services.keys());
}
/** An driver for creating App instances. */
static final BootstrapApp<ProgramImplementationX> DRIVER = BootstrapApp.of(ProgramImplementationX.class, c -> {
c.managedLifetime();
c.addChannel(BaseExtensionPoint.EXPORTED_SERVICE_LOCATOR);
});
/** {@inheritDoc} */
@Override
public String toString() {
return "App[name = " + name() + ", state = " + runtime.currentState() + "] ";
}
}
| [
"kasperni@gmail.com"
] | kasperni@gmail.com |
39ecd65b994266c1dbebc4961f86690fc57fa3d6 | 8dacfd21e8c0debf7cc7b7a207eb144f71a848b4 | /android/src/com/android/tools/idea/run/NonGradleAndroidArtifactResolver.java | 049191b394bfa2513a4968d8ba7cdd2ad03423c4 | [
"Apache-2.0"
] | permissive | Ret-Mode/android | 510efe5f5a892f997ed937cb54852dd747168b02 | 5b427d1fc6a66ff4db09a9e2f02ae61292ccd797 | refs/heads/master | 2023-03-23T16:27:19.490681 | 2021-03-11T17:25:44 | 2021-03-11T17:25:44 | 346,621,241 | 0 | 0 | Apache-2.0 | 2021-03-11T17:25:29 | 2021-03-11T07:53:20 | null | UTF-8 | Java | false | false | 939 | java | // Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.android.tools.idea.run;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.module.Module;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public interface NonGradleAndroidArtifactResolver {
static NonGradleAndroidArtifactResolver getInstance(){
return ServiceManager.getService(NonGradleAndroidArtifactResolver.class);
}
@Nullable String getModuleApkPathByArtifactName(@NotNull Module module, @NotNull String artifactName) throws ApkProvisionException;
class Dummy implements NonGradleAndroidArtifactResolver{
@Override
public @Nullable String getModuleApkPathByArtifactName(@NotNull Module module, @NotNull String artifactName) throws ApkProvisionException {
return null;
}
}
}
| [
"intellij-monorepo-bot-no-reply@jetbrains.com"
] | intellij-monorepo-bot-no-reply@jetbrains.com |
1820641192a1e1eda413ad52b251438328c984d7 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5695413893988352_0/java/Miv/Main.java | da7076dbcc505c5f0c8230884e45baba80ff5451 | [] | 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,229 | java | package com.miv;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class Main {
static final String inputFileLoc = "C:\\Google Code Jam\\B-small-attempt4.in";
static final String outputFileLoc = "C:\\Google Code Jam\\output.out";
static PrintWriter writer;
public static void main(String[] args) {
ArrayList<String> input = new ArrayList<String>();
// Create output writer
try {
writer = new PrintWriter(outputFileLoc, "UTF-8");
} catch (FileNotFoundException | UnsupportedEncodingException e1) {
e1.printStackTrace();
}
// Read input
BufferedReader br = null;
try {
String sCurrentLine;
br = new BufferedReader(new FileReader(inputFileLoc));
while ((sCurrentLine = br.readLine()) != null) {
input.add(sCurrentLine);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (br != null)br.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
// Do stuff
process(input);
// Close writer
writer.close();
}
public static void write(String text) {
writer.println(text);
}
public static void write(ArrayList<String> texts) {
for(String s : texts) {
writer.println(s);
}
}
public static void process(ArrayList<String> input) {
int cases = Integer.valueOf(input.get(0));
for(int i = 0; i < cases; i++) {
String[] strings = input.get(i + 1).split("\\s+");
StringBuilder left = new StringBuilder(strings[0]);
StringBuilder right = new StringBuilder(strings[1]);
boolean leftIsGreater = true;
boolean doneWithCompare = false;
for(int a = 0; a < left.length(); a++) {
char leftChar = left.charAt(a);
char rightChar = right.charAt(a);
if(!doneWithCompare && leftChar != '?' && rightChar != '?') {
int l = Integer.valueOf(leftChar+"");
int r = Integer.valueOf(rightChar+"");
if(l > r) {
leftIsGreater = true;
doneWithCompare = true;
} else if(l < r) {
leftIsGreater = false;
doneWithCompare = true;
}
}
if(!doneWithCompare) {
if(leftChar == '?' && rightChar != '?') {
left.setCharAt(a, rightChar);
leftChar = rightChar;
}
else if(leftChar != '?' && rightChar == '?') {
right.setCharAt(a, leftChar);
rightChar = leftChar;
}
}
// both are ?
if(!doneWithCompare && (leftChar == '?' || rightChar == '?')) {
// next ones
int b = a+1;
if(b < left.length()) {
char aa = left.charAt(b);
char bb = left.charAt(b);
if(aa != '?' && bb != '?') {
if(Integer.valueOf(aa+"") - Integer.valueOf(bb+"") > 0) {
if(leftChar == '?') {
left.setCharAt(a, '0');
leftChar = '0';
}
if(rightChar == '?') {
right.setCharAt(a, '1');
rightChar = '1';
}
} else {
if(leftChar == '?') {
left.setCharAt(a, '1');
leftChar = '1';
}
if(rightChar == '?') {
right.setCharAt(a, '0');
rightChar = '0';
}
}
} else {
if(leftChar == '?') {
left.setCharAt(a, '0');
leftChar = '0';
}
if(rightChar == '?') {
right.setCharAt(a, '0');
rightChar = '0';
}
}
} else {
if(leftChar == '?') {
left.setCharAt(a, '0');
leftChar = '0';
}
if(rightChar == '?') {
right.setCharAt(a, '0');
rightChar = '0';
}
}
}
else if(doneWithCompare && (leftChar == '?' || rightChar == '?')) {
if(leftIsGreater) {
if(leftChar == '?') {
left.setCharAt(a, '0');
leftChar = '0';
}
if(rightChar == '?') {
right.setCharAt(a, '9');
rightChar = '9';
}
} else {
if(leftChar == '?') {
left.setCharAt(a, '9');
leftChar = '9';
}
if(rightChar == '?') {
right.setCharAt(a, '0');
rightChar = '0';
}
}
}
if(!doneWithCompare) {
if(leftChar == '?' && rightChar != '?') {
left.setCharAt(a, rightChar);
leftChar = rightChar;
}
else if(leftChar != '?' && rightChar == '?') {
right.setCharAt(a, leftChar);
rightChar = leftChar;
}
}
if(!doneWithCompare && leftChar != '?' && rightChar != '?') {
int l = Integer.valueOf(leftChar+"");
int r = Integer.valueOf(rightChar+"");
if(l > r) {
leftIsGreater = true;
doneWithCompare = true;
} else if(l < r) {
leftIsGreater = false;
doneWithCompare = true;
}
}
}
//System.out.println(left+" "+right);
write("Case #" + (i + 1) + ": " + left + " " + right);
}
}
}
| [
"alexandra1.back@gmail.com"
] | alexandra1.back@gmail.com |
12adb522e47ea257f9fdbadce40f34857928a167 | f344e30221361d83f46a6fb780d110534aac98a3 | /jtwig-functions/src/main/java/com/lyncode/jtwig/functions/resolver/impl/CompoundFunctionResolver.java | b78a3269555d7916a39c9c2bd192c33d9144212a | [] | no_license | lyncode/jtwig | 872555579fc908b79fdd04d33f246277052e3555 | 818e2fe0937d7c35876a8f5991f1585790449b4e | refs/heads/master | 2023-08-18T17:53:24.305906 | 2014-11-30T01:48:11 | 2014-11-30T01:48:11 | 27,321,063 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,025 | java | package com.lyncode.jtwig.functions.resolver.impl;
import com.google.common.base.Optional;
import com.lyncode.jtwig.functions.parameters.input.InputParameters;
import com.lyncode.jtwig.functions.resolver.api.FunctionResolver;
import com.lyncode.jtwig.functions.resolver.model.Executable;
import java.util.ArrayList;
import java.util.Collection;
public class CompoundFunctionResolver implements FunctionResolver {
private Collection<FunctionResolver> functionResolvers = new ArrayList<>();
public CompoundFunctionResolver withResolver (FunctionResolver resolver) {
this.functionResolvers.add(resolver);
return this;
}
@Override
public Optional<Executable> resolve(String name, InputParameters parameters) {
for (FunctionResolver functionResolver : functionResolvers) {
Optional<Executable> resolve = functionResolver.resolve(name, parameters);
if (resolve.isPresent())
return resolve;
}
return Optional.absent();
}
}
| [
"jmelo@lyncode.com"
] | jmelo@lyncode.com |
b1b9a6bce8f3d63d0eef559c048bfdd97188e7ed | cb8bb27e52da845f6c886aed0056b4563010d78d | /Kib_3Plus/app/src/main/java/com/example/administrator/kib_3plus/view/fragment/FamilySettingsFragment.java | cd956b9fd3e5c710daaf6ae09020408d422fde18 | [] | no_license | cuijiehui/Kib_3Plus | 5a12dab54c10c035e66c5b2d4a1f382bcb56f355 | 4238eef0a18e5dbaacfb5daf21ad7b30fbe0618b | refs/heads/master | 2021-01-01T06:57:18.031025 | 2017-07-28T12:29:35 | 2017-07-28T12:29:35 | 97,560,154 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,439 | java | package com.example.administrator.kib_3plus.view.fragment;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import com.example.administrator.kib_3plus.R;
import com.example.administrator.kib_3plus.Utils.LogUtils;
import com.example.administrator.kib_3plus.view.fragment.base.BaseFragment;
import com.example.administrator.kib_3plus.view.manage.ContentViewManage;
import cn.appscomm.presenter.implement.PSP;
import cn.appscomm.sp.SPKey;
import static com.example.administrator.kib_3plus.view.manage.ContentViewManage.INVITE_GUARDIAN_FRAGMENT;
import static okhttp3.internal.Internal.instance;
/**
* Created by cui on 2017/7/25.
*/
public class FamilySettingsFragment extends BaseFragment {
TextView family_setting_family_name_tv,family_setting_head_name_tv,family_setting_invite_tv;
String userName="";
String familyName="";
private static FamilySettingsFragment instance;
public static FamilySettingsFragment getInstance(){
if(instance==null){
instance=new FamilySettingsFragment();
}
return instance;
}
@Override
public void findView(View inflateView, Bundle savedInstanceState) {
super.findView(inflateView, savedInstanceState);
family_setting_invite_tv= findViewById(R.id.family_setting_invite_tv);
family_setting_head_name_tv= findViewById(R.id.family_setting_head_name_tv);
family_setting_family_name_tv= findViewById(R.id.family_setting_family_name_tv);
}
@Override
public void initListener() {
super.initListener();
family_setting_invite_tv.setOnClickListener(this);
family_setting_head_name_tv.setOnClickListener(this);
family_setting_family_name_tv.setOnClickListener(this);
}
@Override
public void initData() {
super.initData();
userName= (String) PSP.INSTANCE.getSPValue(SPKey.SP_USER_NAME_L28T,PSP.DATA_STRING);
familyName= (String) PSP.INSTANCE.getSPValue(SPKey.SP_FAMILY_NAME_L28t,PSP.DATA_STRING);
}
@Override
public void initView(View inflateView, Bundle savedInstanceState) {
super.initView(inflateView, savedInstanceState);
family_setting_family_name_tv.setText(familyName);
family_setting_head_name_tv.setText(userName);
}
@Override
public int getCreateViewLayoutId() {
return R.layout.family_member_setting_layout;
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.family_setting_invite_tv:
LogUtils.i("family_setting_invite_tv");
ContentViewManage.getInstance().setFragmentType(ContentViewManage.INVITE_GUARDIAN_FRAGMENT);
break;
case R.id.family_setting_head_name_tv:
LogUtils.i("family_setting_head_name_tv");
ContentViewManage.getInstance().setFragmentType(ContentViewManage.HEAD_FAMILY_SETTINGS_FRAGMENT);
break;
case R.id.family_setting_family_name_tv:
LogUtils.i("family_setting_family_name_tv");
ContentViewManage.getInstance().setFragmentType(ContentViewManage.FAMILY_NAME_SETTINGS_FRAGMENT);
break;
}
}
@Override
public boolean onBackPressed() {
ContentViewManage.getInstance().setFragmentType(ContentViewManage.MAIN_SETTINGS_FRAGMENT);
return true;
}
}
| [
"714888928@qq.com"
] | 714888928@qq.com |
318c64c9e39e9e4fcf646e89240d3a8fd4a6dc1b | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_3/src/b/j/j/g/Calc_1_3_19962.java | 28e5f0c137c84ff288fa804b759c942161abe5ef | [] | no_license | chalstrick/bigRepo1 | ac7fd5785d475b3c38f1328e370ba9a85a751cff | dad1852eef66fcec200df10083959c674fdcc55d | refs/heads/master | 2016-08-11T17:59:16.079541 | 2015-12-18T14:26:49 | 2015-12-18T14:26:49 | 48,244,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 134 | java | package b.j.j.g;
public class Calc_1_3_19962 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
| [
"christian.halstrick@sap.com"
] | christian.halstrick@sap.com |
717b5840bd5e8c9d6d8f3ca68994fb760b8a8bac | 070aa63fd9247e59a3d1394d90d7983d55132dd1 | /src/main/java/com/biz/service/base/CouponUseServiceImpl.java | 1608e4a697f2d417d0011cb2a1ded67496330ddd | [] | no_license | ljtianqi1986/housekeeping-admin | 4525b1158673d15c05019cc12885e6b90ab4bd9c | d4e5f32f5576fa48d66fa32853ca357c53379cd1 | refs/heads/master | 2021-01-25T13:11:16.808013 | 2018-03-02T06:11:22 | 2018-03-02T06:11:22 | 123,536,975 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,538 | java | package com.biz.service.base;
import com.biz.model.Hmodel.TorderMain;
import com.biz.model.Pmodel.basic.PbaseDetail;
import com.framework.dao.hdao.BaseDaoI;
import com.framework.dao.mdao.DaoSupport;
import com.framework.model.Pager;
import com.framework.model.Paging;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/*************************************************************************
* create by lzq
*
* 文件名称 :OrderServiceI.java 描述说明 :
*
* 版权信息 : Copyright (c) 2015 扬州北斗软件有限公司
**************************************************************************/
@Service("couponUseService")
public class CouponUseServiceImpl extends BaseServiceImpl<TorderMain> implements CouponUseServiceI {
@Resource(name = "daoSupport")
private DaoSupport dao;
@Autowired
private BaseDaoI baseDao;
@Override
public Paging queryCouponUseDetail(Map map)throws Exception{
Pager<Map<String, Object>> pager = calculateAndTransformByMap(map);
Pager<Map<String, Object>> pager_back = (Pager<Map<String, Object>>) dao
.findForPager1("CouponUse.findPageCouponUse",
"CouponUse.countCouponUse", pager);
//封装成适合前台使用的格式
Paging paging = new Paging<>();
paging.setRows(pager_back.getExhibitDatas());
paging.setTotal((long) pager_back.getRecordCount());
return paging;
}
@Override
public Map<String,Object> loadTJInfo(Map<String, String> map) throws Exception {
return (Map<String,Object>) dao.findForObject("CouponUse.loadTJInfo",map);
}
@Override
public Paging queryBase90Detail(Map map) throws Exception {
Pager<Map<String, Object>> pager = calculateAndTransformByMap(map);
Pager<Map<String, Object>> pager_back = (Pager<Map<String, Object>>) dao
.findForPager1("CouponUse.findBase90Detail",
"CouponUse.countBase90Detail", pager);
//封装成适合前台使用的格式
Paging paging = new Paging<>();
paging.setRows(pager_back.getExhibitDatas());
paging.setTotal((long) pager_back.getRecordCount());
return paging;
}
@Override
public Map<String, Object> loadSumInfo(Map<String, String> map) throws Exception {
return (Map<String, Object>)dao.findForObject("CouponUse.loadSumInfo",map);
}
@Override
public Paging queryMember(Map map) throws Exception {
Pager<Map<String, Object>> pager = calculateAndTransformByMap(map);
Pager<Map<String, Object>> pager_back = (Pager<Map<String, Object>>) dao
.findForPager1("CouponUse.queryMember",
"CouponUse.queryMemberCount", pager);
//封装成适合前台使用的格式
Paging paging = new Paging<>();
paging.setRows(pager_back.getExhibitDatas());
paging.setTotal((long) pager_back.getRecordCount());
return paging;
}
@Override
public List<Map<String, Object>> loadSumMember(Map<String, String> map) throws Exception {
return (List<Map<String, Object>>) dao.findForList("CouponUse.loadSumMember",map);
}
@Override
public Paging query90UseCount(Map map) throws Exception {
Pager<Map<String, Object>> pager = calculateAndTransformByMap(map);
Pager<Map<String, Object>> pager_back = (Pager<Map<String, Object>>) dao
.findForPager1("CouponUse.query90Use",
"CouponUse.query90UseCount", pager);
//封装成适合前台使用的格式
Paging paging = new Paging<>();
paging.setRows(pager_back.getExhibitDatas());
paging.setTotal((long) pager_back.getRecordCount());
return paging;
}
@Override
public List<PbaseDetail> findCouponList(Map<String, Object> map) throws Exception {
return (List<PbaseDetail>) dao.findForList("CouponUse.findCouponList",map);
}
@Override
public List<Map<String, Object>> findOrderInfoById(String id) throws Exception {
Map<String, Object> param = new HashMap<String, Object>();
param.put("id", id);
List<Map<String, Object>> quanDetail = (List<Map<String, Object>>) dao
.findForList("CouponUse.findBalance90DetailById", param);
return quanDetail;
}
}
| [
"452966215@qq.com"
] | 452966215@qq.com |
1885162767b319ca0d5bc9f5278648f2f012a19f | 4e8a70247c1544b684e1c93bebe2ee8ee949b938 | /src/main/java/codeup/기초100제/Q1031.java | b1c3d1d3b8eea09c7bd4b6593953011fd262ebce | [] | no_license | moving-line/algorithm | 4fbdc1b2e30498af813e3113b19bf936a8b19ceb | bf98a072954c358f8c30f9f6d1146635ffd01b96 | refs/heads/master | 2022-05-18T12:38:59.863848 | 2022-04-06T21:35:28 | 2022-04-06T21:35:28 | 164,232,375 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 223 | java | package codeup.기초100제;
import java.util.Scanner;
public class Q1031 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.printf("%o", sc.nextInt());
}
}
| [
"movinglinecheck@gmail.com"
] | movinglinecheck@gmail.com |
d78858968cc06828ee38b57e7358f161359ece6d | caf19c6574097c8ce3c44d6e45176259ee17d1f3 | /assets/minecessity/blocks/BlockMobAttract.java | f7681679c744ea886eae2a5ef37011b61f2b76dd | [] | no_license | GotoLink/Minecessity | 6e64ec51e9d7b66864bbc15cf6725efbef314171 | c4022906cfcf41bd516e69b28167ce7edc44a25c | refs/heads/master | 2021-01-02T09:37:42.208116 | 2015-11-13T16:30:18 | 2015-11-13T16:30:18 | 9,988,444 | 0 | 0 | null | 2015-11-13T16:30:18 | 2013-05-10T19:08:27 | Java | UTF-8 | Java | false | false | 1,741 | java | package assets.minecessity.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.pathfinding.PathEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import java.util.List;
import java.util.Random;
public class BlockMobAttract extends Block {
public static int range = 16;
public BlockMobAttract() {
super(Material.circuits);
setCreativeTab(CreativeTabs.tabRedstone);
}
@Override
public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int meta){
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
return super.onBlockPlaced(world, x, y, z, side, hitX, hitY, hitZ, meta);
}
@Override
public int tickRate(World world) {
return 2;
}
@Override
public void updateTick(World world, int i, int j, int k, Random random) {
List<?> list = world.getEntitiesWithinAABB(EntityCreature.class, AxisAlignedBB.getBoundingBox(i - range, j - range, k - range, i + range, j + range, k + range));
if (!list.isEmpty()) {
for (Object p : list) {
EntityCreature entities = (EntityCreature) p;
if (entities.getDistance(i, j, k) > 2) {
float f = 8F;
if (entities instanceof EntityMob)
f = 20F;
PathEntity path = world.getEntityPathToXYZ(entities, i, j, k, f, true, true, false, true);
entities.setPathToEntity(path);
entities.getNavigator().setPath(path, f/10);
}
}
}
world.scheduleBlockUpdate(i, j, k, world.getBlock(i, j, k), tickRate(world));
}
}
| [
"gotolinkminecraft@gmail.com"
] | gotolinkminecraft@gmail.com |
15d1c7d97c27dde214d7d46193ee81ae5b97ce1d | 6045a0d3f0c0b05ad17c8ca666a2a619e8a9e556 | /app/src/main/java/com/macinternetservices/sablebusinessdirectory/binding/FragmentDataBindingComponent.java | b22dc12c7c5cda71e77a4232563c2559316ec7f4 | [] | no_license | c1scok1d/sablebusinessdirectory3_0 | b77654e4ac02ab85ab961f3607a34e1f031238e1 | 642ba27f63c5a3a9e8639e1577523799613cae6f | refs/heads/master | 2023-06-07T08:28:04.795737 | 2021-06-30T22:15:40 | 2021-06-30T22:15:40 | 368,712,647 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 562 | java | package com.macinternetservices.sablebusinessdirectory.binding;
import androidx.fragment.app.Fragment;
/**
* A Data Binding Component implementation for fragments.
*/
public class FragmentDataBindingComponent implements androidx.databinding.DataBindingComponent {
private final FragmentBindingAdapters adapter;
public FragmentDataBindingComponent(Fragment fragment) {
this.adapter = new FragmentBindingAdapters(fragment);
}
@Override
public FragmentBindingAdapters getFragmentBindingAdapters() {
return adapter;
}
}
| [
"rchatman@macinternetservices.com"
] | rchatman@macinternetservices.com |
35c3cf91bc252b0e29e99640d3b0b43b94b380ec | 0fa04831dd49e94b191e0fdfd076639b7560d423 | /app/src/main/java/com/love/jax/database/HistoryListData.java | d7e2a0285a01e98ff570e9861c07318670a2e50c | [] | no_license | jaxwog/Learing | f79a2e2a37301797f7265ad2c5071790d434b125 | bf330b2e1575da5569c84590cd2bc666021e0577 | refs/heads/master | 2022-11-26T23:57:45.006228 | 2020-08-05T17:43:02 | 2020-08-05T17:43:02 | 157,231,244 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,824 | java | package com.love.jax.database;
import android.content.Context;
import android.content.SharedPreferences;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.util.ArrayList;
import java.util.List;
/**
* com.love.jax.database
* Created by jax on 2018/11/13 11:14
* TODO: 数据持久化到本地文件
*/
public class HistoryListData {
private SharedPreferences preferences;
private SharedPreferences.Editor editor;
public static final String FILENAME_SEARCH = "HistroySearch";
public HistoryListData(Context mContext) {
preferences = mContext.getSharedPreferences(FILENAME_SEARCH, Context.MODE_PRIVATE);
editor = preferences.edit();
}
/**
* 保存List
*
* @param tag key
* @param datalist 数据内容
*/
public <T> void setDataList(String tag, List<T> datalist) {
if (null == datalist || datalist.size() <= 0)
return;
Gson gson = new Gson();
//转换成json数据,再保存
String strJson = gson.toJson(datalist);
editor.clear();
editor.putString(tag, strJson);
// editor.commit();
editor.apply();
}
/**
* 获取List
*
* @param tag key
* @return 数据内容
*/
public <T> List<T> getDataList(String tag) {
List<T> datalist = new ArrayList<T>();
String strJson = preferences.getString(tag, null);
if (null == strJson) {
return datalist;
}
Gson gson = new Gson();
datalist = gson.fromJson(strJson, new TypeToken<List<T>>() {
}.getType());
return datalist;
}
/**
* 删除数据内容
*/
public void delDataList(String tag) {
editor.remove(tag);
editor.apply();
}
}
| [
"yongzheng13@gmail.com"
] | yongzheng13@gmail.com |
5fabcb363ef8a8ba54b7864d142be17c1a3da201 | 263b9556d76279459ab9942b0005a911e2b085c5 | /src/main/java/com/alipay/api/domain/AlipayOpenPublicSinglearticleDataBatchqueryModel.java | 77132280686a6e5da434c07d86c41d4df131a8f4 | [
"Apache-2.0"
] | permissive | getsgock/alipay-sdk-java-all | 1c98ffe7cb5601c715b4f4b956e6c2b41a067647 | 1ee16a85df59c08fb9a9b06755743711d5cd9814 | refs/heads/master | 2020-03-30T05:42:59.554699 | 2018-09-19T06:17:22 | 2018-09-19T06:17:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 863 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 图文分析-按文章查询数据接口
*
* @author auto create
* @since 1.0, 2017-12-06 11:30:09
*/
public class AlipayOpenPublicSinglearticleDataBatchqueryModel extends AlipayObject {
private static final long serialVersionUID = 1144231626456853318L;
/**
* 开始日期
*/
@ApiField("begin_date")
private String beginDate;
/**
* 结束日期,开始日期/结束日期时间跨度最大30天
*/
@ApiField("end_date")
private String endDate;
public String getBeginDate() {
return this.beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
public String getEndDate() {
return this.endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
}
| [
"liuqun.lq@alibaba-inc.com"
] | liuqun.lq@alibaba-inc.com |
0d2a10533e560d02bc3261c25b33918e876bd027 | b57f116205a4fe4c6cce9e82904077b8beb746fc | /trunk/Zpdl_Api/src/zpdl/studio/file/ApiFileUtil.java | 514ca8a48617cb77bd85936ccab6d7d9b5561c74 | [] | no_license | BGCX261/zpdl-dual-filebrowser-svn-to-git | 24fa5980bc5d0d647e868ef719d15efe6461159a | bf2f36a5084ff08502c3bc015382b3d7a22adac2 | refs/heads/master | 2020-05-17T23:37:32.115242 | 2015-08-25T15:17:47 | 2015-08-25T15:17:47 | 42,346,124 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 799 | java | package zpdl.studio.file;
import android.webkit.MimeTypeMap;
public class ApiFileUtil {
public static String getMimeType(String url)
{
String type = null;
int filenamePos = url.lastIndexOf('/');
String filename = 0 <= filenamePos ? url.substring(filenamePos + 1) : url;
int dotPos = filename.lastIndexOf('.');
String extension = 0 <= dotPos ? filename.substring(dotPos + 1).toLowerCase() : filename.toLowerCase();
if (extension != null) {
MimeTypeMap mime = MimeTypeMap.getSingleton();
type = mime.getMimeTypeFromExtension(extension);
if(type == null && extension.equals("mkv")) {
type = "video/x-matroska";
}
}
return type;
}
}
| [
"you@example.com"
] | you@example.com |
add726e35f7912cbf6475d17b3ec73ac7e2a4b52 | ea1df9a1c8eea38737401dbc51ac2ab8e4ee8377 | /src/oba.java | 821b1023bcde9474e4c366397868dfa21855925e | [] | no_license | EvelusDevelopment/670-Deob | 150135da42dc300a4d2ec708055ea9b87f1dc0c7 | e35c06d1269b3d0473f413c4976ab41f68e42c5e | refs/heads/master | 2021-01-23T12:11:12.239615 | 2012-01-08T07:58:53 | 2012-01-08T07:58:53 | 3,126,981 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 474 | java |
final class oba {
int a;
int[] c;
int b;
int[] d;
oba() {
pr.a(16);
this.a = pr.a() != 0?pr.a(4) + 1:1;
if(pr.a() != 0) {
pr.a(8);
}
pr.a(2);
if(this.a > 1) {
this.b = pr.a(4);
}
this.d = new int[this.a];
this.c = new int[this.a];
for(int var1 = 0; var1 < this.a; ++var1) {
pr.a(8);
this.d[var1] = pr.a(8);
this.c[var1] = pr.a(8);
}
}
}
| [
"sinisoul@gmail.com"
] | sinisoul@gmail.com |
57d8a3610667ae827728ec16f279131d5c0772fa | 24702e9ca41f45f39503ede832995339d5b6b2f8 | /src/main/java/part_1/head_04/annotation/com/springinaction/spring_idol/component_scan/Performer.java | f961fe62e9f89073e4f342b45c2668f5ade51192 | [] | no_license | dimaSkalora/SpringInAction_Three_Edition | 19c63bdd3f18016f7aef908c18c120081d536078 | e9785cb344d3fbadf71a00beefb16b803583b617 | refs/heads/master | 2021-07-16T10:56:05.434818 | 2017-10-23T12:05:26 | 2017-10-23T12:05:26 | 106,844,010 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 274 | java | package part_1.head_04.annotation.com.springinaction.spring_idol.component_scan;
import part_1.head_04.annotation.com.springinaction.spring_idol.component_scan.exceptiion.PerformanceException;
public interface Performer {
void perform() throws PerformanceException;
}
| [
"timon2@ukr.net"
] | timon2@ukr.net |
c6f0d6c9fdd5e11bcf2d82db29197f618390330d | 8df30366e02eda0fdfc13171e9aa93e9c4180647 | /spring-cloud-samples/finchley/crazy/ek-service-provider/src/main/java/org/crazyit/cloud/FirstServiceProvider.java | a49a86e8c20b46631af6c4f2d9c7add2ccd71422 | [] | no_license | FutureWL/spring-samples | d9ab92614b5d238d321101c5e2c09e1e2b989d24 | 718da85c5397e8441f69293b3aaaf47b7e05130a | refs/heads/master | 2023-03-06T15:35:45.645062 | 2020-10-03T02:07:24 | 2020-10-03T02:07:24 | 160,497,481 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,363 | java | package org.crazyit.cloud;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.Scanner;
@SpringBootApplication
@EnableEurekaClient
@RestController
public class FirstServiceProvider {
public static void main(String[] args) {
// 读取控制台输入作为端口参数
Scanner scan = new Scanner(System.in);
String port = scan.nextLine();
// 设置启动的服务器端口
new SpringApplicationBuilder(FirstServiceProvider.class).properties(
"server.port=" + port).run(args);
}
@GetMapping(value = "/person/{personId}", produces = MediaType.APPLICATION_JSON_VALUE)
public Person findPerson(@PathVariable("personId") Integer personId,
HttpServletRequest request) {
Person person = new Person(personId, "Crazyit", 30);
person.setMessage(request.getRequestURL().toString());
return person;
}
}
| [
"624263934@qq.com"
] | 624263934@qq.com |
1e27bcedad00179beaaeabcbc83620eb5bfcc5ce | 9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3 | /cab.snapp.passenger.play_184.apk-decompiled/sources/com/mapbox/mapboxsdk/offline/OfflineRegionDefinition.java | 7a70c262d7d1e86bde3e92e6b4a4ada0a5d4b892 | [] | no_license | BaseMax/PopularAndroidSource | a395ccac5c0a7334d90c2594db8273aca39550ed | bcae15340907797a91d39f89b9d7266e0292a184 | refs/heads/master | 2020-08-05T08:19:34.146858 | 2019-10-06T20:06:31 | 2019-10-06T20:06:31 | 212,433,298 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 382 | java | package com.mapbox.mapboxsdk.offline;
import android.os.Parcelable;
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
public interface OfflineRegionDefinition extends Parcelable {
LatLngBounds getBounds();
boolean getIncludeIdeographs();
double getMaxZoom();
double getMinZoom();
float getPixelRatio();
String getStyleURL();
String getType();
}
| [
"MaxBaseCode@gmail.com"
] | MaxBaseCode@gmail.com |
216a29302356220c2b037c4a108242a2bc927072 | 0e06e096a9f95ab094b8078ea2cd310759af008b | /classes87-dex2jar/com/unity/purchasing/googleplay/IActivityLauncher.java | 162e2d3034c974e2a1e4ff41d8992e9b2618212a | [] | no_license | Manifold0/adcom_decompile | 4bc2907a057c73703cf141dc0749ed4c014ebe55 | fce3d59b59480abe91f90ba05b0df4eaadd849f7 | refs/heads/master | 2020-05-21T02:01:59.787840 | 2019-05-10T00:36:27 | 2019-05-10T00:36:27 | 185,856,424 | 1 | 2 | null | 2019-05-10T00:36:28 | 2019-05-09T19:04:28 | Java | UTF-8 | Java | false | false | 539 | java | //
// Decompiled by Procyon v0.5.34
//
package com.unity.purchasing.googleplay;
import android.content.IntentSender$SendIntentException;
import android.app.PendingIntent;
import android.app.Activity;
import android.content.Intent;
import android.content.Context;
public interface IActivityLauncher
{
void startActivity(final Context p0, final Intent p1);
void startIntentSenderForResult(final Activity p0, final PendingIntent p1, final int p2, final Intent p3, final String p4) throws IntentSender$SendIntentException;
}
| [
"querky1231@gmail.com"
] | querky1231@gmail.com |
3054a28b90293ba7e72f948e171ba640e265c757 | 028cbe18b4e5c347f664c592cbc7f56729b74060 | /external/modules/bean-validator/hibernate-validator/5.0.0.Alpha2/engine/src/test/java/org/hibernate/validator/test/internal/metadata/CustomerRepository.java | 966417d7267509097b903d7986e1e3f71eec4a95 | [
"Apache-2.0"
] | permissive | dmatej/Glassfish-SVN-Patched | 8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e | 269e29ba90db6d9c38271f7acd2affcacf2416f1 | refs/heads/master | 2021-05-28T12:55:06.267463 | 2014-11-11T04:21:44 | 2014-11-11T04:21:44 | 23,610,469 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,106 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual 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.hibernate.validator.test.internal.metadata;
import java.util.Set;
import javax.validation.ConvertGroup;
import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
import org.hibernate.validator.constraints.ScriptAssert;
/**
* @author Gunnar Morling
*/
@ScriptAssert(lang = "javascript", script = "some script")
public class CustomerRepository {
public static interface ValidationGroup {
}
public Customer createCustomer(CharSequence firstName, @NotNull String lastName) {
return null;
}
public void saveCustomer(@Valid Customer customer) {
}
public void updateCustomer(Customer customer) {
}
@Valid
public Customer foo() {
return null;
}
@NotNull
public Customer bar() {
return null;
}
@NotNull(groups = ValidationGroup.class)
public int baz() {
return 0;
}
public void qux() {
}
public void qax(@Max(1) Integer i) {
}
public void zap(@Max(1) int i) {
}
public void methodWithParameterGroupConversion(
@Valid
@ConvertGroup(from = Default.class, to = ValidationGroup.class)
Set<String> addresses) {
}
@Valid
@ConvertGroup(from = Default.class, to = ValidationGroup.class)
public Set<String> methodWithReturnValueGroupConversion() {
return null;
}
}
| [
"mtaube@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] | mtaube@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5 |
1bdce9f852d4c5651a7f3a7d4b293e9cdb4a6bf0 | 43bf460c82c006e5e916c07d8645aad5c675b84b | /ken-spring-3.0/src/main/java/org/springframework/format/number/CurrencyFormatter.java | a4bddcebec5212c73cf0170929039b160fc88779 | [] | no_license | cghr/cme-2.5 | 31086f77e76b0357cc9e4134b25d73c5220774f3 | c87d64495d77dad182e2bb99e024fa3295861b92 | refs/heads/master | 2016-09-09T19:47:25.182951 | 2014-04-30T05:53:00 | 2014-04-30T05:53:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,012 | java | /* 1: */ package org.springframework.format.number;
/* 2: */
/* 3: */ import java.math.BigDecimal;
/* 4: */ import java.math.RoundingMode;
/* 5: */ import java.text.DecimalFormat;
/* 6: */ import java.text.NumberFormat;
/* 7: */ import java.text.ParseException;
/* 8: */ import java.util.Currency;
/* 9: */ import java.util.Locale;
/* 10: */ import org.springframework.util.ClassUtils;
/* 11: */
/* 12: */ public class CurrencyFormatter
/* 13: */ extends AbstractNumberFormatter
/* 14: */ {
/* 15: 45 */ private static final boolean roundingModeOnDecimalFormat = ClassUtils.hasMethod(DecimalFormat.class, "setRoundingMode", new Class[] { RoundingMode.class });
/* 16: 47 */ private int fractionDigits = 2;
/* 17: */ private RoundingMode roundingMode;
/* 18: */ private Currency currency;
/* 19: */
/* 20: */ public void setFractionDigits(int fractionDigits)
/* 21: */ {
/* 22: 59 */ this.fractionDigits = fractionDigits;
/* 23: */ }
/* 24: */
/* 25: */ public void setRoundingMode(RoundingMode roundingMode)
/* 26: */ {
/* 27: 67 */ this.roundingMode = roundingMode;
/* 28: */ }
/* 29: */
/* 30: */ public void setCurrency(Currency currency)
/* 31: */ {
/* 32: 74 */ this.currency = currency;
/* 33: */ }
/* 34: */
/* 35: */ public BigDecimal parse(String text, Locale locale)
/* 36: */ throws ParseException
/* 37: */ {
/* 38: 79 */ BigDecimal decimal = (BigDecimal)super.parse(text, locale);
/* 39: 80 */ if (decimal != null) {
/* 40: 81 */ if (this.roundingMode != null) {
/* 41: 82 */ decimal = decimal.setScale(this.fractionDigits, this.roundingMode);
/* 42: */ } else {
/* 43: 85 */ decimal = decimal.setScale(this.fractionDigits);
/* 44: */ }
/* 45: */ }
/* 46: 88 */ return decimal;
/* 47: */ }
/* 48: */
/* 49: */ protected NumberFormat getNumberFormat(Locale locale)
/* 50: */ {
/* 51: 92 */ DecimalFormat format = (DecimalFormat)NumberFormat.getCurrencyInstance(locale);
/* 52: 93 */ format.setParseBigDecimal(true);
/* 53: 94 */ format.setMaximumFractionDigits(this.fractionDigits);
/* 54: 95 */ format.setMinimumFractionDigits(this.fractionDigits);
/* 55: 96 */ if ((this.roundingMode != null) && (roundingModeOnDecimalFormat)) {
/* 56: 97 */ format.setRoundingMode(this.roundingMode);
/* 57: */ }
/* 58: 99 */ if (this.currency != null) {
/* 59:100 */ format.setCurrency(this.currency);
/* 60: */ }
/* 61:102 */ return format;
/* 62: */ }
/* 63: */ }
/* Location: Z:\home\sagpatke\cme-workspace\cme\ken-spring-3.0\ken-spring-3.0.jar
* Qualified Name: org.springframework.format.number.CurrencyFormatter
* JD-Core Version: 0.7.0.1
*/ | [
"sagarpatke@gmail.com"
] | sagarpatke@gmail.com |
df60934c7b5c04702e38228b6ee319df7518af8a | 9f394e1e92907e53aa08d704a74ce4ffe0274af1 | /commons/src/main/java/org/mmocore/commons/threading/PriorityThreadFactory.java | 3cde38ae5286ecb555427a50775e76deef32f417 | [] | no_license | forzec/l-all | 47371658728deb59c22fef1b2f9d180cf874c8d4 | fb98c98b2bc0fe8f99d8ba9d38286388818bf768 | refs/heads/master | 2021-01-10T11:39:14.017480 | 2016-04-03T12:47:18 | 2016-04-03T12:47:18 | 54,064,490 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,013 | java | package org.mmocore.commons.threading;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class PriorityThreadFactory implements ThreadFactory
{
private static final Logger _log = LoggerFactory.getLogger(PriorityThreadFactory.class);
private int _prio;
private String _name;
private AtomicInteger _threadNumber = new AtomicInteger(1);
private ThreadGroup _group;
public PriorityThreadFactory(String name, int prio)
{
_prio = prio;
_name = name;
_group = new ThreadGroup(_name);
}
@Override
public Thread newThread(Runnable r)
{
Thread t = new Thread(_group, r)
{
@Override
public void run()
{
try
{
super.run();
}
catch(Exception e)
{
_log.error("Exception: " + e, e);
}
}
};
t.setName(_name + "-" + _threadNumber.getAndIncrement());
t.setPriority(_prio);
return t;
}
public ThreadGroup getGroup()
{
return _group;
}
}
| [
"yurii.barbeu@gmail.com"
] | yurii.barbeu@gmail.com |
83e20373e25611fa077b03a470fd9c174bbc2823 | f526172420f91c876555ba0e4d90501bda7a90eb | /src/main/java/de/tekup/vue/dto/models/Profession.java | 0673e69fe2ddb85eb10ed1a84280c856cf58d471 | [] | no_license | Hmida-Rojbani/Test-Vue-N | bfc4bb38cb45a68f23795a74e5e0fb8a94b191fd | 8be7cd9d58c69e3db45c714cc6b68d5f797c0d75 | refs/heads/master | 2023-01-24T20:04:45.943775 | 2020-11-30T20:26:14 | 2020-11-30T20:26:14 | 317,307,675 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 279 | java | package de.tekup.vue.dto.models;
import lombok.Getter;
@Getter
public enum Profession {
DEVELOPER("Developer"), TESTER("Tester"), ARCHITECT("Architect");
private final String displayValue;
private Profession(String displayValue) {
this.displayValue = displayValue;
}
}
| [
"31728681+Hmida-Rojbani@users.noreply.github.com"
] | 31728681+Hmida-Rojbani@users.noreply.github.com |
ecab3fbc288276511d341f02f8d48cd7990e0ac1 | dd80a584130ef1a0333429ba76c1cee0eb40df73 | /external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/HashSetTest.java | 08d996f223d24b0116966c19f9ca681519bedd22 | [
"MIT",
"Apache-2.0"
] | permissive | karunmatharu/Android-4.4-Pay-by-Data | 466f4e169ede13c5835424c78e8c30ce58f885c1 | fcb778e92d4aad525ef7a995660580f948d40bc9 | refs/heads/master | 2021-03-24T13:33:01.721868 | 2017-02-18T17:48:49 | 2017-02-18T17:48:49 | 81,847,777 | 0 | 2 | MIT | 2020-03-09T00:02:12 | 2017-02-13T16:47:00 | null | UTF-8 | Java | false | false | 7,664 | 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.harmony.luni.tests.java.util;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.io.ObjectOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import org.apache.harmony.testframework.serialization.SerializationTest;
public class HashSetTest extends junit.framework.TestCase {
HashSet hs;
static Object[] objArray;
{
objArray = new Object[1000];
for (int i = 0; i < objArray.length; i++)
objArray[i] = new Integer(i);
}
/**
* @tests java.util.HashSet#HashSet()
*/
public void test_Constructor() {
// Test for method java.util.HashSet()
HashSet hs2 = new HashSet();
assertEquals("Created incorrect HashSet", 0, hs2.size());
}
/**
* @tests java.util.HashSet#HashSet(int)
*/
public void test_ConstructorI() {
// Test for method java.util.HashSet(int)
HashSet hs2 = new HashSet(5);
assertEquals("Created incorrect HashSet", 0, hs2.size());
try {
new HashSet(-1);
} catch (IllegalArgumentException e) {
return;
}
fail(
"Failed to throw IllegalArgumentException for capacity < 0");
}
/**
* @tests java.util.HashSet#HashSet(int, float)
*/
public void test_ConstructorIF() {
// Test for method java.util.HashSet(int, float)
HashSet hs2 = new HashSet(5, (float) 0.5);
assertEquals("Created incorrect HashSet", 0, hs2.size());
try {
new HashSet(0, 0);
} catch (IllegalArgumentException e) {
return;
}
fail(
"Failed to throw IllegalArgumentException for initial load factor <= 0");
}
/**
* @tests java.util.HashSet#HashSet(java.util.Collection)
*/
public void test_ConstructorLjava_util_Collection() {
// Test for method java.util.HashSet(java.util.Collection)
HashSet hs2 = new HashSet(Arrays.asList(objArray));
for (int counter = 0; counter < objArray.length; counter++)
assertTrue("HashSet does not contain correct elements", hs
.contains(objArray[counter]));
assertTrue("HashSet created from collection incorrect size",
hs2.size() == objArray.length);
}
/**
* @tests java.util.HashSet#add(java.lang.Object)
*/
public void test_addLjava_lang_Object() {
// Test for method boolean java.util.HashSet.add(java.lang.Object)
int size = hs.size();
hs.add(new Integer(8));
assertTrue("Added element already contained by set", hs.size() == size);
hs.add(new Integer(-9));
assertTrue("Failed to increment set size after add",
hs.size() == size + 1);
assertTrue("Failed to add element to set", hs.contains(new Integer(-9)));
}
/**
* @tests java.util.HashSet#clear()
*/
public void test_clear() {
// Test for method void java.util.HashSet.clear()
Set orgSet = (Set) hs.clone();
hs.clear();
Iterator i = orgSet.iterator();
assertEquals("Returned non-zero size after clear", 0, hs.size());
while (i.hasNext())
assertTrue("Failed to clear set", !hs.contains(i.next()));
}
/**
* @tests java.util.HashSet#clone()
*/
public void test_clone() {
// Test for method java.lang.Object java.util.HashSet.clone()
HashSet hs2 = (HashSet) hs.clone();
assertTrue("clone returned an equivalent HashSet", hs != hs2);
assertTrue("clone did not return an equal HashSet", hs.equals(hs2));
}
/**
* @tests java.util.HashSet#contains(java.lang.Object)
*/
public void test_containsLjava_lang_Object() {
// Test for method boolean java.util.HashSet.contains(java.lang.Object)
assertTrue("Returned false for valid object", hs.contains(objArray[90]));
assertTrue("Returned true for invalid Object", !hs
.contains(new Object()));
HashSet s = new HashSet();
s.add(null);
assertTrue("Cannot handle null", s.contains(null));
}
/**
* @tests java.util.HashSet#isEmpty()
*/
public void test_isEmpty() {
// Test for method boolean java.util.HashSet.isEmpty()
assertTrue("Empty set returned false", new HashSet().isEmpty());
assertTrue("Non-empty set returned true", !hs.isEmpty());
}
/**
* @tests java.util.HashSet#iterator()
*/
public void test_iterator() {
// Test for method java.util.Iterator java.util.HashSet.iterator()
Iterator i = hs.iterator();
int x = 0;
while (i.hasNext()) {
assertTrue("Failed to iterate over all elements", hs.contains(i
.next()));
++x;
}
assertTrue("Returned iteration of incorrect size", hs.size() == x);
HashSet s = new HashSet();
s.add(null);
assertNull("Cannot handle null", s.iterator().next());
}
/**
* @tests java.util.HashSet#remove(java.lang.Object)
*/
public void test_removeLjava_lang_Object() {
// Test for method boolean java.util.HashSet.remove(java.lang.Object)
int size = hs.size();
hs.remove(new Integer(98));
assertTrue("Failed to remove element", !hs.contains(new Integer(98)));
assertTrue("Failed to decrement set size", hs.size() == size - 1);
HashSet s = new HashSet();
s.add(null);
assertTrue("Cannot handle null", s.remove(null));
}
/**
* @tests java.util.HashSet#size()
*/
public void test_size() {
// Test for method int java.util.HashSet.size()
assertTrue("Returned incorrect size", hs.size() == (objArray.length + 1));
hs.clear();
assertEquals("Cleared set returned non-zero size", 0, hs.size());
}
/**
* @tests java.util.AbstractCollection#toString()
*/
public void test_toString() {
HashSet s = new HashSet();
s.add(s);
String result = s.toString();
assertTrue("should contain self ref", result.indexOf("(this") > -1);
}
/**
* @tests java.util.HashSet#SerializationTest
*/
public void test_Serialization() throws Exception{
HashSet<String> hs = new HashSet<String>();
hs.add("hello");
hs.add("world");
SerializationTest.verifySelf(hs, comparator);
SerializationTest.verifyGolden(this, hs, comparator);
}
/**
* Sets up the fixture, for example, open a network connection. This method
* is called before a test is executed.
*/
protected void setUp() {
hs = new HashSet();
for (int i = 0; i < objArray.length; i++)
hs.add(objArray[i]);
hs.add(null);
}
/**
* Tears down the fixture, for example, close a network connection. This
* method is called after a test is executed.
*/
protected void tearDown() {
}
private static final SerializationTest.SerializableAssert comparator = new
SerializationTest.SerializableAssert() {
public void assertDeserialized(Serializable initial, Serializable deserialized) {
HashSet<String> initialHs = (HashSet<String>) initial;
HashSet<String> deseriaHs = (HashSet<String>) deserialized;
assertEquals("should be equal", initialHs.size(), deseriaHs.size());
assertEquals("should be equal", initialHs, deseriaHs);
}
};
}
| [
"karun.matharu@gmail.com"
] | karun.matharu@gmail.com |
343c5067479a341ba50f1b194edc5f2463c4b04c | fc44c0e9c637a7016badec61011150e3882ef6d4 | /xiangbalao/contrib/xutilslibrary/src/com/lidroid/xutils/bitmap/PauseOnScrollListener.java | 405b202c1d0a73d032dcc0ef9a75cfe7c58b093e | [] | no_license | longtaoge/Android_news | 5f60ec0d3d35124dc519c52327c6088c081ed14a | 82b02ba1a260314ffe14117db79ecccbe89e198c | refs/heads/master | 2016-09-10T21:44:06.437204 | 2014-09-26T16:38:40 | 2014-09-26T16:38:40 | 24,507,259 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,543 | java | /*******************************************************************************
* Copyright 2011-2013 Sergey Tarasevich
*
* 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.lidroid.xutils.bitmap;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
import com.lidroid.xutils.BitmapUtils;
public class PauseOnScrollListener implements OnScrollListener {
private BitmapUtils bitmapUtils;
private final boolean pauseOnScroll;
private final boolean pauseOnFling;
private final OnScrollListener externalListener;
/**
* Constructor
*
* @param bitmapUtils {@linkplain BitmapUtils} instance for controlling
* @param pauseOnScroll Whether {@linkplain BitmapUtils#pauseTasks() pause loading} during touch scrolling
* @param pauseOnFling Whether {@linkplain BitmapUtils#pauseTasks() pause loading} during fling
*/
public PauseOnScrollListener(BitmapUtils bitmapUtils, boolean pauseOnScroll, boolean pauseOnFling) {
this(bitmapUtils, pauseOnScroll, pauseOnFling, null);
}
/**
* Constructor
*
* @param bitmapUtils {@linkplain BitmapUtils} instance for controlling
* @param pauseOnScroll Whether {@linkplain BitmapUtils#pauseTasks() pause loading} during touch scrolling
* @param pauseOnFling Whether {@linkplain BitmapUtils#pauseTasks() pause loading} during fling
* @param customListener Your custom {@link android.widget.AbsListView.OnScrollListener} for {@linkplain android.widget.AbsListView list view} which also will
* be get scroll events
*/
public PauseOnScrollListener(BitmapUtils bitmapUtils, boolean pauseOnScroll, boolean pauseOnFling, OnScrollListener customListener) {
this.bitmapUtils = bitmapUtils;
this.pauseOnScroll = pauseOnScroll;
this.pauseOnFling = pauseOnFling;
externalListener = customListener;
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
switch (scrollState) {
case OnScrollListener.SCROLL_STATE_IDLE:
bitmapUtils.resumeTasks();
break;
case OnScrollListener.SCROLL_STATE_TOUCH_SCROLL:
if (pauseOnScroll) {
bitmapUtils.pauseTasks();
}
break;
case OnScrollListener.SCROLL_STATE_FLING:
if (pauseOnFling) {
bitmapUtils.pauseTasks();
}
break;
}
if (externalListener != null) {
externalListener.onScrollStateChanged(view, scrollState);
}
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
if (externalListener != null) {
externalListener.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount);
}
}
}
| [
"61852263@qq.com"
] | 61852263@qq.com |
b44ab60ce12a8881c507a6d4088ecaa8eb25ad3e | 288151cf821acf7fe9430c2b6aeb19e074a791d4 | /mfoyou-agent-server/mfoyou-agent-taobao/src/main/java/com/alipay/api/domain/KbadvertVoucherManual.java | 90e421b75856ef3d34e377c7f15014f4555b7ac3 | [] | no_license | jiningeast/distribution | 60022e45d3a401252a9c970de14a599a548a1a99 | c35bfc5923eaecf2256ce142955ecedcb3c64ae5 | refs/heads/master | 2020-06-24T11:27:51.899760 | 2019-06-06T12:52:59 | 2019-06-06T12:52:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 846 | java | package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 口碑客券的使用说明
*
* @author auto create
* @since 1.0, 2017-02-20 21:18:14
*/
public class KbadvertVoucherManual extends AlipayObject {
private static final long serialVersionUID = 2367961246355161615L;
/**
* 说明
*/
@ApiListField("details")
@ApiField("string")
private List<String> details;
/**
* 标题
*/
@ApiField("title")
private String title;
public List<String> getDetails() {
return this.details;
}
public void setDetails(List<String> details) {
this.details = details;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
}
| [
"15732677882@163.com"
] | 15732677882@163.com |
6741c852e0c580b67937291e6b86f2e9095494d1 | b428e5e3face983700b860e80137f612214ae0eb | /JavaPrograms/src/StringLogicalPrograms/HowToReverseStringType1.java | 8204ef53a54bcb52173da3bfb27e9ae4709e8412 | [] | no_license | Ramkrushna93/JavaLogicalPrograms | 1cab1647acf50dcd200c4bc3158233dfb80258ae | 97c5c080d1036e412f1a9e37c01971fa36af31ba | refs/heads/master | 2020-11-25T01:45:13.089331 | 2019-12-16T17:10:20 | 2019-12-16T17:10:20 | 228,435,539 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 302 | java | package StringLogicalPrograms;
public class HowToReverseStringType1 {
public static void main(String[] args) {
String s="Selenium";
int len=s.length();
String rev="";
for(int i=len-1; i>=0; i--) {
rev=rev+s.charAt(i);
}
System.out.println(rev);
}
}
| [
"USER@USER-PC"
] | USER@USER-PC |
a6d0fa109995e374c96e6bdef983a4a00b70c790 | 71505060050f0a9f4e6478e1755280c2bbaccac9 | /morganStanley/src/main/java/com/suidifu/morganstanley/utils/PostTestUtils.java | 1c77da95c256b1ce37afb6a707629a4591c50176 | [] | no_license | soldiers1989/comsui | 1f73003e7345946ef51af7d73ee3da593f6151ed | 6f5c8a28fb1f58e0afc979a1dd5f2e43cbfa09cc | refs/heads/master | 2020-03-27T19:25:33.560060 | 2018-07-06T06:21:05 | 2018-07-06T06:21:05 | 146,988,141 | 0 | 1 | null | 2018-09-01T10:11:31 | 2018-09-01T10:11:31 | null | UTF-8 | Java | false | false | 3,008 | java | package com.suidifu.morganstanley.utils;
import com.zufangbao.sun.utils.StringUtils;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang3.exception.ExceptionUtils;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@Log4j2
public class PostTestUtils {
private PostTestUtils() {
}
public static String sendPost(String url,
Map<String, String> params,
Map<String, String> headerMap) {
StringBuilder result = new StringBuilder();
URLConnection conn = null;
try {
// 打开和URL之间的连接
conn = new URL(url).openConnection();
// 设置通用的请求属性
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
if (headerMap != null) {
for (Entry<String, String> entry : headerMap.entrySet()) {
conn.setRequestProperty(entry.getKey(), entry.getValue());
}
}
// 发送POST请求必须设置如下两行
conn.setDoOutput(true);
conn.setDoInput(true);
} catch (IOException e) {
log.error("发送 POST 请求出现异常: {}", ExceptionUtils.getStackTrace(e));
}
assert conn != null;
try (// 获取URLConnection对象对应的输出流
PrintWriter out = new PrintWriter(conn.getOutputStream());
//定义BufferedReader输入流来读取URL的响应
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {
// 发送请求参数
out.print(buildParams(params));
// flush输出流的缓冲
out.flush();
String line;
while ((line = in.readLine()) != null) {
result.append(line);
}
} catch (NullPointerException | IOException e) {
log.error("发送 POST 请求出现异常: {}", ExceptionUtils.getStackTrace(e));
}
return result.toString();
}
private static String buildParams(Map<String, String> params) {
StringBuilder buffer = new StringBuilder();
List<String> keys = new ArrayList<>(params.keySet());
Collections.sort(keys);
for (Entry<String, String> entry : params.entrySet()) {
String value = entry.getValue();
value = StringUtils.isEmpty(value) ? "" : value;
buffer.append(entry.getKey()).append("=").append(value).append("&");
}
return buffer.toString();
}
} | [
"mwf5310@163.com"
] | mwf5310@163.com |
4584136993ba7e1a6a2de970f2f43bc92c5671ab | eea475d4cd67ff7c5cfbeb376eb70b1e947a2309 | /JavaImprove/src/main/java/com/wugy/spring/xml/ioc/beans/factory/BeanFactoryAware.java | 98590ca92f3cf0f6063043a39e65d50db19aa235 | [] | no_license | wugy11/favorite-base | e4334ca0fc59d1f010d5f645cf92ae18faf27603 | dd16c7ddf0dfea7b3c88dca60ef683d9f93bab41 | refs/heads/master | 2022-06-05T17:49:53.631162 | 2017-12-28T05:20:25 | 2017-12-28T05:20:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 151 | java | package com.wugy.spring.xml.ioc.beans.factory;
public interface BeanFactoryAware {
void setBeanFactory(BeanFactory beanFactory) throws Exception;
}
| [
"303054578@qq.com"
] | 303054578@qq.com |
7720d4960658c8de031c393284285fa1fb515a34 | 4fab44e9f3205863c0c4e888c9de1801919dc605 | /AL-Game/data/scripts/system/handlers/quest/altgard/_2296ABillFoundinaBox.java | 4588ed81d5220b4d0cf9f258ef7303e68a779129 | [] | no_license | YggDrazil/AionLight9 | fce24670dcc222adb888f4a5d2177f8f069fd37a | 81f470775c8a0581034ed8c10d5462f85bef289a | refs/heads/master | 2021-01-11T00:33:15.835333 | 2016-07-29T19:20:11 | 2016-07-29T19:20:11 | 70,515,345 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,899 | java | /**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning 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.
*
* Aion-Lightning 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 Aion-Lightning.
* If not, see <http://www.gnu.org/licenses/>.
*/
package quest.altgard;
import com.aionemu.gameserver.model.DialogAction;
import com.aionemu.gameserver.model.gameobjects.Item;
import com.aionemu.gameserver.model.gameobjects.Npc;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.questEngine.handlers.HandlerResult;
import com.aionemu.gameserver.questEngine.handlers.QuestHandler;
import com.aionemu.gameserver.questEngine.model.QuestEnv;
import com.aionemu.gameserver.questEngine.model.QuestState;
import com.aionemu.gameserver.questEngine.model.QuestStatus;
import com.aionemu.gameserver.services.QuestService;
/**
* @author Majka Ajural
*/
public class _2296ABillFoundinaBox extends QuestHandler {
private final static int questId = 2296;
private final static int questNpc1Id = 203656; // Urnir
private final static int questNpc2Id = 798036; // Mabrunerk
private final static int questStartItemId = 182203263; // A Bill Found in a Box
public _2296ABillFoundinaBox() {
super(questId);
}
@Override
public void register() {
qe.registerQuestNpc(questNpc1Id).addOnTalkEvent(questId); // Urnir
qe.registerQuestNpc(questNpc2Id).addOnTalkEvent(questId); // Mabrunerk
qe.registerQuestItem(questStartItemId, questId); // A Bill Found in a Box
}
@Override
public boolean onDialogEvent(QuestEnv env) {
final Player player = env.getPlayer();
QuestState qs = player.getQuestStateList().getQuestState(questId);
int targetId = 0;
if (env.getVisibleObject() instanceof Npc) {
targetId = ((Npc) env.getVisibleObject()).getNpcId();
}
if (targetId == 0) {
if (env.getDialog() == DialogAction.QUEST_ACCEPT_1) {
QuestService.startQuest(env);
closeDialogWindow(env);
}
if (env.getDialog() == DialogAction.QUEST_REFUSE_1) {
closeDialogWindow(env);
}
} else if (targetId == questNpc1Id) {
if (qs != null && qs.getStatus() == QuestStatus.START) {
if (env.getDialog() == DialogAction.QUEST_SELECT) {
return sendQuestDialog(env, 1352);
} else if (env.getDialog() == DialogAction.SETPRO1) {
return defaultCloseDialog(env, 0, 1); // 1
} else {
return sendQuestStartDialog(env);
}
}
} else if (targetId == questNpc2Id) {
if (qs != null && qs.getStatus() == QuestStatus.START) {
if (env.getDialog() == DialogAction.QUEST_SELECT) {
return sendQuestDialog(env, 2375);
} else if (env.getDialog() == DialogAction.SELECT_QUEST_REWARD) {
removeQuestItem(env, questStartItemId, 1);
qs.setStatus(QuestStatus.REWARD);
updateQuestStatus(env);
return sendQuestEndDialog(env);
}
} else if (qs != null && qs.getStatus() == QuestStatus.REWARD) {
return sendQuestEndDialog(env);
}
}
return false;
}
@Override
public HandlerResult onItemUseEvent(final QuestEnv env, Item item) {
final Player player = env.getPlayer();
final int id = item.getItemTemplate().getTemplateId();
if (id != questStartItemId) {
return HandlerResult.UNKNOWN;
}
QuestState qs = player.getQuestStateList().getQuestState(questId);
if(qs == null || qs.getStatus() == QuestStatus.NONE) {
sendQuestDialog(env, 4);
}
return HandlerResult.SUCCESS;
}
}
| [
"michelgorter@outlook.com"
] | michelgorter@outlook.com |
620d31e9d8339346a977713db4489637d3c4522d | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/com/zhihu/android/app/p1311ui/widget/button/controller/StateController.java | 45899b029b21cc5e9ba9a7ae286c4f05c82643ce | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,265 | java | package com.zhihu.android.app.p1311ui.widget.button.controller;
import android.content.Context;
import android.view.View;
import com.zhihu.android.app.p1311ui.widget.button.StatefulButton;
import com.zhihu.android.app.p1311ui.widget.button.StatefulLoadingButton;
import com.zhihu.android.module.BaseApplication;
/* renamed from: com.zhihu.android.app.ui.widget.button.controller.StateController */
public abstract class StateController {
StatefulButton button;
final View.OnClickListener clickListener = new View.OnClickListener() {
/* class com.zhihu.android.app.p1311ui.widget.button.controller.$$Lambda$StateController$Hi0z2Qj6LiZYOcApf7IOAnaEag */
public final void onClick(View view) {
StateController.this.interceptStartAction();
}
};
int crtStatus = 0;
StateListener listener;
StateInterceptor mInterceptor;
String reLoginUri = null;
boolean recyclable = false;
boolean removed = false;
public abstract void cancelAction();
public abstract void intercept(StateInterceptor kVar);
public void notifyChange() {
}
public void onButtonAttached() {
}
public void onButtonDetached() {
}
public abstract void startAction();
/* access modifiers changed from: protected */
public void interceptStartAction() {
StateInterceptor kVar = this.mInterceptor;
if (kVar != null) {
intercept(kVar);
} else {
startAction();
}
}
public void setStateButton(StatefulButton statefulButton) {
this.removed = false;
this.button = statefulButton;
this.button.setOnClickListener(this.clickListener);
onButtonAttached();
}
public void destroy() {
StatefulButton statefulButton = this.button;
if (statefulButton != null) {
statefulButton.setOnClickListener(null);
}
this.button = null;
this.removed = true;
onButtonDetached();
}
public void setRecyclable(boolean z) {
this.recyclable = z;
}
public void setStateListener(StateListener stateListener) {
this.listener = stateListener;
}
public StateListener getStateListener() {
return this.listener;
}
public void setStateInterceptor(StateInterceptor kVar) {
this.mInterceptor = kVar;
}
public boolean updateStatus(int i, boolean z) {
return updateStatus(i, z, true);
}
public boolean updateStatus(int i, boolean z, boolean z2) {
StatefulButton statefulButton;
if (this.removed || (statefulButton = this.button) == null) {
return false;
}
statefulButton.updateStatus(i, z2);
StateListener stateListener = this.listener;
if (stateListener != null) {
stateListener.onStateChange(i, this.crtStatus, z);
}
this.crtStatus = i;
return true;
}
/* access modifiers changed from: protected */
public boolean reachable() {
return !this.removed && this.button != null;
}
public void setReLoginUri(String str) {
this.reLoginUri = str;
}
/* access modifiers changed from: protected */
public Context getContext() {
StatefulButton statefulButton = this.button;
if (statefulButton != null) {
return statefulButton.getContext();
}
return BaseApplication.INSTANCE;
}
/* access modifiers changed from: protected */
public void startLoading() {
StatefulButton statefulButton = this.button;
if (statefulButton instanceof StatefulLoadingButton) {
((StatefulLoadingButton) statefulButton).startLoading();
this.button.setOnClickListener(null);
}
}
/* access modifiers changed from: protected */
public void stopLoading(boolean z) {
StatefulButton statefulButton = this.button;
if (statefulButton instanceof StatefulLoadingButton) {
if (z) {
((StatefulLoadingButton) statefulButton).stopLoading();
}
this.button.setOnClickListener(this.clickListener);
}
}
public boolean isRecyclable() {
return this.recyclable;
}
}
| [
"seasonpplp@qq.com"
] | seasonpplp@qq.com |
abcd80e82d35cdc6ac2d9df8a3b0520a66640f91 | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/test/com/google/gson/metrics/PerformanceTest.java | 9dd925d59a237935838ba3a87b23c7285babf9a7 | [] | 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 | 3,520 | java | /**
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.gson.metrics;
import com.google.gson.Gson;
import com.google.gson.annotations.Expose;
import java.util.ArrayList;
import java.util.List;
import junit.framework.TestCase;
/**
* Tests to measure performance for Gson. All tests in this file will be disabled in code. To run
* them remove disabled_ prefix from the tests and run them.
*
* @author Inderjeet Singh
* @author Joel Leitch
*/
public class PerformanceTest extends TestCase {
private static final int COLLECTION_SIZE = 5000;
private static final int NUM_ITERATIONS = 100;
private Gson gson;
public void testDummy() {
// This is here to prevent Junit for complaining when we disable all tests.
}
private static class ExceptionHolder {
public final String message;
public final String stackTrace;
// For use by Gson
@SuppressWarnings("unused")
private ExceptionHolder() {
this("", "");
}
public ExceptionHolder(String message, String stackTrace) {
this.message = message;
this.stackTrace = stackTrace;
}
}
@SuppressWarnings("unused")
private static class CollectionEntry {
final String name;
final String value;
// For use by Gson
private CollectionEntry() {
this(null, null);
}
CollectionEntry(String name, String value) {
this.name = name;
this.value = value;
}
}
@SuppressWarnings("unused")
private static final class ClassWithList {
final String field;
final List<PerformanceTest.ClassWithField> list = new ArrayList<PerformanceTest.ClassWithField>(PerformanceTest.COLLECTION_SIZE);
ClassWithList() {
this(null);
}
ClassWithList(String field) {
this.field = field;
}
}
@SuppressWarnings("unused")
private static final class ClassWithField {
final String field;
ClassWithField() {
this("");
}
public ClassWithField(String field) {
this.field = field;
}
}
@SuppressWarnings("unused")
private static final class ClassWithListOfObjects {
@Expose
final String field;
@Expose
final List<PerformanceTest.ClassWithExposedField> list = new ArrayList<PerformanceTest.ClassWithExposedField>(PerformanceTest.COLLECTION_SIZE);
ClassWithListOfObjects() {
this(null);
}
ClassWithListOfObjects(String field) {
this.field = field;
}
}
@SuppressWarnings("unused")
private static final class ClassWithExposedField {
@Expose
final String field;
ClassWithExposedField() {
this("");
}
ClassWithExposedField(String field) {
this.field = field;
}
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
fed2cc42422d3e95c32d6d609a1f5fe2b09e4f1e | ef04dfc7ad26ef9ebc3b51b55591a4b180dd7731 | /socket/src/main/java/com/hrd/socket/mysocket/activity/TestActivity.java | 0c98477a08b2a862d6813a518debd9bd37bd2522 | [] | no_license | cbb294609622/MySocket | b284efbad5f28c84aa737dc83dd446418c0d4808 | 60d1f08d2f035b174a5c6fa5f43d6d7b3e6f7b5c | refs/heads/master | 2020-04-26T22:02:30.103655 | 2019-03-05T02:41:33 | 2019-03-05T02:41:33 | 173,859,560 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 622 | java | package com.hrd.socket.mysocket.activity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
/**
* Created by HP on 2018/3/29.
*/
public class TestActivity extends Activity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
System.out.println("MainActivity OnCreate()....");
System.out.println("准备开启服务");
Intent intent = new Intent(TestActivity.this, MyService.class);
startService(intent);
finish();
}
}
| [
"294609622@qq.com"
] | 294609622@qq.com |
420bf649f29f6522dfed97d8f3acd7840049f9fb | 47a1618c7f1e8e197d35746639e4480c6e37492e | /src/oracle/retail/stores/pos/ui/timer/DefaultEventMonitor.java | 308efa09c663cd5d2ae7ca8f9bb3b21be08c7ec1 | [] | no_license | dharmendrams84/POSBaseCode | 41f39039df6a882110adb26f1225218d5dcd8730 | c588c0aa2a2144aa99fa2bbe1bca867e008f47ee | refs/heads/master | 2020-12-31T07:42:29.748967 | 2017-03-29T08:12:34 | 2017-03-29T08:12:34 | 86,555,051 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,056 | java | /* ===========================================================================
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
* ===========================================================================
* $Header: rgbustores/applications/pos/src/oracle/retail/stores/pos/ui/timer/DefaultEventMonitor.java /rgbustores_13.4x_generic_branch/1 2011/05/05 14:06:36 mszekely Exp $
* ===========================================================================
* NOTES
* <other useful comments, qualifications, etc.>
*
* MODIFIED (MM/DD/YY)
* cgreene 05/27/10 - convert to oracle packaging
* cgreene 05/26/10 - convert to oracle packaging
* abondala 01/03/10 - update header date
*
* ===========================================================================
* $Log:
*3 360Commerce 1.2 3/31/2005 4:27:43 PM Robert Pearse
*2 360Commerce 1.1 3/10/2005 10:20:52 AM Robert Pearse
*1 360Commerce 1.0 2/11/2005 12:10:32 PM Robert Pearse
*
Revision 1.2 2004/04/08 20:33:03 cdb
@scr 4206 Cleaned up class headers for logs and revisions.
*
Revision 1.1 2004/03/15 21:55:15 jdeleau
@scr 4040 Automatic logoff after timeout
*
* ===========================================================================
*/
package oracle.retail.stores.pos.ui.timer;
import java.awt.AWTEvent;
import java.awt.Event;
import java.awt.Toolkit;
import java.awt.event.AWTEventListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Timer;
/**
* A listener on the AWT event queue that peeks in the queue at specified
* intervals. If it finds no events in the queue, it will trigger the interval
* timer in the time monitor. It will also interrupt the monitor if any user
* activity is detected.
*
* @version $Revision: /rgbustores_13.4x_generic_branch/1 $
*/
public class DefaultEventMonitor implements EventMonitorIfc, ActionListener, AWTEventListener
{
/** source control revision number */
public static final String revisionNumber = "$Revision: /rgbustores_13.4x_generic_branch/1 $";
/** time between peeks into the event queue */
private int peekTime;
/** the timer that checks the event queue */
private Timer peekTimer = null;
/** the controller to notify when events arrive */
private TimedControllerIfc controller = null;
/**
* Default constructor. Sets monitor to null
*/
public DefaultEventMonitor()
{
this(null);
}
/**
* Constructor that attaches a controller to this monitor
*
* @param controller
* the controller to attach
*/
public DefaultEventMonitor(TimedControllerIfc controller)
{
this(controller, EventMonitorIfc.DEFAULT_PEEK_TIME);
}
/**
* Constructor that attaches a controller and sets the peek time.
*
* @param controller
* the monitor to attach
* @param aTime
* the peek time
*/
public DefaultEventMonitor(TimedControllerIfc controller, int aTime)
{
setController(controller);
setPeekTime(aTime);
}
/////////////////////////////////////////////////////////////////////////
// Implement ActionListener Interface
/////////////////////////////////////////////////////////////////////////
/**
* Activates this trigger.
*
* @see oracle.retail.stores.pos.ui.timer.EventMonitorIfc#activate()
*/
public void activate()
{
if(peekTimer != null)
{
peekTimer.start();
}
}
/**
* Deactivates this trigger.
*
* @see oracle.retail.stores.pos.ui.timer.EventMonitorIfc#deactivate()
*/
public void deactivate()
{
if(peekTimer != null)
{
peekTimer.stop();
}
Toolkit.getDefaultToolkit().removeAWTEventListener(this);
}
/**
* @param aTime
* @see oracle.retail.stores.pos.ui.timer.EventMonitorIfc#setPeekTime(int)
*/
public void setPeekTime(int aTime)
{
peekTime = aTime;
if(peekTime >= 0)
{
this.peekTimer = new Timer(peekTime, this);
}
}
/**
* @param controller
* @see oracle.retail.stores.pos.ui.timer.EventMonitorIfc#setController(oracle.retail.stores.pos.ui.timer.TimedControllerIfc)
*/
public void setController(TimedControllerIfc controller)
{
this.controller = controller;
}
/////////////////////////////////////////////////////////////////////////
// Implement ActionListener Interface
/////////////////////////////////////////////////////////////////////////
/**
* Processes an action event from the timer that is monitoring the event
* queue. The swingTimer calls this when the timer expires.
*
* @param e ActionEvent passed by the swing timer
*/
public void actionPerformed(ActionEvent e)
{
// check to see if the event queue is empty
if (Toolkit.getDefaultToolkit().getSystemEventQueue().peekEvent() == null)
{
// stop the peek timer
peekTimer.stop();
// if the controller is not null
// notify it to start the next time interval
if (controller != null)
{
controller.cycleNextAction();
// attach the monitor as an event queue listener
Toolkit.getDefaultToolkit().addAWTEventListener(
this, AWTEvent.KEY_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK);
}
}
}
/////////////////////////////////////////////////////////////////////////
// Implement AWTEventListener
/////////////////////////////////////////////////////////////////////////
/**
* Processes an AWTEvent fired by the AWTEventQueue. This method will
* remove the trigger as an event listener and send an interrupt message to
* the controller.
*
* @param e
* the AWTEvent
*/
public void eventDispatched(AWTEvent e)
{
// Ignore certain mouse events that are not truly user input
if (e.getID() != Event.MOUSE_ENTER && e.getID() != Event.MOUSE_EXIT)
{
Toolkit.getDefaultToolkit().removeAWTEventListener(this);
// if the controller exists, send an interrupt
if (controller != null)
{
controller.fireInterrupt();
}
}
}
/**
* Returns the source control revision number.
*
* @return the revision number
*/
public String getRevisionNumber()
{
return revisionNumber;
}
/**
* Creates a string representation of this object.
*
* @return string descriptor for this object
*/
public String toString()
{
return "Class: " + this.getClass().getName() + "(Revision " + getRevisionNumber() + ") @" + hashCode();
}
}
| [
"Ignitiv021@Ignitiv021-PC"
] | Ignitiv021@Ignitiv021-PC |
00247be8a4a3b4b1fa641ddff5e6307b8f61c185 | 6f41ebd98592e332d46454f53a4107d31658fa03 | /app/src/main/java/com/spark/szhb_master/activity/signup/SignUpPresenter.java | 81fec73bfb3c22459abd2167e16fcf80cdf68af8 | [] | no_license | wqf6146/heyue | f23cdc0b5da94ae03fad69703b0076ddb1dd4d56 | 30f72231e681b96de43e1e20a84d046a1611f819 | refs/heads/master | 2022-09-22T00:06:07.388725 | 2020-06-06T12:19:12 | 2020-06-06T12:19:12 | 262,222,788 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,691 | java | package com.spark.szhb_master.activity.signup;
import com.spark.szhb_master.data.DataSource;
import com.spark.szhb_master.factory.UrlFactory;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.HashMap;
import static com.spark.szhb_master.utils.GlobalConstant.JSON_ERROR;
/**
* Created by Administrator on 2017/9/25.
*/
public class SignUpPresenter implements SignUpContract.Presenter {
private final DataSource dataRepository;
private final SignUpContract.View view;
public SignUpPresenter(DataSource dataRepository, SignUpContract.View view) {
this.dataRepository = dataRepository;
this.view = view;
view.setPresenter(this);
}
@Override
public void getCode(HashMap<String, String> params) {
dataRepository.doStringPost(UrlFactory.getPhoneCodeUrl(), params, new DataSource.DataCallback() {
@Override
public void onDataLoaded(Object obj) {
String response = (String) obj;
try {
JSONObject object = new JSONObject(response);
if (object.optInt("code") == 0) {
//view.codeSuccess(object.optString("message"));
} else {
//view.codeFail(object.getInt("code"), object.optString("message"));
}
} catch (JSONException e) {
e.printStackTrace();
//view.codeFail(JSON_ERROR, null);
}
}
@Override
public void onDataNotAvailable(Integer code, String toastMessage) {
//view.codeFail(code, toastMessage);
}
});
}
@Override
public void sighUp(String url, HashMap<String, String> params) {
view.displayLoadingPopup();
dataRepository.doStringPostJson(url, params, new DataSource.DataCallback() {
@Override
public void onDataLoaded(Object obj) {
view.hideLoadingPopup();
String response = (String) obj;
try {
JSONObject object = new JSONObject(response);
if (object.optInt("code") == 1) {
view.sighUpSuccess(object.optString("msg"));
} else {
view.sighUpFail(object.getInt("code"), object.optString("msg"));
}
} catch (JSONException e) {
e.printStackTrace();
view.sighUpFail(JSON_ERROR, null);
}
}
@Override
public void onDataNotAvailable(Integer code, String toastMessage) {
view.hideLoadingPopup();
view.sighUpFail(code, toastMessage);
}
});
}
@Override
public void captch() {
view.displayLoadingPopup();
dataRepository.doStringPost(UrlFactory.getCaptchaUrl(), new DataSource.DataCallback() {
@Override
public void onDataLoaded(Object obj) {
view.hideLoadingPopup();
String response = (String) obj;
try {
JSONObject object = new JSONObject(response);
//view.captchSuccess((JSONObject) object);
} catch (Exception e) {
//view.captchFail(JSON_ERROR, null);
}
}
@Override
public void onDataNotAvailable(Integer code, String toastMessage) {
view.hideLoadingPopup();
//view.captchFail(code, toastMessage);
}
});
}
}
| [
"346806726@qq.com"
] | 346806726@qq.com |
cad408756f4924115439dc034631ff4f07f130f0 | f5481bc4dcd76a9e231a3c9a68f762e72f796129 | /android/app/src/main/java/abi21_0_0/host/exp/exponent/modules/api/components/maps/SizeReportingShadowNode.java | 6d63cb1397d7893269059b8e3a4dfb783a2404c8 | [
"CC-BY-4.0",
"Apache-2.0",
"MIT",
"BSD-3-Clause"
] | permissive | zhigang1992/expo | 8ed1176a4bea7646f67634a7dff741eb20d34e33 | 07bbd57b7780be7902a87362afa6838aaf316d36 | refs/heads/master | 2023-01-11T04:18:35.286425 | 2017-12-05T21:54:14 | 2017-12-05T21:58:01 | 113,274,467 | 1 | 0 | null | 2017-12-06T05:47:19 | 2017-12-06T05:47:19 | null | UTF-8 | Java | false | false | 1,153 | java | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package abi21_0_0.host.exp.exponent.modules.api.components.maps;
import abi21_0_0.com.facebook.react.uimanager.LayoutShadowNode;
import abi21_0_0.com.facebook.react.uimanager.UIViewOperationQueue;
import java.util.HashMap;
import java.util.Map;
// Custom LayoutShadowNode implementation used in conjunction with the AirMapManager
// which sends the width/height of the view after layout occurs.
public class SizeReportingShadowNode extends LayoutShadowNode {
@Override
public void onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue) {
super.onCollectExtraUpdates(uiViewOperationQueue);
Map<String, Float> data = new HashMap<>();
data.put("width", getLayoutWidth());
data.put("height", getLayoutHeight());
uiViewOperationQueue.enqueueUpdateExtraData(getReactTag(), data);
}
}
| [
"aurora@exp.host"
] | aurora@exp.host |
477974bdc77e2b8b5fa2ccc1dc096215cb650805 | 220db0e6f66b9760980fa610e0efe64b478355cb | /archunit/src/main/java/com/tngtech/archunit/core/domain/properties/CanOverrideDescription.java | 01fe3ca4f5e95e95fabf95d0ed969ff2c4011ff3 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | wolfs/ArchUnit | fa832ff6ae7b68748aa1ec724911a975273cc404 | 9316d617d0f31f9cf3c710a32e44f7cb81cd3b43 | refs/heads/master | 2023-03-10T23:41:40.282982 | 2021-11-08T06:25:58 | 2021-11-08T06:25:58 | 94,650,201 | 1 | 0 | Apache-2.0 | 2023-03-02T16:01:36 | 2017-06-17T21:31:36 | Java | UTF-8 | Java | false | false | 1,246 | java | /*
* Copyright 2014-2021 TNG Technology Consulting GmbH
*
* 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.tngtech.archunit.core.domain.properties;
import com.tngtech.archunit.PublicAPI;
import static com.tngtech.archunit.PublicAPI.Usage.ACCESS;
public interface CanOverrideDescription<SELF> {
/**
* Allows to adjust the description of this object. Note that this method will not modify the current object,
* but instead return a new object with adjusted description.
*
* @param newDescription The description the result of this method will hold
* @return A <b>new</b> equivalent object with adjusted description
*/
@PublicAPI(usage = ACCESS)
SELF as(String newDescription);
}
| [
"peter.gafert@tngtech.com"
] | peter.gafert@tngtech.com |
b856babaa38e43c2c8273abde77fcc6747e07700 | f909ec612f17254be491c3ef9cdc1f0b186e8daf | /java_plugin/jun_util/src/main/java/com/xiaoleilu/hutool/log/level/Level.java | 072c9b4f9589998462999ead4f9cd2ac5c663378 | [
"Apache-2.0"
] | permissive | kingking888/jun_java_plugin | 8853f845f242ce51aaf01dc996ed88784395fd83 | f57e31fa496d488fc96b7e9bab3c245f90db5f21 | refs/heads/master | 2023-06-04T19:30:29.554726 | 2021-06-24T17:19:55 | 2021-06-24T17:19:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 306 | java | package com.xiaoleilu.hutool.log.level;
/**
* 日志等级
* @author Wujun
*
*/
public enum Level{
/**
* 'TRACE' log level.
*/
TRACE,
/**
* 'DEBUG' log level.
*/
DEBUG,
/**
* 'INFO' log level.
*/
INFO,
/**
* 'WARN' log level.
*/
WARN,
/**
* 'ERROR' log level.
*/
ERROR
}
| [
"wujun728@hotmail.com"
] | wujun728@hotmail.com |
63dc72e8f2e9801b9b2345073c357666c48c2c00 | c23eb06f97915db0166333d4d22b0453beb4a3eb | /src/servicing/my_services/Srpt_service_customers_loyalty_cards.java | ae5eca86970bb5e2aa00811632c590820f867ff6 | [] | no_license | yespickmeup/Servicing | 1a349de6da95ec3f6e7fe9f223a80a944b86fa83 | ed1a131764df7ceae66d211fd2085278e0a1403a | refs/heads/master | 2023-07-30T12:29:37.167387 | 2021-09-15T01:56:26 | 2021-09-15T01:56:26 | 113,964,614 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,128 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package servicing.my_services;
import java.util.List;
/**
*
* @author Guinness
*/
public class Srpt_service_customers_loyalty_cards {
public static List<field> fields;
public static class field {
String customer_name;
String customer_id;
public field() {
}
public field(String customer_name, String customer_id) {
this.customer_name = customer_name;
this.customer_id = customer_id;
}
public String getCustomer_name() {
return customer_name;
}
public void setCustomer_name(String customer_name) {
this.customer_name = customer_name;
}
public String getCustomer_id() {
return customer_id;
}
public void setCustomer_id(String customer_id) {
this.customer_id = customer_id;
}
}
}
| [
"rpascua.synsoftech@gmail.com"
] | rpascua.synsoftech@gmail.com |
97884b1a75654fcf62c8ce9b17e2d7362bdb45b6 | fa1408365e2e3f372aa61e7d1e5ea5afcd652199 | /src/testcases/CWE78_OS_Command_Injection/CWE78_OS_Command_Injection__URLConnection_61a.java | 2b464215c64879aa118188831826bc88f6497bc6 | [] | no_license | bqcuong/Juliet-Test-Case | 31e9c89c27bf54a07b7ba547eddd029287b2e191 | e770f1c3969be76fdba5d7760e036f9ba060957d | refs/heads/master | 2020-07-17T14:51:49.610703 | 2019-09-03T16:22:58 | 2019-09-03T16:22:58 | 206,039,578 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,716 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__URLConnection_61a.java
Label Definition File: CWE78_OS_Command_Injection.label.xml
Template File: sources-sink-61a.tmpl.java
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: URLConnection Read data from a web server with URLConnection
* GoodSource: A hardcoded string
* Sinks: exec
* BadSink : dynamic command execution with Runtime.getRuntime().exec()
* Flow Variant: 61 Data flow: data returned from one method to another in different classes in the same package
*
* */
package testcases.CWE78_OS_Command_Injection;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE78_OS_Command_Injection__URLConnection_61a extends AbstractTestCase
{
public void bad() throws Throwable
{
String data = (new CWE78_OS_Command_Injection__URLConnection_61b()).badSource();
String osCommand;
if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)
{
/* running on Windows */
osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir ";
}
else
{
/* running on non-Windows */
osCommand = "/bin/ls ";
}
/* POTENTIAL FLAW: command injection */
Process process = Runtime.getRuntime().exec(osCommand + data);
process.waitFor();
}
public void good() throws Throwable
{
goodG2B();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
String data = (new CWE78_OS_Command_Injection__URLConnection_61b()).goodG2BSource();
String osCommand;
if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)
{
/* running on Windows */
osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir ";
}
else
{
/* running on non-Windows */
osCommand = "/bin/ls ";
}
/* POTENTIAL FLAW: command injection */
Process process = Runtime.getRuntime().exec(osCommand + data);
process.waitFor();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"bqcuong2212@gmail.com"
] | bqcuong2212@gmail.com |
6f8db4577a92e8ea77ead783f448c521739afeac | 4312a71c36d8a233de2741f51a2a9d28443cd95b | /RawExperiments/DB/Math 3.2 RC4/AstorMain-Math 3.2 RC4/src/variant-1401/org/apache/commons/math/analysis/solvers/BrentSolver.java | 496f16805820cb7b337a832b02095eebc13b019e | [] | no_license | SajjadZaidi/AutoRepair | 5c7aa7a689747c143cafd267db64f1e365de4d98 | e21eb9384197bae4d9b23af93df73b6e46bb749a | refs/heads/master | 2021-05-07T00:07:06.345617 | 2017-12-02T18:48:14 | 2017-12-02T18:48:14 | 112,858,432 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,654 | java | package org.apache.commons.math.analysis.solvers;
public class BrentSolver extends org.apache.commons.math.analysis.solvers.UnivariateRealSolverImpl {
private static final java.lang.String NON_BRACKETING_MESSAGE = "function values at endpoints do not have different signs. " + "Endpoints: [{0}, {1}], Values: [{2}, {3}]";
private static final long serialVersionUID = 7694577816772532779L;
@java.lang.Deprecated
public BrentSolver(org.apache.commons.math.analysis.UnivariateRealFunction f) {
super(f, 100, 1.0E-6);
}
public BrentSolver() {
super(100, 1.0E-6);
}
@java.lang.Deprecated
public double solve(double min, double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException {
return solve(f, min, max);
}
@java.lang.Deprecated
public double solve(double min, double max, double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException {
return solve(f, min, max, initial);
}
public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, final double min, final double max, final double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException {
clearResult();
double ret;
verifySequence(min, initial, max);
double yInitial = f.value(initial);
if ((java.lang.Math.abs(yInitial)) <= (functionValueAccuracy)) {
setResult(initial, 0);
return result;
}
double yMin = f.value(min);
if ((java.lang.Math.abs(yMin)) <= (functionValueAccuracy)) {
setResult(yMin, 0);
return result;
}
if ((yInitial * yMin) < 0) {
return solve(f, min, yMin, initial, yInitial, min, yMin);
}
double yMax = f.value(max);
if ((java.lang.Math.abs(yMax)) <= (functionValueAccuracy)) {
setResult(yMax, 0);
return result;
}
if ((yInitial * yMax) < 0) {
return solve(f, initial, yInitial, max, yMax, initial, yInitial);
}
return solve(f, min, yMin, max, yMax, initial, yInitial);
}
public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, final double min, final double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException {
clearResult();
verifyInterval(min, max);
double ret = java.lang.Double.NaN;
double yMin = f.value(min);
double yMax = f.value(max);
double sign = yMin * yMax;
if (sign > 0) {
if ((java.lang.Math.abs(yMin)) <= (functionValueAccuracy)) {
setResult(min, 0);
ret = min;
} else {
if ((java.lang.Math.abs(yMax)) <= (functionValueAccuracy)) {
setResult(max, 0);
ret = max;
} else {
throw org.apache.commons.math.MathRuntimeException.createIllegalArgumentException(org.apache.commons.math.analysis.solvers.BrentSolver.NON_BRACKETING_MESSAGE, min, max, yMin, yMax);
}
}
} else {
if (sign < 0) {
ret = solve(f, min, yMin, max, yMax, min, yMin);
} else {
if (yMin == 0.0) {
ret = min;
} else {
ret = max;
}
}
}
return ret;
}
private double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, double x0, double y0, double x1, double y1, double x2, double y2) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException {
double delta = x1 - x0;
double oldDelta = delta;
int i = 0;
while (i < (maximalIterationCount)) {
if ((java.lang.Math.abs(y2)) < (java.lang.Math.abs(y1))) {
x0 = x1;
x1 = x2;
x2 = x0;
y0 = y1;
y1 = y2;
y2 = y0;
}
if ((java.lang.Math.abs(y1)) <= (functionValueAccuracy)) {
setResult(x1, i);
return result;
}
double dx = x2 - x1;
double tolerance = java.lang.Math.max(((relativeAccuracy) * (java.lang.Math.abs(x1))), absoluteAccuracy);
if ((java.lang.Math.abs(dx)) <= tolerance) {
setResult(x1, i);
return result;
}
if (((java.lang.Math.abs(oldDelta)) < tolerance) || ((java.lang.Math.abs(y0)) <= (java.lang.Math.abs(y1)))) {
delta = 0.5 * dx;
oldDelta = delta;
} else {
double r3 = y1 / y0;
double p;
double p1;
if (x0 == x2) {
p = dx * r3;
p1 = 1.0 - r3;
} else {
double r1 = y0 / y2;
double r2 = y1 / y2;
p = r3 * (((dx * r1) * (r1 - r2)) - ((x1 - x0) * (r2 - 1.0)));
p1 = ((r1 - 1.0) * (r2 - 1.0)) * (r3 - 1.0);
}
if (p > 0.0) {
p1 = -p1;
} else {
p = -p;
}
if (((2.0 * p) >= (((1.5 * dx) * p1) - (java.lang.Math.abs((tolerance * p1))))) || (p >= (java.lang.Math.abs(((0.5 * oldDelta) * p1))))) {
delta = 0.5 * dx;
oldDelta = delta;
} else {
oldDelta = delta;
delta = p / p1;
}
}
x0 = x1;
y0 = y1;
if ((java.lang.Math.abs(delta)) > tolerance) {
x1 = x1 + delta;
} else {
if (dx > 0.0) {
x1 = x1 + (0.5 * tolerance);
} else {
if (dx <= 0.0) {
x1 = x1 - (0.5 * tolerance);
}
}
}
y1 = f.value(x1);
if ((y1 > 0) == (y2 > 0)) {
x2 = x0;
y2 = y0;
delta = x1 - x0;
oldDelta = delta;
}
i++;
}
throw new org.apache.commons.math.MaxIterationsExceededException(maximalIterationCount);
}
}
| [
"sajjad.syed@ucalgary.ca"
] | sajjad.syed@ucalgary.ca |
ad015f1f06474ba9cbb9e93876d65499ce45e8e4 | 9a8d1fa35116d3bbef0432e110938a77fcdd324d | /fdbench-core/src/main/java/org/pathirage/fdbench/metrics/DynamoDBMetricsSnapshotReporterFactory.java | 1a6763877e9d45baa9b3f656bc9b219e62d799dc | [
"Apache-2.0"
] | permissive | FreshetDMS/FDBench | dbf113cfb76bd8e61f169d570b6ea62c9e0f4b47 | 70e638b5375e9906a87c1a53294a6535f617961d | refs/heads/master | 2021-09-05T12:56:56.424626 | 2018-01-27T20:11:32 | 2018-01-27T20:11:32 | 58,657,047 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,568 | java | /**
* Copyright 2016 Milinda Pathirage
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.pathirage.fdbench.metrics;
import com.typesafe.config.Config;
import org.pathirage.fdbench.config.AbstractConfig;
import org.pathirage.fdbench.config.BenchConfig;
import org.pathirage.fdbench.config.MetricsReporterConfig;
import org.pathirage.fdbench.metrics.api.MetricsReporter;
import org.pathirage.fdbench.metrics.api.MetricsReporterFactory;
public class DynamoDBMetricsSnapshotReporterFactory implements MetricsReporterFactory {
@Override
public MetricsReporter getMetricsReporter(String name, String containerName, Config config) {
DynamoDBMetricsSnapshotReporterConfig c = new DynamoDBMetricsSnapshotReporterConfig(new MetricsReporterConfig(config).getReporterConfig(name));
return new DynamoDBMetricsSnapshotReporter(name, new BenchConfig(config).getName(), containerName,
c.getReportingInterval(),
c.getDynamoDBTable(),
c.getAWSAccessKeyId(),
c.getAWSAccessKeySecret(),
c.getAWSRegion());
}
public static class DynamoDBMetricsSnapshotReporterConfig extends AbstractConfig {
private static final String REPORTING_INTERVAL = "reporting.interval";
private static final String AWS_ACCESS_KEY_ID = "aws.access.key.id";
private static final String AWS_ACCESS_KEY_SECRET = "aws.access.key.secret";
private static final String AWS_REGION = "aws.region";
private static final String DYNAMODB_TABLE = "table";
public DynamoDBMetricsSnapshotReporterConfig(Config config) {
super(config);
}
public int getReportingInterval() {
return getInt(REPORTING_INTERVAL, 60);
}
public String getAWSAccessKeyId() {
return getString(AWS_ACCESS_KEY_ID);
}
public String getAWSAccessKeySecret() {
return getString(AWS_ACCESS_KEY_SECRET);
}
public String getAWSRegion(){
return getString(AWS_REGION, "us-west-2");
}
public String getDynamoDBTable() {
return getString(DYNAMODB_TABLE);
}
}
}
| [
"milinda.pathirage@gmail.com"
] | milinda.pathirage@gmail.com |
a5fe468c6260529217d80494d3f58bda3951a87f | 0fca6240a045687a771bb0e743555f1b74f69e1c | /OnlineLibrary/3.JSF/lesson_49/JsfLibrary_20/src/java/ru/javabegin/training/web/servlets/PdfContent.java | f65674eecbf8a961d8e53bf8a36e57aefa3f58a1 | [] | no_license | Abergaz/JavaBeginWork-WEB | 88fabec28f4b3275b21e1113a34cbc18c67ec5ef | b721f2d49ddf260acf4e43a22025959270d023ae | refs/heads/master | 2022-12-08T10:49:54.358706 | 2020-03-12T13:16:57 | 2020-03-12T13:16:57 | 227,131,968 | 0 | 0 | null | 2022-11-24T07:19:43 | 2019-12-10T13:48:08 | TSQL | UTF-8 | Java | false | false | 3,481 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ru.javabegin.training.web.servlets;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URLEncoder;
import javax.el.ELContext;
import javax.faces.context.FacesContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import ru.javabegin.training.web.controllers.BookListController;
@WebServlet(name = "PdfContent",
urlPatterns = {"/PdfContent"})
public class PdfContent extends HttpServlet {
/**
* Processes requests for both HTTP
* <code>GET</code> and
* <code>POST</code> methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("application/pdf");
OutputStream out = response.getOutputStream();
try {
long id = Long.valueOf(request.getParameter("id"));
Boolean save = Boolean.valueOf(request.getParameter("save"));
String filename = request.getParameter("filename");
BookListController bookListController = (BookListController) request.getSession().getAttribute("bookListController");
byte[] content = bookListController.getDataHelper().getContent(id);
response.setContentLength(content.length);
if (save) {
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8") + ".pdf");
}
out.write(content);
} catch (Exception ex) {
ex.printStackTrace();
} finally {
out.close();
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP
* <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP
* <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
| [
"zagreba@gmail.com"
] | zagreba@gmail.com |
7be44fc6fc5dc077592710cd6fe7b3417e803685 | ddec46506cbdee03b495b7bc287b14abab12c701 | /jdk1.8/src/com/sun/org/apache/bcel/internal/util/ClassLoaderRepository.java | 7352aab74f38cf29d1ed3ae51b844057ea0821a0 | [] | no_license | kvenLin/JDK-Source | f86737d3761102933c4b87730bca8928a5885287 | 1ff43b09f1056d91de97356be388d58c98ba1982 | refs/heads/master | 2023-08-10T11:26:59.051952 | 2023-07-20T06:48:45 | 2023-07-20T06:48:45 | 161,105,850 | 60 | 24 | null | 2022-06-17T02:19:27 | 2018-12-10T02:37:12 | Java | UTF-8 | Java | false | false | 5,150 | java | /*
* Copyright (c) 2007-2012, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.org.apache.bcel.internal.util;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache BCEL" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Apache BCEL", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
* ITS 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
import java.io.*;
import java.util.Map;
import java.util.HashMap;
import com.sun.org.apache.bcel.internal.classfile.*;
/**
* The repository maintains information about which classes have
* been loaded.
*
* It loads its data from the ClassLoader implementation
* passed into its constructor.
*
* @see com.sun.org.apache.bcel.internal.Repository
*
* @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
* @author David Dixon-Peugh
*/
public class ClassLoaderRepository
implements Repository
{
private java.lang.ClassLoader loader;
private HashMap loadedClasses =
new HashMap(); // CLASSNAME X JAVACLASS
public ClassLoaderRepository( java.lang.ClassLoader loader ) {
this.loader = loader;
}
/**
* Store a new JavaClass into this Repository.
*/
public void storeClass( JavaClass clazz ) {
loadedClasses.put( clazz.getClassName(),
clazz );
clazz.setRepository( this );
}
/**
* Remove class from repository
*/
public void removeClass(JavaClass clazz) {
loadedClasses.remove(clazz.getClassName());
}
/**
* Find an already defined JavaClass.
*/
public JavaClass findClass( String className ) {
if ( loadedClasses.containsKey( className )) {
return (JavaClass) loadedClasses.get( className );
} else {
return null;
}
}
/**
* Lookup a JavaClass object from the Class Name provided.
*/
public JavaClass loadClass( String className )
throws ClassNotFoundException
{
String classFile = className.replace('.', '/');
JavaClass RC = findClass( className );
if (RC != null) { return RC; }
try {
InputStream is =
loader.getResourceAsStream( classFile + ".class" );
if(is == null) {
throw new ClassNotFoundException(className + " not found.");
}
ClassParser parser = new ClassParser( is, className );
RC = parser.parse();
storeClass( RC );
return RC;
} catch (IOException e) {
throw new ClassNotFoundException( e.toString() );
}
}
public JavaClass loadClass(Class clazz) throws ClassNotFoundException {
return loadClass(clazz.getName());
}
/** Clear all entries from cache.
*/
public void clear() {
loadedClasses.clear();
}
}
| [
"1256233771@qq.com"
] | 1256233771@qq.com |
d4de5bab85cbf9ce7aff7af1956fb6ab142746c0 | 5ec06dab1409d790496ce082dacb321392b32fe9 | /clients/java-msf4j/generated/src/gen/java/org/openapitools/model/ComDayCqWorkflowImplEmailEMailNotificationServiceProperties.java | 6a9aae818721e02245d02bb8230d333b9785a10d | [
"Apache-2.0"
] | permissive | shinesolutions/swagger-aem-osgi | e9d2385f44bee70e5bbdc0d577e99a9f2525266f | c2f6e076971d2592c1cbd3f70695c679e807396b | refs/heads/master | 2022-10-29T13:07:40.422092 | 2021-04-09T07:46:03 | 2021-04-09T07:46:03 | 190,217,155 | 3 | 3 | Apache-2.0 | 2022-10-05T03:26:20 | 2019-06-04T14:23:28 | null | UTF-8 | Java | false | false | 6,662 | java | package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.ConfigNodePropertyBoolean;
import org.openapitools.model.ConfigNodePropertyString;
/**
* ComDayCqWorkflowImplEmailEMailNotificationServiceProperties
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen", date = "2019-08-05T00:54:29.762Z[GMT]")
public class ComDayCqWorkflowImplEmailEMailNotificationServiceProperties {
@JsonProperty("from.address")
private ConfigNodePropertyString fromAddress = null;
@JsonProperty("host.prefix")
private ConfigNodePropertyString hostPrefix = null;
@JsonProperty("notify.onabort")
private ConfigNodePropertyBoolean notifyOnabort = null;
@JsonProperty("notify.oncomplete")
private ConfigNodePropertyBoolean notifyOncomplete = null;
@JsonProperty("notify.oncontainercomplete")
private ConfigNodePropertyBoolean notifyOncontainercomplete = null;
@JsonProperty("notify.useronly")
private ConfigNodePropertyBoolean notifyUseronly = null;
public ComDayCqWorkflowImplEmailEMailNotificationServiceProperties fromAddress(ConfigNodePropertyString fromAddress) {
this.fromAddress = fromAddress;
return this;
}
/**
* Get fromAddress
* @return fromAddress
**/
@ApiModelProperty(value = "")
public ConfigNodePropertyString getFromAddress() {
return fromAddress;
}
public void setFromAddress(ConfigNodePropertyString fromAddress) {
this.fromAddress = fromAddress;
}
public ComDayCqWorkflowImplEmailEMailNotificationServiceProperties hostPrefix(ConfigNodePropertyString hostPrefix) {
this.hostPrefix = hostPrefix;
return this;
}
/**
* Get hostPrefix
* @return hostPrefix
**/
@ApiModelProperty(value = "")
public ConfigNodePropertyString getHostPrefix() {
return hostPrefix;
}
public void setHostPrefix(ConfigNodePropertyString hostPrefix) {
this.hostPrefix = hostPrefix;
}
public ComDayCqWorkflowImplEmailEMailNotificationServiceProperties notifyOnabort(ConfigNodePropertyBoolean notifyOnabort) {
this.notifyOnabort = notifyOnabort;
return this;
}
/**
* Get notifyOnabort
* @return notifyOnabort
**/
@ApiModelProperty(value = "")
public ConfigNodePropertyBoolean getNotifyOnabort() {
return notifyOnabort;
}
public void setNotifyOnabort(ConfigNodePropertyBoolean notifyOnabort) {
this.notifyOnabort = notifyOnabort;
}
public ComDayCqWorkflowImplEmailEMailNotificationServiceProperties notifyOncomplete(ConfigNodePropertyBoolean notifyOncomplete) {
this.notifyOncomplete = notifyOncomplete;
return this;
}
/**
* Get notifyOncomplete
* @return notifyOncomplete
**/
@ApiModelProperty(value = "")
public ConfigNodePropertyBoolean getNotifyOncomplete() {
return notifyOncomplete;
}
public void setNotifyOncomplete(ConfigNodePropertyBoolean notifyOncomplete) {
this.notifyOncomplete = notifyOncomplete;
}
public ComDayCqWorkflowImplEmailEMailNotificationServiceProperties notifyOncontainercomplete(ConfigNodePropertyBoolean notifyOncontainercomplete) {
this.notifyOncontainercomplete = notifyOncontainercomplete;
return this;
}
/**
* Get notifyOncontainercomplete
* @return notifyOncontainercomplete
**/
@ApiModelProperty(value = "")
public ConfigNodePropertyBoolean getNotifyOncontainercomplete() {
return notifyOncontainercomplete;
}
public void setNotifyOncontainercomplete(ConfigNodePropertyBoolean notifyOncontainercomplete) {
this.notifyOncontainercomplete = notifyOncontainercomplete;
}
public ComDayCqWorkflowImplEmailEMailNotificationServiceProperties notifyUseronly(ConfigNodePropertyBoolean notifyUseronly) {
this.notifyUseronly = notifyUseronly;
return this;
}
/**
* Get notifyUseronly
* @return notifyUseronly
**/
@ApiModelProperty(value = "")
public ConfigNodePropertyBoolean getNotifyUseronly() {
return notifyUseronly;
}
public void setNotifyUseronly(ConfigNodePropertyBoolean notifyUseronly) {
this.notifyUseronly = notifyUseronly;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComDayCqWorkflowImplEmailEMailNotificationServiceProperties comDayCqWorkflowImplEmailEMailNotificationServiceProperties = (ComDayCqWorkflowImplEmailEMailNotificationServiceProperties) o;
return Objects.equals(this.fromAddress, comDayCqWorkflowImplEmailEMailNotificationServiceProperties.fromAddress) &&
Objects.equals(this.hostPrefix, comDayCqWorkflowImplEmailEMailNotificationServiceProperties.hostPrefix) &&
Objects.equals(this.notifyOnabort, comDayCqWorkflowImplEmailEMailNotificationServiceProperties.notifyOnabort) &&
Objects.equals(this.notifyOncomplete, comDayCqWorkflowImplEmailEMailNotificationServiceProperties.notifyOncomplete) &&
Objects.equals(this.notifyOncontainercomplete, comDayCqWorkflowImplEmailEMailNotificationServiceProperties.notifyOncontainercomplete) &&
Objects.equals(this.notifyUseronly, comDayCqWorkflowImplEmailEMailNotificationServiceProperties.notifyUseronly);
}
@Override
public int hashCode() {
return Objects.hash(fromAddress, hostPrefix, notifyOnabort, notifyOncomplete, notifyOncontainercomplete, notifyUseronly);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComDayCqWorkflowImplEmailEMailNotificationServiceProperties {\n");
sb.append(" fromAddress: ").append(toIndentedString(fromAddress)).append("\n");
sb.append(" hostPrefix: ").append(toIndentedString(hostPrefix)).append("\n");
sb.append(" notifyOnabort: ").append(toIndentedString(notifyOnabort)).append("\n");
sb.append(" notifyOncomplete: ").append(toIndentedString(notifyOncomplete)).append("\n");
sb.append(" notifyOncontainercomplete: ").append(toIndentedString(notifyOncontainercomplete)).append("\n");
sb.append(" notifyUseronly: ").append(toIndentedString(notifyUseronly)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"cliffano@gmail.com"
] | cliffano@gmail.com |
de15826bd8daf615874a309f6308ea2d6c7c45a9 | 3a6a7fb7b94991fe46304be1c4f6ff9849813d21 | /src/test/java/kr/pe/okjsp/member/TestObject.java | f80bda9d729e94ba4350dcc51d362abae4b17cca | [] | no_license | rkJun/okjsp-site | 9745658b7dc828113acac82e166d96fc257596f0 | a83c5ea3d629d9de5808b64ac24c07d89f1d34f3 | refs/heads/master | 2021-01-16T21:02:47.492985 | 2013-05-24T04:21:47 | 2013-05-24T04:21:47 | 1,928,346 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 692 | java | package kr.pe.okjsp.member;
import kr.pe.okjsp.Article;
public class TestObject {
public static Member getTestMember() {
Member member = new Member();
member.setSid(3582);
member.setId("kenu1");
return member;
}
public static Article getTestArticle(Member member) {
Article article = new Article();
article.setBbs("recruit");
article.setSubject("subject");
article.setId(String.valueOf(member.getSid()));
article.setSid(member.getSid());
article.setContent("content");
article.setWriter(member.getId());
return article;
}
public static void deleteTestData() {
Member member = TestObject.getTestMember();
new PointDao().deletePoint(member.getSid());
}
}
| [
"kenu.heo@gmail.com"
] | kenu.heo@gmail.com |
3d275eed70da937d051288f2ec70a5f2fbfcccb7 | 220aa92b5848802bb6bf76785b368f6eb1471b73 | /app/src/main/java/com/example/zhanghao/woaisiji/resp/RespFBHCommodityDetails.java | e2a987b4b01062bd93f480ab7076536f08d8f114 | [] | no_license | Cheng7758/FuBaihui | c0fa497cd6870ce4658720065b9425a14e1a1663 | 4830733a8b2d50f0e00d1e65d9b0a44a50ec22ff | refs/heads/master | 2020-06-16T11:00:54.696259 | 2019-08-14T01:53:36 | 2019-08-14T01:53:36 | 195,545,689 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 362 | java | package com.example.zhanghao.woaisiji.resp;
import com.example.zhanghao.woaisiji.bean.fbh.FBHBusinessDetails;
public class RespFBHCommodityDetails extends RespBase{
private FBHBusinessDetails data;
public FBHBusinessDetails getData() {
return data;
}
public void setData(FBHBusinessDetails data) {
this.data = data;
}
}
| [
"wang62719@gmail.com"
] | wang62719@gmail.com |
d5851ab4073a0a53b9c2da62a138e1fe57ed3766 | ab38911961108b04af6d0bad17033872cd76560a | /src/main/java/lk/geeks/controller/LocalMemberController.java | 180a28862aef99586481093bb893a3f310b05c6e | [] | no_license | sahan1995/Library-Management-System-BackEnd | abb6fb96370b067b548e2bb631c77c0032b8245d | 5d62de2872ff28ac55b91899b20dfe1c9f9b3809 | refs/heads/master | 2020-05-07T15:43:56.079867 | 2019-04-30T16:13:53 | 2019-04-30T16:13:53 | 180,650,126 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,009 | java | package lk.geeks.controller;
import lk.geeks.dto.LocalMemberDTO;
import lk.geeks.entity.LocalMember;
import lk.geeks.service.LocalMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@CrossOrigin
@RestController
@RequestMapping(value = "api/v1/localmemebrs")
/**
* This is the API for the Control Local Members
*/
public class LocalMemberController {
@Autowired
private LocalMemberService localMemberService;
/**
* Find Local Member By NIC
* @param NIC NIC of Local Member
* @return Local Member DTO
*/
@GetMapping(value = "/{NIC}",produces = { "application/xml", "text/xml" })
public LocalMemberDTO findById(@PathVariable("NIC") String NIC){
return localMemberService.findById(NIC);
}
/**
* Find All Local Members
* @return List of Local Memeber DTO
*/
@GetMapping
public List<LocalMemberDTO> getAll(){
return localMemberService.findAll();
}
/**
* Save Local Member
* @param localMemberDTO LocalMemberDTO containing all the information of Local Member
* @return Sate of Save or Not
*/
@PostMapping
public boolean save(@RequestBody LocalMemberDTO localMemberDTO){
return localMemberService.save(localMemberDTO);
}
/**
* Update Local Member
* @param localMemberDTO LocalMemberDTO containing all the information of Local Member
* @return Sate of Update or Not
*/
@PutMapping(value = "/{NIC}")
public boolean update(@PathVariable("NIC") String NIC,@RequestBody LocalMemberDTO localMemberDTO){
return localMemberService.update(NIC,localMemberDTO);
}
/**
* Delete Local Member
* @param NIC NIC of Local Memebr
* @return Sate of Delete or Not
*/
@DeleteMapping(value = "/{NIC}")
public boolean delete(@PathVariable("NIC") String NIC){
return localMemberService.delete(NIC);
}
}
| [
"sahanrajakaruna001@gmail.com"
] | sahanrajakaruna001@gmail.com |
4f7e16d737fa80d30f3f0c5fc332d8e0a8e202a2 | d18ad1a094da0d2b2f5c6fe6176ea791f79b2846 | /ArsMagica/src/hopshackle/simulation/arsmagica/Vis.java | c5e7fef043231c1e96da09971b845bdbaa3b647e | [] | no_license | hopshackle/ArsMagica | e5bcf312e4abeef802a9d5c4d6dcfb2a7869fbdc | 2183f0f5e9b3f6cbf0df6a605e4f21e47cf4268f | refs/heads/master | 2021-01-23T06:20:59.790833 | 2020-07-26T15:03:01 | 2020-07-26T15:03:01 | 29,821,049 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 622 | java | package hopshackle.simulation.arsmagica;
import hopshackle.simulation.Artefact;
public class Vis extends ArsMagicaItem {
private Arts type;
public Vis(Arts type) {
this.type = type;
}
public Arts getType() {
return type;
}
@Override
public boolean isA(Artefact item) {
if (item instanceof Vis) return true;
return false;
}
@Override
public String toString() {
return "Pawn of " + type;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Vis))
return false;
Vis v = (Vis) other;
return this.getType() == v.getType();
}
}
| [
"james@janigo.co.uk"
] | james@janigo.co.uk |
9842f11dc9c09441999d47a77bc2236ff62d8818 | eb916fd9e872e6bd13c39e0d79c5f79866797080 | /cougar-test/cougar-normal-code-tests/src/test/java/com/betfair/cougar/tests/updatedcomponenttests/standardtesting/rest/RestPostRequestTypesDateTimeMiliisecondsTest.java | 12bd0ade0e3de221dbd70acd692b3f86093bd50a | [
"Apache-2.0"
] | permissive | betfair/cougar | c4cb227024402a19da217150b99f7d73d75d7cce | 08d1fe338fbd0e8572a9c2305bb5796402d5b1f5 | refs/heads/master | 2023-08-26T16:44:20.538347 | 2016-03-21T15:10:27 | 2016-03-21T15:10:27 | 13,865,967 | 21 | 12 | Apache-2.0 | 2022-10-03T22:39:04 | 2013-10-25T16:30:18 | Java | UTF-8 | Java | false | false | 5,986 | java | /*
* Copyright 2013, The Sporting Exchange Limited
*
* 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.
*/
// Originally from UpdatedComponentTests/StandardTesting/REST/Rest_Post_RequestTypes_DateTime_Miliiseconds.xls;
package com.betfair.cougar.tests.updatedcomponenttests.standardtesting.rest;
import com.betfair.testing.utils.cougar.misc.TimingHelpers;
import com.betfair.testing.utils.cougar.misc.XMLHelpers;
import com.betfair.testing.utils.JSONHelpers;
import com.betfair.testing.utils.cougar.assertions.AssertionUtils;
import com.betfair.testing.utils.cougar.beans.HttpCallBean;
import com.betfair.testing.utils.cougar.beans.HttpResponseBean;
import com.betfair.testing.utils.cougar.manager.CougarManager;
import com.betfair.testing.utils.cougar.manager.RequestLogRequirement;
import org.json.JSONObject;
import org.testng.annotations.Test;
import org.w3c.dom.Document;
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.ByteArrayInputStream;
import java.sql.Timestamp;
/**
* Ensure that Cougar can handle the dateTime data type in the post body with a date with millisecond accuracy
*/
public class RestPostRequestTypesDateTimeMiliisecondsTest {
@Test
public void doTest() throws Exception {
// Set up the Http Call Bean to make the request
CougarManager cougarManager1 = CougarManager.getInstance();
HttpCallBean getNewHttpCallBean1 = cougarManager1.getNewHttpCallBean();
cougarManager1 = cougarManager1;
getNewHttpCallBean1.setOperationName("dateTimeOperation");
getNewHttpCallBean1.setServiceName("baseline", "cougarBaseline");
getNewHttpCallBean1.setVersion("v2");
// Create a date time object expected to be in the response object
String date = TimingHelpers.convertUTCDateTimeToCougarFormat((int) 2009, (int) 6, (int) 1, (int) 13, (int) 50, (int) 0, (int) 435);
// Set the post body to contain a date time object
getNewHttpCallBean1.setRestPostQueryObjects(DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream("<BodyParamDateTimeObject><dateTimeParameter>2009-06-01T13:50:00.435Z</dateTimeParameter></BodyParamDateTimeObject>".getBytes())));
// Get current time for getting log entries later
Timestamp getTimeAsTimeStamp9 = new Timestamp(System.currentTimeMillis());
// Make the 4 REST calls to the operation
cougarManager1.makeRestCougarHTTPCalls(getNewHttpCallBean1);
// Create the expected response as an XML document (using the date objects created earlier)
XMLHelpers xMLHelpers4 = new XMLHelpers();
Document responseXML = xMLHelpers4.createAsDocument(DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(("<DateTimeOperationResponse><DateTimeOperationResponseObject><localTime>"+date+"</localTime><localTime2>"+date+"</localTime2></DateTimeOperationResponseObject></DateTimeOperationResponse>").getBytes())));
// Create the expected response as a JSON object (using the date objects created earlier)
JSONHelpers jSONHelpers5 = new JSONHelpers();
JSONObject responseJSON = jSONHelpers5.createAsJSONObject(new JSONObject("{\"localTime\":\""+date+"\",\"localTime2\":\""+date+"\"}"));
// Check the 4 responses are as expected
HttpResponseBean response6 = getNewHttpCallBean1.getResponseObjectsByEnum(com.betfair.testing.utils.cougar.enums.CougarMessageProtocolResponseTypeEnum.RESTXMLXML);
AssertionUtils.multiAssertEquals(responseXML, response6.getResponseObject());
AssertionUtils.multiAssertEquals((int) 200, response6.getHttpStatusCode());
AssertionUtils.multiAssertEquals("OK", response6.getHttpStatusText());
HttpResponseBean response7 = getNewHttpCallBean1.getResponseObjectsByEnum(com.betfair.testing.utils.cougar.enums.CougarMessageProtocolResponseTypeEnum.RESTJSONJSON);
AssertionUtils.multiAssertEquals(responseJSON, response7.getResponseObject());
AssertionUtils.multiAssertEquals((int) 200, response7.getHttpStatusCode());
AssertionUtils.multiAssertEquals("OK", response7.getHttpStatusText());
HttpResponseBean response8 = getNewHttpCallBean1.getResponseObjectsByEnum(com.betfair.testing.utils.cougar.enums.CougarMessageProtocolResponseTypeEnum.RESTXMLJSON);
AssertionUtils.multiAssertEquals(responseJSON, response8.getResponseObject());
AssertionUtils.multiAssertEquals((int) 200, response8.getHttpStatusCode());
AssertionUtils.multiAssertEquals("OK", response8.getHttpStatusText());
HttpResponseBean response9 = getNewHttpCallBean1.getResponseObjectsByEnum(com.betfair.testing.utils.cougar.enums.CougarMessageProtocolResponseTypeEnum.RESTJSONXML);
AssertionUtils.multiAssertEquals(responseXML, response9.getResponseObject());
AssertionUtils.multiAssertEquals((int) 200, response9.getHttpStatusCode());
AssertionUtils.multiAssertEquals("OK", response9.getHttpStatusText());
// generalHelpers.pauseTest(500L);
// Check the log entries are as expected
cougarManager1.verifyRequestLogEntriesAfterDate(getTimeAsTimeStamp9, new RequestLogRequirement("2.8", "dateTimeOperation"),new RequestLogRequirement("2.8", "dateTimeOperation"),new RequestLogRequirement("2.8", "dateTimeOperation"),new RequestLogRequirement("2.8", "dateTimeOperation") );
}
}
| [
"simon@exemel.co.uk"
] | simon@exemel.co.uk |
fdf3369405cc2008b53db21d7c0462a4ff84e949 | 4b451a3f8c0a309d27b7afbcd3a1bc9475665f67 | /wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/tables/Tr.java | 8aa1f2e95b161e464825bb7845f414d17f8db363 | [
"Apache-2.0"
] | permissive | deshpamit/wff | 0ba31ea65a77f206dd368d27595ad20ab2d66aca | 2551216cf78fa48e37a3eb6ddcb60e79b8b1b2f1 | refs/heads/master | 2021-01-12T14:08:08.175632 | 2016-10-01T14:18:17 | 2016-10-01T14:18:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,034 | java | package com.webfirmframework.wffweb.tag.html.tables;
import java.util.logging.Logger;
import com.webfirmframework.wffweb.settings.WffConfiguration;
import com.webfirmframework.wffweb.tag.html.AbstractHtml;
import com.webfirmframework.wffweb.tag.html.TagNameConstants;
import com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute;
import com.webfirmframework.wffweb.tag.html.identifier.GlobalAttributable;
import com.webfirmframework.wffweb.tag.html.identifier.TrAttributable;
/**
* @author WFF
* @since 1.0.0
* @version 1.0.0
*
*/
public class Tr extends AbstractHtml {
private static final long serialVersionUID = 1_0_0L;
public static final Logger LOGGER = Logger.getLogger(Tr.class.getName());
{
init();
}
/**
* Represents the root of an HTML or XHTML document. All other elements must
* be descendants of this element.
*
* @param base
* i.e. parent tag of this tag
* @param attributes
* An array of {@code AbstractAttribute}
*
* @since 1.0.0
*/
public Tr(final AbstractHtml base, final AbstractAttribute... attributes) {
super(TagNameConstants.TR, base, attributes);
if (WffConfiguration.isDirectionWarningOn()) {
warnForUnsupportedAttributes(attributes);
}
}
private static void warnForUnsupportedAttributes(
final AbstractAttribute... attributes) {
for (final AbstractAttribute abstractAttribute : attributes) {
if (!(abstractAttribute != null
&& (abstractAttribute instanceof TrAttributable
|| abstractAttribute instanceof GlobalAttributable))) {
LOGGER.warning(abstractAttribute
+ " is not an instance of TrAttribute");
}
}
}
/**
* invokes only once per object
*
* @author WFF
* @since 1.0.0
*/
protected void init() {
// to override and use this method
}
}
| [
"webfirm.framework@gmail.com"
] | webfirm.framework@gmail.com |
2d0cabac6332f574eefbca33a03fe79875f07a4f | 27c4a5b470b167ced1ece66407b0404377f87aca | /Android/LGame-0.3.2(OpenGLES)/src/other/srpg/org/loon/framework/android/game/srpg/effect/SRPGTaichiEffect.java | 614ea0e690dba0fb88f279292ab40b3a73936b08 | [] | no_license | truecping1982/LGame | ae13b8595bc0778f44649eaa71453504aca45b50 | b4c10a8e79a2e00373a6b6f47c51cb2dc7aa2aaa | refs/heads/master | 2020-06-26T21:02:13.597244 | 2011-11-19T09:09:01 | 2011-11-19T09:09:01 | 2,807,646 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,025 | java | package org.loon.framework.android.game.srpg.effect;
import org.loon.framework.android.game.core.graphics.opengl.GLColor;
import org.loon.framework.android.game.core.graphics.opengl.GLEx;
import org.loon.framework.android.game.core.timer.LTimer;
/**
* Copyright 2008 - 2011
*
* 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.
*
* @project loonframework
* @author chenpeng
* @email:ceponline@yahoo.com.cn
* @version 0.1
*/
public class SRPGTaichiEffect extends SRPGEffect {
private LTimer timer;
private int flag;
private GLColor[] colors = { GLColor.black, GLColor.white };
private int t_x, t_y, twidth;
public SRPGTaichiEffect(int x, int y, int w) {
timer = new LTimer(50);
this.t_x = x;
this.t_y = y;
this.twidth = w;
this.setExist(true);
}
public void draw(GLEx g, int tx, int ty) {
next();
int x = (t_x - tx) - twidth / 2;
int y = (t_y - ty) - twidth / 2;
if (timer.action(1)) {
flag = 1 - flag;
}
g.setColor(colors[flag]);
g.fillArc(x, y, twidth, twidth, 270, 180);
g.setColor(colors[1 - flag]);
g.fillArc(x, y, twidth, twidth, 90, 180);
g.fillArc(x + twidth / 4, y, twidth / 2, twidth / 2, 270, 180);
g.setColor(colors[flag]);
g.fillOval(x + twidth / 4, y + twidth / 2, twidth / 2, twidth / 2);
g.fillOval(x + twidth / 16 * 7, y + twidth / 6, twidth / 8, twidth / 8);
g.setColor(colors[1 - flag]);
g.fillOval(x + twidth / 16 * 7, y + twidth / 6 + twidth / 2,
twidth / 8, twidth / 8);
if (super.frame >= 120) {
setExist(false);
}
}
}
| [
"javachenpeng@yahoo.com"
] | javachenpeng@yahoo.com |
08d656b406c0876ff8038771e99654c58eeace74 | b8dca15969aefd4e15704aff902a8804ed3a5c44 | /proxy-54-proxy_on_pool/src/main/java/com/example/demo/Application.java | 5579154ed5677e3e02c1abe503f20cdc83bc47bd | [] | no_license | ttddyy/r2dbc-issues | d91811716359f4e5e47ea615510a89963008410c | 4865b7f03f0d427f0463706d100db7ef1df53b18 | refs/heads/master | 2022-02-04T18:18:29.425037 | 2020-01-17T21:55:25 | 2020-01-17T21:56:39 | 234,641,865 | 0 | 0 | null | 2022-01-21T23:36:40 | 2020-01-17T21:44:55 | Java | UTF-8 | Java | false | false | 4,831 | java | /*
* Copyright 2012-2019 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 com.example.demo;
import java.time.Duration;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
import io.r2dbc.pool.ConnectionPool;
import io.r2dbc.pool.ConnectionPoolConfiguration;
import io.r2dbc.proxy.ProxyConnectionFactory;
import io.r2dbc.proxy.core.QueryExecutionInfo;
import io.r2dbc.proxy.listener.ProxyExecutionListener;
import io.r2dbc.proxy.support.QueryExecutionInfoFormatter;
import io.r2dbc.spi.ConnectionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.core.publisher.Flux;
import reactor.core.scheduler.Scheduler;
import reactor.core.scheduler.Schedulers;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.r2dbc.ConnectionFactoryBuilder;
import org.springframework.boot.autoconfigure.r2dbc.ConnectionFactoryOptionsBuilderCustomizer;
import org.springframework.boot.autoconfigure.r2dbc.R2dbcProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.util.StringUtils;
@SpringBootApplication
@EnableTransactionManagement
public class Application {
private static Logger logger = LoggerFactory.getLogger(Application.class);
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Configuration(proxyBeanMethods = false)
static class R2dbcConfiguration {
// @Bean
public ConnectionFactory connectionFactoryOnly(R2dbcProperties properties,
List<ConnectionFactoryOptionsBuilderCustomizer> customizers) {
ConnectionFactory connectionFactory = ConnectionFactoryBuilder.create(properties).customize(customizers)
.build();
return connectionFactory;
}
@Bean(destroyMethod = "dispose")
public ConnectionFactory connectionFactoryWithPool(R2dbcProperties properties,
List<ConnectionFactoryOptionsBuilderCustomizer> customizers) {
ConnectionFactory connectionFactory = ConnectionFactoryBuilder.create(properties).customize(customizers)
.build();
R2dbcProperties.Pool pool = properties.getPool();
ConnectionPoolConfiguration.Builder builder = ConnectionPoolConfiguration.builder(connectionFactory)
.maxSize(pool.getMaxSize()).initialSize(pool.getInitialSize()).maxIdleTime(pool.getMaxIdleTime());
if (StringUtils.hasText(pool.getValidationQuery())) {
builder.validationQuery(pool.getValidationQuery());
}
return new ConnectionPool(builder.build());
}
@Primary
@Bean
public ConnectionFactory wrapWithProxy(ConnectionFactory original) {
return ProxyConnectionFactory.builder(original)
.listener(new MyQueryListener())
.build();
}
// @Bean
public ApplicationRunner runner(CityService cityService) {
return args -> {
int repeat = 100;
repeat = 1_000;
// repeat = 100_000;
Scheduler scheduler = Schedulers.newParallel("my-parallel", 10);
cityService.insert()
.subscribeOn(scheduler)
.repeat(repeat)
// .then(cityService.count())
// .doOnNext(count -> {
// logger.info("city count={}", count);
// })
.subscribe();
};
}
@Bean
public ApplicationRunner runner2(CityService cityService) {
return args -> {
Flux.interval(Duration.ofMillis(20))
.flatMap(t -> cityService.insert())
.doOnNext(city -> {
logger.info("id={}", city.getId());
// System.out.println("aaa");
})
.doOnError(exception -> {
logger.error("** ERROR **", exception);
})
.subscribe();
};
}
}
static class MyQueryListener implements ProxyExecutionListener {
private AtomicLong queryCount = new AtomicLong();
private QueryExecutionInfoFormatter formatter = new QueryExecutionInfoFormatter().showQuery();
@Override
public void afterQuery(QueryExecutionInfo execInfo) {
logger.info("[{}] [{}] {} ", queryCount.incrementAndGet(), Thread.currentThread().getName(), formatter.format(execInfo));
}
}
}
| [
"tadaya@ttddyy.net"
] | tadaya@ttddyy.net |
a451d4bdb8ddabdd6bfe80ba1a1926c1b60d02e9 | 03ade53b9b2a2c775b5c7d39be2d96b551f98cae | /app/src/main/java/com/sshy/yjy/strore/mate/main/index/address/SearchPositionAdapter.java | de385db4cb7974c3a21ef7ad66bf78d3955c89d4 | [] | no_license | JoeyChow1989/YiShanHome-master | 09b110728d0e2ecc50cf5ed94015717af62670ef | 85501b2fb422e3d5c104077212c8d7db560607f4 | refs/heads/master | 2020-06-02T21:13:50.334139 | 2019-06-11T07:06:00 | 2019-06-11T07:06:00 | 191,311,279 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,006 | java | package com.sshy.yjy.strore.mate.main.index.address;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.baidu.mapapi.search.sug.SuggestionResult;
import com.sshy.yjy.strore.R;
import java.util.List;
/**
* poi地点列表适配器(搜索页面)
*
* @author chenjunxu
*
*/
public class SearchPositionAdapter extends BaseAdapter {
private Context context;
private List<SuggestionResult.SuggestionInfo> datas;
/**
* 选中的item下标
*/
private int selectItemIndex;
public SearchPositionAdapter(Context context, List<SuggestionResult.SuggestionInfo> datas) {
this.datas = datas;
this.context = context;
// 默认第一个为选中项
selectItemIndex = 0;
}
@Override
public int getCount() {
if (datas == null) {
return 0;
}
return datas.size();
}
public void setSelectSearchItemIndex(int selectItemIndex) {
this.selectItemIndex = selectItemIndex;
}
@Override
public Object getItem(int position) {
return datas.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LocatorSearchViewHolder viewHolder;
if (convertView == null) {
viewHolder = new LocatorSearchViewHolder();
convertView = LayoutInflater.from(context).inflate(R.layout.location_item_poi, null, false);
viewHolder.tv_poi_name = (TextView) convertView.findViewById(R.id.tv_poi_name);
viewHolder.tv_poi_address = (TextView) convertView.findViewById(R.id.tv_poi_address);
viewHolder.img_cur_point = (ImageView) convertView.findViewById(R.id.img_cur_point);
convertView.setTag(viewHolder);
} else {
viewHolder = (LocatorSearchViewHolder) convertView.getTag();
}
if (datas != null && datas.size() > 0) {
SuggestionResult.SuggestionInfo suggestionInfo = datas.get(position);
viewHolder.tv_poi_address.setText(suggestionInfo.city + suggestionInfo.district);
viewHolder.tv_poi_name.setText(suggestionInfo.key);
if (selectItemIndex == position) {
viewHolder.img_cur_point.setImageResource(R.drawable.position_is_select);
} else {
viewHolder.img_cur_point.setImageDrawable(null);
}
}
return convertView;
}
private class LocatorSearchViewHolder {
/**
* 名称
*/
private TextView tv_poi_name;
/**
* 地址
*/
private TextView tv_poi_address;
/**
* 选中的按钮
*/
private ImageView img_cur_point;
}
}
| [
"100360258@qq.com"
] | 100360258@qq.com |
67067d4b9bcea4881f101447a84ee07e4b75e2ff | 2e72962cfb43cbc315b4ce236772d232cd0d21ea | /manifold-deps-parent/manifold-sql/src/main/java/manifold/sql/query/type/SqlIssueContainer.java | a794c605408455e00cad8a28e46692adcafda58b | [
"Apache-2.0"
] | permissive | manifold-systems/manifold | 3921848c3155c9734bf19f4e73ee4be39210bfd7 | 2bbaed1282ca268dde649ce04f7ef6924f53695e | refs/heads/master | 2023-08-27T03:11:38.736583 | 2023-08-26T04:22:45 | 2023-08-26T04:22:45 | 93,584,426 | 2,024 | 126 | Apache-2.0 | 2023-07-30T14:14:18 | 2017-06-07T02:37:23 | Java | UTF-8 | Java | false | false | 2,652 | java | /*
* Copyright (c) 2019 - Manifold Systems LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package manifold.sql.query.type;
import manifold.internal.javac.IIssue;
import manifold.internal.javac.IIssueContainer;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class SqlIssueContainer implements IIssueContainer
{
private final List<IIssue> _issues;
private final String _productName;
@SuppressWarnings("WeakerAccess")
public SqlIssueContainer( String productName, List<Exception> errors )
{
_productName = productName;
_issues = new ArrayList<>();
addIssues( errors );
}
@Override
public List<IIssue> getIssues()
{
return _issues;
}
@Override
public List<IIssue> getWarnings()
{
return getIssues().stream()
.filter( issue -> issue.getKind() == IIssue.Kind.Warning )
.collect( Collectors.toList() );
}
@Override
public List<IIssue> getErrors()
{
return getIssues().stream()
.filter( issue -> issue.getKind() == IIssue.Kind.Error )
.collect( Collectors.toList() );
}
public void addIssue( IIssue.Kind kind, int offset, String msg )
{
_issues.add( new SqlIssue( kind, offset, msg ) );
}
@SuppressWarnings("WeakerAccess")
public void addIssues( List<Exception> errors )
{
for( Exception e: errors )
{
int offset = findOffset( e );
_issues.add( new SqlIssue( IIssue.Kind.Error, offset, e.getMessage() ) );
}
}
private int findOffset( Exception e )
{
switch( _productName.toLowerCase() )
{
case "h2":
return findOffset_h2( e );
default:
return 0;
}
}
private int findOffset_h2( Exception e )
{
if( e instanceof SQLException )
{
String msg = e.getMessage();
int start = msg.indexOf( '"' ) + 1;
if( start > 0 )
{
int marker = msg.indexOf( "[*]" );
if( marker >= 0 )
{
return marker - start;
}
}
}
return 0;
}
@Override
public boolean isEmpty()
{
return _issues == null;
}
} | [
"rsmckinney@hotmail.com"
] | rsmckinney@hotmail.com |
3cd5829341c1cccea57ec2f1219e54bb6709e011 | fc6c869ee0228497e41bf357e2803713cdaed63e | /weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/location/ui/PoiHeaderView.java | caab819c685ffd1f143a6c658717d3125b6def82 | [] | no_license | hyb1234hi/reverse-wechat | cbd26658a667b0c498d2a26a403f93dbeb270b72 | 75d3fd35a2c8a0469dbb057cd16bca3b26c7e736 | refs/heads/master | 2020-09-26T10:12:47.484174 | 2017-11-16T06:54:20 | 2017-11-16T06:54:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,252 | java | package com.tencent.mm.plugin.location.ui;
import android.content.Context;
import android.content.Intent;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.tencent.gmtrace.GMTrace;
import com.tencent.mm.R.h;
import com.tencent.mm.R.i;
import com.tencent.mm.bj.d;
import com.tencent.mm.sdk.platformtools.bg;
import com.tencent.mm.sdk.platformtools.w;
public class PoiHeaderView
extends RelativeLayout
{
private Context context;
public TextView jPE;
public String mzu;
public String mzv;
public SimpleImageView mzw;
public PoiHeaderView(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
GMTrace.i(9718168813568L, 72406);
this.mzu = "";
this.mzv = "";
this.context = paramContext;
paramContext = View.inflate(this.context, R.i.cDr, this);
this.jPE = ((TextView)paramContext.findViewById(R.h.bGa));
this.mzw = ((SimpleImageView)paramContext.findViewById(R.h.bFW));
this.jPE.setVisibility(8);
this.mzw.setVisibility(8);
setVisibility(8);
setOnClickListener(new View.OnClickListener()
{
public final void onClick(View paramAnonymousView)
{
GMTrace.i(9661126279168L, 71981);
Intent localIntent = new Intent();
if (bg.nm(PoiHeaderView.a(PoiHeaderView.this))) {}
for (paramAnonymousView = PoiHeaderView.b(PoiHeaderView.this);; paramAnonymousView = PoiHeaderView.a(PoiHeaderView.this))
{
w.d("MicroMsg.PoiHeaderView", "click url %s", new Object[] { paramAnonymousView });
localIntent.putExtra("rawUrl", paramAnonymousView);
localIntent.putExtra("showShare", false);
d.a(PoiHeaderView.this.getContext(), "com.tencent.mm.plugin.webview.ui.tools.WebViewUI", localIntent);
GMTrace.o(9661126279168L, 71981);
return;
}
}
});
GMTrace.o(9718168813568L, 72406);
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes3-dex2jar.jar!\com\tencent\mm\plugin\location\ui\PoiHeaderView.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"robert0825@gmail.com"
] | robert0825@gmail.com |
e324f6a93b1d968fe9bb4cfbcfa5c7d85ac3705f | 34f8d4ba30242a7045c689768c3472b7af80909c | /JDK10-Java SE Development Kit 10/src/jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSuitesProvider.java | 06e3c9dc134137561e57c793d2bb4839ddf24138 | [
"Apache-2.0"
] | permissive | lovelycheng/JDK | 5b4cc07546f0dbfad15c46d427cae06ef282ef79 | 19a6c71e52f3ecd74e4a66be5d0d552ce7175531 | refs/heads/master | 2023-04-08T11:36:22.073953 | 2022-09-04T01:53:09 | 2022-09-04T01:53:09 | 227,544,567 | 0 | 0 | null | 2019-12-12T07:18:30 | 2019-12-12T07:18:29 | null | UTF-8 | Java | false | false | 2,336 | java | /*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, Red Hat Inc. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.graalvm.compiler.hotspot.aarch64;
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
import org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider;
import org.graalvm.compiler.hotspot.meta.HotSpotSuitesProvider;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.phases.BasePhase;
import org.graalvm.compiler.phases.common.AddressLoweringByUsePhase;
import org.graalvm.compiler.phases.common.ExpandLogicPhase;
import org.graalvm.compiler.phases.common.FixReadsPhase;
import org.graalvm.compiler.phases.common.PropagateDeoptimizeProbabilityPhase;
import org.graalvm.compiler.phases.tiers.LowTierContext;
import org.graalvm.compiler.phases.tiers.Suites;
import org.graalvm.compiler.phases.tiers.SuitesCreator;
import org.graalvm.compiler.replacements.aarch64.AArch64ReadReplacementPhase;
import java.util.ListIterator;
/**
* Subclass to factor out management of address lowering.
*/
public class AArch64HotSpotSuitesProvider extends HotSpotSuitesProvider {
private final AddressLoweringByUsePhase.AddressLoweringByUse addressLoweringByUse;
public AArch64HotSpotSuitesProvider(SuitesCreator defaultSuitesCreator, GraalHotSpotVMConfig config, HotSpotGraalRuntimeProvider runtime,
AddressLoweringByUsePhase.AddressLoweringByUse addressLoweringByUse) {
super(defaultSuitesCreator, config, runtime);
this.addressLoweringByUse = addressLoweringByUse;
}
@Override
public Suites createSuites(OptionValues options) {
Suites suites = super.createSuites(options);
ListIterator<BasePhase<? super LowTierContext>> findPhase = suites.getLowTier().findPhase(FixReadsPhase.class);
if (findPhase == null) {
findPhase = suites.getLowTier().findPhase(ExpandLogicPhase.class);
}
findPhase.add(new AddressLoweringByUsePhase(addressLoweringByUse));
findPhase = suites.getLowTier().findPhase(PropagateDeoptimizeProbabilityPhase.class);
findPhase.add(new AArch64ReadReplacementPhase());
return suites;
}
}
| [
"zeng-dream@live.com"
] | zeng-dream@live.com |
60d391b2e2ee9f6cc42a638c04c6507f6ae80af7 | 775c8331262a83cb19b8b4ea7a87b36a1e9a53d1 | /src/main/java/com/demo/hlAdapter/config/MvcConfig.java | cd3f229ee75a4904b16d31f376352ccb34006b4a | [] | no_license | 1InfinityDoesExist/hIAdapter | 00de11848e812dcada32ee27b704cce35411db71 | e03400dd2bb466931287413b63ca58a1b3aaf55e | refs/heads/master | 2022-12-29T15:14:06.331409 | 2020-10-18T07:44:16 | 2020-10-18T07:44:16 | 304,611,935 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 543 | java | package com.demo.hlAdapter.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.demo.hlAdapter.security.interceptor.MultiTenancyInterceptor;
@Configuration
public class MvcConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new MultiTenancyInterceptor());
}
}
| [
"avinash.patel@gaiansolutions.com"
] | avinash.patel@gaiansolutions.com |
b5c32632cccc0ebe527af51afe607fcc40dc93f1 | 06261cd6c6e85734c6840e838553c3667438adaf | /Exception_Handling/src/app6/A.java | c55c3d8f24816ca613e721bf8b29d4c0dbe1c34b | [] | no_license | Vijay-Ky/PRYCE_TRAINING | d6e13b2112174ccaa79cfe0ba2337caeacb2299a | 2435249b63abeaf1bc9f1a0589862e5f26e70808 | refs/heads/master | 2020-04-06T18:43:22.741556 | 2018-11-15T12:38:05 | 2018-11-15T12:38:05 | 157,709,982 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 154 | java | class A
{
public static void main(String[] args)
{
System.out.println("main begin");
int i = 10/0;
System.out.println("main end");
}
} | [
"vijayky007@gmail.com"
] | vijayky007@gmail.com |
120bed4ec9ff2144f5c489872cbc4ca17f4421f7 | bbc265db09b3f315825f22decd958a565fcd8d26 | /src/com/mayhem/rs2/content/skill/agility/obstacle/Obstacle.java | 7e0a0c47564ba6c9ba123149dba165ea595dbf9d | [] | no_license | jlabranche/SSL2019 | b175421822d2dc11abaad9f497441ba4ed546cb3 | 6c04fe16fa36ecdcf665b7527f9e0694f55b8fc2 | refs/heads/master | 2020-09-09T20:34:51.222139 | 2020-02-20T00:41:23 | 2020-02-20T00:41:23 | 221,561,429 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,231 | java | package com.mayhem.rs2.content.skill.agility.obstacle;
import com.mayhem.rs2.entity.Location;
import com.mayhem.rs2.entity.player.Player;
public final class Obstacle {
private final ObstacleType type;
private final Location start;
private final Location end;
private final int level;
private final float experience;
private final int ordinal;
private final Obstacle next;
private Obstacle(ObstacleBuilder builder) {
type = builder.type;
start = builder.start;
end = builder.end;
level = builder.level;
experience = builder.experience;
ordinal = builder.ordinal;
next = builder.next;
}
public Location getStart() {
return start;
}
public Location getEnd() {
return end;
}
public Obstacle getNext() {
return next;
}
public int getOrdinal() {
return ordinal;
}
public ObstacleType getType() {
return type;
}
@Override
public String toString() {
return "OBSTACLE [Type: " + type + ", Start: " + start + ", End: " + end + ", Level: " + level + ", Experience: " + experience + ", Ordinal: " + ordinal + "]";
}
public void execute(Player player) {
type.execute(player, next, start, end, level, experience, ordinal);
}
public static class ObstacleBuilder {
// Required parameters
private final ObstacleType type;
private final Location start;
private final Location end;
// Optional parameters
private int level;
private float experience;
private int ordinal;
private Obstacle next;
public ObstacleBuilder(ObstacleType type, Location start, Location end) {
this.type = type;
this.end = end;
this.start = start;
level = 1;
experience = 0;
ordinal = -1;
}
public ObstacleBuilder setLevel(int level) {
this.level = level;
return this;
}
public ObstacleBuilder setExperience(float experience) {
this.experience = experience;
return this;
}
public ObstacleBuilder setOrdinal(int ordinal) {
this.ordinal = ordinal;
return this;
}
public ObstacleBuilder setNext(Obstacle next) {
this.next = next;
return this;
}
public Obstacle build() {
return new Obstacle(this);
}
}
} | [
"jean.labranche@endurance.com"
] | jean.labranche@endurance.com |
01c9aa4f5d2d2ead477473d5a14c003711383274 | b4be6ce60105b72d01e32754d07782d141b201b1 | /baymax-security/baymax-security-oauth/baymax-security-oauth-api/src/main/java/com/info/baymax/security/oauth/api/i18n/Oauth2MessageSource.java | 4bde6a6a074620e8ee2a9af8158add988e2d0e44 | [] | no_license | cgb-datav/woven-dsp | 62a56099987cc2e08019aceb6e914e538607ca28 | b0b2ebd6af3ac42b71d6d9eedc5c6dfa9bd4e316 | refs/heads/master | 2023-08-28T02:55:19.375074 | 2021-07-05T04:02:57 | 2021-07-05T04:02:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 558 | java | package com.info.baymax.security.oauth.api.i18n;
import org.springframework.context.support.MessageSourceAccessor;
import org.springframework.context.support.ResourceBundleMessageSource;
import java.util.Locale;
public class Oauth2MessageSource extends ResourceBundleMessageSource {
public Oauth2MessageSource() {
setBasenames("com.info.baymax.security.oauth.api.i18n.messages");
}
public static MessageSourceAccessor getAccessor() {
return new MessageSourceAccessor(new Oauth2MessageSource(), Locale.getDefault());
}
}
| [
"760374564@qq.com"
] | 760374564@qq.com |
2204ac4ca5452770e68d704a8131a29a8f020838 | a5a81138a252f33c4f18012ccdaf8b08f22c4d5f | /mugen-webmodule/src/java/com/arexis/mugen/webapp/action/samplingunit/CreateFamilyGroupingAction.java | 4b592ac016d8f33618d6e2f1cc177b9b15f0604f | [] | no_license | bioit/mugen | ce97e540d05af07f5b03df0e6ce411c8d828e332 | 8d96871be007d9ed79f1d61a6ea21d093375e780 | refs/heads/master | 2021-01-17T11:55:05.738117 | 2011-01-21T21:07:58 | 2011-01-21T21:07:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,426 | java | /*
* CreateFamilyGroupingAction.java
*
* Created on July 14, 2005, 4:43 PM
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package com.arexis.mugen.webapp.action.samplingunit;
import com.arexis.form.FormDataManager;
import com.arexis.mugen.exceptions.ApplicationException;
import com.arexis.mugen.MugenCaller;
import com.arexis.mugen.MugenFormDataManagerFactory;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import com.arexis.mugen.webapp.action.*;
/**
* MugenAction class for the creation of a grouping and groups based on family relations
* @author heto
*/
public class CreateFamilyGroupingAction extends MugenAction {
/**
* Creates a new instance of CreateFamilyGroupingAction
*/
public CreateFamilyGroupingAction() {
}
/**
* Returns the name of this action
* @return The name of the action
*/
public String getName() {
return "CreateFamilyGroupingAction";
}
/**
* Performs this action
* @param request The http request object
* @param context The servlet context
* @return True if this action could be performed
*/
public boolean performAction(HttpServletRequest req, ServletContext context) throws ApplicationException {
try {
MugenCaller caller = (MugenCaller)req.getSession().getAttribute("caller");
FormDataManager formDataManager = getFormDataManager(
MugenFormDataManagerFactory.FAMILY_GROUPING,
MugenFormDataManagerFactory.WEB_FORM,
req);
req.setAttribute("samplingunits", samplingUnitManager.getSamplingUnits(caller.getPid(), caller));
req.setAttribute("females", samplingUnitManager.getFemales(caller.getSuid()));
req.setAttribute("males", samplingUnitManager.getMales(caller.getSuid()));
req.setAttribute("formdata", formDataManager);
return true;
} catch (ApplicationException e) {
throw e;
} catch (Exception e) {
e.printStackTrace();
throw new ApplicationException("Could not create grouping.");
}
}
}
| [
"discounix@Disco-Unixs-iMac.local"
] | discounix@Disco-Unixs-iMac.local |
07a97654cf833c57e3fffb5237575efa2dcaa44a | e4366b6d81eeec54bc2a9955c32a7af29091daee | /valinor-image/valinor-image-api/src/main/java/com/ninesale/valinor/image/api/service/DubboImgStoreService.java | 7324f48dff1a60460c28838e3da6416eb8362759 | [] | no_license | 175272511/valinor-parent | da17d354487cec46b717f4435329bb706ae49fc1 | 185246d5600509cbfb75d32853a4ce8d76a5835a | refs/heads/master | 2016-09-01T16:18:34.052980 | 2016-03-23T08:02:33 | 2016-03-23T08:02:33 | 54,541,171 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,536 | java | package com.ninesale.valinor.image.api.service;
import com.ninesale.valinor.image.api.model.request.DubboAddImgStoreRequest;
import com.ninesale.valinor.image.api.model.request.DubboDelImgStoreListRequest;
import com.ninesale.valinor.image.api.model.request.DubboDelImgStoreRequest;
import com.ninesale.valinor.image.api.model.request.DubboQueryImgStoreListRequest;
import com.ninesale.valinor.image.api.model.request.DubboQueryImgStoreRequest;
import com.ninesale.valinor.image.api.model.request.DubboQueryImgStoreTypeListRequest;
import com.ninesale.valinor.image.api.model.response.DubboAddImgStoreResponse;
import com.ninesale.valinor.image.api.model.response.DubboDelImgStoreResponse;
import com.ninesale.valinor.image.api.model.response.DubboQueryImgStoreListResponse;
import com.ninesale.valinor.image.api.model.response.DubboQueryImgStoreResponse;
import com.ninesale.valinor.image.api.model.response.DubboQueryImgStoreTypeListResponse;
/**
* 图片管理接口类
* 创建人:fuxingjian
* 创建时间:2015年10月28日 下午3:00:00
*/
public interface DubboImgStoreService {
/**
* 创建图片信息
* @param request 创建图片信息请求对象
* @return ImgStoreResponse
*/
public DubboAddImgStoreResponse insert(DubboAddImgStoreRequest dubboAddImgStoreRequest);
/**
* 查询图片信息
* @param dubboQueryImgStoreRequest 图片信息ID
* @return DubboQueryImgStoreResponse
*/
public DubboQueryImgStoreResponse selectByPrimaryKey(DubboQueryImgStoreRequest dubboQueryImgStoreRequest);
/**
* 查询图片List
* @param dubboQueryImgStoreListRequest idList请求对象
* @return DubboQueryImgStoreListResponse
*/
public DubboQueryImgStoreListResponse queryImgStoreList(DubboQueryImgStoreListRequest dubboQueryImgStoreListRequest);
/**
* 删除图片信息
* @param dubboDelImgStoreRequest 图片信息ID
* @return DubboDelImgStoreResponse
*/
public DubboDelImgStoreResponse deleteByPrimaryKey(DubboDelImgStoreRequest dubboDelImgStoreRequest);
/**
* 删除图片信息列表
* @param dubboDelImgStoreListRequest 图片信息IDList
* @return DubboDelImgStoreResponse
*/
public DubboDelImgStoreResponse deleteImgStoreByIds(DubboDelImgStoreListRequest dubboDelImgStoreListRequest);
/**
* 查询图片List
* @param dubboQueryImgStoreListRequest idList请求对象
* @return DubboQueryImgStoreListResponse
*/
public DubboQueryImgStoreTypeListResponse queryImgStoreTypeList(DubboQueryImgStoreTypeListRequest dubboQueryImgStoreTypeListRequest);
}
| [
"liuhui3@meilele.com"
] | liuhui3@meilele.com |
828682ea127b7a285dfbd868b53ee0f0f82725b7 | fd533c9d0fd4beb88630036075b1a7b85110a7e3 | /non-rest/src/main/java/com/github/ankurpathak/api/batch/task/exception/handler/impl/CompositeExceptionHandler.java | c669eff1691f03a59aa676999ee5ff4f6ceacaa7 | [] | no_license | yassinemoumenn/spring-session-test | 82a58a0810d743eb789855bb11001a4723520583 | fddb263a840916bbb9a92338c12d231fbd747e43 | refs/heads/master | 2023-04-14T19:02:38.934009 | 2019-10-31T19:31:48 | 2019-10-31T19:31:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 934 | java | package com.github.ankurpathak.api.batch.task.exception.handler.impl;
import com.github.ankurpathak.api.batch.task.exception.handler.IExceptionHandler;
import java.util.Collections;
import java.util.List;
import java.util.Map;
public class CompositeExceptionHandler implements IExceptionHandler<Exception> {
private final List<IExceptionHandler<?>> exceptionHandlers;
public CompositeExceptionHandler(List<IExceptionHandler<?>> exceptionHandlers) {
this.exceptionHandlers = exceptionHandlers;
}
@Override
public Map<String, Object> handelException(Exception ex) {
for(IExceptionHandler<?> exceptionHandler: exceptionHandlers){
if(exceptionHandler.supports(ex)){
return exceptionHandler.handelException(ex);
}
}
return Collections.emptyMap();
}
@Override
public boolean supports(Exception ex) {
return false;
}
}
| [
"ankurpathak@live.in"
] | ankurpathak@live.in |
151b729f0a98486c5d6a7abb47345405cc90fcc5 | 8501e286832a36ed033b4220fb5e281f4b57e585 | /SampleB_6_2_AABB_包围盒子旋转/app/src/main/java/com/bn/Sample6_2/MatrixState.java | f7542604c9b17a36772b402f6ec870711b916c4c | [] | no_license | CatDroid/OpenGLES3xGame | f8b2e88dffdbac67078c04f166f2fc42cf92cc67 | 6e066ceeb238836c623135871674337b4a8b4992 | refs/heads/master | 2021-05-16T15:30:08.674603 | 2020-12-20T09:32:28 | 2020-12-20T09:32:28 | 119,228,042 | 24 | 9 | null | null | null | null | UTF-8 | Java | false | false | 4,328 | java | package com.bn.Sample6_2;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.util.*;
import android.opengl.Matrix;
//存储系统矩阵状态的类
public class MatrixState
{
private static float[] mProjMatrix = new float[16];//4x4矩阵 投影用
private static float[] mVMatrix = new float[16];//摄像机位置朝向9参数矩阵
private static float[] currMatrix;//当前变换矩阵
public static float[] lightLocation=new float[]{0,0,0};//定位光光源位置
public static FloatBuffer cameraFB;
public static FloatBuffer lightPositionFB;
public static Stack<float[]> mStack=new Stack<float[]>();//保护变换矩阵的栈
public static void setInitStack()//获取不变换初始矩阵
{
currMatrix=new float[16];
Matrix.setRotateM(currMatrix, 0, 0, 1, 0, 0);
}
public static void pushMatrix()//保护变换矩阵
{
mStack.push(currMatrix.clone());
}
public static void popMatrix()//恢复变换矩阵
{
currMatrix=mStack.pop();
}
public static void translate(float x,float y,float z)//设置沿xyz轴移动
{
Matrix.translateM(currMatrix, 0, x, y, z);
}
public static void rotate(float angle,float x,float y,float z)//设置绕xyz轴移动
{
Matrix.rotateM(currMatrix,0,angle,x,y,z);
}
public static void insertRotateMatrix(float[] matrixTemp)
{
float[] result=new float[16];
Matrix.multiplyMM(result, 0, currMatrix, 0,matrixTemp, 0);
currMatrix=result;
}
//设置摄像机
public static void setCamera
(
float cx, //摄像机位置x
float cy, //摄像机位置y
float cz, //摄像机位置z
float tx, //摄像机目标点x
float ty, //摄像机目标点y
float tz, //摄像机目标点z
float upx, //摄像机UP向量X分量
float upy, //摄像机UP向量Y分量
float upz //摄像机UP向量Z分量
)
{
Matrix.setLookAtM
(
mVMatrix,
0,
cx,
cy,
cz,
tx,
ty,
tz,
upx,
upy,
upz
);
float[] cameraLocation=new float[3];//摄像机位置
cameraLocation[0]=cx;
cameraLocation[1]=cy;
cameraLocation[2]=cz;
ByteBuffer llbb = ByteBuffer.allocateDirect(3*4);
llbb.order(ByteOrder.nativeOrder());//设置字节顺序
cameraFB=llbb.asFloatBuffer();
cameraFB.put(cameraLocation);
cameraFB.position(0);
}
//设置透视投影参数
public static void setProjectFrustum
(
float left, //near面的left
float right, //near面的right
float bottom, //near面的bottom
float top, //near面的top
float near, //near面距离
float far //far面距离
)
{
Matrix.frustumM(mProjMatrix, 0, left, right, bottom, top, near, far);
}
//设置正交投影参数
public static void setProjectOrtho
(
float left, //near面的left
float right, //near面的right
float bottom, //near面的bottom
float top, //near面的top
float near, //near面距离
float far //far面距离
)
{
Matrix.orthoM(mProjMatrix, 0, left, right, bottom, top, near, far);
}
//获取具体物体的总变换矩阵
public static float[] getFinalMatrix()
{
float[] mMVPMatrix=new float[16];
Matrix.multiplyMM(mMVPMatrix, 0, mVMatrix, 0, currMatrix, 0);
Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mMVPMatrix, 0);
return mMVPMatrix;
}
//获取具体物体的变换矩阵
public static float[] getMMatrix()
{
return currMatrix;
}
//设置灯光位置的方法
public static void setLightLocation(float x,float y,float z)
{
lightLocation[0]=x;
lightLocation[1]=y;
lightLocation[2]=z;
ByteBuffer llbb = ByteBuffer.allocateDirect(3*4);
llbb.order(ByteOrder.nativeOrder());//设置字节顺序
lightPositionFB=llbb.asFloatBuffer();
lightPositionFB.put(lightLocation);
lightPositionFB.position(0);
}
}
| [
"1198432354@qq.com"
] | 1198432354@qq.com |
7c5b78fe7a11cef1d8c4befe0cc1066bf2edf99e | 80dbe293f549c773d3e227e90c01833213b99ab5 | /chapter1_2/chapter1_2_primitveDatatype_variable_Joptionpane/Scope.java | ccc83639f1bafd16041a0e31269303187c63b597 | [] | no_license | htankhai/Org.StartingoutwithJava | 9174cf162481c7edb628a62602e7ceba8ee48a10 | 215c96f55e92829d0b29119b739a56ebec653055 | refs/heads/master | 2020-04-15T00:45:45.784385 | 2015-06-20T22:08:59 | 2015-06-20T22:08:59 | 37,787,735 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 309 | java | package chapter1_2_primitveDatatype_variable_Joptionpane;
// This program can't find its variable.
public class Scope
{
public static void main(String[] args)
{
//Unresolved compilation problem
System.out.println(value);
//Need to declare variable first before using it
int value = 100;
}
}
| [
"htan.khai@yahoo.com"
] | htan.khai@yahoo.com |
15aa82f1a4878687be2ad338e6ad8ff1484e680a | 8cb955b7dec248679ec64b82f4c7df5812b8531b | /lib/tomahawk12-1.1.14/src/org/apache/myfaces/shared_tomahawk/taglib/html/HtmlOutputTextTagBase.java | 1dfece4c8e3d6572637e6c9d61e82f5757735e72 | [] | no_license | vtomic85/TCMS | dedf989a417616340308f1071c116251ac43e953 | 20aff23c5510e54c7e0abff19eaf84a777701380 | refs/heads/master | 2022-12-05T11:34:09.255605 | 2021-02-12T13:34:44 | 2021-02-12T13:34:44 | 36,179,350 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,308 | 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.myfaces.shared_tomahawk.taglib.html;
import org.apache.myfaces.shared_tomahawk.renderkit.JSFAttr;
import javax.faces.component.UIComponent;
/**
* @author Manfred Geiler (latest modification by $Author: cagatay $)
* @version $Revision: 606793 $ $Date: 2007-12-25 10:20:46 -0500 (Tue, 25 Dec 2007) $
* @deprecated use {@link HtmlOutputTextELTagBase} instead
*/
public abstract class HtmlOutputTextTagBase
extends org.apache.myfaces.shared_tomahawk.taglib.html.HtmlComponentTagBase
{
// UIComponent attributes --> already implemented in UIComponentTagBase
// user role attributes --> already implemented in UIComponentTagBase
// HTML universal attributes --> already implemented in HtmlComponentTagBase
// HTML event handler attributes --> already implemented in HtmlComponentTagBase
// UIOutput attributes
// value and converterId --> already implemented in UIComponentTagBase
// HtmlOutputText attributes
private String _escape;
public void release() {
super.release();
_escape=null;
}
protected void setProperties(UIComponent component)
{
super.setProperties(component);
setBooleanProperty(component, JSFAttr.ESCAPE_ATTR, _escape);
//TODO: idea: set transient and override setValue method in UIOutput so that
//transient is set to false when a new value is set
}
public void setEscape(String escape)
{
_escape = escape;
}
}
| [
"vladimir.tomic.la@gmail.com"
] | vladimir.tomic.la@gmail.com |
bc45cf2ddfa791354b339522b666eda36ec1721e | 03cee957d20bf4bb1f4f08af26a1ffc08a7fe1c5 | /src/java/org/antlr/jetbrains/sample/psi/ArgdefSubtree.java | 76a0fc4f842f16fda4176dbe044d137ecc15b5c3 | [
"BSD-2-Clause"
] | permissive | grindvoll/jetbrains-plugin-sample | b0c483a2857bc99336e5916485b1a37287389c47 | 1ac37cde8625bafc4e439a7e3de530701c6c1c82 | refs/heads/master | 2021-07-18T15:02:41.371217 | 2017-10-21T17:00:21 | 2017-10-21T17:00:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 236 | java | package org.antlr.jetbrains.sample.psi;
import com.intellij.lang.ASTNode;
import org.jetbrains.annotations.NotNull;
public class ArgdefSubtree extends VardefSubtree {
public ArgdefSubtree(@NotNull ASTNode node) {
super(node);
}
}
| [
"parrt@antlr.org"
] | parrt@antlr.org |
e8e25d7bc45832d7f7ea7cab6c15559ab8e3b136 | d00c548da9da999ef249930dcc6cc6fc4ca3f56b | /tck/src/test/java/io/smallrye/graphql/SmallRyeGraphQLArchiveProcessor.java | 580df5b1d0c6ebfe02580698a19c454bb57d87b7 | [
"Apache-2.0"
] | permissive | kabir/smallrye-graphql | a4bf087b94a83a553aacbe71b277e1b947c90625 | 3b5fc36f5529b32a3fc3bcc92b058e158adfbaf8 | refs/heads/master | 2020-08-01T14:51:12.452742 | 2019-08-09T20:13:11 | 2019-08-09T20:13:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,059 | java | /*
* Copyright 2019 Red Hat, Inc, and individual 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 io.smallrye.graphql;
import java.io.File;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Set;
import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
import org.jboss.arquillian.test.spi.TestClass;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
/**
* Creates the deployable unit with all the needed dependencies.
*
* @author Phillip Kruger (phillip.kruger@redhat.com)
*/
public class SmallRyeGraphQLArchiveProcessor implements ApplicationArchiveProcessor {
@Override
public void process(Archive<?> applicationArchive, TestClass testClass) {
if (applicationArchive instanceof WebArchive) {
WebArchive testDeployment = (WebArchive) applicationArchive;
String[] deps = {
"io.smallrye:smallrye-graphql-1.0", // The implementation
"io.smallrye:smallrye-config-1.3", // We use config
};
File[] dependencies = Maven.resolver().loadPomFromFile(new File("pom.xml")).resolve(deps).withTransitivity()
.asFile();
// Make sure it's unique
Set<File> dependenciesSet = new LinkedHashSet<>(Arrays.asList(dependencies));
testDeployment.addAsLibraries(dependenciesSet.toArray(new File[] {}));
}
}
}
| [
"phillip.kruger@gmail.com"
] | phillip.kruger@gmail.com |
8c16e000d330f43a8338b562bffe4f0f25f2383f | 1f07a675ed2cf86a0d9aa6dda44f2f912d901271 | /app/src/main/java/ly/pp/addsongs/C1034cb.java | 5fe2a7b6153be950980d5d8a7ef924f3399e6dc2 | [] | no_license | 2953298096/JPapplication | f6d0287e629a64ebc4869c9253aecdbebfc0be29 | e1425acac26b588d75483c70ec51bdce12a281ce | refs/heads/master | 2020-07-01T07:03:18.963303 | 2019-05-03T04:37:46 | 2019-05-03T04:37:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,283 | java | package ly.pp.addsongs;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import java.util.ArrayList;
/* renamed from: ly.pp.addsongs.cb */
public final class C1034cb extends BaseAdapter {
private int f5241a = 0;
private OLPlayDressRoom f5242b;
private ArrayList f5243c;
private LayoutInflater f5244d;
C1034cb(ArrayList arrayList, OLPlayDressRoom oLPlayDressRoom) {
f5241a = arrayList.size();
f5244d = oLPlayDressRoom.getLayoutInflater();
f5242b = oLPlayDressRoom;
f5243c = arrayList;
}
public final int getCount() {
return f5241a;
}
public final Object getItem(int i) {
return i;
}
public final long getItemId(int i) {
return (long) i;
}
public final View getView(int i, View view, ViewGroup viewGroup) {
if (view == null) {
view = f5244d.inflate(R.layout.ol_dres_view, null);
}
view.setKeepScreenOn(true);
((ImageView) view.findViewById(R.id.ol_dress_img)).setImageBitmap((Bitmap) f5243c.get(i));
return view;
}
}
| [
"2431548195@qq.com"
] | 2431548195@qq.com |
6799a3532035fc2ed67f2c40eaffd13812315f37 | 2646c36477ec0447407c6fed80cf47318c1c51c7 | /Day14/MinStack_ExtraSpace.java | 11d0b261ba51f59f5a7bf11010ce1e3c6aca4a8e | [] | no_license | sahilshirodkar1630/30daysofCode | 466ea9acc5875c1f1b2cf53864b654abc440e3eb | c3062840443ec4c3da9defc799225390e46239ac | refs/heads/main | 2023-06-07T00:01:06.424233 | 2021-07-02T19:29:35 | 2021-07-02T19:29:35 | 372,969,442 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,196 | java | package Day14;
import java.util.*;
public class MinStack_ExtraSpace {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
class MinStack {
/** initialize your data structure here. */
Stack<Integer> stack ;
Stack<Integer> ExtraStack;
public MinStack() {
stack = new Stack<Integer>();
ExtraStack = new Stack<Integer>();
}
public void push(int val) {
if(stack.isEmpty()){
stack.push(val);
ExtraStack.push(val);
}else{
stack.push(val);
if(stack.peek() <= ExtraStack.peek()){
ExtraStack.push(val);
}
}
}
public void pop() {
if(!stack.isEmpty()){
if(stack.peek().equals(ExtraStack.peek())){
ExtraStack.pop();
}
stack.pop();
}
}
public int top() {
if(!stack.isEmpty()){
return stack.peek();
}
return 0;
}
public int getMin() {
if(!ExtraStack.isEmpty()){
return ExtraStack.peek();
}
return 0;
}
}
}
| [
"sahilshirodkar1630@gmail.com"
] | sahilshirodkar1630@gmail.com |
848516909ff73aa3d61bd2a469a1c8c827a162ec | 6ecd1296474831f256a765c7dab5da86c7f83258 | /src/main/java/fr/jus2raisin/atouts/inventory/AtoutsInventory.java | 94d8f92a8be7c36749bf74b205fee7fa15d4d952 | [] | no_license | Jus2Raisin/CriZelia_Atouts | baae763c1ffb7fdb88e49810098ce62e01c1a1bd | 981911741ee5c6d8e25345da36b292b6291a4f25 | refs/heads/master | 2023-04-20T09:15:36.430013 | 2021-05-07T19:34:09 | 2021-05-07T19:34:09 | 365,335,229 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,355 | java | package fr.jus2raisin.atouts.inventory;
import fr.jus2raisin.atouts.utils.AtoutsUtils;
import fr.jus2raisin.atouts.utils.FileUtils;
import fr.jus2raisin.atouts.utils.ItemBuilder;
import fr.minuskube.inv.ClickableItem;
import fr.minuskube.inv.SmartInventory;
import fr.minuskube.inv.content.InventoryContents;
import fr.minuskube.inv.content.InventoryProvider;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import java.util.Arrays;
import java.util.Random;
public class AtoutsInventory implements InventoryProvider {
public static final SmartInventory ATOUTS = SmartInventory.builder()
.id("atouts")
.provider(new AtoutsInventory())
.size(3, 9)
.title("§f§l» §d§lAtouts §f- §bAccueil §f§l«")
.build();
private final Random random = new Random();
@Override
public void init(Player player, InventoryContents contents) {
contents.set(0, 4, ClickableItem.of(new ItemBuilder(Material.NETHER_STAR).setDisplayName("§f§l» §d§lAtouts §f- §bBoutique §f§l«").build(),
e -> player.sendMessage(ChatColor.GOLD + "§cShop")));
contents.set(2, 4, ClickableItem.of(new ItemBuilder(Material.INK_SACK, (short) 1).setDisplayName("§6§l» §cQuittez le menu d'Accueil. §6§l«").setGlow(true).build(),
e -> player.closeInventory()));
contents.set(1, 3, ClickableItem.of(getAtout(player, (short) 8258,"Rapidite")
,e -> AtoutsUtils.giveAtout(player, "Rapidite")));
contents.set(1, 2, ClickableItem.of(getAtout(player, (short) 8259,"Resistance au Feu")
,e -> AtoutsUtils.giveAtout(player, "Resistance au Feu")));
contents.set(1, 4, ClickableItem.of(getAtout(player, (short) 8201,"Force")
,e -> AtoutsUtils.giveAtout(player, "Force")));
contents.set(1, 5, ClickableItem.of(getAtout(player, (short) 8234,"Resistance")
,e -> AtoutsUtils.giveAtout(player, "Resistance")));
contents.set(1, 6, ClickableItem.of(getAtout(player, (short) 8259,"Haste")
,e -> AtoutsUtils.giveAtout(player, "Haste")));
}
@Override
public void update(Player player, InventoryContents contents) {
/*int state = contents.property("state", 0);
contents.setProperty("state", state + 1);
if(state % 5 != 0)
return;*/
contents.set(0, 4, ClickableItem.of(new ItemBuilder(Material.NETHER_STAR).setDisplayName("§f§l» §d§lAtouts §f- §bBoutique §f§l«").build(),
e -> player.sendMessage(ChatColor.GOLD + "§cShop")));
contents.set(2, 4, ClickableItem.of(new ItemBuilder(Material.INK_SACK, (short) 1).setDisplayName("§6§l» §cQuittez le menu d'Accueil. §6§l«").setGlow(true).build(),
e -> player.closeInventory()));
contents.set(1, 3, ClickableItem.of(getAtout(player, (short) 8258,"Rapidite")
,e -> AtoutsUtils.giveAtout(player, "Rapidite")));
contents.set(1, 2, ClickableItem.of(getAtout(player, (short) 8259,"Resistance au Feu")
,e -> AtoutsUtils.giveAtout(player, "Resistance au Feu")));
contents.set(1, 4, ClickableItem.of(getAtout(player, (short) 8201,"Force")
,e -> AtoutsUtils.giveAtout(player, "Force")));
contents.set(1, 5, ClickableItem.of(getAtout(player, (short) 8234,"Resistance")
,e -> AtoutsUtils.giveAtout(player, "Resistance")));
contents.set(1, 6, ClickableItem.of(getAtout(player, (short) 8259,"Haste")
,e -> AtoutsUtils.giveAtout(player, "Haste")));
}
private ItemStack getAtout(Player player, short data, String atouts)
{
return new ItemBuilder(Material.POTION, (short) data)
.addItemFlag(ItemFlag.HIDE_ATTRIBUTES)
.addItemFlag(ItemFlag.HIDE_POTION_EFFECTS)
.setAmount(1)
.setDisplayName("§8∙ §7Atout : §6"+atouts)
.setLore(Arrays.asList(" ", "§6│ §7Status : §b"+FileUtils.playerHasAtout(player, atouts)
, "§6│ §7Usage restant : §b"+FileUtils.getDurability(player, atouts), " "))
.build();
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
b4c805e11adc26e34391ceaa1177acf4fba2c749 | 447520f40e82a060368a0802a391697bc00be96f | /apks/comparison_androart/at_spardat_bcrmobile/source/com/google/android/gms/internal/dc.java | 8499105cbb074d9b03067d249e9a3f5d2a3b85fc | [
"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 | 1,714 | java | package com.google.android.gms.internal;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
public abstract class dc
extends Binder
implements db
{
public static db a(IBinder paramIBinder)
{
if (paramIBinder == null) {
return null;
}
IInterface localIInterface = paramIBinder.queryLocalInterface("com.google.android.gms.analytics.internal.IAnalyticsService");
if ((localIInterface != null) && ((localIInterface instanceof db))) {
return (db)localIInterface;
}
return new dd(paramIBinder);
}
public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2)
{
switch (paramInt1)
{
default:
return super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2);
case 1598968902:
paramParcel2.writeString("com.google.android.gms.analytics.internal.IAnalyticsService");
return true;
case 1:
paramParcel1.enforceInterface("com.google.android.gms.analytics.internal.IAnalyticsService");
a(paramParcel1.readHashMap(getClass().getClassLoader()), paramParcel1.readLong(), paramParcel1.readString(), paramParcel1.createTypedArrayList(zzsf.CREATOR));
paramParcel2.writeNoException();
return true;
case 2:
paramParcel1.enforceInterface("com.google.android.gms.analytics.internal.IAnalyticsService");
a();
paramParcel2.writeNoException();
return true;
}
paramParcel1.enforceInterface("com.google.android.gms.analytics.internal.IAnalyticsService");
paramParcel1 = b();
paramParcel2.writeNoException();
paramParcel2.writeString(paramParcel1);
return true;
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.