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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5c1b86a849a1bd7f2369055dbc998843c073a079
|
ce596e0092df8a8dc1b05b315be616a369ca3028
|
/src/main/java/com/redhat/fuse/apicurio/ApplicationCorsConfiguration.java
|
f42073ffff87ee7fa3ea5f0997d02012d759e9ba
|
[] |
no_license
|
juliusgun/fuse-apicurito-generator
|
4256e1e748ce06f2a21d932b07847963186a63a4
|
f8f0da77e2c85472790bcaa6277b8e44de6d35cd
|
refs/heads/master
| 2023-04-24T23:48:53.369127
| 2020-12-03T13:14:27
| 2020-12-03T13:14:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,874
|
java
|
/*
* Copyright (C) 2018 Red Hat, 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.redhat.fuse.apicurio;
import java.util.Arrays;
import java.util.List;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.filter.CorsFilter;
@Configuration
@EnableConfigurationProperties
@ConfigurationProperties("cors")
public class ApplicationCorsConfiguration {
private List<String> allowedOrigins = Arrays.asList(CorsConfiguration.ALL);
public List<String> getAllowedOrigins() {
return allowedOrigins;
}
public void setAllowedOrigins(List<String> allowedOrigins) {
this.allowedOrigins = allowedOrigins;
}
@Bean
public CorsFilter corsFilter() {
return new CorsFilter(request -> {
CorsConfiguration config = new CorsConfiguration();
config.setAllowedOrigins(allowedOrigins);
config.setAllowedMethods(Arrays.asList("HEAD", "GET", "POST", "PUT", "DELETE", "PATCH"));
config.applyPermitDefaultValues();
return config;
});
}
}
|
[
"hiram@hiramchirino.com"
] |
hiram@hiramchirino.com
|
967fa9168c1aca8bab60f8ab2524498db3d1d120
|
c4820a1c7defc581c1b47f72b97364dbdfb29fe1
|
/src/main/java/io/reactivesw/product/infrastructure/util/ReferenceTypes.java
|
53c7be06d7da27b7fa32f9ca9c3f5cf855cf0b2b
|
[] |
no_license
|
reactivesw/product-admin
|
026e68233e2f87bfe718c3a6bd965381256c6186
|
221e0ddfeaef852be255d1890d68e40e7ecf2082
|
refs/heads/master
| 2021-01-23T00:06:00.684033
| 2017-03-21T12:33:53
| 2017-03-21T12:33:53
| 85,693,185
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 671
|
java
|
package io.reactivesw.product.infrastructure.util;
/**
* Created by Davis on 16/11/16.
*/
public enum ReferenceTypes {
CUSTOMERGROUP("customer-group"),
CHANNEL("channel"),
PRODUCTTYPE("product-type"),
CATEGORY("category"),
CART("cart"),
ZONE("zone"),
CARTDISCOUNT("cart-discount"),
SHIPPING_METHOD("shipping-method"),
STATE("state"),
CUSTOMER("customer"),
ORDER("order"),
PAYMENT("payment"),
TAXCATEGORY("tax-category");
private String value;
private ReferenceTypes(String value) {
this.value = value;
}
/**
* get type id.
*
* @return String
*/
public String getType() {
return this.value;
}
}
|
[
"davis.dai@go6d.com"
] |
davis.dai@go6d.com
|
4dbd8ea0c1e0cb4ce6f5610b2050d7700d440855
|
2c5b8aff137117e316f8557bf82e553e55454989
|
/CrackingCode/MasterAlgorithm/src/test/java/kata/treeandgraph/bstsequence/BSTSequenceTest.java
|
b6bfd8a24350d47b8ea97be9c20cb10638656e2c
|
[] |
no_license
|
lamadipen/Algo
|
33de4fc1e7049c3d597b5e6090e408460fa2e90e
|
ef9e5f06214a3387dd4dbe7dd3e979a70617da1d
|
refs/heads/master
| 2022-10-07T16:52:26.537618
| 2022-10-05T21:06:05
| 2022-10-05T21:06:05
| 82,363,649
| 2
| 0
| null | 2023-09-12T13:55:45
| 2017-02-18T05:21:18
|
Java
|
UTF-8
|
Java
| false
| false
| 1,243
|
java
|
package kata.treeandgraph.bstsequence;
import kata.treeandgraph.MockTreeFactory;
import kata.treeandgraph.TreeNode;
import org.junit.Test;
import java.util.LinkedList;
import java.util.List;
public class BSTSequenceTest {
@Test
public void bstSequence() {
TreeNode mockBSTTreeRoot = MockTreeFactory.getMockBSTTreeRoot();
BSTSequence bstSequence = new BSTSequence();
List<LinkedList<Integer>> actual = bstSequence.allSequence(mockBSTTreeRoot);
actual.forEach(linkedList -> {
System.out.println("--->");
linkedList.forEach(item -> System.out.print(item + " "));
System.out.println("");
}
);
}
@Test
public void bstSequenceWithSmallInput() {
TreeNode mockBSTTreeRoot = MockTreeFactory.getMockSmallBSTTreeRoot();
BSTSequence bstSequence = new BSTSequence();
List<LinkedList<Integer>> actual = bstSequence.allSequence(mockBSTTreeRoot);
actual.forEach(linkedList -> {
System.out.println("--->");
linkedList.forEach(item -> System.out.print(item + " "));
System.out.println("");
}
);
}
}
|
[
"lamadipen@yahoo.com"
] |
lamadipen@yahoo.com
|
dbce0ce2eadaea2a7a5458c45eedf48a5fc874b2
|
9159c6f20fe08ad7992a4cd044fc3206398f7c58
|
/corejava/src/com/tyss/javaapp/lamda/AddTwo.java
|
4050b168d7cdc36aa44b07e22b20b69da867df1f
|
[] |
no_license
|
bhavanar315/ELF-06June19-tyss-bhavani
|
91def5b909f567536d04e69c9bb6193503398a04
|
e2ee506ee99e0e958fb72e3bdaaf6e3315b84975
|
refs/heads/master
| 2020-07-21T07:45:19.944727
| 2019-09-06T07:43:42
| 2019-09-06T07:43:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package com.tyss.javaapp.lamda;
import java.util.logging.Logger;
import lombok.extern.java.Log;
@Log
public class AddTwo {
private static final Logger log=Logger.getLogger("bhavani");
public static void main(String[] args) {
MyMath m= Demo :: add;
int i= m.add(5, 6);
log.info("sum is"+i);
}
}
|
[
"bhavanigmgowda@gmail.com"
] |
bhavanigmgowda@gmail.com
|
379ddf2a66f9613ebfaaccd0865e969a87f373ed
|
189f16d38236a2ebe488e150bb9b4f93532e63cb
|
/src/main/java/org/smart4j/framework/helper/BeanHelper.java
|
b0f448a99f3a276f8790bd1b0f7163e165ac9d5c
|
[] |
no_license
|
ben1247/smart-framework
|
d616785ffaf4d0eb70053814709e15ed23b3177e
|
6dc342ae0e6b19d7127c7d11d5b33eea6f5ba5bc
|
refs/heads/master
| 2021-08-08T22:37:22.784194
| 2017-11-11T13:49:02
| 2017-11-11T13:49:02
| 106,567,084
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,258
|
java
|
package org.smart4j.framework.helper;
import org.smart4j.framework.util.ReflectionUtil;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
* Bean 助手类
* Created by yuezhang on 17/10/6.
*/
public final class BeanHelper {
private static final Map<Class<?>,Object> BEAN_MAP;
static {
BEAN_MAP = new HashMap<>();
Set<Class<?>> beanClassSet = ClassHelper.getBeanClassSet();
for(Class<?> beanClass : beanClassSet){
Object obj = ReflectionUtil.newInstance(beanClass);
BEAN_MAP.put(beanClass,obj);
}
}
/**
* 获取Bean映射
* @return
*/
public static Map<Class<?>,Object> getBeanMap(){
return BEAN_MAP;
}
/**
* 获取Bean实例
* @param cls
* @param <T>
* @return
*/
@SuppressWarnings("unchecked")
public static <T> T getBean(Class<T> cls){
if(!BEAN_MAP.containsKey(cls)){
throw new RuntimeException("can not get bean by class: " + cls);
}
return (T) BEAN_MAP.get(cls);
}
/**
* 设置Bean实例
* @param cls
* @param obj
*/
public static void setBean(Class<?> cls ,Object obj){
BEAN_MAP.put(cls,obj);
}
}
|
[
"yue.zhang@shuyun.com"
] |
yue.zhang@shuyun.com
|
aab792713546f596efc945953e92f1bb90ec4138
|
b9f9ebfccb6e52d6ad240bb686afdec1bdb0ce78
|
/chapter06/src/main/java/com/example/chapter06/util/SharedUtil.java
|
9071604606659ae37eaa45c7e39c23d5b70d64a5
|
[] |
no_license
|
bugkill/myapp
|
0f47706edef69c6bc09e76d155e4af4193025cd6
|
d0a70b4785148dac6fad48a0b973769c97cd423d
|
refs/heads/master
| 2023-08-26T01:41:57.528944
| 2021-11-07T05:50:22
| 2021-11-07T05:50:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,799
|
java
|
package com.example.chapter06.util;
import android.content.Context;
import android.content.SharedPreferences;
// 这是共享参数的工具类,统一对共享参数的读写操作
public class SharedUtil {
private static SharedUtil mUtil; // 声明一个共享参数工具类的实例
private static SharedPreferences mShared; // 声明一个共享参数的实例
// 通过单例模式获取共享参数工具类的唯一实例
public static SharedUtil getIntance(Context ctx) {
if (mUtil == null) {
mUtil = new SharedUtil();
}
// 从cart.xml中获取共享参数对象
mShared = ctx.getSharedPreferences("cart", Context.MODE_PRIVATE);
return mUtil;
}
// 把键名与字符串的配对信息写入共享参数
public void writeString(String key, String value) {
SharedPreferences.Editor editor = mShared.edit(); // 获得编辑器的对象
editor.putString(key, value); // 添加一个指定键名的字符串参数
editor.commit(); // 提交编辑器中的修改
}
// 根据键名到共享参数中查找对应的字符串对象
public String readString(String key, String defaultValue) {
return mShared.getString(key, defaultValue);
}
// 把键名与整型数的配对信息写入共享参数
public void writeInt(String key, int value) {
SharedPreferences.Editor editor = mShared.edit(); // 获得编辑器的对象
editor.putInt(key, value); // 添加一个指定键名的整型数参数
editor.commit(); // 提交编辑器中的修改
}
// 根据键名到共享参数中查找对应的整型数对象
public int readInt(String key, int defaultValue) {
return mShared.getInt(key, defaultValue);
}
}
|
[
"aqi00@163.com"
] |
aqi00@163.com
|
65ea8e8721f4ae73bf35201b30dbcf5f41c0d017
|
53efcbcb8210a01c3a57cdc2784926ebc22d6412
|
/src/main/java/br/com/fieesq/model54330/FieEsq45303.java
|
3f5c5fdda8eaa35811c7083182fc235778ef8dc4
|
[] |
no_license
|
fie23777/frontCercamento
|
d57846ac985f4023a8104a0872ca4a226509bbf2
|
6282f842544ab4ea332fe7802d08cf4e352f0ae3
|
refs/heads/master
| 2021-04-27T17:29:56.793349
| 2018-02-21T10:32:23
| 2018-02-21T10:32:23
| 122,322,301
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 768
|
java
|
package br.com.fieesq.model54330;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
@Entity
public class FieEsq45303 {
@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
private int id;
private String numEsq45303;
@Transient
private String esqParam;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNumEsq45303() {
return numEsq45303;
}
public void setNumEsq45303(String numEsq45303) {
this.numEsq45303 = numEsq45303;
}
public String getEsqParam() {
return esqParam;
}
public void setEsqParam(String esqParam) {
this.esqParam = esqParam;
}
}
|
[
"fie2377@gmail.com"
] |
fie2377@gmail.com
|
05f10e4a2fd805ae60189aff2c667b528d1c14e9
|
b55d3b2332871cad182ed82e01786780886d1dd0
|
/src/medium/AirplaneSeatAssignmentProbability.java
|
322fb658ebe3ebcca366788c3520278fe19b455a
|
[] |
no_license
|
acrush37/leetcode-dp
|
58c64735777c523a9627ef2950c8b865f0e33337
|
2fc10059c0151e8ef8dc948e8509be4bc3ad0796
|
refs/heads/master
| 2022-04-10T18:00:02.187481
| 2020-03-02T06:35:35
| 2020-03-02T06:35:35
| 215,553,677
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 872
|
java
|
package medium;
/*
n passengers board an airplane with exactly n seats.
The first passenger has lost the ticket and picks a seat randomly. But after that, the rest of passengers will:
Take their own seat if it is still available,
Pick other seats randomly when they find their seat occupied
What is the probability that the n-th person can get his own seat?
*/
public class AirplaneSeatAssignmentProbability {
public static void main(String... args) {
AirplaneSeatAssignmentProbability airplaneSeatAssignmentProbability = new AirplaneSeatAssignmentProbability();
System.out.println(airplaneSeatAssignmentProbability.nthPersonGetsNthSeat(1));
System.out.println(airplaneSeatAssignmentProbability.nthPersonGetsNthSeat(2));
}
public double nthPersonGetsNthSeat(int n) {
return n == 1 ? 1 : 0.5;
}
}
|
[
"acrush37@gmail.com"
] |
acrush37@gmail.com
|
d327d1ceee0110bc171a6b6e7bc9b39df8bdacd2
|
ae69e30f8eb4ff2cd47e2336b2a2b31f271a3e5a
|
/Java/atcoder/beginner_100_199/beginner_190/E.java
|
6dac026022eed5f5e65a5fd5bbd336026d37e2f2
|
[] |
no_license
|
bdugersuren/CompetitiveProgramming
|
f35048ef8e5345c5219c992f2be8b84e1f7f1cb8
|
cd571222aabe3de952d90d6ddda055aa3b8c08d9
|
refs/heads/master
| 2023-05-12T00:45:15.065209
| 2021-05-14T13:24:53
| 2021-05-14T13:24:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,993
|
java
|
package atcoder.beginner_100_199.beginner_190;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.StringTokenizer;
public final class E {
public static void main(String[] args) {
final FastScanner fs = new FastScanner();
final int n = fs.nextInt();
final int m = fs.nextInt();
final Map<Integer, List<Integer>> g = new HashMap<>();
for (int i = 0; i < m; i++) {
final int u = fs.nextInt();
final int v = fs.nextInt();
g.computeIfAbsent(u, val -> new ArrayList<>()).add(v);
g.computeIfAbsent(v, val -> new ArrayList<>()).add(u);
}
final int k = fs.nextInt();
final int[] arr = fs.nextIntArray(k);
final int[][] dist = new int[n + 5][k];
for (int[] row : dist) {
Arrays.fill(row, (int) 1e9);
}
for (int i = 0; i < k; i++) {
bfs(i, g, dist, arr);
}
for (int i = 0; i < k; i++) {
if (dist[arr[0]][i] == (int) 1e9) {
System.out.println(-1);
return;
}
}
final int[][] dp = new int[k][1 << k];
for (int[] row : dp) {
Arrays.fill(row, -1);
}
System.out.println(1 + dfs(arr, -1, 0, k, dist, dp));
}
private static int dfs(int[] arr, int prev, int mask, int k, int[][] dist, int[][] dp) {
if (mask == ((1 << k) - 1)) {
return 0;
}
if (prev != -1 && dp[prev][mask] != -1) {
return dp[prev][mask];
}
int res = (int) 1e9;
for (int i = 0; i < k; i++) {
if ((mask & (1 << i)) == 0) {
final int cost = prev == -1 ? 0 : dist[arr[prev]][i];
res = Math.min(res, dfs(arr, i, mask | (1 << i), k, dist, dp) + cost);
}
}
if (prev != -1) {
dp[prev][mask] = res;
}
return res;
}
private static void bfs(int u, Map<Integer, List<Integer>> g, int[][] dist, int[] arr) {
final Deque<Integer> q = new ArrayDeque<>();
q.offerLast(arr[u]);
dist[arr[u]][u] = 0;
while (!q.isEmpty()) {
final int curr = q.removeFirst();
for (int next : g.getOrDefault(curr, Collections.emptyList())) {
if (dist[next][u] == (int) 1e9) {
dist[next][u] = dist[curr][u] + 1;
q.offerLast(next);
}
}
}
}
static final class Utils {
public static void shuffleSort(int[] arr) {
shuffle(arr);
Arrays.sort(arr);
}
public static void shuffleSort(long[] arr) {
shuffle(arr);
Arrays.sort(arr);
}
public static void shuffle(int[] arr) {
final Random r = new Random();
for (int i = 0; i <= arr.length - 2; i++) {
final int j = i + r.nextInt(arr.length - i);
swap(arr, i, j);
}
}
public static void shuffle(long[] arr) {
final Random r = new Random();
for (int i = 0; i <= arr.length - 2; i++) {
final int j = i + r.nextInt(arr.length - i);
swap(arr, i, j);
}
}
public static void swap(int[] arr, int i, int j) {
final int t = arr[i];
arr[i] = arr[j];
arr[j] = t;
}
public static void swap(long[] arr, int i, int j) {
final long t = arr[i];
arr[i] = arr[j];
arr[j] = t;
}
private Utils() {}
}
static class FastScanner {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer("");
private String next() {
while (!st.hasMoreTokens()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
//noinspection CallToPrintStackTrace
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
int[] nextIntArray(int n) {
final int[] a = new int[n];
for (int i = 0; i < n; i++) { a[i] = nextInt(); }
return a;
}
long[] nextLongArray(int n) {
final long[] a = new long[n];
for (int i = 0; i < n; i++) { a[i] = nextLong(); }
return a;
}
}
}
|
[
"nirvana_rsc@yahoo.com"
] |
nirvana_rsc@yahoo.com
|
1310d3c1e96cdd5f77172c24acb55aab408ff398
|
cd8843d24154202f92eaf7d6986d05a7266dea05
|
/saaf-base-5.0/1008_saaf-schedule-model/src/main/java/com/sie/saaf/business/model/inter/server/TtaUserInterfaceServer.java
|
0359323a46891d81d7b7ba907bb350e283dd3c01
|
[] |
no_license
|
lingxiaoti/tta_system
|
fbc46c7efc4d408b08b0ebb58b55d2ad1450438f
|
b475293644bfabba9aeecfc5bd6353a87e8663eb
|
refs/heads/master
| 2023-03-02T04:24:42.081665
| 2021-02-07T06:48:02
| 2021-02-07T06:48:02
| 336,717,227
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,396
|
java
|
package com.sie.saaf.business.model.inter.server;
import com.sie.saaf.business.model.inter.ITtaUserInterface;
import com.sie.saaf.common.model.dao.BaseCommonDAO_HI;
import com.sie.saaf.common.model.inter.server.BaseCommonServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
/**
* @author hmb
* @date 2019/8/15 16:16
*/
@Component("ttaUserInterfaceServer")
public class TtaUserInterfaceServer extends BaseCommonServer<Object> implements ITtaUserInterface {
private static final Logger LOGGER = LoggerFactory.getLogger(TtaUserInterfaceServer.class);
@Autowired
private BaseCommonDAO_HI<Object> ttaUserInterfaceDao;
public TtaUserInterfaceServer() {
super();
}
@Override
public void saveJdbcBatchObject(String tableName, List<Map<String, Object>> list) {
ttaUserInterfaceDao.saveBatchJDBC(tableName,list);
}
@Override
public void updateUserInterfaceInfo() {
}
@Override
public void callProUpdateTtaUserInterface() {
}
/**
* 删除user_interface_in的数据
*/
@Override
public void deleteTtaUserInterface() {
String sql = "delete from user_interface_in";
ttaUserInterfaceDao.executeSqlUpdate(sql);
}
}
|
[
"huang491591@qq.com"
] |
huang491591@qq.com
|
3a564208fb1a75a23b74f15dfeda10e1df672055
|
95f0326aa373b1ee4a29fe4d22740bee9e47b2ea
|
/app/src/main/java/com/xsd/jx/adapter/JobSearchAdapter.java
|
8b59d10e4b0271dc5c5281e80e1e7853cc76aac2
|
[] |
no_license
|
soon14/Worker
|
a3f212def1fae650eec46a3db3fd31aaa571b3b0
|
86b376a5c51b792938e3fe1e7dce991547c0cf9e
|
refs/heads/master
| 2023-01-04T04:14:07.137744
| 2020-11-05T01:48:16
| 2020-11-05T01:48:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 809
|
java
|
package com.xsd.jx.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.xsd.jx.R;
import com.xsd.jx.bean.JobSearchBean;
import com.xsd.jx.databinding.ItemJobSearchBinding;
import org.jetbrains.annotations.NotNull;
/**
* Date: 2020/8/18
* author: SmallCake
*/
public class JobSearchAdapter extends BaseQuickAdapter<JobSearchBean, BaseDataBindingHolder<ItemJobSearchBinding>> {
public JobSearchAdapter() {
super(R.layout.item_job_search);
}
@Override
protected void convert(@NotNull BaseDataBindingHolder<ItemJobSearchBinding> holder, JobSearchBean searchJobBean) {
ItemJobSearchBinding dataBinding = holder.getDataBinding();
dataBinding.setItem(searchJobBean);
}
}
|
[
"495303648@qq.com"
] |
495303648@qq.com
|
d7d69c5842ff73750fcde8de5c6f477877136ea6
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/src/irvine/oeis/a220/A220148.java
|
7a987589eb4858935b3a6405fffd6b3c2aaf2d38
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package irvine.oeis.a220;
// Generated by gen_pattern.pl - DO NOT EDIT here!
import irvine.oeis.GeneratingFunctionSequence;
/**
* A220148 Number of <code>n X 3</code> arrays of the minimum value of corresponding elements and their horizontal or diagonal neighbors in a random, but sorted with lexicographically nondecreasing rows and nonincreasing columns, <code>0..2 n X 3</code> array.
* @author Georg Fischer
*/
public class A220148 extends GeneratingFunctionSequence {
/** Construct the sequence. */
public A220148() {
super(1, new long[] {0, 6, -49, 197, -484, 815, -997, 934, -685, 389, -161, 42, -5},
new long[] {1, -12, 66, -220, 495, -792, 924, -792, 495, -220, 66, -12, 1});
}
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
a2d7373d5fcf76ade9e8234b1b70b2b424304a48
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/24/24_83ab4d29e88c280ee33f60c5aa1b413489972018/SubstructureTreeNode/24_83ab4d29e88c280ee33f60c5aa1b413489972018_SubstructureTreeNode_s.java
|
c2534be952c1f8ed765f9fe5b96b95ab462fd7cc
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,730
|
java
|
/*
* Metadata Editor
*
* Metadata Editor - Rich internet application for editing metadata.
* Copyright (C) 2011 Jiri Kremser (kremser@mzk.cz)
* Moravian Library in Brno
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
package cz.mzk.editor.client.view.other;
import com.smartgwt.client.widgets.tree.TreeNode;
import cz.mzk.editor.client.util.Constants;
/**
* @author Jiri Kremser
* @version 7.3.2012
*/
public class SubstructureTreeNode
extends TreeNode {
public static final String ROOT_ID = "1";
public static final String ROOT_OBJECT_ID = "0";
public SubstructureTreeNode(String id,
String parent,
String name,
String pictureOrUuid,
String modelId,
String type,
String dateOrIntPartName,
String noteOrIntSubtitle,
String partNumberOrAlto,
String aditionalInfoOrOcr,
boolean isOpen,
boolean exist) {
setAttribute(Constants.ATTR_ID, id);
setAttribute(Constants.ATTR_PARENT, parent);
setAttribute(Constants.ATTR_NAME, name);
setAttribute(Constants.ATTR_PICTURE_OR_UUID, pictureOrUuid);
setAttribute(Constants.ATTR_MODEL_ID, modelId);
setAttribute(Constants.ATTR_TYPE, type);
setAttribute(Constants.ATTR_DATE_OR_INT_PART_NAME, dateOrIntPartName);
setAttribute(Constants.ATTR_NOTE_OR_INT_SUBTITLE, noteOrIntSubtitle);
setAttribute(Constants.ATTR_PART_NUMBER_OR_ALTO, partNumberOrAlto);
setAttribute(Constants.ATTR_ADITIONAL_INFO_OR_OCR, aditionalInfoOrOcr);
setAttribute("isOpen", isOpen);
setAttribute(Constants.ATTR_EXIST, exist);
setAttribute(Constants.ATTR_CREATE, !exist);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e2d2a5f355060cdcdbe7400430d7568a2f3ca60c
|
a15d4565864d8cecf88f4a9a92139c9c41578c8f
|
/modules/service/org.jowidgets.invocation.service.common.api/src/main/java/org/jowidgets/invocation/service/common/api/IInterimResponseCallback.java
|
60c29b3a1c495f09a2752de59c6dbc78e7f98096
|
[] |
no_license
|
jo-source/jo-client-platform
|
f4800d121df6b982639390f3507da237fc5426c1
|
2f346b26fa956c6d6612fef2d0ef3eedbb390d7a
|
refs/heads/master
| 2021-01-23T10:03:16.067646
| 2019-04-29T11:43:04
| 2019-04-29T11:43:04
| 39,776,103
| 2
| 3
| null | 2016-08-24T13:53:07
| 2015-07-27T13:33:59
|
Java
|
UTF-8
|
Java
| false
| false
| 1,734
|
java
|
/*
* Copyright (c) 2011, grossmann
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the jo-widgets.org nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL jo-widgets.org 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.
*/
package org.jowidgets.invocation.service.common.api;
public interface IInterimResponseCallback<RESPONSE_TYPE> {
void response(RESPONSE_TYPE response);
}
|
[
"herr.grossmann@gmx.de"
] |
herr.grossmann@gmx.de
|
e51fb56af04abbdf37391c3d2ad45ff0e1f1d3a5
|
2312f07ef2524597a00ac84c5537563f950690f7
|
/galaxy_wallpaper/src/main/java/com/kinglloy/wallpaper/galaxy_13/ProviderImpl.java
|
c7bc52c92c28d31dfbac3229d19b04405141fc97
|
[] |
no_license
|
jinkg/ETW_Components
|
6cd1ed14c334779947f09d9e8609552cf9ecfbdd
|
b16fb28acd4b3e0c68ffd1dbeeb567b6c0371dbc
|
refs/heads/master
| 2021-05-07T06:29:01.507396
| 2018-09-26T12:44:26
| 2018-09-26T12:44:28
| 111,760,297
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 563
|
java
|
package com.kinglloy.wallpaper.galaxy_13;
import android.content.Context;
import android.service.wallpaper.WallpaperService;
import com.maxelus.galaxypacklivewallpaper.config.GalaxyConfig;
import com.yalin.style.engine.IProvider;
/**
* @author jinyalin
* @since 2017/7/28.
*/
public class ProviderImpl implements IProvider {
@Override
public WallpaperService provideProxy(Context host) {
GalaxyConfig.galaxyType = 13;
GalaxyConfig.galaxyBg = 1;
return new com.maxelus.galaxypacklivewallpaper.WallpaperService(host);
}
}
|
[
"jinyalin@baidu.com"
] |
jinyalin@baidu.com
|
0c809ec148c1b088e2e5b8fec7eb7225b6ac9daa
|
bd681d34c40f5337b212816dda9ab1f7762bf4c1
|
/src/cn/edu/jxnu/leetcode/scala/package-info.java
|
9e39f2391a44291c1fdbb57b6b4d02e461f84d28
|
[] |
no_license
|
fun14512/Java-Learning-Summary
|
9c5763b9db22c2b3f36ce8e8137ac4fe679a2515
|
57b195b008a589ec677b9cf2f247ce2c59d367ab
|
refs/heads/master
| 2020-04-26T16:22:06.659832
| 2019-02-26T05:04:42
| 2019-02-26T05:04:42
| 173,675,863
| 1
| 0
| null | 2019-03-04T04:51:17
| 2019-03-04T04:51:16
| null |
UTF-8
|
Java
| false
| false
| 394
|
java
|
package cn.edu.jxnu.leetcode.scala;
/**
* scala 版 本库的Scala写法不唯一,随性,无标准
*
* 导入的时候可能出现错误,直接在propblems中把errors给delete掉即可,不影响
*
* PS:整个仓库是Java项目+Maven+Scala库环境,出现导入问题很正常
*
* 可以的话考虑单独新建scala项目即可【此时不需要maven编译插件了】
*/
|
[
"568845948@qq.com"
] |
568845948@qq.com
|
d433ac77c21e08eb469bfbe59f99c31664a07080
|
7ba63dcac671954f003e03b43f3048aaa5924e87
|
/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpDepartmentService.java
|
f981f0352611637273e883c0c8c738741eb93ba0
|
[
"Apache-2.0"
] |
permissive
|
heaiso1985/weixin-java-tools
|
f125212769c714168ae5810a8692e020baae0328
|
9b29c3bef96346c0200eb14f3cda743dafc75e3c
|
refs/heads/master
| 2021-05-09T01:01:42.191339
| 2018-06-14T08:01:42
| 2018-06-14T08:01:42
| 119,766,827
| 1
| 0
|
Apache-2.0
| 2018-06-14T08:01:43
| 2018-02-01T01:39:10
|
Java
|
UTF-8
|
Java
| false
| false
| 1,635
|
java
|
package me.chanjar.weixin.cp.api;
import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.cp.bean.WxCpDepart;
import java.util.List;
/**
* <pre>
* 部门管理接口
* Created by BinaryWang on 2017/6/24.
* </pre>
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
*/
public interface WxCpDepartmentService {
/**
* <pre>
* 部门管理接口 - 创建部门
* 最多支持创建500个部门
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=部门管理接口
* </pre>
*
* @param depart 部门
* @return 部门id
*/
Integer create(WxCpDepart depart) throws WxErrorException;
/**
* <pre>
* 部门管理接口 - 查询部门
* 详情请见: http://qydev.weixin.qq.com/wiki/index.php?title=%E7%AE%A1%E7%90%86%E9%83%A8%E9%97%A8#.E8.8E.B7.E5.8F.96.E9.83.A8.E9.97.A8.E5.88.97.E8.A1.A8
* </pre>
* @param id 部门id。获取指定部门及其下的子部门。非必需,可为null
*/
List<WxCpDepart> list(Integer id) throws WxErrorException;
/**
* <pre>
* 部门管理接口 - 修改部门名
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=部门管理接口
* 如果id为0(未部门),1(黑名单),2(星标组),或者不存在的id,微信会返回系统繁忙的错误
* </pre>
*
* @param group 要更新的group,group的id,name必须设置
*/
void update(WxCpDepart group) throws WxErrorException;
/**
* <pre>
* 部门管理接口 - 删除部门
* </pre>
*
* @param departId 部门id
*/
void delete(Integer departId) throws WxErrorException;
}
|
[
"binarywang@gmail.com"
] |
binarywang@gmail.com
|
c3ee7ce991d626b821bf19b28115150d36bd8d86
|
2ed7c4c05df3e2bdcb88caa0a993033e047fb29a
|
/common/com.raytheon.uf.common.wxmath/src/com/raytheon/uf/common/wxmath/ZToPsa.java
|
a6deabbe03c4d8486dae51eee475dbedd1bf81e9
|
[] |
no_license
|
Unidata/awips2-core
|
d378a50c78994f85a27b481e6f77c792d1fe0684
|
ab00755b9e158ce66821b6fc05dee5d902421ab8
|
refs/heads/unidata_18.2.1
| 2023-07-22T12:41:05.308429
| 2023-02-13T20:02:40
| 2023-02-13T20:02:40
| 34,124,839
| 3
| 7
| null | 2023-07-06T15:40:45
| 2015-04-17T15:39:56
|
Java
|
UTF-8
|
Java
| false
| false
| 2,141
|
java
|
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.wxmath;
/**
* Converts a height in meters into a pressure in a standard atmosphere in
* milibars.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 13, 2013 #2262 dgilling Ported from ztopsa.f.
*
* </pre>
*
* @author dgilling
* @version 1.0
*/
public class ZToPsa {
private static final double Flg = 1e10;
// Never allow this class to be directly instantiated
private ZToPsa() {
throw new AssertionError();
}
/**
* This routine converts a height in meters into a pressure in a standard
* atmosphere in milibars.
*
* @param height
* Height (in m)
* @return Pressure (in mb)
*/
public static float ztopsa(float height) {
float ZtoPsa;
if (height > Flg) {
ZtoPsa = Float.NaN;
} else if (height < Constants.z11) {
ZtoPsa = (float) (Constants.p0 * Math.pow(
((Constants.T0 - Constants.gamma * height) / Constants.T0),
Constants.HGT_PRES_c1));
} else {
ZtoPsa = (float) (Constants.p11 * Math.pow(10,
((Constants.z11 - height) / Constants.HGT_PRES_c2)));
}
return ZtoPsa;
}
}
|
[
"Steven_L_Harris@raytheon.com"
] |
Steven_L_Harris@raytheon.com
|
a6aeb3c86a84ef59bbadca72b2d9d4fe6e409588
|
5d00b27e4022698c2dc56ebbc63263f3c44eea83
|
/src/com/ah/bo/performance/AhMaxClientsCount.java
|
de78fae44fd50670656a13940932284425c87930
|
[] |
no_license
|
Aliing/WindManager
|
ac5b8927124f992e5736e34b1b5ebb4df566770a
|
f66959dcaecd74696ae8bc764371c9a2aa421f42
|
refs/heads/master
| 2020-12-27T23:57:43.988113
| 2014-07-28T17:58:46
| 2014-07-28T17:58:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,549
|
java
|
package com.ah.bo.performance;
import java.sql.Timestamp;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.Version;
import org.hibernate.annotations.Index;
import com.ah.bo.HmBo;
import com.ah.bo.admin.HmDomain;
@Entity
@Table(name = "max_clients_count")
@org.hibernate.annotations.Table(appliesTo = "max_clients_count", indexes = {
@Index(name = "MAX_CLIENTS_COUNT_OWNER", columnNames = { "OWNER" }),
@Index(name = "MAX_CLIENTS_COUNT_TIME", columnNames = { "timeStamp" })
})
public class AhMaxClientsCount implements HmBo {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private int maxClientCount = 0;
private int currentClientCount = 0;
private long client24Count;
private long client5Count;
private long clientwiredCount;
private long totalCount;
private boolean globalFlg;
private long timeStamp = System.currentTimeMillis();
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "OWNER", nullable = false)
private HmDomain owner;
@Version
private Timestamp version;
@Override
public Long getId() {
return this.id;
}
@Override
public Timestamp getVersion() {
return version;
}
@Override
public String getLabel() {
return "maxclientcount";
}
@Transient
private boolean selected;
@Override
public boolean isSelected() {
return this.selected;
}
@Override
public void setSelected(boolean selected) {
this.selected = selected;
}
@Override
public void setId(Long id) {
this.id = id;
}
@Override
public void setVersion(Timestamp version) {
}
@Override
public HmDomain getOwner() {
return owner;
}
@Override
public void setOwner(HmDomain owner) {
this.owner = owner;
}
public int getMaxClientCount() {
return maxClientCount;
}
public void setMaxClientCount(int maxClientCount) {
this.maxClientCount = maxClientCount;
}
public long getTimeStamp() {
return timeStamp;
}
public void setTimeStamp(long timeStamp) {
this.timeStamp = timeStamp;
}
public int getCurrentClientCount() {
return currentClientCount;
}
public void setCurrentClientCount(int currentClientCount) {
this.currentClientCount = currentClientCount;
}
/**
* @return the globalFlg
*/
public boolean getGlobalFlg() {
return globalFlg;
}
/**
* @param globalFlg the globalFlg to set
*/
public void setGlobalFlg(boolean globalFlg) {
this.globalFlg = globalFlg;
}
public long getClient24Count() {
return client24Count;
}
public void setClient24Count(long client24Count) {
this.client24Count = client24Count;
}
public long getClient5Count() {
return client5Count;
}
public void setClient5Count(long client5Count) {
this.client5Count = client5Count;
}
public long getClientwiredCount() {
return clientwiredCount;
}
public void setClientwiredCount(long clientwiredCount) {
this.clientwiredCount = clientwiredCount;
}
public long getTotalCount() {
return totalCount;
}
public void setTotalCount(long totalCount) {
this.totalCount = totalCount;
}
}
|
[
"zjie@aerohive.com"
] |
zjie@aerohive.com
|
92c1796fb9b64fa09b805a8fcbdc149420548f73
|
95d20c83d8aff34e314c56a3ecb2b87c9fa9fc86
|
/Ghidra/Features/PDB/src/main/java/ghidra/app/util/bin/format/pdb2/pdbreader/type/OneMethodMsType.java
|
e4220260e55822ad21c463d5e2f70f412060b5dd
|
[
"GPL-1.0-or-later",
"GPL-3.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
NationalSecurityAgency/ghidra
|
969fe0d2ca25cb8ac72f66f0f90fc7fb2dbfa68d
|
7cc135eb6bfabd166cbc23f7951dae09a7e03c39
|
refs/heads/master
| 2023-08-31T21:20:23.376055
| 2023-08-29T23:08:54
| 2023-08-29T23:08:54
| 173,228,436
| 45,212
| 6,204
|
Apache-2.0
| 2023-09-14T18:00:39
| 2019-03-01T03:27:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,449
|
java
|
/* ###
* IP: GHIDRA
*
* 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 ghidra.app.util.bin.format.pdb2.pdbreader.type;
import ghidra.app.util.bin.format.pdb2.pdbreader.*;
/**
* This class represents the <B>MsType</B> flavor of One Method type.
* <P>
* Note: we do not necessarily understand each of these data type classes. Refer to the
* base class for more information.
*/
public class OneMethodMsType extends AbstractOneMethodMsType {
public static final int PDB_ID = 0x1511;
/**
* Constructor for this type.
* @param pdb {@link AbstractPdb} to which this type belongs.
* @param reader {@link PdbByteReader} from which this type is deserialized.
* @throws PdbException upon error parsing a field.
*/
public OneMethodMsType(AbstractPdb pdb, PdbByteReader reader) throws PdbException {
super(pdb, reader, 32, StringParseType.StringNt);
}
@Override
public int getPdbId() {
return PDB_ID;
}
}
|
[
"50744617+ghizard@users.noreply.github.com"
] |
50744617+ghizard@users.noreply.github.com
|
31d62c199593b001707607e7a00161a471572bd5
|
fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4
|
/callcenterj_sy/src/et/test/jdk15/DoCallStuff.java
|
3d8825cc482cb1ca0c6c57f17d116ec9f962eefe
|
[] |
no_license
|
sensui74/legacy-project
|
4502d094edbf8964f6bb9805be88f869bae8e588
|
ff8156ae963a5c61575ff34612c908c4ccfc219b
|
refs/heads/master
| 2020-03-17T06:28:16.650878
| 2016-01-08T03:46:00
| 2016-01-08T03:46:00
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 710
|
java
|
/**
* 沈阳卓越科技有限公司
* 2008-4-30
*/
package et.test.jdk15;
import java.util.concurrent.Callable;
/**
* @author zhang feng
*
*/
public class DoCallStuff implements Callable {
private int aInt;
public DoCallStuff(int aInt) {
this.aInt = aInt;
}
public String call() throws Exception { // *2
boolean resultOk = false;
if (aInt == 0) {
resultOk = true;
} else if (aInt == 1) {
while (true) { // infinite loop
System.out.println("looping....");
Thread.sleep(3000);
}
} else {
throw new Exception("Callable terminated with Exception!"); // *3
}
if (resultOk) {
return "Task done.";
} else {
return "Task failed";
}
}
}
|
[
"wow_fei@163.com"
] |
wow_fei@163.com
|
a51c0a0db7c086ef45a75ea34db7f738550732b9
|
97fd02f71b45aa235f917e79dd68b61c62b56c1c
|
/src/main/java/com/tencentcloudapi/ess/v20201111/models/DeleteStaffsResult.java
|
9cb5d8df450cd3b030760d01a13019465a44d0f0
|
[
"Apache-2.0"
] |
permissive
|
TencentCloud/tencentcloud-sdk-java
|
7df922f7c5826732e35edeab3320035e0cdfba05
|
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
|
refs/heads/master
| 2023-09-04T10:51:57.854153
| 2023-09-01T03:21:09
| 2023-09-01T03:21:09
| 129,837,505
| 537
| 317
|
Apache-2.0
| 2023-09-13T02:42:03
| 2018-04-17T02:58:16
|
Java
|
UTF-8
|
Java
| false
| false
| 4,247
|
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.ess.v20201111.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class DeleteStaffsResult extends AbstractModel{
/**
* 删除员工的成功数据
注意:此字段可能返回 null,表示取不到有效值。
*/
@SerializedName("SuccessEmployeeData")
@Expose
private SuccessDeleteStaffData [] SuccessEmployeeData;
/**
* 删除员工的失败数据
注意:此字段可能返回 null,表示取不到有效值。
*/
@SerializedName("FailedEmployeeData")
@Expose
private FailedDeleteStaffData [] FailedEmployeeData;
/**
* Get 删除员工的成功数据
注意:此字段可能返回 null,表示取不到有效值。
* @return SuccessEmployeeData 删除员工的成功数据
注意:此字段可能返回 null,表示取不到有效值。
*/
public SuccessDeleteStaffData [] getSuccessEmployeeData() {
return this.SuccessEmployeeData;
}
/**
* Set 删除员工的成功数据
注意:此字段可能返回 null,表示取不到有效值。
* @param SuccessEmployeeData 删除员工的成功数据
注意:此字段可能返回 null,表示取不到有效值。
*/
public void setSuccessEmployeeData(SuccessDeleteStaffData [] SuccessEmployeeData) {
this.SuccessEmployeeData = SuccessEmployeeData;
}
/**
* Get 删除员工的失败数据
注意:此字段可能返回 null,表示取不到有效值。
* @return FailedEmployeeData 删除员工的失败数据
注意:此字段可能返回 null,表示取不到有效值。
*/
public FailedDeleteStaffData [] getFailedEmployeeData() {
return this.FailedEmployeeData;
}
/**
* Set 删除员工的失败数据
注意:此字段可能返回 null,表示取不到有效值。
* @param FailedEmployeeData 删除员工的失败数据
注意:此字段可能返回 null,表示取不到有效值。
*/
public void setFailedEmployeeData(FailedDeleteStaffData [] FailedEmployeeData) {
this.FailedEmployeeData = FailedEmployeeData;
}
public DeleteStaffsResult() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public DeleteStaffsResult(DeleteStaffsResult source) {
if (source.SuccessEmployeeData != null) {
this.SuccessEmployeeData = new SuccessDeleteStaffData[source.SuccessEmployeeData.length];
for (int i = 0; i < source.SuccessEmployeeData.length; i++) {
this.SuccessEmployeeData[i] = new SuccessDeleteStaffData(source.SuccessEmployeeData[i]);
}
}
if (source.FailedEmployeeData != null) {
this.FailedEmployeeData = new FailedDeleteStaffData[source.FailedEmployeeData.length];
for (int i = 0; i < source.FailedEmployeeData.length; i++) {
this.FailedEmployeeData[i] = new FailedDeleteStaffData(source.FailedEmployeeData[i]);
}
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamArrayObj(map, prefix + "SuccessEmployeeData.", this.SuccessEmployeeData);
this.setParamArrayObj(map, prefix + "FailedEmployeeData.", this.FailedEmployeeData);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
eed83af2488912403b7a4689b6fc87c40b0eacde
|
71b1300d51ac6dcde1089287ece9adc61c148aa5
|
/webfx-kit/webfx-kit-javafxgraphics-emul/src/main/java/javafx/scene/layout/PreferenceResizableNode.java
|
a3d054c7534acd32a5eb6f8645825f315f250707
|
[
"Apache-2.0"
] |
permissive
|
webfx-project/webfx
|
0ab7631a69501eced95bc3c65fb9caea76965d8e
|
a104df9917bb0e4571f726cd28494b099d0f017a
|
refs/heads/main
| 2023-08-24T17:55:59.102296
| 2023-08-13T10:55:08
| 2023-08-21T13:27:17
| 44,308,813
| 249
| 20
|
Apache-2.0
| 2023-08-06T18:05:58
| 2015-10-15T09:52:32
|
Java
|
UTF-8
|
Java
| false
| false
| 1,778
|
java
|
package javafx.scene.layout;
import javafx.scene.INode;
import dev.webfx.kit.mapper.peers.javafxgraphics.markers.*;
/**
* @author Bruno Salmon
*/
public interface PreferenceResizableNode extends INode,
HasWidthProperty,
HasMinWidthProperty,
HasPrefWidthProperty,
HasMaxWidthProperty,
HasHeightProperty,
HasMinHeightProperty,
HasPrefHeightProperty,
HasMaxHeightProperty {
default boolean isResizable() {
return true;
}
/**
* Sentinel value which can be passed to a region's
* {@link #setMinWidth(Double) setMinWidth},
* {@link #setMinHeight(Double) setMinHeight},
* {@link #setMaxWidth(Double) setMaxWidth} or
* {@link #setMaxHeight(Double) setMaxHeight}
* methods to indicate that the preferred dimension should be used for that max and/or min constraint.
*/
double USE_PREF_SIZE = Double.NEGATIVE_INFINITY;
/**
* Sentinel value which can be passed to a region's
* {@link #setMinWidth(Double) setMinWidth},
* {@link #setMinHeight(Double) setMinHeight},
* {@link #setPrefWidth(Double) setPrefWidth},
* {@link #setPrefHeight(Double) setPrefHeight},
* {@link #setMaxWidth(Double) setMaxWidth},
* {@link #setMaxHeight(Double) setMaxHeight} methods
* to reset the region's size constraint back to it's intrinsic size returned
* by {@link #computeMinWidth(Double) computeMinWidth}, {@link #computeMinHeight(double) computeMinHeight},
* {@link #computePrefWidth(double) computePrefWidth}, {@link #computePrefHeight(double) computePrefHeight},
* {@link #computeMaxWidth(double) computeMaxWidth}, or {@link #computeMaxHeight(double) computeMaxHeight}.
*/
double USE_COMPUTED_SIZE = -1;
}
|
[
"dev.salmonb@gmail.com"
] |
dev.salmonb@gmail.com
|
928917fa57b639c5504b3623b29bc014db49c582
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2008-07-03/seasar2-2.4.26/s2jdbc-gen/s2jdbc-gen-core/src/main/java/org/seasar/extension/jdbc/gen/desc/TableDescFactoryImpl.java
|
272fab8d138bcb022e889ad040fb366d1338523e
|
[] |
no_license
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,885
|
java
|
/*
* Copyright 2004-2008 the Seasar Foundation and the Others.
*
* 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.seasar.extension.jdbc.gen.desc;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import org.seasar.extension.jdbc.EntityMeta;
import org.seasar.extension.jdbc.PropertyMeta;
import org.seasar.extension.jdbc.TableMeta;
import org.seasar.extension.jdbc.gen.ColumnDesc;
import org.seasar.extension.jdbc.gen.ColumnDescFactory;
import org.seasar.extension.jdbc.gen.ForeignKeyDesc;
import org.seasar.extension.jdbc.gen.ForeignKeyDescFactory;
import org.seasar.extension.jdbc.gen.PrimaryKeyDesc;
import org.seasar.extension.jdbc.gen.PrimaryKeyDescFactory;
import org.seasar.extension.jdbc.gen.TableDesc;
import org.seasar.extension.jdbc.gen.TableDescFactory;
import org.seasar.extension.jdbc.gen.UniqueKeyDesc;
import org.seasar.extension.jdbc.gen.UniqueKeyDescFactory;
/**
* {@link TableDescFactory}の実装クラスです。
*
* @author taedium
*/
public class TableDescFactoryImpl implements TableDescFactory {
/** デフォルトの{@link Table}を取得可能にするためのクラス */
@Table
protected static class Helper {
}
/** デフォルトのテーブル */
protected static Table DEFAULT_TABLE = Helper.class
.getAnnotation(Table.class);
/** テーブルの完全修飾名をキー、テーブル記述を値とするマップ */
protected ConcurrentMap<String, TableDesc> tableDescMap = new ConcurrentHashMap<String, TableDesc>(
200);
/** カラム記述のファクトリ */
protected ColumnDescFactory columnDescFactory;
/** 主キー記述のファクトリ */
protected PrimaryKeyDescFactory primaryKeyDescFactory;
/** 外部キー記述のファクトリ */
protected ForeignKeyDescFactory foreignKeyDescFactory;
/** 一意キー記述のファクトリ */
protected UniqueKeyDescFactory uniqueKeyDescFactory;
/**
* インスタンスを構築します。
*
* @param columnDescFactory
* カラム記述のファクトリ
* @param primaryKeyDescFactory
* 主キー記述のファクトリ
* @param foreignKeyDescFactory
* 外部キー記述のファクトリ
* @param uniqueKeyDescFactory
* 一意キー記述のファクトリ
*/
public TableDescFactoryImpl(ColumnDescFactory columnDescFactory,
PrimaryKeyDescFactory primaryKeyDescFactory,
ForeignKeyDescFactory foreignKeyDescFactory,
UniqueKeyDescFactory uniqueKeyDescFactory) {
this.columnDescFactory = columnDescFactory;
this.primaryKeyDescFactory = primaryKeyDescFactory;
this.foreignKeyDescFactory = foreignKeyDescFactory;
this.uniqueKeyDescFactory = uniqueKeyDescFactory;
}
public TableDesc getTableDesc(EntityMeta entityMeta) {
String tableFullName = entityMeta.getTableMeta().getFullName();
TableDesc tableDesc = tableDescMap.get(tableFullName);
if (tableDesc != null) {
return tableDesc;
}
tableDesc = createTableDesc(entityMeta);
TableDesc tableDesc2 = tableDescMap.putIfAbsent(tableFullName,
tableDesc);
return tableDesc2 != null ? tableDesc2 : tableDesc;
}
/**
* テーブル記述を作成します。
*
* @param entityMeta
* エンティティメタデータ
* @return テーブル記述
*/
protected TableDesc createTableDesc(EntityMeta entityMeta) {
Table table = getTable(entityMeta);
TableDesc tableDesc = new TableDesc();
doName(entityMeta, tableDesc, table);
doColumnDesc(entityMeta, tableDesc, table);
doPrimaryKeyDesc(entityMeta, tableDesc, table);
doForeignKeyDesc(entityMeta, tableDesc, table);
doUniqueKeyDesc(entityMeta, tableDesc, table);
return tableDesc;
}
/**
* 名前を処理します。
*
* @param entityMeta
* エンティティメタデータ
* @param tableDesc
* テーブル記述
* @param table
* テーブル
*/
protected void doName(EntityMeta entityMeta, TableDesc tableDesc,
Table table) {
TableMeta tableMeta = entityMeta.getTableMeta();
tableDesc.setCatalogName(tableMeta.getCatalog());
tableDesc.setSchemaName(tableMeta.getSchema());
tableDesc.setName(tableMeta.getName());
}
/**
* カラム記述を処理します。
*
* @param entityMeta
* エンティティメタデータ
* @param tableDesc
* テーブル記述
* @param table
* テーブル
*/
protected void doColumnDesc(EntityMeta entityMeta, TableDesc tableDesc,
Table table) {
for (int i = 0; i < entityMeta.getColumnPropertyMetaSize(); i++) {
PropertyMeta propertyMeta = entityMeta.getColumnPropertyMeta(i);
ColumnDesc columnDesc = columnDescFactory
.getColumnDesc(propertyMeta);
if (columnDesc != null) {
tableDesc.addColumnDesc(columnDesc);
}
}
}
/**
* 主キー記述を処理します。
*
* @param entityMeta
* エンティティメタデータ
* @param tableDesc
* テーブル記述
* @param table
* テーブル
*/
protected void doPrimaryKeyDesc(EntityMeta entityMeta, TableDesc tableDesc,
Table table) {
PrimaryKeyDesc primaryKeyDesc = primaryKeyDescFactory
.getPrimaryKeyDesc(entityMeta);
if (primaryKeyDesc != null) {
tableDesc.setPrimaryKeyDesc(primaryKeyDesc);
}
}
/**
* 外部キー記述を処理します。
*
* @param entityMeta
* エンティティメタデータ
* @param tableDesc
* テーブル記述
* @param table
* テーブル
*/
protected void doForeignKeyDesc(EntityMeta entityMeta, TableDesc tableDesc,
Table table) {
for (int i = 0; i < entityMeta.getPropertyMetaSize(); i++) {
PropertyMeta propertyMeta = entityMeta.getPropertyMeta(i);
ForeignKeyDesc foreignKeyDesc = foreignKeyDescFactory
.getForeignKeyDesc(propertyMeta);
if (foreignKeyDesc != null) {
tableDesc.addForeigneKeyDesc(foreignKeyDesc);
}
}
}
/**
* 一意キー記述を処理します。
*
* @param entityMeta
* エンティティメタデータ
* @param tableDesc
* テーブル記述
* @param table
* テーブル
*/
protected void doUniqueKeyDesc(EntityMeta entityMeta, TableDesc tableDesc,
Table table) {
for (ColumnDesc columnDesc : tableDesc.getColumnDescList()) {
UniqueKeyDesc uniqueKeyDesc = uniqueKeyDescFactory
.getSingleUniqueKey(columnDesc);
if (uniqueKeyDesc != null) {
tableDesc.addUniqueKeyDesc(uniqueKeyDesc);
}
}
for (UniqueConstraint uc : table.uniqueConstraints()) {
UniqueKeyDesc uniqueKeyDesc = uniqueKeyDescFactory
.getCompositeUniqueKey(uc);
if (uniqueKeyDesc != null) {
tableDesc.addUniqueKeyDesc(uniqueKeyDesc);
}
}
}
/**
* テーブルを取得します。
*
* @param entityMeta
* エンティティメタデータ
* @return テーブル
*/
protected Table getTable(EntityMeta entityMeta) {
Class<?> clazz = entityMeta.getEntityClass();
Table table = clazz.getAnnotation(Table.class);
return table != null ? table : DEFAULT_TABLE;
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
d2b57e1f71d4b9ddcc85a1c810ef5cf6bcbf8889
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_0f65a0f23995f31851c056b56ddd46e9527c22b1/EvalTag/2_0f65a0f23995f31851c056b56ddd46e9527c22b1_EvalTag_s.java
|
68dfa9a4fd8b31413acca15eb4b543b922a541f0
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,979
|
java
|
/*
* Copyright 2002-2009 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
*
* 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.springframework.web.servlet.tags;
import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import org.springframework.beans.BeansException;
import org.springframework.core.convert.ConversionService;
import org.springframework.expression.AccessException;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.Expression;
import org.springframework.expression.ExpressionParser;
import org.springframework.expression.PropertyAccessor;
import org.springframework.expression.TypedValue;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.expression.spel.support.StandardTypeConverter;
import org.springframework.web.util.ExpressionEvaluationUtils;
import org.springframework.web.util.HtmlUtils;
import org.springframework.web.util.JavaScriptUtils;
import org.springframework.web.util.TagUtils;
/**
* JSP tag for evaluating expressions with the Spring Expression Language (SpEL).
* Supports the standard JSP evaluation context consisting of implicit variables and scoped attributes.
*
* @author Keith Donald
* @since 3.0.1
*/
public class EvalTag extends HtmlEscapingAwareTag {
private ExpressionParser expressionParser;
private String expression;
private String var;
private int scope = PageContext.PAGE_SCOPE;
private boolean javaScriptEscape = false;
/**
* Set the expression to evaluate.
*/
public void setExpression(String expression) {
this.expression = expression;
}
/**
* Set the variable name to expose the evaluation result under.
* Defaults to rendering the result to the current JspWriter
*/
public void setVar(String var) {
this.var = var;
}
/**
* Set the scope to export the evaluation result to.
* This attribute has no meaning unless var is also defined.
*/
public void setScope(String scope) {
this.scope = TagUtils.getScope(scope);
}
/**
* Set JavaScript escaping for this tag, as boolean value.
* Default is "false".
*/
public void setJavaScriptEscape(String javaScriptEscape) throws JspException {
this.javaScriptEscape =
ExpressionEvaluationUtils.evaluateBoolean("javaScriptEscape", javaScriptEscape, this.pageContext);
}
@Override
public int doStartTagInternal() throws JspException {
this.expressionParser = new SpelExpressionParser();
return EVAL_BODY_INCLUDE;
}
@Override
public int doEndTag() throws JspException {
Expression expression = this.expressionParser.parseExpression(this.expression);
EvaluationContext context = createEvaluationContext();
if (this.var == null) {
try {
String result = expression.getValue(context, String.class);
result = isHtmlEscape() ? HtmlUtils.htmlEscape(result) : result;
result = this.javaScriptEscape ? JavaScriptUtils.javaScriptEscape(result) : result;
pageContext.getOut().print(result);
}
catch (IOException e) {
throw new JspException(e);
}
}
else {
pageContext.setAttribute(var, expression.getValue(context), scope);
}
return EVAL_PAGE;
}
private EvaluationContext createEvaluationContext() {
StandardEvaluationContext context = new StandardEvaluationContext();
context.addPropertyAccessor(new JspPropertyAccessor(this.pageContext));
ConversionService conversionService = getConversionService();
if (conversionService != null) {
context.setTypeConverter(new StandardTypeConverter());
}
return context;
}
private ConversionService getConversionService() {
try {
return (ConversionService) this.pageContext.getRequest().getAttribute("org.springframework.core.convert.ConversionService");
} catch (BeansException e) {
return null;
}
}
private static class JspPropertyAccessor implements PropertyAccessor {
private PageContext pageContext;
public JspPropertyAccessor(PageContext pageContext) {
this.pageContext = pageContext;
}
public Class<?>[] getSpecificTargetClasses() {
return null;
}
public boolean canRead(EvaluationContext context, Object target,
String name) throws AccessException {
if (name.equals("pageContext")) {
return true;
}
// TODO support all other JSP implicit variables defined at http://java.sun.com/javaee/6/docs/api/javax/servlet/jsp/el/ImplicitObjectELResolver.html
return this.pageContext.findAttribute(name) != null;
}
public TypedValue read(EvaluationContext context, Object target,
String name) throws AccessException {
if (name.equals("pageContext")) {
return new TypedValue(this.pageContext);
}
// TODO support all other JSP implicit variables defined at http://java.sun.com/javaee/6/docs/api/javax/servlet/jsp/el/ImplicitObjectELResolver.html
return new TypedValue(this.pageContext.findAttribute(name));
}
public boolean canWrite(EvaluationContext context, Object target,
String name) throws AccessException {
return false;
}
public void write(EvaluationContext context, Object target,
String name, Object newValue) throws AccessException {
throw new UnsupportedOperationException();
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
50473038e51ee91b94b71397b6b13451046aa6ac
|
8cd01526f0e84cf36bc27515876eda9bcc52f49a
|
/code/vim_android/office/src/main/java/com/wxiwei/office/macro/MacroCustomDialog.java
|
c1fbc7d81362f951b4c4965889a399792268b429
|
[] |
no_license
|
liyawei7711/shenlun
|
a0baa859cec59b9d46825c8b1797173bd56d4d3f
|
602b103d90df98c100ce55efee132596b0100445
|
refs/heads/master
| 2021-01-09T12:52:18.359146
| 2020-06-29T08:21:20
| 2020-06-29T08:21:20
| 242,304,879
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,160
|
java
|
/*
* 文件名称: MarcoCustomDialog.java
*
* 编译器: android2.2
* 时间: 下午12:49:58
*/
package com.wxiwei.office.macro;
import com.wxiwei.office.common.ICustomDialog;
/**
* TODO: 文件注释
* <p>
* <p>
* Read版本: Read V1.0
* <p>
* 作者: ljj8494
* <p>
* 日期: 2012-12-21
* <p>
* 负责人: ljj8494
* <p>
* 负责小组:
* <p>
* <p>
*/
public class MacroCustomDialog implements ICustomDialog
{
/**
*
*
*/
protected MacroCustomDialog(DialogListener listener)
{
this.dailogListener = listener;
}
/**
*
*
*/
public void showDialog(byte type)
{
if (dailogListener != null)
{
dailogListener.showDialog(type);
}
}
/**
*
*
*/
public void dismissDialog(byte type)
{
if (dailogListener != null)
{
dailogListener.dismissDialog(type);
}
}
public void dispose()
{
dailogListener = null;
}
//
private DialogListener dailogListener;
}
|
[
"751804582@qq.com"
] |
751804582@qq.com
|
82cda459f40bc717e9d30cf473cf470341f97d87
|
ac1768b715e9fe56be8b340bc1e4bc7f917c094a
|
/ant_tasks/tags/release/11.02.x/11.02.1/common/source/java/ch/systemsx/cisd/common/collections/TableMap.java
|
2752ec4294fa21a3fe07aa8df848b3b4b34817de
|
[
"Apache-2.0"
] |
permissive
|
kykrueger/openbis
|
2c4d72cb4b150a2854df4edfef325f79ca429c94
|
1b589a9656d95e343a3747c86014fa6c9d299b8d
|
refs/heads/master
| 2023-05-11T23:03:57.567608
| 2021-05-21T11:54:58
| 2021-05-21T11:54:58
| 364,558,858
| 0
| 0
|
Apache-2.0
| 2021-06-04T10:08:32
| 2021-05-05T11:48:20
|
Java
|
UTF-8
|
Java
| false
| false
| 8,151
|
java
|
/*
* Copyright 2007 ETH Zuerich, CISD
*
* 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 ch.systemsx.cisd.common.collections;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
* A table of rows of type <code>E</code> with random access via a key of type <code>K</code>.
*
* @author Franz-Josef Elmer
*/
public class TableMap<K, E> implements Iterable<E>
{
/** Strategy on how to handle unique key constraint violations. */
public enum UniqueKeyViolationStrategy
{
KEEP_FIRST, KEEP_LAST, ERROR
}
/**
* Exception indicating a violation of the unique key constraint.
*/
public static class UniqueKeyViolationException extends RuntimeException
{
private static final long serialVersionUID = 1L;
private final Object/* <K> */invalidKey; // NOTE: exceptions cannot be generic in java
UniqueKeyViolationException(Object/* <K> */invalidKey)
{
super("Key '" + invalidKey.toString() + "' already in the map.");
this.invalidKey = invalidKey;
}
public Object/* <K> */getInvalidKey()
{
return invalidKey;
}
}
private final Map<K, E> map = new LinkedHashMap<K, E>();
private final IKeyExtractor<K, E> extractor;
private final UniqueKeyViolationStrategy uniqueKeyViolationStrategy;
/**
* Creates a new instance for specified key extractor.
*
* @param extractor Strategy to extract a key of type <code>E</code> for an object of type
* <code>E</code>.
*/
public TableMap(final IKeyExtractor<K, E> extractor)
{
this(null, extractor, UniqueKeyViolationStrategy.ERROR);
}
/**
* Creates a new instance for the specified rows and key extractor.
*
* @param extractor Strategy to extract a key of type <code>E</code> for an object of type
* <code>E</code>.
* @param uniqueKeyViolationStrategy Strategy to react on unique key violations.
*/
public TableMap(final IKeyExtractor<K, E> extractor,
final UniqueKeyViolationStrategy uniqueKeyViolationStrategy)
{
this(null, extractor, uniqueKeyViolationStrategy);
}
/**
* Creates a new instance for the specified rows and key extractor.
*
* @param rows Collection of rows of type <code>E</code>.
* @param extractor Strategy to extract a key of type <code>E</code> for an object of type
* <code>E</code>.
* @throws UniqueKeyViolationException If the keys of <var>rows</var> are not unique and a
* <var>uniqueKeyViolationStrategy</var> of <code>ERROR</code> has been chosen.
*/
public TableMap(final Iterable<E> rows, final IKeyExtractor<K, E> extractor)
{
this(rows, extractor, UniqueKeyViolationStrategy.ERROR);
}
/**
* Creates a new instance for the specified rows and key extractor.
*
* @param rowsOrNull Collection of rows of type <code>E</code>.
* @param extractor Strategy to extract a key of type <code>E</code> for an object of type
* <code>E</code>.
* @param uniqueKeyViolationStrategy Strategy to react on unique key violations.
* @throws UniqueKeyViolationException If the keys of <var>rows</var> are not unique and a
* <var>uniqueKeyViolationStrategy</var> of <code>ERROR</code> has been chosen.
*/
public TableMap(final Iterable<E> rowsOrNull, final IKeyExtractor<K, E> extractor,
final UniqueKeyViolationStrategy uniqueKeyViolationStrategy)
{
assert extractor != null : "Unspecified key extractor.";
assert uniqueKeyViolationStrategy != null : "Unspecified unique key violation strategy.";
this.extractor = extractor;
this.uniqueKeyViolationStrategy = uniqueKeyViolationStrategy;
if (rowsOrNull != null)
{
for (final E row : rowsOrNull)
{
add(row);
}
}
}
/**
* Adds the specified row to this table. What the method will do when a row is provided with a
* key that is already in the map, depends on the unique key violation strategy as given to the
* constructor:
* <ul>
* <li>For {@link UniqueKeyViolationStrategy#KEEP_FIRST} the first inserted row with this key
* will be kept and all later ones will be ignored.</li>
* <li>For {@link UniqueKeyViolationStrategy#KEEP_LAST} the last inserted row with a given key
* will replace all the others.</li>
* <li>For {@link UniqueKeyViolationStrategy#ERROR} a {@link UniqueKeyViolationException} will
* be thrown when trying to insert a row with a key that is already in the map. <i>This is the
* default.</i>.</li>
* </ul>
*
* @throws UniqueKeyViolationException If the key of <var>row</var> is already in the map and a
* unique key violation strategy of {@link UniqueKeyViolationStrategy#ERROR} has
* been chosen.
*/
public final void add(final E row) throws UniqueKeyViolationException
{
final K key = extractor.getKey(row);
if (uniqueKeyViolationStrategy == UniqueKeyViolationStrategy.KEEP_LAST
|| map.get(key) == null)
{
map.put(key, row);
} else if (uniqueKeyViolationStrategy == UniqueKeyViolationStrategy.ERROR)
{
throw new UniqueKeyViolationException(key);
}
}
/**
* Gets the row for the specified key or <code>null</code> if not found.
*/
public final E tryGet(final K key)
{
return map.get(key);
}
/**
* Returns a collection view of the values contained in the internal map.
* <p>
* The returned collection is unmodifiable.
* </p>
*/
public final Collection<E> values()
{
return Collections.unmodifiableCollection(map.values());
}
/**
* Returns a set view of the keys contained in the internal map.
* <p>
* The returned set is unmodifiable.
* </p>
*/
public final Set<K> keySet()
{
return Collections.unmodifiableSet(map.keySet());
}
/**
* Removes and returns the row for the specified key.
*
* @return stored row.
*/
public E remove(K key)
{
E row = map.remove(key);
if (row == null)
{
throw new IllegalArgumentException("Couldn't remove row for key '" + key
+ "' because there was no row.");
}
return row;
}
//
// Object
//
@Override
public final String toString()
{
return ToStringBuilder.reflectionToString(this);
}
/**
* Creates an iterator of the rows in the order they have been added. Removing is not supported.
*/
public final Iterator<E> iterator()
{
return new Iterator<E>()
{
private Iterator<Map.Entry<K, E>> iterator = map.entrySet().iterator();
public boolean hasNext()
{
return iterator.hasNext();
}
public E next()
{
return iterator.next().getValue();
}
public void remove()
{
throw new UnsupportedOperationException("Can not remove an element.");
}
};
}
}
|
[
"fedoreno"
] |
fedoreno
|
e6622adfbad3f001f0a333444ce9490a381048e0
|
13cbb329807224bd736ff0ac38fd731eb6739389
|
/javax/xml/bind/Binder.java
|
98136a6561251ce95b4120c9efdaf779047b711c
|
[] |
no_license
|
ZhipingLi/rt-source
|
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
|
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
|
refs/heads/master
| 2023-07-14T15:00:33.100256
| 2021-09-01T04:49:04
| 2021-09-01T04:49:04
| 401,933,858
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,464
|
java
|
package javax.xml.bind;
import javax.xml.validation.Schema;
public abstract class Binder<XmlNode> extends Object {
public abstract Object unmarshal(XmlNode paramXmlNode) throws JAXBException;
public abstract <T> JAXBElement<T> unmarshal(XmlNode paramXmlNode, Class<T> paramClass) throws JAXBException;
public abstract void marshal(Object paramObject, XmlNode paramXmlNode) throws JAXBException;
public abstract XmlNode getXMLNode(Object paramObject);
public abstract Object getJAXBNode(XmlNode paramXmlNode) throws JAXBException;
public abstract XmlNode updateXML(Object paramObject);
public abstract XmlNode updateXML(Object paramObject, XmlNode paramXmlNode) throws JAXBException;
public abstract Object updateJAXB(XmlNode paramXmlNode) throws JAXBException;
public abstract void setSchema(Schema paramSchema);
public abstract Schema getSchema();
public abstract void setEventHandler(ValidationEventHandler paramValidationEventHandler) throws JAXBException;
public abstract ValidationEventHandler getEventHandler() throws JAXBException;
public abstract void setProperty(String paramString, Object paramObject) throws PropertyException;
public abstract Object getProperty(String paramString) throws PropertyException;
}
/* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\javax\xml\bind\Binder.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.0.7
*/
|
[
"michael__lee@yeah.net"
] |
michael__lee@yeah.net
|
0536d041da24facbc904452acbaf9f8ac89b51ac
|
c827bfebbde82906e6b14a3f77d8f17830ea35da
|
/Development3.0/TeevraServer/extensions/generic/tfp/src/main/java/com/tfp/properties/MCH.java
|
0076aa8782d68a30683a8313ea21887cacb55132
|
[] |
no_license
|
GiovanniPucariello/TeevraCore
|
13ccf7995c116267de5c403b962f1dc524ac1af7
|
9d755cc9ca91fb3ebc5b227d9de6bcf98a02c7b7
|
refs/heads/master
| 2021-05-29T18:12:29.174279
| 2013-04-22T07:44:28
| 2013-04-22T07:44:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,992
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2010.03.03 at 03:05:55 PM EST
//
package com.tfp.properties;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="CDS" type="{}CDSConfigType" minOccurs="0"/>
* <element name="TDS" type="{}TDSConfigType" minOccurs="0"/>
* <element name="TFP" type="{}TFPConfigType" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"cds",
"tds",
"tfp"
})
@XmlRootElement(name = "MCH")
public class MCH {
@XmlElement(name = "CDS")
protected CDSConfigType cds;
@XmlElement(name = "TDS")
protected TDSConfigType tds;
@XmlElement(name = "TFP")
protected TFPConfigType tfp;
/**
* Gets the value of the cds property.
*
* @return
* possible object is
* {@link CDSConfigType }
*
*/
public CDSConfigType getCDS() {
return cds;
}
/**
* Sets the value of the cds property.
*
* @param value
* allowed object is
* {@link CDSConfigType }
*
*/
public void setCDS(CDSConfigType value) {
this.cds = value;
}
/**
* Gets the value of the tds property.
*
* @return
* possible object is
* {@link TDSConfigType }
*
*/
public TDSConfigType getTDS() {
return tds;
}
/**
* Sets the value of the tds property.
*
* @param value
* allowed object is
* {@link TDSConfigType }
*
*/
public void setTDS(TDSConfigType value) {
this.tds = value;
}
/**
* Gets the value of the tfp property.
*
* @return
* possible object is
* {@link TFPConfigType }
*
*/
public TFPConfigType getTFP() {
return tfp;
}
/**
* Sets the value of the tfp property.
*
* @param value
* allowed object is
* {@link TFPConfigType }
*
*/
public void setTFP(TFPConfigType value) {
this.tfp = value;
}
}
|
[
"ritwik.bose@headstrong.com"
] |
ritwik.bose@headstrong.com
|
5fc985c54a98626d715142285cf65f07629fe10a
|
d71e879b3517cf4fccde29f7bf82cff69856cfcd
|
/ExtractedJars/Shopkick_com.shopkick.app/javafiles/com/google/android/gms/internal/measurement/zztn.java
|
4673af57f75d9ca6a789f8c418e3d14b91528170
|
[
"MIT"
] |
permissive
|
Andreas237/AndroidPolicyAutomation
|
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
|
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
|
refs/heads/master
| 2020-04-10T02:14:08.789751
| 2019-05-16T19:29:11
| 2019-05-16T19:29:11
| 160,739,088
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 529
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.google.android.gms.internal.measurement;
// Referenced classes of package com.google.android.gms.internal.measurement:
// zzte
abstract class zztn extends zzte
{
zztn()
{
// 0 0:aload_0
// 1 1:invokespecial #8 <Method void zzte()>
// 2 4:return
}
abstract boolean zza(zzte zzte1, int i, int j);
}
|
[
"silenta237@gmail.com"
] |
silenta237@gmail.com
|
4f82cef559897ff4ad4371d36436dd10b665c4d5
|
1537fc7453cdc7a64cde072ba4b458a22e402e44
|
/sqlite/src/main/java/kelijun/com/sqlite/annotation/sqlite/Table.java
|
011bf213561c21a6ecfa74702b0f4a47aeed8e96
|
[] |
no_license
|
447857062/notes
|
c2d57fe80c63d9820406fc729477b4e05fa55b70
|
30284d613e6aeca40fd78caa39758f8dcd76561b
|
refs/heads/master
| 2020-03-21T01:48:54.674587
| 2018-06-20T09:28:37
| 2018-06-20T09:28:37
| 137,964,195
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 963
|
java
|
/**
* Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kelijun.com.sqlite.annotation.sqlite;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Table {
public String name();
}
|
[
"447857062@qq.com"
] |
447857062@qq.com
|
0a5468d9c2d06f258f12fd9e0be78fb4b47babaf
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_9ed7bff6d138561751c6a01f1d973103d6b4b1cf/InputNormalizer/10_9ed7bff6d138561751c6a01f1d973103d6b4b1cf_InputNormalizer_s.java
|
6b46c9bb888f6faf1168f5bff7c53195e60c2b4f
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 6,939
|
java
|
/*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version. You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.aitools.programd.util;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.ListIterator;
/**
* <code>InputNormalizer</code> replaces <code>Substituter</code> as the
* utility class for performing various stages of <a
* href="http://aitools.org/aiml/TR/2001/WD-aiml/#section-input-normalization">input
* normalization </a>. Substitutions of other types are now handled
* independently by their respective processors.
*
* @since 4.1.3
*/
public class InputNormalizer
{
// Convenience constants.
/** An empty string. */
private static final String EMPTY_STRING = "";
/**
* Splits an input into sentences, as defined by the
* <code>sentenceSplitters</code>.
*
* @param sentenceSplitters the sentence splitters to use
* @param input the input to split
* @return the input split into sentences
*/
public static List<String> sentenceSplit(List<String> sentenceSplitters, String input)
{
List<String> result = Collections.checkedList(new ArrayList<String>(), String.class);
int inputLength = input.length();
if (inputLength == 0)
{
result.add(EMPTY_STRING);
return result;
}
// This will hold the indices of all splitters in the input.
ArrayList<Integer> splitterIndices = new ArrayList<Integer>();
// Iterate over all the splitters.
for (String splitter : sentenceSplitters)
{
// Look for it in the input.
int index = input.indexOf(splitter);
// As long as it exists,
while (index != -1)
{
// add its index to the list of indices.
splitterIndices.add(new Integer(index));
// and look for it again starting just after the discovered
// index.
index = input.indexOf(splitter, index + 1);
}
}
if (splitterIndices.size() == 0)
{
result.add(input);
return result;
}
// Sort the list of indices.
Collections.sort(splitterIndices);
// Iterate through the indices and remove (all previous of) consecutive
// values.
ListIterator indices = splitterIndices.listIterator();
int previousIndex = ((Integer) indices.next()).intValue();
while (indices.hasNext())
{
int nextIndex = ((Integer) indices.next()).intValue();
if (nextIndex == previousIndex + 1)
{
indices.previous();
indices.previous();
indices.remove();
}
previousIndex = nextIndex;
}
// Now iterate through the remaining indices and split sentences.
indices = splitterIndices.listIterator();
int startIndex = 0;
int endIndex = inputLength - 1;
while (indices.hasNext())
{
endIndex = ((Integer) indices.next()).intValue();
result.add(input.substring(startIndex, endIndex + 1).trim());
startIndex = endIndex + 1;
}
// Add whatever remains.
if (startIndex < inputLength - 1)
{
result.add(input.substring(startIndex).trim());
}
return result;
}
/**
* <p>
* Performs <a
* href="http://aitools.org/aiml/TR/2001/WD-aiml/#section-pattern-fitting-normalizations">pattern-fitting
* </a> normalization on an input.
* </p>
* <p>
* This is best used to produce a caseless representation of the effective
* match string when presenting match results to a user; however, if used
* when actually performing the match it will result in the case of
* wildcard-captured values being lost. Some amendment of the specification
* is probably in order.
* </p>
*
* @param input the string to pattern-fit
* @return the pattern-fitted input
*/
public static String patternFit(String input)
{
// Remove all tags.
input = XMLKit.removeMarkup(input);
StringCharacterIterator iterator = new StringCharacterIterator(input);
StringBuffer result = new StringBuffer(input.length());
// Iterate over the input.
for (char aChar = iterator.first(); aChar != CharacterIterator.DONE; aChar = iterator.next())
{
// Replace non-letters/digits with a space.
if (!Character.isLetterOrDigit(aChar) && aChar != '*' && aChar != '_')
{
result.append(' ');
}
else
{
result.append(Character.toUpperCase(aChar));
}
}
return XMLKit.filterWhitespace(result.toString());
}
/**
* <p>
* Performs a partial <a
* href="http://aitools.org/aiml/TR/2001/WD-aiml/#section-pattern-fitting-normalizations">pattern-fitting
* </a> normalization on an input -- partial because it does <i>not </i>
* convert letters to uppercase.
* </p>
* <p>
* This is used when sending patterns to the Graphmaster so that wildcard
* contents can be captured and case retained. Some amendment of the
* specification is probably in order.
* </p>
*
* @param input the string to pattern-fit
* @return the pattern-fitted input
*/
public static String patternFitIgnoreCase(String input)
{
// Remove all tags.
input = XMLKit.removeMarkup(input);
StringCharacterIterator iterator = new StringCharacterIterator(input);
StringBuffer result = new StringBuffer(input.length());
// Iterate over the input.
for (char aChar = iterator.first(); aChar != CharacterIterator.DONE; aChar = iterator.next())
{
// Replace non-letters/digits with a space.
if (!Character.isLetterOrDigit(aChar))
{
result.append(' ');
}
else
{
result.append(aChar);
}
}
return XMLKit.filterWhitespace(result.toString());
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
bbfc308841ca1f0d484909ba2546530a8c208459
|
6b340ab44fa80e4ce15691126e02024b9c95c2b8
|
/teams/lazer1/BasePlayer.java
|
3c43cff9351612fbcab4a8e48b2769d6d5d1df82
|
[] |
no_license
|
Cixelyn/bcode2010
|
2ad2cd364cc20cdbf3df4d4ea404d01c8b226b2a
|
12d10f142c20ba136f179045403c200137ee081c
|
refs/heads/master
| 2022-11-14T22:27:23.721239
| 2020-06-29T04:21:34
| 2020-06-29T04:21:34
| 275,728,597
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 235
|
java
|
package lazer1;
import battlecode.common.*;
public abstract class BasePlayer implements Runnable{
protected final RobotController rc;
//Constructor
public BasePlayer(RobotController r) {
this.rc = r;
}
}
|
[
"51144+Cixelyn@users.noreply.github.com"
] |
51144+Cixelyn@users.noreply.github.com
|
311f8d5af5aa8507c5f10939589fc30cf1b80307
|
9ab91b074703bcfe9c9407e1123e2b551784a680
|
/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/matrix/Matrix.java
|
fdf4b6fee01a6ec4a6202e6a349f97a7cddd1bc9
|
[] |
no_license
|
pkdevbox/osee
|
7ad9c083c3df8a7e9ef6185a419680cc08e21769
|
7e31f80f43d6d0b661af521fdd93b139cb694001
|
refs/heads/master
| 2021-01-22T00:30:05.686402
| 2015-06-08T21:19:57
| 2015-06-09T18:42:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,515
|
java
|
/*******************************************************************************
* Copyright (c) 2004, 2007 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.framework.ui.skynet.util.matrix;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
/**
* Creates HTML matrix
*
* @author Donald G. Dunne
*/
public class Matrix {
private final String title;
private final ArrayList<MatrixItem> items;
private final Map<String, MatrixItem> nameToItem = new HashMap<String, MatrixItem>();
private final Set<String> values = new HashSet<String>();
private final Map<String, Set<String>> nameToValues = new HashMap<String, Set<String>>();
// Names with no values will be listed at the bottom of the report so they don't take up space
private final Set<String> noValueNames = new HashSet<String>();
private boolean useNameAsMark = false;
private IProgressMonitor monitor;
public Matrix(String title, ArrayList<MatrixItem> items) {
this.title = title;
this.items = items;
}
public String getMatrix() {
StringBuilder sb = new StringBuilder();
sb.append(AHTML.heading(3, title));
sb.append(getMatrixBody());
return sb.toString();
}
private void processData() {
for (MatrixItem item : items) {
nameToItem.put(item.getName(), item);
values.addAll(item.getValues());
if (nameToValues.containsKey(item.getName())) {
Set<String> vals = nameToValues.get(item.getName());
vals.addAll(item.getValues());
nameToValues.remove(item.getName());
nameToValues.put(item.getName(), vals);
} else {
nameToValues.put(item.getName(), item.getValues());
}
}
}
private String getMatrixBody() {
processData();
StringBuilder sb = new StringBuilder();
sb.append(AHTML.beginMultiColumnTable(100, 1));
// Determine all the names to deal with
Set<String> names = new HashSet<String>();
// Don't want to take up valuable table space with names that have no values; keep track
// of them and print them at the end of the report
for (String name : nameToItem.keySet()) {
System.out.println("nameToValues.get(name) *" + nameToValues.get(name) + "*");
if (nameToValues.get(name) == null || nameToValues.get(name).isEmpty()) {
noValueNames.add(name);
} else {
names.add(name);
}
}
// Create sortedNames for use in looping through
String[] sortedNames = names.toArray(new String[names.size()]);
Arrays.sort(sortedNames);
// Create headerNames with one more field due to value name column
names.add(" ");
String[] headerNames = names.toArray(new String[names.size()]);
Arrays.sort(headerNames);
// Add header names to table
sb.append(AHTML.addHeaderRowMultiColumnTable(headerNames));
int x = 1;
// Create sorted list of values
String[] sortedValues = values.toArray(new String[values.size()]);
Arrays.sort(sortedValues);
for (String value : sortedValues) {
String str = String.format("Processing %s/%s \"%s\"", x++ + "", values.size(), value);
System.out.println(str);
if (monitor != null) {
monitor.subTask(str);
}
List<String> marks = new ArrayList<String>();
marks.add(value);
for (String name : sortedNames) {
if (nameToValues.get(name) != null && nameToValues.get(name).contains(value)) {
marks.add(useNameAsMark ? name : "X");
} else {
marks.add(".");
}
}
String[] colOptions = new String[marks.size()];
int i = 0;
colOptions[i] = "";
for (i = 1; i < marks.size(); i++) {
colOptions[i] = " align=center";
}
sb.append(AHTML.addRowMultiColumnTable(marks.toArray(new String[marks.size()]), colOptions));
}
sb.append(AHTML.endMultiColumnTable());
if (noValueNames.size() > 0) {
sb.append(AHTML.newline(2) + AHTML.bold("Items with no values: "));
String[] sortedItems = noValueNames.toArray(new String[noValueNames.size()]);
Arrays.sort(sortedItems);
for (String str : sortedItems) {
sb.append(AHTML.newline() + str);
}
sb.append(AHTML.newline());
}
return sb.toString();
}
/**
* @return Returns the useNameAsMark.
*/
public boolean isUseNameAsMark() {
return useNameAsMark;
}
/**
* @param useNameAsMark The useNameAsMark to set.
*/
public void setUseNameAsMark(boolean useNameAsMark) {
this.useNameAsMark = useNameAsMark;
}
public IProgressMonitor getMonitor() {
return monitor;
}
public void setMonitor(IProgressMonitor monitor) {
this.monitor = monitor;
}
}
|
[
"rbrooks@ee007c2a-0a25-0410-9ab9-bf268980928c"
] |
rbrooks@ee007c2a-0a25-0410-9ab9-bf268980928c
|
49dbc1dcf81ab6ca597bc5ad453ed010b81e0d94
|
c6479c5e410edf461e98d76532c64b7d50aadbc4
|
/app/src/main/java/com/freak/android/getpricturedemo/MainActivity.java
|
ecf9b271e92cbf99e8dd79411b38f141378c5fbf
|
[] |
no_license
|
freakcsh/GetPrictureDemo
|
ed22c2dbf559d0d297edac96d9f2804d523d81ba
|
3aa4eb3c80ff9745b1f40e03587eed51e4fa3b50
|
refs/heads/master
| 2020-03-22T17:19:26.062523
| 2018-07-10T06:40:26
| 2018-07-10T06:40:26
| 140,388,420
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,641
|
java
|
package com.freak.android.getpricturedemo;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends AppCompatActivity {
private Button btn_select;
private ImageView img_text;
private File userImgFile;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btn_select = findViewById(R.id.btn_select);
img_text = findViewById(R.id.img_text);
btn_select.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
selectImgPop();
}
});
}
public void selectImgPop() {
PopupGetPictureView popupGetPictureView = new PopupGetPictureView(this, new
PopupGetPictureView.GetPicture() {
@Override
public void takePhoto(View v) {
if (PermissionUtils.checkTakePhotoPermission(MainActivity.this)) {
userImgFile = GetPictureUtils.takePicture(MainActivity.this, IETConstant.GETPICTURE_TAKEPHOTO);
}
}
@Override
public void selectPhoto(View v) {
if (PermissionUtils.checkAlbumStroagePermission(MainActivity.this)) {
GetPictureUtils.selectPhoto(MainActivity.this, IETConstant.GETPICTURE_SELECTPHOTO);
}
}
});
popupGetPictureView.showPop(btn_select);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == 0) {
return;
}
switch (requestCode) {
//拍照
case IETConstant.GETPICTURE_TAKEPHOTO:
userImgFile = GetPictureUtils.cutPicture(MainActivity.this, userImgFile);
break;
//选择照片
case IETConstant.GETPICTURE_SELECTPHOTO:
userImgFile = GetPictureUtils.getPhotoFromIntent(data, MainActivity.this);
userImgFile = GetPictureUtils.cutPicture(MainActivity.this, userImgFile);
break;
//裁剪照片
case IETConstant.CUT_PHOTO:
if (resultCode == Activity.RESULT_OK) {
compressAndcommitImg(userImgFile);
}
break;
default:
break;
}
}
public void compressAndcommitImg(File file) {
List<File> list = new ArrayList<>();
list.add(file);
BitmapUtil.compressFiles(list, new BitmapUtil.CompressImageResponse() {
@Override
public void onSuccess(List<File> imgs) {
File imgFile = imgs.get(0);
Uri uri = Uri.fromFile(imgFile);
img_text.setImageURI(uri);
}
@Override
public void onDo() {
// showLoading(view.getMContext());
}
@Override
public void onFail() {
}
@Override
public void onFinish() {
}
});
}
}
|
[
"740997937@qq.com"
] |
740997937@qq.com
|
d1bb37c437b81fae0d22876a55020e3928b14005
|
2ecc1746690170cd0b1e91db571b6e6b23b7a594
|
/GDCL-VLOCAL/Hibernate One-to-Many Mapping Project/src/str/ForOurLogic.java
|
bd87029bc4638db8a11482cbaa6cd572c3ea41b4
|
[] |
no_license
|
vinoth2426/JavaTrainingNotes
|
44e6f6d76240773cb512e82abd1adf1fd2b28122
|
78f146c939ae7a821bbfb31fdb996e6fc2fee98a
|
refs/heads/master
| 2020-03-18T06:37:58.848127
| 2019-03-26T10:56:54
| 2019-03-26T10:56:54
| 134,406,744
| 0
| 0
| null | 2018-05-22T12:04:28
| 2018-05-22T11:41:30
| null |
UTF-8
|
Java
| false
| false
| 1,213
|
java
|
package str;
import java.util.HashSet;
import java.util.Set;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.AnnotationConfiguration;
public class ForOurLogic {
public static void main(String[] args)
{
AnnotationConfiguration cfg = new AnnotationConfiguration();
cfg.configure("hibernate.cfg.xml");
SessionFactory factory = new AnnotationConfiguration().configure().buildSessionFactory();
Session session = factory.openSession();
Vendor v=new Vendor();
v.setVendorId(100);
v.setVendorName("java4s");
Customers c1=new Customers();
c1.setCustomerId(500);
c1.setCustomerName("customer1");
Customers c2=new Customers();
c2.setCustomerId(501);
c2.setCustomerName("customer2");
Set s=new HashSet();
s.add(c1);
s.add(c2);
v.setChildren(s);
Transaction tx=session.beginTransaction();
session.save(v);
tx.commit();
session.close();
System.out.println("One to Many Annotatios Done...!!!!!!");
factory.close();
}
}
|
[
"email@gmail.com"
] |
email@gmail.com
|
3e00e1369edbf99ec7e6a375cd8605e5e2c3f57e
|
e4aea93f2988e2cf1be4f96a39f6cc3328cbbd50
|
/src/org/agilemore/agilegrid/a/i.java
|
49b07cfa7ec5f8c1e45634e961e92d49efe66b19
|
[] |
no_license
|
lannerate/ruleBuilder
|
18116282ae55e9d56e9eb45d483520f90db4a1a6
|
b5d87495990aa1988adf026366e92f7cbb579b19
|
refs/heads/master
| 2016-09-05T09:13:43.879603
| 2013-11-10T08:32:58
| 2013-11-10T08:32:58
| 14,231,127
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 458
|
java
|
package org.agilemore.agilegrid.a;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
class i extends KeyAdapter
{
i(g paramg)
{
}
public void keyReleased(KeyEvent paramKeyEvent)
{
if (paramKeyEvent.character == '\033')
g.d(this.a);
}
}
/* Location: D:\Dev_tools\ruleEngine\rbuilder.jar
* Qualified Name: org.agilemore.agilegrid.a.i
* JD-Core Version: 0.6.0
*/
|
[
"zhanghuizaizheli@hotmail.com"
] |
zhanghuizaizheli@hotmail.com
|
665d3c537c03dcaf2069edd60d797e74b12f29d3
|
0d4a2464c0fec2288f868cc19f76bc377c9ad24f
|
/shopping_protal/shopping_protal_web/src/main/java/com/shopping/shopping_protal_web/vo/LoginVo.java
|
4e6c6180ea6b08d0d4279f934c89558bb0b54b37
|
[] |
no_license
|
albertmaxwell/NewShopping
|
b940b07b9457d690a610f3dca07e78f97eb26637
|
c5ded1845404c7de1c53e57b8cb9be302c3911e1
|
refs/heads/master
| 2022-07-16T09:03:37.686020
| 2019-12-20T10:37:34
| 2019-12-20T10:37:34
| 202,852,094
| 0
| 0
| null | 2022-06-29T17:37:08
| 2019-08-17T07:51:39
|
HTML
|
UTF-8
|
Java
| false
| false
| 682
|
java
|
package com.shopping.shopping_protal_web.vo;
import io.swagger.annotations.ApiModelProperty;
/**
* @author 金海洋
* @date 2019/8/18 -22:54
*/
public class LoginVo {
//用户账号
@ApiModelProperty(value = "用户账号", required = true, example = "jinhiayng")
public String username;
//用户密码
@ApiModelProperty(value = "用户密码", required = true, example = "123456")
public String password;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
|
[
"jhy..1008611"
] |
jhy..1008611
|
53bdeb638bb106a750dcd8a4930cebc48f283881
|
ff3cf0b03f5424778f80a6bd6ca9bb3fcbcd1ac1
|
/src/opt/easyjmetal/util/distance/DistanceNodeComparator.java
|
447a15ae88ec5bcb808b82ac3543df108cda9e2e
|
[] |
no_license
|
jack13163/OilScheduleOperationPlatform
|
c3a395777d137e0f9c0edc39ddc849630cf16511
|
ae69f4e465b21d130d0b92ddbac44d5d38d3089b
|
refs/heads/master
| 2022-12-21T13:42:49.162696
| 2021-03-25T01:44:57
| 2021-03-25T01:44:57
| 197,735,331
| 3
| 3
| null | 2022-12-16T05:00:31
| 2019-07-19T08:35:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,949
|
java
|
// DistanceNodeComparator.java
//
// Author:
// Antonio J. Nebro <antonio@lcc.uma.es>
// Juan J. Durillo <durillo@lcc.uma.es>
//
// Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package opt.easyjmetal.util.distance;
import java.util.Comparator;
/**
* This class implements a <code>Comparator</code> to compare instances of
* <code>DistanceNode</code>.
*/
public class DistanceNodeComparator implements Comparator {
/**
* Compares two <code>DistanceNode</code>.
*
* @param o1 Object representing a DistanceNode
* @param o2 Object representing a DistanceNode
* @return -1 if the distance of o1 is smaller than the distance of o2,
* 0 if the distance of both are equals, and
* 1 if the distance of o1 is bigger than the distance of o2
*/
@Override
public int compare(Object o1, Object o2) {
DistanceNode node1 = (DistanceNode) o1;
DistanceNode node2 = (DistanceNode) o2;
double distance1, distance2;
distance1 = node1.getDistance();
distance2 = node2.getDistance();
if (distance1 < distance2) {
return -1;
} else if (distance1 > distance2) {
return 1;
} else {
return 0;
}
}
}
|
[
"18163132129@163.com"
] |
18163132129@163.com
|
c5328933ae14cc7fc6479b9802ab157c172c907b
|
9d2809ee4669e3701884d334c227c68a24c5787f
|
/marketingcenter/marketing-core/src/main/java/com/mockuai/marketingcenter/core/service/action/coupon/GrantActivityCouponBatchAction.java
|
abc87f75de6da4cabf3a37a7fffdfdecba2103f8
|
[] |
no_license
|
vinfai/hy_project
|
5370367876fe6bcb4109f2af9391b9d817c320b5
|
8fd99f23cf83b1b3f7bec9560fbd2edc46621d0b
|
refs/heads/master
| 2021-01-19T00:58:26.436196
| 2017-03-01T16:47:22
| 2017-03-01T16:49:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,311
|
java
|
//package com.mockuai.marketingcenter.core.service.action.coupon;
//
//import com.mockuai.marketingcenter.common.api.MarketingResponse;
//import com.mockuai.marketingcenter.common.constant.ActionEnum;
//import com.mockuai.marketingcenter.common.constant.ActivityCouponStatus;
//import com.mockuai.marketingcenter.common.constant.CouponType;
//import com.mockuai.marketingcenter.common.constant.ResponseCode;
//import com.mockuai.marketingcenter.common.constant.UserCouponStatus;
//import com.mockuai.marketingcenter.common.domain.dto.GrantCouponInfoDTO;
//import com.mockuai.marketingcenter.common.domain.qto.GrantedCouponQTO;
//import com.mockuai.marketingcenter.core.domain.ActivityCouponDO;
//import com.mockuai.marketingcenter.core.domain.GrantedCouponDO;
//import com.mockuai.marketingcenter.core.domain.MarketActivityDO;
//import com.mockuai.marketingcenter.core.exception.MarketingException;
//import com.mockuai.marketingcenter.core.manager.ActivityCouponManager;
//import com.mockuai.marketingcenter.core.manager.GrantedCouponManager;
//import com.mockuai.marketingcenter.core.manager.MarketActivityManager;
//import com.mockuai.marketingcenter.core.service.RequestContext;
//import com.mockuai.marketingcenter.core.service.action.TransAction;
//import org.apache.commons.lang3.time.DateUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//
//import java.util.ArrayList;
//import java.util.Date;
//import java.util.List;
//
///**
// * Created by edgar.zr on 7/15/2016.
// */
//@Controller
//public class GrantActivityCouponBatchAction extends TransAction {
//
// @Autowired
// private MarketActivityManager marketActivityManager;
// @Autowired
// private ActivityCouponManager activityCouponManager;
// @Autowired
// private GrantedCouponManager grantedCouponManager;
//
// @Override
// protected MarketingResponse doTransaction(RequestContext context) throws MarketingException {
//
// List<GrantCouponInfoDTO> grantCouponInfoDTOs = (List<GrantCouponInfoDTO>) context.getRequest().getParam("grantCouponInfoDTOs");
// String bizCode = (String) context.get("bizCode");
//
// ActivityCouponDO activityCouponDO = activityCouponManager.getActivityCoupon(activityCouponId, null, bizCode);
//
// if (activityCouponDO.getCouponType().intValue() != CouponType.TYPE_NO_CODE.getValue())
// return new MarketingResponse(ResponseCode.BIZ_E_NOT_THE_SAME_COUPON_TYPE);
//
// // 失效的优惠券
// if (activityCouponDO.getStatus().intValue() == ActivityCouponStatus.INVALID.getValue().intValue()) {
// LOGGER.error("can not grant the activity coupon because of valid status of the coupon, activityCouponId : {}",
// activityCouponId);
// return new MarketingResponse(ResponseCode.BIZ_E_ACTIVITY_COUPON_STATUS_ILLEGAL);
// }
//
// MarketActivityDO marketActivityDO =
// marketActivityManager.getActivity(activityCouponDO.getActivityId().longValue(), bizCode);
//
// Date now = new Date();
// if ((now.compareTo(marketActivityDO.getEndTime()) > 0)) {
// return new MarketingResponse(ResponseCode.BIZ_ACTIVITY_COUPON_OVER);
// }
//
// // TODO 判断当前优惠券数量以及发放优惠券需要放到一个事务中处理,避免多个用户争取同一个优惠券的时候出现问题,
// // 发放量不能超过总量
// if (activityCouponDO.getTotalCount().longValue() != -1
// && activityCouponDO.getGrantedCount().longValue() + num > activityCouponDO.getTotalCount().longValue()) {
// return new MarketingResponse(ResponseCode.NO_ENOUGH_COUPON);
// }
//
// // 每个用户的领取不能超过单人限量
// GrantedCouponQTO grantedCouponQTO = new GrantedCouponQTO();
// grantedCouponQTO.setCouponId(activityCouponDO.getId());
// grantedCouponQTO.setReceiverId(receiverId);
//
// // 查询所有的该用户在指定优惠券下领的数量,不区分优惠券的状态
// Integer countOfReceived = grantedCouponManager.queryGrantedCouponCount(grantedCouponQTO);
//
// if (activityCouponDO.getUserReceiveLimit().intValue() != 0
// && countOfReceived.intValue() >= activityCouponDO.getUserReceiveLimit().intValue()) {
// return new MarketingResponse(ResponseCode.ACTIVITY_COUPON_RECEIVED_OUT_OF_LIMIT);
// }
//
// grantCoupon(receiverId, num, activityCouponDO, bizCode, marketActivityDO);
//
// int opNum = activityCouponManager.increaseGrantedCount(
// activityCouponId.longValue(), activityCouponDO.getActivityCreatorId(), num);
//
// if (opNum < 1) {
// LOGGER.error("error of increaseGrantedCount, activityCountId : {}, creatorId : {}, num : {}",
// activityCouponId, 0, num);
// return new MarketingResponse(ResponseCode.SERVICE_EXCEPTION);
// }
//
// activityCouponManager.increaseUserCountOfGranted(activityCouponId, receiverId, bizCode);
//
// return null;
// }
// private void grantCoupon(Long userId, Integer count, ActivityCouponDO activityCouponDO,
// String bizCode, MarketActivityDO marketActivityDO) throws MarketingException {
//
// List grantedCouponList = new ArrayList();
// Date invalidTime = activityCouponDO.getValidDuration() != null
// ? DateUtils.addDays(new Date(), activityCouponDO.getValidDuration()) : null;
// for (int i = 0; i < count; i++) {
// GrantedCouponDO grantedCoupon = new GrantedCouponDO();
// grantedCoupon.setCouponId(activityCouponDO.getId());
// grantedCoupon.setCouponCreatorId(marketActivityDO.getCreatorId());
// grantedCoupon.setGranterId(marketActivityDO.getCreatorId());
// grantedCoupon.setReceiverId(userId);
// grantedCoupon.setStatus(UserCouponStatus.UN_USE.getValue());
// grantedCoupon.setActivityId(activityCouponDO.getActivityId());
// grantedCoupon.setActivityCreatorId(activityCouponDO.getActivityCreatorId());
// grantedCoupon.setEndTime(marketActivityDO.getEndTime());
// grantedCoupon.setStartTime(marketActivityDO.getStartTime());
// grantedCoupon.setBizCode(bizCode);
// grantedCoupon.setToolCode(marketActivityDO.getToolCode());
// grantedCoupon.setInvalidTime(invalidTime);
// grantedCouponList.add(grantedCoupon);
// }
//
// grantedCouponManager.batchAddGrantedCoupon(grantedCouponList);
// }
// @Override
// public String getName() {
// return ActionEnum.GRANT_ACTIVITY_COUPON_BATCH.getActionName();
// }
//}
|
[
"1147478866@qq.com"
] |
1147478866@qq.com
|
831eab3c913aa4e5690501c5df01ad1a437c4fb7
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-422-8-1-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/parser/wikimodel/DefaultXWikiGeneratorListener_ESTest.java
|
cf1681cc7fa77bbb3a12d489b1ea338ad71c7e7f
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 610
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Apr 08 17:42:30 UTC 2020
*/
package org.xwiki.rendering.internal.parser.wikimodel;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultXWikiGeneratorListener_ESTest extends DefaultXWikiGeneratorListener_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
0294a570d6c5ec95a36b003706fe92adee3a992b
|
86fa67369e29c0086601fad2d5502322f539a321
|
/subprojects/kernel/doovos-kernel-vanilla/src/org/doovos/kernel/vanilla/jvm/interpreter/switchinterpreter/instr/KJVM_I2L.java
|
79f16570ece0b1d61e4f2f981d7a5b017e641da0
|
[] |
no_license
|
thevpc/doovos
|
05a4ce98825bf3dbbdc7972c43cd15fc18afdabb
|
1ae822549a3a546381dbf3b722814e0be1002b11
|
refs/heads/master
| 2021-01-12T14:56:52.283641
| 2020-08-22T12:37:40
| 2020-08-22T12:37:40
| 72,081,680
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,693
|
java
|
///**
// * ====================================================================
// * Doovos (Distributed Object Oriented Operating System)
// *
// * Doovos is a new Open Source Distributed Object Oriented Operating System
// * Design and implementation based on the Java Platform.
// * Actually, it is a try for designing a distributed operation system in
// * top of existing centralized/network OS.
// * Designed OS will follow the object oriented architecture for redefining
// * all OS resources (memory,process,file system,device,...etc.) in a highly
// * distributed context.
// * Doovos is also a distributed Java virtual machine that implements JVM
// * specification on top the distributed resources context.
// *
// * Doovos Kernel is the heart of Doovos OS. It implements also the Doovos JVM
// * Doovos Kernel code is executed on host JVM
// *
// * Copyright (C) 2008-2010 Taha BEN SALAH
// *
// * This program is free software; you can redistribute it and/or modify
// * it under the terms of the GNU General Public License as published by
// * the Free Software Foundation; either version 2 of the License, or
// * (at your option) any later version.
// *
// * This program is distributed in the hope that it will be useful,
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// * GNU General Public License for more details.
// *
// * You should have received a copy of the GNU General Public License along
// * with this program; if not, write to the Free Software Foundation, Inc.,
// * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
// * ====================================================================
// */
//package org.doovos.kernel.vanilla.jvm.interpreter.switchinterpreter.instr;
//
//import org.doovos.kernel.api.jvm.bytecode.KOperator;
//import org.doovos.kernel.api.jvm.interpreter.KFrame;
//import org.doovos.kernel.api.jvm.reflect.KInstruction;
//import org.doovos.kernel.api.jvm.reflect.KMethod;
//import org.doovos.kernel.api.memory.KLong;
//import org.doovos.kernel.api.process.KProcess;
//import org.doovos.kernel.vanilla.jvm.interpreter.jitsrcinterpreter.JITContext;
//import org.doovos.kernel.vanilla.jvm.interpreter.jitsrcinterpreter.JITJavaSource;
//import org.doovos.kernel.vanilla.jvm.interpreter.jitsrcinterpreter.JITJavaSourceImpl;
//
//import java.rmi.RemoteException;
//
///**
// * Created by IntelliJ IDEA.
// * User: vpc
// * Date: 22 févr. 2009
// * Time: 14:21:52
// * To change this template use File | Settings | File Templates.
// */
//public final class KJVM_I2L extends KInstructionSwitch implements Cloneable {
// public static final KJVM_I2L INSTANCE = new KJVM_I2L();
// protected KInstruction next;
//
// private KJVM_I2L() {
// super(KOperator.I2L);
// }
//
// public int run(KFrame frame) throws RemoteException {
// frame.push(new KLong(frame.popInt()));
// return KProcess.NEXT_STATEMENT;
// }
//
// public KInstruction runDirect(KFrame frame) throws RemoteException {
// frame.push(new KLong(frame.popInt()));
// frame.setInstruction(ordinal + 1);
// return next;
// }
//
// public void relink(int index, KInstruction[] code, KMethod method) {
// this.ordinal = index;
// this.next = code[index + 1];
// }
//
// public JITJavaSource toJITJavaSource(JITContext jitContext) {
// return new JITJavaSourceImpl(
// null,
// null, null,
// " " + jitContext.pushConsumed("new KLong(" + jitContext.popInt() + ")")
// , null, null, null
// );
// }
//
//
//}
|
[
"taha.bensalah@gmail.com"
] |
taha.bensalah@gmail.com
|
19ac0bcba6b185ff225ea01521c4074857be9ee0
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/MOCKITO-16b-2-17-Single_Objective_GGA-WeightedSum/org/mockito/internal/MockitoCore_ESTest_scaffolding.java
|
6a9ec85b5fd255d9b244ae36dc226fca1064bec5
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,050
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Mar 31 12:27:59 UTC 2020
*/
package org.mockito.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class MockitoCore_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.mockito.internal.MockitoCore";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MockitoCore_ESTest_scaffolding.class.getClassLoader() ,
"org.mockito.cglib.proxy.Callback",
"org.mockito.configuration.AnnotationEngine",
"org.mockito.exceptions.misusing.UnfinishedVerificationException",
"org.mockito.exceptions.Reporter",
"org.mockito.exceptions.verification.VerificationInOrderFailure",
"org.mockito.configuration.DefaultMockitoConfiguration",
"org.mockito.exceptions.misusing.NullInsteadOfMockException",
"org.mockito.stubbing.VoidMethodStubbable",
"org.mockito.internal.util.StringJoiner",
"org.mockito.exceptions.misusing.NotAMockException",
"org.mockito.internal.progress.MockingProgress",
"org.mockito.internal.util.MockitoLogger",
"org.mockito.exceptions.misusing.MissingMethodInvocationException",
"org.mockito.exceptions.verification.SmartNullPointerException",
"org.mockito.exceptions.verification.TooLittleActualInvocations",
"org.mockito.internal.progress.MockingProgressImpl",
"org.mockito.internal.configuration.GlobalConfiguration",
"org.mockito.stubbing.DeprecatedOngoingStubbing",
"org.mockito.cglib.proxy.MethodInterceptor",
"org.mockito.internal.reporting.PrintingFriendlyInvocation",
"org.mockito.exceptions.verification.TooManyActualInvocations",
"org.mockito.exceptions.verification.ArgumentsAreDifferent",
"org.mockito.exceptions.misusing.MockitoConfigurationException",
"org.mockito.internal.progress.IOngoingStubbing",
"org.hamcrest.SelfDescribing",
"org.mockito.configuration.MockitoConfiguration",
"org.mockito.exceptions.misusing.InvalidUseOfMatchersException",
"org.mockito.internal.invocation.Invocation",
"org.mockito.exceptions.misusing.UnfinishedStubbingException",
"org.mockito.internal.debugging.DebuggingInfo",
"org.mockito.exceptions.verification.NoInteractionsWanted",
"org.mockito.internal.MockitoCore",
"org.mockito.exceptions.PrintableInvocation",
"org.mockito.internal.configuration.ClassPathLoader",
"org.mockito.exceptions.base.MockitoException",
"org.mockito.stubbing.Stubber",
"org.mockito.internal.exceptions.base.ConditionalStackTraceFilter",
"org.mockito.stubbing.Answer",
"org.mockito.internal.exceptions.base.StackTraceFilter",
"org.mockito.invocation.InvocationOnMock",
"org.mockito.internal.progress.ArgumentMatcherStorageImpl",
"org.mockito.exceptions.verification.WantedButNotInvoked",
"org.mockito.internal.progress.ThreadSafeMockingProgress",
"org.mockito.internal.verification.api.VerificationMode",
"org.mockito.configuration.IMockitoConfiguration",
"org.mockito.InOrder",
"org.mockito.internal.MockitoInvocationHandler",
"org.mockito.exceptions.misusing.WrongTypeOfReturnValue",
"org.mockito.MockSettings",
"org.mockito.stubbing.OngoingStubbing",
"org.mockito.internal.progress.ArgumentMatcherStorage",
"org.mockito.exceptions.base.MockitoAssertionError",
"org.mockito.internal.util.MockUtil",
"org.mockito.exceptions.verification.NeverWantedButInvoked",
"org.mockito.internal.util.CreationValidator",
"org.hamcrest.Matcher"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
685965e2fdd961ff2c73c830b0e2dae45218b633
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/tests-without-trycatch/Jsoup-87/org.jsoup.parser.Tag/BBC-F0-opt-30/19/org/jsoup/parser/Tag_ESTest_scaffolding.java
|
2f195f5f90cc28a22997295454eed635dc020163
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 4,490
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Oct 20 17:32:23 GMT 2021
*/
package org.jsoup.parser;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class Tag_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.jsoup.parser.Tag";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Tag_ESTest_scaffolding.class.getClassLoader() ,
"org.jsoup.helper.Validate",
"org.jsoup.parser.ParseSettings",
"org.jsoup.parser.Tag",
"org.jsoup.internal.Normalizer"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Tag_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.jsoup.helper.Validate",
"org.jsoup.parser.Tag",
"org.jsoup.parser.ParseSettings",
"org.jsoup.internal.Normalizer",
"org.jsoup.nodes.Attributes",
"org.jsoup.nodes.Attributes$Dataset",
"org.jsoup.internal.StringUtil",
"org.jsoup.nodes.Node",
"org.jsoup.nodes.Element",
"org.jsoup.nodes.Document",
"org.jsoup.nodes.Document$OutputSettings",
"org.jsoup.nodes.Document$OutputSettings$Syntax",
"org.jsoup.nodes.Entities",
"org.jsoup.parser.CharacterReader",
"org.jsoup.nodes.Entities$EscapeMode",
"org.jsoup.nodes.Document$QuirksMode",
"org.jsoup.nodes.Attributes$1",
"org.jsoup.nodes.Attribute",
"org.jsoup.parser.Parser",
"org.jsoup.parser.Tokeniser",
"org.jsoup.parser.ParseErrorList",
"org.jsoup.parser.TokeniserState",
"org.jsoup.parser.Token",
"org.jsoup.parser.Token$Tag",
"org.jsoup.parser.Token$StartTag",
"org.jsoup.parser.Token$TokenType",
"org.jsoup.parser.Token$EndTag",
"org.jsoup.parser.Token$Character",
"org.jsoup.parser.Token$Doctype",
"org.jsoup.parser.Token$Comment",
"org.jsoup.nodes.Entities$CoreCharset",
"org.jsoup.nodes.Entities$1",
"org.jsoup.nodes.BooleanAttribute"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
95103323f6713ed091aa864f038d3bd19cfc44d3
|
d15803d5b16adab18b0aa43d7dca0531703bac4a
|
/com/whatsapp/_v.java
|
82be0de14b9623e5d69d4f846446f1f4bec54143
|
[] |
no_license
|
kenuosec/Decompiled-Whatsapp
|
375c249abdf90241be3352aea38eb32a9ca513ba
|
652bec1376e6cd201d54262cc1d4e7637c6334ed
|
refs/heads/master
| 2021-12-08T15:09:13.929944
| 2016-03-23T06:04:08
| 2016-03-23T06:04:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 377
|
java
|
package com.whatsapp;
import android.view.View;
import android.view.View.OnClickListener;
class _v implements OnClickListener {
final NewGroup a;
_v(NewGroup newGroup) {
this.a = newGroup;
}
public void onClick(View view) {
NewGroup.a(this.a).q = NewGroup.c(this.a).getText().toString();
r.a(NewGroup.a(this.a), this.a, 12);
}
}
|
[
"gigalitelk@gmail.com"
] |
gigalitelk@gmail.com
|
b0fda76a4f9fab996cb1ac7fe76e0717ef3f61aa
|
ae225f848de06c4d96a2490c397908f1a05596c2
|
/src/main/java/urszulaslusarz/config/DefaultProfileUtil.java
|
e10c6df23ba79f3c69ba7fec5a82b92b52364a8c
|
[] |
no_license
|
UrszulaSlusarz/webapplication
|
fcf902f6823582b719dd634a8a8c218bc72d5293
|
bdd24ee499d040a9dfb70c16db8f573c51fa04f5
|
refs/heads/master
| 2021-07-05T04:56:58.104738
| 2019-02-16T07:24:51
| 2019-02-16T07:24:51
| 170,975,347
| 0
| 1
| null | 2020-09-18T17:16:07
| 2019-02-16T07:24:41
|
Java
|
UTF-8
|
Java
| false
| false
| 1,709
|
java
|
package urszulaslusarz.config;
import io.github.jhipster.config.JHipsterConstants;
import org.springframework.boot.SpringApplication;
import org.springframework.core.env.Environment;
import java.util.*;
/**
* Utility class to load a Spring profile to be used as default
* when there is no <code>spring.profiles.active</code> set in the environment or as command line argument.
* If the value is not available in <code>application.yml</code> then <code>dev</code> profile will be used as default.
*/
public final class DefaultProfileUtil {
private static final String SPRING_PROFILE_DEFAULT = "spring.profiles.default";
private DefaultProfileUtil() {
}
/**
* Set a default to use when no profile is configured.
*
* @param app the Spring application
*/
public static void addDefaultProfile(SpringApplication app) {
Map<String, Object> defProperties = new HashMap<>();
/*
* The default profile to use when no other profiles are defined
* This cannot be set in the <code>application.yml</code> file.
* See https://github.com/spring-projects/spring-boot/issues/1219
*/
defProperties.put(SPRING_PROFILE_DEFAULT, JHipsterConstants.SPRING_PROFILE_DEVELOPMENT);
app.setDefaultProperties(defProperties);
}
/**
* Get the profiles that are applied else get default profiles.
*
* @param env spring environment
* @return profiles
*/
public static String[] getActiveProfiles(Environment env) {
String[] profiles = env.getActiveProfiles();
if (profiles.length == 0) {
return env.getDefaultProfiles();
}
return profiles;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
1a081ff4583acb64f1483faa1045731ba5ce306e
|
d2f840933180c4041f5c103c041909366464661e
|
/app/src/main/java/net/coding/mart/activity/user/setting/InvoiceMainActivity.java
|
46372ce1e01e166eec3080ce29c009af0d8b2f31
|
[
"MIT"
] |
permissive
|
fenildf/Mart-Android
|
1374928522e1bcd579d05c60e5104ab33b133c7a
|
150e5d9c47d6c20ae114728115ebd6537b8bba2d
|
refs/heads/master
| 2020-03-27T14:47:35.462253
| 2018-05-21T10:22:05
| 2018-05-21T10:22:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,424
|
java
|
package net.coding.mart.activity.user.setting;
import android.widget.TextView;
import net.coding.mart.R;
import net.coding.mart.common.BackActivity;
import net.coding.mart.common.Global;
import net.coding.mart.common.widget.ListItem1;
import net.coding.mart.json.BaseObserver;
import net.coding.mart.json.Network;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.ViewById;
import java.math.BigDecimal;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
@EActivity(R.layout.activity_invoice_main)
public class InvoiceMainActivity extends BackActivity {
@ViewById
TextView invoiceAmout, textTip;
@ViewById
ListItem1 invoicing;
@AfterViews
void initInvoiceMainActivity() {
Global.addLinkCustomerService(this, textTip);
invoicing.setTextColor(0xFF999999);
Network.getRetrofit(this)
.getInvoiceAmout()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BaseObserver<BigDecimal>(this) {
@Override
public void onSuccess(BigDecimal data) {
super.onSuccess(data);
invoiceAmout.setText(data.toString());
}
});
}
}
|
[
"8206503@qq.com"
] |
8206503@qq.com
|
c843f5a26a6cde698b6c53a173adcc0b247508a1
|
b0f8b727299915423b934dbbebd589fbf95f0b60
|
/src/main/java/org/jumutang/project/weixinMng/mallMng/dao/IRegistCodeDao.java
|
7859655768a745b889c20edb60f4b8c724b9b38a
|
[] |
no_license
|
fbion/sinopecGameCt
|
a1b175fb977c134697300cd78f0851376f6dea5e
|
4c08ed3dce5f7c60aef49ca4cda637242164194c
|
refs/heads/master
| 2022-04-08T12:18:34.945863
| 2017-08-18T02:35:25
| 2017-08-18T02:35:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 382
|
java
|
package org.jumutang.project.weixinMng.mallMng.dao;
import java.util.HashMap;
import org.jumutang.project.weixinMng.mallMng.model.RegistCodeMode;
public interface IRegistCodeDao {
// 插入验证码的表
public int insertRegistCodeInfoVolume(HashMap<String, String> amap);
// 查询验证码的表
public RegistCodeMode queryRegistCodeInfo(HashMap<String, String> amap);
}
|
[
"278496708@qq.com"
] |
278496708@qq.com
|
859feddaba60771b0740045efd5c605c525926ef
|
3efc2074ee6f64c92c2e0c272153f8d602b65945
|
/Muse_Valerio/Muse/unibo/unibo/util/FrameStatistics.java
|
e00223b66d87e72094d0f523dad973f5b3228c7b
|
[] |
no_license
|
marconanni/muse3
|
80ea97e2357d42a8426ca565f179ed62ea421dfe
|
98004320df6eef09a97915c0c02b1e3146ea2bd1
|
refs/heads/master
| 2021-01-10T18:44:32.171711
| 2010-03-03T14:44:18
| 2010-03-03T14:44:18
| 34,604,347
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,374
|
java
|
package unibo.util;
import java.io.IOException;
import javax.media.Buffer;
import javax.media.MediaLocator;
import javax.media.protocol.DataSource;
import unibo.core.CircularBuffer;
import unibo.core.parser.Parser;
import unibo.core.parser.QuickTimeFileParser;
import unibo.core.thread.ParserThread;
import unibo.core.thread.TranscodeThread;
import unibo.core.transcoder.H263toYUVDecoder;
import unibo.core.transcoder.Transcode;
import unibo.core.transcoder.YUVtoH263Encoder;
import com.sun.media.ExtBuffer;
/**
* @author afalchi
*/
public class FrameStatistics {
public static void main(String[] args) {
DataSource ds=new com.sun.media.protocol.file.DataSource();
ds.setLocator(new MediaLocator("file://C:/afalchi/misc/starwars.mov"));
try {
// ***** PARSER *****
Parser qtParser=new QuickTimeFileParser(ds);
ParserThread parserThread=new ParserThread(qtParser,10);
//CircularBuffer buffer=parserThread.getOuputBuffer();
// ***** DECODER DA H263 A YUV *****
Transcode decoder=new H263toYUVDecoder(qtParser.getTrackFormat(0));
TranscodeThread decoderThread=new TranscodeThread(decoder,
parserThread.getOutputBufferSet()[0],
new CircularBuffer(20));
//CircularBuffer buffer=decoderThread.getOuputBuffer();
// ***** ENCODER DA YUV A H263/RTP *****
Transcode encoder=new YUVtoH263Encoder(decoder.getOutputFormat());
TranscodeThread encoderThread=new TranscodeThread(encoder,
decoderThread.getOuputBuffer(),
new CircularBuffer(40));
CircularBuffer buffer=encoderThread.getOuputBuffer();
parserThread.start();
decoderThread.start();
encoderThread.start();
ExtBuffer frame=buffer.getFrame();
int zeroMarkedFrame=0;
int minFrameSize=frame.getLength();
int maxFrameSize=frame.getLength();
int frameAx=frame.getLength();
int frameCounter=1;
if ((frame.getFlags() & Buffer.FLAG_RTP_MARKER)==0) zeroMarkedFrame++;
do {
frame=buffer.getFrame();
if (frame.getLength()>maxFrameSize) maxFrameSize=frame.getLength();
else if (frame.getLength()<minFrameSize) minFrameSize=frame.getLength();
frameCounter++;
frameAx=frameAx+frame.getLength();
if ((frame.getFlags() & Buffer.FLAG_RTP_MARKER)==0) zeroMarkedFrame++;
}
while (!frame.isEOM());
System.out.println("Format: "+frame.getFormat());
System.out.println("Processed frames: "+frameCounter);
System.out.println("min frame size (bytes): "+minFrameSize);
System.out.println("med frame size (bytes): "+frameAx/frameCounter);
System.out.println("max frame size (bytes): "+maxFrameSize);
System.out.println("Zero Marked Frame: "+zeroMarkedFrame);
}
catch (IOException e) {
System.err.println("Init Failed: "+e);
System.exit(1);
}
}
}
|
[
"pire.dejaco@0b1e5f34-49f6-11de-a65c-33beeba39556"
] |
pire.dejaco@0b1e5f34-49f6-11de-a65c-33beeba39556
|
d3a981039110cfca36e2bdca01a68a4dd4de24ce
|
c72d85cfaf53ae1f2fab654b8bb431100d74af08
|
/qx-service-queue/code/java/zws/context/BootstrapContextListener.java
|
c01e899c7b6dbf95983ebc0273cf09bc2edef8ce
|
[] |
no_license
|
vadeq/repotest
|
fd11e75008894f1bebbc24d722efc90309fb4b68
|
6e85f316d9cfc138dd5d001cd8f2f345aa682c12
|
refs/heads/master
| 2021-01-20T05:29:17.633968
| 2011-04-23T02:23:32
| 2011-04-23T02:23:32
| 1,553,934
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,282
|
java
|
package zws.context;
import zws.Server;
import zws.application.Configurator;
import zws.application.Names;
import zws.qx.queue.DaemonQueue;
import zws.recorder.ExecutionRecord;
import zws.repository.ilink3.Ilink3EventListener;
import zws.service.event.watcher.EventWatcherSvc;
import zws.service.recorder.qx.RecorderSvc;
import java.rmi.RemoteException;
import java.util.*;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
public final class BootstrapContextListener
implements ServletContextListener {
private ServletContext context = null;
private ArrayList listeners = new ArrayList();
public BootstrapContextListener() {}
//This method is invoked when the Web Application
//has been removed and is no longer able to accept
//requests
public void contextDestroyed(ServletContextEvent event)
{
try {
DaemonQueue.getInstance().stop();
} catch (Exception e1) {
e1.printStackTrace();
}
Ilink3EventListener listener;
for (int i=0; i<listeners.size(); i++) {
try {
listener = (Ilink3EventListener) listeners.get(i);
listener.shutdown();
System.out.println("Event Listner " + listener.getName() + " set to stop.");
} catch (Exception e) {
System.out.println("error while stopping event listner");
}
}
context = null;
}
//This method is invoked when the Web Application
//is ready to service requests
public void contextInitialized(ServletContextEvent event)
{
context = event.getServletContext();
try {
Configurator.load();
archiveStaleProcesses();
DaemonQueue.getInstance().reInstantiate();
}
catch (Exception e) {
e.printStackTrace();
}
// start event listeners
Collection eventList = EventWatcherSvc.getPrototypeNames();
Iterator itr = eventList.iterator();
String listnerName = null;
String state = null;
while(itr.hasNext()) {
listnerName = (String) itr.next();
try {
Ilink3EventListener l = EventWatcherSvc.find(listnerName);
if(null == l) continue;
state = l.getRunningState();
if(!"running".equalsIgnoreCase(state)) {
l.start();
listeners.add(l);
System.out.println("Event Listner " + l.getName() + " started.");
} else {
System.out.println("Event Listner " + l.getName() + " already started.");
}
} catch (Exception e) {
System.out.println("error while starting up event listner");
}
}
System.out.println("DesignState "+ Server.getName() + " Loaded: " + Server.getDescription());
}
private void archiveStaleProcesses() {
ExecutionRecord record = null;
try {
Collection publishingRecords = RecorderSvc.getRecordingsByStatus(Names.PEN_QUEUE_NAMESPACE, Names.STATUS_PUBLISHING);
if(null == publishingRecords || publishingRecords.size() <1) return;
Iterator itr = publishingRecords.iterator();
while(itr.hasNext()){
record = (ExecutionRecord) itr.next();
RecorderSvc.recordEndTime(record.getID(), Names.STATUS_STALE);
System.out.println("Stale process [ "+ record.getID() + "] found.");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"ourpc@.(none)"
] |
ourpc@.(none)
|
515114ba7bdf96176dd6489d2eafc55da6af303d
|
fca6e069c335dc8442618e36d4c0f97ede2c6a06
|
/src/com/mixshare/rapid_evolution/data/profile/common/image/Image.java
|
c3466b7f7ad82ba7968005db1cf0f7d07beafa73
|
[] |
no_license
|
divideby0/RapidEvolution3
|
127255648bae55e778321067cd7bb5b979684b2c
|
f04058c6abfe520442a75b3485147f570f7d538e
|
refs/heads/master
| 2020-03-22T00:56:26.188151
| 2018-06-30T20:41:26
| 2018-06-30T20:41:26
| 139,274,034
| 0
| 0
| null | 2018-06-30T19:19:57
| 2018-06-30T19:19:57
| null |
UTF-8
|
Java
| false
| false
| 7,127
|
java
|
package com.mixshare.rapid_evolution.data.profile.common.image;
import java.awt.image.BufferedImage;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.io.Serializable;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import com.mixshare.rapid_evolution.RE3Properties;
import com.mixshare.rapid_evolution.data.DataConstantsHelper;
import com.mixshare.rapid_evolution.data.mined.CommonMiningAPIWrapper;
import com.mixshare.rapid_evolution.data.mined.util.WebHelper;
import com.mixshare.rapid_evolution.data.util.filesystem.FileSystemAccess;
import com.mixshare.rapid_evolution.data.util.image.ImageHelper;
import com.mixshare.rapid_evolution.util.FileUtil;
import com.mixshare.rapid_evolution.util.io.LineReader;
import com.mixshare.rapid_evolution.util.io.LineWriter;
import com.trolltech.qt.gui.QImage;
public class Image implements Serializable {
static private Logger log = Logger.getLogger(Image.class);
static private final long serialVersionUID = 0L;
////////////
// FIELDS //
////////////
private String url;
private String imageFilename;
private byte dataSource;
private boolean disabled;
private String description;
transient private QImage qImage;
transient private BufferedImage bufferedImage;
static {
try{
// in order for the XMLEncoder to skip transient variables, this is needed
BeanInfo info = Introspector.getBeanInfo(Image.class);
PropertyDescriptor[] propertyDescriptors = info.getPropertyDescriptors();
for (int i = 0; i < propertyDescriptors.length; ++i) {
PropertyDescriptor pd = propertyDescriptors[i];
if (pd.getName().equals("qImage") || pd.getName().equals("bufferedImage")) {
pd.setValue("transient", Boolean.TRUE);
}
}
} catch (IntrospectionException e) {
log.error("static(): error", e);
}
}
/////////////////
// CONSTRUCTOR //
/////////////////
public Image() { }
public Image(String url, byte dataSource, String description) throws InvalidImageException {
this.url = url;
this.dataSource = dataSource;
this.imageFilename = downloadImage(url);
this.description = description;
if (this.imageFilename == null)
throw new InvalidImageException();
ensureImageFilenameIsRelative();
}
public Image(String url, byte dataSource) throws InvalidImageException {
this.url = url;
this.dataSource = dataSource;
this.imageFilename = downloadImage(url);
if (this.imageFilename == null)
throw new InvalidImageException();
ensureImageFilenameIsRelative();
}
public Image(String url, String imageFilename, byte dataSource) throws InvalidImageException {
this.url = url;
this.dataSource = dataSource;
this.imageFilename = imageFilename;
if (RE3Properties.getBoolean("server_mode")) {
BufferedImage img = FileSystemAccess.getFileSystem().readBufferedImage(imageFilename);
} else {
this.qImage = FileSystemAccess.getFileSystem().readQImage(imageFilename);
}
ensureImageFilenameIsRelative();
}
public Image(String url, String imageFilename, byte dataSource, String description) throws InvalidImageException {
this.url = url;
this.dataSource = dataSource;
this.imageFilename = imageFilename;
this.description = description;
if (RE3Properties.getBoolean("server_mode")) {
BufferedImage img = FileSystemAccess.getFileSystem().readBufferedImage(imageFilename);
} else {
this.qImage = FileSystemAccess.getFileSystem().readQImage(imageFilename);
}
ensureImageFilenameIsRelative();
}
public Image(LineReader lineReader) {
int version = Integer.parseInt(lineReader.getNextLine());
url = lineReader.getNextLine();
imageFilename = lineReader.getNextLine();
dataSource = Byte.parseByte(lineReader.getNextLine());
disabled = Boolean.parseBoolean(lineReader.getNextLine());
description = lineReader.getNextLine();
}
/////////////
// GETTERS //
/////////////
public String getUrl() { return url; }
public byte getDataSource() { return dataSource; }
public String getImageFilename() { return imageFilename; }
public boolean isDisabled() { return disabled; }
public String getDescription() {
if (description == null)
return "";
return description;
}
public QImage getQImage() {
if (qImage == null) {
try {
qImage = FileSystemAccess.getFileSystem().readQImage(imageFilename);
} catch (InvalidImageException e) { }
}
return qImage;
}
public BufferedImage getBufferedImage() {
if (bufferedImage == null) {
try {
bufferedImage = FileSystemAccess.getFileSystem().readBufferedImage(imageFilename);
} catch (InvalidImageException e) { }
}
return bufferedImage;
}
/////////////
// SETTERS //
/////////////
public void setUrl(String url) { this.url = url; }
public void setImageFilename(String imageFilename) {
this.imageFilename = imageFilename;
ensureImageFilenameIsRelative();
}
public void setDataSource(byte dataSource) { this.dataSource = dataSource; }
public void setDescription(String description) { this.description = description; }
public void setDisabled(boolean disabled) { this.disabled = disabled; }
/////////////
// METHODS //
/////////////
private String downloadImage(String url) {
String filename = WebHelper.getUniqueFilenameFromURL(url);
if (filename != null) {
String imageDirectory = CommonMiningAPIWrapper.getMinedDataDirectory(dataSource) + "images/";
String fullPath = imageDirectory + filename;
if (log.isTraceEnabled())
log.trace("downloadImage(): saving imageURL=" + url + ", to local filepath=" + fullPath);
if (ImageHelper.saveImageURL(url, fullPath)) {
if (!RE3Properties.getBoolean("server_mode")) {
try {
qImage = FileSystemAccess.getFileSystem().readQImage(fullPath);
} catch (InvalidImageException e) {
return null;
}
} else {
try {
BufferedImage img = FileSystemAccess.getFileSystem().readBufferedImage(fullPath);
} catch (InvalidImageException e) {
return null;
}
}
return fullPath;
}
}
return null;
}
public String toString() { return url + " (" + DataConstantsHelper.getDataSourceDescription(dataSource) + ")"; }
public boolean equals(Object o) {
if (o instanceof Image) {
Image i = (Image)o;
return url.equals(i.url);
}
return false;
}
public int hashCode() { return url.hashCode(); }
static public void main(String[] args) {
try {
PropertyConfigurator.configureAndWatch("log4j.properties");
// ... for testing...
} catch (Exception e) {
log.error("main(): error", e);
}
}
private void ensureImageFilenameIsRelative() { imageFilename = FileUtil.stripWorkingDirectory(imageFilename); }
public void write(LineWriter writer) {
writer.writeLine("1"); // version
writer.writeLine(url);
writer.writeLine(imageFilename);
writer.writeLine(dataSource);
writer.writeLine(disabled);
writer.writeLine(description);
}
}
|
[
"jbickmore@gmail.com"
] |
jbickmore@gmail.com
|
f530777a35b4115fe983dac4308e2528c6bd2421
|
df4539abf5d521be6fddd25734ccd7d7ac461428
|
/01-JavaSE/day_05/src/Test06_ArraySaveInMemory.java
|
abc2fb46eec46c59df7c94e322a25c5ab5dabd84
|
[] |
no_license
|
muzierixao/Learning-Java
|
c9bf6d1d020fd5b6e55d99c50172c465ea06fec0
|
893d9a730d6429626d1df5613fa7f81aca5bdd84
|
refs/heads/master
| 2023-04-18T06:48:46.280665
| 2020-12-27T05:32:02
| 2020-12-27T05:32:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,491
|
java
|
/**
* @author Liu Awen
* @create 2018-05-09 22:46
*/
/*
数组的存储:
1、数组下标为什么从0开始?
下标表示的是这个元素的位置距离首地址的偏移量
2、数组名中存储的是什么
数组名中存储的是数组在堆中一整块区域的首地址
3、数组的元素如何存储
在堆中,依次连续的存储的
说明:
数组名,其实也是变量。
回忆:
变量的声明和初始化
数据类型 变量名 = 变量值;
现在:
int[] array = {1,3,5,7,9};
其中的 int[]也是一种数据类型,数组类型,它是一种引用数据类型
引用,表示引用一个“对象”,引用堆中的一块内存
Java程序是在JVM中运行,JVM中的内存最最主要的两块区域:栈和堆
其中的栈就是存储我们的局部变量(现在见到的变量都是局部变量),
堆中存储的是对象
*/
class Test06_ArraySaveInMemory{
public static void main(String[] args){
int[] array = new int[]{1,3,5,7,9};
//int[] array = {1,3,5,7,9};
System.out.println(array);//打印数组名
//结果:[I@1b6d3586 不同的计算机不同时候运行都不一样的
//这个值是,数组对象的类型@对象的hashCode编码值
//其中[I,表示int[]类型
//15db9742是这个数组对象的hashCode编码值,类似于每个人都有一个身份证号
System.out.println(System.identityHashCode(array));
//460141958
}
}
|
[
"157514367@qq.com"
] |
157514367@qq.com
|
0661e41f957dbfd9a89718c290c93c16ceac15f2
|
f43a0e822d6887e0614bbeb69c06ccdf3b2b2458
|
/generated/appengine-endpoints-guice-objectify/src/main/resources/archetype-resources/src/main/java/endpoints/config/ServletsPathForEndpointClassesModule.java
|
73d5987c96fbaddc82c0a3b88c13af94b6ff8a4a
|
[] |
no_license
|
alassane0101/Archetypes
|
b539068f0f236c7f73b6cd5ca1c42a6f8744bde3
|
a3603fcd11ccb45698ea8824ded807974468b663
|
refs/heads/master
| 2020-06-17T04:39:43.158505
| 2019-02-13T22:17:28
| 2019-02-13T22:17:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,085
|
java
|
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.endpoints.config;
import java.util.List;
import ${package}.guice.utils.ClassFinder;
import com.google.api.server.spi.guice.GuiceSystemServiceServletModule;
import com.googlecode.objectify.ObjectifyFilter;
/**
* This starts in web.xml. All requests are intercepted and sent here.
*/
public class ServletsPathForEndpointClassesModule extends GuiceSystemServiceServletModule {
@Override
public void configureServlets() {
super.configureServlets();
Class<?> endpointsModule = RegisterEndpointsModule.class;
Class<?> servletsPathForEndpointClassesModule = ServletsPathForEndpointClassesModule.class;
List<Class<?>> endpointClasses = ClassFinder.find("${package}.endpoints");
// Remove no @Api endpoint classes from the servlets endpoint
endpointClasses.remove(endpointsModule);
endpointClasses.remove(servletsPathForEndpointClassesModule);
// Endpoints classes
serveGuiceSystemServiceServlet("/_ah/spi/*", endpointClasses);
}
}
|
[
"branflake2267@gmail.com"
] |
branflake2267@gmail.com
|
0ac2e22d7af0491fedee2371adc3b434b5987353
|
bb2f32df072cd27fa90b0892057e66fec9b569d9
|
/Android/GalileoX_CAAD003X_Professional_Android_App_Development/DaggerDemo/app/src/main/java/com/example/robert/daggerdemo/MainActivity.java
|
f8ca60645e55d42b92499584cb194e868fa7202a
|
[] |
no_license
|
amerelsayed2020/Learning
|
9417777f28b8d5161e6761d98c3e64cd9f998d3a
|
689acd3f8de57ce67dc610cae659d88782270668
|
refs/heads/master
| 2023-04-27T11:34:54.622157
| 2020-07-09T15:40:36
| 2020-07-09T15:40:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,335
|
java
|
package com.example.robert.daggerdemo;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import com.example.robert.daggerdemo.data.DataManager;
import com.example.robert.daggerdemo.data.model.User;
import com.example.robert.daggerdemo.di.components.ActivityComponent;
import com.example.robert.daggerdemo.di.components.DaggerActivityComponent;
import com.example.robert.daggerdemo.di.modules.ActivityModule;
import javax.inject.Inject;
public class MainActivity extends AppCompatActivity {
@Inject
DataManager mDataManager;
private ActivityComponent activityComponent;
private TextView mTvUserInfo;
private TextView mTvAccessToken;
public ActivityComponent getActivityComponent() {
if (activityComponent == null) {
activityComponent = DaggerActivityComponent.builder()
.activityModule(new ActivityModule(this))
.applicationComponent(DemoApplication.get(this).getComponent())
.build();
}
return activityComponent;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getActivityComponent().inject(this);
mTvUserInfo = (TextView) findViewById(R.id.tv_user_info);
mTvAccessToken = (TextView) findViewById(R.id.tv_access_token);
}
@Override
protected void onPostCreate(@Nullable Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
createUser();
getUser();
mDataManager.saveAccessToken("ASDR12443JFDJF43543J543H3K543");
String token = mDataManager.getAccessToken();
if (token != null) {
mTvAccessToken.setText(token);
}
}
private void createUser() {
try {
mDataManager.createUser(new User("Ali", "1367, Gurgaon, Haryana, India"));
} catch (Exception e) {
e.printStackTrace();
}
}
private void getUser() {
try {
User user = mDataManager.getUser(1L);
mTvUserInfo.setText(user.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"r.duriancik@gmail.com"
] |
r.duriancik@gmail.com
|
a0a6bad6560819b70879697790efd5f78f699b0a
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/26/org/jfree/chart/plot/CategoryPlot_setDomainGridlinePaint_1605.java
|
d5015a98ecb3b409aa939965fef407cec8fe3cb1
|
[] |
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
| 4,240
|
java
|
org jfree chart plot
gener plot data link categori dataset categorydataset
render data item link categori item render categoryitemrender
categori plot categoryplot plot
set paint draw grid line domain
axi send link plot chang event plotchangeev regist listen
param paint paint code code permit
domain gridlin paint getdomaingridlinepaint
set domain gridlin paint setdomaingridlinepaint paint paint
paint
illeg argument except illegalargumentexcept null 'paint' argument
domain gridlin paint domaingridlinepaint paint
notifi listen notifylisten plot chang event plotchangeev
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
aabf8bdc7eea00f9cf27f7fdb40e39ae21272dc4
|
d16f17f3b9d0aa12c240d01902a41adba20fad12
|
/src/leetcode/leetcode12xx/leetcode1296/Solution.java
|
e61be9b64534be8d9e5b754fe464e79f28c41193
|
[] |
no_license
|
redsun9/leetcode
|
79f9293b88723d2fd123d9e10977b685d19b2505
|
67d6c16a1b4098277af458849d352b47410518ee
|
refs/heads/master
| 2023-06-23T19:37:42.719681
| 2023-06-09T21:11:39
| 2023-06-09T21:11:39
| 242,967,296
| 38
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,499
|
java
|
package leetcode.leetcode12xx.leetcode1296;
import java.util.ArrayDeque;
import java.util.Arrays;
public class Solution {
public boolean isPossibleDivide(int[] nums, int k) {
int n = nums.length;
if (n == 0) return true;
if (n % k != 0) return false;
Arrays.sort(nums);
ArrayDeque<Pair> deque = new ArrayDeque<>(k);
int i = 0;
int waitingTotal = 0;
int prev = 0;
while (i < n) {
int curr = nums[i];
int cnt = 0;
while (i < n && nums[i] == curr) {
i++;
cnt++;
}
if (curr != prev + 1) {
if (waitingTotal != 0) return false;
deque.addLast(new Pair(curr, cnt));
} else {
if (cnt < waitingTotal) return false;
if (!deque.isEmpty() && deque.peekFirst().val == curr - k + 1) {
Pair pair = deque.pollFirst();
waitingTotal -= pair.cnt;
cnt -= pair.cnt;
}
if (waitingTotal < cnt) {
deque.addLast(new Pair(curr, cnt - waitingTotal));
}
}
waitingTotal = cnt;
prev = curr;
}
return waitingTotal == 0;
}
private static class Pair {
private int val, cnt;
public Pair(int val, int cnt) {
this.val = val;
this.cnt = cnt;
}
}
}
|
[
"mokeev.vladimir@gmail.com"
] |
mokeev.vladimir@gmail.com
|
78bb32d05b5d9bbe01358b3ed7e3930f0f9f3e39
|
1e7f68d62f0b9408054a7ddee252a02d94bf93fc
|
/CommModule/src/ca/uhn/hl7v2/model/v26/group/RQI_I01_PROVIDER.java
|
b639520f975b735a14cda7ba1105debc1ad5a269
|
[] |
no_license
|
sac10nikam/TX
|
8b296211601cddead3749e48876e3851e867b07d
|
e5a5286f1092ce720051036220e1780ba3408893
|
refs/heads/master
| 2021-01-15T16:00:19.517997
| 2013-01-21T09:38:09
| 2013-01-21T09:38:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,421
|
java
|
/*
* This class is an auto-generated source file for a HAPI
* HL7 v2.x standard structure class.
*
* For more information, visit: http://hl7api.sourceforge.net/
*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (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.mozilla.org/MPL/
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
* specific language governing rights and limitations under the License.
*
* The Original Code is "[file_name]". Description:
* "[one_line_description]"
*
* The Initial Developer of the Original Code is University Health Network. Copyright (C)
* 2012. All Rights Reserved.
*
* Contributor(s): ______________________________________.
*
* Alternatively, the contents of this file may be used under the terms of the
* GNU General Public License (the "GPL"), in which case the provisions of the GPL are
* applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of the GPL and not to allow others to use your version
* of this file under the MPL, indicate your decision by deleting the provisions above
* and replace them with the notice and other provisions required by the GPL License.
* If you do not delete the provisions above, a recipient may use your version of
* this file under either the MPL or the GPL.
*
*/
package ca.uhn.hl7v2.model.v26.group;
import ca.uhn.hl7v2.model.v26.segment.*;
import java.util.List;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import ca.uhn.hl7v2.model.*;
import net.newel.android.Log;
import ca.uhn.hl7v2.util.Constants;
/**
* <p>Represents a RQI_I01_PROVIDER group structure (a Group object).
* A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
* This Group contains the following elements:
* </p>
* <ul>
* <li>1: PRD (Provider Data) <b> </b></li>
* <li>2: CTD (Contact Data) <b>optional repeating</b></li>
* </ul>
*/
public class RQI_I01_PROVIDER extends AbstractGroup {
private static final long serialVersionUID = 1L;
/**
* Creates a new RQI_I01_PROVIDER group
*/
public RQI_I01_PROVIDER(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(PRD.class, true, false);
this.add(CTD.class, false, true);
} catch(HL7Exception e) {
Log.e(Constants.TAG, "Unexpected error creating RQI_I01_PROVIDER - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns "2.6"
*/
public String getVersion() {
return "2.6";
}
/**
* Returns
* PRD (Provider Data) - creates it if necessary
*/
public PRD getPRD() {
PRD retVal = getTyped("PRD", PRD.class);
return retVal;
}
/**
* Returns
* the first repetition of
* CTD (Contact Data) - creates it if necessary
*/
public CTD getCTD() {
CTD retVal = getTyped("CTD", CTD.class);
return retVal;
}
/**
* Returns a specific repetition of
* CTD (Contact Data) - creates it if necessary
*
* @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
* @throws HL7Exception if the repetition requested is more than one
* greater than the number of existing repetitions.
*/
public CTD getCTD(int rep) {
CTD retVal = getTyped("CTD", rep, CTD.class);
return retVal;
}
/**
* Returns the number of existing repetitions of CTD
*/
public int getCTDReps() {
return getReps("CTD");
}
/**
* <p>
* Returns a non-modifiable List containing all current existing repetitions of CTD.
* <p>
* <p>
* Note that unlike {@link #getCTD()}, this method will not create any reps
* if none are already present, so an empty list may be returned.
* </p>
*/
public List<CTD> getCTDAll() throws HL7Exception {
return getAllAsList("CTD", CTD.class);
}
/**
* Inserts a specific repetition of CTD (Contact Data)
* @see AbstractGroup#insertRepetition(Structure, int)
*/
public void insertCTD(CTD structure, int rep) throws HL7Exception {
super.insertRepetition("CTD", structure, rep);
}
/**
* Inserts a specific repetition of CTD (Contact Data)
* @see AbstractGroup#insertRepetition(Structure, int)
*/
public CTD insertCTD(int rep) throws HL7Exception {
return (CTD)super.insertRepetition("CTD", rep);
}
/**
* Removes a specific repetition of CTD (Contact Data)
* @see AbstractGroup#removeRepetition(String, int)
*/
public CTD removeCTD(int rep) throws HL7Exception {
return (CTD)super.removeRepetition("CTD", rep);
}
}
|
[
"nacrotic@hotmail.com"
] |
nacrotic@hotmail.com
|
e84404a8606702f84f68bc069a3e25481d35a316
|
13cbb329807224bd736ff0ac38fd731eb6739389
|
/com/sun/jmx/snmp/Enumerated.java
|
b6fdd99c8625000d0f9b53a4f343bb83a23ff985
|
[] |
no_license
|
ZhipingLi/rt-source
|
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
|
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
|
refs/heads/master
| 2023-07-14T15:00:33.100256
| 2021-09-01T04:49:04
| 2021-09-01T04:49:04
| 401,933,858
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,085
|
java
|
package com.sun.jmx.snmp;
import java.io.Serializable;
import java.util.Enumeration;
import java.util.Hashtable;
public abstract class Enumerated implements Serializable {
protected int value;
public Enumerated() throws IllegalArgumentException {
Enumeration enumeration = getIntTable().keys();
if (enumeration.hasMoreElements()) {
this.value = ((Integer)enumeration.nextElement()).intValue();
} else {
throw new IllegalArgumentException();
}
}
public Enumerated(int paramInt) throws IllegalArgumentException {
if (getIntTable().get(new Integer(paramInt)) == null)
throw new IllegalArgumentException();
this.value = paramInt;
}
public Enumerated(Integer paramInteger) throws IllegalArgumentException {
if (getIntTable().get(paramInteger) == null)
throw new IllegalArgumentException();
this.value = paramInteger.intValue();
}
public Enumerated(String paramString) throws IllegalArgumentException {
Integer integer = (Integer)getStringTable().get(paramString);
if (integer == null)
throw new IllegalArgumentException();
this.value = integer.intValue();
}
public int intValue() { return this.value; }
public Enumeration<Integer> valueIndexes() { return getIntTable().keys(); }
public Enumeration<String> valueStrings() { return getStringTable().keys(); }
public boolean equals(Object paramObject) { return (paramObject != null && getClass() == paramObject.getClass() && this.value == ((Enumerated)paramObject).value); }
public int hashCode() {
String str = getClass().getName() + String.valueOf(this.value);
return str.hashCode();
}
public String toString() { return (String)getIntTable().get(new Integer(this.value)); }
protected abstract Hashtable<Integer, String> getIntTable();
protected abstract Hashtable<String, Integer> getStringTable();
}
/* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\com\sun\jmx\snmp\Enumerated.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.0.7
*/
|
[
"michael__lee@yeah.net"
] |
michael__lee@yeah.net
|
f1ffd61cb28c582cd59b1bd1e43868f0aa1f2fb3
|
287a92ac24d919d7ef0286450f8d0af3ae41ff6b
|
/src/main/java/com/godcheese/nimrod/common/thymeleaf/NimrodDialect.java
|
7d35473bfa076a4cb49496e423ffa5765e03f274
|
[
"MIT"
] |
permissive
|
godcheese/nimrod
|
d8bc4b032cc5f53b9295ba00d98bcd0491c8291f
|
bd7678b92c8f481cdbbfb7090a43503da99b1856
|
refs/heads/master
| 2021-08-15T00:55:59.054718
| 2021-08-03T10:04:20
| 2021-08-03T10:04:20
| 155,986,916
| 145
| 53
|
MIT
| 2021-08-03T10:04:21
| 2018-11-03T13:44:15
|
Java
|
UTF-8
|
Java
| false
| false
| 883
|
java
|
package com.godcheese.nimrod.common.thymeleaf;
import org.springframework.stereotype.Component;
import org.thymeleaf.dialect.AbstractProcessorDialect;
import org.thymeleaf.processor.IProcessor;
import org.thymeleaf.standard.StandardDialect;
import java.util.HashSet;
import java.util.Set;
/**
* @author godcheese [godcheese@outlook.com]
* @date 2019-09-23
*/
@Component
public class NimrodDialect extends AbstractProcessorDialect {
private static final String NAME = "Nimrod Dialect";
private static final String PREFIX = "nimrod";
protected NimrodDialect() {
super(NAME, PREFIX, StandardDialect.PROCESSOR_PRECEDENCE);
}
@Override
public Set<IProcessor> getProcessors(String s) {
final Set<IProcessor> processors = new HashSet<>();
processors.add(new SecurityAuthorityElementProcessor(s));
return processors;
}
}
|
[
"godcheese@outlook.com"
] |
godcheese@outlook.com
|
a81d954ef6d4a721d78036ee28678735ebc5fdbe
|
35e1aee1685def4d303dbfd1ce62548d1aa000c2
|
/ServidorWeb/src/java/WebServices/UsuarioWS/DataJugador.java
|
701506eb80cf02f3dff0c0f71b0eefb983fdd77c
|
[] |
no_license
|
sjcotto/java-swing-ws
|
d2479e1bedea0ba46e8182c1d9dd91955042e9b8
|
fd972634a3f58237bb2cfb07fde7113b80d15730
|
refs/heads/master
| 2016-09-06T07:43:45.963849
| 2013-08-15T01:19:17
| 2013-08-15T01:19:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,202
|
java
|
package WebServices.UsuarioWS;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for dataJugador complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="dataJugador">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="altura" type="{http://www.w3.org/2001/XMLSchema}double"/>
* <element name="edad" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="fechaDeNacimiento" type="{http://WebServices/}dataFechaHora" minOccurs="0"/>
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="lugarNacimiento" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="nombre" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="nombreCompleto" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="pathImage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="peso" type="{http://www.w3.org/2001/XMLSchema}double"/>
* <element name="posicion" type="{http://WebServices/}tipoPosicion" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "dataJugador", propOrder = {
"altura",
"edad",
"fechaDeNacimiento",
"id",
"lugarNacimiento",
"nombre",
"nombreCompleto",
"pathImage",
"peso",
"posicion"
})
public class DataJugador {
protected double altura;
protected int edad;
protected DataFechaHora fechaDeNacimiento;
protected int id;
protected String lugarNacimiento;
protected String nombre;
protected String nombreCompleto;
protected String pathImage;
protected double peso;
protected TipoPosicion posicion;
/**
* Gets the value of the altura property.
*
*/
public double getAltura() {
return altura;
}
/**
* Sets the value of the altura property.
*
*/
public void setAltura(double value) {
this.altura = value;
}
/**
* Gets the value of the edad property.
*
*/
public int getEdad() {
return edad;
}
/**
* Sets the value of the edad property.
*
*/
public void setEdad(int value) {
this.edad = value;
}
/**
* Gets the value of the fechaDeNacimiento property.
*
* @return
* possible object is
* {@link DataFechaHora }
*
*/
public DataFechaHora getFechaDeNacimiento() {
return fechaDeNacimiento;
}
/**
* Sets the value of the fechaDeNacimiento property.
*
* @param value
* allowed object is
* {@link DataFechaHora }
*
*/
public void setFechaDeNacimiento(DataFechaHora value) {
this.fechaDeNacimiento = value;
}
/**
* Gets the value of the id property.
*
*/
public int getId() {
return id;
}
/**
* Sets the value of the id property.
*
*/
public void setId(int value) {
this.id = value;
}
/**
* Gets the value of the lugarNacimiento property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLugarNacimiento() {
return lugarNacimiento;
}
/**
* Sets the value of the lugarNacimiento property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLugarNacimiento(String value) {
this.lugarNacimiento = value;
}
/**
* Gets the value of the nombre property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNombre() {
return nombre;
}
/**
* Sets the value of the nombre property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNombre(String value) {
this.nombre = value;
}
/**
* Gets the value of the nombreCompleto property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNombreCompleto() {
return nombreCompleto;
}
/**
* Sets the value of the nombreCompleto property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNombreCompleto(String value) {
this.nombreCompleto = value;
}
/**
* Gets the value of the pathImage property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPathImage() {
return pathImage;
}
/**
* Sets the value of the pathImage property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPathImage(String value) {
this.pathImage = value;
}
/**
* Gets the value of the peso property.
*
*/
public double getPeso() {
return peso;
}
/**
* Sets the value of the peso property.
*
*/
public void setPeso(double value) {
this.peso = value;
}
/**
* Gets the value of the posicion property.
*
* @return
* possible object is
* {@link TipoPosicion }
*
*/
public TipoPosicion getPosicion() {
return posicion;
}
/**
* Sets the value of the posicion property.
*
* @param value
* allowed object is
* {@link TipoPosicion }
*
*/
public void setPosicion(TipoPosicion value) {
this.posicion = value;
}
}
|
[
"sjcotto@gmail.com"
] |
sjcotto@gmail.com
|
d000af64e6723a5b801de067293568ea1ae58485
|
8e7b3c8dea9d83771c2dffcefd616efbbe770051
|
/src/main/java/com/fosterleads/backend/service/EmailAlreadyUsedException.java
|
c30e2d3c1953f01cde41a70caba0c06d474a8cf9
|
[] |
no_license
|
pramod-jazz/FosterLeads
|
f02f4b23002b8c8ee4f906e095cadfaa07d3242d
|
f78b89638d2446ef5da3ef43f6281c7837a7a4c4
|
refs/heads/master
| 2020-09-09T11:34:45.643662
| 2019-11-13T10:46:42
| 2019-11-13T10:46:42
| 221,436,321
| 1
| 0
| null | 2020-07-18T19:22:35
| 2019-11-13T10:46:27
|
Java
|
UTF-8
|
Java
| false
| false
| 202
|
java
|
package com.fosterleads.backend.service;
public class EmailAlreadyUsedException extends RuntimeException {
public EmailAlreadyUsedException() {
super("Email is already in use!");
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
378898995116027c432de0885f601b37ec5d2e78
|
40cd4da5514eb920e6a6889e82590e48720c3d38
|
/desktop/applis/apps/bean/bean_games/pokemonbean/src/main/java/aiki/beans/help/GeneralHelpBeanGetMovesAtLevel.java
|
1ee5c39f890df62c28983e6b1b3370eede103784
|
[] |
no_license
|
Cardman/projects
|
02704237e81868f8cb614abb37468cebb4ef4b31
|
23a9477dd736795c3af10bccccb3cdfa10c8123c
|
refs/heads/master
| 2023-08-17T11:27:41.999350
| 2023-08-15T07:09:28
| 2023-08-15T07:09:28
| 34,724,613
| 4
| 0
| null | 2020-10-13T08:08:38
| 2015-04-28T10:39:03
|
Java
|
UTF-8
|
Java
| false
| false
| 436
|
java
|
package aiki.beans.help;
import aiki.beans.PokemonBeanStruct;
import code.bean.nat.BeanNatCommonLgNames;
import code.bean.nat.*;
import code.bean.nat.*;
public class GeneralHelpBeanGetMovesAtLevel implements NatCaller{
@Override
public NaSt re(NaSt _instance, NaSt[] _args){
return BeanNatCommonLgNames.getStringArray(( (GeneralHelpBean) ((PokemonBeanStruct)_instance).getInstance()).getMovesAtLevelFirstPk());
}
}
|
[
"f.desrochettes@gmail.com"
] |
f.desrochettes@gmail.com
|
ec48f85a5aebc04f67397e92e436b34630c72668
|
b3fbdac8e29019cf87340a5494862f27d230f936
|
/app/src/main/java/com/example/jupa/Helpers/RaveHelper.java
|
7d4c2dbf3c536ec4cab1a67446845128ac00717f
|
[] |
no_license
|
bronejeffries/jupaApp
|
431e03f8cc5574e1b2d4e37c1daf6ec18df9937f
|
16f190808951afc41bf4aff1efa9a3707957e9a8
|
refs/heads/master
| 2020-07-26T19:53:44.490304
| 2020-02-22T16:04:58
| 2020-02-22T16:04:58
| 208,750,490
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,666
|
java
|
package com.example.jupa.Helpers;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import com.example.jupa.R;
import com.flutterwave.raveandroid.RaveConstants;
import com.flutterwave.raveandroid.RavePayActivity;
import com.flutterwave.raveandroid.RavePayManager;
public class RaveHelper {
final String publicKey = "FLWPUBK-09622c7a4b948dd3fb98aeb75e1aba50-X"; //Get your public key from your account
final String encryptionKey = "95f1d0841a46b0cd049470db"; //Get your encryption key from your account
String message;
public void makePayment(Context context,PaymentDetails paymentDetails){
// email +" "+
/*
Create instance of RavePayManager
*/
new RavePayManager((Activity) context).setAmount(paymentDetails.getAmount())
.setCountry(paymentDetails.getCountry())
.setCurrency(paymentDetails.getCurrency())
.setEmail(paymentDetails.getEmail())
.setfName(paymentDetails.getfName())
.setlName(paymentDetails.getlName())
.setNarration(paymentDetails.getNarration())
.setPublicKey(publicKey)
.setEncryptionKey(encryptionKey)
.setTxRef(paymentDetails.getTxRef())
.acceptAccountPayments(true)
.acceptCardPayments(true)
.acceptMpesaPayments(true)
.acceptGHMobileMoneyPayments(false)
.acceptUgMobileMoneyPayments(true)
.acceptAccountPayments(true)
.onStagingEnv(true)
.allowSaveCardFeature(true)
.withTheme(R.style.DefaultPayTheme)
.initialize();
}
public boolean resultHandler(int requestCode, int resultCode, Intent data){
Boolean validResult = false;
if (requestCode == RaveConstants.RAVE_REQUEST_CODE && data != null) {
String message = data.getStringExtra("response");
if (resultCode == RavePayActivity.RESULT_SUCCESS) {
setMessage("SUCCESS ");
validResult = true;
} else if (resultCode == RavePayActivity.RESULT_ERROR) {
setMessage("ERROR ");
validResult = false;
} else if (resultCode == RavePayActivity.RESULT_CANCELLED) {
setMessage("CANCELLED ");
validResult = false;
}
}
return validResult;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
|
[
"you@example.com"
] |
you@example.com
|
5042edd83c359281d1fc4c902309eb6adee5ea90
|
412e86e0d8182204c7bfd6b3d43d30736c55068a
|
/src/main/java/com/kenny/openimgur/api/responses/TopicResponse.java
|
5ac0498e336b11f01ea56582b91cec3cf23cad34
|
[
"Apache-2.0"
] |
permissive
|
duytruongit/Opengur
|
bf8c5d923e7b28bfc0738001c363284e6d9671d6
|
406bd4bce816ff591ffedf00ed333aa27a4cbe85
|
refs/heads/master
| 2021-01-18T05:48:56.520623
| 2016-06-02T12:41:05
| 2016-06-02T12:41:05
| 61,952,478
| 1
| 0
| null | 2016-06-25T16:44:33
| 2016-06-25T16:44:32
| null |
UTF-8
|
Java
| false
| false
| 351
|
java
|
package com.kenny.openimgur.api.responses;
import android.support.annotation.NonNull;
import com.kenny.openimgur.classes.ImgurTopic;
import java.util.ArrayList;
import java.util.List;
/**
* Created by kcampagna on 7/11/15.
*/
public class TopicResponse extends BaseResponse {
@NonNull
public List<ImgurTopic> data = new ArrayList<>();
}
|
[
"kennyc1012@gmail.com"
] |
kennyc1012@gmail.com
|
6126fd4c91acb08eae0378cedb377941f47d4c88
|
dede6aaca13e69cb944986fa3f9485f894444cf0
|
/media-soa/media-soa-provider/src/main/java/com/dangdang/digital/listener/OtherAddBoughtListener.java
|
3ebea1e90e2ce17866dc90d41b142a6c38294edb
|
[] |
no_license
|
summerxhf/dang
|
c0d1e7c2c9436a7c7e7f9c8ef4e547279ec5d441
|
f1b459937d235637000fb433919a7859dcd77aba
|
refs/heads/master
| 2020-03-27T08:32:33.743260
| 2015-06-03T08:12:45
| 2015-06-03T08:12:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 949
|
java
|
package com.dangdang.digital.listener;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
import com.dangdang.digital.service.IBoughtService;
import com.dangdang.digital.vo.AddBoughtMessage;
/**
*
* Description: 除订单外其它情况添加已购信息
* All Rights Reserved.
* @version 1.0 2015年1月7日 上午11:23:32 by 许文轩(xuwenxuan@dangdang.com)创建
*/
public class OtherAddBoughtListener {
private static final Logger logger = Logger.getLogger(OtherAddBoughtListener.class);
@Resource
private IBoughtService boughtService;
public void handleMessage(AddBoughtMessage addBoughtMessage) {
try {
logger.info("接收除订单外其它情况添加已购信息消息:" + addBoughtMessage.toString());
// 添加已购信息
boughtService.addBought(addBoughtMessage);
} catch (Exception e) {
logger.error("除订单外其它情况添加已购信息消息处理异常", e);
}
}
}
|
[
"maqiang@dangdang.com"
] |
maqiang@dangdang.com
|
d812c82dbbc8b7ac762efbffd70ab1da48308b02
|
2e590ef886718e01d7ec58beff00a28d7aa9a366
|
/source-code/java/systest/src/gov/nasa/kepler/aft/pdq/PdqThirdContactTest.java
|
6427b7c1669b0c14d08402cfd6fb6b2d286afbde
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
adam-sweet/kepler-pipeline
|
95a6cbc03dd39a8289b090fb85cdfc1eb5011fd9
|
f58b21df2c82969d8bd3e26a269bd7f5b9a770e1
|
refs/heads/master
| 2022-06-07T21:22:33.110291
| 2020-05-06T01:12:08
| 2020-05-06T01:12:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,480
|
java
|
/*
* Copyright 2017 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* This file is available under the terms of the NASA Open Source Agreement
* (NOSA). You should have received a copy of this agreement with the
* Kepler source code; see the file NASA-OPEN-SOURCE-AGREEMENT.doc.
*
* No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY
* WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY,
* INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE
* WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM
* INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR
* FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM
* TO THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER,
* CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT
* OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY
* OTHER APPLICATIONS RESULTING FROM USE OF THE SUBJECT SOFTWARE.
* FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND LIABILITIES
* REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE,
* AND DISTRIBUTES IT "AS IS."
*
* Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS
* AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND
* SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF
* THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES,
* EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM
* PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT
* SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED
* STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY
* PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE
* REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL
* TERMINATION OF THIS AGREEMENT.
*/
package gov.nasa.kepler.aft.pdq;
/**
* PDQ AFT for processing all the reference pixel files received in the third
* contact for the relevant reference pixel target table.
*
* @author Forrest Girouard
*/
public class PdqThirdContactTest extends PdqMultiContactTest {
public PdqThirdContactTest() {
super("ThirdContact");
}
@Override
protected int getContactCount() {
return 3;
}
}
|
[
"Bill.Wohler@nasa.gov"
] |
Bill.Wohler@nasa.gov
|
71139cbe64a46c95dd15a0c6fb2fd0e314ee1b31
|
413a584d7123872cc04b2d1bb1141310cefa7b48
|
/blog/api-impl/src/java/uk/ac/lancs/e_science/sakaiproject/impl/blogger/searcher/SearchException.java
|
3c4ebfb9c4221df047177bc75f058c40ba2417ae
|
[
"ECL-1.0",
"Apache-2.0"
] |
permissive
|
etudes-inc/etudes-lms
|
31bc2b187cafc629c8b2b61be92aa16bb78aca99
|
38a938e2c74d86fc3013642b05914068a3a67af3
|
refs/heads/master
| 2020-06-03T13:49:45.997041
| 2017-10-25T21:25:58
| 2017-10-25T21:25:58
| 94,132,665
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 905
|
java
|
/*************************************************************************************
Copyright (c) 2006. Centre for e-Science. Lancaster University. United Kingdom.
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 uk.ac.lancs.e_science.sakaiproject.impl.blogger.searcher;
public class SearchException extends Exception{
}
|
[
"ggolden@etudes.org"
] |
ggolden@etudes.org
|
43ba357d34f54dcb17e6447165146ff4a8ba2982
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/glassfish/jersey/tests/e2e/oauth/OAuth2Test.java
|
d0d388fdf0df0787345bad93b9cc04c51e9a64cc
|
[] |
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
| 7,256
|
java
|
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
* or LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package org.glassfish.jersey.tests.e2e.oauth;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import org.glassfish.jersey.test.JerseyTest;
import org.junit.Assert;
import org.junit.Test;
/**
* Tests OAuth 2 client.
*
* @author Miroslav Fuksa
*/
public class OAuth2Test extends JerseyTest {
private static final String STATE = "4564dsf54654fsda654af";
private static final String CODE = "code-xyz";
private static final String CLIENT_PUBLIC = "clientPublic";
private static final String CLIENT_SECRET = "clientSecret";
@Path("oauth")
public static class AuthorizationResource {
@POST
@Path("access-token")
@Produces(MediaType.APPLICATION_JSON)
public OAuth2Test.MyTokenResult getAccessToken(@FormParam("grant_type")
String grantType, @FormParam("code")
String code, @FormParam("redirect_uri")
String redirectUri, @FormParam("client_id")
String clientId) {
try {
Assert.assertEquals("authorization_code", grantType);
Assert.assertEquals("urn:ietf:wg:oauth:2.0:oob", redirectUri);
Assert.assertEquals(OAuth2Test.CODE, code);
Assert.assertEquals(OAuth2Test.CLIENT_PUBLIC, clientId);
} catch (AssertionError e) {
e.printStackTrace();
throw new javax.ws.rs.BadRequestException(Response.status(400).entity(e.getMessage()).build());
}
final OAuth2Test.MyTokenResult myTokenResult = new OAuth2Test.MyTokenResult();
myTokenResult.setAccessToken("access-token-aab999f");
myTokenResult.setExpiresIn("3600");
myTokenResult.setTokenType("access-token");
myTokenResult.setRefreshToken("refresh-xyz");
return myTokenResult;
}
@GET
@Path("authorization")
public String authorization(@QueryParam("state")
String state, @QueryParam("response_type")
String responseType, @QueryParam("scope")
String scope, @QueryParam("readOnly")
String readOnly, @QueryParam("redirect_uri")
String redirectUri) {
try {
Assert.assertEquals("code", responseType);
Assert.assertEquals(OAuth2Test.STATE, state);
Assert.assertEquals("urn:ietf:wg:oauth:2.0:oob", redirectUri);
Assert.assertEquals("contact", scope);
Assert.assertEquals("true", readOnly);
} catch (AssertionError e) {
e.printStackTrace();
throw new javax.ws.rs.BadRequestException(Response.status(400).entity(e.getMessage()).build());
}
return OAuth2Test.CODE;
}
@POST
@Path("refresh-token")
@Produces(MediaType.APPLICATION_JSON)
public String refreshToken(@FormParam("grant_type")
String grantType, @FormParam("refresh_token")
String refreshToken, @HeaderParam("isArray")
@DefaultValue("false")
boolean isArray) {
try {
Assert.assertEquals("refresh_token", grantType);
Assert.assertEquals("refresh-xyz", refreshToken);
} catch (AssertionError e) {
e.printStackTrace();
throw new javax.ws.rs.BadRequestException(Response.status(400).entity(e.getMessage()).build());
}
return isArray ? "{\"access_token\":[\"access-token-new\"],\"expires_in\":\"3600\",\"token_type\":\"access-token\"}" : "{\"access_token\":\"access-token-new\",\"expires_in\":\"3600\",\"token_type\":\"access-token\"}";
}
}
@Test
public void testFlow() {
testFlow(false);
}
@Test
public void testFlowWithArrayInResponse() {
testFlow(true);
}
@XmlRootElement
public static class MyTokenResult {
@XmlAttribute(name = "access_token")
private String accessToken;
@XmlAttribute(name = "expires_in")
private String expiresIn;
@XmlAttribute(name = "token_type")
private String tokenType;
public String getRefreshToken() {
return refreshToken;
}
public void setRefreshToken(String refreshToken) {
this.refreshToken = refreshToken;
}
@XmlAttribute(name = "refresh_token")
private String refreshToken;
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
public String getExpiresIn() {
return expiresIn;
}
public void setExpiresIn(String expiresIn) {
this.expiresIn = expiresIn;
}
public String getTokenType() {
return tokenType;
}
public void setTokenType(String tokenType) {
this.tokenType = tokenType;
}
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
c534b14b42f2b22a6c444754ba3667dad5db410e
|
67791aac4d0e6ec1569c08c95923a2afd9e9f13f
|
/LMS-feature/src/main/java/com/hcl/loan/controller/StatusController.java
|
3a31f8145789cf0d5b805bb9e8a2c691d633ac9e
|
[] |
no_license
|
sridharreddych/TechHck
|
59c574a7c70a5f22a4196867b1d6013f3f33fce6
|
d0c82d4421007b88906d4ee8357bef6cd8fafc8c
|
refs/heads/master
| 2020-03-24T03:23:17.069524
| 2018-07-26T09:13:50
| 2018-07-26T09:13:50
| 142,417,310
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,799
|
java
|
package com.hcl.loan.controller;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.hcl.loan.constants.LoanApprovalConstants;
import com.hcl.loan.model.Loan;
import com.hcl.loan.model.exception.InvalidURLParameterException;
import com.hcl.loan.service.StatusService;
@RestController
@CrossOrigin
@RequestMapping(value = LoanApprovalConstants.STATUS_MAPPING)
public class StatusController {
private static final Logger logger = Logger.getLogger(EMICalculatorController.class);
@Autowired
StatusService statusService;
/**
*
* @param statustype
* @return List of Loan object
*/
@RequestMapping(value = LoanApprovalConstants.STATUS_MAPPING
+ LoanApprovalConstants.STATUS_TYPE_VARIABLE, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public List<Loan> fetchApplicationStatus(@PathVariable("statustype") String statustype,
@PathVariable("userId") Integer userId) {
logger.debug("start fetchApplicationStatus statustype:" + statustype + " userId:" + userId);
List<Loan> loanList = null;
if (statustype != null && !statustype.isEmpty() && userId != null) {
if ("dispatched".equals(statustype) || "pending".equals(statustype)) {
loanList = statusService.fetchStatus(userId, statustype);
} else {
throw new InvalidURLParameterException("Invalid iput parameter");
}
}
return loanList;
}
}
|
[
"pranavi.c@hcl.com"
] |
pranavi.c@hcl.com
|
a06560e5c3419567b39cd38d6939a27ef75b8ec8
|
32b643f7b552396b49c88e3d04064a25d5edb36b
|
/app/src/main/java/com/inz/bean/CameraItemBean.java
|
1a444c5ede196af6904eed8eda1f68ece035e5dd
|
[] |
no_license
|
Bjelijah/INZ4G
|
a6831bda3d5c9b3be50a71c549b619ed98f8852c
|
0405cb2e5467e9357f0ead699f6163b2c181afd0
|
refs/heads/master
| 2020-06-25T10:08:44.002123
| 2018-02-01T05:00:13
| 2018-02-01T05:00:13
| 96,971,762
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,326
|
java
|
package com.inz.bean;
import java.io.Serializable;
/**
* Created by howell on 2016/11/18.
*/
public class CameraItemBean implements Serializable {
private PlayType type;
private String cameraName;
private String cameraDescription;
private String deviceId;
private int channelNo;
private boolean isOnline;
private boolean isPtz;
private boolean isStore;
private String deVer;
private String model;
private int indensity;
private String picturePath;
private String upnpIP; // for ap
private int upnpPort;
private int methodType;
public int getMethodType() {
return methodType;
}
public CameraItemBean setMethodType(int methodType) {
this.methodType = methodType;
return this;
}
public String getCameraDescription() {
return cameraDescription;
}
public CameraItemBean setCameraDescription(String cameraDescription) {
this.cameraDescription = cameraDescription;
return this;
}
public PlayType getType() {
return type;
}
public String getUpnpIP() {
return upnpIP;
}
public CameraItemBean setUpnpIP(String upnpIP) {
this.upnpIP = upnpIP;
return this;
}
public int getUpnpPort() {
return upnpPort;
}
public CameraItemBean setUpnpPort(int upnpPort) {
this.upnpPort = upnpPort;
return this;
}
public CameraItemBean setType(PlayType type) {
this.type = type;
return this;
}
public String getPicturePath() {
return picturePath;
}
public CameraItemBean setPicturePath(String picturePath) {
this.picturePath = picturePath;
return this;
}
public String getCameraName() {
return cameraName;
}
public CameraItemBean setCameraName(String cameraName) {
this.cameraName = cameraName;
return this;
}
public String getDeviceId() {
return deviceId;
}
public CameraItemBean setDeviceId(String deviceId) {
this.deviceId = deviceId;
return this;
}
public int getChannelNo() {
return channelNo;
}
public CameraItemBean setChannelNo(int channelNo) {
this.channelNo = channelNo;
return this;
}
public boolean isOnline() {
return isOnline;
}
public CameraItemBean setOnline(boolean online) {
isOnline = online;
return this;
}
public boolean isPtz() {
return isPtz;
}
public CameraItemBean setPtz(boolean ptz) {
isPtz = ptz;
return this;
}
public boolean isStore() {
return isStore;
}
public CameraItemBean setStore(boolean store) {
isStore = store;
return this;
}
public String getDeVer() {
return deVer;
}
public CameraItemBean setDeVer(String deVer) {
this.deVer = deVer;
return this;
}
public String getModel() {
return model;
}
public CameraItemBean setModel(String model) {
this.model = model;
return this;
}
public int getIndensity() {
return indensity;
}
public CameraItemBean setIndensity(int indensity) {
this.indensity = indensity;
return this;
}
}
|
[
"elijah@live.cn"
] |
elijah@live.cn
|
8e50d0fdd8321d426fab094a062c0aec7310adf4
|
62c76a1df341e9d79f3c81dd71c94113b1f9fc14
|
/WEBFDMSWeb/src/fdms/ui/struts/form/ObitAsimasForm.java
|
f23f5ce293940b53d02e17936924d8ff7bc8d0bc
|
[] |
no_license
|
mahendrakawde/FDMS-Source-Code
|
3b6c0b5b463180d17e649c44a3a03063fa9c9e28
|
ce27537b661fca0446f57da40c016e099d82cb34
|
refs/heads/master
| 2021-01-10T07:48:40.811038
| 2015-10-30T07:57:28
| 2015-10-30T07:57:28
| 45,235,253
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,773
|
java
|
package fdms.ui.struts.form;
import org.apache.struts.action.ActionForm;
import org.apache.struts.upload.FormFile;
import com.aldorsolutions.webfdms.beans.DbServices;
import com.aldorsolutions.webfdms.beans.DbVisitations;
public class ObitAsimasForm extends ActionForm{
public ObitAsimasForm(){
}
private DbServices srv = new DbServices();
private DbVisitations visitation1 = new DbVisitations();
private DbVisitations visitation2 = new DbVisitations();
private DbVisitations visitation3 = new DbVisitations();
private String firstName="";
private String lastName="";
private String dateOfBirth="";
private String dateOfDeath="";
private String serviceDate="";
private String obituaryText="";
// private String imageFile;.
private String url="";
private long asimasId ;
private FormFile fileName;
/**
* @return the dateOfBirth
*/
public String getDateOfBirth() {
return dateOfBirth;
}
/**
* @param dateOfBirth the dateOfBirth to set
*/
public void setDateOfBirth(String dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
/**
* @return the dateOfDeath
*/
public String getDateOfDeath() {
return dateOfDeath;
}
/**
* @param dateOfDeath the dateOfDeath to set
*/
public void setDateOfDeath(String dateOfDeath) {
this.dateOfDeath = dateOfDeath;
}
/**
* @return the firstName
*/
public String getFirstName() {
return firstName;
}
/**
* @param firstName the firstName to set
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
* @return the lastName
*/
public String getLastName() {
return lastName;
}
/**
* @param lastName the lastName to set
*/
public void setLastName(String lastName) {
this.lastName = lastName;
}
/**
* @return the obituaryText
*/
public String getObituaryText() {
return obituaryText;
}
/**
* @param obituaryText the obituaryText to set
*/
public void setObituaryText(String obituaryText) {
this.obituaryText = obituaryText;
}
/**
* @return the url
*/
public String getUrl() {
return url;
}
/**
* @param url the url to set
*/
public void setUrl(String url) {
this.url = url;
}
/**
* @return the serviceDate
*/
public String getServiceDate() {
return serviceDate;
}
/**
* @param serviceDate the serviceDate to set
*/
public void setServiceDate(String serviceDate) {
this.serviceDate = serviceDate;
}
/**
* @return the srv
*/
public DbServices getSrv() {
return srv;
}
/**
* @param srv the srv to set
*/
public void setSrv(DbServices srv) {
this.srv = srv;
}
/**
* @return the visitation1
*/
public DbVisitations getVisitation1() {
return visitation1;
}
/**
* @param visitation1 the visitation1 to set
*/
public void setVisitation1(DbVisitations visitation1) {
this.visitation1 = visitation1;
}
/**
* @return the visitation2
*/
public DbVisitations getVisitation2() {
return visitation2;
}
/**
* @param visitation2 the visitation2 to set
*/
public void setVisitation2(DbVisitations visitation2) {
this.visitation2 = visitation2;
}
/**
* @return the visitation3
*/
public DbVisitations getVisitation3() {
return visitation3;
}
/**
* @param visitation3 the visitation3 to set
*/
public void setVisitation3(DbVisitations visitation3) {
this.visitation3 = visitation3;
}
/**
* @return the asimasId
*/
public long getAsimasId() {
return asimasId;
}
/**
* @param asimasId the asimasId to set
*/
public void setAsimasId(long asimasId) {
this.asimasId = asimasId;
}
/**
* @return the fileName
*/
public FormFile getFileName() {
return fileName;
}
/**
* @param fileName the fileName to set
*/
public void setFileName(FormFile fileName) {
this.fileName = fileName;
}
}
|
[
"mahendrakawde@gmail.com"
] |
mahendrakawde@gmail.com
|
ab53ec041396e35dfa91d97def13606791883eea
|
b9c4ecc88aa5a63f553086632b1ff9ab9194b29a
|
/Chapter14/App13/src/main/java/net/homenet/configuration/FrontDeskConfiguration.java
|
2b16d23fb96a8dcd9e6e6fa8d6c3cf1b6a2e7b2c
|
[] |
no_license
|
mousesd/Spring5Recipe
|
69c2fcf719274fb1f53de59289684734fff0225e
|
fa3cbcb83de41ab02150443c14068954fa0ab9f0
|
refs/heads/master
| 2020-03-31T01:59:05.007582
| 2019-02-13T15:33:42
| 2019-02-13T15:33:42
| 151,796,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,983
|
java
|
package net.homenet.configuration;
import net.homenet.FrontDesk;
import net.homenet.FrontDeskImpl;
import net.homenet.MailMessageConverter;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.connection.JmsTransactionManager;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
@SuppressWarnings("Duplicates")
@Configuration
@EnableTransactionManagement
public class FrontDeskConfiguration {
@Bean
public ConnectionFactory connectionFactory() {
return new ActiveMQConnectionFactory("tcp://192.168.222.128:61616");
}
@Bean
public PlatformTransactionManager transactionManager(ConnectionFactory connectionFactory) {
return new JmsTransactionManager(connectionFactory);
}
@Bean
public Destination destination() {
return new ActiveMQQueue("mail.queue");
}
@Bean
public MailMessageConverter mailMessageConverter() {
return new MailMessageConverter();
}
@Bean
public JmsTemplate jmsTemplate(ConnectionFactory connectionFactory
, Destination destination
, MailMessageConverter mailMessageConverter) {
JmsTemplate jmsTemplate = new JmsTemplate();
jmsTemplate.setConnectionFactory(connectionFactory);
jmsTemplate.setDefaultDestination(destination);
jmsTemplate.setMessageConverter(mailMessageConverter);
return jmsTemplate;
}
@Bean
public FrontDesk frontDesk(JmsTemplate jmsTemplate) {
FrontDeskImpl frontDesk = new FrontDeskImpl();
frontDesk.setJmsTemplate(jmsTemplate);
return frontDesk;
}
}
|
[
"mousesd@gmail.com"
] |
mousesd@gmail.com
|
2142f8ee32ea336909bf52ce35bd128ffbffaab3
|
0d3b137f74ae72b42348a898d1d7ce272d80a73b
|
/src/main/java/com/dingtalk/api/response/OapiAlitripBtripAddressGetResponse.java
|
4bd0756c1c3b5905f09f1078e2f48572334b65d9
|
[] |
no_license
|
devezhao/dingtalk-sdk
|
946eaadd7b266a0952fb7a9bf22b38529ee746f9
|
267ff4a7569d24465d741e6332a512244246d814
|
refs/heads/main
| 2022-07-29T22:58:51.460531
| 2021-08-31T15:51:20
| 2021-08-31T15:51:20
| 401,749,078
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,770
|
java
|
package com.dingtalk.api.response;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.TaobaoObject;
import com.taobao.api.TaobaoResponse;
/**
* TOP DingTalk-API: dingtalk.oapi.alitrip.btrip.address.get response.
*
* @author top auto create
* @since 1.0, null
*/
public class OapiAlitripBtripAddressGetResponse extends TaobaoResponse {
private static final long serialVersionUID = 1578935652654813547L;
/**
* 错误码
*/
@ApiField("errcode")
private Long errcode;
/**
* 错误信息
*/
@ApiField("errmsg")
private String errmsg;
/**
* 结果对象
*/
@ApiField("result")
private OpenApiJumpInfoRs result;
/**
* 成功标识
*/
@ApiField("success")
private Boolean success;
public void setErrcode(Long errcode) {
this.errcode = errcode;
}
public Long getErrcode( ) {
return this.errcode;
}
public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
}
public String getErrmsg( ) {
return this.errmsg;
}
public void setResult(OpenApiJumpInfoRs result) {
this.result = result;
}
public OpenApiJumpInfoRs getResult( ) {
return this.result;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public Boolean getSuccess( ) {
return this.success;
}
public boolean isSuccess() {
return getErrcode() == null || getErrcode().equals(0L);
}
/**
* 结果对象
*
* @author top auto create
* @since 1.0, null
*/
public static class OpenApiJumpInfoRs extends TaobaoObject {
private static final long serialVersionUID = 6475518241749648976L;
/**
* 访问地址
*/
@ApiField("url")
private String url;
public String getUrl() {
return this.url;
}
public void setUrl(String url) {
this.url = url;
}
}
}
|
[
"zhaofang123@gmail.com"
] |
zhaofang123@gmail.com
|
287e51a90e7f147010627a3dfe6950391c8df8f9
|
5a4d28e8348e3e4a248e7f80bc464f5410b03e09
|
/rest/java-brains/advance-jax-rs-06/src/main/java/com/javamultiplex/rest/client/RestClientGET.java
|
f2de5fa569c766fdeb513e1a4a7eb951d1defa5e
|
[] |
no_license
|
javamultiplex/java-webservices
|
931bf120324095d352bc1898407793c6be5c5b20
|
c540af2238fddc04cafabe8656780bc7fd275246
|
refs/heads/master
| 2021-09-04T01:09:37.463106
| 2018-01-13T18:44:32
| 2018-01-13T18:44:32
| 117,375,645
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 957
|
java
|
package com.javamultiplex.rest.client;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import com.javamultiplex.messanger.model.Message;
public class RestClientGET {
public static void main(String[] args) {
Client client=ClientBuilder.newClient();
/*String response = client
.target("http://localhost:8050/advance-jax-rs-01/webapi/messages/2")
.request()
.get(String.class);*/
WebTarget baseTarget = client.target("http://localhost:8050/advance-jax-rs-01/webapi");
WebTarget messageTarget = baseTarget.path("messages");
WebTarget singleMessageTarget = messageTarget.path("{messageId}");
Message message = singleMessageTarget.resolveTemplate("messageId", "2").request().get(Message.class);
//Message message = response.readEntity(Message.class);
//System.out.println(message.getMessage());
System.out.println(message.getMessage());
}
}
|
[
"programmingwithrohit@gmail.com"
] |
programmingwithrohit@gmail.com
|
9efb40143031b1fbdea0953ceef8b8a0a0f91e70
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/82/150.java
|
1d06b3ca359c8d0fae229b655be4470d2b768209
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 873
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int a;
int b;
int c = 0;
int e;
int n;
int i;
int k;
int[] sz = new int[100];
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
for (i = 0;i < n;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
a = Integer.parseInt(tempVar2);
}
String tempVar3 = ConsoleInput.scanfRead();
if (tempVar3 != null)
{
b = Integer.parseInt(tempVar3);
}
if (a >= 90 && a <= 140 && b >= 60 && b <= 90)
{
sz[c]++;
}
else
{
c++;
}
}
for (i = 0;i < 99;i++)
{
for (k = 0;k < 99 - i;k++)
{
if (sz[k] > sz[k + 1])
{
e = sz[k];
sz[k] = sz[k + 1];
sz[k + 1] = e;
}
}
}
System.out.printf("%d",sz[99]);
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
00011ba31e0052d8e51df1929e4ad0b82e5347a4
|
593a82eab25505e5f1a4b76e5608c4b3fccf8412
|
/src/main/java/com/famessoft/oplus/jat/web/rest/errors/CustomParameterizedException.java
|
49d0f141e04baf94bee2da5be17854df23dcb390
|
[] |
no_license
|
coding99/oplusJat
|
6484a03e44e27379cce0ca22faf1643771b414af
|
b0b41f92fc6bc7f4fd018039813b98677c89f789
|
refs/heads/master
| 2021-08-15T00:37:42.553246
| 2017-11-17T02:45:31
| 2017-11-17T02:45:31
| 111,040,742
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,741
|
java
|
package com.famessoft.oplus.jat.web.rest.errors;
import org.zalando.problem.AbstractThrowableProblem;
import java.util.HashMap;
import java.util.Map;
import static org.zalando.problem.Status.BAD_REQUEST;
/**
* Custom, parameterized exception, which can be translated on the client side.
* For example:
*
* <pre>
* throw new CustomParameterizedException("myCustomError", "hello", "world");
* </pre>
*
* Can be translated with:
*
* <pre>
* "error.myCustomError" : "The server says {{param0}} to {{param1}}"
* </pre>
*/
public class CustomParameterizedException extends AbstractThrowableProblem {
private static final long serialVersionUID = 1L;
private static final String PARAM = "param";
public CustomParameterizedException(String message, String... params) {
this(message, toParamMap(params));
}
public CustomParameterizedException(String message, Map<String, Object> paramMap) {
super(ErrorConstants.PARAMETERIZED_TYPE, "Parameterized Exception", BAD_REQUEST, null, null, null, toProblemParameters(message, paramMap));
}
public static Map<String, Object> toParamMap(String... params) {
Map<String, Object> paramMap = new HashMap<>();
if (params != null && params.length > 0) {
for (int i = 0; i < params.length; i++) {
paramMap.put(PARAM + i, params[i]);
}
}
return paramMap;
}
public static Map<String, Object> toProblemParameters(String message, Map<String, Object> paramMap) {
Map<String, Object> parameters = new HashMap<>();
parameters.put("message", message);
parameters.put("params", paramMap);
return parameters;
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
ba063921a7a7f8354d696fc495317e81119efe46
|
f1d567b5664ba4db93b9527dbc645b76babb5501
|
/src/com/javarush/test/level22/lesson18/big01/KeyboardObserver.java
|
e3a0f24b3eaa62e2a9d9686b49434e4ebb67df66
|
[] |
no_license
|
zenonwch/JavaRushEducation
|
8b619676ba7f527497b5a657b060697925cf0d8c
|
73388fd058bdd01f1673f87ab309f89f98e38fb4
|
refs/heads/master
| 2020-05-21T20:31:07.794128
| 2016-11-12T16:28:22
| 2016-11-12T16:28:22
| 65,132,378
| 8
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,424
|
java
|
package com.javarush.test.level22.lesson18.big01;
import javax.swing.*;
import java.awt.*;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;
public class KeyboardObserver extends Thread {
private Queue<KeyEvent> keyEvents = new ArrayBlockingQueue<KeyEvent>(100);
private JFrame frame;
@Override
public void run() {
frame = new JFrame("KeyPress Tester");
frame.setTitle("Transparent JFrame Demo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setUndecorated(true);
frame.setSize(400, 400);
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.setLayout(new GridBagLayout());
frame.setOpacity(0.0f);
frame.setVisible(true);
frame.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
//do nothing
}
@Override
public void focusLost(FocusEvent e) {
System.exit(0);
}
});
frame.addKeyListener(new KeyListener() {
public void keyTyped(KeyEvent e) {
//do nothing
}
public void keyReleased(KeyEvent e) {
//do nothing
}
public void keyPressed(KeyEvent e) {
keyEvents.add(e);
}
});
}
public boolean hasKeyEvents() {
return !keyEvents.isEmpty();
}
public KeyEvent getEventFromTop() {
return keyEvents.poll();
}
}
|
[
"andrey.veshtard@ctco.lv"
] |
andrey.veshtard@ctco.lv
|
dbcf603937b45ad7e517cadeb5475c4f370cdcb2
|
83959e6624e6b3e4f3824171f115ef8de1f96848
|
/hsbank_cms/src/com/thinkgem/jeesite/modules/api/frame/generator/obj/API.java
|
0ea060523fa5e965f2e85f35d6fbf57e226795c6
|
[] |
no_license
|
cash2one/ionic
|
6deefa2c62b644745b08f03a69db8efdd11dd9d4
|
be29386e5e9fdbbde66dd636c72454eed3720919
|
refs/heads/master
| 2020-05-23T22:45:09.813492
| 2016-11-08T03:01:04
| 2016-11-08T03:01:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 625
|
java
|
package com.thinkgem.jeesite.modules.api.frame.generator.obj;
import java.util.Map;
/**
* Created by 万端瑞 on 2016/5/19.
*/
public class API extends APIObjectNode {
private String dataNodePath;
public API(String dataNodePath){
this.dataNodePath = dataNodePath;
}
public API(Map<String,Object> api){
this.putAll(api);
}
public API putDataChildNode(String path, Object apiNode){
this.putNodeWithObject(dataNodePath+"."+path,apiNode);
return this;
}
public void putDataNode(Object apiNode){
this.putNodeWithObject(dataNodePath,apiNode);
}
}
|
[
"jiaoxiaojie@fdjf.net"
] |
jiaoxiaojie@fdjf.net
|
21f65d6b10a278d776666289168bfc7c1a25c4d8
|
ebd7e550aa4536d5e0dfb1b56ce4854d065dbbc2
|
/app/src/main/java/portfolio/adx2099/com/myportfolio/MainActivity.java
|
6f6516b9eaa1d47b9349160783ee8f62852abbbe
|
[] |
no_license
|
ADX2099/my-app-portfolio
|
dfcfa4855d0826ac77b57193aab266c198119a2e
|
205f3b2aa55bf525b4bd62657b3168398c72a53b
|
refs/heads/master
| 2020-05-30T14:28:15.909015
| 2015-06-09T18:54:58
| 2015-06-09T18:54:58
| 37,151,798
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,417
|
java
|
package portfolio.adx2099.com.myportfolio;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final Button spotifyButton = (Button) findViewById(R.id.button);
spotifyButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Toast toast = Toast.makeText(getApplicationContext(), "This button will launch my spotify App", Toast.LENGTH_SHORT);
toast.show();
}
});
final Button scoreButton = (Button) findViewById(R.id.button2);
scoreButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Toast toast = Toast.makeText(getApplicationContext(),"This button will launch my Score App",Toast.LENGTH_SHORT);
toast.show();
}
});
final Button libraryButton = (Button) findViewById(R.id.button3);
libraryButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Toast toast = Toast.makeText(getApplicationContext(),"This button will launch my library App",Toast.LENGTH_SHORT);
toast.show();
}
});
final Button buildButton = (Button) findViewById(R.id.button4);
buildButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Toast toast = Toast.makeText(getApplicationContext(),"This button will launch my Build App",Toast.LENGTH_SHORT);
toast.show();
}
});
final Button xyzButton = (Button) findViewById(R.id.button5);
xyzButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Toast toast = Toast.makeText(getApplicationContext(),"This button will launch my XYZ App",Toast.LENGTH_SHORT);
toast.show();
}
});
final Button capstoneButton = (Button) findViewById(R.id.button6);
capstoneButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Toast toast = Toast.makeText(getApplicationContext(),"This button will launch my Capstone App",Toast.LENGTH_SHORT);
toast.show();
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
|
[
"root@ip-10-47-174-141.ec2.internal"
] |
root@ip-10-47-174-141.ec2.internal
|
515ee419713ac309e070302abc665b83d6f3d47f
|
16c47353da26311e1b37cc8f59b6bd6e0b89b950
|
/extensions/hazelcast/runtime/src/main/java/org/apache/camel/quarkus/component/hazelcast/runtime/HazelcastSubstitutions.java
|
920a3be0dd37853aa4642a344f72b9de6fa25036
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
apache/camel-quarkus
|
8776c1d97941d3eceb58d889d7cbb6a2e7bfcf8e
|
038810b4144fd834460fb65a1e9c701590aab9d1
|
refs/heads/main
| 2023-09-01T17:54:31.555282
| 2023-09-01T10:24:09
| 2023-09-01T13:44:23
| 193,065,376
| 236
| 196
|
Apache-2.0
| 2023-09-14T17:29:35
| 2019-06-21T08:55:25
|
Java
|
UTF-8
|
Java
| false
| false
| 1,692
|
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.camel.quarkus.component.hazelcast.runtime;
import com.hazelcast.config.Config;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
public class HazelcastSubstitutions {
}
/**
* Force usage of Hazelcast client
*/
@TargetClass(Hazelcast.class)
final class Target_Hazelcast {
@Substitute
public static HazelcastInstance newHazelcastInstance(Config config) {
throw new UnsupportedOperationException(
"Hazelcast node mode is not supported. Please use client mode.");
}
@Substitute
public static HazelcastInstance getOrCreateHazelcastInstance(Config config) {
throw new UnsupportedOperationException(
"Hazelcast node mode is not supported. Please use client mode.");
}
}
|
[
"ppalaga@redhat.com"
] |
ppalaga@redhat.com
|
119e8a78fd8fe3b2a02dcb78a20a056c400b8b93
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/MATH-61b-2-25-Single_Objective_GGA-WeightedSum-BasicBlockCoverage-opt/org/apache/commons/math/distribution/PoissonDistributionImpl_ESTest_scaffolding.java
|
d78fd1f78747e6af4ac3395d28c6d0a1973db0ec
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,178
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Oct 26 22:24:02 UTC 2021
*/
package org.apache.commons.math.distribution;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class PoissonDistributionImpl_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.distribution.PoissonDistributionImpl";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(PoissonDistributionImpl_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.math.random.JDKRandomGenerator",
"org.apache.commons.math.exception.NumberIsTooSmallException",
"org.apache.commons.math.distribution.ChiSquaredDistribution",
"org.apache.commons.math.MathException",
"org.apache.commons.math.exception.NonMonotonousSequenceException",
"org.apache.commons.math.distribution.ContinuousDistribution",
"org.apache.commons.math.distribution.WeibullDistribution",
"org.apache.commons.math.util.FastMath",
"org.apache.commons.math.random.RandomAdaptorTest$ConstantGenerator",
"org.apache.commons.math.util.MathUtils",
"org.apache.commons.math.distribution.IntegerDistribution",
"org.apache.commons.math.ConvergenceException",
"org.apache.commons.math.exception.NotStrictlyPositiveException",
"org.apache.commons.math.random.Well19937c",
"org.apache.commons.math.distribution.PoissonDistribution",
"org.apache.commons.math.random.Well19937a",
"org.apache.commons.math.distribution.WeibullDistributionImpl",
"org.apache.commons.math.analysis.UnivariateRealFunction",
"org.apache.commons.math.distribution.PascalDistribution",
"org.apache.commons.math.special.Gamma$1",
"org.apache.commons.math.distribution.GammaDistribution",
"org.apache.commons.math.util.ContinuedFraction",
"org.apache.commons.math.distribution.Distribution",
"org.apache.commons.math.random.RandomGenerator",
"org.apache.commons.math.exception.MathIllegalArgumentException",
"org.apache.commons.math.distribution.FDistributionImpl",
"org.apache.commons.math.distribution.NormalDistribution",
"org.apache.commons.math.distribution.SaddlePointExpansion",
"org.apache.commons.math.distribution.HypergeometricDistributionImpl",
"org.apache.commons.math.exception.MathIllegalNumberException",
"org.apache.commons.math.MathRuntimeException",
"org.apache.commons.math.distribution.BinomialDistribution",
"org.apache.commons.math.distribution.ZipfDistributionImpl",
"org.apache.commons.math.MathRuntimeException$1",
"org.apache.commons.math.MathRuntimeException$2",
"org.apache.commons.math.MathRuntimeException$3",
"org.apache.commons.math.MathRuntimeException$4",
"org.apache.commons.math.random.AbstractRandomGenerator",
"org.apache.commons.math.random.Well44497b",
"org.apache.commons.math.MathRuntimeException$5",
"org.apache.commons.math.random.Well44497a",
"org.apache.commons.math.MathRuntimeException$6",
"org.apache.commons.math.distribution.NormalDistributionImpl",
"org.apache.commons.math.MathRuntimeException$7",
"org.apache.commons.math.MathRuntimeException$8",
"org.apache.commons.math.MathRuntimeException$10",
"org.apache.commons.math.MathRuntimeException$9",
"org.apache.commons.math.MathRuntimeException$11",
"org.apache.commons.math.distribution.ExponentialDistribution",
"org.apache.commons.math.distribution.GammaDistributionImpl",
"org.apache.commons.math.distribution.AbstractIntegerDistribution",
"org.apache.commons.math.random.RandomData",
"org.apache.commons.math.distribution.HasDensity",
"org.apache.commons.math.random.MersenneTwister",
"org.apache.commons.math.random.AbstractWell",
"org.apache.commons.math.distribution.HypergeometricDistribution",
"org.apache.commons.math.special.Erf",
"org.apache.commons.math.random.RandomDataImpl",
"org.apache.commons.math.distribution.BetaDistributionImpl",
"org.apache.commons.math.distribution.PascalDistributionImpl",
"org.apache.commons.math.exception.NumberIsTooLargeException",
"org.apache.commons.math.distribution.BetaDistribution",
"org.apache.commons.math.distribution.CauchyDistributionImpl",
"org.apache.commons.math.MaxIterationsExceededException",
"org.apache.commons.math.distribution.CauchyDistribution",
"org.apache.commons.math.special.Gamma",
"org.apache.commons.math.distribution.FDistribution",
"org.apache.commons.math.exception.util.Localizable",
"org.apache.commons.math.random.Well1024a",
"org.apache.commons.math.random.Well512a",
"org.apache.commons.math.FunctionEvaluationException",
"org.apache.commons.math.distribution.TDistribution",
"org.apache.commons.math.distribution.ExponentialDistributionImpl",
"org.apache.commons.math.distribution.DiscreteDistribution",
"org.apache.commons.math.distribution.BinomialDistributionImpl",
"org.apache.commons.math.random.TestRandomGenerator",
"org.apache.commons.math.random.BitsStreamGenerator",
"org.apache.commons.math.distribution.TDistributionImpl",
"org.apache.commons.math.distribution.AbstractContinuousDistribution",
"org.apache.commons.math.exception.util.LocalizedFormats",
"org.apache.commons.math.distribution.PoissonDistributionImpl",
"org.apache.commons.math.distribution.ChiSquaredDistributionImpl",
"org.apache.commons.math.random.RandomAdaptor",
"org.apache.commons.math.distribution.ZipfDistribution",
"org.apache.commons.math.distribution.AbstractDistribution"
);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
5000c91e9af061cb4c20dac36e248756bc1fc2ad
|
7a30394458e2e34e905a828c2a6e4d5eca6a9f54
|
/src/main/java/ml/wonwoo/zookeepermanager/converter/CreateModeConverter.java
|
5c106c8bb7d6f9ae0432d6c054ccd5584acc65a8
|
[] |
no_license
|
wonwoo/zookeeper-manager
|
e67d026e959a53e55a05cd04ad044e810e0e8fad
|
b778eb1b342b98fd4a999ef8a64a901b828e20ac
|
refs/heads/master
| 2020-03-22T11:27:36.812879
| 2018-07-18T11:02:15
| 2018-07-18T11:02:15
| 139,971,997
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 576
|
java
|
package ml.wonwoo.zookeepermanager.converter;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;
@Component
public class CreateModeConverter implements Converter<String, CreateMode> {
@Override
public CreateMode convert(String source) {
try {
return CreateMode.fromFlag(Integer.valueOf(source));
} catch (KeeperException e) {
throw new IllegalArgumentException("createMode not converter", e);
}
}
}
|
[
"aoruqjfu@gmail.com"
] |
aoruqjfu@gmail.com
|
650efd071e3499b8c58451470a51c4ac184ed4f0
|
4769e4b9b92d5845fbc444c81de6d257b096e6f8
|
/src/com/ccic/test/ThreadTest.java
|
8d2a06196f0c6af33db3a9cfa2459b472698d0b8
|
[] |
no_license
|
JacksonHuang2019/MyNote
|
02a0d2ea975574d01ddea07154943d32b5a6a291
|
bae81cfc66e199e2efa33ace4cdb692596f54c98
|
refs/heads/master
| 2020-08-09T17:05:36.130284
| 2020-04-14T04:33:31
| 2020-04-14T04:33:31
| 214,128,696
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 730
|
java
|
package com.ccic.test;
/**
* @Author :hzs
* @Date :Created in 17:55 2019/11/12
* @Description :
* Modified By :
* @Version :
**/
public class ThreadTest extends Thread {
private final static int DEFAULT_VALUE = 100;
private int maxValue = 0;
private String threadName = "";
public ThreadTest(String threadName) {
this(threadName,DEFAULT_VALUE);
}
public ThreadTest(String threadName, int defaultValue)
{
this.maxValue = defaultValue;
this.threadName = threadName;
}
@Override
public void run(){
int i = 0;
while (maxValue > i ){
i ++;
System.out.println("Thread:"+threadName + " : "+i );
}
}
}
|
[
"zhangsan@163.com"
] |
zhangsan@163.com
|
e48d34298cdc743900e35da9d26ce476d52e15cd
|
4fa232f72e8c865b80926b18bcd79ab3f6d808c9
|
/app/src/main/java/com/sunfusheng/gank/model/GankItem.java
|
f2fc2972701aa69e8b54994c7101e127bbd3c74d
|
[] |
no_license
|
xinlongyang/RxGank
|
9b5280e269cfc270166082ac6525f04991fa7077
|
75685ee0226b2f2db33419d6bef8ea627b7d815b
|
refs/heads/master
| 2021-01-15T18:40:52.391903
| 2017-06-18T04:19:06
| 2017-06-18T04:19:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,615
|
java
|
package com.sunfusheng.gank.model;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;
/**
* Created by sunfusheng on 2017/1/17.
*/
public class GankItem implements Parcelable {
public String _id;
public String type;
public String desc;
public String who;
public String url;
public ArrayList<String> images;
public String createdAt;
public String publishedAt;
public GankItem() {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this._id);
dest.writeString(this.type);
dest.writeString(this.desc);
dest.writeString(this.who);
dest.writeString(this.url);
dest.writeStringList(this.images);
dest.writeString(this.createdAt);
dest.writeString(this.publishedAt);
}
protected GankItem(Parcel in) {
this._id = in.readString();
this.type = in.readString();
this.desc = in.readString();
this.who = in.readString();
this.url = in.readString();
this.images = in.createStringArrayList();
this.createdAt = in.readString();
this.publishedAt = in.readString();
}
public static final Creator<GankItem> CREATOR = new Creator<GankItem>() {
@Override
public GankItem createFromParcel(Parcel source) {
return new GankItem(source);
}
@Override
public GankItem[] newArray(int size) {
return new GankItem[size];
}
};
}
|
[
"sfsheng0322@gmail.com"
] |
sfsheng0322@gmail.com
|
22eaf8674d3136212fc501c05dac47e6124ea16b
|
0e7f18f5c03553dac7edfb02945e4083a90cd854
|
/target/classes/jooqgen/.../src/main/java/com/br/sp/posgresdocker/model/jooq/pg_catalog/routines/TxidCurrentSnapshot.java
|
98f8088ab63a44544498fd709ebc04c9d5067586
|
[] |
no_license
|
brunomathidios/PostgresqlWithDocker
|
13604ecb5506b947a994cbb376407ab67ba7985f
|
6b421c5f487f381eb79007fa8ec53da32977bed1
|
refs/heads/master
| 2020-03-22T00:54:07.750044
| 2018-07-02T22:20:17
| 2018-07-02T22:20:17
| 139,271,591
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 1,630
|
java
|
/*
* This file is generated by jOOQ.
*/
package com.br.sp.posgresdocker.model.jooq.pg_catalog.routines;
import com.br.sp.posgresdocker.model.jooq.pg_catalog.PgCatalog;
import javax.annotation.Generated;
import org.jooq.Parameter;
import org.jooq.impl.AbstractRoutine;
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.11.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TxidCurrentSnapshot extends AbstractRoutine<Object> {
private static final long serialVersionUID = -1688016493;
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"txid_snapshot\""), false, false);
/**
* Create a new routine call instance
*/
public TxidCurrentSnapshot() {
super("txid_current_snapshot", PgCatalog.PG_CATALOG, org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"txid_snapshot\""));
setReturnParameter(RETURN_VALUE);
}
}
|
[
"brunomathidios@yahoo.com.br"
] |
brunomathidios@yahoo.com.br
|
42b09a54a5773fae42e40459f07915729b634492
|
b7f3edb5b7c62174bed808079c3b21fb9ea51d52
|
/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/AssistantPeekHeightCoordinator.java
|
a9dfca8e739a83b5b20af36fb27130e0e387c412
|
[
"BSD-3-Clause"
] |
permissive
|
otcshare/chromium-src
|
26a7372773b53b236784c51677c566dc0ad839e4
|
64bee65c921db7e78e25d08f1e98da2668b57be5
|
refs/heads/webml
| 2023-03-21T03:20:15.377034
| 2020-11-16T01:40:14
| 2020-11-16T01:40:14
| 209,262,645
| 18
| 21
|
BSD-3-Clause
| 2023-03-23T06:20:07
| 2019-09-18T08:52:07
| null |
UTF-8
|
Java
| false
| false
| 7,778
|
java
|
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.autofill_assistant;
import android.content.Context;
import android.view.View;
import androidx.annotation.IntDef;
import org.chromium.base.Callback;
import org.chromium.chrome.autofill_assistant.R;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
import org.chromium.components.browser_ui.bottomsheet.EmptyBottomSheetObserver;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Coordinator responsible for setting the peek mode and computing the peek height of the AA bottom
* sheet content.
*/
class AssistantPeekHeightCoordinator {
interface Delegate {
/** Set whether only actions and suggestions should be shown below the progress bar. */
void setShowOnlyCarousels(boolean showOnlyCarousels);
/** Called when the peek height changed. */
void onPeekHeightChanged();
}
/**
* The peek mode allows to set what components are visible when the sheet is in the peek
* (minimized) state. This is the java version of the ConfigureViewport::PeekMode enum in
* //components/autofill_assistant/browser/service.proto. DO NOT change this without adapting
* that proto enum.
*/
@IntDef({PeekMode.UNDEFINED, PeekMode.HANDLE, PeekMode.HANDLE_HEADER,
PeekMode.HANDLE_HEADER_CAROUSELS})
@Retention(RetentionPolicy.SOURCE)
@interface PeekMode {
int UNDEFINED = 0;
/** Only show the swipe handle. */
int HANDLE = 1;
/**
* Show the swipe handle, header (status message, poodle, profile icon) and progress bar.
*/
int HANDLE_HEADER = 2;
/** Show swipe handle, header, progress bar, suggestions and actions. */
int HANDLE_HEADER_CAROUSELS = 3;
}
private final View mToolbarView;
private final Delegate mDelegate;
private final BottomSheetController mBottomSheetController;
private final int mToolbarHeightWithoutPaddingBottom;
private final int mDefaultToolbarPaddingBottom;
private final int mChildrenVerticalSpacing;
private int mPeekHeight;
private @PeekMode int mPeekMode = PeekMode.UNDEFINED;
private int mHeaderHeight;
private int mActionsHeight;
AssistantPeekHeightCoordinator(Context context, Delegate delegate,
BottomSheetController bottomSheetController, View toolbarView, View headerView,
View actionsView, @PeekMode int initialMode) {
mToolbarView = toolbarView;
mDelegate = delegate;
mBottomSheetController = bottomSheetController;
mToolbarHeightWithoutPaddingBottom =
context.getResources().getDimensionPixelSize(
R.dimen.autofill_assistant_toolbar_vertical_padding)
+ context.getResources().getDimensionPixelSize(
R.dimen.autofill_assistant_toolbar_swipe_handle_height);
mDefaultToolbarPaddingBottom = context.getResources().getDimensionPixelSize(
R.dimen.autofill_assistant_toolbar_vertical_padding);
mChildrenVerticalSpacing = context.getResources().getDimensionPixelSize(
R.dimen.autofill_assistant_bottombar_vertical_spacing);
// Show only actions if we are in the peek state and peek mode is HANDLE_HEADER_CAROUSELS.
mBottomSheetController.addObserver(new EmptyBottomSheetObserver() {
@Override
public void onSheetStateChanged(int newState) {
maybeShowOnlyCarousels();
}
});
// Listen for height changes in the header and carousel to make sure we always have the
// correct peek height.
mHeaderHeight = headerView.getHeight();
mActionsHeight = actionsView.getHeight();
listenForHeightChange(headerView, this::onHeaderHeightChanged);
listenForHeightChange(actionsView, this::onActionsHeightChanged);
setPeekMode(initialMode);
}
private void onHeaderHeightChanged(int height) {
mHeaderHeight = height;
updateToolbarPadding();
}
private void onActionsHeightChanged(int height) {
mActionsHeight = height;
updateToolbarPadding();
}
private void maybeShowOnlyCarousels() {
mDelegate.setShowOnlyCarousels(
mBottomSheetController.getSheetState() == BottomSheetController.SheetState.PEEK
&& mPeekMode == PeekMode.HANDLE_HEADER_CAROUSELS);
}
/** Call {@code callback} with new height of {@code view} when it changes. */
private void listenForHeightChange(View view, Callback<Integer> callback) {
view.addOnLayoutChangeListener(
(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
int newHeight = bottom - top;
if (newHeight != oldBottom - oldTop) {
callback.onResult(newHeight);
}
});
}
/**
* Set the peek mode. If the peek height changed because of this call,
* Delegate#onPeekHeightChanged() will be called.
*/
void setPeekMode(@PeekMode int peekMode) {
if (peekMode == PeekMode.UNDEFINED) {
throw new IllegalArgumentException("Setting UNDEFINED peek mode is not allowed.");
}
if (peekMode == mPeekMode) return;
mPeekMode = peekMode;
updateToolbarPadding();
maybeShowOnlyCarousels();
}
/** Return the current peek height. */
int getPeekHeight() {
return mPeekHeight;
}
/** Return the current peek mode. */
int getPeekMode() {
return mPeekMode;
}
/**
* Adapt the padding top of the toolbar such that header and carousel are visible if desired.
*/
private void updateToolbarPadding() {
int toolbarPaddingBottom;
switch (mPeekMode) {
case PeekMode.HANDLE:
toolbarPaddingBottom = mDefaultToolbarPaddingBottom;
break;
case PeekMode.HANDLE_HEADER:
toolbarPaddingBottom = mHeaderHeight;
break;
case PeekMode.HANDLE_HEADER_CAROUSELS:
toolbarPaddingBottom = mHeaderHeight;
if (mActionsHeight > 0) {
toolbarPaddingBottom += mActionsHeight;
}
// We decrease the artificial padding we add to the toolbar by 1 pixel to make sure
// that toolbarHeight < contentHeight. This way, when the user swipes the sheet from
// bottom to top, the sheet will enter the SCROLL state and we will show the details
// and PR, which will allow the user to swipe the whole sheet up with all content
// shown. An alternative would be to allow toolbarHeight == contentHeight and try to
// detect swipe/touch events on the sheet, but this alternative is more complex and
// feels less safe than the current workaround.
toolbarPaddingBottom -= 1;
break;
default:
throw new IllegalStateException("Unsupported PeekMode: " + mPeekMode);
}
mToolbarView.setPadding(mToolbarView.getPaddingLeft(), mToolbarView.getPaddingTop(),
mToolbarView.getPaddingRight(), toolbarPaddingBottom);
int newHeight = mToolbarHeightWithoutPaddingBottom + toolbarPaddingBottom;
if (mPeekHeight != newHeight) {
mPeekHeight = newHeight;
mDelegate.onPeekHeightChanged();
}
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
5ec0232b7206d9a5517430735a8ca4d296244bbd
|
9d9ed07951d58baae3c759923dd14f6fd659af8f
|
/src/main/java/me/matamor/pruebas/tema11/ejercicio5/GeneradorItem.java
|
7f43ac41798aca8469b90b7ff6fcfb497d6e837a
|
[] |
no_license
|
MaTaMoR/Pruebas
|
8e40346a9d002ee6f26cae4fa9ee00c5be277864
|
af95c23b70ed232588e69dd985038e1a509c7e04
|
refs/heads/master
| 2023-05-02T07:46:32.634588
| 2021-05-25T14:45:20
| 2021-05-25T14:45:20
| 364,664,490
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 576
|
java
|
package me.matamor.pruebas.tema11.ejercicio5;
import me.matamor.pruebas.lib.Generador;
import me.matamor.pruebas.lib.Randomizer;
public class GeneradorItem implements Generador<Item> {
private Material randomMaterial() {
Material[] materiales = Material.values();
return materiales[Randomizer.randomInt(0, materiales.length - 1)];
}
@Override
public Item generar() {
Material material = randomMaterial();
int cantidad = Randomizer.randomInt(1, material.getStackSize());
return new Item(material, cantidad);
}
}
|
[
"matamor98@hotmail.com"
] |
matamor98@hotmail.com
|
8992f197e917a93420c7836b81b43b70513ba076
|
99380e534cf51b9635fafeec91a740e8521e3ed8
|
/examplejdbc/src/main/java/com/jolbox/bonecp/ConnectionTesterThread.java
|
7c6ee9207a8de355afc590f27187be862af8abc9
|
[] |
no_license
|
khodabakhsh/cxldemo
|
d483c634e41bb2b6d70d32aff087da6fd6985d3f
|
9534183fb6837bfa11d5cad98489fdae0db526f1
|
refs/heads/master
| 2021-01-22T16:53:27.794334
| 2013-04-20T01:44:18
| 2013-04-20T01:44:18
| 38,994,185
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,334
|
java
|
/**
* Copyright 2010 Wallace Wadge
*
* 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.jolbox.bonecp;
import java.sql.SQLException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Periodically sends a keep-alive statement to idle threads
* and kills off any connections that have been unused for a long time (or broken).
* @author wwadge
*
*/
public class ConnectionTesterThread implements Runnable {
/** Connections used less than this time ago are not keep-alive tested. */
private long idleConnectionTestPeriodInMs;
/** Max no of ms to wait before a connection that isn't used is killed off. */
private long idleMaxAgeInMs;
/** Partition being handled. */
private ConnectionPartition partition;
/** Scheduler handle. **/
private ScheduledExecutorService scheduler;
/** Handle to connection pool. */
private BoneCP pool;
/** If true, we're operating in a LIFO fashion. */
private boolean lifoMode;
/** Logger handle. */
private static Logger logger = LoggerFactory.getLogger(ConnectionTesterThread.class);
/** Constructor
* @param connectionPartition partition to work on
* @param scheduler Scheduler handler.
* @param pool pool handle
* @param idleMaxAgeInMs Threads older than this are killed off
* @param idleConnectionTestPeriodInMs Threads that are idle for more than this time are sent a keep-alive.
* @param lifoMode if true, we're running under a lifo fashion.
*/
protected ConnectionTesterThread(ConnectionPartition connectionPartition, ScheduledExecutorService scheduler,
BoneCP pool, long idleMaxAgeInMs, long idleConnectionTestPeriodInMs, boolean lifoMode){
this.partition = connectionPartition;
this.scheduler = scheduler;
this.idleMaxAgeInMs = idleMaxAgeInMs;
this.idleConnectionTestPeriodInMs = idleConnectionTestPeriodInMs;
this.pool = pool;
this.lifoMode = lifoMode;
}
/** Invoked periodically. */
public void run() {
ConnectionHandle connection = null;
long tmp;
try {
long nextCheckInMs = this.idleConnectionTestPeriodInMs;
if (this.idleMaxAgeInMs > 0){
if (this.idleConnectionTestPeriodInMs == 0){
nextCheckInMs = this.idleMaxAgeInMs;
} else {
nextCheckInMs = Math.min(nextCheckInMs, this.idleMaxAgeInMs);
}
}
int partitionSize= this.partition.getAvailableConnections();
long currentTimeInMs = System.currentTimeMillis();
// go thru all partitions
for (int i=0; i < partitionSize; i++){
// grab connections one by one.
connection = this.partition.getFreeConnections().poll();
if (connection != null){
connection.setOriginatingPartition(this.partition);
// check if connection has been idle for too long (or is marked as broken)
if (connection.isPossiblyBroken() ||
((this.idleMaxAgeInMs > 0) && (this.partition.getAvailableConnections() >= this.partition.getMinConnections() && System.currentTimeMillis()-connection.getConnectionLastUsedInMs() > this.idleMaxAgeInMs))){
// kill off this connection - it's broken or it has been idle for too long
closeConnection(connection);
continue;
}
// check if it's time to send a new keep-alive test statement.
if (this.idleConnectionTestPeriodInMs > 0 && (currentTimeInMs-connection.getConnectionLastUsedInMs() > this.idleConnectionTestPeriodInMs) &&
(currentTimeInMs-connection.getConnectionLastResetInMs() >= this.idleConnectionTestPeriodInMs)) {
// send a keep-alive, close off connection if we fail.
if (!this.pool.isConnectionHandleAlive(connection)){
closeConnection(connection);
continue;
}
// calculate the next time to wake up
tmp = this.idleConnectionTestPeriodInMs;
if (this.idleMaxAgeInMs > 0){ // wake up earlier for the idleMaxAge test?
tmp = Math.min(tmp, this.idleMaxAgeInMs);
}
} else {
// determine the next time to wake up (connection test time or idle Max age?)
tmp = this.idleConnectionTestPeriodInMs-(currentTimeInMs - connection.getConnectionLastResetInMs());
long tmp2 = this.idleMaxAgeInMs - (currentTimeInMs-connection.getConnectionLastUsedInMs());
if (this.idleMaxAgeInMs > 0){
tmp = Math.min(tmp, tmp2);
}
}
if (tmp < nextCheckInMs){
nextCheckInMs = tmp;
}
if (this.lifoMode){
// we can't put it back normally or it will end up in front again.
if (!((LIFOQueue<ConnectionHandle>)connection.getOriginatingPartition().getFreeConnections()).offerLast(connection)){
connection.internalClose();
}
} else {
this.pool.putConnectionBackInPartition(connection);
}
Thread.sleep(20L); // test slowly, this is not an operation that we're in a hurry to deal with (avoid CPU spikes)...
}
} // throw it back on the queue
this.scheduler.schedule(this, nextCheckInMs, TimeUnit.MILLISECONDS);
} catch (Exception e) {
if (this.scheduler.isShutdown()){
logger.debug("Shutting down connection tester thread.");
} else {
logger.error("Connection tester thread interrupted", e);
}
}
}
/** Closes off this connection
* @param connection to close
*/
private void closeConnection(ConnectionHandle connection) {
if (connection != null) {
try {
connection.internalClose();
} catch (SQLException e) {
logger.error("Destroy connection exception", e);
} finally {
this.pool.postDestroyConnection(connection);
}
}
}
}
|
[
"cxdragon@gmail.com"
] |
cxdragon@gmail.com
|
f191367fe4ca43da7eb9c1ae5c458627a60eeb02
|
e1033a9d3851de78409bbcf6ca9d9e299ebb251e
|
/JavaProject/src/accessmodifier/test/DifferetPackageTester.java
|
e8d78cb2a082707a2a110d6c8b9eaaf81c1e4b38
|
[] |
no_license
|
ravurirajesh777/java
|
b6ca70c3bbdc06b33d0dbdf297b3735ce3f3e359
|
02741f6a8654cde50abe05f054da414125365dca
|
refs/heads/master
| 2023-03-22T20:12:39.370720
| 2021-03-04T02:24:03
| 2021-03-04T02:24:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 971
|
java
|
package accessmodifier.test;
import accessmodifier.*;
public class DifferetPackageTester {
public static void main(String[] args) {
//PublicClass.main(null);
PublicClass p = new PublicClass();
System.out.println(p.publicInt);
//System.out.println(p.de);//default instance variables are not visible outside the package
//System.out.println(p.);//protected instance variables are visible only to the child or with in the same package
//System.out.println(p.l);//private variables are visible only with in the same class
p.publicMethod();
//p.defaultMethod();//default methods are not visible outside the package
//p.protectedMethod();//protected methods are visible only to the child or with in the same package
//p.privateMethod();//private methods are visible only with in the same class
}
public void nonStaticMethod(PublicClass p1) {
PublicClass p = new PublicClass();
//System.out.println(p1.k);
//System.out.println(p.k);
}
}
|
[
"vilas.varghese@gmail.com"
] |
vilas.varghese@gmail.com
|
749b45917b1002381f1856bf20d8cfca3b9f328c
|
7bbc806193820f39f846d6381d10366f187e3dfc
|
/dps/WEB-INF/src/pstk/action/PStk211Action.java
|
c1cb135ccc909660ab398f1a9099e3aa3d9c785f
|
[] |
no_license
|
artmalling/artmalling
|
fc45268b7cf566a2bc2de0549581eeb96505968a
|
0dd2d495d0354a38b05f7986bfb572d7d7dd1b08
|
refs/heads/master
| 2020-03-07T07:55:07.111863
| 2018-03-30T06:51:35
| 2018-03-30T06:51:35
| 127,362,251
| 0
| 0
| null | 2018-03-30T01:05:05
| 2018-03-30T00:45:52
| null |
UTF-8
|
Java
| false
| false
| 4,553
|
java
|
/*
* Copyright (c) 2010 한국후지쯔. All rights reserved.
*
* This software is the confidential and proprietary information of 한국후지쯔.
* You shall not disclose such Confidential Information and shall use it
* only in accordance with the terms of the license agreement you entered into
* with 한국후지쯔
*/
package pstk.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import kr.fujitsu.ffw.control.ActionForm;
import kr.fujitsu.ffw.control.ActionForward;
import kr.fujitsu.ffw.control.ActionMapping;
import kr.fujitsu.ffw.control.DispatchAction;
import kr.fujitsu.ffw.control.cfg.svc.shift.GauceHelper2;
import kr.fujitsu.ffw.control.cfg.svc.shift.MultiInput;
import org.apache.log4j.Logger;
import pstk.dao.PStk211DAO;
import com.gauce.GauceDataSet;
import common.vo.SessionInfo;
/**
* <p>백화점영업관리> 재고수불> 재고실사> 단품별재고실사집계표</p>
*
* @created on 1.0, 2010/05/04
* @created by 이재득
*
* @modified on
* @modified by
* @caused by
*/
public class PStk211Action extends DispatchAction {
/*
* Java Pattern 에서 지원하는 logger를 사용할 수 있도록 객체를 선언
*/
private Logger logger = Logger.getLogger(PStk208Action.class);
/**
* <p>페이지를 로드한다.</p>
*
*/
public ActionForward list(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
String strGoTo = form.getParam("goTo"); // 분기할곳
try {
GauceHelper2.initialize(form, request, response);
} catch (Exception e) {
e.printStackTrace();
logger.error("", e);
}
return mapping.findForward(strGoTo);
}
/**
* <p>
* 품번별재고실사집계표현황을 조회 한다.
* </p>
*
*/
public ActionForward searchMaster(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
List list = null;
GauceHelper2 helper = null;
GauceDataSet dSet = null;
PStk211DAO dao = null;
String strGoTo = form.getParam("goTo"); // 분기할곳
try {
dao = new PStk211DAO();
helper = new GauceHelper2(request, response, form);
dSet = helper.getDataSet("DS_IO_MASTER");
helper.setDataSetHeader(dSet, "H_SEL_MASTER");
list = dao.searchMaster(form);
helper.setListToDataset(list, dSet);
} catch (Exception e) {
logger.error("", e);
helper.writeException("GAUCE", "002", e.getMessage());
} finally {
helper.close(dSet);
}
return mapping.findForward(strGoTo);
}
/**
* <p>
* Detail정보를 조회 한다.
* </p>
*
*/
public ActionForward searchDetail(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
List list = null;
GauceHelper2 helper = null;
GauceDataSet dSet = null;
PStk211DAO dao = null;
String strGoTo = form.getParam("goTo"); // 분기할곳
try {
dao = new PStk211DAO();
helper = new GauceHelper2(request, response, form);
dSet = helper.getDataSet("DS_IO_DETAIL");
helper.setDataSetHeader(dSet, "H_SEL_DETAIL");
list = dao.searchDetail(form);
helper.setListToDataset(list, dSet);
} catch (Exception e) {
logger.error("", e);
helper.writeException("GAUCE", "002", e.getMessage());
} finally {
helper.close(dSet);
}
return mapping.findForward(strGoTo);
}
/**
* <p>
* 품번에따른 재고실사 조회한다.
* </p>
*
*/
public ActionForward searchPbnStk(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
List list = null;
GauceHelper2 helper = null;
GauceDataSet dSet = null;
PStk211DAO dao = null;
String strGoTo = form.getParam("goTo"); // 분기할곳
try {
dao = new PStk211DAO();
helper = new GauceHelper2(request, response, form);
dSet = helper.getDataSet("DS_O_PBNSTK");
helper.setDataSetHeader(dSet, "H_SEL_PBNSTK");
list = dao.searchPbnStk(form);
helper.setListToDataset(list, dSet);
} catch (Exception e) {
logger.error("", e);
helper.writeException("GAUCE", "002", e.getMessage());
} finally {
helper.close(dSet);
}
return mapping.findForward(strGoTo);
}
}
|
[
"HP@HP-PC0000a"
] |
HP@HP-PC0000a
|
e978e4e579029e0a0a47c4f8d32e49a783d9848c
|
c822930d117304feb320841397580ed4ada94251
|
/library-demonstrate/src/main/java/com/example/demonstrate/DialogPage.java
|
0bf846264db697364aec6f0d89b006d409ebe697
|
[] |
no_license
|
AsaLynn/TestWeek0404
|
a4bfb3fa467ad5bdd8ca880f20b6d2b83e1532d0
|
d6f59dcc8f4c625a54d830f927101631b537f8a3
|
refs/heads/master
| 2022-01-08T11:39:02.758502
| 2019-07-06T02:37:53
| 2019-07-06T02:37:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,909
|
java
|
package com.example.demonstrate;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
/**
* Created by think on 2018/3/8.
*/
public class DialogPage implements DialogInterface.OnClickListener {
private Activity mActivity;
private String[] items;
protected static DialogPage mDialogPage;
private OnDialogItemListener mOnPageItemListener;
private OnDialogItemNorListener mOnDialogItemNorListener;
protected DialogPage() {
}
public static DialogPage getInstance() {
if (null == mDialogPage) {
synchronized (DialogPage.class) {
if (null == mDialogPage) {
mDialogPage = new DialogPage();
}
}
}
return mDialogPage;
}
@Override
public void onClick(DialogInterface dialog, int which) {
if (null == mOnPageItemListener) {
DemonstrateUtil.showLogResult("未设置对话框列表监听!!!");
return;
}
if (mOnPageItemListener.getStartActivity(which) == null) {
DemonstrateUtil.showToastResult(mOnPageItemListener.getActivity(), "请设置要跳转的Activity!!!");
return;
}
mOnPageItemListener
.getActivity()
.startActivity(new Intent(mOnPageItemListener.getActivity(), mOnPageItemListener.getStartActivity(which)));
}
public interface OnDialogItemListener {
Activity getActivity();
String getTitle();
Class<?> getStartActivity(int which);
int getDialogListId();
}
public void setOnDialogItemListener(OnDialogItemListener listener) {
mOnPageItemListener = listener;
if (null == mOnPageItemListener) {
return;
}
if (mOnPageItemListener.getActivity() == null) {
return;
}
if (null == items) {
items = mOnPageItemListener.getActivity().getResources().getStringArray(mOnPageItemListener.getDialogListId());/*R.array.items*/
}
DialogUtil.showListDialog(mOnPageItemListener.getActivity(), mOnPageItemListener.getTitle(), items, mDialogPage);
}
public void setOnDialogItemNorListener(Activity activity, OnDialogItemNorListener listener) {
mOnDialogItemNorListener = listener;
if (null == mOnDialogItemNorListener) {
return;
}
DialogUtil.showListDialog(activity, mOnDialogItemNorListener.titile(), mOnDialogItemNorListener.items(), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
mOnDialogItemNorListener.listDialog(which);
}
});
}
public interface OnDialogItemNorListener {
void listDialog(int which);
String titile();
String[] items();
}
}
|
[
"zhang721588@163.com"
] |
zhang721588@163.com
|
19d487f16fab3c5f72a64f2116410b1e4fcbfe50
|
605de50e85d2077315a4c3ba7fbf68e8a435b55a
|
/array.java
|
b6dd1e9a71b570afb7f534eac607cc3c2926356b
|
[] |
no_license
|
ritwik-pandey/Data-structure
|
a67014e852d9d9dddbff3b73e9c1d0a2358d7a37
|
0fa7e3815831e4d5e069f96b7b0ff03913b383d4
|
refs/heads/main
| 2023-04-09T20:15:52.634609
| 2021-04-17T21:58:22
| 2021-04-17T21:58:22
| 358,928,012
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,456
|
java
|
import java.util.*;
class array{
Scanner in = new Scanner(System.in);
int[] array;
int N;
public static void main(String[] args){
array obj = new array();
obj.create();
int WantToContinue = 1;
Scanner in1 = new Scanner(System.in);
do{
System.out.println("\nEnter 1 to create a new array");
System.out.println("Enter 2 to write");
System.out.println("Enter 3 to edit the data in array");
System.out.println("Enter 4 to display the data in array");
System.out.println("Enter 5 to insert a data in array");
System.out.println("Enter 6 to see the size");
System.out.println("Enter 7 to exit");
int choice = in1.nextInt();
switch(choice){
case 1:
obj.create();
break;
case 2:
obj.write();
break;
case 3:
obj.edit();
break;
case 4:
obj.display();
break;
case 5:
obj.insert();
break;
case 6:
obj.size();
break;
case 7:
obj.exit();
break;
default:
System.out.println("Invalid choice");
}
System.out.println("\nPress 1 to continue anything else to exit");
WantToContinue = in1.nextInt();
}while(WantToContinue == 1);
}
void create(){
System.out.println("Enter the size of the array");
N = in.nextInt();
array = new int[N];
display();
}
void write(){
System.out.println("Input:");
for(int i = 0 ; i < N ; ++i){
array[i] = in.nextInt();
}
display();
}
void display(){
for(int i = 0 ; i < N ; ++i){
System.out.print(array[i] + " ");
}
}
void edit(){
System.out.println("Enter the index number");
int index = in.nextInt();
if(index > N){
System.out.println("Out of bounds");
return;
}
System.out.println("Enter the new data");
array[index - 1] = in.nextInt();
display();
}
void insert(){
System.out.println("Enter the index number to insert");
int index = in.nextInt();
if(index > N){
System.out.println("Out of bounds");
return;
}
int arraycopy[] = new int [N];
for(int i = 0 ; i < N ; ++i){
arraycopy[i] = array[i];
}
N = N + 1;
array = new int [N];
System.out.println("Enter your data");
int data = in.nextInt();
for(int i = 0 ; i < N - 1 ; ++i){
array[i] = arraycopy[i];
}
for(int i = N - 1; i > index ; --i ){
array[i] = array[i - 1];
}
array[index] = data;
display();
}
void size(){
System.out.println(N);
}
void exit(){
System.out.println("Thanks for using");
System.exit(0);
}
}
|
[
"you@example.com"
] |
you@example.com
|
52b4e74969a0de40a92cf620381f30e6f316459f
|
ce6410b9428ac0562eba698284f0337e5e2cdbb2
|
/appdemo/src/main/java/com/qiyei/appdemo/activity/ViewPagerTestActivity.java
|
0b6a5a39ccde284699d86f4a38b356507523aea8
|
[] |
no_license
|
xioawuxioawu/EssayJoke
|
6a1a8f1b8b3011eef6793df51b9ebf6262bf223b
|
c11cce16dc15c88b54c344d3baa47101297d60ee
|
refs/heads/master
| 2021-05-15T09:56:20.755132
| 2017-10-18T13:35:07
| 2017-10-18T13:35:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,532
|
java
|
package com.qiyei.appdemo.activity;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.qiyei.framework.activity.BaseSkinActivity;
import com.qiyei.framework.titlebar.CommonTitleBar;
import com.qiyei.sdk.log.LogManager;
import com.qiyei.sdk.util.ToastUtil;
import com.qiyei.sdk.view.ColorTrackTextView;
import com.qiyei.sdk.view.IndicatorView.IndicatorAdapter;
import com.qiyei.sdk.view.IndicatorView.IndicatorView;
import java.util.ArrayList;
import java.util.List;
import com.qiyei.appdemo.R;
import com.qiyei.appdemo.fragment.ItemFragment;
public class ViewPagerTestActivity extends BaseSkinActivity {
private static final String TAG = ViewPagerTestActivity.class.getSimpleName();
private String[] items = {"直播", "推荐", "视频", "图片", "段子", "精华","段友秀", "同城", "游戏"};
//private String[] items = {"直播", "推荐", "视频"};
private IndicatorView mIndicatorView;// 变成通用的
//private List<ColorTrackTextView> mIndicators;
private List<TextView> mIndicators;
private ViewPager mViewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initContentView();
initData();
initView();
}
@Override
protected void initContentView() {
setContentView(R.layout.activity_view_pager_test);
}
@Override
protected void initView() {
CommonTitleBar commonNavigationBar = new CommonTitleBar.Builder(this)
.setTitle("主界面")
.setRightText("投稿")
.setRightClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ToastUtil.showLongToast("点击了右边");
}
})
.build();
mIndicatorView = (IndicatorView) findViewById(R.id.indicator_view);
mViewPager = (ViewPager) findViewById(R.id.view_pager);
initViewPager();
}
@Override
protected void initData() {
mIndicators = new ArrayList<>();
//initIndicator();
}
@Override
public void onClick(View v) {
}
/**
* 初始化ViewPager
*/
private void initViewPager() {
mViewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
@Override
public Fragment getItem(int position) {
return ItemFragment.newInstance(items[position]);
}
@Override
public int getCount() {
return items.length;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
}
});
// 监听ViewPager的滚动
mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
//滚动的过程中会不断的回掉
LogManager.e("TAG", "position --> " + position + " positionOffset --> "
+ positionOffset + " positionOffsetPixels --> " + positionOffsetPixels);
// ColorTrackTextView left = mIndicators.get(position);
// left.setDirection(ColorTrackTextView.Direction.RIGHT_TO_LEFT);
// left.setCurrentProgress(1-positionOffset);
//
// try{
// ColorTrackTextView right = mIndicators.get(position+1);
// right.setDirection(ColorTrackTextView.Direction.LEFT_TO_RIGHT);
// right.setCurrentProgress(positionOffset);
// }catch (Exception e){
// e.printStackTrace();
// }
}
@Override
public void onPageSelected(int position) {
// 选中毁掉
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
mIndicatorView.setAdapter(new IndicatorAdapter(){
@Override
public int getCount() {
return items.length ;
}
@Override
public View getView(int position, ViewGroup parent) {
TextView colorTrackTextView = new TextView(ViewPagerTestActivity.this);
colorTrackTextView.setWidth(400);
// 设置颜色
colorTrackTextView.setTextSize(14);
colorTrackTextView.setGravity(Gravity.CENTER);
// colorTrackTextView.setChangeColor(Color.RED);
colorTrackTextView.setText(items[position]);
colorTrackTextView.setTextColor(Color.BLACK);
colorTrackTextView.setBackgroundColor(Color.BLUE);
int padding = 20;
colorTrackTextView.setPadding(padding,padding,padding,padding);
// mIndicators.add(colorTrackTextView);
return colorTrackTextView;
}
@Override
public void highLightIndicator(View view) {
TextView textView = (TextView) view;
textView.setTextColor(Color.RED);
LogManager.d(TAG,"highLightIndicator,textView:" + Color.RED);
}
@Override
public void restoreIndicator(View view) {
TextView textView = (TextView) view;
textView.setTextColor(Color.BLACK);
LogManager.d(TAG,"restoreIndicator,textView:" + Color.BLACK);
}
@Override
public View getBottomTrackView() {
View view = new View(ViewPagerTestActivity.this);
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(300,50);
view.setLayoutParams(params);
view.setBackgroundColor(Color.GREEN);
return view;
}
},mViewPager);
}
/**
* 初始化可变色的指示器
*/
private void initIndicator() {
for (int i = 0; i < items.length; i++) {
// 动态添加颜色跟踪的TextView
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
params.weight = 1;
//params.setMargins(20,0,0,0);
ColorTrackTextView colorTrackTextView = new ColorTrackTextView(this);
// 设置颜色
colorTrackTextView.setTextSize(20);
colorTrackTextView.setGravity(Gravity.CENTER);
colorTrackTextView.setBackgroundColor(Color.BLUE);
colorTrackTextView.setChangeColor(Color.RED);
colorTrackTextView.setWidth(400 );
colorTrackTextView.setText(items[i]);
colorTrackTextView.setLayoutParams(params);
// 把新的加入LinearLayout容器
//mIndicatorView.addView(colorTrackTextView);
// 加入集合
mIndicators.add(colorTrackTextView);
}
}
}
|
[
"1273482124@qq.com"
] |
1273482124@qq.com
|
87f75795a48747f3e57e0e1d24db4004e5d90949
|
bb45ca5f028b841ca0a08ffef60cedc40090f2c1
|
/app/src/main/java/com/MCWorld/module/topic/k$25.java
|
55c730598e2c33f1f366eb0582f0b36b9a44b290
|
[] |
no_license
|
tik5213/myWorldBox
|
0d248bcc13e23de5a58efd5c10abca4596f4e442
|
b0bde3017211cc10584b93e81cf8d3f929bc0a45
|
refs/heads/master
| 2020-04-12T19:52:17.559775
| 2017-08-14T05:49:03
| 2017-08-14T05:49:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,108
|
java
|
package com.MCWorld.module.topic;
import com.MCWorld.data.topic.TopicItem;
import com.MCWorld.framework.base.http.io.Response.Listener;
import com.MCWorld.framework.base.notification.EventNotifyCenter;
import com.MCWorld.module.h;
import com.MCWorld.module.w;
/* compiled from: TopicModule2 */
class k$25 implements Listener<w> {
final /* synthetic */ k aCN;
final /* synthetic */ TopicItem aCQ;
final /* synthetic */ boolean aCR;
k$25(k this$0, TopicItem topicItem, boolean z) {
this.aCN = this$0;
this.aCQ = topicItem;
this.aCR = z;
}
public /* synthetic */ void onResponse(Object obj) {
a((w) obj);
}
public void a(w info) {
if (info == null || !info.isSucc()) {
EventNotifyCenter.notifyEvent(h.class, h.aru, new Object[]{Boolean.valueOf(false), info, Long.valueOf(this.aCQ.getPostID()), Boolean.valueOf(this.aCR)});
return;
}
EventNotifyCenter.notifyEvent(h.class, h.aru, new Object[]{Boolean.valueOf(true), info, Long.valueOf(this.aCQ.getPostID()), Boolean.valueOf(this.aCR)});
}
}
|
[
"18631616220@163.com"
] |
18631616220@163.com
|
a99f167872b018c98f5b5e99172a2f56b9f6bce9
|
3e10fdc56fbc80532471d7bb67e1bd4d44e9199d
|
/src/test/java/com/vinaylogics/recipeapp/controllers/IndexesControllerTest.java
|
74a94b3bcdb482516b269ffc11f62110f3a7851b
|
[] |
no_license
|
VinayagamD/Recipe-App
|
7f51ec5eed368d07e7c43f62944072a04a3caa60
|
ad9f874db6d5c7d981134531ea8d710d51cb7ea0
|
refs/heads/master
| 2020-05-24T16:55:55.016396
| 2019-07-01T12:32:17
| 2019-07-01T12:32:17
| 187,372,103
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,493
|
java
|
package com.vinaylogics.recipeapp.controllers;
import com.vinaylogics.recipeapp.domain.Recipe;
import com.vinaylogics.recipeapp.services.RecipeService;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.ui.Model;
import java.util.HashSet;
import java.util.Set;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view;
/**
* Test for class {@link IndexesController}
*/
public class IndexesControllerTest {
@Mock
RecipeService recipeService;
@Mock
Model model;
IndexesController indexesController;
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
indexesController = new IndexesController(recipeService);
}
@After
public void tearDown() throws Exception {
}
@Test
public void testMockMVC() throws Exception {
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(indexesController)
.build();
mockMvc.perform(MockMvcRequestBuilders.get("/"))
.andExpect(status().isOk())
.andExpect(view().name("index"));
}
/**
* test for method {@link IndexesController#getIndexPage(Model)}
*/
@Test
public void getIndexPage() {
// given
Set<Recipe> recipes = new HashSet<>();
recipes.add(new Recipe());
Recipe recipe = new Recipe();
recipe.setId(1l);
recipes.add(recipe);
when(recipeService.getRecipes()).thenReturn(recipes);
ArgumentCaptor<Set<Recipe>> argumentCaptor = ArgumentCaptor.forClass(Set.class);
//When
String viewName = indexesController.getIndexPage(model);
//Then
assertEquals("index",viewName);
verify(recipeService, times(1)).getRecipes();
verify(model,times(1)).addAttribute(eq("recipes"),argumentCaptor.capture());
Set<Recipe> setInController = argumentCaptor.getValue();
assertEquals(2, setInController.size());
}
}
|
[
"vinayagam.d.ganesh@gmail.com"
] |
vinayagam.d.ganesh@gmail.com
|
2ecd50cf821eae029c633921fd0db1168e70698d
|
c03a28264a1da6aa935a87c6c4f84d4d28afe272
|
/Leetcode/src/linkedin/Permutations.java
|
8cdb92ed5634af5e3c1741822b61fa782d4209bc
|
[] |
no_license
|
bbfeechen/Algorithm
|
d59731686f06d6f4d4c13d66a8963f190a84f361
|
87a158a608d842e53e13bccc73526aadd5d129b0
|
refs/heads/master
| 2021-04-30T22:35:03.499341
| 2019-05-03T07:26:15
| 2019-05-03T07:26:15
| 7,991,128
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,200
|
java
|
package linkedin;
import java.util.ArrayList;
import java.util.List;
public class Permutations {
public static List<List<Integer>> permute(int[] num) {
List<List<Integer>> result = new ArrayList<List<Integer>>();
if(num == null) {
return result;
}
List<Integer> solution = new ArrayList<Integer>();
helper(result, solution, num);
return result;
}
private static void helper(List<List<Integer>> result, List<Integer> solution, int[] num) {
if(solution.size() == num.length) {
result.add(new ArrayList<Integer>(solution));
return;
}
for(int i = 0; i < num.length; i++) {
if(solution.contains(num[i])) {
continue;
}
solution.add(num[i]);
helper(result, solution, num);
solution.remove(solution.size() - 1);
}
}
public static void main(String[] args) {
int[] num = {1,2,3};
List<List<Integer>> result = permute(num);
for(List<Integer> list : result) {
System.out.print("[");
for(int i : list) {
System.out.print(i + "");
}
System.out.print("]");
}
}
}
|
[
"bbfeechen@gmail.com"
] |
bbfeechen@gmail.com
|
8558b8ca56969f407a15137b13256b306b2f6838
|
113134a5b6abb7f3096753305290e19799d2b0d8
|
/app/src/main/java/com/histudent/jwsoft/histudent/model/entity/ShowImgEvent.java
|
f18e7dc16ffd2c56e5511c616b8bb1ba3e77cc54
|
[] |
no_license
|
dengjiaping/trunk
|
5047c99d25125b75451142fdb260d81be85f28b8
|
bd24e8a6fdc7f2ca003e95ec45c723c17bf50684
|
refs/heads/master
| 2021-08-26T07:05:59.113508
| 2017-11-22T01:42:11
| 2017-11-22T01:42:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 232
|
java
|
package com.histudent.jwsoft.histudent.model.entity;
/**
* Created by huyg on 2017/11/8.
*/
public class ShowImgEvent {
public int position;
public ShowImgEvent(int position) {
this.position = position;
}
}
|
[
"742315209@qq.com"
] |
742315209@qq.com
|
fd5999662040fb65330c141cb9598f31103125fd
|
393973e99ee8940a9503f91348b5b3b9acada7f8
|
/src/bridgePattern/Image.java
|
34785333153b85881c020e32612ed6959e7b3788
|
[] |
no_license
|
crazyda/pattern-23
|
fd3b33d0e09c81ec552b1f513a9871527feab8d9
|
420c3e0b404e8e05d064d0abdf53d22b21bb7111
|
refs/heads/master
| 2020-09-07T10:53:07.787566
| 2019-11-10T07:34:39
| 2019-11-10T07:34:39
| 220,755,945
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 626
|
java
|
/**
* @Title: Image.java
* @Package bridgePattern
* @Description:
* Copyright: Copyright (c) 2018
* Website: www.panzhijie.cn
*
* @Author Crazy
* @DateTime 2019年11月2日 下午10:00:22
* @version V1.0
*/
package bridgePattern;
/**
* @ClassName: Image
* @Description: 抽象图像类,充当抽象类
* @Author Crazy
* @DateTime 2019年11月2日 下午10:00:22
*/
public abstract class Image {
protected ImageImp imp ;
//注入实现类接口对象
public void setImageImp(ImageImp imp) {
this.imp = imp;
}
public abstract void parseFile(String fileName);
}
|
[
"crazyda@outlook.com"
] |
crazyda@outlook.com
|
13662675c805185db9268d37cb616a27be948708
|
69011b4a6233db48e56db40bc8a140f0dd721d62
|
/src/com/jshx/fwgl/service/impl/SendInformationServiceImpl.java
|
abc0c88163fb135c855dcd21691f49c9ad96742f
|
[] |
no_license
|
gechenrun/scysuper
|
bc5397e5220ee42dae5012a0efd23397c8c5cda0
|
e706d287700ff11d289c16f118ce7e47f7f9b154
|
refs/heads/master
| 2020-03-23T19:06:43.185061
| 2018-06-10T07:51:18
| 2018-06-10T07:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,006
|
java
|
package com.jshx.fwgl.service.impl;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jshx.core.base.service.impl.BaseServiceImpl;
import com.jshx.core.base.vo.Pagination;
import com.jshx.fwgl.dao.SendInformationDao;
import com.jshx.fwgl.entity.SendInformation;
import com.jshx.fwgl.service.SendInformationService;
import com.jshx.module.admin.entity.User;
import com.jshx.module.infomation.entity.Dept;
import com.jshx.module.infomation.entity.NoticeCallback;
@Service("sendInformationService")
public class SendInformationServiceImpl extends BaseServiceImpl implements SendInformationService
{
/**
* Dao类
*/
@Autowired()
@Qualifier("sendInformationDao")
private SendInformationDao sendInformationDao;
/**
* 分页查询
* @param page 分页信息
* @param paraMap 查询条件信息
* @return 分页信息
*/
public Pagination findByPage(Pagination page, Map<String, Object> paraMap)
{
return sendInformationDao.findByPage(page, paraMap);
}
/**
* 根据主键ID查询信息
* @param id 主键ID
* @return 主键ID对应的信息
*/
public SendInformation getById(String id)
{
return sendInformationDao.getById(id);
}
/**
* 保存信息
* @param model 信息
*/
@Transactional
public void save(SendInformation sendInformation)
{
sendInformationDao.save(sendInformation);
}
/**
* 修改信息
* @param model 信息
*/
@Transactional
public void update(SendInformation sendInformation)
{
sendInformationDao.update(sendInformation);
}
/**
* 物理删除信息
* @param ids 主键ID列表
*/
@Transactional
public void delete(String[] ids)
{
List list=Arrays.asList(ids);
Map<String, Object> paraMap = new HashMap<String, Object>();
paraMap.put("ids", list);
List objects=sendInformationDao.findSendInformation(paraMap);
sendInformationDao.removeAll(objects);
}
/**
* 逻辑删除信息
* @param ids 主键ID列表
*/
@Transactional
public void deleteWithFlag(String ids)
{
String[] idArray = ids.split("\\|");
if(null != idArray)
{
for(String id : idArray)
{
if(id!=null && !id.trim().equals(""))
sendInformationDao.deleteWithFlag(id);
}
}
}
/**
* 查询所有人员
*/
public List<User> getAllUsersByMap(Map map)
{
return sendInformationDao.getAllUsersByMap(map);
}
/**
* 查询所有部门
*/
public List<Dept> getAllDepartByMap(Map map)
{
return sendInformationDao.getAllDepartByMap(map);
}
/**
* 查询已阅读人员
*/
public List<NoticeCallback> getUserReadedids(String id)
{
return sendInformationDao.getUserReadedids(id);
}
/**
* 保存阅读记录
*/
@Transactional
public void saveNoticeBack(NoticeCallback noticeCallback)
{
sendInformationDao.saveNoticeBack(noticeCallback);
}
/**
* 更新阅读记录
*/
@Transactional
public void updateNoticeBack(NoticeCallback noticeCallback)
{
sendInformationDao.updateNoticeBack(noticeCallback);
}
/**
* 获取当前人员阅读记录
*/
public List<NoticeCallback> geReadedUsersIds(String id,String userId)
{
return sendInformationDao.geReadedUsersIds(id, userId);
}
/**
* 获取当前人员阅读记录
*/
public List<NoticeCallback> geBackById(Map map)
{
return sendInformationDao.geBackById(map);
}
/**
* 删除已有阅读记录
*/
@Transactional
public void deleteNoticeBackByMap(Map map)
{
sendInformationDao.deleteNoticeBackByMap(map);
}
//获取安监局领导角色的Id和name
public List<Map<String,Object>> findAJJldListByMap(Map<String, Object> paraMap){//获取安监局领导角色的Id和name
return sendInformationDao.findAJJldListByMap(paraMap);
}
}
|
[
"shellchange@sina.com"
] |
shellchange@sina.com
|
ccaf80ac96ae1eafbb1f4f2b77116535ed17bde0
|
b6b0cc2a90cc4a007aeff50cd2fbcb287299fa8c
|
/fr/src/main/java/com/udemy/fr/entities/User.java
|
bfd42ecc0c97c130a39648ca53c2a25545f907f7
|
[] |
no_license
|
JohnQ1981/flightreservation
|
4abc1a838c4ab4ec2617ed466e33d7738ed739c5
|
a439720566f1c76c71421a91d7890a01d3503730
|
refs/heads/master
| 2023-04-11T00:54:35.167461
| 2021-04-18T23:01:01
| 2021-04-18T23:01:01
| 359,270,385
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,175
|
java
|
package com.udemy.fr.entities;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class User {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
private String firstName;
private String lastName;
private String email;
private String password;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Override
public String toString() {
return "User [id=" + id + ", firstName=" + firstName + ", lastName=" + lastName + ", email=" + email
+ ", password=" + password + "]";
}
}
|
[
"ikram1981@gmail.com"
] |
ikram1981@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.